diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..94053e8 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,15 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "type": "java", + "name": "Spring Boot 실행", + "request": "launch", + "mainClass": "com.example.Application", + "projectName": "demo", + "cwd": "${workspaceFolder}", + "vmArgs": "-Dspring.profiles.active=local" + } + ], + "java.compile.nullAnalysis.mode": "disabled" +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..bb81741 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,4 @@ +{ + "java.compile.nullAnalysis.mode": "disabled", + "java.configuration.updateBuildConfiguration": "automatic" +} diff --git a/build.gradle b/build.gradle index 3ecc554..8ca0277 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,7 @@ plugins { id 'java' id 'org.springframework.boot' version '3.5.11' + id 'io.spring.dependency-management' version '1.1.7' } group = 'kr.iotdoor' @@ -22,17 +23,13 @@ ext { } dependencies { - implementation platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES) - runtimeOnly platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES) - annotationProcessor platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES) - testImplementation platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES) - implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springframework.boot:spring-boot-starter-validation' implementation 'org.springframework.boot:spring-boot-starter-actuator' developmentOnly 'org.springframework.boot:spring-boot-devtools' + implementation "org.mybatis.spring.boot:mybatis-spring-boot-starter:${mybatisSpringBootVersion}" implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity6' implementation 'nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect' @@ -51,7 +48,6 @@ tasks.withType(JavaCompile).configureEach { } tasks.named('bootRun') { - // Let bootRun read templates/static resources directly from src/main/resources. sourceResources sourceSets.main systemProperty 'spring.devtools.restart.enabled', 'true' } diff --git a/package-lock.json b/package-lock.json index 0f06899..2419a13 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,8 @@ "@tiptap/core": "^3.12.0", "@tiptap/extension-image": "^3.12.0", "@tiptap/pm": "^3.12.0", - "@tiptap/starter-kit": "^3.12.0" + "@tiptap/starter-kit": "^3.12.0", + "ag-grid-community": "^35.2.1" }, "devDependencies": { "esbuild": "^0.25.9" @@ -815,6 +816,19 @@ "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-2.0.0.tgz", "integrity": "sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg==" }, + "node_modules/ag-charts-types": { + "version": "13.2.1", + "resolved": "https://registry.npmjs.org/ag-charts-types/-/ag-charts-types-13.2.1.tgz", + "integrity": "sha512-r7veb3QqJtIKlXmeUsLR4/oDPwmHxFI2tmbZra/203mdaz3uwQUrrgYNg628nrK+7L2YxXnwGc6L05tWjLLjNQ==" + }, + "node_modules/ag-grid-community": { + "version": "35.2.1", + "resolved": "https://registry.npmjs.org/ag-grid-community/-/ag-grid-community-35.2.1.tgz", + "integrity": "sha512-ycmGI+1EbUT7i3eg/Kgi1owwnkdHXRufo10Xm6cfSsVPM3TMpvlbLgi28KIPt9DGHZWHq9fOBn7nxMNdv1Yaow==", + "dependencies": { + "ag-charts-types": "13.2.1" + } + }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", diff --git a/package.json b/package.json index 7b8c961..8c20d6d 100644 --- a/package.json +++ b/package.json @@ -2,13 +2,16 @@ "name": "iotdoor-admin-assets", "private": true, "scripts": { - "build:admin-js": "esbuild src/main/frontend/iotdoor.js --bundle --format=iife --global-name=IotdoorAdmin --target=es2019 --minify --outfile=src/main/resources/static/resources/kr/iotdoor/boot/admin/js/iotdoor.js" + "build:admin-js": "esbuild src/main/frontend/iotdoor.js --bundle --format=iife --global-name=IotdoorAdmin --target=es2019 --minify --outfile=src/main/resources/static/resources/kr/iotdoor/boot/admin/js/iotdoor.js", + "build:portfolio-public": "esbuild src/main/frontend/portfolio-public.js --bundle --format=iife --global-name=IotdoorPortfolio --target=es2019 --minify --outdir=src/main/resources/static/resources/kr/iotdoor/cmty/portfolio", + "build:assets": "npm run build:admin-js && npm run build:portfolio-public" }, "dependencies": { "@tiptap/core": "^3.12.0", "@tiptap/extension-image": "^3.12.0", "@tiptap/pm": "^3.12.0", - "@tiptap/starter-kit": "^3.12.0" + "@tiptap/starter-kit": "^3.12.0", + "ag-grid-community": "^35.2.1" }, "devDependencies": { "esbuild": "^0.25.9" diff --git a/src/main/frontend/iotdoor.js b/src/main/frontend/iotdoor.js index ba91bf6..0d4d09d 100644 --- a/src/main/frontend/iotdoor.js +++ b/src/main/frontend/iotdoor.js @@ -312,6 +312,104 @@ async function uploadImage(file, options, form) { return response.json(); } +function isImageFile(file) { + if (!file) { + return false; + } + + if (file.type?.startsWith("image/")) { + return true; + } + + return /\.(avif|bmp|gif|jpe?g|png|svg|webp)$/i.test(file.name || ""); +} + +function hasFileTransfer(dataTransfer) { + if (!dataTransfer) { + return false; + } + + return ( + Array.from(dataTransfer.types || []).includes("Files") || + Array.from(dataTransfer.items || []).some((item) => item.kind === "file") || + (dataTransfer.files?.length || 0) > 0 + ); +} + +function getImageFiles(files) { + return Array.from(files || []).filter(isImageFile); +} + +function getDropInsertPosition(editor, event) { + const position = editor.view.posAtCoords({ + left: event.clientX, + top: event.clientY, + }); + + if (typeof position?.pos !== "number") { + return null; + } + + return Math.max(0, Math.min(position.pos, editor.state.doc.content.size)); +} + +function createPortfolioImageNode(payload, file, isRepresentative) { + return { + type: PORTFOLIO_IMAGE_TYPE, + attrs: { + src: payload.url, + alt: payload.orgnlFileNm || file.name, + atchFileIdntfNo: payload.atchFileIdntfNo, + fileSn: payload.fileSn, + isRepresentative, + }, + }; +} + +function insertImageNodes(editor, imageNodes, insertAt) { + if (!imageNodes.length) { + return; + } + + const chain = editor.chain().focus(); + if (typeof insertAt === "number") { + chain.insertContentAt(insertAt, imageNodes).run(); + return; + } + + chain.insertContent(imageNodes).run(); +} + +async function uploadAndInsertImages(files, editor, options, form, insertAt, editorElement) { + const imageFiles = getImageFiles(files); + + if (!imageFiles.length) { + window.alert("이미지 파일만 업로드할 수 있습니다."); + return; + } + + editorElement?.classList.add("is-uploading-image"); + + try { + const imageNodes = []; + let shouldBeRepresentative = !getRepresentativeImage(editor); + + for (const file of imageFiles) { + const payload = await uploadImage(file, options, form); + imageNodes.push( + createPortfolioImageNode(payload, file, shouldBeRepresentative), + ); + shouldBeRepresentative = false; + } + + insertImageNodes(editor, imageNodes, insertAt); + } catch (error) { + window.alert(error.message || "이미지 업로드에 실패했습니다."); + } finally { + editorElement?.classList.remove("is-uploading-image"); + } +} + function ensureLegacyRepresentative(editor, form) { const currentUrl = form.dataset.currentThumbnailUrl || ""; const currentAtchFileIdntfNo = @@ -442,6 +540,70 @@ function attachToolbarActions(editor, toolbar, fileInput) { }); } +function attachImageDropUpload(editor, editorElement, options, form) { + let dragDepth = 0; + + const resetDragState = () => { + dragDepth = 0; + editorElement.classList.remove("is-dragging-image"); + }; + + const handleDragEnter = (event) => { + if (!hasFileTransfer(event.dataTransfer)) { + return; + } + + dragDepth += 1; + editorElement.classList.add("is-dragging-image"); + event.preventDefault(); + }; + + const handleDragOver = (event) => { + if (!hasFileTransfer(event.dataTransfer)) { + return; + } + + event.preventDefault(); + event.dataTransfer.dropEffect = "copy"; + }; + + const handleDragLeave = (event) => { + if (!hasFileTransfer(event.dataTransfer)) { + return; + } + + dragDepth -= 1; + if (dragDepth <= 0 || !editorElement.contains(event.relatedTarget)) { + resetDragState(); + } + }; + + const handleDrop = (event) => { + if (!hasFileTransfer(event.dataTransfer)) { + return; + } + + event.preventDefault(); + event.stopPropagation(); + resetDragState(); + + const insertAt = getDropInsertPosition(editor, event); + void uploadAndInsertImages( + event.dataTransfer.files, + editor, + options, + form, + insertAt, + editorElement, + ); + }; + + editorElement.addEventListener("dragenter", handleDragEnter, true); + editorElement.addEventListener("dragover", handleDragOver, true); + editorElement.addEventListener("dragleave", handleDragLeave, true); + editorElement.addEventListener("drop", handleDrop, true); +} + function initPortfolioEditor(options) { const form = document.querySelector(options.formSelector); const editorElement = document.querySelector(options.editorSelector); @@ -501,34 +663,22 @@ function initPortfolioEditor(options) { }); attachToolbarActions(editor, toolbar, fileInput); + attachImageDropUpload(editor, editorElement, options, form); fileInput.addEventListener("change", async () => { if (!fileInput.files?.length) { return; } - const [file] = fileInput.files; - try { - const payload = await uploadImage(file, options, form); - const shouldBeRepresentative = !getRepresentativeImage(editor); - - editor - .chain() - .focus() - .insertContent({ - type: PORTFOLIO_IMAGE_TYPE, - attrs: { - src: payload.url, - alt: payload.orgnlFileNm || file.name, - atchFileIdntfNo: payload.atchFileIdntfNo, - fileSn: payload.fileSn, - isRepresentative: shouldBeRepresentative, - }, - }) - .run(); - } catch (error) { - window.alert(error.message || "이미지 업로드에 실패했습니다."); + await uploadAndInsertImages( + fileInput.files, + editor, + options, + form, + null, + editorElement, + ); } finally { fileInput.value = ""; } diff --git a/src/main/frontend/portfolio-public.js b/src/main/frontend/portfolio-public.js new file mode 100644 index 0000000..6de210b --- /dev/null +++ b/src/main/frontend/portfolio-public.js @@ -0,0 +1,325 @@ +import { + AllCommunityModule, + ModuleRegistry, + createGrid, +} from "ag-grid-community"; +import "ag-grid-community/styles/ag-grid.css"; +import "ag-grid-community/styles/ag-theme-quartz.css"; + +ModuleRegistry.registerModules([AllCommunityModule]); + +const DEFAULT_SELECTOR = "[data-portfolio-list-panel]"; +const DEFAULT_PAGE_SIZE = 5; + +function toDate(value) { + if (!value) { + return null; + } + + const date = new Date(value); + return Number.isNaN(date.getTime()) ? null : date; +} + +function formatDate(value) { + const date = toDate(value); + if (!date) { + return ""; + } + + return new Intl.DateTimeFormat("ko-KR", { + year: "numeric", + month: "2-digit", + day: "2-digit", + }).format(date); +} + +function formatRelativeDate(value) { + const date = toDate(value); + if (!date) { + return ""; + } + + const diffMs = Date.now() - date.getTime(); + if (diffMs < 0) { + return formatDate(value); + } + + const diffMinutes = Math.floor(diffMs / 60000); + if (diffMinutes < 1) { + return "방금 전"; + } + + if (diffMinutes < 60) { + return `${diffMinutes}분 전`; + } + + const diffHours = Math.floor(diffMinutes / 60); + if (diffHours < 24) { + return `${diffHours}시간 전`; + } + + return formatDate(value); +} + +function getPostUrl(portfolioIdntfNo) { + return `/portfolio/${encodeURIComponent(portfolioIdntfNo)}`; +} + +function createTitleCell(params) { + const link = document.createElement("a"); + link.className = "portfolio-post-title-link"; + link.href = getPostUrl(params.data.portfolioIdntfNo); + link.textContent = params.value || ""; + link.title = params.value || ""; + return link; +} + +function createPageButton(label, options = {}) { + const button = document.createElement("button"); + button.type = "button"; + button.className = "portfolio-post-page-button"; + button.textContent = label; + + if (options.active) { + button.classList.add("is-active"); + button.setAttribute("aria-current", "page"); + } + + if (options.disabled) { + button.disabled = true; + } + + if (typeof options.onClick === "function") { + button.addEventListener("click", options.onClick); + } + + return button; +} + +function renderPagination(gridApi, paginationElement) { + if (!gridApi || !paginationElement) { + return; + } + + const totalPages = gridApi.paginationGetTotalPages(); + const currentPage = gridApi.paginationGetCurrentPage(); + paginationElement.replaceChildren(); + + if (totalPages <= 0) { + return; + } + + const maxVisiblePages = 10; + const currentPageGroup = Math.floor(currentPage / maxVisiblePages); + const startPage = currentPageGroup * maxVisiblePages; + const endPage = Math.min(startPage + maxVisiblePages, totalPages); + + if (startPage > 0) { + paginationElement.appendChild( + createPageButton("이전", { + onClick: () => gridApi.paginationGoToPage(startPage - 1), + }), + ); + } + + for (let page = startPage; page < endPage; page += 1) { + paginationElement.appendChild( + createPageButton(String(page + 1), { + active: page === currentPage, + onClick: () => gridApi.paginationGoToPage(page), + }), + ); + } + + if (endPage < totalPages) { + paginationElement.appendChild( + createPageButton("다음 >", { + onClick: () => gridApi.paginationGoToPage(endPage), + }), + ); + } +} + +function createGridOptions(rows, currentId, paginationElement) { + return { + rowData: rows, + columnDefs: [ + { + field: "title", + headerName: "글 제목", + flex: 1, + minWidth: 260, + cellRenderer: createTitleCell, + }, + { + field: "viewCount", + headerName: "조회수", + width: 96, + type: "numericColumn", + headerClass: "portfolio-post-number-header", + cellClass: "portfolio-post-number-cell", + }, + { + field: "registeredAt", + headerName: "작성일", + width: 132, + valueFormatter: (params) => formatRelativeDate(params.value), + headerClass: "portfolio-post-date-header", + cellClass: "portfolio-post-date-cell", + }, + ], + defaultColDef: { + sortable: true, + resizable: false, + suppressMovable: true, + }, + domLayout: "autoHeight", + headerHeight: 34, + rowHeight: 40, + pagination: true, + paginationPageSize: DEFAULT_PAGE_SIZE, + suppressPaginationPanel: true, + suppressCellFocus: true, + suppressDragLeaveHidesColumns: true, + suppressHorizontalScroll: true, + getRowId: (params) => params.data.portfolioIdntfNo, + getRowClass: (params) => + params.data.portfolioIdntfNo === currentId ? "ag-row-current-post" : "", + onGridReady: (params) => renderPagination(params.api, paginationElement), + onPaginationChanged: (event) => renderPagination(event.api, paginationElement), + localeText: { + page: "페이지", + more: "더 보기", + to: "-", + of: "/", + next: "다음", + last: "마지막", + first: "처음", + previous: "이전", + loadingOoo: "불러오는 중...", + noRowsToShow: "등록된 글이 없습니다.", + pageSizeSelectorLabel: "줄 보기", + }, + }; +} + +async function fetchPortfolioItems(listUrl) { + const response = await fetch(listUrl, { + headers: { + Accept: "application/json", + }, + credentials: "same-origin", + }); + + if (!response.ok) { + throw new Error("포트폴리오 목록을 불러오지 못했습니다."); + } + + const rows = await response.json(); + return Array.isArray(rows) ? rows : []; +} + +function initPortfolioListPanel(selector = DEFAULT_SELECTOR) { + const panel = document.querySelector(selector); + if (!panel) { + return null; + } + + const toggleButton = panel.querySelector("[data-portfolio-list-toggle]"); + const body = panel.querySelector("[data-portfolio-list-body]"); + const gridElement = panel.querySelector("[data-portfolio-list-grid]"); + const paginationElement = panel.querySelector("[data-portfolio-pagination]"); + const pageSizeSelect = panel.querySelector("[data-portfolio-page-size]"); + const countElement = panel.querySelector(".portfolio-post-list-summary span"); + const listUrl = panel.dataset.listUrl; + const currentId = panel.dataset.currentId || ""; + const initialOpen = panel.dataset.initialOpen === "true"; + + if (!toggleButton || !body || !gridElement || !paginationElement || !listUrl) { + return null; + } + + let isOpen = false; + let rowsPromise = null; + let gridApi = null; + + const loadRows = () => { + rowsPromise ||= fetchPortfolioItems(listUrl); + return rowsPromise; + }; + + const renderRows = async () => { + const rows = await loadRows(); + + if (countElement) { + countElement.textContent = `${rows.length}개의 글`; + } + + if (!gridApi) { + gridApi = createGrid( + gridElement, + createGridOptions(rows, currentId, paginationElement), + ); + renderPagination(gridApi, paginationElement); + return; + } + + gridApi.setGridOption("rowData", rows); + renderPagination(gridApi, paginationElement); + }; + + const setOpen = async (nextOpen) => { + isOpen = nextOpen; + toggleButton.textContent = isOpen ? "목록닫기" : "목록열기"; + toggleButton.setAttribute("aria-expanded", String(isOpen)); + body.hidden = !isOpen; + + if (!isOpen) { + return; + } + + toggleButton.disabled = true; + try { + await renderRows(); + } catch (error) { + window.alert(error.message || "포트폴리오 목록을 불러오지 못했습니다."); + setOpen(false); + } finally { + toggleButton.disabled = false; + } + }; + + toggleButton.addEventListener("click", () => { + void setOpen(!isOpen); + }); + + pageSizeSelect?.addEventListener("change", () => { + if (!gridApi) { + return; + } + + gridApi.setGridOption( + "paginationPageSize", + Number.parseInt(pageSizeSelect.value, 10) || DEFAULT_PAGE_SIZE, + ); + gridApi.paginationGoToPage(0); + renderPagination(gridApi, paginationElement); + }); + + void setOpen(initialOpen); + + return { + open: () => setOpen(true), + close: () => setOpen(false), + reload: async () => { + rowsPromise = null; + await renderRows(); + }, + }; +} + +document.addEventListener("DOMContentLoaded", () => { + initPortfolioListPanel(); +}); + +export { initPortfolioListPanel }; diff --git a/src/main/java/kr/iotdoor/boot/mapper/AccessStatisticsMapper.java b/src/main/java/kr/iotdoor/boot/mapper/AccessStatisticsMapper.java new file mode 100644 index 0000000..9ecc0ae --- /dev/null +++ b/src/main/java/kr/iotdoor/boot/mapper/AccessStatisticsMapper.java @@ -0,0 +1,138 @@ +package kr.iotdoor.boot.mapper; + +import kr.iotdoor.boot.model.statistics.AccessDailyStat; +import kr.iotdoor.boot.model.statistics.AccessLog; +import kr.iotdoor.boot.model.statistics.AccessStatItem; +import org.apache.ibatis.annotations.Insert; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.time.LocalDateTime; +import java.util.List; + +@Mapper +public interface AccessStatisticsMapper { + + @Insert(""" + INSERT INTO TN_ACCESS_LOG ( + ACCESS_LOG_IDNTF_NO, + SESSION_ID, + REFERER_URL, + ACCESS_IP, + HTTP_METHOD, + REQUEST_URI, + QUERY_STRING, + USER_AGENT, + STATUS_CD, + REG_DT + ) VALUES ( + #{accessLogIdntfNo}, + #{sessionId}, + #{refererUrl}, + #{accessIp}, + #{httpMethod}, + #{requestUri}, + #{queryString}, + #{userAgent}, + #{statusCode}, + CURRENT_TIMESTAMP + ) + """) + int insertAccessLog(AccessLog accessLog); + + @Select(""" + SELECT COUNT(*) + FROM TN_ACCESS_LOG + """) + long countAll(); + + @Select(""" + SELECT COUNT(*) + FROM TN_ACCESS_LOG + WHERE REG_DT >= #{startAt} + AND REG_DT < #{endAt} + """) + long countBetween( + @Param("startAt") LocalDateTime startAt, + @Param("endAt") LocalDateTime endAt + ); + + @Select(""" + SELECT COUNT(DISTINCT ACCESS_IP) + FROM TN_ACCESS_LOG + WHERE ACCESS_IP IS NOT NULL + AND ACCESS_IP <> '' + """) + long countUniqueIp(); + + @Select(""" + SELECT COUNT(DISTINCT SESSION_ID) + FROM TN_ACCESS_LOG + WHERE SESSION_ID IS NOT NULL + AND SESSION_ID <> '' + """) + long countUniqueSession(); + + @Select(""" + SELECT + ACCESS_LOG_IDNTF_NO, + SESSION_ID, + REFERER_URL, + ACCESS_IP, + HTTP_METHOD, + REQUEST_URI, + QUERY_STRING, + USER_AGENT, + STATUS_CD AS STATUS_CODE, + REG_DT AS REGISTERED_AT + FROM TN_ACCESS_LOG + ORDER BY REG_DT DESC + LIMIT #{limit} + """) + List selectRecentLogs(@Param("limit") int limit); + + @Select(""" + SELECT + CAST(REG_DT AS DATE) AS ACCESS_DATE, + COUNT(*) AS ACCESS_COUNT + FROM TN_ACCESS_LOG + WHERE REG_DT >= #{startAt} + GROUP BY CAST(REG_DT AS DATE) + ORDER BY ACCESS_DATE DESC + LIMIT #{limit} + """) + List selectDailyStats( + @Param("startAt") LocalDateTime startAt, + @Param("limit") int limit + ); + + @Select(""" + SELECT + REQUEST_URI AS LABEL, + COUNT(*) AS ACCESS_COUNT + FROM TN_ACCESS_LOG + GROUP BY REQUEST_URI + ORDER BY ACCESS_COUNT DESC, LABEL ASC + LIMIT #{limit} + """) + List selectTopPages(@Param("limit") int limit); + + @Select(""" + SELECT + CASE + WHEN REFERER_URL IS NULL OR REFERER_URL = '' THEN '직접 접속' + ELSE REFERER_URL + END AS LABEL, + COUNT(*) AS ACCESS_COUNT + FROM TN_ACCESS_LOG + GROUP BY + CASE + WHEN REFERER_URL IS NULL OR REFERER_URL = '' THEN '직접 접속' + ELSE REFERER_URL + END + ORDER BY ACCESS_COUNT DESC, LABEL ASC + LIMIT #{limit} + """) + List selectTopReferers(@Param("limit") int limit); +} diff --git a/src/main/java/kr/iotdoor/boot/mapper/MainBannerMapper.java b/src/main/java/kr/iotdoor/boot/mapper/MainBannerMapper.java new file mode 100644 index 0000000..0e46a87 --- /dev/null +++ b/src/main/java/kr/iotdoor/boot/mapper/MainBannerMapper.java @@ -0,0 +1,187 @@ +package kr.iotdoor.boot.mapper; + +import kr.iotdoor.boot.model.banner.MainBanner; +import org.apache.ibatis.annotations.Insert; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import org.apache.ibatis.annotations.Update; + +import java.util.List; + +@Mapper +public interface MainBannerMapper { + + @Select(""" + SELECT + BANNER_IDNTF_NO, + TTL AS TITLE, + CN AS CONTENT, + IMAGE_ATCH_FILE_IDNTF_NO, + IMAGE_FILE_SN, + IMAGE_URL, + SORT_ORDR AS SORT_ORDER, + USE_YN, + DEL_YN, + REG_DT AS REGISTERED_AT, + UPD_DT AS UPDATED_AT + FROM TN_MAIN_BANNER + WHERE DEL_YN = 'N' + ORDER BY SORT_ORDR ASC, REG_DT ASC + """) + List selectAdminBanners(); + + @Select(""" + SELECT + BANNER_IDNTF_NO, + TTL AS TITLE, + CN AS CONTENT, + IMAGE_ATCH_FILE_IDNTF_NO, + IMAGE_FILE_SN, + IMAGE_URL, + SORT_ORDR AS SORT_ORDER, + USE_YN, + DEL_YN, + REG_DT AS REGISTERED_AT, + UPD_DT AS UPDATED_AT + FROM TN_MAIN_BANNER + WHERE DEL_YN = 'N' + AND USE_YN = 'Y' + ORDER BY SORT_ORDR ASC, REG_DT ASC + """) + List selectPublicBanners(); + + @Select(""" + SELECT + BANNER_IDNTF_NO, + TTL AS TITLE, + CN AS CONTENT, + IMAGE_ATCH_FILE_IDNTF_NO, + IMAGE_FILE_SN, + IMAGE_URL, + SORT_ORDR AS SORT_ORDER, + USE_YN, + DEL_YN, + REG_DT AS REGISTERED_AT, + UPD_DT AS UPDATED_AT + FROM TN_MAIN_BANNER + WHERE BANNER_IDNTF_NO = #{bannerIdntfNo} + AND DEL_YN = 'N' + """) + MainBanner selectBanner(@Param("bannerIdntfNo") String bannerIdntfNo); + + @Select(""" + SELECT + BANNER_IDNTF_NO, + TTL AS TITLE, + CN AS CONTENT, + IMAGE_ATCH_FILE_IDNTF_NO, + IMAGE_FILE_SN, + IMAGE_URL, + SORT_ORDR AS SORT_ORDER, + USE_YN, + DEL_YN, + REG_DT AS REGISTERED_AT, + UPD_DT AS UPDATED_AT + FROM TN_MAIN_BANNER + WHERE DEL_YN = 'N' + AND SORT_ORDR < #{sortOrder} + ORDER BY SORT_ORDR DESC, REG_DT DESC + LIMIT 1 + """) + MainBanner selectPreviousBanner(@Param("sortOrder") int sortOrder); + + @Select(""" + SELECT + BANNER_IDNTF_NO, + TTL AS TITLE, + CN AS CONTENT, + IMAGE_ATCH_FILE_IDNTF_NO, + IMAGE_FILE_SN, + IMAGE_URL, + SORT_ORDR AS SORT_ORDER, + USE_YN, + DEL_YN, + REG_DT AS REGISTERED_AT, + UPD_DT AS UPDATED_AT + FROM TN_MAIN_BANNER + WHERE DEL_YN = 'N' + AND SORT_ORDR > #{sortOrder} + ORDER BY SORT_ORDR ASC, REG_DT ASC + LIMIT 1 + """) + MainBanner selectNextBanner(@Param("sortOrder") int sortOrder); + + @Select(""" + SELECT COALESCE(MAX(SORT_ORDR), 0) + FROM TN_MAIN_BANNER + WHERE DEL_YN = 'N' + """) + int selectMaxSortOrder(); + + @Insert(""" + INSERT INTO TN_MAIN_BANNER ( + BANNER_IDNTF_NO, + TTL, + CN, + IMAGE_ATCH_FILE_IDNTF_NO, + IMAGE_FILE_SN, + IMAGE_URL, + SORT_ORDR, + USE_YN, + DEL_YN, + REG_DT, + UPD_DT + ) VALUES ( + #{bannerIdntfNo}, + #{title}, + #{content}, + #{imageAtchFileIdntfNo}, + #{imageFileSn}, + #{imageUrl}, + #{sortOrder}, + #{useYn}, + 'N', + CURRENT_TIMESTAMP, + NULL + ) + """) + int insertBanner(MainBanner mainBanner); + + @Update(""" + UPDATE TN_MAIN_BANNER + SET + TTL = #{title}, + CN = #{content}, + IMAGE_ATCH_FILE_IDNTF_NO = #{imageAtchFileIdntfNo}, + IMAGE_FILE_SN = #{imageFileSn}, + IMAGE_URL = #{imageUrl}, + USE_YN = #{useYn}, + UPD_DT = CURRENT_TIMESTAMP + WHERE BANNER_IDNTF_NO = #{bannerIdntfNo} + AND DEL_YN = 'N' + """) + int updateBanner(MainBanner mainBanner); + + @Update(""" + UPDATE TN_MAIN_BANNER + SET + SORT_ORDR = #{sortOrder}, + UPD_DT = CURRENT_TIMESTAMP + WHERE BANNER_IDNTF_NO = #{bannerIdntfNo} + AND DEL_YN = 'N' + """) + int updateSortOrder( + @Param("bannerIdntfNo") String bannerIdntfNo, + @Param("sortOrder") int sortOrder + ); + + @Update(""" + UPDATE TN_MAIN_BANNER + SET + DEL_YN = 'Y', + UPD_DT = CURRENT_TIMESTAMP + WHERE BANNER_IDNTF_NO = #{bannerIdntfNo} + """) + int deleteBanner(@Param("bannerIdntfNo") String bannerIdntfNo); +} diff --git a/src/main/java/kr/iotdoor/boot/model/banner/MainBanner.java b/src/main/java/kr/iotdoor/boot/model/banner/MainBanner.java new file mode 100644 index 0000000..bd90fbf --- /dev/null +++ b/src/main/java/kr/iotdoor/boot/model/banner/MainBanner.java @@ -0,0 +1,106 @@ +package kr.iotdoor.boot.model.banner; + +import java.time.LocalDateTime; + +public class MainBanner { + + private String bannerIdntfNo; + private String title; + private String content; + private String imageAtchFileIdntfNo; + private Integer imageFileSn; + private String imageUrl; + private int sortOrder; + private String useYn; + private String delYn; + private LocalDateTime registeredAt; + private LocalDateTime updatedAt; + + public String getBannerIdntfNo() { + return bannerIdntfNo; + } + + public void setBannerIdntfNo(String bannerIdntfNo) { + this.bannerIdntfNo = bannerIdntfNo; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public String getImageAtchFileIdntfNo() { + return imageAtchFileIdntfNo; + } + + public void setImageAtchFileIdntfNo(String imageAtchFileIdntfNo) { + this.imageAtchFileIdntfNo = imageAtchFileIdntfNo; + } + + public Integer getImageFileSn() { + return imageFileSn; + } + + public void setImageFileSn(Integer imageFileSn) { + this.imageFileSn = imageFileSn; + } + + public String getImageUrl() { + return imageUrl; + } + + public void setImageUrl(String imageUrl) { + this.imageUrl = imageUrl; + } + + public int getSortOrder() { + return sortOrder; + } + + public void setSortOrder(int sortOrder) { + this.sortOrder = sortOrder; + } + + public String getUseYn() { + return useYn; + } + + public void setUseYn(String useYn) { + this.useYn = useYn; + } + + public String getDelYn() { + return delYn; + } + + public void setDelYn(String delYn) { + this.delYn = delYn; + } + + public LocalDateTime getRegisteredAt() { + return registeredAt; + } + + public void setRegisteredAt(LocalDateTime registeredAt) { + this.registeredAt = registeredAt; + } + + public LocalDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(LocalDateTime updatedAt) { + this.updatedAt = updatedAt; + } +} diff --git a/src/main/java/kr/iotdoor/boot/model/banner/MainBannerForm.java b/src/main/java/kr/iotdoor/boot/model/banner/MainBannerForm.java new file mode 100644 index 0000000..de34633 --- /dev/null +++ b/src/main/java/kr/iotdoor/boot/model/banner/MainBannerForm.java @@ -0,0 +1,78 @@ +package kr.iotdoor.boot.model.banner; + +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.Size; + +public class MainBannerForm { + + private String bannerIdntfNo; + + @NotBlank(message = "제목을 입력해주세요.") + @Size(max = 200, message = "제목은 200자 이하로 입력해주세요.") + private String title; + + @NotBlank(message = "내용을 입력해주세요.") + @Size(max = 1000, message = "내용은 1000자 이하로 입력해주세요.") + private String content; + + private String imageAtchFileIdntfNo; + private Integer imageFileSn; + private String imageUrl; + private String useYn = "Y"; + + public String getBannerIdntfNo() { + return bannerIdntfNo; + } + + public void setBannerIdntfNo(String bannerIdntfNo) { + this.bannerIdntfNo = bannerIdntfNo; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public String getImageAtchFileIdntfNo() { + return imageAtchFileIdntfNo; + } + + public void setImageAtchFileIdntfNo(String imageAtchFileIdntfNo) { + this.imageAtchFileIdntfNo = imageAtchFileIdntfNo; + } + + public Integer getImageFileSn() { + return imageFileSn; + } + + public void setImageFileSn(Integer imageFileSn) { + this.imageFileSn = imageFileSn; + } + + public String getImageUrl() { + return imageUrl; + } + + public void setImageUrl(String imageUrl) { + this.imageUrl = imageUrl; + } + + public String getUseYn() { + return useYn; + } + + public void setUseYn(String useYn) { + this.useYn = useYn; + } +} diff --git a/src/main/java/kr/iotdoor/boot/model/portfolio/PortfolioForm.java b/src/main/java/kr/iotdoor/boot/model/portfolio/PortfolioForm.java index 7413cb3..125d5fa 100644 --- a/src/main/java/kr/iotdoor/boot/model/portfolio/PortfolioForm.java +++ b/src/main/java/kr/iotdoor/boot/model/portfolio/PortfolioForm.java @@ -1,6 +1,9 @@ package kr.iotdoor.boot.model.portfolio; import jakarta.validation.constraints.NotBlank; +import org.springframework.format.annotation.DateTimeFormat; + +import java.time.LocalDateTime; public class PortfolioForm { @@ -15,6 +18,9 @@ public class PortfolioForm { private String thumbnailAtchFileIdntfNo; private int thumbnailFileSn; + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private LocalDateTime registeredAt; + public String getPortfolioIdntfNo() { return portfolioIdntfNo; } @@ -54,4 +60,12 @@ public class PortfolioForm { public void setThumbnailFileSn(int thumbnailFileSn) { this.thumbnailFileSn = thumbnailFileSn; } + + public LocalDateTime getRegisteredAt() { + return registeredAt; + } + + public void setRegisteredAt(LocalDateTime registeredAt) { + this.registeredAt = registeredAt; + } } diff --git a/src/main/java/kr/iotdoor/boot/model/statistics/AccessDailyStat.java b/src/main/java/kr/iotdoor/boot/model/statistics/AccessDailyStat.java new file mode 100644 index 0000000..6b9a5a0 --- /dev/null +++ b/src/main/java/kr/iotdoor/boot/model/statistics/AccessDailyStat.java @@ -0,0 +1,25 @@ +package kr.iotdoor.boot.model.statistics; + +import java.time.LocalDate; + +public class AccessDailyStat { + + private LocalDate accessDate; + private long accessCount; + + public LocalDate getAccessDate() { + return accessDate; + } + + public void setAccessDate(LocalDate accessDate) { + this.accessDate = accessDate; + } + + public long getAccessCount() { + return accessCount; + } + + public void setAccessCount(long accessCount) { + this.accessCount = accessCount; + } +} diff --git a/src/main/java/kr/iotdoor/boot/model/statistics/AccessLog.java b/src/main/java/kr/iotdoor/boot/model/statistics/AccessLog.java new file mode 100644 index 0000000..31fda82 --- /dev/null +++ b/src/main/java/kr/iotdoor/boot/model/statistics/AccessLog.java @@ -0,0 +1,104 @@ +package kr.iotdoor.boot.model.statistics; + +import java.time.LocalDateTime; + +public class AccessLog { + + private String accessLogIdntfNo; + private String sessionId; + private String refererUrl; + private String accessIp; + private String httpMethod; + private String requestUri; + private String queryString; + private String userAgent; + private Integer statusCode; + private LocalDateTime registeredAt; + + public String getAccessLogIdntfNo() { + return accessLogIdntfNo; + } + + public void setAccessLogIdntfNo(String accessLogIdntfNo) { + this.accessLogIdntfNo = accessLogIdntfNo; + } + + public String getSessionId() { + return sessionId; + } + + public void setSessionId(String sessionId) { + this.sessionId = sessionId; + } + + public String getRefererUrl() { + return refererUrl; + } + + public void setRefererUrl(String refererUrl) { + this.refererUrl = refererUrl; + } + + public String getAccessIp() { + return accessIp; + } + + public void setAccessIp(String accessIp) { + this.accessIp = accessIp; + } + + public String getHttpMethod() { + return httpMethod; + } + + public void setHttpMethod(String httpMethod) { + this.httpMethod = httpMethod; + } + + public String getRequestUri() { + return requestUri; + } + + public void setRequestUri(String requestUri) { + this.requestUri = requestUri; + } + + public String getQueryString() { + return queryString; + } + + public void setQueryString(String queryString) { + this.queryString = queryString; + } + + public String getUserAgent() { + return userAgent; + } + + public void setUserAgent(String userAgent) { + this.userAgent = userAgent; + } + + public Integer getStatusCode() { + return statusCode; + } + + public void setStatusCode(Integer statusCode) { + this.statusCode = statusCode; + } + + public LocalDateTime getRegisteredAt() { + return registeredAt; + } + + public void setRegisteredAt(LocalDateTime registeredAt) { + this.registeredAt = registeredAt; + } + + public String getFullRequestPath() { + if (queryString == null || queryString.isBlank()) { + return requestUri; + } + return requestUri + "?" + queryString; + } +} diff --git a/src/main/java/kr/iotdoor/boot/model/statistics/AccessStatItem.java b/src/main/java/kr/iotdoor/boot/model/statistics/AccessStatItem.java new file mode 100644 index 0000000..82a452b --- /dev/null +++ b/src/main/java/kr/iotdoor/boot/model/statistics/AccessStatItem.java @@ -0,0 +1,23 @@ +package kr.iotdoor.boot.model.statistics; + +public class AccessStatItem { + + private String label; + private long accessCount; + + public String getLabel() { + return label; + } + + public void setLabel(String label) { + this.label = label; + } + + public long getAccessCount() { + return accessCount; + } + + public void setAccessCount(long accessCount) { + this.accessCount = accessCount; + } +} diff --git a/src/main/java/kr/iotdoor/boot/model/statistics/AccessStatisticsSummary.java b/src/main/java/kr/iotdoor/boot/model/statistics/AccessStatisticsSummary.java new file mode 100644 index 0000000..bc22018 --- /dev/null +++ b/src/main/java/kr/iotdoor/boot/model/statistics/AccessStatisticsSummary.java @@ -0,0 +1,41 @@ +package kr.iotdoor.boot.model.statistics; + +public class AccessStatisticsSummary { + + private long totalAccessCount; + private long todayAccessCount; + private long uniqueIpCount; + private long uniqueSessionCount; + + public long getTotalAccessCount() { + return totalAccessCount; + } + + public void setTotalAccessCount(long totalAccessCount) { + this.totalAccessCount = totalAccessCount; + } + + public long getTodayAccessCount() { + return todayAccessCount; + } + + public void setTodayAccessCount(long todayAccessCount) { + this.todayAccessCount = todayAccessCount; + } + + public long getUniqueIpCount() { + return uniqueIpCount; + } + + public void setUniqueIpCount(long uniqueIpCount) { + this.uniqueIpCount = uniqueIpCount; + } + + public long getUniqueSessionCount() { + return uniqueSessionCount; + } + + public void setUniqueSessionCount(long uniqueSessionCount) { + this.uniqueSessionCount = uniqueSessionCount; + } +} diff --git a/src/main/java/kr/iotdoor/boot/service/AccessStatisticsService.java b/src/main/java/kr/iotdoor/boot/service/AccessStatisticsService.java new file mode 100644 index 0000000..51fec8a --- /dev/null +++ b/src/main/java/kr/iotdoor/boot/service/AccessStatisticsService.java @@ -0,0 +1,69 @@ +package kr.iotdoor.boot.service; + +import kr.iotdoor.boot.mapper.AccessStatisticsMapper; +import kr.iotdoor.boot.model.statistics.AccessDailyStat; +import kr.iotdoor.boot.model.statistics.AccessLog; +import kr.iotdoor.boot.model.statistics.AccessStatItem; +import kr.iotdoor.boot.model.statistics.AccessStatisticsSummary; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.ZoneId; +import java.util.List; +import java.util.UUID; + +@Service +public class AccessStatisticsService { + + private static final ZoneId DEFAULT_ZONE = ZoneId.of("Asia/Seoul"); + + private final AccessStatisticsMapper accessStatisticsMapper; + + public AccessStatisticsService(AccessStatisticsMapper accessStatisticsMapper) { + this.accessStatisticsMapper = accessStatisticsMapper; + } + + @Transactional + public void record(AccessLog accessLog) { + accessLog.setAccessLogIdntfNo(newIdentifier()); + accessStatisticsMapper.insertAccessLog(accessLog); + } + + @Transactional(readOnly = true) + public AccessStatisticsSummary getSummary() { + LocalDate today = LocalDate.now(DEFAULT_ZONE); + AccessStatisticsSummary summary = new AccessStatisticsSummary(); + summary.setTotalAccessCount(accessStatisticsMapper.countAll()); + summary.setTodayAccessCount(accessStatisticsMapper.countBetween(today.atStartOfDay(), today.plusDays(1).atStartOfDay())); + summary.setUniqueIpCount(accessStatisticsMapper.countUniqueIp()); + summary.setUniqueSessionCount(accessStatisticsMapper.countUniqueSession()); + return summary; + } + + @Transactional(readOnly = true) + public List getRecentLogs(int limit) { + return accessStatisticsMapper.selectRecentLogs(limit); + } + + @Transactional(readOnly = true) + public List getDailyStats(int days) { + LocalDate startDate = LocalDate.now(DEFAULT_ZONE).minusDays(Math.max(days - 1, 0)); + return accessStatisticsMapper.selectDailyStats(startDate.atStartOfDay(), days); + } + + @Transactional(readOnly = true) + public List getTopPages(int limit) { + return accessStatisticsMapper.selectTopPages(limit); + } + + @Transactional(readOnly = true) + public List getTopReferers(int limit) { + return accessStatisticsMapper.selectTopReferers(limit); + } + + private String newIdentifier() { + return UUID.randomUUID().toString().replace("-", ""); + } +} diff --git a/src/main/java/kr/iotdoor/boot/service/MainBannerService.java b/src/main/java/kr/iotdoor/boot/service/MainBannerService.java new file mode 100644 index 0000000..b07c499 --- /dev/null +++ b/src/main/java/kr/iotdoor/boot/service/MainBannerService.java @@ -0,0 +1,165 @@ +package kr.iotdoor.boot.service; + +import kr.iotdoor.boot.mapper.MainBannerMapper; +import kr.iotdoor.boot.model.banner.MainBanner; +import kr.iotdoor.boot.model.banner.MainBannerForm; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.StringUtils; + +import java.util.List; +import java.util.UUID; + +@Service +public class MainBannerService { + + private static final String FALLBACK_IMAGE = "/resources/kr/iotdoor/comn/site/layout/image/common/no_img.svg"; + + private final MainBannerMapper mainBannerMapper; + private final FileStorageService fileStorageService; + + public MainBannerService(MainBannerMapper mainBannerMapper, FileStorageService fileStorageService) { + this.mainBannerMapper = mainBannerMapper; + this.fileStorageService = fileStorageService; + } + + @Transactional(readOnly = true) + public List getPublicBanners() { + return mainBannerMapper.selectPublicBanners().stream() + .map(this::enrich) + .toList(); + } + + @Transactional(readOnly = true) + public List getAdminBanners() { + return mainBannerMapper.selectAdminBanners().stream() + .map(this::enrich) + .toList(); + } + + @Transactional(readOnly = true) + public MainBannerForm getForm(String bannerIdntfNo) { + MainBannerForm form = new MainBannerForm(); + form.setUseYn("Y"); + + if (!StringUtils.hasText(bannerIdntfNo)) { + return form; + } + + MainBanner banner = mainBannerMapper.selectBanner(bannerIdntfNo); + if (banner == null) { + return form; + } + + form.setBannerIdntfNo(banner.getBannerIdntfNo()); + form.setTitle(banner.getTitle()); + form.setContent(banner.getContent()); + form.setImageAtchFileIdntfNo(banner.getImageAtchFileIdntfNo()); + form.setImageFileSn(banner.getImageFileSn()); + form.setImageUrl(banner.getImageUrl()); + form.setUseYn("Y".equals(banner.getUseYn()) ? "Y" : "N"); + return form; + } + + @Transactional + public String save(MainBannerForm form) { + boolean hasUploadedImage = hasUploadedImage(form); + if (!hasUploadedImage && !StringUtils.hasText(form.getImageUrl())) { + throw new IllegalArgumentException("배너 이미지는 필수입니다."); + } + + if (StringUtils.hasText(form.getBannerIdntfNo())) { + MainBanner existing = mainBannerMapper.selectBanner(form.getBannerIdntfNo()); + if (existing == null) { + throw new IllegalArgumentException("수정할 배너를 찾을 수 없습니다."); + } + + MainBanner banner = toBanner(form); + banner.setBannerIdntfNo(existing.getBannerIdntfNo()); + banner.setSortOrder(existing.getSortOrder()); + mainBannerMapper.updateBanner(banner); + return existing.getBannerIdntfNo(); + } + + MainBanner banner = toBanner(form); + banner.setBannerIdntfNo(newIdentifier()); + banner.setSortOrder(mainBannerMapper.selectMaxSortOrder() + 10); + mainBannerMapper.insertBanner(banner); + return banner.getBannerIdntfNo(); + } + + @Transactional + public void delete(String bannerIdntfNo) { + mainBannerMapper.deleteBanner(bannerIdntfNo); + } + + @Transactional + public void move(String bannerIdntfNo, String direction) { + MainBanner current = mainBannerMapper.selectBanner(bannerIdntfNo); + if (current == null) { + return; + } + + MainBanner target = "up".equals(direction) + ? mainBannerMapper.selectPreviousBanner(current.getSortOrder()) + : mainBannerMapper.selectNextBanner(current.getSortOrder()); + + if (target == null) { + return; + } + + mainBannerMapper.updateSortOrder(current.getBannerIdntfNo(), target.getSortOrder()); + mainBannerMapper.updateSortOrder(target.getBannerIdntfNo(), current.getSortOrder()); + } + + public String resolveImageUrl(String imageAtchFileIdntfNo, Integer imageFileSn, String imageUrl) { + if (StringUtils.hasText(imageAtchFileIdntfNo) && imageFileSn != null && imageFileSn > 0) { + return fileStorageService.toPublicUrl(imageAtchFileIdntfNo, imageFileSn); + } + + if (StringUtils.hasText(imageUrl)) { + return imageUrl; + } + + return FALLBACK_IMAGE; + } + + private MainBanner toBanner(MainBannerForm form) { + boolean hasUploadedImage = hasUploadedImage(form); + + MainBanner banner = new MainBanner(); + banner.setTitle(form.getTitle().trim()); + banner.setContent(form.getContent().trim()); + banner.setImageAtchFileIdntfNo(hasUploadedImage ? form.getImageAtchFileIdntfNo() : null); + banner.setImageFileSn(hasUploadedImage ? form.getImageFileSn() : null); + banner.setImageUrl(hasUploadedImage ? null : trimToNull(form.getImageUrl())); + banner.setUseYn("Y".equals(form.getUseYn()) ? "Y" : "N"); + return banner; + } + + private MainBanner enrich(MainBanner banner) { + banner.setImageUrl(resolveImageUrl( + banner.getImageAtchFileIdntfNo(), + banner.getImageFileSn(), + banner.getImageUrl() + )); + return banner; + } + + private boolean hasUploadedImage(MainBannerForm form) { + return StringUtils.hasText(form.getImageAtchFileIdntfNo()) + && form.getImageFileSn() != null + && form.getImageFileSn() > 0; + } + + private String trimToNull(String value) { + if (!StringUtils.hasText(value)) { + return null; + } + return value.trim(); + } + + private String newIdentifier() { + return UUID.randomUUID().toString().replace("-", ""); + } +} diff --git a/src/main/java/kr/iotdoor/boot/service/PortfolioService.java b/src/main/java/kr/iotdoor/boot/service/PortfolioService.java index d3ec953..1a70ab0 100644 --- a/src/main/java/kr/iotdoor/boot/service/PortfolioService.java +++ b/src/main/java/kr/iotdoor/boot/service/PortfolioService.java @@ -90,7 +90,7 @@ public class PortfolioService { item.setContent(form.getContent().trim()); item.setThumbnailAtchFileIdntfNo(thumbnailAtchFileIdntfNo); item.setThumbnailFileSn(thumbnailFileSn); - item.setRegisteredAt(LocalDateTime.now()); + item.setRegisteredAt(form.getRegisteredAt() == null ? LocalDateTime.now() : form.getRegisteredAt()); item.setRegisteredByUserIdntfNo(principal.getUserIdntfNo()); portfolioMapper.insertPortfolio(item); } diff --git a/src/main/java/kr/iotdoor/boot/web/AccessLogFilter.java b/src/main/java/kr/iotdoor/boot/web/AccessLogFilter.java new file mode 100644 index 0000000..a3babf7 --- /dev/null +++ b/src/main/java/kr/iotdoor/boot/web/AccessLogFilter.java @@ -0,0 +1,163 @@ +package kr.iotdoor.boot.web; + +import jakarta.servlet.FilterChain; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpSession; +import kr.iotdoor.boot.model.statistics.AccessLog; +import kr.iotdoor.boot.service.AccessStatisticsService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; +import org.springframework.util.StringUtils; +import org.springframework.web.filter.OncePerRequestFilter; + +import java.io.IOException; +import java.util.List; +import java.util.Locale; + +@Component +public class AccessLogFilter extends OncePerRequestFilter { + + private static final Logger LOGGER = LoggerFactory.getLogger(AccessLogFilter.class); + + private static final List SKIP_PREFIXES = List.of( + "/resources/", + "/comn/file/view/", + "/comn/user/login/", + "/mfuc/", + "/mngr/", + "/actuator/", + "/error", + "/favicon" + ); + + private static final List STATIC_EXTENSIONS = List.of( + ".css", + ".js", + ".map", + ".ico", + ".png", + ".jpg", + ".jpeg", + ".gif", + ".svg", + ".webp", + ".woff", + ".woff2", + ".ttf", + ".eot", + ".otf" + ); + + private final AccessStatisticsService accessStatisticsService; + + public AccessLogFilter(AccessStatisticsService accessStatisticsService) { + this.accessStatisticsService = accessStatisticsService; + } + + @Override + protected boolean shouldNotFilter(HttpServletRequest request) { + String path = getApplicationPath(request); + if (!StringUtils.hasText(path)) { + return true; + } + + String method = request.getMethod(); + if ("OPTIONS".equalsIgnoreCase(method)) { + return true; + } + + for (String skipPrefix : SKIP_PREFIXES) { + if (path.startsWith(skipPrefix)) { + return true; + } + } + + String lowerPath = path.toLowerCase(Locale.ROOT); + for (String staticExtension : STATIC_EXTENSIONS) { + if (lowerPath.endsWith(staticExtension)) { + return true; + } + } + + return false; + } + + @Override + protected void doFilterInternal( + HttpServletRequest request, + HttpServletResponse response, + FilterChain filterChain + ) throws ServletException, IOException { + HttpSession session = request.getSession(); + String sessionId = session.getId(); + + try { + filterChain.doFilter(request, response); + } finally { + if (!request.isAsyncStarted()) { + recordAccess(request, response, sessionId); + } + } + } + + @Override + protected boolean shouldNotFilterErrorDispatch() { + return true; + } + + private void recordAccess(HttpServletRequest request, HttpServletResponse response, String sessionId) { + try { + AccessLog accessLog = new AccessLog(); + accessLog.setSessionId(limit(sessionId, 128)); + accessLog.setRefererUrl(limit(request.getHeader("Referer"), 1000)); + accessLog.setAccessIp(limit(resolveClientIp(request), 45)); + accessLog.setHttpMethod(limit(request.getMethod(), 10)); + accessLog.setRequestUri(limit(getApplicationPath(request), 500)); + accessLog.setQueryString(limit(request.getQueryString(), 1000)); + accessLog.setUserAgent(limit(request.getHeader("User-Agent"), 1000)); + accessLog.setStatusCode(response.getStatus()); + accessStatisticsService.record(accessLog); + } catch (RuntimeException exception) { + LOGGER.warn("Failed to record access statistics.", exception); + } + } + + private String resolveClientIp(HttpServletRequest request) { + String forwardedFor = request.getHeader("X-Forwarded-For"); + if (StringUtils.hasText(forwardedFor)) { + return forwardedFor.split(",")[0].trim(); + } + + String realIp = request.getHeader("X-Real-IP"); + if (StringUtils.hasText(realIp)) { + return realIp.trim(); + } + + return request.getRemoteAddr(); + } + + private String getApplicationPath(HttpServletRequest request) { + String requestUri = request.getRequestURI(); + String contextPath = request.getContextPath(); + if (StringUtils.hasText(contextPath) && requestUri.startsWith(contextPath)) { + return requestUri.substring(contextPath.length()); + } + return requestUri; + } + + private String limit(String value, int maxLength) { + if (!StringUtils.hasText(value)) { + return null; + } + + String trimmed = value.trim(); + if (trimmed.length() <= maxLength) { + return trimmed; + } + + return trimmed.substring(0, maxLength); + } +} diff --git a/src/main/java/kr/iotdoor/boot/web/AdminMainBannerController.java b/src/main/java/kr/iotdoor/boot/web/AdminMainBannerController.java new file mode 100644 index 0000000..03fd0f0 --- /dev/null +++ b/src/main/java/kr/iotdoor/boot/web/AdminMainBannerController.java @@ -0,0 +1,112 @@ +package kr.iotdoor.boot.web; + +import jakarta.validation.Valid; +import kr.iotdoor.boot.model.banner.MainBannerForm; +import kr.iotdoor.boot.service.MainBannerService; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.util.StringUtils; +import org.springframework.validation.BindingResult; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.ModelAttribute; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestParam; + +@Controller +public class AdminMainBannerController { + + private final MainBannerService mainBannerService; + + public AdminMainBannerController(MainBannerService mainBannerService) { + this.mainBannerService = mainBannerService; + } + + @GetMapping("/mfuc/banner/list.do") + public String bannerList(Model model) { + model.addAttribute("banners", mainBannerService.getAdminBanners()); + model.addAttribute("adminMenu", "banner"); + model.addAttribute("pageTitle", "배너 관리"); + model.addAttribute("pageDescription", "메인 서비스 배너의 이미지, 제목, 내용, 노출 순서를 관리합니다."); + return "kr/iotdoor/boot/admin/banner/list"; + } + + @GetMapping("/mfuc/banner/form.do") + public String bannerForm( + @RequestParam(name = "bannerIdntfNo", required = false) String bannerIdntfNo, + Model model + ) { + MainBannerForm form = mainBannerService.getForm(bannerIdntfNo); + model.addAttribute("form", form); + model.addAttribute("currentImageUrl", currentImageUrl(form)); + applyFormPage(model, form); + return "kr/iotdoor/boot/admin/banner/form"; + } + + @PostMapping("/mfuc/banner/save.do") + public String saveBanner( + @Valid @ModelAttribute("form") MainBannerForm form, + BindingResult bindingResult, + @RequestParam(name = "useYn", required = false) String useYn, + Model model + ) { + form.setUseYn("Y".equals(useYn) ? "Y" : "N"); + + if (!hasImage(form)) { + bindingResult.rejectValue("imageAtchFileIdntfNo", "required", "배너 이미지는 필수입니다."); + } + + if (bindingResult.hasErrors()) { + model.addAttribute("currentImageUrl", currentImageUrl(form)); + applyFormPage(model, form); + return "kr/iotdoor/boot/admin/banner/form"; + } + + try { + mainBannerService.save(form); + return "redirect:/mfuc/banner/list.do?saved=1"; + } catch (IllegalArgumentException exception) { + bindingResult.reject("saveError", exception.getMessage()); + model.addAttribute("currentImageUrl", currentImageUrl(form)); + applyFormPage(model, form); + return "kr/iotdoor/boot/admin/banner/form"; + } + } + + @PostMapping("/mfuc/banner/delete.do") + public String deleteBanner(@RequestParam("bannerIdntfNo") String bannerIdntfNo) { + mainBannerService.delete(bannerIdntfNo); + return "redirect:/mfuc/banner/list.do?deleted=1"; + } + + @PostMapping("/mfuc/banner/move.do") + public String moveBanner( + @RequestParam("bannerIdntfNo") String bannerIdntfNo, + @RequestParam("direction") String direction + ) { + mainBannerService.move(bannerIdntfNo, direction); + return "redirect:/mfuc/banner/list.do?ordered=1"; + } + + private void applyFormPage(Model model, MainBannerForm form) { + model.addAttribute("adminMenu", "banner"); + model.addAttribute("pageTitle", StringUtils.hasText(form.getBannerIdntfNo()) ? "배너 수정" : "배너 등록"); + model.addAttribute("pageDescription", "메인 서비스 영역에 노출할 배너 이미지와 문구를 입력합니다."); + } + + private boolean hasImage(MainBannerForm form) { + return StringUtils.hasText(form.getImageUrl()) + || ( + StringUtils.hasText(form.getImageAtchFileIdntfNo()) + && form.getImageFileSn() != null + && form.getImageFileSn() > 0 + ); + } + + private String currentImageUrl(MainBannerForm form) { + return mainBannerService.resolveImageUrl( + form.getImageAtchFileIdntfNo(), + form.getImageFileSn(), + form.getImageUrl() + ); + } +} diff --git a/src/main/java/kr/iotdoor/boot/web/AdminPortfolioController.java b/src/main/java/kr/iotdoor/boot/web/AdminPortfolioController.java index 55da8ef..d779747 100644 --- a/src/main/java/kr/iotdoor/boot/web/AdminPortfolioController.java +++ b/src/main/java/kr/iotdoor/boot/web/AdminPortfolioController.java @@ -46,6 +46,7 @@ public class AdminPortfolioController { form.setContent(portfolio.getContent()); form.setThumbnailAtchFileIdntfNo(portfolio.getThumbnailAtchFileIdntfNo()); form.setThumbnailFileSn(portfolio.getThumbnailFileSn()); + form.setRegisteredAt(portfolio.getRegisteredAt()); model.addAttribute("currentThumbnailUrl", portfolio.getImageUrl()); } } diff --git a/src/main/java/kr/iotdoor/boot/web/AdminStatisticsController.java b/src/main/java/kr/iotdoor/boot/web/AdminStatisticsController.java new file mode 100644 index 0000000..c6fb1dd --- /dev/null +++ b/src/main/java/kr/iotdoor/boot/web/AdminStatisticsController.java @@ -0,0 +1,30 @@ +package kr.iotdoor.boot.web; + +import kr.iotdoor.boot.service.AccessStatisticsService; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.GetMapping; + +@Controller +public class AdminStatisticsController { + + private final AccessStatisticsService accessStatisticsService; + + public AdminStatisticsController(AccessStatisticsService accessStatisticsService) { + this.accessStatisticsService = accessStatisticsService; + } + + @GetMapping("/mfuc/statistics/access.do") + public String accessStatistics(Model model) { + model.addAttribute("summary", accessStatisticsService.getSummary()); + model.addAttribute("dailyStats", accessStatisticsService.getDailyStats(14)); + model.addAttribute("topPages", accessStatisticsService.getTopPages(10)); + model.addAttribute("topReferers", accessStatisticsService.getTopReferers(10)); + model.addAttribute("recentLogs", accessStatisticsService.getRecentLogs(100)); + model.addAttribute("adminMenu", "statistics"); + model.addAttribute("adminSubMenu", "access"); + model.addAttribute("pageTitle", "접속 통계"); + model.addAttribute("pageDescription", "공개 페이지 접속 기록과 주요 유입 정보를 확인합니다."); + return "kr/iotdoor/boot/admin/statistics/access"; + } +} diff --git a/src/main/java/kr/iotdoor/boot/web/PublicPageController.java b/src/main/java/kr/iotdoor/boot/web/PublicPageController.java index 040e3a0..a6781cf 100644 --- a/src/main/java/kr/iotdoor/boot/web/PublicPageController.java +++ b/src/main/java/kr/iotdoor/boot/web/PublicPageController.java @@ -1,22 +1,29 @@ package kr.iotdoor.boot.web; import kr.iotdoor.boot.service.PortfolioService; +import kr.iotdoor.boot.service.MainBannerService; +import java.time.LocalDateTime; +import java.util.List; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.ResponseBody; @Controller public class PublicPageController { + private final MainBannerService mainBannerService; private final PortfolioService portfolioService; - public PublicPageController(PortfolioService portfolioService) { + public PublicPageController(MainBannerService mainBannerService, PortfolioService portfolioService) { + this.mainBannerService = mainBannerService; this.portfolioService = portfolioService; } @GetMapping({"/", "/index.do"}) public String home(Model model) { model.addAttribute("mainYn", "Y"); + model.addAttribute("mainBanners", mainBannerService.getPublicBanners()); return "kr/iotdoor/comn/site/mainPge"; } @@ -42,6 +49,37 @@ public class PublicPageController { } model.addAttribute("portfolio", portfolio); + model.addAttribute("portfolioCount", portfolioService.count()); return "kr/iotdoor/cmty/portfolio/detail"; } + + @ResponseBody + @GetMapping("/portfolio/items.json") + public List portfolioItems() { + return portfolioService.getPortfolioItems().stream() + .map(PortfolioListItemResponse::from) + .toList(); + } + + public record PortfolioListItemResponse( + String portfolioIdntfNo, + String title, + String summary, + String imageUrl, + LocalDateTime registeredAt, + long viewCount, + String registeredByName + ) { + public static PortfolioListItemResponse from(kr.iotdoor.boot.model.portfolio.PortfolioItem item) { + return new PortfolioListItemResponse( + item.getPortfolioIdntfNo(), + item.getTitle(), + item.getSummary(), + item.getImageUrl(), + item.getRegisteredAt(), + item.getViewCount(), + item.getRegisteredByName() + ); + } + } } diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index b586e7c..2b79ac5 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -42,6 +42,7 @@ spring: sql: init: mode: always + encoding: UTF-8 jackson: time-zone: Asia/Seoul mvc: diff --git a/src/main/resources/schema.sql b/src/main/resources/schema.sql index d9d3ab4..cc7472f 100644 --- a/src/main/resources/schema.sql +++ b/src/main/resources/schema.sql @@ -66,6 +66,193 @@ CREATE TABLE IF NOT EXISTS TN_CONTACT_INQRY ( PRIMARY KEY (CONTACT_IDNTF_NO) ); +CREATE TABLE IF NOT EXISTS TN_ACCESS_LOG ( + ACCESS_LOG_IDNTF_NO VARCHAR(32) NOT NULL, + SESSION_ID VARCHAR(128) NULL, + REFERER_URL VARCHAR(1000) NULL, + ACCESS_IP VARCHAR(45) NULL, + HTTP_METHOD VARCHAR(10) NOT NULL, + REQUEST_URI VARCHAR(500) NOT NULL, + QUERY_STRING VARCHAR(1000) NULL, + USER_AGENT VARCHAR(1000) NULL, + STATUS_CD INT NULL, + REG_DT DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (ACCESS_LOG_IDNTF_NO) +); + +CREATE TABLE IF NOT EXISTS TN_MAIN_BANNER ( + BANNER_IDNTF_NO VARCHAR(32) NOT NULL, + TTL VARCHAR(200) NOT NULL, + CN TEXT NULL, + IMAGE_ATCH_FILE_IDNTF_NO VARCHAR(32) NULL, + IMAGE_FILE_SN INT NULL, + IMAGE_URL VARCHAR(500) NULL, + SORT_ORDR INT NOT NULL DEFAULT 0, + USE_YN CHAR(1) NOT NULL DEFAULT 'Y', + DEL_YN CHAR(1) NOT NULL DEFAULT 'N', + REG_DT DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, + UPD_DT DATETIME NULL, + PRIMARY KEY (BANNER_IDNTF_NO), + CONSTRAINT FK_TN_MAIN_BANNER__IMAGE FOREIGN KEY (IMAGE_ATCH_FILE_IDNTF_NO) + REFERENCES TN_ATCH_FILE (ATCH_FILE_IDNTF_NO) +); + CREATE INDEX IF NOT EXISTS IDX_TN_ATCH_FILE_DTL__PATH ON TN_ATCH_FILE_DTL (FILE_STRG_PATH_NM); CREATE INDEX IF NOT EXISTS IDX_TN_PORTFOLIO__REG_DT ON TN_PORTFOLIO (REG_DT); CREATE INDEX IF NOT EXISTS IDX_TN_CONTACT_INQRY__SUBMIT_DT ON TN_CONTACT_INQRY (SUBMIT_DT); +CREATE INDEX IF NOT EXISTS IDX_TN_ACCESS_LOG__REG_DT ON TN_ACCESS_LOG (REG_DT); +CREATE INDEX IF NOT EXISTS IDX_TN_ACCESS_LOG__ACCESS_IP ON TN_ACCESS_LOG (ACCESS_IP); +CREATE INDEX IF NOT EXISTS IDX_TN_ACCESS_LOG__SESSION_ID ON TN_ACCESS_LOG (SESSION_ID); +CREATE INDEX IF NOT EXISTS IDX_TN_ACCESS_LOG__REQUEST_URI ON TN_ACCESS_LOG (REQUEST_URI); +CREATE INDEX IF NOT EXISTS IDX_TN_MAIN_BANNER__SORT ON TN_MAIN_BANNER (SORT_ORDR); +CREATE INDEX IF NOT EXISTS IDX_TN_MAIN_BANNER__USE_DEL ON TN_MAIN_BANNER (USE_YN, DEL_YN); + +INSERT INTO TN_MAIN_BANNER ( + BANNER_IDNTF_NO, TTL, CN, IMAGE_URL, SORT_ORDR, USE_YN, DEL_YN, REG_DT +) +SELECT + '00000000000000000000000000000001', + '슬라이딩자동문', + '슬라이드 오토도어를 현장 조건에 맞춰 시공합니다.', + '/resources/kr/iotdoor/comn/site/layout/image/template/img-600x400-1.jpg', + 10, + 'Y', + 'N', + CURRENT_TIMESTAMP +WHERE NOT EXISTS ( + SELECT 1 FROM TN_MAIN_BANNER WHERE BANNER_IDNTF_NO = '00000000000000000000000000000001' +); + +INSERT INTO TN_MAIN_BANNER ( + BANNER_IDNTF_NO, TTL, CN, IMAGE_URL, SORT_ORDR, USE_YN, DEL_YN, REG_DT +) +SELECT + '00000000000000000000000000000002', + '산업용자동문', + '공장, 물류 현장에 필요한 산업용 자동문을 제공합니다.', + '/resources/kr/iotdoor/comn/site/layout/image/template/img-600x400-2.jpg', + 20, + 'Y', + 'N', + CURRENT_TIMESTAMP +WHERE NOT EXISTS ( + SELECT 1 FROM TN_MAIN_BANNER WHERE BANNER_IDNTF_NO = '00000000000000000000000000000002' +); + +INSERT INTO TN_MAIN_BANNER ( + BANNER_IDNTF_NO, TTL, CN, IMAGE_URL, SORT_ORDR, USE_YN, DEL_YN, REG_DT +) +SELECT + '00000000000000000000000000000003', + '고급산업용자동문', + '정밀 제어와 안정성이 필요한 고급 산업 현장에 대응합니다.', + '/resources/kr/iotdoor/comn/site/layout/image/template/img-600x400-3.jpg', + 30, + 'Y', + 'N', + CURRENT_TIMESTAMP +WHERE NOT EXISTS ( + SELECT 1 FROM TN_MAIN_BANNER WHERE BANNER_IDNTF_NO = '00000000000000000000000000000003' +); + +INSERT INTO TN_MAIN_BANNER ( + BANNER_IDNTF_NO, TTL, CN, IMAGE_URL, SORT_ORDR, USE_YN, DEL_YN, REG_DT +) +SELECT + '00000000000000000000000000000004', + '내풍압고속셔터', + '바람과 사용 빈도가 높은 공간에 적합한 고속 셔터를 시공합니다.', + '/resources/kr/iotdoor/comn/site/layout/image/template/img-600x400-4.jpg', + 40, + 'Y', + 'N', + CURRENT_TIMESTAMP +WHERE NOT EXISTS ( + SELECT 1 FROM TN_MAIN_BANNER WHERE BANNER_IDNTF_NO = '00000000000000000000000000000004' +); + +INSERT INTO TN_MAIN_BANNER ( + BANNER_IDNTF_NO, TTL, CN, IMAGE_URL, SORT_ORDR, USE_YN, DEL_YN, REG_DT +) +SELECT + '00000000000000000000000000000005', + '오버헤드도어', + '창고와 산업 시설에 맞는 오버헤드도어를 설치합니다.', + '/resources/kr/iotdoor/comn/site/layout/image/template/img-600x400-5.jpg?1', + 50, + 'Y', + 'N', + CURRENT_TIMESTAMP +WHERE NOT EXISTS ( + SELECT 1 FROM TN_MAIN_BANNER WHERE BANNER_IDNTF_NO = '00000000000000000000000000000005' +); + +INSERT INTO TN_MAIN_BANNER ( + BANNER_IDNTF_NO, TTL, CN, IMAGE_URL, SORT_ORDR, USE_YN, DEL_YN, REG_DT +) +SELECT + '00000000000000000000000000000006', + '방화용슬라이딩자동문', + '방화 성능이 필요한 출입 공간에 맞춘 자동문 솔루션입니다.', + '/resources/kr/iotdoor/comn/site/layout/image/template/img-600x400-6.jpg?1?1', + 60, + 'Y', + 'N', + CURRENT_TIMESTAMP +WHERE NOT EXISTS ( + SELECT 1 FROM TN_MAIN_BANNER WHERE BANNER_IDNTF_NO = '00000000000000000000000000000006' +); + +UPDATE TN_MAIN_BANNER +SET + TTL = '슬라이딩자동문', + CN = '슬라이드 오토도어를 현장 조건에 맞춰 시공합니다.', + IMAGE_URL = COALESCE(IMAGE_URL, '/resources/kr/iotdoor/comn/site/layout/image/template/img-600x400-1.jpg'), + UPD_DT = CURRENT_TIMESTAMP +WHERE BANNER_IDNTF_NO = '00000000000000000000000000000001' + AND (TTL LIKE '%�%' OR CN LIKE '%�%'); + +UPDATE TN_MAIN_BANNER +SET + TTL = '산업용자동문', + CN = '공장, 물류 현장에 필요한 산업용 자동문을 제공합니다.', + IMAGE_URL = COALESCE(IMAGE_URL, '/resources/kr/iotdoor/comn/site/layout/image/template/img-600x400-2.jpg'), + UPD_DT = CURRENT_TIMESTAMP +WHERE BANNER_IDNTF_NO = '00000000000000000000000000000002' + AND (TTL LIKE '%�%' OR CN LIKE '%�%'); + +UPDATE TN_MAIN_BANNER +SET + TTL = '고급산업용자동문', + CN = '정밀 제어와 안정성이 필요한 고급 산업 현장에 대응합니다.', + IMAGE_URL = COALESCE(IMAGE_URL, '/resources/kr/iotdoor/comn/site/layout/image/template/img-600x400-3.jpg'), + UPD_DT = CURRENT_TIMESTAMP +WHERE BANNER_IDNTF_NO = '00000000000000000000000000000003' + AND (TTL LIKE '%�%' OR CN LIKE '%�%'); + +UPDATE TN_MAIN_BANNER +SET + TTL = '내풍압고속셔터', + CN = '바람과 사용 빈도가 높은 공간에 적합한 고속 셔터를 시공합니다.', + IMAGE_URL = COALESCE(IMAGE_URL, '/resources/kr/iotdoor/comn/site/layout/image/template/img-600x400-4.jpg'), + UPD_DT = CURRENT_TIMESTAMP +WHERE BANNER_IDNTF_NO = '00000000000000000000000000000004' + AND (TTL LIKE '%�%' OR CN LIKE '%�%'); + +UPDATE TN_MAIN_BANNER +SET + TTL = '오버헤드도어', + CN = '창고와 산업 시설에 맞는 오버헤드도어를 설치합니다.', + IMAGE_URL = COALESCE(IMAGE_URL, '/resources/kr/iotdoor/comn/site/layout/image/template/img-600x400-5.jpg?1'), + UPD_DT = CURRENT_TIMESTAMP +WHERE BANNER_IDNTF_NO = '00000000000000000000000000000005' + AND (TTL LIKE '%�%' OR CN LIKE '%�%'); + +UPDATE TN_MAIN_BANNER +SET + TTL = '방화용슬라이딩자동문', + CN = '방화 성능이 필요한 출입 공간에 맞춘 자동문 솔루션입니다.', + IMAGE_URL = COALESCE(IMAGE_URL, '/resources/kr/iotdoor/comn/site/layout/image/template/img-600x400-6.jpg?1?1'), + UPD_DT = CURRENT_TIMESTAMP +WHERE BANNER_IDNTF_NO = '00000000000000000000000000000006' + AND (TTL LIKE '%�%' OR CN LIKE '%�%'); diff --git a/src/main/resources/static/resources/kr/iotdoor/boot/admin/css/admin-custom.css b/src/main/resources/static/resources/kr/iotdoor/boot/admin/css/admin-custom.css index d328ce8..4cd08bb 100644 --- a/src/main/resources/static/resources/kr/iotdoor/boot/admin/css/admin-custom.css +++ b/src/main/resources/static/resources/kr/iotdoor/boot/admin/css/admin-custom.css @@ -3,10 +3,15 @@ body { overflow-x: hidden; } +:root { + --iotdoor-admin-header-height: 104px; +} + .iotdoor-admin-shell { min-height: 100vh; width: 100%; overflow-x: hidden; + padding-top: var(--iotdoor-admin-header-height); } .iotdoor-admin-sidebar { @@ -14,6 +19,18 @@ body { width: 100%; } +.iotdoor-admin-header { + position: fixed; + top: 0; + right: 0; + left: 0; + z-index: 9999; + min-height: var(--iotdoor-admin-header-height); + background: #ffffff; + box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06); + isolation: isolate; +} + .iotdoor-admin-main { width: 100%; max-width: 100%; @@ -21,6 +38,10 @@ body { } @media (min-width: 1280px) { + .iotdoor-admin-shell { + padding-top: 0; + } + .iotdoor-admin-sidebar { position: fixed; top: 0; @@ -33,6 +54,11 @@ body { .iotdoor-admin-main { margin-left: 290px; width: calc(100% - 290px); + padding-top: var(--iotdoor-admin-header-height); + } + + .iotdoor-admin-header { + left: 290px; } } @@ -63,10 +89,23 @@ body { } .iotdoor-editor-surface { + position: relative; border: 1px solid #d0d5dd; border-radius: 1rem; background: #ffffff; overflow: hidden; + transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease; +} + +.iotdoor-editor-surface.is-dragging-image { + border-color: #465fff; + background: #f8fbff; + box-shadow: 0 0 0 4px rgba(70, 95, 255, 0.14); +} + +.iotdoor-editor-surface.is-uploading-image, +.iotdoor-editor-surface.is-uploading-image .ProseMirror { + cursor: progress; } .iotdoor-editor-surface .ProseMirror { @@ -121,33 +160,159 @@ body { } .iotdoor-editor-image-node { + display: table; + max-width: 100%; position: relative; margin: 1.25rem 0; } .iotdoor-editor-image-node.is-representative::before { - content: ""; + content: "✓ 대표"; position: absolute; - inset: 0; - border-radius: 1rem; - background: linear-gradient(180deg, rgba(70, 95, 255, 0.18), rgba(22, 25, 80, 0.3)); + top: 0.75rem; + left: 0.75rem; + z-index: 1; + padding: 0.45rem 0.7rem; + border-radius: 0.25rem; + background: #03c75a; + color: #ffffff; + font-size: 0.75rem; + font-weight: 700; + line-height: 1; + letter-spacing: 0; pointer-events: none; } .iotdoor-editor-image-node.is-representative::after { - content: "대표 이미지"; - position: absolute; - top: 1rem; - right: 1rem; - padding: 0.5rem 0.875rem; - border-radius: 999px; - background: rgba(16, 24, 40, 0.85); - color: #ffffff; - font-size: 0.75rem; - font-weight: 700; - letter-spacing: 0.02em; + content: none; } .iotdoor-editor-image-node.ProseMirror-selectednode img { box-shadow: 0 0 0 4px rgba(70, 95, 255, 0.18); } + +.iotdoor-access-log-table { + table-layout: fixed; + width: 100%; + min-width: 1180px; +} + +.iotdoor-access-log-table th, +.iotdoor-access-log-table td { + vertical-align: top; +} + +.iotdoor-access-log-table .access-log-col-time { + width: 160px; +} + +.iotdoor-access-log-table .access-log-col-ip { + width: 120px; +} + +.iotdoor-access-log-table .access-log-col-request { + width: 150px; +} + +.iotdoor-access-log-table .access-log-col-referer { + width: 260px; +} + +.iotdoor-access-log-table .access-log-col-session { + width: 190px; +} + +.iotdoor-access-log-table .access-log-col-status { + width: 70px; +} + +.iotdoor-access-log-table .access-log-col-agent { + width: 230px; +} + +.iotdoor-access-log-text { + display: block; + min-width: 0; + max-width: 100%; + overflow-wrap: anywhere; + word-break: break-word; + white-space: normal; + line-height: 1.55; +} + +.iotdoor-access-log-mono { + font-family: Consolas, "Courier New", monospace; + font-size: 0.8125rem; +} + +.iotdoor-banner-table { + width: 100%; + min-width: 980px; +} + +.iotdoor-banner-list-content { + max-width: 520px; +} + +.iotdoor-banner-form-grid { + display: grid; + gap: 1.5rem; +} + +.iotdoor-portfolio-table { + table-layout: fixed; + width: 100%; + min-width: 1040px; +} + +.iotdoor-portfolio-table th, +.iotdoor-portfolio-table td { + vertical-align: top; +} + +.iotdoor-portfolio-table .portfolio-col-image { + width: 170px; +} + +.iotdoor-portfolio-table .portfolio-col-title { + width: auto; +} + +.iotdoor-portfolio-table .portfolio-col-date { + width: 160px; +} + +.iotdoor-portfolio-table .portfolio-col-author { + width: 100px; +} + +.iotdoor-portfolio-table .portfolio-col-view { + width: 80px; +} + +.iotdoor-portfolio-table .portfolio-col-action { + width: 92px; +} + +.iotdoor-portfolio-table th { + white-space: nowrap; +} + +.iotdoor-portfolio-actions { + display: flex; + flex-direction: column; + gap: 0.5rem; + width: 64px; +} + +.iotdoor-portfolio-actions a, +.iotdoor-portfolio-actions button { + min-width: 64px; + white-space: nowrap; +} + +@media (min-width: 1280px) { + .iotdoor-banner-form-grid { + grid-template-columns: 360px 1fr; + } +} diff --git a/src/main/resources/static/resources/kr/iotdoor/boot/admin/js/iotdoor.js b/src/main/resources/static/resources/kr/iotdoor/boot/admin/js/iotdoor.js index 4d0e820..f10ce61 100644 --- a/src/main/resources/static/resources/kr/iotdoor/boot/admin/js/iotdoor.js +++ b/src/main/resources/static/resources/kr/iotdoor/boot/admin/js/iotdoor.js @@ -1,16 +1,16 @@ -var IotdoorAdmin=(()=>{var fi=Object.defineProperty;var Gu=Object.getOwnPropertyDescriptor;var Yu=Object.getOwnPropertyNames;var Xu=Object.prototype.hasOwnProperty;var Qu=(n,e)=>{for(var t in e)fi(n,t,{get:e[t],enumerable:!0})},Zu=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Yu(e))!Xu.call(n,i)&&i!==t&&fi(n,i,{get:()=>e[i],enumerable:!(r=Gu(e,i))||r.enumerable});return n};var ed=n=>Zu(fi({},"__esModule",{value:!0}),n);var Zg={};Qu(Zg,{initPortfolioEditor:()=>Qg});function ne(n){this.content=n}ne.prototype={constructor:ne,find:function(n){for(var e=0;e>1}};ne.from=function(n){if(n instanceof ne)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new ne(e)};var hi=ne;function Wo(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let i=n.child(r),s=e.child(r);if(i==s){t+=i.nodeSize;continue}if(!i.sameMarkup(s))return t;if(i.isText&&i.text!=s.text){for(let o=0;i.text[o]==s.text[o];o++)t++;return t}if(i.content.size||s.content.size){let o=Wo(i.content,s.content,t+1);if(o!=null)return o}t+=i.nodeSize}}function Ko(n,e,t,r){for(let i=n.childCount,s=e.childCount;;){if(i==0||s==0)return i==s?null:{a:t,b:r};let o=n.child(--i),l=e.child(--s),a=o.nodeSize;if(o==l){t-=a,r-=a;continue}if(!o.sameMarkup(l))return{a:t,b:r};if(o.isText&&o.text!=l.text){let c=0,u=Math.min(o.text.length,l.text.length);for(;ce&&r(a,i+l,s||null,o)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,t-u),r,i+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,i){let s="",o=!0;return this.nodesBetween(e,t,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,t-a):l.isLeaf?i?typeof i=="function"?i(l):i:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(o?o=!1:s+=r),s+=c},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,i=this.content.slice(),s=0;for(t.isText&&t.sameMarkup(r)&&(i[i.length-1]=t.withText(t.text+r.text),s=1);se)for(let s=0,o=0;oe&&((ot)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,t-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,t-o-1))),r.push(l),i+=l.nodeSize),o=a}return new n(r,i)}cutByIndex(e,t){return e==t?n.empty:e==0&&t==this.content.length?this:new n(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let i=this.content.slice(),s=this.size+t.nodeSize-r.nodeSize;return i[e]=t,new n(i,s)}addToStart(e){return new n([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new n(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;tthis.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let i=this.child(t),s=r+i.nodeSize;if(s>=e)return s==e?Pn(t+1,s):Pn(t,r);r=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return n.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new n(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return n.empty;let t,r=0;for(let i=0;ithis.type.rank&&(t||(t=e.slice(0,i)),t.push(this),r=!0),t&&t.push(s)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;tr.type.rank-i.type.rank),t}};B.none=[];var at=class extends Error{},S=class n{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=Jo(this.content,e+this.openStart,t);return r&&new n(r,this.openStart,this.openEnd)}removeBetween(e,t){return new n(Uo(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return n.empty;let r=t.openStart||0,i=t.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new n(k.fromJSON(e,t.content),r,i)}static maxOpen(e,t=!0){let r=0,i=0;for(let s=e.firstChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.firstChild)r++;for(let s=e.lastChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.lastChild)i++;return new n(e,r,i)}};S.empty=new S(k.empty,0,0);function Uo(n,e,t){let{index:r,offset:i}=n.findIndex(e),s=n.maybeChild(r),{index:o,offset:l}=n.findIndex(t);if(i==e||s.isText){if(l!=t&&!n.child(o).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=o)throw new RangeError("Removing non-flat range");return n.replaceChild(r,s.copy(Uo(s.content,e-i-1,t-i-1)))}function Jo(n,e,t,r){let{index:i,offset:s}=n.findIndex(e),o=n.maybeChild(i);if(s==e||o.isText)return r&&!r.canReplace(i,i,t)?null:n.cut(0,e).append(t).append(n.cut(e));let l=Jo(o.content,e-s-1,t,o);return l&&n.replaceChild(i,o.copy(l))}function td(n,e,t){if(t.openStart>n.depth)throw new at("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new at("Inconsistent open depths");return qo(n,e,t,0)}function qo(n,e,t,r){let i=n.index(r),s=n.node(r);if(i==e.index(r)&&r=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function qt(n,e,t,r){let i=(e||n).node(t),s=0,o=e?e.index(t):i.childCount;n&&(s=n.index(t),n.depth>t?s++:n.textOffset&&(ot(n.nodeAfter,r),s++));for(let l=s;li&&gi(n,e,i+1),o=r.depth>i&&gi(t,r,i+1),l=[];return qt(null,n,i,l),s&&o&&e.index(i)==t.index(i)?(Go(s,o),ot(lt(s,Yo(n,e,t,r,i+1)),l)):(s&&ot(lt(s,Bn(n,e,i+1)),l),qt(e,t,i,l),o&&ot(lt(o,Bn(t,r,i+1)),l)),qt(r,null,i,l),new k(l)}function Bn(n,e,t){let r=[];if(qt(null,n,t,r),n.depth>t){let i=gi(n,e,t+1);ot(lt(i,Bn(n,e,t+1)),r)}return qt(e,null,t,r),new k(r)}function nd(n,e){let t=e.depth-n.openStart,i=e.node(t).copy(n.content);for(let s=t-1;s>=0;s--)i=e.node(s).copy(k.from(i));return{start:i.resolveNoCache(n.openStart+t),end:i.resolveNoCache(i.content.size-n.openEnd-t)}}var Fn=class n{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(t);return r?e.child(t).cut(r):i}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],i=t==0?0:this.path[t*3-1]+1;for(let s=0;s0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new ct(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],i=0,s=t;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(s),c=s-a;if(r.push(o,l,i+a),!c||(o=o.child(l),o.isText))break;s=c-1,i+=a+1}return new n(t,r,s)}static resolveCached(e,t){let r=Lo.get(e);if(r)for(let s=0;se&&this.nodesBetween(e,t,s=>(r.isInSet(s.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),Xo(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=k.empty,i=0,s=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,i,s),l=o&&o.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=i;at.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let i=k.fromJSON(e,t.content),s=e.nodeType(t.type).create(t.attrs,i,r);return s.type.checkAttrs(s.attrs),s}};de.prototype.text=void 0;var ki=class n extends de{constructor(e,t,r,i){if(super(e,t,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Xo(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new n(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new n(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}};function Xo(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}var ut=class n{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new bi(e,t);if(r.next==null)return n.empty;let i=Qo(r);r.next&&r.err("Unexpected trailing text");let s=dd(ud(i));return fd(s,r),s}matchType(e){for(let t=0;tc.createAndFill()));for(let c=0;c=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let i=0;i{let s=i+(r.validEnd?"*":" ")+" ";for(let o=0;o"+e.indexOf(r.next[o].next);return s}).join(` -`)}};ut.empty=new ut(!0);var bi=class{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}};function Qo(n){let e=[];do e.push(sd(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function sd(n){let e=[];do e.push(od(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function od(n){let e=cd(n);for(;;)if(n.eat("+"))e={type:"plus",expr:e};else if(n.eat("*"))e={type:"star",expr:e};else if(n.eat("?"))e={type:"opt",expr:e};else if(n.eat("{"))e=ld(n,e);else break;return e}function zo(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function ld(n,e){let t=zo(n),r=t;return n.eat(",")&&(n.next!="}"?r=zo(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function ad(n,e){let t=n.nodeTypes,r=t[e];if(r)return[r];let i=[];for(let s in t){let o=t[s];o.isInGroup(e)&&i.push(o)}return i.length==0&&n.err("No node type or group '"+e+"' found"),i}function cd(n){if(n.eat("(")){let e=Qo(n);return n.eat(")")||n.err("Missing closing paren"),e}else if(/\W/.test(n.next))n.err("Unexpected token '"+n.next+"'");else{let e=ad(n,n.next).map(t=>(n.inline==null?n.inline=t.isInline:n.inline!=t.isInline&&n.err("Mixing inline and block content"),{type:"name",value:t}));return n.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function ud(n){let e=[[]];return i(s(n,0),t()),e;function t(){return e.push([])-1}function r(o,l,a){let c={term:a,to:l};return e[o].push(c),c}function i(o,l){o.forEach(a=>a.to=l)}function s(o,l){if(o.type=="choice")return o.exprs.reduce((a,c)=>a.concat(s(c,l)),[]);if(o.type=="seq")for(let a=0;;a++){let c=s(o.exprs[a],l);if(a==o.exprs.length-1)return c;i(c,l=t())}else if(o.type=="star"){let a=t();return r(l,a),i(s(o.expr,a),a),[r(a)]}else if(o.type=="plus"){let a=t();return i(s(o.expr,l),a),i(s(o.expr,a),a),[r(a)]}else{if(o.type=="opt")return[r(l)].concat(s(o.expr,l));if(o.type=="range"){let a=l;for(let c=0;c{n[o].forEach(({term:l,to:a})=>{if(!l)return;let c;for(let u=0;u{c||i.push([l,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let s=e[r.join(",")]=new ut(r.indexOf(n.length-1)>-1);for(let o=0;o-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:tl(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new de(this,this.computeAttrs(e),k.from(t),B.setFrom(r))}createChecked(e=null,t,r){return t=k.from(t),this.checkContent(t),new de(this,this.computeAttrs(e),t,B.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),t=k.from(t),t.size){let o=this.contentMatch.fillBefore(t);if(!o)return null;t=o.append(t)}let i=this.contentMatch.matchFragment(t),s=i&&i.fillBefore(k.empty,!0);return s?new de(this,e,t.append(s),B.setFrom(r)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let r=0;r-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;tr[s]=new n(s,t,o));let i=t.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let s in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function hd(n,e,t){let r=t.split("|");return i=>{let s=i===null?"null":typeof i;if(r.indexOf(s)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${n}, got ${s}`)}}var xi=class{constructor(e,t,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?hd(e,t,r.validate):r.validate}get isRequired(){return!this.hasDefault}},Yt=class n{constructor(e,t,r,i){this.name=e,this.rank=t,this.schema=r,this.spec=i,this.attrs=rl(e,i.attrs),this.excluded=null;let s=el(this.attrs);this.instance=s?new B(this,s):null}create(e=null){return!e&&this.instance?this.instance:new B(this,tl(this.attrs,e))}static compile(e,t){let r=Object.create(null),i=0;return e.forEach((s,o)=>r[s]=new n(s,i++,t,o)),r}removeFromSet(e){for(var t=0;t-1}},Nt=class{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let i in e)t[i]=e[i];t.nodes=hi.from(e.nodes),t.marks=hi.from(e.marks||{}),this.nodes=Hn.compile(this.spec.nodes,this),this.marks=Yt.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let s=this.nodes[i],o=s.spec.content||"",l=s.spec.marks;if(s.contentMatch=r[o]||(r[o]=ut.parse(o,this.nodes)),s.inlineContent=s.contentMatch.inlineContent,s.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!s.isInline||!s.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=s}s.markSet=l=="_"?null:l?Fo(this,l.split(" ")):l==""||!s.inlineContent?[]:null}for(let i in this.marks){let s=this.marks[i],o=s.spec.excludes;s.excluded=o==null?[s]:o==""?[]:Fo(this,o.split(" "))}this.nodeFromJSON=i=>de.fromJSON(this,i),this.markFromJSON=i=>B.fromJSON(this,i),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,r,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof Hn){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(t,r,i)}text(e,t){let r=this.nodes.text;return new ki(r,r.defaultAttrs,e,B.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}};function Fo(n,e){let t=[];for(let r=0;r-1)&&t.push(o=a)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}function pd(n){return n.tag!=null}function md(n){return n.style!=null}var ve=class n{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let r=this.matchedStyles=[];t.forEach(i=>{if(pd(i))this.tags.push(i);else if(md(i)){let s=/[^=]*/.exec(i.style)[0];r.indexOf(s)<0&&r.push(s),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let s=e.nodes[i.node];return s.contentMatch.matchType(s)})}parse(e,t={}){let r=new $n(this,t,!1);return r.addAll(e,B.none,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new $n(this,t,!0);return r.addAll(e,B.none,t.from,t.to),S.maxOpen(r.finish())}matchTag(e,t,r){for(let i=r?this.tags.indexOf(r)+1:0;ie.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=t))){if(o.getAttrs){let a=o.getAttrs(t);if(a===!1)continue;o.attrs=a||void 0}return o}}}static schemaRules(e){let t=[];function r(i){let s=i.priority==null?50:i.priority,o=0;for(;o{r(o=$o(o)),o.mark||o.ignore||o.clearMark||(o.mark=i)})}for(let i in e.nodes){let s=e.nodes[i].spec.parseDOM;s&&s.forEach(o=>{r(o=$o(o)),o.node||o.ignore||o.mark||(o.node=i)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new n(e,n.schemaRules(e)))}},il={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},gd={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},sl={ol:!0,ul:!0},Xt=1,Si=2,Gt=4;function Ho(n,e,t){return e!=null?(e?Xt:0)|(e==="full"?Si:0):n&&n.whitespace=="pre"?Xt|Si:t&~Gt}var At=class{constructor(e,t,r,i,s,o){this.type=e,this.attrs=t,this.marks=r,this.solid=i,this.options=o,this.content=[],this.activeMarks=B.none,this.match=s||(o&Gt?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(k.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(e.type))?(this.match=r,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Xt)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let s=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=s.withText(s.text.slice(0,s.text.length-i[0].length))}}let t=k.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(k.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!il.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}},$n=class{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i=t.topNode,s,o=Ho(null,t.preserveWhitespace,0)|(r?Gt:0);i?s=new At(i.type,i.attrs,B.none,!0,t.topMatch||i.type.contentMatch,o):r?s=new At(null,null,B.none,!0,null,o):s=new At(e.schema.topNodeType,null,B.none,!0,null,o),this.nodes=[s],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let r=e.nodeValue,i=this.top,s=i.options&Si?"full":this.localPreserveWS||(i.options&Xt)>0,{schema:o}=this.parser;if(s==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(s)if(s==="full")r=r.replace(/\r\n?/g,` -`);else if(o.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(o.linebreakReplacement.create())){let l=r.split(/\r?\n|\r/);for(let a=0;a!a.clearMark(c)):t=t.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)l=a;else break}}return t}addElementByRule(e,t,r,i){let s,o;if(t.node)if(o=this.parser.schema.nodes[t.node],o.isLeaf)this.insertNode(o.create(t.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let a=this.enter(o,t.attrs||null,r,t.preserveWhitespace);a&&(s=!0,r=a)}else{let a=this.parser.schema.marks[t.mark];r=r.concat(a.create(t.attrs))}let l=this.top;if(o&&o.isLeaf)this.findInside(e);else if(i)this.addElement(e,r,i);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a,r,!1));else{let a=e;typeof t.contentElement=="string"?a=e.querySelector(t.contentElement):typeof t.contentElement=="function"?a=t.contentElement(e):t.contentElement&&(a=t.contentElement),this.findAround(e,a,!0),this.addAll(a,r),this.findAround(e,a,!1)}s&&this.sync(l)&&this.open--}addAll(e,t,r,i){let s=r||0;for(let o=r?e.childNodes[r]:e.firstChild,l=i==null?null:e.childNodes[i];o!=l;o=o.nextSibling,++s)this.findAtPoint(e,s),this.addDOM(o,t);this.findAtPoint(e,s)}findPlace(e,t,r){let i,s;for(let o=this.open,l=0;o>=0;o--){let a=this.nodes[o],c=a.findWrapping(e);if(c&&(!i||i.length>c.length+l)&&(i=c,s=a,!c.length))break;if(a.solid){if(r)break;l+=2}}if(!i)return null;this.sync(s);for(let o=0;o(o.type?o.type.allowsMarkType(c.type):_o(c.type,e))?(a=c.addToSet(a),!1):!0),this.nodes.push(new At(e,t,a,i,null,l)),this.open++,r}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--){if(this.nodes[t]==e)return this.open=t,!0;this.localPreserveWS&&(this.nodes[t].options|=Xt)}return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let r=this.nodes[t].content;for(let i=r.length-1;i>=0;i--)e+=r[i].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let r=0;r-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),s=-(r?r.depth+1:0)+(i?0:1),o=(l,a)=>{for(;l>=0;l--){let c=t[l];if(c==""){if(l==t.length-1||l==0)continue;for(;a>=s;a--)if(o(l-1,a))return!0;return!1}else{let u=a>0||a==0&&i?this.nodes[a].type:r&&a>=s?r.node(a-s).type:null;if(!u||u.name!=c&&!u.isInGroup(c))return!1;a--}}return!0};return o(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let t in this.parser.schema.nodes){let r=this.parser.schema.nodes[t];if(r.isTextblock&&r.defaultAttrs)return r}}};function yd(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&sl.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function kd(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function $o(n){let e={};for(let t in n)e[t]=n[t];return e}function _o(n,e){let t=e.schema.nodes;for(let r in t){let i=t[r];if(!i.allowsMarkType(n))continue;let s=[],o=l=>{s.push(l);for(let a=0;a{if(s.length||o.marks.length){let l=0,a=0;for(;l=0;i--){let s=this.serializeMark(e.marks[i],e.isInline,t);s&&((s.contentDOM||s.dom).appendChild(r),r=s.dom)}return r}serializeMark(e,t,r={}){let i=this.marks[e.type.name];return i&&Ln(mi(r),i(e,t),null,e.attrs)}static renderSpec(e,t,r=null,i){return Ln(e,t,r,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new n(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=Vo(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return Vo(e.marks)}};function Vo(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function mi(n){return n.document||window.document}var jo=new WeakMap;function bd(n){let e=jo.get(n);return e===void 0&&jo.set(n,e=xd(n)),e}function xd(n){let e=null;function t(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let i=0;i-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let o=i.indexOf(" ");o>0&&(t=i.slice(0,o),i=i.slice(o+1));let l,a=t?n.createElementNS(t,i):n.createElement(i),c=e[1],u=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){u=2;for(let d in c)if(c[d]!=null){let f=d.indexOf(" ");f>0?a.setAttributeNS(d.slice(0,f),d.slice(f+1),c[d]):d=="style"&&a.style?a.style.cssText=c[d]:a.setAttribute(d,c[d])}}for(let d=u;du)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else{let{dom:h,contentDOM:p}=Ln(n,f,t,r);if(a.appendChild(h),p){if(l)throw new RangeError("Multiple content holes");l=p}}}return{dom:a,contentDOM:l}}var al=65535,cl=Math.pow(2,16);function Sd(n,e){return n+e*cl}function ol(n){return n&al}function Md(n){return(n-(n&al))/cl}var ul=1,dl=2,_n=4,fl=8,en=class{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&fl)>0}get deletedBefore(){return(this.delInfo&(ul|_n))>0}get deletedAfter(){return(this.delInfo&(dl|_n))>0}get deletedAcross(){return(this.delInfo&_n)>0}},ze=class n{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&n.empty)return n.empty}recover(e){let t=0,r=ol(e);if(!this.inverted)for(let i=0;ie)break;let c=this.ranges[l+s],u=this.ranges[l+o],d=a+c;if(e<=d){let f=c?e==a?-1:e==d?1:t:t,h=a+i+(f<0?0:u);if(r)return h;let p=e==(t<0?a:d)?null:Sd(l/3,e-a),m=e==a?dl:e==d?ul:_n;return(t<0?e!=a:e!=d)&&(m|=fl),new en(h,m,p)}i+=u-c}return r?e+i:new en(e+i,0,null)}touches(e,t){let r=0,i=ol(t),s=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;le)break;let c=this.ranges[l+s],u=a+c;if(e<=u&&l==i*3)return!0;r+=this.ranges[l+o]-c}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,s=0;i=0;t--){let i=e.getMirror(t);this.appendMap(e._maps[t].invert(),i!=null&&i>t?r-i-1:void 0)}}invert(){let e=new n;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;rs&&a!o.isAtom||!l.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),i),t.openStart,t.openEnd);return X.fromReplace(e,this.from,this.to,s)}invert(){return new Be(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new n(t.pos,r.pos,this.mark)}merge(e){return e instanceof n&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new n(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new n(t.from,t.to,e.markFromJSON(t.mark))}};G.jsonID("addMark",nn);var Be=class n extends G{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new S(Ei(t.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),t.openStart,t.openEnd);return X.fromReplace(e,this.from,this.to,r)}invert(){return new nn(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new n(t.pos,r.pos,this.mark)}merge(e){return e instanceof n&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new n(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new n(t.from,t.to,e.markFromJSON(t.mark))}};G.jsonID("removeMark",Be);var rn=class n extends G{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return X.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return X.fromReplace(e,this.pos,this.pos+1,new S(k.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let r=this.mark.addToSet(t.marks);if(r.length==t.marks.length){for(let i=0;ir.pos?null:new n(t.pos,r.pos,i,s,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new n(t.from,t.to,t.gapFrom,t.gapTo,S.fromJSON(e,t.slice),t.insert,!!t.structure)}};G.jsonID("replaceAround",K);function vi(n,e,t){let r=n.resolve(e),i=t-e,s=r.depth;for(;i>0&&s>0&&r.indexAfter(s)==r.node(s).childCount;)s--,i--;if(i>0){let o=r.node(s).maybeChild(r.indexAfter(s));for(;i>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,i--}}return!1}function wd(n,e,t,r){let i=[],s=[],o,l;n.doc.nodesBetween(e,t,(a,c,u)=>{if(!a.isInline)return;let d=a.marks;if(!r.isInSet(d)&&u.type.allowsMarkType(r.type)){let f=Math.max(c,e),h=Math.min(c+a.nodeSize,t),p=r.addToSet(d);for(let m=0;mn.step(a)),s.forEach(a=>n.step(a))}function Cd(n,e,t,r){let i=[],s=0;n.doc.nodesBetween(e,t,(o,l)=>{if(!o.isInline)return;s++;let a=null;if(r instanceof Yt){let c=o.marks,u;for(;u=r.isInSet(c);)(a||(a=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(o.marks)&&(a=[r]):a=o.marks;if(a&&a.length){let c=Math.min(l+o.nodeSize,t);for(let u=0;un.step(new Be(o.from,o.to,o.style)))}function Ai(n,e,t,r=t.contentMatch,i=!0){let s=n.doc.nodeAt(e),o=[],l=e+1;for(let a=0;a=0;a--)n.step(o[a])}function vd(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function Fe(n){let t=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let r=n.depth,i=0,s=0;;--r){let o=n.$from.node(r),l=n.$from.index(r)+i,a=n.$to.indexAfter(r)-s;if(rt;p--)m||r.index(p)>0?(m=!0,u=k.from(r.node(p).copy(u)),d++):a--;let f=k.empty,h=0;for(let p=s,m=!1;p>t;p--)m||i.after(p+1)=0;o--){if(r.size){let l=t[o].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=k.from(t[o].type.create(t[o].attrs,r))}let i=e.start,s=e.end;n.step(new K(i,s,i,s,new S(r,0,0),t.length,!0))}function Od(n,e,t,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=n.steps.length;n.doc.nodesBetween(e,t,(o,l)=>{let a=typeof i=="function"?i(o):i;if(o.isTextblock&&!o.hasMarkup(r,a)&&Id(n.doc,n.mapping.slice(s).map(l),r)){let c=null;if(r.schema.linebreakReplacement){let h=r.whitespace=="pre",p=!!r.contentMatch.matchType(r.schema.linebreakReplacement);h&&!p?c=!1:!h&&p&&(c=!0)}c===!1&&pl(n,o,l,s),Ai(n,n.mapping.slice(s).map(l,1),r,void 0,c===null);let u=n.mapping.slice(s),d=u.map(l,1),f=u.map(l+o.nodeSize,1);return n.step(new K(d,f,d+1,f-1,new S(k.from(r.create(a,null,o.marks)),0,0),1,!0)),c===!0&&hl(n,o,l,s),!1}})}function hl(n,e,t,r){e.forEach((i,s)=>{if(i.isText){let o,l=/\r?\n|\r/g;for(;o=l.exec(i.text);){let a=n.mapping.slice(r).map(t+1+s+o.index);n.replaceWith(a,a+1,e.type.schema.linebreakReplacement.create())}}})}function pl(n,e,t,r){e.forEach((i,s)=>{if(i.type==i.type.schema.linebreakReplacement){let o=n.mapping.slice(r).map(t+1+s);n.replaceWith(o,o+1,e.type.schema.text(` -`))}})}function Id(n,e,t){let r=n.resolve(e),i=r.index();return r.parent.canReplaceWith(i,i+1,t)}function Rd(n,e,t,r,i){let s=n.doc.nodeAt(e);if(!s)throw new RangeError("No node at given position");t||(t=s.type);let o=t.create(r,null,i||s.marks);if(s.isLeaf)return n.replaceWith(e,e+s.nodeSize,o);if(!t.validContent(s.content))throw new RangeError("Invalid content for node type "+t.name);n.step(new K(e,e+s.nodeSize,e+1,e+s.nodeSize-1,new S(k.from(o),0,0),1,!0))}function pe(n,e,t=1,r){let i=n.resolve(e),s=i.depth-t,o=r&&r[r.length-1]||i.parent;if(s<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!o.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let c=i.depth-1,u=t-2;c>s;c--,u--){let d=i.node(c),f=i.index(c);if(d.type.spec.isolating)return!1;let h=d.content.cutByIndex(f,d.childCount),p=r&&r[u+1];p&&(h=h.replaceChild(0,p.type.create(p.attrs)));let m=r&&r[u]||d;if(!d.canReplace(f+1,d.childCount)||!m.type.validContent(h))return!1}let l=i.indexAfter(s),a=r&&r[0];return i.node(s).canReplaceWith(l,l,a?a.type:i.node(s+1).type)}function Dd(n,e,t=1,r){let i=n.doc.resolve(e),s=k.empty,o=k.empty;for(let l=i.depth,a=i.depth-t,c=t-1;l>a;l--,c--){s=k.from(i.node(l).copy(s));let u=r&&r[c];o=k.from(u?u.type.create(u.attrs,o):i.node(l).copy(o))}n.step(new Q(e,e,new S(s.append(o),t,t),!0))}function ge(n,e){let t=n.resolve(e),r=t.index();return ml(t.nodeBefore,t.nodeAfter)&&t.parent.canReplace(r,r+1)}function Pd(n,e){e.content.size||n.type.compatibleContent(e.type);let t=n.contentMatchAt(n.childCount),{linebreakReplacement:r}=n.type.schema;for(let i=0;i0?(s=r.node(i+1),l++,o=r.node(i).maybeChild(l)):(s=r.node(i).maybeChild(l-1),o=r.node(i+1)),s&&!s.isTextblock&&ml(s,o)&&r.node(i).canReplace(l,l+1))return e;if(i==0)break;e=t<0?r.before(i):r.after(i)}}function Ld(n,e,t){let r=null,{linebreakReplacement:i}=n.doc.type.schema,s=n.doc.resolve(e-t),o=s.node().type;if(i&&o.inlineContent){let u=o.whitespace=="pre",d=!!o.contentMatch.matchType(i);u&&!d?r=!1:!u&&d&&(r=!0)}let l=n.steps.length;if(r===!1){let u=n.doc.resolve(e+t);pl(n,u.node(),u.before(),l)}o.inlineContent&&Ai(n,e+t-1,o,s.node().contentMatchAt(s.index()),r==null);let a=n.mapping.slice(l),c=a.map(e-t);if(n.step(new Q(c,a.map(e+t,-1),S.empty,!0)),r===!0){let u=n.doc.resolve(c);hl(n,u.node(),u.before(),n.steps.length)}return n}function zd(n,e,t){let r=n.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),t))return e;if(r.parentOffset==0)for(let i=r.depth-1;i>=0;i--){let s=r.index(i);if(r.node(i).canReplaceWith(s,s,t))return r.before(i+1);if(s>0)return null}if(r.parentOffset==r.parent.content.size)for(let i=r.depth-1;i>=0;i--){let s=r.indexAfter(i);if(r.node(i).canReplaceWith(s,s,t))return r.after(i+1);if(s=0;o--){let l=o==r.depth?0:r.pos<=(r.start(o+1)+r.end(o+1))/2?-1:1,a=r.index(o)+(l>0?1:0),c=r.node(o),u=!1;if(s==1)u=c.canReplace(a,a,i);else{let d=c.contentMatchAt(a).findWrapping(i.firstChild.type);u=d&&c.canReplaceWith(a,a,d[0])}if(u)return l==0?r.pos:l<0?r.before(o+1):r.after(o+1)}return null}function sn(n,e,t=e,r=S.empty){if(e==t&&!r.size)return null;let i=n.resolve(e),s=n.resolve(t);return gl(i,s,r)?new Q(e,t,r):new Ti(i,s,r).fit()}function gl(n,e,t){return!t.openStart&&!t.openEnd&&n.start()==e.start()&&n.parent.canReplace(n.index(),e.index(),t.content)}var Ti=class{constructor(e,t,r){this.$from=e,this.$to=t,this.unplaced=r,this.frontier=[],this.placed=k.empty;for(let i=0;i<=e.depth;i++){let s=e.node(i);this.frontier.push({type:s.type,match:s.contentMatchAt(e.indexAfter(i))})}for(let i=e.depth;i>0;i--)this.placed=k.from(e.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(e<0?this.$to:r.doc.resolve(e));if(!i)return null;let s=this.placed,o=r.depth,l=i.depth;for(;o&&l&&s.childCount==1;)s=s.firstChild.content,o--,l--;let a=new S(s,o,l);return e>-1?new K(r.pos,e,this.$to.pos,this.$to.end(),a,t):a.size||r.pos!=this.$to.pos?new Q(r.pos,i.pos,a):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,r=0,i=this.unplaced.openEnd;r1&&(i=0),s.type.spec.isolating&&i<=r){e=r;break}t=s.content}for(let t=1;t<=2;t++)for(let r=t==1?e:this.unplaced.openStart;r>=0;r--){let i,s=null;r?(s=wi(this.unplaced.content,r-1).firstChild,i=s.content):i=this.unplaced.content;let o=i.firstChild;for(let l=this.depth;l>=0;l--){let{type:a,match:c}=this.frontier[l],u,d=null;if(t==1&&(o?c.matchType(o.type)||(d=c.fillBefore(k.from(o),!1)):s&&a.compatibleContent(s.type)))return{sliceDepth:r,frontierDepth:l,parent:s,inject:d};if(t==2&&o&&(u=c.findWrapping(o.type)))return{sliceDepth:r,frontierDepth:l,parent:s,wrap:u};if(s&&c.matchType(s.type))break}}}openMore(){let{content:e,openStart:t,openEnd:r}=this.unplaced,i=wi(e,t);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new S(e,t+1,Math.max(r,i.size+t>=e.size-r?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:r}=this.unplaced,i=wi(e,t);if(i.childCount<=1&&t>0){let s=e.size-t<=t+i.size;this.unplaced=new S(Qt(e,t-1,1),t-1,s?t-1:r)}else this.unplaced=new S(Qt(e,t,1),t,r)}placeNodes({sliceDepth:e,frontierDepth:t,parent:r,inject:i,wrap:s}){for(;this.depth>t;)this.closeFrontierNode();if(s)for(let m=0;m1||a==0||m.content.size)&&(d=g,u.push(yl(m.mark(f.allowedMarks(m.marks)),c==1?a:0,c==l.childCount?h:-1)))}let p=c==l.childCount;p||(h=-1),this.placed=Zt(this.placed,t,k.from(u)),this.frontier[t].match=d,p&&h<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,g=l;m1&&i==this.$to.end(--r);)++i;return i}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:r,type:i}=this.frontier[t],s=t=0;l--){let{match:a,type:c}=this.frontier[l],u=Ci(e,l,c,a,!0);if(!u||u.childCount)continue e}return{depth:t,fit:o,move:s?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=Zt(this.placed,t.depth,t.fit)),e=t.move;for(let r=t.depth+1;r<=e.depth;r++){let i=e.node(r),s=i.type.contentMatch.fillBefore(i.content,!0,e.index(r));this.openFrontierNode(i.type,i.attrs,s)}return e}openFrontierNode(e,t=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=Zt(this.placed,this.depth,k.from(e.create(t,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(k.empty,!0);t.childCount&&(this.placed=Zt(this.placed,this.frontier.length,t))}};function Qt(n,e,t){return e==0?n.cutByIndex(t,n.childCount):n.replaceChild(0,n.firstChild.copy(Qt(n.firstChild.content,e-1,t)))}function Zt(n,e,t){return e==0?n.append(t):n.replaceChild(n.childCount-1,n.lastChild.copy(Zt(n.lastChild.content,e-1,t)))}function wi(n,e){for(let t=0;t1&&(r=r.replaceChild(0,yl(r.firstChild,e-1,r.childCount==1?t-1:0))),e>0&&(r=n.type.contentMatch.fillBefore(r).append(r),t<=0&&(r=r.append(n.type.contentMatch.matchFragment(r).fillBefore(k.empty,!0)))),n.copy(r)}function Ci(n,e,t,r,i){let s=n.node(e),o=i?n.indexAfter(e):n.index(e);if(o==s.childCount&&!t.compatibleContent(s.type))return null;let l=r.fillBefore(s.content,!0,o);return l&&!Bd(t,s.content,o)?l:null}function Bd(n,e,t){for(let r=t;r0;f--,h--){let p=i.node(f).type.spec;if(p.defining||p.definingAsContext||p.isolating)break;o.indexOf(f)>-1?l=f:i.before(f)==h&&o.splice(1,0,-f)}let a=o.indexOf(l),c=[],u=r.openStart;for(let f=r.content,h=0;;h++){let p=f.firstChild;if(c.push(p),h==r.openStart)break;f=p.content}for(let f=u-1;f>=0;f--){let h=c[f],p=Fd(h.type);if(p&&!h.sameMarkup(i.node(Math.abs(l)-1)))u=f;else if(p||!h.type.isTextblock)break}for(let f=r.openStart;f>=0;f--){let h=(f+u+1)%(r.openStart+1),p=c[h];if(p)for(let m=0;m=0&&(n.replace(e,t,r),!(n.steps.length>d));f--){let h=o[f];h<0||(e=i.before(h),t=s.after(h))}}function kl(n,e,t,r,i){if(er){let s=i.contentMatchAt(0),o=s.fillBefore(n).append(n);n=o.append(s.matchFragment(o).fillBefore(k.empty,!0))}return n}function $d(n,e,t,r){if(!r.isInline&&e==t&&n.doc.resolve(e).parent.content.size){let i=zd(n.doc,e,r.type);i!=null&&(e=t=i)}n.replaceRange(e,t,new S(k.from(r),0,0))}function _d(n,e,t){let r=n.doc.resolve(e),i=n.doc.resolve(t);if(r.parent.isTextblock&&i.parent.isTextblock&&r.start()!=i.start()&&r.parentOffset==0&&i.parentOffset==0){let o=r.sharedDepth(t),l=!1;for(let a=r.depth;a>o;a--)r.node(a).type.spec.isolating&&(l=!0);for(let a=i.depth;a>o;a--)i.node(a).type.spec.isolating&&(l=!0);if(!l){for(let a=r.depth;a>0&&e==r.start(a);a--)e=r.before(a);for(let a=i.depth;a>0&&t==i.start(a);a--)t=i.before(a);r=n.doc.resolve(e),i=n.doc.resolve(t)}}let s=bl(r,i);for(let o=0;o0&&(a||r.node(l-1).canReplace(r.index(l-1),i.indexAfter(l-1))))return n.delete(r.before(l),i.after(l))}for(let o=1;o<=r.depth&&o<=i.depth;o++)if(e-r.start(o)==r.depth-o&&t>r.end(o)&&i.end(o)-t!=i.depth-o&&r.start(o-1)==i.start(o-1)&&r.node(o-1).canReplace(r.index(o-1),i.index(o-1)))return n.delete(r.before(o),t);n.delete(e,t)}function bl(n,e){let t=[],r=Math.min(n.depth,e.depth);for(let i=r;i>=0;i--){let s=n.start(i);if(se.pos+(e.depth-i)||n.node(i).type.spec.isolating||e.node(i).type.spec.isolating)break;(s==e.start(i)||i==n.depth&&i==e.depth&&n.parent.inlineContent&&e.parent.inlineContent&&i&&e.start(i-1)==s-1)&&t.push(i)}return t}var Vn=class n extends G{constructor(e,t,r){super(),this.pos=e,this.attr=t,this.value=r}apply(e){let t=e.nodeAt(this.pos);if(!t)return X.fail("No node at attribute step's position");let r=Object.create(null);for(let s in t.attrs)r[s]=t.attrs[s];r[this.attr]=this.value;let i=t.type.create(r,null,t.marks);return X.fromReplace(e,this.pos,this.pos+1,new S(k.from(i),0,t.isLeaf?0:1))}getMap(){return ze.empty}invert(e){return new n(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new n(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.pos!="number"||typeof t.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new n(t.pos,t.attr,t.value)}};G.jsonID("attr",Vn);var jn=class n extends G{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let i in e.attrs)t[i]=e.attrs[i];t[this.attr]=this.value;let r=e.type.create(t,e.content,e.marks);return X.ok(r)}getMap(){return ze.empty}invert(e){return new n(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new n(t.attr,t.value)}};G.jsonID("docAttr",jn);var It=class extends Error{};It=function n(e){let t=Error.call(this,e);return t.__proto__=n.prototype,t};It.prototype=Object.create(Error.prototype);It.prototype.constructor=It;It.prototype.name="TransformError";var Rt=class{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new tn}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new It(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}changedRange(){let e=1e9,t=-1e9;for(let r=0;r{e=Math.min(e,l),t=Math.max(t,a)})}return e==1e9?null:{from:e,to:t}}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,r=S.empty){let i=sn(this.doc,e,t,r);return i&&this.step(i),this}replaceWith(e,t,r){return this.replace(e,t,new S(k.from(r),0,0))}delete(e,t){return this.replace(e,t,S.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,r){return Hd(this,e,t,r),this}replaceRangeWith(e,t,r){return $d(this,e,t,r),this}deleteRange(e,t){return _d(this,e,t),this}lift(e,t){return Td(this,e,t),this}join(e,t=1){return Ld(this,e,t),this}wrap(e,t){return Nd(this,e,t),this}setBlockType(e,t=e,r,i=null){return Od(this,e,t,r,i),this}setNodeMarkup(e,t,r=null,i){return Rd(this,e,t,r,i),this}setNodeAttribute(e,t,r){return this.step(new Vn(e,t,r)),this}setDocAttribute(e,t){return this.step(new jn(e,t)),this}addNodeMark(e,t){return this.step(new rn(e,t)),this}removeNodeMark(e,t){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(t instanceof B)t.isInSet(r.marks)&&this.step(new Ot(e,t));else{let i=r.marks,s,o=[];for(;s=t.isInSet(i);)o.push(new Ot(e,s)),i=s.removeFromSet(i);for(let l=o.length-1;l>=0;l--)this.step(o[l])}return this}split(e,t=1,r){return Dd(this,e,t,r),this}addMark(e,t,r){return wd(this,e,t,r),this}removeMark(e,t,r){return Cd(this,e,t,r),this}clearIncompatible(e,t,r){return Ai(this,e,t,r),this}};var Ni=Object.create(null),N=class{constructor(e,t,r){this.$anchor=e,this.$head=t,this.ranges=r||[new Un(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t=0;s--){let o=t<0?Pt(e.node(0),e.node(s),e.before(s+1),e.index(s),t,r):Pt(e.node(0),e.node(s),e.after(s+1),e.index(s)+1,t,r);if(o)return o}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new ae(e.node(0))}static atStart(e){return Pt(e,e,0,0,1)||new ae(e)}static atEnd(e){return Pt(e,e,e.content.size,e.childCount,-1)||new ae(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=Ni[t.type];if(!r)throw new RangeError(`No selection type ${t.type} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in Ni)throw new RangeError("Duplicate use of selection JSON ID "+e);return Ni[e]=t,t.prototype.jsonID=e,t}getBookmark(){return E.between(this.$anchor,this.$head).getBookmark()}};N.prototype.visible=!0;var Un=class{constructor(e,t){this.$from=e,this.$to=t}},xl=!1;function Sl(n){!xl&&!n.parent.inlineContent&&(xl=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+n.parent.type.name+")"))}var E=class n extends N{constructor(e,t=e){Sl(e),Sl(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let r=e.resolve(t.map(this.head));if(!r.parent.inlineContent)return N.near(r);let i=e.resolve(t.map(this.anchor));return new n(i.parent.inlineContent?i:r,r)}replace(e,t=S.empty){if(super.replace(e,t),t==S.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof n&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Jn(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if(typeof t.anchor!="number"||typeof t.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new n(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,r=t){let i=e.resolve(t);return new this(i,r==t?i:e.resolve(r))}static between(e,t,r){let i=e.pos-t.pos;if((!r||i)&&(r=i>=0?1:-1),!t.parent.inlineContent){let s=N.findFrom(t,r,!0)||N.findFrom(t,-r,!0);if(s)t=s.$head;else return N.near(t,r)}return e.parent.inlineContent||(i==0?e=t:(e=(N.findFrom(e,-r,!0)||N.findFrom(e,r,!0)).$anchor,e.pos0?0:1);i>0?o=0;o+=i){let l=e.child(o);if(l.isAtom){if(!s&&M.isSelectable(l))return M.create(n,t-(i<0?l.nodeSize:0))}else{let a=Pt(n,l,t+i,i<0?l.childCount:0,i,s);if(a)return a}t+=l.nodeSize*i}return null}function Ml(n,e,t){let r=n.steps.length-1;if(r{o==null&&(o=u)}),n.setSelection(N.near(n.doc.resolve(o),t))}var wl=1,Kn=2,Cl=4,Ri=class extends Rt{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor0}setStoredMarks(e){return this.storedMarks=e,this.updated|=Kn,this}ensureMarks(e){return B.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Kn)>0}addStep(e,t){super.addStep(e,t),this.updated=this.updated&~Kn,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let r=this.selection;return t&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||B.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,r){let i=this.doc.type.schema;if(t==null)return e?this.replaceSelectionWith(i.text(e),!0):this.deleteSelection();{if(r==null&&(r=t),!e)return this.deleteRange(t,r);let s=this.storedMarks;if(!s){let o=this.doc.resolve(t);s=r==t?o.marks():o.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(t,r,i.text(e,s)),!this.selection.empty&&this.selection.to==t+e.length&&this.setSelection(N.near(this.selection.$to)),this}}setMeta(e,t){return this.meta[typeof e=="string"?e:e.key]=t,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=Cl,this}get scrolledIntoView(){return(this.updated&Cl)>0}};function vl(n,e){return!e||!n?n:n.bind(e)}var ft=class{constructor(e,t,r){this.name=e,this.init=vl(t.init,r),this.apply=vl(t.apply,r)}},jd=[new ft("doc",{init(n){return n.doc||n.schema.topNodeType.createAndFill()},apply(n){return n.doc}}),new ft("selection",{init(n,e){return n.selection||N.atStart(e.doc)},apply(n){return n.selection}}),new ft("storedMarks",{init(n){return n.storedMarks||null},apply(n,e,t,r){return r.selection.$cursor?n.storedMarks:null}}),new ft("scrollToSelection",{init(){return 0},apply(n,e){return n.scrolledIntoView?e+1:e}})],on=class{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=jd.slice(),t&&t.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new ft(r.key,r.spec.state,r))})}},qn=class n{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let r=0;rr.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=e[r],s=i.spec.state;s&&s.toJSON&&(t[r]=s.toJSON.call(i,this[i.key]))}return t}static fromJSON(e,t,r){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let i=new on(e.schema,e.plugins),s=new n(i);return i.fields.forEach(o=>{if(o.name=="doc")s.doc=de.fromJSON(e.schema,t.doc);else if(o.name=="selection")s.selection=N.fromJSON(s.doc,t.selection);else if(o.name=="storedMarks")t.storedMarks&&(s.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let l in r){let a=r[l],c=a.spec.state;if(a.key==o.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(t,l)){s[o.name]=c.fromJSON.call(a,e,t[l],s);return}}s[o.name]=o.init(e,s)}}),s}};function Tl(n,e,t){for(let r in n){let i=n[r];i instanceof Function?i=i.bind(e):r=="handleDOMEvents"&&(i=Tl(i,e,{})),t[r]=i}return t}var O=class{constructor(e){this.spec=e,this.props={},e.props&&Tl(e.props,this,this.props),this.key=e.key?e.key.key:El("plugin")}getState(e){return e[this.key]}},Oi=Object.create(null);function El(n){return n in Oi?n+"$"+ ++Oi[n]:(Oi[n]=0,n+"$")}var P=class{constructor(e="key"){this.key=El(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}};var Gn=(n,e)=>n.selection.empty?!1:(e&&e(n.tr.deleteSelection().scrollIntoView()),!0);function Nl(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("backward",n):t.parentOffset>0)?null:t}var Pi=(n,e,t)=>{let r=Nl(n,t);if(!r)return!1;let i=zi(r);if(!i){let o=r.blockRange(),l=o&&Fe(o);return l==null?!1:(e&&e(n.tr.lift(o,l).scrollIntoView()),!0)}let s=i.nodeBefore;if(Fl(n,i,e,-1))return!0;if(r.parent.content.size==0&&(Lt(s,"end")||M.isSelectable(s)))for(let o=r.depth;;o--){let l=sn(n.doc,r.before(o),r.after(o),S.empty);if(l&&l.slice.size1)break}return s.isAtom&&i.depth==r.depth-1?(e&&e(n.tr.delete(i.pos-s.nodeSize,i.pos).scrollIntoView()),!0):!1},Ol=(n,e,t)=>{let r=Nl(n,t);if(!r)return!1;let i=zi(r);return i?Rl(n,i,e):!1},Il=(n,e,t)=>{let r=Dl(n,t);if(!r)return!1;let i=Hi(r);return i?Rl(n,i,e):!1};function Rl(n,e,t){let r=e.nodeBefore,i=r,s=e.pos-1;for(;!i.isTextblock;s--){if(i.type.spec.isolating)return!1;let u=i.lastChild;if(!u)return!1;i=u}let o=e.nodeAfter,l=o,a=e.pos+1;for(;!l.isTextblock;a++){if(l.type.spec.isolating)return!1;let u=l.firstChild;if(!u)return!1;l=u}let c=sn(n.doc,s,a,S.empty);if(!c||c.from!=s||c instanceof Q&&c.slice.size>=a-s)return!1;if(t){let u=n.tr.step(c);u.setSelection(E.create(u.doc,s)),t(u.scrollIntoView())}return!0}function Lt(n,e,t=!1){for(let r=n;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(t&&r.childCount!=1)return!1}return!1}var Li=(n,e,t)=>{let{$head:r,empty:i}=n.selection,s=r;if(!i)return!1;if(r.parent.isTextblock){if(t?!t.endOfTextblock("backward",n):r.parentOffset>0)return!1;s=zi(r)}let o=s&&s.nodeBefore;return!o||!M.isSelectable(o)?!1:(e&&e(n.tr.setSelection(M.create(n.doc,s.pos-o.nodeSize)).scrollIntoView()),!0)};function zi(n){if(!n.parent.type.spec.isolating)for(let e=n.depth-1;e>=0;e--){if(n.index(e)>0)return n.doc.resolve(n.before(e+1));if(n.node(e).type.spec.isolating)break}return null}function Dl(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("forward",n):t.parentOffset{let r=Dl(n,t);if(!r)return!1;let i=Hi(r);if(!i)return!1;let s=i.nodeAfter;if(Fl(n,i,e,1))return!0;if(r.parent.content.size==0&&(Lt(s,"start")||M.isSelectable(s))){let o=sn(n.doc,r.before(),r.after(),S.empty);if(o&&o.slice.size{let{$head:r,empty:i}=n.selection,s=r;if(!i)return!1;if(r.parent.isTextblock){if(t?!t.endOfTextblock("forward",n):r.parentOffset=0;e--){let t=n.node(e);if(n.index(e)+1{let t=n.selection,r=t instanceof M,i;if(r){if(t.node.isTextblock||!ge(n.doc,t.from))return!1;i=t.from}else if(i=dt(n.doc,t.from,-1),i==null)return!1;if(e){let s=n.tr.join(i);r&&s.setSelection(M.create(s.doc,i-n.doc.resolve(i).nodeBefore.nodeSize)),e(s.scrollIntoView())}return!0},Ll=(n,e)=>{let t=n.selection,r;if(t instanceof M){if(t.node.isTextblock||!ge(n.doc,t.to))return!1;r=t.to}else if(r=dt(n.doc,t.to,1),r==null)return!1;return e&&e(n.tr.join(r).scrollIntoView()),!0},zl=(n,e)=>{let{$from:t,$to:r}=n.selection,i=t.blockRange(r),s=i&&Fe(i);return s==null?!1:(e&&e(n.tr.lift(i,s).scrollIntoView()),!0)},$i=(n,e)=>{let{$head:t,$anchor:r}=n.selection;return!t.parent.type.spec.code||!t.sameParent(r)?!1:(e&&e(n.tr.insertText(` -`).scrollIntoView()),!0)};function _i(n){for(let e=0;e{let{$head:t,$anchor:r}=n.selection;if(!t.parent.type.spec.code||!t.sameParent(r))return!1;let i=t.node(-1),s=t.indexAfter(-1),o=_i(i.contentMatchAt(s));if(!o||!i.canReplaceWith(s,s,o))return!1;if(e){let l=t.after(),a=n.tr.replaceWith(l,l,o.createAndFill());a.setSelection(N.near(a.doc.resolve(l),1)),e(a.scrollIntoView())}return!0},ji=(n,e)=>{let t=n.selection,{$from:r,$to:i}=t;if(t instanceof ae||r.parent.inlineContent||i.parent.inlineContent)return!1;let s=_i(i.parent.contentMatchAt(i.indexAfter()));if(!s||!s.isTextblock)return!1;if(e){let o=(!r.parentOffset&&i.index(){let{$cursor:t}=n.selection;if(!t||t.parent.content.size)return!1;if(t.depth>1&&t.after()!=t.end(-1)){let s=t.before();if(pe(n.doc,s))return e&&e(n.tr.split(s).scrollIntoView()),!0}let r=t.blockRange(),i=r&&Fe(r);return i==null?!1:(e&&e(n.tr.lift(r,i).scrollIntoView()),!0)};function Wd(n){return(e,t)=>{let{$from:r,$to:i}=e.selection;if(e.selection instanceof M&&e.selection.node.isBlock)return!r.parentOffset||!pe(e.doc,r.pos)?!1:(t&&t(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let s=[],o,l,a=!1,c=!1;for(let h=r.depth;;h--)if(r.node(h).isBlock){a=r.end(h)==r.pos+(r.depth-h),c=r.start(h)==r.pos-(r.depth-h),l=_i(r.node(h-1).contentMatchAt(r.indexAfter(h-1)));let m=n&&n(i.parent,a,r);s.unshift(m||(a&&l?{type:l}:null)),o=h;break}else{if(h==1)return!1;s.unshift(null)}let u=e.tr;(e.selection instanceof E||e.selection instanceof ae)&&u.deleteSelection();let d=u.mapping.map(r.pos),f=pe(u.doc,d,s.length,s);if(f||(s[0]=l?{type:l}:null,f=pe(u.doc,d,s.length,s)),!f)return!1;if(u.split(d,s.length,s),!a&&c&&r.node(o).type!=l){let h=u.mapping.map(r.before(o)),p=u.doc.resolve(h);l&&r.node(o-1).canReplaceWith(p.index(),p.index()+1,l)&&u.setNodeMarkup(u.mapping.map(r.before(o)),l)}return t&&t(u.scrollIntoView()),!0}}var Kd=Wd();var Bl=(n,e)=>{let{$from:t,to:r}=n.selection,i,s=t.sharedDepth(r);return s==0?!1:(i=t.before(s),e&&e(n.tr.setSelection(M.create(n.doc,i))),!0)},Ud=(n,e)=>(e&&e(n.tr.setSelection(new ae(n.doc))),!0);function Jd(n,e,t){let r=e.nodeBefore,i=e.nodeAfter,s=e.index();return!r||!i||!r.type.compatibleContent(i.type)?!1:!r.content.size&&e.parent.canReplace(s-1,s)?(t&&t(n.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(s,s+1)||!(i.isTextblock||ge(n.doc,e.pos))?!1:(t&&t(n.tr.join(e.pos).scrollIntoView()),!0)}function Fl(n,e,t,r){let i=e.nodeBefore,s=e.nodeAfter,o,l,a=i.type.spec.isolating||s.type.spec.isolating;if(!a&&Jd(n,e,t))return!0;let c=!a&&e.parent.canReplace(e.index(),e.index()+1);if(c&&(o=(l=i.contentMatchAt(i.childCount)).findWrapping(s.type))&&l.matchType(o[0]||s.type).validEnd){if(t){let h=e.pos+s.nodeSize,p=k.empty;for(let y=o.length-1;y>=0;y--)p=k.from(o[y].create(null,p));p=k.from(i.copy(p));let m=n.tr.step(new K(e.pos-1,h,e.pos,h,new S(p,1,0),o.length,!0)),g=m.doc.resolve(h+2*o.length);g.nodeAfter&&g.nodeAfter.type==i.type&&ge(m.doc,g.pos)&&m.join(g.pos),t(m.scrollIntoView())}return!0}let u=s.type.spec.isolating||r>0&&a?null:N.findFrom(e,1),d=u&&u.$from.blockRange(u.$to),f=d&&Fe(d);if(f!=null&&f>=e.depth)return t&&t(n.tr.lift(d,f).scrollIntoView()),!0;if(c&&Lt(s,"start",!0)&&Lt(i,"end")){let h=i,p=[];for(;p.push(h),!h.isTextblock;)h=h.lastChild;let m=s,g=1;for(;!m.isTextblock;m=m.firstChild)g++;if(h.canReplace(h.childCount,h.childCount,m.content)){if(t){let y=k.empty;for(let C=p.length-1;C>=0;C--)y=k.from(p[C].copy(y));let x=n.tr.step(new K(e.pos-p.length,e.pos+s.nodeSize,e.pos+g,e.pos+s.nodeSize-g,new S(y,p.length,0),0,!0));t(x.scrollIntoView())}return!0}}return!1}function Hl(n){return function(e,t){let r=e.selection,i=n<0?r.$from:r.$to,s=i.depth;for(;i.node(s).isInline;){if(!s)return!1;s--}return i.node(s).isTextblock?(t&&t(e.tr.setSelection(E.create(e.doc,n<0?i.start(s):i.end(s)))),!0):!1}}var Ki=Hl(-1),Ui=Hl(1);function $l(n,e=null){return function(t,r){let{$from:i,$to:s}=t.selection,o=i.blockRange(s),l=o&&Dt(o,n,e);return l?(r&&r(t.tr.wrap(o,l).scrollIntoView()),!0):!1}}function Ji(n,e=null){return function(t,r){let i=!1;for(let s=0;s{if(i)return!1;if(!(!a.isTextblock||a.hasMarkup(n,e)))if(a.type==n)i=!0;else{let u=t.doc.resolve(c),d=u.index();i=u.parent.canReplaceWith(d,d+1,n)}})}if(!i)return!1;if(r){let s=t.tr;for(let o=0;o=2&&e.$from.node(e.depth-1).type.compatibleContent(t)&&e.startIndex==0){if(e.$from.index(e.depth-1)==0)return!1;let a=o.resolve(e.start-2);s=new ct(a,a,e.depth),e.endIndex=0;u--)s=k.from(t[u].type.create(t[u].attrs,s));n.step(new K(e.start-(r?2:0),e.end,e.start,e.end,new S(s,0,0),t.length,!0));let o=0;for(let u=0;uo.childCount>0&&o.firstChild.type==n);return s?t?r.node(s.depth-1).type==n?Xd(e,t,n,s):Qd(e,t,s):!0:!1}}function Xd(n,e,t,r){let i=n.tr,s=r.end,o=r.$to.end(r.depth);sm;p--)h-=i.child(p).nodeSize,r.delete(h-1,h+1);let s=r.doc.resolve(t.start),o=s.nodeAfter;if(r.mapping.map(t.end)!=t.start+s.nodeAfter.nodeSize)return!1;let l=t.startIndex==0,a=t.endIndex==i.childCount,c=s.node(-1),u=s.index(-1);if(!c.canReplace(u+(l?0:1),u+1,o.content.append(a?k.empty:k.from(i))))return!1;let d=s.pos,f=d+o.nodeSize;return r.step(new K(d-(l?1:0),f+(a?1:0),d+1,f-1,new S((l?k.empty:k.from(i.copy(k.empty))).append(a?k.empty:k.from(i.copy(k.empty))),l?0:1,a?0:1),l?0:1)),e(r.scrollIntoView()),!0}function jl(n){return function(e,t){let{$from:r,$to:i}=e.selection,s=r.blockRange(i,c=>c.childCount>0&&c.firstChild.type==n);if(!s)return!1;let o=s.startIndex;if(o==0)return!1;let l=s.parent,a=l.child(o-1);if(a.type!=n)return!1;if(t){let c=a.lastChild&&a.lastChild.type==l.type,u=k.from(c?n.create():null),d=new S(k.from(n.create(null,k.from(l.type.create(null,u)))),c?3:1,0),f=s.start,h=s.end;t(e.tr.step(new K(f-(c?3:1),h,f,h,d,1,!0)).scrollIntoView())}return!0}}var Z=function(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e},$t=function(n){let e=n.assignedSlot||n.parentNode;return e&&e.nodeType==11?e.host:e},es=null,$e=function(n,e,t){let r=es||(es=document.createRange());return r.setEnd(n,t==null?n.nodeValue.length:t),r.setStart(n,e||0),r},Zd=function(){es=null},bt=function(n,e,t,r){return t&&(Wl(n,e,t,r,-1)||Wl(n,e,t,r,1))},ef=/^(img|br|input|textarea|hr)$/i;function Wl(n,e,t,r,i){for(var s;;){if(n==t&&e==r)return!0;if(e==(i<0?0:ke(n))){let o=n.parentNode;if(!o||o.nodeType!=1||pn(n)||ef.test(n.nodeName)||n.contentEditable=="false")return!1;e=Z(n)+(i<0?0:1),n=o}else if(n.nodeType==1){let o=n.childNodes[e+(i<0?-1:0)];if(o.nodeType==1&&o.contentEditable=="false")if(!((s=o.pmViewDesc)===null||s===void 0)&&s.ignoreForSelection)e+=i;else return!1;else n=o,e=i<0?ke(n):0}else return!1}}function ke(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function tf(n,e){for(;;){if(n.nodeType==3&&e)return n;if(n.nodeType==1&&e>0){if(n.contentEditable=="false")return null;n=n.childNodes[e-1],e=ke(n)}else if(n.parentNode&&!pn(n))e=Z(n),n=n.parentNode;else return null}}function nf(n,e){for(;;){if(n.nodeType==3&&e2),ye=_t||(Te?/Mac/.test(Te.platform):!1),va=Te?/Win/.test(Te.platform):!1,_e=/Android \d/.test(tt),mn=!!Kl&&"webkitFontSmoothing"in Kl.documentElement.style,lf=mn?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function af(n){let e=n.defaultView&&n.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:n.documentElement.clientWidth,top:0,bottom:n.documentElement.clientHeight}}function He(n,e){return typeof n=="number"?n:n[e]}function cf(n){let e=n.getBoundingClientRect(),t=e.width/n.offsetWidth||1,r=e.height/n.offsetHeight||1;return{left:e.left,right:e.left+n.clientWidth*t,top:e.top,bottom:e.top+n.clientHeight*r}}function Ul(n,e,t){let r=n.someProp("scrollThreshold")||0,i=n.someProp("scrollMargin")||5,s=n.dom.ownerDocument;for(let o=t||n.dom;o;){if(o.nodeType!=1){o=$t(o);continue}let l=o,a=l==s.body,c=a?af(s):cf(l),u=0,d=0;if(e.topc.bottom-He(r,"bottom")&&(d=e.bottom-e.top>c.bottom-c.top?e.top+He(i,"top")-c.top:e.bottom-c.bottom+He(i,"bottom")),e.leftc.right-He(r,"right")&&(u=e.right-c.right+He(i,"right")),u||d)if(a)s.defaultView.scrollBy(u,d);else{let h=l.scrollLeft,p=l.scrollTop;d&&(l.scrollTop+=d),u&&(l.scrollLeft+=u);let m=l.scrollLeft-h,g=l.scrollTop-p;e={left:e.left-m,top:e.top-g,right:e.right-m,bottom:e.bottom-g}}let f=a?"fixed":getComputedStyle(o).position;if(/^(fixed|sticky)$/.test(f))break;o=f=="absolute"?o.offsetParent:$t(o)}}function uf(n){let e=n.dom.getBoundingClientRect(),t=Math.max(0,e.top),r,i;for(let s=(e.left+e.right)/2,o=t+1;o=t-20){r=l,i=a.top;break}}return{refDOM:r,refTop:i,stack:Ta(n.dom)}}function Ta(n){let e=[],t=n.ownerDocument;for(let r=n;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),n!=t);r=$t(r));return e}function df({refDOM:n,refTop:e,stack:t}){let r=n?n.getBoundingClientRect().top:0;Ea(t,r==0?0:r-e)}function Ea(n,e){for(let t=0;t=l){o=Math.max(p.bottom,o),l=Math.min(p.top,l);let m=p.left>e.left?p.left-e.left:p.right=(p.left+p.right)/2?1:0));continue}}else p.top>e.top&&!a&&p.left<=e.left&&p.right>=e.left&&(a=u,c={left:Math.max(p.left,Math.min(p.right,e.left)),top:p.top});!t&&(e.left>=p.right&&e.top>=p.top||e.left>=p.left&&e.top>=p.bottom)&&(s=d+1)}}return!t&&a&&(t=a,i=c,r=0),t&&t.nodeType==3?hf(t,i):!t||r&&t.nodeType==1?{node:n,offset:s}:Aa(t,i)}function hf(n,e){let t=n.nodeValue.length,r=document.createRange(),i;for(let s=0;s=(o.left+o.right)/2?1:0)};break}}return r.detach(),i||{node:n,offset:0}}function bs(n,e){return n.left>=e.left-1&&n.left<=e.right+1&&n.top>=e.top-1&&n.top<=e.bottom+1}function pf(n,e){let t=n.parentNode;return t&&/^li$/i.test(t.nodeName)&&e.left(o.left+o.right)/2?1:-1}return n.docView.posFromDOM(r,i,s)}function gf(n,e,t,r){let i=-1;for(let s=e,o=!1;s!=n.dom;){let l=n.docView.nearestDesc(s,!0),a;if(!l)return null;if(l.dom.nodeType==1&&(l.node.isBlock&&l.parent||!l.contentDOM)&&((a=l.dom.getBoundingClientRect()).width||a.height)&&(l.node.isBlock&&l.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(l.dom.nodeName)&&(!o&&a.left>r.left||a.top>r.top?i=l.posBefore:(!o&&a.right-1?i:n.docView.posFromDOM(e,t,-1)}function Na(n,e,t){let r=n.childNodes.length;if(r&&t.tope.top&&i++}let c;mn&&i&&r.nodeType==1&&(c=r.childNodes[i-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=e.top&&i--,r==n.dom&&i==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?l=n.state.doc.content.size:(i==0||r.nodeType!=1||r.childNodes[i-1].nodeName!="BR")&&(l=gf(n,r,i,e))}l==null&&(l=mf(n,o,e));let a=n.docView.nearestDesc(o,!0);return{pos:l,inside:a?a.posAtStart-a.border:-1}}function Jl(n){return n.top=0&&i==r.nodeValue.length?(a--,u=1):t<0?a--:c++,ln(Ye($e(r,a,c),u),u<0)}if(!n.state.doc.resolve(e-(s||0)).parent.inlineContent){if(s==null&&i&&(t<0||i==ke(r))){let a=r.childNodes[i-1];if(a.nodeType==1)return Gi(a.getBoundingClientRect(),!1)}if(s==null&&i=0)}if(s==null&&i&&(t<0||i==ke(r))){let a=r.childNodes[i-1],c=a.nodeType==3?$e(a,ke(a)-(o?0:1)):a.nodeType==1&&(a.nodeName!="BR"||!a.nextSibling)?a:null;if(c)return ln(Ye(c,1),!1)}if(s==null&&i=0)}function ln(n,e){if(n.width==0)return n;let t=e?n.left:n.right;return{top:n.top,bottom:n.bottom,left:t,right:t}}function Gi(n,e){if(n.height==0)return n;let t=e?n.top:n.bottom;return{top:t,bottom:t,left:n.left,right:n.right}}function Ia(n,e,t){let r=n.state,i=n.root.activeElement;r!=e&&n.updateState(e),i!=n.dom&&n.focus();try{return t()}finally{r!=e&&n.updateState(r),i!=n.dom&&i&&i.focus()}}function bf(n,e,t){let r=e.selection,i=t=="up"?r.$from:r.$to;return Ia(n,e,()=>{let{node:s}=n.docView.domFromPos(i.pos,t=="up"?-1:1);for(;;){let l=n.docView.nearestDesc(s,!0);if(!l)break;if(l.node.isBlock){s=l.contentDOM||l.dom;break}s=l.dom.parentNode}let o=Oa(n,i.pos,1);for(let l=s.firstChild;l;l=l.nextSibling){let a;if(l.nodeType==1)a=l.getClientRects();else if(l.nodeType==3)a=$e(l,0,l.nodeValue.length).getClientRects();else continue;for(let c=0;cu.top+1&&(t=="up"?o.top-u.top>(u.bottom-o.top)*2:u.bottom-o.bottom>(o.bottom-u.top)*2))return!1}}return!0})}var xf=/[\u0590-\u08ac]/;function Sf(n,e,t){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,s=!i,o=i==r.parent.content.size,l=n.domSelection();return l?!xf.test(r.parent.textContent)||!l.modify?t=="left"||t=="backward"?s:o:Ia(n,e,()=>{let{focusNode:a,focusOffset:c,anchorNode:u,anchorOffset:d}=n.domSelectionRange(),f=l.caretBidiLevel;l.modify("move",t,"character");let h=r.depth?n.docView.domAfterPos(r.before()):n.dom,{focusNode:p,focusOffset:m}=n.domSelectionRange(),g=p&&!h.contains(p.nodeType==1?p:p.parentNode)||a==p&&c==m;try{l.collapse(u,d),a&&(a!=u||c!=d)&&l.extend&&l.extend(a,c)}catch{}return f!=null&&(l.caretBidiLevel=f),g}):r.pos==r.start()||r.pos==r.end()}var ql=null,Gl=null,Yl=!1;function Mf(n,e,t){return ql==e&&Gl==t?Yl:(ql=e,Gl=t,Yl=t=="up"||t=="down"?bf(n,e,t):Sf(n,e,t))}var xe=0,Xl=1,pt=2,Ee=3,xt=class{constructor(e,t,r,i){this.parent=e,this.children=t,this.dom=r,this.contentDOM=i,this.dirty=xe,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;tZ(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(t==0)for(let s=e;;s=s.parentNode){if(s==this.dom){i=!1;break}if(s.previousSibling)break}if(i==null&&t==e.childNodes.length)for(let s=e;;s=s.parentNode){if(s==this.dom){i=!0;break}if(s.nextSibling)break}}return(i==null?r>0:i)?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let r=!0,i=e;i;i=i.parentNode){let s=this.getDesc(i),o;if(s&&(!t||s.node))if(r&&(o=s.nodeDOM)&&!(o.nodeType==1?o.contains(e.nodeType==1?e:e.parentNode):o==e))r=!1;else return s}}getDesc(e){let t=e.pmViewDesc;for(let r=t;r;r=r.parent)if(r==this)return t}posFromDOM(e,t,r){for(let i=e;i;i=i.parentNode){let s=this.getDesc(i);if(s)return s.localPosFromDOM(e,t,r)}return-1}descAt(e){for(let t=0,r=0;te||o instanceof Qn){i=e-s;break}s=l}if(i)return this.children[r].domFromPos(i-this.children[r].border,t);for(let s;r&&!(s=this.children[r-1]).size&&s instanceof Yn&&s.side>=0;r--);if(t<=0){let s,o=!0;for(;s=r?this.children[r-1]:null,!(!s||s.dom.parentNode==this.contentDOM);r--,o=!1);return s&&t&&o&&!s.border&&!s.domAtom?s.domFromPos(s.size,t):{node:this.contentDOM,offset:s?Z(s.dom)+1:0}}else{let s,o=!0;for(;s=r=u&&t<=c-a.border&&a.node&&a.contentDOM&&this.contentDOM.contains(a.contentDOM))return a.parseRange(e,t,u);e=o;for(let d=l;d>0;d--){let f=this.children[d-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){i=Z(f.dom)+1;break}e-=f.size}i==-1&&(i=0)}if(i>-1&&(c>t||l==this.children.length-1)){t=c;for(let u=l+1;up&&ot){let p=l;l=a,a=p}let h=document.createRange();h.setEnd(a.node,a.offset),h.setStart(l.node,l.offset),c.removeAllRanges(),c.addRange(h)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let r=0,i=0;i=r:er){let l=r+s.border,a=o-s.border;if(e>=l&&t<=a){this.dirty=e==r||t==o?pt:Xl,e==l&&t==a&&(s.contentLost||s.dom.parentNode!=this.contentDOM)?s.dirty=Ee:s.markDirty(e-l,t-l);return}else s.dirty=s.dom==s.contentDOM&&s.dom.parentNode==this.contentDOM&&!s.children.length?pt:Ee}r=o}this.dirty=pt}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let r=e==1?pt:Xl;t.dirty{if(!s)return i;if(s.parent)return s.parent.posBeforeChild(s)})),!t.type.spec.raw){if(o.nodeType!=1){let l=document.createElement("span");l.appendChild(o),o=l}o.contentEditable="false",o.classList.add("ProseMirror-widget")}super(e,[],o,null),this.widget=t,this.widget=t,s=this}matchesWidget(e){return this.dirty==xe&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return t?t(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}},is=class extends xt{constructor(e,t,r,i){super(e,[],t,null),this.textDOM=r,this.text=i}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}},Vt=class n extends xt{constructor(e,t,r,i,s){super(e,[],r,i),this.mark=t,this.spec=s}static create(e,t,r,i){let s=i.nodeViews[t.type.name],o=s&&s(t,i,r);return(!o||!o.dom)&&(o=Le.renderSpec(document,t.type.spec.toDOM(t,r),null,t.attrs)),new n(e,t,o.dom,o.contentDOM||o.dom,o)}parseRule(){return this.dirty&Ee||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=Ee&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),this.dirty!=xe){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty0&&(s=cs(s,0,e,r));for(let l=0;l{if(!a)return o;if(a.parent)return a.parent.posBeforeChild(a)},r,i),u=c&&c.dom,d=c&&c.contentDOM;if(t.isText){if(!u)u=document.createTextNode(t.text);else if(u.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else u||({dom:u,contentDOM:d}=Le.renderSpec(document,t.type.spec.toDOM(t),null,t.attrs));!d&&!t.isText&&u.nodeName!="BR"&&(u.hasAttribute("contenteditable")||(u.contentEditable="false"),t.type.spec.draggable&&(u.draggable=!0));let f=u;return u=Pa(u,r,t),c?a=new ss(e,t,r,i,u,d||null,f,c,s,o+1):t.isText?new Xn(e,t,r,i,u,f,s):new n(e,t,r,i,u,d||null,f,s,o+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let t=this.children.length-1;t>=0;t--){let r=this.children[t];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>k.empty)}return e}matchesNode(e,t,r){return this.dirty==xe&&e.eq(this.node)&&Zn(t,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let r=this.node.inlineContent,i=t,s=e.composing?this.localCompositionInfo(e,t):null,o=s&&s.pos>-1?s:null,l=s&&s.pos<0,a=new as(this,o&&o.node,e);Tf(this.node,this.innerDeco,(c,u,d)=>{c.spec.marks?a.syncToMarks(c.spec.marks,r,e,u):c.type.side>=0&&!d&&a.syncToMarks(u==this.node.childCount?B.none:this.node.child(u).marks,r,e,u),a.placeWidget(c,e,i)},(c,u,d,f)=>{a.syncToMarks(c.marks,r,e,f);let h;a.findNodeMatch(c,u,d,f)||l&&e.state.selection.from>i&&e.state.selection.to-1&&a.updateNodeAt(c,u,d,h,e)||a.updateNextNode(c,u,d,e,f,i)||a.addNode(c,u,d,e,i),i+=c.nodeSize}),a.syncToMarks([],r,e,0),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||this.dirty==pt)&&(o&&this.protectLocalComposition(e,o),Ra(this.contentDOM,this.children,e),_t&&Ef(this.dom))}localCompositionInfo(e,t){let{from:r,to:i}=e.state.selection;if(!(e.state.selection instanceof E)||rt+this.node.content.size)return null;let s=e.input.compositionNode;if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let o=s.nodeValue,l=Af(this.node.content,o,r-t,i-t);return l<0?null:{node:s,pos:l,text:o}}else return{node:s,pos:-1,text:""}}protectLocalComposition(e,{node:t,pos:r,text:i}){if(this.getDesc(t))return;let s=t;for(;s.parentNode!=this.contentDOM;s=s.parentNode){for(;s.previousSibling;)s.parentNode.removeChild(s.previousSibling);for(;s.nextSibling;)s.parentNode.removeChild(s.nextSibling);s.pmViewDesc&&(s.pmViewDesc=void 0)}let o=new is(this,s,t,i);e.input.compositionNodes.push(o),this.children=cs(this.children,r,r+i.length,e,o)}update(e,t,r,i){return this.dirty==Ee||!e.sameMarkup(this.node)?!1:(this.updateInner(e,t,r,i),!0)}updateInner(e,t,r,i){this.updateOuterDeco(t),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=xe}updateOuterDeco(e){if(Zn(e,this.outerDeco))return;let t=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=Da(this.dom,this.nodeDOM,ls(this.outerDeco,this.node,t),ls(e,this.node,t)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}};function Ql(n,e,t,r,i){Pa(r,e,n);let s=new et(void 0,n,e,t,r,r,r,i,0);return s.contentDOM&&s.updateChildren(i,0),s}var Xn=class n extends et{constructor(e,t,r,i,s,o,l){super(e,t,r,i,s,null,o,l,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,r,i){return this.dirty==Ee||this.dirty!=xe&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(t),(this.dirty!=xe||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,i.trackWrites==this.nodeDOM&&(i.trackWrites=null)),this.node=e,this.dirty=xe,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,r){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,t,r){let i=this.node.cut(e,t),s=document.createTextNode(i.text);return new n(this.parent,i,this.outerDeco,this.innerDeco,s,s,r)}markDirty(e,t){super.markDirty(e,t),this.dom!=this.nodeDOM&&(e==0||t==this.nodeDOM.nodeValue.length)&&(this.dirty=Ee)}get domAtom(){return!1}isText(e){return this.node.text==e}},Qn=class extends xt{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==xe&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}},ss=class extends et{constructor(e,t,r,i,s,o,l,a,c,u){super(e,t,r,i,s,o,l,c,u),this.spec=a}update(e,t,r,i){if(this.dirty==Ee)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let s=this.spec.update(e,t,r);return s&&this.updateInner(e,t,r,i),s}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,t,r,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,r,i){this.spec.setSelection?this.spec.setSelection(e,t,r.root):super.setSelection(e,t,r,i)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}};function Ra(n,e,t){let r=n.firstChild,i=!1;for(let s=0;s>1,l=Math.min(o,e.length);for(;s-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{let u=Vt.create(this.top,e[o],t,r);this.top.children.splice(this.index,0,u),this.top=u,this.changed=!0}this.index=0,o++}}findNodeMatch(e,t,r,i){let s=-1,o;if(i>=this.preMatch.index&&(o=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&o.matchesNode(e,t,r))s=this.top.children.indexOf(o,this.index);else for(let l=this.index,a=Math.min(this.top.children.length,l+5);l0;){let l;for(;;)if(r){let c=t.children[r-1];if(c instanceof Vt)t=c,r=c.children.length;else{l=c,r--;break}}else{if(t==e)break e;r=t.parent.children.indexOf(t),t=t.parent}let a=l.node;if(a){if(a!=n.child(i-1))break;--i,s.set(l,i),o.push(l)}}return{index:i,matched:s,matches:o.reverse()}}function vf(n,e){return n.type.side-e.type.side}function Tf(n,e,t,r){let i=e.locals(n),s=0;if(i.length==0){for(let c=0;cs;)l.push(i[o++]);let p=s+f.nodeSize;if(f.isText){let g=p;o!g.inline):l.slice();r(f,m,e.forChild(s,f),h),s=p}}function Ef(n){if(n.nodeName=="UL"||n.nodeName=="OL"){let e=n.style.cssText;n.style.cssText=e+"; list-style: square !important",window.getComputedStyle(n).listStyle,n.style.cssText=e}}function Af(n,e,t,r){for(let i=0,s=0;i=t){if(s>=r&&a.slice(r-e.length-l,r-l)==e)return r-e.length;let c=l=0&&c+e.length+l>=t)return l+c;if(t==r&&a.length>=r+e.length-l&&a.slice(r-l,r-l+e.length)==e)return r}}return-1}function cs(n,e,t,r,i){let s=[];for(let o=0,l=0;o=t||u<=e?s.push(a):(ct&&s.push(a.slice(t-c,a.size,r)))}return s}function xs(n,e=null){let t=n.domSelectionRange(),r=n.state.doc;if(!t.focusNode)return null;let i=n.docView.nearestDesc(t.focusNode),s=i&&i.size==0,o=n.docView.posFromDOM(t.focusNode,t.focusOffset,1);if(o<0)return null;let l=r.resolve(o),a,c;if(or(t)){for(a=o;i&&!i.node;)i=i.parent;let d=i.node;if(i&&d.isAtom&&M.isSelectable(d)&&i.parent&&!(d.isInline&&rf(t.focusNode,t.focusOffset,i.dom))){let f=i.posBefore;c=new M(o==f?l:r.resolve(f))}}else{if(t instanceof n.dom.ownerDocument.defaultView.Selection&&t.rangeCount>1){let d=o,f=o;for(let h=0;h{(t.anchorNode!=r||t.anchorOffset!=i)&&(e.removeEventListener("selectionchange",n.input.hideSelectionGuard),setTimeout(()=>{(!La(n)||n.state.selection.visible)&&n.dom.classList.remove("ProseMirror-hideselection")},20))})}function Of(n){let e=n.domSelection();if(!e)return;let t=n.cursorWrapper.dom,r=t.nodeName=="IMG";r?e.collapse(t.parentNode,Z(t)+1):e.collapse(t,0),!r&&!n.state.selection.visible&&fe&&Ze<=11&&(t.disabled=!0,t.disabled=!1)}function za(n,e){if(e instanceof M){let t=n.docView.descAt(e.from);t!=n.lastSelectedViewDesc&&(ra(n),t&&t.selectNode(),n.lastSelectedViewDesc=t)}else ra(n)}function ra(n){n.lastSelectedViewDesc&&(n.lastSelectedViewDesc.parent&&n.lastSelectedViewDesc.deselectNode(),n.lastSelectedViewDesc=void 0)}function Ss(n,e,t,r){return n.someProp("createSelectionBetween",i=>i(n,e,t))||E.between(e,t,r)}function ia(n){return n.editable&&!n.hasFocus()?!1:Ba(n)}function Ba(n){let e=n.domSelectionRange();if(!e.anchorNode)return!1;try{return n.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(n.editable||n.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function If(n){let e=n.docView.domFromPos(n.state.selection.anchor,0),t=n.domSelectionRange();return bt(e.node,e.offset,t.anchorNode,t.anchorOffset)}function us(n,e){let{$anchor:t,$head:r}=n.selection,i=e>0?t.max(r):t.min(r),s=i.parent.inlineContent?i.depth?n.doc.resolve(e>0?i.after():i.before()):null:i;return s&&N.findFrom(s,e)}function Xe(n,e){return n.dispatch(n.state.tr.setSelection(e).scrollIntoView()),!0}function sa(n,e,t){let r=n.state.selection;if(r instanceof E)if(t.indexOf("s")>-1){let{$head:i}=r,s=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter;if(!s||s.isText||!s.isLeaf)return!1;let o=n.state.doc.resolve(i.pos+s.nodeSize*(e<0?-1:1));return Xe(n,new E(r.$anchor,o))}else if(r.empty){if(n.endOfTextblock(e>0?"forward":"backward")){let i=us(n.state,e);return i&&i instanceof M?Xe(n,i):!1}else if(!(ye&&t.indexOf("m")>-1)){let i=r.$head,s=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter,o;if(!s||s.isText)return!1;let l=e<0?i.pos-s.nodeSize:i.pos;return s.isAtom||(o=n.docView.descAt(l))&&!o.contentDOM?M.isSelectable(s)?Xe(n,new M(e<0?n.state.doc.resolve(i.pos-s.nodeSize):i)):mn?Xe(n,new E(n.state.doc.resolve(e<0?l:l+s.nodeSize))):!1:!1}}else return!1;else{if(r instanceof M&&r.node.isInline)return Xe(n,new E(e>0?r.$to:r.$from));{let i=us(n.state,e);return i?Xe(n,i):!1}}}function er(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function cn(n,e){let t=n.pmViewDesc;return t&&t.size==0&&(e<0||n.nextSibling||n.nodeName!="BR")}function Bt(n,e){return e<0?Rf(n):Df(n)}function Rf(n){let e=n.domSelectionRange(),t=e.focusNode,r=e.focusOffset;if(!t)return;let i,s,o=!1;for(be&&t.nodeType==1&&r0){if(t.nodeType!=1)break;{let l=t.childNodes[r-1];if(cn(l,-1))i=t,s=--r;else if(l.nodeType==3)t=l,r=t.nodeValue.length;else break}}else{if(Fa(t))break;{let l=t.previousSibling;for(;l&&cn(l,-1);)i=t.parentNode,s=Z(l),l=l.previousSibling;if(l)t=l,r=er(t);else{if(t=t.parentNode,t==n.dom)break;r=0}}}o?ds(n,t,r):i&&ds(n,i,s)}function Df(n){let e=n.domSelectionRange(),t=e.focusNode,r=e.focusOffset;if(!t)return;let i=er(t),s,o;for(;;)if(r{n.state==i&&Ve(n)},50)}function oa(n,e){let t=n.state.doc.resolve(e);if(!(ee||va)&&t.parent.inlineContent){let i=n.coordsAtPos(e);if(e>t.start()){let s=n.coordsAtPos(e-1),o=(s.top+s.bottom)/2;if(o>i.top&&o1)return s.lefti.top&&o1)return s.left>i.left?"ltr":"rtl"}}return getComputedStyle(n.dom).direction=="rtl"?"rtl":"ltr"}function la(n,e,t){let r=n.state.selection;if(r instanceof E&&!r.empty||t.indexOf("s")>-1||ye&&t.indexOf("m")>-1)return!1;let{$from:i,$to:s}=r;if(!i.parent.inlineContent||n.endOfTextblock(e<0?"up":"down")){let o=us(n.state,e);if(o&&o instanceof M)return Xe(n,o)}if(!i.parent.inlineContent){let o=e<0?i:s,l=r instanceof ae?N.near(o,e):N.findFrom(o,e);return l?Xe(n,l):!1}return!1}function aa(n,e){if(!(n.state.selection instanceof E))return!0;let{$head:t,$anchor:r,empty:i}=n.state.selection;if(!t.sameParent(r))return!0;if(!i)return!1;if(n.endOfTextblock(e>0?"forward":"backward"))return!0;let s=!t.textOffset&&(e<0?t.nodeBefore:t.nodeAfter);if(s&&!s.isText){let o=n.state.tr;return e<0?o.delete(t.pos-s.nodeSize,t.pos):o.delete(t.pos,t.pos+s.nodeSize),n.dispatch(o),!0}return!1}function ca(n,e,t){n.domObserver.stop(),e.contentEditable=t,n.domObserver.start()}function zf(n){if(!ie||n.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:t}=n.domSelectionRange();if(e&&e.nodeType==1&&t==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;ca(n,r,"true"),setTimeout(()=>ca(n,r,"false"),20)}return!1}function Bf(n){let e="";return n.ctrlKey&&(e+="c"),n.metaKey&&(e+="m"),n.altKey&&(e+="a"),n.shiftKey&&(e+="s"),e}function Ff(n,e){let t=e.keyCode,r=Bf(e);if(t==8||ye&&t==72&&r=="c")return aa(n,-1)||Bt(n,-1);if(t==46&&!e.shiftKey||ye&&t==68&&r=="c")return aa(n,1)||Bt(n,1);if(t==13||t==27)return!0;if(t==37||ye&&t==66&&r=="c"){let i=t==37?oa(n,n.state.selection.from)=="ltr"?-1:1:-1;return sa(n,i,r)||Bt(n,i)}else if(t==39||ye&&t==70&&r=="c"){let i=t==39?oa(n,n.state.selection.from)=="ltr"?1:-1:1;return sa(n,i,r)||Bt(n,i)}else{if(t==38||ye&&t==80&&r=="c")return la(n,-1,r)||Bt(n,-1);if(t==40||ye&&t==78&&r=="c")return zf(n)||la(n,1,r)||Bt(n,1);if(r==(ye?"m":"c")&&(t==66||t==73||t==89||t==90))return!0}return!1}function Ms(n,e){n.someProp("transformCopied",h=>{e=h(e,n)});let t=[],{content:r,openStart:i,openEnd:s}=e;for(;i>1&&s>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,s--;let h=r.firstChild;t.push(h.type.name,h.attrs!=h.type.defaultAttrs?h.attrs:null),r=h.content}let o=n.someProp("clipboardSerializer")||Le.fromSchema(n.state.schema),l=Wa(),a=l.createElement("div");a.appendChild(o.serializeFragment(r,{document:l}));let c=a.firstChild,u,d=0;for(;c&&c.nodeType==1&&(u=ja[c.nodeName.toLowerCase()]);){for(let h=u.length-1;h>=0;h--){let p=l.createElement(u[h]);for(;a.firstChild;)p.appendChild(a.firstChild);a.appendChild(p),d++}c=a.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${i} ${s}${d?` -${d}`:""} ${JSON.stringify(t)}`);let f=n.someProp("clipboardTextSerializer",h=>h(e,n))||e.content.textBetween(0,e.content.size,` +var IotdoorAdmin=(()=>{var hi=Object.defineProperty;var Xu=Object.getOwnPropertyDescriptor;var Qu=Object.getOwnPropertyNames;var Zu=Object.prototype.hasOwnProperty;var ed=(n,e)=>{for(var t in e)hi(n,t,{get:e[t],enumerable:!0})},td=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Qu(e))!Zu.call(n,i)&&i!==t&&hi(n,i,{get:()=>e[i],enumerable:!(r=Xu(e,i))||r.enumerable});return n};var nd=n=>td(hi({},"__esModule",{value:!0}),n);var ly={};ed(ly,{initPortfolioEditor:()=>oy});function ne(n){this.content=n}ne.prototype={constructor:ne,find:function(n){for(var e=0;e>1}};ne.from=function(n){if(n instanceof ne)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new ne(e)};var pi=ne;function Ko(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let i=n.child(r),s=e.child(r);if(i==s){t+=i.nodeSize;continue}if(!i.sameMarkup(s))return t;if(i.isText&&i.text!=s.text){for(let o=0;i.text[o]==s.text[o];o++)t++;return t}if(i.content.size||s.content.size){let o=Ko(i.content,s.content,t+1);if(o!=null)return o}t+=i.nodeSize}}function Uo(n,e,t,r){for(let i=n.childCount,s=e.childCount;;){if(i==0||s==0)return i==s?null:{a:t,b:r};let o=n.child(--i),l=e.child(--s),a=o.nodeSize;if(o==l){t-=a,r-=a;continue}if(!o.sameMarkup(l))return{a:t,b:r};if(o.isText&&o.text!=l.text){let c=0,u=Math.min(o.text.length,l.text.length);for(;ce&&r(a,i+l,s||null,o)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,t-u),r,i+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,i){let s="",o=!0;return this.nodesBetween(e,t,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,t-a):l.isLeaf?i?typeof i=="function"?i(l):i:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(o?o=!1:s+=r),s+=c},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,i=this.content.slice(),s=0;for(t.isText&&t.sameMarkup(r)&&(i[i.length-1]=t.withText(t.text+r.text),s=1);se)for(let s=0,o=0;oe&&((ot)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,t-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,t-o-1))),r.push(l),i+=l.nodeSize),o=a}return new n(r,i)}cutByIndex(e,t){return e==t?n.empty:e==0&&t==this.content.length?this:new n(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let i=this.content.slice(),s=this.size+t.nodeSize-r.nodeSize;return i[e]=t,new n(i,s)}addToStart(e){return new n([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new n(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;tthis.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let i=this.child(t),s=r+i.nodeSize;if(s>=e)return s==e?Pn(t+1,s):Pn(t,r);r=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return n.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new n(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return n.empty;let t,r=0;for(let i=0;ithis.type.rank&&(t||(t=e.slice(0,i)),t.push(this),r=!0),t&&t.push(s)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;tr.type.rank-i.type.rank),t}};B.none=[];var at=class extends Error{},S=class n{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=qo(this.content,e+this.openStart,t);return r&&new n(r,this.openStart,this.openEnd)}removeBetween(e,t){return new n(Jo(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return n.empty;let r=t.openStart||0,i=t.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new n(k.fromJSON(e,t.content),r,i)}static maxOpen(e,t=!0){let r=0,i=0;for(let s=e.firstChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.firstChild)r++;for(let s=e.lastChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.lastChild)i++;return new n(e,r,i)}};S.empty=new S(k.empty,0,0);function Jo(n,e,t){let{index:r,offset:i}=n.findIndex(e),s=n.maybeChild(r),{index:o,offset:l}=n.findIndex(t);if(i==e||s.isText){if(l!=t&&!n.child(o).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=o)throw new RangeError("Removing non-flat range");return n.replaceChild(r,s.copy(Jo(s.content,e-i-1,t-i-1)))}function qo(n,e,t,r){let{index:i,offset:s}=n.findIndex(e),o=n.maybeChild(i);if(s==e||o.isText)return r&&!r.canReplace(i,i,t)?null:n.cut(0,e).append(t).append(n.cut(e));let l=qo(o.content,e-s-1,t,o);return l&&n.replaceChild(i,o.copy(l))}function rd(n,e,t){if(t.openStart>n.depth)throw new at("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new at("Inconsistent open depths");return Go(n,e,t,0)}function Go(n,e,t,r){let i=n.index(r),s=n.node(r);if(i==e.index(r)&&r=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function qt(n,e,t,r){let i=(e||n).node(t),s=0,o=e?e.index(t):i.childCount;n&&(s=n.index(t),n.depth>t?s++:n.textOffset&&(ot(n.nodeAfter,r),s++));for(let l=s;li&&yi(n,e,i+1),o=r.depth>i&&yi(t,r,i+1),l=[];return qt(null,n,i,l),s&&o&&e.index(i)==t.index(i)?(Yo(s,o),ot(lt(s,Xo(n,e,t,r,i+1)),l)):(s&&ot(lt(s,Bn(n,e,i+1)),l),qt(e,t,i,l),o&&ot(lt(o,Bn(t,r,i+1)),l)),qt(r,null,i,l),new k(l)}function Bn(n,e,t){let r=[];if(qt(null,n,t,r),n.depth>t){let i=yi(n,e,t+1);ot(lt(i,Bn(n,e,t+1)),r)}return qt(e,null,t,r),new k(r)}function id(n,e){let t=e.depth-n.openStart,i=e.node(t).copy(n.content);for(let s=t-1;s>=0;s--)i=e.node(s).copy(k.from(i));return{start:i.resolveNoCache(n.openStart+t),end:i.resolveNoCache(i.content.size-n.openEnd-t)}}var Fn=class n{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(t);return r?e.child(t).cut(r):i}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],i=t==0?0:this.path[t*3-1]+1;for(let s=0;s0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new ct(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],i=0,s=t;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(s),c=s-a;if(r.push(o,l,i+a),!c||(o=o.child(l),o.isText))break;s=c-1,i+=a+1}return new n(t,r,s)}static resolveCached(e,t){let r=zo.get(e);if(r)for(let s=0;se&&this.nodesBetween(e,t,s=>(r.isInSet(s.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),Qo(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=k.empty,i=0,s=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,i,s),l=o&&o.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=i;at.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let i=k.fromJSON(e,t.content),s=e.nodeType(t.type).create(t.attrs,i,r);return s.type.checkAttrs(s.attrs),s}};de.prototype.text=void 0;var bi=class n extends de{constructor(e,t,r,i){if(super(e,t,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Qo(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new n(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new n(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}};function Qo(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}var ut=class n{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new xi(e,t);if(r.next==null)return n.empty;let i=Zo(r);r.next&&r.err("Unexpected trailing text");let s=hd(fd(i));return pd(s,r),s}matchType(e){for(let t=0;tc.createAndFill()));for(let c=0;c=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let i=0;i{let s=i+(r.validEnd?"*":" ")+" ";for(let o=0;o"+e.indexOf(r.next[o].next);return s}).join(` +`)}};ut.empty=new ut(!0);var xi=class{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}};function Zo(n){let e=[];do e.push(ld(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function ld(n){let e=[];do e.push(ad(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function ad(n){let e=dd(n);for(;;)if(n.eat("+"))e={type:"plus",expr:e};else if(n.eat("*"))e={type:"star",expr:e};else if(n.eat("?"))e={type:"opt",expr:e};else if(n.eat("{"))e=cd(n,e);else break;return e}function Bo(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function cd(n,e){let t=Bo(n),r=t;return n.eat(",")&&(n.next!="}"?r=Bo(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function ud(n,e){let t=n.nodeTypes,r=t[e];if(r)return[r];let i=[];for(let s in t){let o=t[s];o.isInGroup(e)&&i.push(o)}return i.length==0&&n.err("No node type or group '"+e+"' found"),i}function dd(n){if(n.eat("(")){let e=Zo(n);return n.eat(")")||n.err("Missing closing paren"),e}else if(/\W/.test(n.next))n.err("Unexpected token '"+n.next+"'");else{let e=ud(n,n.next).map(t=>(n.inline==null?n.inline=t.isInline:n.inline!=t.isInline&&n.err("Mixing inline and block content"),{type:"name",value:t}));return n.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function fd(n){let e=[[]];return i(s(n,0),t()),e;function t(){return e.push([])-1}function r(o,l,a){let c={term:a,to:l};return e[o].push(c),c}function i(o,l){o.forEach(a=>a.to=l)}function s(o,l){if(o.type=="choice")return o.exprs.reduce((a,c)=>a.concat(s(c,l)),[]);if(o.type=="seq")for(let a=0;;a++){let c=s(o.exprs[a],l);if(a==o.exprs.length-1)return c;i(c,l=t())}else if(o.type=="star"){let a=t();return r(l,a),i(s(o.expr,a),a),[r(a)]}else if(o.type=="plus"){let a=t();return i(s(o.expr,l),a),i(s(o.expr,a),a),[r(a)]}else{if(o.type=="opt")return[r(l)].concat(s(o.expr,l));if(o.type=="range"){let a=l;for(let c=0;c{n[o].forEach(({term:l,to:a})=>{if(!l)return;let c;for(let u=0;u{c||i.push([l,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let s=e[r.join(",")]=new ut(r.indexOf(n.length-1)>-1);for(let o=0;o-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:nl(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new de(this,this.computeAttrs(e),k.from(t),B.setFrom(r))}createChecked(e=null,t,r){return t=k.from(t),this.checkContent(t),new de(this,this.computeAttrs(e),t,B.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),t=k.from(t),t.size){let o=this.contentMatch.fillBefore(t);if(!o)return null;t=o.append(t)}let i=this.contentMatch.matchFragment(t),s=i&&i.fillBefore(k.empty,!0);return s?new de(this,e,t.append(s),B.setFrom(r)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let r=0;r-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;tr[s]=new n(s,t,o));let i=t.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let s in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function md(n,e,t){let r=t.split("|");return i=>{let s=i===null?"null":typeof i;if(r.indexOf(s)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${n}, got ${s}`)}}var Si=class{constructor(e,t,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?md(e,t,r.validate):r.validate}get isRequired(){return!this.hasDefault}},Yt=class n{constructor(e,t,r,i){this.name=e,this.rank=t,this.schema=r,this.spec=i,this.attrs=il(e,i.attrs),this.excluded=null;let s=tl(this.attrs);this.instance=s?new B(this,s):null}create(e=null){return!e&&this.instance?this.instance:new B(this,nl(this.attrs,e))}static compile(e,t){let r=Object.create(null),i=0;return e.forEach((s,o)=>r[s]=new n(s,i++,t,o)),r}removeFromSet(e){for(var t=0;t-1}},Nt=class{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let i in e)t[i]=e[i];t.nodes=pi.from(e.nodes),t.marks=pi.from(e.marks||{}),this.nodes=Hn.compile(this.spec.nodes,this),this.marks=Yt.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let s=this.nodes[i],o=s.spec.content||"",l=s.spec.marks;if(s.contentMatch=r[o]||(r[o]=ut.parse(o,this.nodes)),s.inlineContent=s.contentMatch.inlineContent,s.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!s.isInline||!s.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=s}s.markSet=l=="_"?null:l?Ho(this,l.split(" ")):l==""||!s.inlineContent?[]:null}for(let i in this.marks){let s=this.marks[i],o=s.spec.excludes;s.excluded=o==null?[s]:o==""?[]:Ho(this,o.split(" "))}this.nodeFromJSON=i=>de.fromJSON(this,i),this.markFromJSON=i=>B.fromJSON(this,i),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,r,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof Hn){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(t,r,i)}text(e,t){let r=this.nodes.text;return new bi(r,r.defaultAttrs,e,B.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}};function Ho(n,e){let t=[];for(let r=0;r-1)&&t.push(o=a)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}function gd(n){return n.tag!=null}function yd(n){return n.style!=null}var ve=class n{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let r=this.matchedStyles=[];t.forEach(i=>{if(gd(i))this.tags.push(i);else if(yd(i)){let s=/[^=]*/.exec(i.style)[0];r.indexOf(s)<0&&r.push(s),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let s=e.nodes[i.node];return s.contentMatch.matchType(s)})}parse(e,t={}){let r=new $n(this,t,!1);return r.addAll(e,B.none,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new $n(this,t,!0);return r.addAll(e,B.none,t.from,t.to),S.maxOpen(r.finish())}matchTag(e,t,r){for(let i=r?this.tags.indexOf(r)+1:0;ie.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=t))){if(o.getAttrs){let a=o.getAttrs(t);if(a===!1)continue;o.attrs=a||void 0}return o}}}static schemaRules(e){let t=[];function r(i){let s=i.priority==null?50:i.priority,o=0;for(;o{r(o=_o(o)),o.mark||o.ignore||o.clearMark||(o.mark=i)})}for(let i in e.nodes){let s=e.nodes[i].spec.parseDOM;s&&s.forEach(o=>{r(o=_o(o)),o.node||o.ignore||o.mark||(o.node=i)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new n(e,n.schemaRules(e)))}},sl={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},kd={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},ol={ol:!0,ul:!0},Xt=1,Mi=2,Gt=4;function $o(n,e,t){return e!=null?(e?Xt:0)|(e==="full"?Mi:0):n&&n.whitespace=="pre"?Xt|Mi:t&~Gt}var At=class{constructor(e,t,r,i,s,o){this.type=e,this.attrs=t,this.marks=r,this.solid=i,this.options=o,this.content=[],this.activeMarks=B.none,this.match=s||(o&Gt?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(k.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(e.type))?(this.match=r,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Xt)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let s=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=s.withText(s.text.slice(0,s.text.length-i[0].length))}}let t=k.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(k.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!sl.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}},$n=class{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i=t.topNode,s,o=$o(null,t.preserveWhitespace,0)|(r?Gt:0);i?s=new At(i.type,i.attrs,B.none,!0,t.topMatch||i.type.contentMatch,o):r?s=new At(null,null,B.none,!0,null,o):s=new At(e.schema.topNodeType,null,B.none,!0,null,o),this.nodes=[s],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let r=e.nodeValue,i=this.top,s=i.options&Mi?"full":this.localPreserveWS||(i.options&Xt)>0,{schema:o}=this.parser;if(s==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(s)if(s==="full")r=r.replace(/\r\n?/g,` +`);else if(o.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(o.linebreakReplacement.create())){let l=r.split(/\r?\n|\r/);for(let a=0;a!a.clearMark(c)):t=t.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)l=a;else break}}return t}addElementByRule(e,t,r,i){let s,o;if(t.node)if(o=this.parser.schema.nodes[t.node],o.isLeaf)this.insertNode(o.create(t.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let a=this.enter(o,t.attrs||null,r,t.preserveWhitespace);a&&(s=!0,r=a)}else{let a=this.parser.schema.marks[t.mark];r=r.concat(a.create(t.attrs))}let l=this.top;if(o&&o.isLeaf)this.findInside(e);else if(i)this.addElement(e,r,i);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a,r,!1));else{let a=e;typeof t.contentElement=="string"?a=e.querySelector(t.contentElement):typeof t.contentElement=="function"?a=t.contentElement(e):t.contentElement&&(a=t.contentElement),this.findAround(e,a,!0),this.addAll(a,r),this.findAround(e,a,!1)}s&&this.sync(l)&&this.open--}addAll(e,t,r,i){let s=r||0;for(let o=r?e.childNodes[r]:e.firstChild,l=i==null?null:e.childNodes[i];o!=l;o=o.nextSibling,++s)this.findAtPoint(e,s),this.addDOM(o,t);this.findAtPoint(e,s)}findPlace(e,t,r){let i,s;for(let o=this.open,l=0;o>=0;o--){let a=this.nodes[o],c=a.findWrapping(e);if(c&&(!i||i.length>c.length+l)&&(i=c,s=a,!c.length))break;if(a.solid){if(r)break;l+=2}}if(!i)return null;this.sync(s);for(let o=0;o(o.type?o.type.allowsMarkType(c.type):Vo(c.type,e))?(a=c.addToSet(a),!1):!0),this.nodes.push(new At(e,t,a,i,null,l)),this.open++,r}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--){if(this.nodes[t]==e)return this.open=t,!0;this.localPreserveWS&&(this.nodes[t].options|=Xt)}return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let r=this.nodes[t].content;for(let i=r.length-1;i>=0;i--)e+=r[i].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let r=0;r-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),s=-(r?r.depth+1:0)+(i?0:1),o=(l,a)=>{for(;l>=0;l--){let c=t[l];if(c==""){if(l==t.length-1||l==0)continue;for(;a>=s;a--)if(o(l-1,a))return!0;return!1}else{let u=a>0||a==0&&i?this.nodes[a].type:r&&a>=s?r.node(a-s).type:null;if(!u||u.name!=c&&!u.isInGroup(c))return!1;a--}}return!0};return o(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let t in this.parser.schema.nodes){let r=this.parser.schema.nodes[t];if(r.isTextblock&&r.defaultAttrs)return r}}};function bd(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&ol.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function xd(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function _o(n){let e={};for(let t in n)e[t]=n[t];return e}function Vo(n,e){let t=e.schema.nodes;for(let r in t){let i=t[r];if(!i.allowsMarkType(n))continue;let s=[],o=l=>{s.push(l);for(let a=0;a{if(s.length||o.marks.length){let l=0,a=0;for(;l=0;i--){let s=this.serializeMark(e.marks[i],e.isInline,t);s&&((s.contentDOM||s.dom).appendChild(r),r=s.dom)}return r}serializeMark(e,t,r={}){let i=this.marks[e.type.name];return i&&Ln(gi(r),i(e,t),null,e.attrs)}static renderSpec(e,t,r=null,i){return Ln(e,t,r,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new n(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=jo(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return jo(e.marks)}};function jo(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function gi(n){return n.document||window.document}var Wo=new WeakMap;function Sd(n){let e=Wo.get(n);return e===void 0&&Wo.set(n,e=Md(n)),e}function Md(n){let e=null;function t(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let i=0;i-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let o=i.indexOf(" ");o>0&&(t=i.slice(0,o),i=i.slice(o+1));let l,a=t?n.createElementNS(t,i):n.createElement(i),c=e[1],u=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){u=2;for(let d in c)if(c[d]!=null){let f=d.indexOf(" ");f>0?a.setAttributeNS(d.slice(0,f),d.slice(f+1),c[d]):d=="style"&&a.style?a.style.cssText=c[d]:a.setAttribute(d,c[d])}}for(let d=u;du)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else{let{dom:h,contentDOM:p}=Ln(n,f,t,r);if(a.appendChild(h),p){if(l)throw new RangeError("Multiple content holes");l=p}}}return{dom:a,contentDOM:l}}var cl=65535,ul=Math.pow(2,16);function wd(n,e){return n+e*ul}function ll(n){return n&cl}function Cd(n){return(n-(n&cl))/ul}var dl=1,fl=2,_n=4,hl=8,en=class{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&hl)>0}get deletedBefore(){return(this.delInfo&(dl|_n))>0}get deletedAfter(){return(this.delInfo&(fl|_n))>0}get deletedAcross(){return(this.delInfo&_n)>0}},ze=class n{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&n.empty)return n.empty}recover(e){let t=0,r=ll(e);if(!this.inverted)for(let i=0;ie)break;let c=this.ranges[l+s],u=this.ranges[l+o],d=a+c;if(e<=d){let f=c?e==a?-1:e==d?1:t:t,h=a+i+(f<0?0:u);if(r)return h;let p=e==(t<0?a:d)?null:wd(l/3,e-a),m=e==a?fl:e==d?dl:_n;return(t<0?e!=a:e!=d)&&(m|=hl),new en(h,m,p)}i+=u-c}return r?e+i:new en(e+i,0,null)}touches(e,t){let r=0,i=ll(t),s=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;le)break;let c=this.ranges[l+s],u=a+c;if(e<=u&&l==i*3)return!0;r+=this.ranges[l+o]-c}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,s=0;i=0;t--){let i=e.getMirror(t);this.appendMap(e._maps[t].invert(),i!=null&&i>t?r-i-1:void 0)}}invert(){let e=new n;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;rs&&a!o.isAtom||!l.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),i),t.openStart,t.openEnd);return X.fromReplace(e,this.from,this.to,s)}invert(){return new Be(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new n(t.pos,r.pos,this.mark)}merge(e){return e instanceof n&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new n(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new n(t.from,t.to,e.markFromJSON(t.mark))}};G.jsonID("addMark",nn);var Be=class n extends G{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new S(Ai(t.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),t.openStart,t.openEnd);return X.fromReplace(e,this.from,this.to,r)}invert(){return new nn(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new n(t.pos,r.pos,this.mark)}merge(e){return e instanceof n&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new n(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new n(t.from,t.to,e.markFromJSON(t.mark))}};G.jsonID("removeMark",Be);var rn=class n extends G{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return X.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return X.fromReplace(e,this.pos,this.pos+1,new S(k.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let r=this.mark.addToSet(t.marks);if(r.length==t.marks.length){for(let i=0;ir.pos?null:new n(t.pos,r.pos,i,s,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new n(t.from,t.to,t.gapFrom,t.gapTo,S.fromJSON(e,t.slice),t.insert,!!t.structure)}};G.jsonID("replaceAround",K);function Ti(n,e,t){let r=n.resolve(e),i=t-e,s=r.depth;for(;i>0&&s>0&&r.indexAfter(s)==r.node(s).childCount;)s--,i--;if(i>0){let o=r.node(s).maybeChild(r.indexAfter(s));for(;i>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,i--}}return!1}function vd(n,e,t,r){let i=[],s=[],o,l;n.doc.nodesBetween(e,t,(a,c,u)=>{if(!a.isInline)return;let d=a.marks;if(!r.isInSet(d)&&u.type.allowsMarkType(r.type)){let f=Math.max(c,e),h=Math.min(c+a.nodeSize,t),p=r.addToSet(d);for(let m=0;mn.step(a)),s.forEach(a=>n.step(a))}function Td(n,e,t,r){let i=[],s=0;n.doc.nodesBetween(e,t,(o,l)=>{if(!o.isInline)return;s++;let a=null;if(r instanceof Yt){let c=o.marks,u;for(;u=r.isInSet(c);)(a||(a=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(o.marks)&&(a=[r]):a=o.marks;if(a&&a.length){let c=Math.min(l+o.nodeSize,t);for(let u=0;un.step(new Be(o.from,o.to,o.style)))}function Ni(n,e,t,r=t.contentMatch,i=!0){let s=n.doc.nodeAt(e),o=[],l=e+1;for(let a=0;a=0;a--)n.step(o[a])}function Ed(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function Fe(n){let t=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let r=n.depth,i=0,s=0;;--r){let o=n.$from.node(r),l=n.$from.index(r)+i,a=n.$to.indexAfter(r)-s;if(rt;p--)m||r.index(p)>0?(m=!0,u=k.from(r.node(p).copy(u)),d++):a--;let f=k.empty,h=0;for(let p=s,m=!1;p>t;p--)m||i.after(p+1)=0;o--){if(r.size){let l=t[o].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=k.from(t[o].type.create(t[o].attrs,r))}let i=e.start,s=e.end;n.step(new K(i,s,i,s,new S(r,0,0),t.length,!0))}function Dd(n,e,t,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=n.steps.length;n.doc.nodesBetween(e,t,(o,l)=>{let a=typeof i=="function"?i(o):i;if(o.isTextblock&&!o.hasMarkup(r,a)&&Rd(n.doc,n.mapping.slice(s).map(l),r)){let c=null;if(r.schema.linebreakReplacement){let h=r.whitespace=="pre",p=!!r.contentMatch.matchType(r.schema.linebreakReplacement);h&&!p?c=!1:!h&&p&&(c=!0)}c===!1&&ml(n,o,l,s),Ni(n,n.mapping.slice(s).map(l,1),r,void 0,c===null);let u=n.mapping.slice(s),d=u.map(l,1),f=u.map(l+o.nodeSize,1);return n.step(new K(d,f,d+1,f-1,new S(k.from(r.create(a,null,o.marks)),0,0),1,!0)),c===!0&&pl(n,o,l,s),!1}})}function pl(n,e,t,r){e.forEach((i,s)=>{if(i.isText){let o,l=/\r?\n|\r/g;for(;o=l.exec(i.text);){let a=n.mapping.slice(r).map(t+1+s+o.index);n.replaceWith(a,a+1,e.type.schema.linebreakReplacement.create())}}})}function ml(n,e,t,r){e.forEach((i,s)=>{if(i.type==i.type.schema.linebreakReplacement){let o=n.mapping.slice(r).map(t+1+s);n.replaceWith(o,o+1,e.type.schema.text(` +`))}})}function Rd(n,e,t){let r=n.resolve(e),i=r.index();return r.parent.canReplaceWith(i,i+1,t)}function Pd(n,e,t,r,i){let s=n.doc.nodeAt(e);if(!s)throw new RangeError("No node at given position");t||(t=s.type);let o=t.create(r,null,i||s.marks);if(s.isLeaf)return n.replaceWith(e,e+s.nodeSize,o);if(!t.validContent(s.content))throw new RangeError("Invalid content for node type "+t.name);n.step(new K(e,e+s.nodeSize,e+1,e+s.nodeSize-1,new S(k.from(o),0,0),1,!0))}function pe(n,e,t=1,r){let i=n.resolve(e),s=i.depth-t,o=r&&r[r.length-1]||i.parent;if(s<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!o.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let c=i.depth-1,u=t-2;c>s;c--,u--){let d=i.node(c),f=i.index(c);if(d.type.spec.isolating)return!1;let h=d.content.cutByIndex(f,d.childCount),p=r&&r[u+1];p&&(h=h.replaceChild(0,p.type.create(p.attrs)));let m=r&&r[u]||d;if(!d.canReplace(f+1,d.childCount)||!m.type.validContent(h))return!1}let l=i.indexAfter(s),a=r&&r[0];return i.node(s).canReplaceWith(l,l,a?a.type:i.node(s+1).type)}function Ld(n,e,t=1,r){let i=n.doc.resolve(e),s=k.empty,o=k.empty;for(let l=i.depth,a=i.depth-t,c=t-1;l>a;l--,c--){s=k.from(i.node(l).copy(s));let u=r&&r[c];o=k.from(u?u.type.create(u.attrs,o):i.node(l).copy(o))}n.step(new Q(e,e,new S(s.append(o),t,t),!0))}function ge(n,e){let t=n.resolve(e),r=t.index();return gl(t.nodeBefore,t.nodeAfter)&&t.parent.canReplace(r,r+1)}function zd(n,e){e.content.size||n.type.compatibleContent(e.type);let t=n.contentMatchAt(n.childCount),{linebreakReplacement:r}=n.type.schema;for(let i=0;i0?(s=r.node(i+1),l++,o=r.node(i).maybeChild(l)):(s=r.node(i).maybeChild(l-1),o=r.node(i+1)),s&&!s.isTextblock&&gl(s,o)&&r.node(i).canReplace(l,l+1))return e;if(i==0)break;e=t<0?r.before(i):r.after(i)}}function Bd(n,e,t){let r=null,{linebreakReplacement:i}=n.doc.type.schema,s=n.doc.resolve(e-t),o=s.node().type;if(i&&o.inlineContent){let u=o.whitespace=="pre",d=!!o.contentMatch.matchType(i);u&&!d?r=!1:!u&&d&&(r=!0)}let l=n.steps.length;if(r===!1){let u=n.doc.resolve(e+t);ml(n,u.node(),u.before(),l)}o.inlineContent&&Ni(n,e+t-1,o,s.node().contentMatchAt(s.index()),r==null);let a=n.mapping.slice(l),c=a.map(e-t);if(n.step(new Q(c,a.map(e+t,-1),S.empty,!0)),r===!0){let u=n.doc.resolve(c);pl(n,u.node(),u.before(),n.steps.length)}return n}function Fd(n,e,t){let r=n.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),t))return e;if(r.parentOffset==0)for(let i=r.depth-1;i>=0;i--){let s=r.index(i);if(r.node(i).canReplaceWith(s,s,t))return r.before(i+1);if(s>0)return null}if(r.parentOffset==r.parent.content.size)for(let i=r.depth-1;i>=0;i--){let s=r.indexAfter(i);if(r.node(i).canReplaceWith(s,s,t))return r.after(i+1);if(s=0;o--){let l=o==r.depth?0:r.pos<=(r.start(o+1)+r.end(o+1))/2?-1:1,a=r.index(o)+(l>0?1:0),c=r.node(o),u=!1;if(s==1)u=c.canReplace(a,a,i);else{let d=c.contentMatchAt(a).findWrapping(i.firstChild.type);u=d&&c.canReplaceWith(a,a,d[0])}if(u)return l==0?r.pos:l<0?r.before(o+1):r.after(o+1)}return null}function sn(n,e,t=e,r=S.empty){if(e==t&&!r.size)return null;let i=n.resolve(e),s=n.resolve(t);return yl(i,s,r)?new Q(e,t,r):new Ei(i,s,r).fit()}function yl(n,e,t){return!t.openStart&&!t.openEnd&&n.start()==e.start()&&n.parent.canReplace(n.index(),e.index(),t.content)}var Ei=class{constructor(e,t,r){this.$from=e,this.$to=t,this.unplaced=r,this.frontier=[],this.placed=k.empty;for(let i=0;i<=e.depth;i++){let s=e.node(i);this.frontier.push({type:s.type,match:s.contentMatchAt(e.indexAfter(i))})}for(let i=e.depth;i>0;i--)this.placed=k.from(e.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(e<0?this.$to:r.doc.resolve(e));if(!i)return null;let s=this.placed,o=r.depth,l=i.depth;for(;o&&l&&s.childCount==1;)s=s.firstChild.content,o--,l--;let a=new S(s,o,l);return e>-1?new K(r.pos,e,this.$to.pos,this.$to.end(),a,t):a.size||r.pos!=this.$to.pos?new Q(r.pos,i.pos,a):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,r=0,i=this.unplaced.openEnd;r1&&(i=0),s.type.spec.isolating&&i<=r){e=r;break}t=s.content}for(let t=1;t<=2;t++)for(let r=t==1?e:this.unplaced.openStart;r>=0;r--){let i,s=null;r?(s=Ci(this.unplaced.content,r-1).firstChild,i=s.content):i=this.unplaced.content;let o=i.firstChild;for(let l=this.depth;l>=0;l--){let{type:a,match:c}=this.frontier[l],u,d=null;if(t==1&&(o?c.matchType(o.type)||(d=c.fillBefore(k.from(o),!1)):s&&a.compatibleContent(s.type)))return{sliceDepth:r,frontierDepth:l,parent:s,inject:d};if(t==2&&o&&(u=c.findWrapping(o.type)))return{sliceDepth:r,frontierDepth:l,parent:s,wrap:u};if(s&&c.matchType(s.type))break}}}openMore(){let{content:e,openStart:t,openEnd:r}=this.unplaced,i=Ci(e,t);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new S(e,t+1,Math.max(r,i.size+t>=e.size-r?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:r}=this.unplaced,i=Ci(e,t);if(i.childCount<=1&&t>0){let s=e.size-t<=t+i.size;this.unplaced=new S(Qt(e,t-1,1),t-1,s?t-1:r)}else this.unplaced=new S(Qt(e,t,1),t,r)}placeNodes({sliceDepth:e,frontierDepth:t,parent:r,inject:i,wrap:s}){for(;this.depth>t;)this.closeFrontierNode();if(s)for(let m=0;m1||a==0||m.content.size)&&(d=g,u.push(kl(m.mark(f.allowedMarks(m.marks)),c==1?a:0,c==l.childCount?h:-1)))}let p=c==l.childCount;p||(h=-1),this.placed=Zt(this.placed,t,k.from(u)),this.frontier[t].match=d,p&&h<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,g=l;m1&&i==this.$to.end(--r);)++i;return i}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:r,type:i}=this.frontier[t],s=t=0;l--){let{match:a,type:c}=this.frontier[l],u=vi(e,l,c,a,!0);if(!u||u.childCount)continue e}return{depth:t,fit:o,move:s?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=Zt(this.placed,t.depth,t.fit)),e=t.move;for(let r=t.depth+1;r<=e.depth;r++){let i=e.node(r),s=i.type.contentMatch.fillBefore(i.content,!0,e.index(r));this.openFrontierNode(i.type,i.attrs,s)}return e}openFrontierNode(e,t=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=Zt(this.placed,this.depth,k.from(e.create(t,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(k.empty,!0);t.childCount&&(this.placed=Zt(this.placed,this.frontier.length,t))}};function Qt(n,e,t){return e==0?n.cutByIndex(t,n.childCount):n.replaceChild(0,n.firstChild.copy(Qt(n.firstChild.content,e-1,t)))}function Zt(n,e,t){return e==0?n.append(t):n.replaceChild(n.childCount-1,n.lastChild.copy(Zt(n.lastChild.content,e-1,t)))}function Ci(n,e){for(let t=0;t1&&(r=r.replaceChild(0,kl(r.firstChild,e-1,r.childCount==1?t-1:0))),e>0&&(r=n.type.contentMatch.fillBefore(r).append(r),t<=0&&(r=r.append(n.type.contentMatch.matchFragment(r).fillBefore(k.empty,!0)))),n.copy(r)}function vi(n,e,t,r,i){let s=n.node(e),o=i?n.indexAfter(e):n.index(e);if(o==s.childCount&&!t.compatibleContent(s.type))return null;let l=r.fillBefore(s.content,!0,o);return l&&!Hd(t,s.content,o)?l:null}function Hd(n,e,t){for(let r=t;r0;f--,h--){let p=i.node(f).type.spec;if(p.defining||p.definingAsContext||p.isolating)break;o.indexOf(f)>-1?l=f:i.before(f)==h&&o.splice(1,0,-f)}let a=o.indexOf(l),c=[],u=r.openStart;for(let f=r.content,h=0;;h++){let p=f.firstChild;if(c.push(p),h==r.openStart)break;f=p.content}for(let f=u-1;f>=0;f--){let h=c[f],p=$d(h.type);if(p&&!h.sameMarkup(i.node(Math.abs(l)-1)))u=f;else if(p||!h.type.isTextblock)break}for(let f=r.openStart;f>=0;f--){let h=(f+u+1)%(r.openStart+1),p=c[h];if(p)for(let m=0;m=0&&(n.replace(e,t,r),!(n.steps.length>d));f--){let h=o[f];h<0||(e=i.before(h),t=s.after(h))}}function bl(n,e,t,r,i){if(er){let s=i.contentMatchAt(0),o=s.fillBefore(n).append(n);n=o.append(s.matchFragment(o).fillBefore(k.empty,!0))}return n}function Vd(n,e,t,r){if(!r.isInline&&e==t&&n.doc.resolve(e).parent.content.size){let i=Fd(n.doc,e,r.type);i!=null&&(e=t=i)}n.replaceRange(e,t,new S(k.from(r),0,0))}function jd(n,e,t){let r=n.doc.resolve(e),i=n.doc.resolve(t);if(r.parent.isTextblock&&i.parent.isTextblock&&r.start()!=i.start()&&r.parentOffset==0&&i.parentOffset==0){let o=r.sharedDepth(t),l=!1;for(let a=r.depth;a>o;a--)r.node(a).type.spec.isolating&&(l=!0);for(let a=i.depth;a>o;a--)i.node(a).type.spec.isolating&&(l=!0);if(!l){for(let a=r.depth;a>0&&e==r.start(a);a--)e=r.before(a);for(let a=i.depth;a>0&&t==i.start(a);a--)t=i.before(a);r=n.doc.resolve(e),i=n.doc.resolve(t)}}let s=xl(r,i);for(let o=0;o0&&(a||r.node(l-1).canReplace(r.index(l-1),i.indexAfter(l-1))))return n.delete(r.before(l),i.after(l))}for(let o=1;o<=r.depth&&o<=i.depth;o++)if(e-r.start(o)==r.depth-o&&t>r.end(o)&&i.end(o)-t!=i.depth-o&&r.start(o-1)==i.start(o-1)&&r.node(o-1).canReplace(r.index(o-1),i.index(o-1)))return n.delete(r.before(o),t);n.delete(e,t)}function xl(n,e){let t=[],r=Math.min(n.depth,e.depth);for(let i=r;i>=0;i--){let s=n.start(i);if(se.pos+(e.depth-i)||n.node(i).type.spec.isolating||e.node(i).type.spec.isolating)break;(s==e.start(i)||i==n.depth&&i==e.depth&&n.parent.inlineContent&&e.parent.inlineContent&&i&&e.start(i-1)==s-1)&&t.push(i)}return t}var Vn=class n extends G{constructor(e,t,r){super(),this.pos=e,this.attr=t,this.value=r}apply(e){let t=e.nodeAt(this.pos);if(!t)return X.fail("No node at attribute step's position");let r=Object.create(null);for(let s in t.attrs)r[s]=t.attrs[s];r[this.attr]=this.value;let i=t.type.create(r,null,t.marks);return X.fromReplace(e,this.pos,this.pos+1,new S(k.from(i),0,t.isLeaf?0:1))}getMap(){return ze.empty}invert(e){return new n(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new n(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.pos!="number"||typeof t.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new n(t.pos,t.attr,t.value)}};G.jsonID("attr",Vn);var jn=class n extends G{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let i in e.attrs)t[i]=e.attrs[i];t[this.attr]=this.value;let r=e.type.create(t,e.content,e.marks);return X.ok(r)}getMap(){return ze.empty}invert(e){return new n(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new n(t.attr,t.value)}};G.jsonID("docAttr",jn);var It=class extends Error{};It=function n(e){let t=Error.call(this,e);return t.__proto__=n.prototype,t};It.prototype=Object.create(Error.prototype);It.prototype.constructor=It;It.prototype.name="TransformError";var Dt=class{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new tn}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new It(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}changedRange(){let e=1e9,t=-1e9;for(let r=0;r{e=Math.min(e,l),t=Math.max(t,a)})}return e==1e9?null:{from:e,to:t}}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,r=S.empty){let i=sn(this.doc,e,t,r);return i&&this.step(i),this}replaceWith(e,t,r){return this.replace(e,t,new S(k.from(r),0,0))}delete(e,t){return this.replace(e,t,S.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,r){return _d(this,e,t,r),this}replaceRangeWith(e,t,r){return Vd(this,e,t,r),this}deleteRange(e,t){return jd(this,e,t),this}lift(e,t){return Ad(this,e,t),this}join(e,t=1){return Bd(this,e,t),this}wrap(e,t){return Id(this,e,t),this}setBlockType(e,t=e,r,i=null){return Dd(this,e,t,r,i),this}setNodeMarkup(e,t,r=null,i){return Pd(this,e,t,r,i),this}setNodeAttribute(e,t,r){return this.step(new Vn(e,t,r)),this}setDocAttribute(e,t){return this.step(new jn(e,t)),this}addNodeMark(e,t){return this.step(new rn(e,t)),this}removeNodeMark(e,t){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(t instanceof B)t.isInSet(r.marks)&&this.step(new Ot(e,t));else{let i=r.marks,s,o=[];for(;s=t.isInSet(i);)o.push(new Ot(e,s)),i=s.removeFromSet(i);for(let l=o.length-1;l>=0;l--)this.step(o[l])}return this}split(e,t=1,r){return Ld(this,e,t,r),this}addMark(e,t,r){return vd(this,e,t,r),this}removeMark(e,t,r){return Td(this,e,t,r),this}clearIncompatible(e,t,r){return Ni(this,e,t,r),this}};var Oi=Object.create(null),N=class{constructor(e,t,r){this.$anchor=e,this.$head=t,this.ranges=r||[new Un(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t=0;s--){let o=t<0?Pt(e.node(0),e.node(s),e.before(s+1),e.index(s),t,r):Pt(e.node(0),e.node(s),e.after(s+1),e.index(s)+1,t,r);if(o)return o}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new ae(e.node(0))}static atStart(e){return Pt(e,e,0,0,1)||new ae(e)}static atEnd(e){return Pt(e,e,e.content.size,e.childCount,-1)||new ae(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=Oi[t.type];if(!r)throw new RangeError(`No selection type ${t.type} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in Oi)throw new RangeError("Duplicate use of selection JSON ID "+e);return Oi[e]=t,t.prototype.jsonID=e,t}getBookmark(){return E.between(this.$anchor,this.$head).getBookmark()}};N.prototype.visible=!0;var Un=class{constructor(e,t){this.$from=e,this.$to=t}},Sl=!1;function Ml(n){!Sl&&!n.parent.inlineContent&&(Sl=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+n.parent.type.name+")"))}var E=class n extends N{constructor(e,t=e){Ml(e),Ml(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let r=e.resolve(t.map(this.head));if(!r.parent.inlineContent)return N.near(r);let i=e.resolve(t.map(this.anchor));return new n(i.parent.inlineContent?i:r,r)}replace(e,t=S.empty){if(super.replace(e,t),t==S.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof n&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Jn(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if(typeof t.anchor!="number"||typeof t.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new n(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,r=t){let i=e.resolve(t);return new this(i,r==t?i:e.resolve(r))}static between(e,t,r){let i=e.pos-t.pos;if((!r||i)&&(r=i>=0?1:-1),!t.parent.inlineContent){let s=N.findFrom(t,r,!0)||N.findFrom(t,-r,!0);if(s)t=s.$head;else return N.near(t,r)}return e.parent.inlineContent||(i==0?e=t:(e=(N.findFrom(e,-r,!0)||N.findFrom(e,r,!0)).$anchor,e.pos0?0:1);i>0?o=0;o+=i){let l=e.child(o);if(l.isAtom){if(!s&&M.isSelectable(l))return M.create(n,t-(i<0?l.nodeSize:0))}else{let a=Pt(n,l,t+i,i<0?l.childCount:0,i,s);if(a)return a}t+=l.nodeSize*i}return null}function wl(n,e,t){let r=n.steps.length-1;if(r{o==null&&(o=u)}),n.setSelection(N.near(n.doc.resolve(o),t))}var Cl=1,Kn=2,vl=4,Ri=class extends Dt{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor0}setStoredMarks(e){return this.storedMarks=e,this.updated|=Kn,this}ensureMarks(e){return B.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Kn)>0}addStep(e,t){super.addStep(e,t),this.updated=this.updated&~Kn,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let r=this.selection;return t&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||B.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,r){let i=this.doc.type.schema;if(t==null)return e?this.replaceSelectionWith(i.text(e),!0):this.deleteSelection();{if(r==null&&(r=t),!e)return this.deleteRange(t,r);let s=this.storedMarks;if(!s){let o=this.doc.resolve(t);s=r==t?o.marks():o.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(t,r,i.text(e,s)),!this.selection.empty&&this.selection.to==t+e.length&&this.setSelection(N.near(this.selection.$to)),this}}setMeta(e,t){return this.meta[typeof e=="string"?e:e.key]=t,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=vl,this}get scrolledIntoView(){return(this.updated&vl)>0}};function Tl(n,e){return!e||!n?n:n.bind(e)}var ft=class{constructor(e,t,r){this.name=e,this.init=Tl(t.init,r),this.apply=Tl(t.apply,r)}},Kd=[new ft("doc",{init(n){return n.doc||n.schema.topNodeType.createAndFill()},apply(n){return n.doc}}),new ft("selection",{init(n,e){return n.selection||N.atStart(e.doc)},apply(n){return n.selection}}),new ft("storedMarks",{init(n){return n.storedMarks||null},apply(n,e,t,r){return r.selection.$cursor?n.storedMarks:null}}),new ft("scrollToSelection",{init(){return 0},apply(n,e){return n.scrolledIntoView?e+1:e}})],on=class{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=Kd.slice(),t&&t.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new ft(r.key,r.spec.state,r))})}},qn=class n{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let r=0;rr.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=e[r],s=i.spec.state;s&&s.toJSON&&(t[r]=s.toJSON.call(i,this[i.key]))}return t}static fromJSON(e,t,r){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let i=new on(e.schema,e.plugins),s=new n(i);return i.fields.forEach(o=>{if(o.name=="doc")s.doc=de.fromJSON(e.schema,t.doc);else if(o.name=="selection")s.selection=N.fromJSON(s.doc,t.selection);else if(o.name=="storedMarks")t.storedMarks&&(s.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let l in r){let a=r[l],c=a.spec.state;if(a.key==o.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(t,l)){s[o.name]=c.fromJSON.call(a,e,t[l],s);return}}s[o.name]=o.init(e,s)}}),s}};function El(n,e,t){for(let r in n){let i=n[r];i instanceof Function?i=i.bind(e):r=="handleDOMEvents"&&(i=El(i,e,{})),t[r]=i}return t}var O=class{constructor(e){this.spec=e,this.props={},e.props&&El(e.props,this,this.props),this.key=e.key?e.key.key:Al("plugin")}getState(e){return e[this.key]}},Ii=Object.create(null);function Al(n){return n in Ii?n+"$"+ ++Ii[n]:(Ii[n]=0,n+"$")}var P=class{constructor(e="key"){this.key=Al(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}};var Gn=(n,e)=>n.selection.empty?!1:(e&&e(n.tr.deleteSelection().scrollIntoView()),!0);function Ol(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("backward",n):t.parentOffset>0)?null:t}var Li=(n,e,t)=>{let r=Ol(n,t);if(!r)return!1;let i=Bi(r);if(!i){let o=r.blockRange(),l=o&&Fe(o);return l==null?!1:(e&&e(n.tr.lift(o,l).scrollIntoView()),!0)}let s=i.nodeBefore;if(Hl(n,i,e,-1))return!0;if(r.parent.content.size==0&&(Lt(s,"end")||M.isSelectable(s)))for(let o=r.depth;;o--){let l=sn(n.doc,r.before(o),r.after(o),S.empty);if(l&&l.slice.size1)break}return s.isAtom&&i.depth==r.depth-1?(e&&e(n.tr.delete(i.pos-s.nodeSize,i.pos).scrollIntoView()),!0):!1},Il=(n,e,t)=>{let r=Ol(n,t);if(!r)return!1;let i=Bi(r);return i?Rl(n,i,e):!1},Dl=(n,e,t)=>{let r=Pl(n,t);if(!r)return!1;let i=$i(r);return i?Rl(n,i,e):!1};function Rl(n,e,t){let r=e.nodeBefore,i=r,s=e.pos-1;for(;!i.isTextblock;s--){if(i.type.spec.isolating)return!1;let u=i.lastChild;if(!u)return!1;i=u}let o=e.nodeAfter,l=o,a=e.pos+1;for(;!l.isTextblock;a++){if(l.type.spec.isolating)return!1;let u=l.firstChild;if(!u)return!1;l=u}let c=sn(n.doc,s,a,S.empty);if(!c||c.from!=s||c instanceof Q&&c.slice.size>=a-s)return!1;if(t){let u=n.tr.step(c);u.setSelection(E.create(u.doc,s)),t(u.scrollIntoView())}return!0}function Lt(n,e,t=!1){for(let r=n;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(t&&r.childCount!=1)return!1}return!1}var zi=(n,e,t)=>{let{$head:r,empty:i}=n.selection,s=r;if(!i)return!1;if(r.parent.isTextblock){if(t?!t.endOfTextblock("backward",n):r.parentOffset>0)return!1;s=Bi(r)}let o=s&&s.nodeBefore;return!o||!M.isSelectable(o)?!1:(e&&e(n.tr.setSelection(M.create(n.doc,s.pos-o.nodeSize)).scrollIntoView()),!0)};function Bi(n){if(!n.parent.type.spec.isolating)for(let e=n.depth-1;e>=0;e--){if(n.index(e)>0)return n.doc.resolve(n.before(e+1));if(n.node(e).type.spec.isolating)break}return null}function Pl(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("forward",n):t.parentOffset{let r=Pl(n,t);if(!r)return!1;let i=$i(r);if(!i)return!1;let s=i.nodeAfter;if(Hl(n,i,e,1))return!0;if(r.parent.content.size==0&&(Lt(s,"start")||M.isSelectable(s))){let o=sn(n.doc,r.before(),r.after(),S.empty);if(o&&o.slice.size{let{$head:r,empty:i}=n.selection,s=r;if(!i)return!1;if(r.parent.isTextblock){if(t?!t.endOfTextblock("forward",n):r.parentOffset=0;e--){let t=n.node(e);if(n.index(e)+1{let t=n.selection,r=t instanceof M,i;if(r){if(t.node.isTextblock||!ge(n.doc,t.from))return!1;i=t.from}else if(i=dt(n.doc,t.from,-1),i==null)return!1;if(e){let s=n.tr.join(i);r&&s.setSelection(M.create(s.doc,i-n.doc.resolve(i).nodeBefore.nodeSize)),e(s.scrollIntoView())}return!0},zl=(n,e)=>{let t=n.selection,r;if(t instanceof M){if(t.node.isTextblock||!ge(n.doc,t.to))return!1;r=t.to}else if(r=dt(n.doc,t.to,1),r==null)return!1;return e&&e(n.tr.join(r).scrollIntoView()),!0},Bl=(n,e)=>{let{$from:t,$to:r}=n.selection,i=t.blockRange(r),s=i&&Fe(i);return s==null?!1:(e&&e(n.tr.lift(i,s).scrollIntoView()),!0)},_i=(n,e)=>{let{$head:t,$anchor:r}=n.selection;return!t.parent.type.spec.code||!t.sameParent(r)?!1:(e&&e(n.tr.insertText(` +`).scrollIntoView()),!0)};function Vi(n){for(let e=0;e{let{$head:t,$anchor:r}=n.selection;if(!t.parent.type.spec.code||!t.sameParent(r))return!1;let i=t.node(-1),s=t.indexAfter(-1),o=Vi(i.contentMatchAt(s));if(!o||!i.canReplaceWith(s,s,o))return!1;if(e){let l=t.after(),a=n.tr.replaceWith(l,l,o.createAndFill());a.setSelection(N.near(a.doc.resolve(l),1)),e(a.scrollIntoView())}return!0},Wi=(n,e)=>{let t=n.selection,{$from:r,$to:i}=t;if(t instanceof ae||r.parent.inlineContent||i.parent.inlineContent)return!1;let s=Vi(i.parent.contentMatchAt(i.indexAfter()));if(!s||!s.isTextblock)return!1;if(e){let o=(!r.parentOffset&&i.index(){let{$cursor:t}=n.selection;if(!t||t.parent.content.size)return!1;if(t.depth>1&&t.after()!=t.end(-1)){let s=t.before();if(pe(n.doc,s))return e&&e(n.tr.split(s).scrollIntoView()),!0}let r=t.blockRange(),i=r&&Fe(r);return i==null?!1:(e&&e(n.tr.lift(r,i).scrollIntoView()),!0)};function Ud(n){return(e,t)=>{let{$from:r,$to:i}=e.selection;if(e.selection instanceof M&&e.selection.node.isBlock)return!r.parentOffset||!pe(e.doc,r.pos)?!1:(t&&t(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let s=[],o,l,a=!1,c=!1;for(let h=r.depth;;h--)if(r.node(h).isBlock){a=r.end(h)==r.pos+(r.depth-h),c=r.start(h)==r.pos-(r.depth-h),l=Vi(r.node(h-1).contentMatchAt(r.indexAfter(h-1)));let m=n&&n(i.parent,a,r);s.unshift(m||(a&&l?{type:l}:null)),o=h;break}else{if(h==1)return!1;s.unshift(null)}let u=e.tr;(e.selection instanceof E||e.selection instanceof ae)&&u.deleteSelection();let d=u.mapping.map(r.pos),f=pe(u.doc,d,s.length,s);if(f||(s[0]=l?{type:l}:null,f=pe(u.doc,d,s.length,s)),!f)return!1;if(u.split(d,s.length,s),!a&&c&&r.node(o).type!=l){let h=u.mapping.map(r.before(o)),p=u.doc.resolve(h);l&&r.node(o-1).canReplaceWith(p.index(),p.index()+1,l)&&u.setNodeMarkup(u.mapping.map(r.before(o)),l)}return t&&t(u.scrollIntoView()),!0}}var Jd=Ud();var Fl=(n,e)=>{let{$from:t,to:r}=n.selection,i,s=t.sharedDepth(r);return s==0?!1:(i=t.before(s),e&&e(n.tr.setSelection(M.create(n.doc,i))),!0)},qd=(n,e)=>(e&&e(n.tr.setSelection(new ae(n.doc))),!0);function Gd(n,e,t){let r=e.nodeBefore,i=e.nodeAfter,s=e.index();return!r||!i||!r.type.compatibleContent(i.type)?!1:!r.content.size&&e.parent.canReplace(s-1,s)?(t&&t(n.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(s,s+1)||!(i.isTextblock||ge(n.doc,e.pos))?!1:(t&&t(n.tr.join(e.pos).scrollIntoView()),!0)}function Hl(n,e,t,r){let i=e.nodeBefore,s=e.nodeAfter,o,l,a=i.type.spec.isolating||s.type.spec.isolating;if(!a&&Gd(n,e,t))return!0;let c=!a&&e.parent.canReplace(e.index(),e.index()+1);if(c&&(o=(l=i.contentMatchAt(i.childCount)).findWrapping(s.type))&&l.matchType(o[0]||s.type).validEnd){if(t){let h=e.pos+s.nodeSize,p=k.empty;for(let y=o.length-1;y>=0;y--)p=k.from(o[y].create(null,p));p=k.from(i.copy(p));let m=n.tr.step(new K(e.pos-1,h,e.pos,h,new S(p,1,0),o.length,!0)),g=m.doc.resolve(h+2*o.length);g.nodeAfter&&g.nodeAfter.type==i.type&&ge(m.doc,g.pos)&&m.join(g.pos),t(m.scrollIntoView())}return!0}let u=s.type.spec.isolating||r>0&&a?null:N.findFrom(e,1),d=u&&u.$from.blockRange(u.$to),f=d&&Fe(d);if(f!=null&&f>=e.depth)return t&&t(n.tr.lift(d,f).scrollIntoView()),!0;if(c&&Lt(s,"start",!0)&&Lt(i,"end")){let h=i,p=[];for(;p.push(h),!h.isTextblock;)h=h.lastChild;let m=s,g=1;for(;!m.isTextblock;m=m.firstChild)g++;if(h.canReplace(h.childCount,h.childCount,m.content)){if(t){let y=k.empty;for(let C=p.length-1;C>=0;C--)y=k.from(p[C].copy(y));let x=n.tr.step(new K(e.pos-p.length,e.pos+s.nodeSize,e.pos+g,e.pos+s.nodeSize-g,new S(y,p.length,0),0,!0));t(x.scrollIntoView())}return!0}}return!1}function $l(n){return function(e,t){let r=e.selection,i=n<0?r.$from:r.$to,s=i.depth;for(;i.node(s).isInline;){if(!s)return!1;s--}return i.node(s).isTextblock?(t&&t(e.tr.setSelection(E.create(e.doc,n<0?i.start(s):i.end(s)))),!0):!1}}var Ui=$l(-1),Ji=$l(1);function _l(n,e=null){return function(t,r){let{$from:i,$to:s}=t.selection,o=i.blockRange(s),l=o&&Rt(o,n,e);return l?(r&&r(t.tr.wrap(o,l).scrollIntoView()),!0):!1}}function qi(n,e=null){return function(t,r){let i=!1;for(let s=0;s{if(i)return!1;if(!(!a.isTextblock||a.hasMarkup(n,e)))if(a.type==n)i=!0;else{let u=t.doc.resolve(c),d=u.index();i=u.parent.canReplaceWith(d,d+1,n)}})}if(!i)return!1;if(r){let s=t.tr;for(let o=0;o=2&&e.$from.node(e.depth-1).type.compatibleContent(t)&&e.startIndex==0){if(e.$from.index(e.depth-1)==0)return!1;let a=o.resolve(e.start-2);s=new ct(a,a,e.depth),e.endIndex=0;u--)s=k.from(t[u].type.create(t[u].attrs,s));n.step(new K(e.start-(r?2:0),e.end,e.start,e.end,new S(s,0,0),t.length,!0));let o=0;for(let u=0;uo.childCount>0&&o.firstChild.type==n);return s?t?r.node(s.depth-1).type==n?Zd(e,t,n,s):ef(e,t,s):!0:!1}}function Zd(n,e,t,r){let i=n.tr,s=r.end,o=r.$to.end(r.depth);sm;p--)h-=i.child(p).nodeSize,r.delete(h-1,h+1);let s=r.doc.resolve(t.start),o=s.nodeAfter;if(r.mapping.map(t.end)!=t.start+s.nodeAfter.nodeSize)return!1;let l=t.startIndex==0,a=t.endIndex==i.childCount,c=s.node(-1),u=s.index(-1);if(!c.canReplace(u+(l?0:1),u+1,o.content.append(a?k.empty:k.from(i))))return!1;let d=s.pos,f=d+o.nodeSize;return r.step(new K(d-(l?1:0),f+(a?1:0),d+1,f-1,new S((l?k.empty:k.from(i.copy(k.empty))).append(a?k.empty:k.from(i.copy(k.empty))),l?0:1,a?0:1),l?0:1)),e(r.scrollIntoView()),!0}function Wl(n){return function(e,t){let{$from:r,$to:i}=e.selection,s=r.blockRange(i,c=>c.childCount>0&&c.firstChild.type==n);if(!s)return!1;let o=s.startIndex;if(o==0)return!1;let l=s.parent,a=l.child(o-1);if(a.type!=n)return!1;if(t){let c=a.lastChild&&a.lastChild.type==l.type,u=k.from(c?n.create():null),d=new S(k.from(n.create(null,k.from(l.type.create(null,u)))),c?3:1,0),f=s.start,h=s.end;t(e.tr.step(new K(f-(c?3:1),h,f,h,d,1,!0)).scrollIntoView())}return!0}}var Z=function(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e},$t=function(n){let e=n.assignedSlot||n.parentNode;return e&&e.nodeType==11?e.host:e},ts=null,$e=function(n,e,t){let r=ts||(ts=document.createRange());return r.setEnd(n,t==null?n.nodeValue.length:t),r.setStart(n,e||0),r},tf=function(){ts=null},bt=function(n,e,t,r){return t&&(Kl(n,e,t,r,-1)||Kl(n,e,t,r,1))},nf=/^(img|br|input|textarea|hr)$/i;function Kl(n,e,t,r,i){for(var s;;){if(n==t&&e==r)return!0;if(e==(i<0?0:ke(n))){let o=n.parentNode;if(!o||o.nodeType!=1||pn(n)||nf.test(n.nodeName)||n.contentEditable=="false")return!1;e=Z(n)+(i<0?0:1),n=o}else if(n.nodeType==1){let o=n.childNodes[e+(i<0?-1:0)];if(o.nodeType==1&&o.contentEditable=="false")if(!((s=o.pmViewDesc)===null||s===void 0)&&s.ignoreForSelection)e+=i;else return!1;else n=o,e=i<0?ke(n):0}else return!1}}function ke(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function rf(n,e){for(;;){if(n.nodeType==3&&e)return n;if(n.nodeType==1&&e>0){if(n.contentEditable=="false")return null;n=n.childNodes[e-1],e=ke(n)}else if(n.parentNode&&!pn(n))e=Z(n),n=n.parentNode;else return null}}function sf(n,e){for(;;){if(n.nodeType==3&&e2),ye=_t||(Te?/Mac/.test(Te.platform):!1),Ta=Te?/Win/.test(Te.platform):!1,_e=/Android \d/.test(tt),mn=!!Ul&&"webkitFontSmoothing"in Ul.documentElement.style,cf=mn?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function uf(n){let e=n.defaultView&&n.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:n.documentElement.clientWidth,top:0,bottom:n.documentElement.clientHeight}}function He(n,e){return typeof n=="number"?n:n[e]}function df(n){let e=n.getBoundingClientRect(),t=e.width/n.offsetWidth||1,r=e.height/n.offsetHeight||1;return{left:e.left,right:e.left+n.clientWidth*t,top:e.top,bottom:e.top+n.clientHeight*r}}function Jl(n,e,t){let r=n.someProp("scrollThreshold")||0,i=n.someProp("scrollMargin")||5,s=n.dom.ownerDocument;for(let o=t||n.dom;o;){if(o.nodeType!=1){o=$t(o);continue}let l=o,a=l==s.body,c=a?uf(s):df(l),u=0,d=0;if(e.topc.bottom-He(r,"bottom")&&(d=e.bottom-e.top>c.bottom-c.top?e.top+He(i,"top")-c.top:e.bottom-c.bottom+He(i,"bottom")),e.leftc.right-He(r,"right")&&(u=e.right-c.right+He(i,"right")),u||d)if(a)s.defaultView.scrollBy(u,d);else{let h=l.scrollLeft,p=l.scrollTop;d&&(l.scrollTop+=d),u&&(l.scrollLeft+=u);let m=l.scrollLeft-h,g=l.scrollTop-p;e={left:e.left-m,top:e.top-g,right:e.right-m,bottom:e.bottom-g}}let f=a?"fixed":getComputedStyle(o).position;if(/^(fixed|sticky)$/.test(f))break;o=f=="absolute"?o.offsetParent:$t(o)}}function ff(n){let e=n.dom.getBoundingClientRect(),t=Math.max(0,e.top),r,i;for(let s=(e.left+e.right)/2,o=t+1;o=t-20){r=l,i=a.top;break}}return{refDOM:r,refTop:i,stack:Ea(n.dom)}}function Ea(n){let e=[],t=n.ownerDocument;for(let r=n;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),n!=t);r=$t(r));return e}function hf({refDOM:n,refTop:e,stack:t}){let r=n?n.getBoundingClientRect().top:0;Aa(t,r==0?0:r-e)}function Aa(n,e){for(let t=0;t=l){o=Math.max(p.bottom,o),l=Math.min(p.top,l);let m=p.left>e.left?p.left-e.left:p.right=(p.left+p.right)/2?1:0));continue}}else p.top>e.top&&!a&&p.left<=e.left&&p.right>=e.left&&(a=u,c={left:Math.max(p.left,Math.min(p.right,e.left)),top:p.top});!t&&(e.left>=p.right&&e.top>=p.top||e.left>=p.left&&e.top>=p.bottom)&&(s=d+1)}}return!t&&a&&(t=a,i=c,r=0),t&&t.nodeType==3?mf(t,i):!t||r&&t.nodeType==1?{node:n,offset:s}:Na(t,i)}function mf(n,e){let t=n.nodeValue.length,r=document.createRange(),i;for(let s=0;s=(o.left+o.right)/2?1:0)};break}}return r.detach(),i||{node:n,offset:0}}function xs(n,e){return n.left>=e.left-1&&n.left<=e.right+1&&n.top>=e.top-1&&n.top<=e.bottom+1}function gf(n,e){let t=n.parentNode;return t&&/^li$/i.test(t.nodeName)&&e.left(o.left+o.right)/2?1:-1}return n.docView.posFromDOM(r,i,s)}function kf(n,e,t,r){let i=-1;for(let s=e,o=!1;s!=n.dom;){let l=n.docView.nearestDesc(s,!0),a;if(!l)return null;if(l.dom.nodeType==1&&(l.node.isBlock&&l.parent||!l.contentDOM)&&((a=l.dom.getBoundingClientRect()).width||a.height)&&(l.node.isBlock&&l.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(l.dom.nodeName)&&(!o&&a.left>r.left||a.top>r.top?i=l.posBefore:(!o&&a.right-1?i:n.docView.posFromDOM(e,t,-1)}function Oa(n,e,t){let r=n.childNodes.length;if(r&&t.tope.top&&i++}let c;mn&&i&&r.nodeType==1&&(c=r.childNodes[i-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=e.top&&i--,r==n.dom&&i==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?l=n.state.doc.content.size:(i==0||r.nodeType!=1||r.childNodes[i-1].nodeName!="BR")&&(l=kf(n,r,i,e))}l==null&&(l=yf(n,o,e));let a=n.docView.nearestDesc(o,!0);return{pos:l,inside:a?a.posAtStart-a.border:-1}}function ql(n){return n.top=0&&i==r.nodeValue.length?(a--,u=1):t<0?a--:c++,ln(Ye($e(r,a,c),u),u<0)}if(!n.state.doc.resolve(e-(s||0)).parent.inlineContent){if(s==null&&i&&(t<0||i==ke(r))){let a=r.childNodes[i-1];if(a.nodeType==1)return Yi(a.getBoundingClientRect(),!1)}if(s==null&&i=0)}if(s==null&&i&&(t<0||i==ke(r))){let a=r.childNodes[i-1],c=a.nodeType==3?$e(a,ke(a)-(o?0:1)):a.nodeType==1&&(a.nodeName!="BR"||!a.nextSibling)?a:null;if(c)return ln(Ye(c,1),!1)}if(s==null&&i=0)}function ln(n,e){if(n.width==0)return n;let t=e?n.left:n.right;return{top:n.top,bottom:n.bottom,left:t,right:t}}function Yi(n,e){if(n.height==0)return n;let t=e?n.top:n.bottom;return{top:t,bottom:t,left:n.left,right:n.right}}function Da(n,e,t){let r=n.state,i=n.root.activeElement;r!=e&&n.updateState(e),i!=n.dom&&n.focus();try{return t()}finally{r!=e&&n.updateState(r),i!=n.dom&&i&&i.focus()}}function Sf(n,e,t){let r=e.selection,i=t=="up"?r.$from:r.$to;return Da(n,e,()=>{let{node:s}=n.docView.domFromPos(i.pos,t=="up"?-1:1);for(;;){let l=n.docView.nearestDesc(s,!0);if(!l)break;if(l.node.isBlock){s=l.contentDOM||l.dom;break}s=l.dom.parentNode}let o=Ia(n,i.pos,1);for(let l=s.firstChild;l;l=l.nextSibling){let a;if(l.nodeType==1)a=l.getClientRects();else if(l.nodeType==3)a=$e(l,0,l.nodeValue.length).getClientRects();else continue;for(let c=0;cu.top+1&&(t=="up"?o.top-u.top>(u.bottom-o.top)*2:u.bottom-o.bottom>(o.bottom-u.top)*2))return!1}}return!0})}var Mf=/[\u0590-\u08ac]/;function wf(n,e,t){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,s=!i,o=i==r.parent.content.size,l=n.domSelection();return l?!Mf.test(r.parent.textContent)||!l.modify?t=="left"||t=="backward"?s:o:Da(n,e,()=>{let{focusNode:a,focusOffset:c,anchorNode:u,anchorOffset:d}=n.domSelectionRange(),f=l.caretBidiLevel;l.modify("move",t,"character");let h=r.depth?n.docView.domAfterPos(r.before()):n.dom,{focusNode:p,focusOffset:m}=n.domSelectionRange(),g=p&&!h.contains(p.nodeType==1?p:p.parentNode)||a==p&&c==m;try{l.collapse(u,d),a&&(a!=u||c!=d)&&l.extend&&l.extend(a,c)}catch{}return f!=null&&(l.caretBidiLevel=f),g}):r.pos==r.start()||r.pos==r.end()}var Gl=null,Yl=null,Xl=!1;function Cf(n,e,t){return Gl==e&&Yl==t?Xl:(Gl=e,Yl=t,Xl=t=="up"||t=="down"?Sf(n,e,t):wf(n,e,t))}var xe=0,Ql=1,pt=2,Ee=3,xt=class{constructor(e,t,r,i){this.parent=e,this.children=t,this.dom=r,this.contentDOM=i,this.dirty=xe,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;tZ(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(t==0)for(let s=e;;s=s.parentNode){if(s==this.dom){i=!1;break}if(s.previousSibling)break}if(i==null&&t==e.childNodes.length)for(let s=e;;s=s.parentNode){if(s==this.dom){i=!0;break}if(s.nextSibling)break}}return(i==null?r>0:i)?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let r=!0,i=e;i;i=i.parentNode){let s=this.getDesc(i),o;if(s&&(!t||s.node))if(r&&(o=s.nodeDOM)&&!(o.nodeType==1?o.contains(e.nodeType==1?e:e.parentNode):o==e))r=!1;else return s}}getDesc(e){let t=e.pmViewDesc;for(let r=t;r;r=r.parent)if(r==this)return t}posFromDOM(e,t,r){for(let i=e;i;i=i.parentNode){let s=this.getDesc(i);if(s)return s.localPosFromDOM(e,t,r)}return-1}descAt(e){for(let t=0,r=0;te||o instanceof Qn){i=e-s;break}s=l}if(i)return this.children[r].domFromPos(i-this.children[r].border,t);for(let s;r&&!(s=this.children[r-1]).size&&s instanceof Yn&&s.side>=0;r--);if(t<=0){let s,o=!0;for(;s=r?this.children[r-1]:null,!(!s||s.dom.parentNode==this.contentDOM);r--,o=!1);return s&&t&&o&&!s.border&&!s.domAtom?s.domFromPos(s.size,t):{node:this.contentDOM,offset:s?Z(s.dom)+1:0}}else{let s,o=!0;for(;s=r=u&&t<=c-a.border&&a.node&&a.contentDOM&&this.contentDOM.contains(a.contentDOM))return a.parseRange(e,t,u);e=o;for(let d=l;d>0;d--){let f=this.children[d-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){i=Z(f.dom)+1;break}e-=f.size}i==-1&&(i=0)}if(i>-1&&(c>t||l==this.children.length-1)){t=c;for(let u=l+1;up&&ot){let p=l;l=a,a=p}let h=document.createRange();h.setEnd(a.node,a.offset),h.setStart(l.node,l.offset),c.removeAllRanges(),c.addRange(h)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let r=0,i=0;i=r:er){let l=r+s.border,a=o-s.border;if(e>=l&&t<=a){this.dirty=e==r||t==o?pt:Ql,e==l&&t==a&&(s.contentLost||s.dom.parentNode!=this.contentDOM)?s.dirty=Ee:s.markDirty(e-l,t-l);return}else s.dirty=s.dom==s.contentDOM&&s.dom.parentNode==this.contentDOM&&!s.children.length?pt:Ee}r=o}this.dirty=pt}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let r=e==1?pt:Ql;t.dirty{if(!s)return i;if(s.parent)return s.parent.posBeforeChild(s)})),!t.type.spec.raw){if(o.nodeType!=1){let l=document.createElement("span");l.appendChild(o),o=l}o.contentEditable="false",o.classList.add("ProseMirror-widget")}super(e,[],o,null),this.widget=t,this.widget=t,s=this}matchesWidget(e){return this.dirty==xe&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return t?t(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}},ss=class extends xt{constructor(e,t,r,i){super(e,[],t,null),this.textDOM=r,this.text=i}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}},Vt=class n extends xt{constructor(e,t,r,i,s){super(e,[],r,i),this.mark=t,this.spec=s}static create(e,t,r,i){let s=i.nodeViews[t.type.name],o=s&&s(t,i,r);return(!o||!o.dom)&&(o=Le.renderSpec(document,t.type.spec.toDOM(t,r),null,t.attrs)),new n(e,t,o.dom,o.contentDOM||o.dom,o)}parseRule(){return this.dirty&Ee||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=Ee&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),this.dirty!=xe){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty0&&(s=us(s,0,e,r));for(let l=0;l{if(!a)return o;if(a.parent)return a.parent.posBeforeChild(a)},r,i),u=c&&c.dom,d=c&&c.contentDOM;if(t.isText){if(!u)u=document.createTextNode(t.text);else if(u.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else u||({dom:u,contentDOM:d}=Le.renderSpec(document,t.type.spec.toDOM(t),null,t.attrs));!d&&!t.isText&&u.nodeName!="BR"&&(u.hasAttribute("contenteditable")||(u.contentEditable="false"),t.type.spec.draggable&&(u.draggable=!0));let f=u;return u=La(u,r,t),c?a=new ls(e,t,r,i,u,d||null,f,c,s,o+1):t.isText?new Xn(e,t,r,i,u,f,s):new n(e,t,r,i,u,d||null,f,s,o+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let t=this.children.length-1;t>=0;t--){let r=this.children[t];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>k.empty)}return e}matchesNode(e,t,r){return this.dirty==xe&&e.eq(this.node)&&Zn(t,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let r=this.node.inlineContent,i=t,s=e.composing?this.localCompositionInfo(e,t):null,o=s&&s.pos>-1?s:null,l=s&&s.pos<0,a=new cs(this,o&&o.node,e);Af(this.node,this.innerDeco,(c,u,d)=>{c.spec.marks?a.syncToMarks(c.spec.marks,r,e,u):c.type.side>=0&&!d&&a.syncToMarks(u==this.node.childCount?B.none:this.node.child(u).marks,r,e,u),a.placeWidget(c,e,i)},(c,u,d,f)=>{a.syncToMarks(c.marks,r,e,f);let h;a.findNodeMatch(c,u,d,f)||l&&e.state.selection.from>i&&e.state.selection.to-1&&a.updateNodeAt(c,u,d,h,e)||a.updateNextNode(c,u,d,e,f,i)||a.addNode(c,u,d,e,i),i+=c.nodeSize}),a.syncToMarks([],r,e,0),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||this.dirty==pt)&&(o&&this.protectLocalComposition(e,o),Ra(this.contentDOM,this.children,e),_t&&Nf(this.dom))}localCompositionInfo(e,t){let{from:r,to:i}=e.state.selection;if(!(e.state.selection instanceof E)||rt+this.node.content.size)return null;let s=e.input.compositionNode;if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let o=s.nodeValue,l=Of(this.node.content,o,r-t,i-t);return l<0?null:{node:s,pos:l,text:o}}else return{node:s,pos:-1,text:""}}protectLocalComposition(e,{node:t,pos:r,text:i}){if(this.getDesc(t))return;let s=t;for(;s.parentNode!=this.contentDOM;s=s.parentNode){for(;s.previousSibling;)s.parentNode.removeChild(s.previousSibling);for(;s.nextSibling;)s.parentNode.removeChild(s.nextSibling);s.pmViewDesc&&(s.pmViewDesc=void 0)}let o=new ss(this,s,t,i);e.input.compositionNodes.push(o),this.children=us(this.children,r,r+i.length,e,o)}update(e,t,r,i){return this.dirty==Ee||!e.sameMarkup(this.node)?!1:(this.updateInner(e,t,r,i),!0)}updateInner(e,t,r,i){this.updateOuterDeco(t),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=xe}updateOuterDeco(e){if(Zn(e,this.outerDeco))return;let t=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=Pa(this.dom,this.nodeDOM,as(this.outerDeco,this.node,t),as(e,this.node,t)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}};function Zl(n,e,t,r,i){La(r,e,n);let s=new et(void 0,n,e,t,r,r,r,i,0);return s.contentDOM&&s.updateChildren(i,0),s}var Xn=class n extends et{constructor(e,t,r,i,s,o,l){super(e,t,r,i,s,null,o,l,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,r,i){return this.dirty==Ee||this.dirty!=xe&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(t),(this.dirty!=xe||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,i.trackWrites==this.nodeDOM&&(i.trackWrites=null)),this.node=e,this.dirty=xe,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,r){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,t,r){let i=this.node.cut(e,t),s=document.createTextNode(i.text);return new n(this.parent,i,this.outerDeco,this.innerDeco,s,s,r)}markDirty(e,t){super.markDirty(e,t),this.dom!=this.nodeDOM&&(e==0||t==this.nodeDOM.nodeValue.length)&&(this.dirty=Ee)}get domAtom(){return!1}isText(e){return this.node.text==e}},Qn=class extends xt{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==xe&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}},ls=class extends et{constructor(e,t,r,i,s,o,l,a,c,u){super(e,t,r,i,s,o,l,c,u),this.spec=a}update(e,t,r,i){if(this.dirty==Ee)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let s=this.spec.update(e,t,r);return s&&this.updateInner(e,t,r,i),s}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,t,r,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,r,i){this.spec.setSelection?this.spec.setSelection(e,t,r.root):super.setSelection(e,t,r,i)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}};function Ra(n,e,t){let r=n.firstChild,i=!1;for(let s=0;s>1,l=Math.min(o,e.length);for(;s-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{let u=Vt.create(this.top,e[o],t,r);this.top.children.splice(this.index,0,u),this.top=u,this.changed=!0}this.index=0,o++}}findNodeMatch(e,t,r,i){let s=-1,o;if(i>=this.preMatch.index&&(o=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&o.matchesNode(e,t,r))s=this.top.children.indexOf(o,this.index);else for(let l=this.index,a=Math.min(this.top.children.length,l+5);l0;){let l;for(;;)if(r){let c=t.children[r-1];if(c instanceof Vt)t=c,r=c.children.length;else{l=c,r--;break}}else{if(t==e)break e;r=t.parent.children.indexOf(t),t=t.parent}let a=l.node;if(a){if(a!=n.child(i-1))break;--i,s.set(l,i),o.push(l)}}return{index:i,matched:s,matches:o.reverse()}}function Ef(n,e){return n.type.side-e.type.side}function Af(n,e,t,r){let i=e.locals(n),s=0;if(i.length==0){for(let c=0;cs;)l.push(i[o++]);let p=s+f.nodeSize;if(f.isText){let g=p;o!g.inline):l.slice();r(f,m,e.forChild(s,f),h),s=p}}function Nf(n){if(n.nodeName=="UL"||n.nodeName=="OL"){let e=n.style.cssText;n.style.cssText=e+"; list-style: square !important",window.getComputedStyle(n).listStyle,n.style.cssText=e}}function Of(n,e,t,r){for(let i=0,s=0;i=t){if(s>=r&&a.slice(r-e.length-l,r-l)==e)return r-e.length;let c=l=0&&c+e.length+l>=t)return l+c;if(t==r&&a.length>=r+e.length-l&&a.slice(r-l,r-l+e.length)==e)return r}}return-1}function us(n,e,t,r,i){let s=[];for(let o=0,l=0;o=t||u<=e?s.push(a):(ct&&s.push(a.slice(t-c,a.size,r)))}return s}function Ss(n,e=null){let t=n.domSelectionRange(),r=n.state.doc;if(!t.focusNode)return null;let i=n.docView.nearestDesc(t.focusNode),s=i&&i.size==0,o=n.docView.posFromDOM(t.focusNode,t.focusOffset,1);if(o<0)return null;let l=r.resolve(o),a,c;if(or(t)){for(a=o;i&&!i.node;)i=i.parent;let d=i.node;if(i&&d.isAtom&&M.isSelectable(d)&&i.parent&&!(d.isInline&&of(t.focusNode,t.focusOffset,i.dom))){let f=i.posBefore;c=new M(o==f?l:r.resolve(f))}}else{if(t instanceof n.dom.ownerDocument.defaultView.Selection&&t.rangeCount>1){let d=o,f=o;for(let h=0;h{(t.anchorNode!=r||t.anchorOffset!=i)&&(e.removeEventListener("selectionchange",n.input.hideSelectionGuard),setTimeout(()=>{(!za(n)||n.state.selection.visible)&&n.dom.classList.remove("ProseMirror-hideselection")},20))})}function Df(n){let e=n.domSelection();if(!e)return;let t=n.cursorWrapper.dom,r=t.nodeName=="IMG";r?e.collapse(t.parentNode,Z(t)+1):e.collapse(t,0),!r&&!n.state.selection.visible&&fe&&Ze<=11&&(t.disabled=!0,t.disabled=!1)}function Ba(n,e){if(e instanceof M){let t=n.docView.descAt(e.from);t!=n.lastSelectedViewDesc&&(ia(n),t&&t.selectNode(),n.lastSelectedViewDesc=t)}else ia(n)}function ia(n){n.lastSelectedViewDesc&&(n.lastSelectedViewDesc.parent&&n.lastSelectedViewDesc.deselectNode(),n.lastSelectedViewDesc=void 0)}function Ms(n,e,t,r){return n.someProp("createSelectionBetween",i=>i(n,e,t))||E.between(e,t,r)}function sa(n){return n.editable&&!n.hasFocus()?!1:Fa(n)}function Fa(n){let e=n.domSelectionRange();if(!e.anchorNode)return!1;try{return n.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(n.editable||n.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function Rf(n){let e=n.docView.domFromPos(n.state.selection.anchor,0),t=n.domSelectionRange();return bt(e.node,e.offset,t.anchorNode,t.anchorOffset)}function ds(n,e){let{$anchor:t,$head:r}=n.selection,i=e>0?t.max(r):t.min(r),s=i.parent.inlineContent?i.depth?n.doc.resolve(e>0?i.after():i.before()):null:i;return s&&N.findFrom(s,e)}function Xe(n,e){return n.dispatch(n.state.tr.setSelection(e).scrollIntoView()),!0}function oa(n,e,t){let r=n.state.selection;if(r instanceof E)if(t.indexOf("s")>-1){let{$head:i}=r,s=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter;if(!s||s.isText||!s.isLeaf)return!1;let o=n.state.doc.resolve(i.pos+s.nodeSize*(e<0?-1:1));return Xe(n,new E(r.$anchor,o))}else if(r.empty){if(n.endOfTextblock(e>0?"forward":"backward")){let i=ds(n.state,e);return i&&i instanceof M?Xe(n,i):!1}else if(!(ye&&t.indexOf("m")>-1)){let i=r.$head,s=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter,o;if(!s||s.isText)return!1;let l=e<0?i.pos-s.nodeSize:i.pos;return s.isAtom||(o=n.docView.descAt(l))&&!o.contentDOM?M.isSelectable(s)?Xe(n,new M(e<0?n.state.doc.resolve(i.pos-s.nodeSize):i)):mn?Xe(n,new E(n.state.doc.resolve(e<0?l:l+s.nodeSize))):!1:!1}}else return!1;else{if(r instanceof M&&r.node.isInline)return Xe(n,new E(e>0?r.$to:r.$from));{let i=ds(n.state,e);return i?Xe(n,i):!1}}}function er(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function cn(n,e){let t=n.pmViewDesc;return t&&t.size==0&&(e<0||n.nextSibling||n.nodeName!="BR")}function Bt(n,e){return e<0?Pf(n):Lf(n)}function Pf(n){let e=n.domSelectionRange(),t=e.focusNode,r=e.focusOffset;if(!t)return;let i,s,o=!1;for(be&&t.nodeType==1&&r0){if(t.nodeType!=1)break;{let l=t.childNodes[r-1];if(cn(l,-1))i=t,s=--r;else if(l.nodeType==3)t=l,r=t.nodeValue.length;else break}}else{if(Ha(t))break;{let l=t.previousSibling;for(;l&&cn(l,-1);)i=t.parentNode,s=Z(l),l=l.previousSibling;if(l)t=l,r=er(t);else{if(t=t.parentNode,t==n.dom)break;r=0}}}o?fs(n,t,r):i&&fs(n,i,s)}function Lf(n){let e=n.domSelectionRange(),t=e.focusNode,r=e.focusOffset;if(!t)return;let i=er(t),s,o;for(;;)if(r{n.state==i&&Ve(n)},50)}function la(n,e){let t=n.state.doc.resolve(e);if(!(ee||Ta)&&t.parent.inlineContent){let i=n.coordsAtPos(e);if(e>t.start()){let s=n.coordsAtPos(e-1),o=(s.top+s.bottom)/2;if(o>i.top&&o1)return s.lefti.top&&o1)return s.left>i.left?"ltr":"rtl"}}return getComputedStyle(n.dom).direction=="rtl"?"rtl":"ltr"}function aa(n,e,t){let r=n.state.selection;if(r instanceof E&&!r.empty||t.indexOf("s")>-1||ye&&t.indexOf("m")>-1)return!1;let{$from:i,$to:s}=r;if(!i.parent.inlineContent||n.endOfTextblock(e<0?"up":"down")){let o=ds(n.state,e);if(o&&o instanceof M)return Xe(n,o)}if(!i.parent.inlineContent){let o=e<0?i:s,l=r instanceof ae?N.near(o,e):N.findFrom(o,e);return l?Xe(n,l):!1}return!1}function ca(n,e){if(!(n.state.selection instanceof E))return!0;let{$head:t,$anchor:r,empty:i}=n.state.selection;if(!t.sameParent(r))return!0;if(!i)return!1;if(n.endOfTextblock(e>0?"forward":"backward"))return!0;let s=!t.textOffset&&(e<0?t.nodeBefore:t.nodeAfter);if(s&&!s.isText){let o=n.state.tr;return e<0?o.delete(t.pos-s.nodeSize,t.pos):o.delete(t.pos,t.pos+s.nodeSize),n.dispatch(o),!0}return!1}function ua(n,e,t){n.domObserver.stop(),e.contentEditable=t,n.domObserver.start()}function Ff(n){if(!ie||n.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:t}=n.domSelectionRange();if(e&&e.nodeType==1&&t==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;ua(n,r,"true"),setTimeout(()=>ua(n,r,"false"),20)}return!1}function Hf(n){let e="";return n.ctrlKey&&(e+="c"),n.metaKey&&(e+="m"),n.altKey&&(e+="a"),n.shiftKey&&(e+="s"),e}function $f(n,e){let t=e.keyCode,r=Hf(e);if(t==8||ye&&t==72&&r=="c")return ca(n,-1)||Bt(n,-1);if(t==46&&!e.shiftKey||ye&&t==68&&r=="c")return ca(n,1)||Bt(n,1);if(t==13||t==27)return!0;if(t==37||ye&&t==66&&r=="c"){let i=t==37?la(n,n.state.selection.from)=="ltr"?-1:1:-1;return oa(n,i,r)||Bt(n,i)}else if(t==39||ye&&t==70&&r=="c"){let i=t==39?la(n,n.state.selection.from)=="ltr"?1:-1:1;return oa(n,i,r)||Bt(n,i)}else{if(t==38||ye&&t==80&&r=="c")return aa(n,-1,r)||Bt(n,-1);if(t==40||ye&&t==78&&r=="c")return Ff(n)||aa(n,1,r)||Bt(n,1);if(r==(ye?"m":"c")&&(t==66||t==73||t==89||t==90))return!0}return!1}function ws(n,e){n.someProp("transformCopied",h=>{e=h(e,n)});let t=[],{content:r,openStart:i,openEnd:s}=e;for(;i>1&&s>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,s--;let h=r.firstChild;t.push(h.type.name,h.attrs!=h.type.defaultAttrs?h.attrs:null),r=h.content}let o=n.someProp("clipboardSerializer")||Le.fromSchema(n.state.schema),l=Ka(),a=l.createElement("div");a.appendChild(o.serializeFragment(r,{document:l}));let c=a.firstChild,u,d=0;for(;c&&c.nodeType==1&&(u=Wa[c.nodeName.toLowerCase()]);){for(let h=u.length-1;h>=0;h--){let p=l.createElement(u[h]);for(;a.firstChild;)p.appendChild(a.firstChild);a.appendChild(p),d++}c=a.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${i} ${s}${d?` -${d}`:""} ${JSON.stringify(t)}`);let f=n.someProp("clipboardTextSerializer",h=>h(e,n))||e.content.textBetween(0,e.content.size,` -`);return{dom:a,text:f,slice:e}}function Ha(n,e,t,r,i){let s=i.parent.type.spec.code,o,l;if(!t&&!e)return null;let a=!!e&&(r||s||!t);if(a){if(n.someProp("transformPastedText",f=>{e=f(e,s||r,n)}),s)return l=new S(k.from(n.state.schema.text(e.replace(/\r\n?/g,` -`))),0,0),n.someProp("transformPasted",f=>{l=f(l,n,!0)}),l;let d=n.someProp("clipboardTextParser",f=>f(e,i,r,n));if(d)l=d;else{let f=i.marks(),{schema:h}=n.state,p=Le.fromSchema(h);o=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(m=>{let g=o.appendChild(document.createElement("p"));m&&g.appendChild(p.serializeNode(h.text(m,f)))})}}else n.someProp("transformPastedHTML",d=>{t=d(t,n)}),o=Vf(t),mn&&jf(o);let c=o&&o.querySelector("[data-pm-slice]"),u=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let d=+u[3];d>0;d--){let f=o.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;o=f}if(l||(l=(n.someProp("clipboardParser")||n.someProp("domParser")||ve.fromSchema(n.state.schema)).parseSlice(o,{preserveWhitespace:!!(a||u),context:i,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!Hf.test(f.parentNode.nodeName)?{ignore:!0}:null}})),u)l=Wf(ua(l,+u[1],+u[2]),u[4]);else if(l=S.maxOpen($f(l.content,i),!0),l.openStart||l.openEnd){let d=0,f=0;for(let h=l.content.firstChild;d{l=d(l,n,a)}),l}var Hf=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function $f(n,e){if(n.childCount<2)return n;for(let t=e.depth;t>=0;t--){let i=e.node(t).contentMatchAt(e.index(t)),s,o=[];if(n.forEach(l=>{if(!o)return;let a=i.findWrapping(l.type),c;if(!a)return o=null;if(c=o.length&&s.length&&_a(a,s,l,o[o.length-1],0))o[o.length-1]=c;else{o.length&&(o[o.length-1]=Va(o[o.length-1],s.length));let u=$a(l,a);o.push(u),i=i.matchType(u.type),s=a}}),o)return k.from(o)}return n}function $a(n,e,t=0){for(let r=e.length-1;r>=t;r--)n=e[r].create(null,k.from(n));return n}function _a(n,e,t,r,i){if(i1&&(s=0),i=t&&(l=e<0?o.contentMatchAt(0).fillBefore(l,s<=i).append(l):l.append(o.contentMatchAt(o.childCount).fillBefore(k.empty,!0))),n.replaceChild(e<0?0:n.childCount-1,o.copy(l))}function ua(n,e,t){return et})),Xi.createHTML(n)):n}function Vf(n){let e=/^(\s*]*>)*/.exec(n);e&&(n=n.slice(e[0].length));let t=Wa().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(n),i;if((i=r&&ja[r[1].toLowerCase()])&&(n=i.map(s=>"<"+s+">").join("")+n+i.map(s=>"").reverse().join("")),t.innerHTML=_f(n),i)for(let s=0;s=0;l-=2){let a=t.nodes[r[l]];if(!a||a.hasRequiredAttrs())break;i=k.from(a.create(r[l+1],i)),s++,o++}return new S(i,s,o)}var ce={},ue={},Kf={touchstart:!0,touchmove:!0},hs=class{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}};function Uf(n){for(let e in ce){let t=ce[e];n.dom.addEventListener(e,n.input.eventHandlers[e]=r=>{qf(n,r)&&!ws(n,r)&&(n.editable||!(r.type in ue))&&t(n,r)},Kf[e]?{passive:!0}:void 0)}ie&&n.dom.addEventListener("input",()=>null),ps(n)}function Qe(n,e){n.input.lastSelectionOrigin=e,n.input.lastSelectionTime=Date.now()}function Jf(n){n.domObserver.stop();for(let e in n.input.eventHandlers)n.dom.removeEventListener(e,n.input.eventHandlers[e]);clearTimeout(n.input.composingTimeout),clearTimeout(n.input.lastIOSEnterFallbackTimeout)}function ps(n){n.someProp("handleDOMEvents",e=>{for(let t in e)n.input.eventHandlers[t]||n.dom.addEventListener(t,n.input.eventHandlers[t]=r=>ws(n,r))})}function ws(n,e){return n.someProp("handleDOMEvents",t=>{let r=t[e.type];return r?r(n,e)||e.defaultPrevented:!1})}function qf(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target;t!=n.dom;t=t.parentNode)if(!t||t.nodeType==11||t.pmViewDesc&&t.pmViewDesc.stopEvent(e))return!1;return!0}function Gf(n,e){!ws(n,e)&&ce[e.type]&&(n.editable||!(e.type in ue))&&ce[e.type](n,e)}ue.keydown=(n,e)=>{let t=e;if(n.input.shiftKey=t.keyCode==16||t.shiftKey,!Ua(n,t)&&(n.input.lastKeyCode=t.keyCode,n.input.lastKeyCodeTime=Date.now(),!(_e&&ee&&t.keyCode==13)))if(t.keyCode!=229&&n.domObserver.forceFlush(),_t&&t.keyCode==13&&!t.ctrlKey&&!t.altKey&&!t.metaKey){let r=Date.now();n.input.lastIOSEnter=r,n.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{n.input.lastIOSEnter==r&&(n.someProp("handleKeyDown",i=>i(n,ht(13,"Enter"))),n.input.lastIOSEnter=0)},200)}else n.someProp("handleKeyDown",r=>r(n,t))||Ff(n,t)?t.preventDefault():Qe(n,"key")};ue.keyup=(n,e)=>{e.keyCode==16&&(n.input.shiftKey=!1)};ue.keypress=(n,e)=>{let t=e;if(Ua(n,t)||!t.charCode||t.ctrlKey&&!t.altKey||ye&&t.metaKey)return;if(n.someProp("handleKeyPress",i=>i(n,t))){t.preventDefault();return}let r=n.state.selection;if(!(r instanceof E)||!r.$from.sameParent(r.$to)){let i=String.fromCharCode(t.charCode),s=()=>n.state.tr.insertText(i).scrollIntoView();!/[\r\n]/.test(i)&&!n.someProp("handleTextInput",o=>o(n,r.$from.pos,r.$to.pos,i,s))&&n.dispatch(s()),t.preventDefault()}};function lr(n){return{left:n.clientX,top:n.clientY}}function Yf(n,e){let t=e.x-n.clientX,r=e.y-n.clientY;return t*t+r*r<100}function Cs(n,e,t,r,i){if(r==-1)return!1;let s=n.state.doc.resolve(r);for(let o=s.depth+1;o>0;o--)if(n.someProp(e,l=>o>s.depth?l(n,t,s.nodeAfter,s.before(o),i,!0):l(n,t,s.node(o),s.before(o),i,!1)))return!0;return!1}function Ht(n,e,t){if(n.focused||n.focus(),n.state.selection.eq(e))return;let r=n.state.tr.setSelection(e);t=="pointer"&&r.setMeta("pointer",!0),n.dispatch(r)}function Xf(n,e){if(e==-1)return!1;let t=n.state.doc.resolve(e),r=t.nodeAfter;return r&&r.isAtom&&M.isSelectable(r)?(Ht(n,new M(t),"pointer"),!0):!1}function Qf(n,e){if(e==-1)return!1;let t=n.state.selection,r,i;t instanceof M&&(r=t.node);let s=n.state.doc.resolve(e);for(let o=s.depth+1;o>0;o--){let l=o>s.depth?s.nodeAfter:s.node(o);if(M.isSelectable(l)){r&&t.$from.depth>0&&o>=t.$from.depth&&s.before(t.$from.depth+1)==t.$from.pos?i=s.before(t.$from.depth):i=s.before(o);break}}return i!=null?(Ht(n,M.create(n.state.doc,i),"pointer"),!0):!1}function Zf(n,e,t,r,i){return Cs(n,"handleClickOn",e,t,r)||n.someProp("handleClick",s=>s(n,e,r))||(i?Qf(n,t):Xf(n,t))}function eh(n,e,t,r){return Cs(n,"handleDoubleClickOn",e,t,r)||n.someProp("handleDoubleClick",i=>i(n,e,r))}function th(n,e,t,r){return Cs(n,"handleTripleClickOn",e,t,r)||n.someProp("handleTripleClick",i=>i(n,e,r))||nh(n,t,r)}function nh(n,e,t){if(t.button!=0)return!1;let r=n.state.doc;if(e==-1)return r.inlineContent?(Ht(n,E.create(r,0,r.content.size),"pointer"),!0):!1;let i=r.resolve(e);for(let s=i.depth+1;s>0;s--){let o=s>i.depth?i.nodeAfter:i.node(s),l=i.before(s);if(o.inlineContent)Ht(n,E.create(r,l+1,l+1+o.content.size),"pointer");else if(M.isSelectable(o))Ht(n,M.create(r,l),"pointer");else continue;return!0}}function vs(n){return tr(n)}var Ka=ye?"metaKey":"ctrlKey";ce.mousedown=(n,e)=>{let t=e;n.input.shiftKey=t.shiftKey;let r=vs(n),i=Date.now(),s="singleClick";i-n.input.lastClick.time<500&&Yf(t,n.input.lastClick)&&!t[Ka]&&n.input.lastClick.button==t.button&&(n.input.lastClick.type=="singleClick"?s="doubleClick":n.input.lastClick.type=="doubleClick"&&(s="tripleClick")),n.input.lastClick={time:i,x:t.clientX,y:t.clientY,type:s,button:t.button};let o=n.posAtCoords(lr(t));o&&(s=="singleClick"?(n.input.mouseDown&&n.input.mouseDown.done(),n.input.mouseDown=new ms(n,o,t,!!r)):(s=="doubleClick"?eh:th)(n,o.pos,o.inside,t)?t.preventDefault():Qe(n,"pointer"))};var ms=class{constructor(e,t,r,i){this.view=e,this.pos=t,this.event=r,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[Ka],this.allowDefault=r.shiftKey;let s,o;if(t.inside>-1)s=e.state.doc.nodeAt(t.inside),o=t.inside;else{let u=e.state.doc.resolve(t.pos);s=u.parent,o=u.depth?u.before():0}let l=i?null:r.target,a=l?e.docView.nearestDesc(l,!0):null;this.target=a&&a.nodeDOM.nodeType==1?a.nodeDOM:null;let{selection:c}=e.state;r.button==0&&(s.type.spec.draggable&&s.type.spec.selectable!==!1||c instanceof M&&c.from<=o&&c.to>o)&&(this.mightDrag={node:s,pos:o,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&be&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),Qe(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>Ve(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(lr(e))),this.updateAllowDefault(e),this.allowDefault||!t?Qe(this.view,"pointer"):Zf(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||ie&&this.mightDrag&&!this.mightDrag.node.isAtom||ee&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(Ht(this.view,N.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):Qe(this.view,"pointer")}move(e){this.updateAllowDefault(e),Qe(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}};ce.touchstart=n=>{n.input.lastTouch=Date.now(),vs(n),Qe(n,"pointer")};ce.touchmove=n=>{n.input.lastTouch=Date.now(),Qe(n,"pointer")};ce.contextmenu=n=>vs(n);function Ua(n,e){return n.composing?!0:ie&&Math.abs(e.timeStamp-n.input.compositionEndedAt)<500?(n.input.compositionEndedAt=-2e8,!0):!1}var rh=_e?5e3:-1;ue.compositionstart=ue.compositionupdate=n=>{if(!n.composing){n.domObserver.flush();let{state:e}=n,t=e.selection.$to;if(e.selection instanceof E&&(e.storedMarks||!t.textOffset&&t.parentOffset&&t.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||ee&&va&&ih(n)))n.markCursor=n.state.storedMarks||t.marks(),tr(n,!0),n.markCursor=null;else if(tr(n,!e.selection.empty),be&&e.selection.empty&&t.parentOffset&&!t.textOffset&&t.nodeBefore.marks.length){let r=n.domSelectionRange();for(let i=r.focusNode,s=r.focusOffset;i&&i.nodeType==1&&s!=0;){let o=s<0?i.lastChild:i.childNodes[s-1];if(!o)break;if(o.nodeType==3){let l=n.domSelection();l&&l.collapse(o,o.nodeValue.length);break}else i=o,s=-1}}n.input.composing=!0}Ja(n,rh)};function ih(n){let{focusNode:e,focusOffset:t}=n.domSelectionRange();if(!e||e.nodeType!=1||t>=e.childNodes.length)return!1;let r=e.childNodes[t];return r.nodeType==1&&r.contentEditable=="false"}ue.compositionend=(n,e)=>{n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=e.timeStamp,n.input.compositionPendingChanges=n.domObserver.pendingRecords().length?n.input.compositionID:0,n.input.compositionNode=null,n.input.badSafariComposition?n.domObserver.forceFlush():n.input.compositionPendingChanges&&Promise.resolve().then(()=>n.domObserver.flush()),n.input.compositionID++,Ja(n,20))};function Ja(n,e){clearTimeout(n.input.composingTimeout),e>-1&&(n.input.composingTimeout=setTimeout(()=>tr(n),e))}function qa(n){for(n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=oh());n.input.compositionNodes.length>0;)n.input.compositionNodes.pop().markParentsDirty()}function sh(n){let e=n.domSelectionRange();if(!e.focusNode)return null;let t=tf(e.focusNode,e.focusOffset),r=nf(e.focusNode,e.focusOffset);if(t&&r&&t!=r){let i=r.pmViewDesc,s=n.domObserver.lastChangedTextNode;if(t==s||r==s)return s;if(!i||!i.isText(r.nodeValue))return r;if(n.input.compositionNode==r){let o=t.pmViewDesc;if(!(!o||!o.isText(t.nodeValue)))return r}}return t||r}function oh(){let n=document.createEvent("Event");return n.initEvent("event",!0,!0),n.timeStamp}function tr(n,e=!1){if(!(_e&&n.domObserver.flushingSoon>=0)){if(n.domObserver.forceFlush(),qa(n),e||n.docView&&n.docView.dirty){let t=xs(n),r=n.state.selection;return t&&!t.eq(r)?n.dispatch(n.state.tr.setSelection(t)):(n.markCursor||e)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?n.dispatch(n.state.tr.deleteSelection()):n.updateState(n.state),!0}return!1}}function lh(n,e){if(!n.dom.parentNode)return;let t=n.dom.parentNode.appendChild(document.createElement("div"));t.appendChild(e),t.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),i=document.createRange();i.selectNodeContents(e),n.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(()=>{t.parentNode&&t.parentNode.removeChild(t),n.focus()},50)}var un=fe&&Ze<15||_t&&lf<604;ce.copy=ue.cut=(n,e)=>{let t=e,r=n.state.selection,i=t.type=="cut";if(r.empty)return;let s=un?null:t.clipboardData,o=r.content(),{dom:l,text:a}=Ms(n,o);s?(t.preventDefault(),s.clearData(),s.setData("text/html",l.innerHTML),s.setData("text/plain",a)):lh(n,l),i&&n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function ah(n){return n.openStart==0&&n.openEnd==0&&n.content.childCount==1?n.content.firstChild:null}function ch(n,e){if(!n.dom.parentNode)return;let t=n.input.shiftKey||n.state.selection.$from.parent.type.spec.code,r=n.dom.parentNode.appendChild(document.createElement(t?"textarea":"div"));t||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let i=n.input.shiftKey&&n.input.lastKeyCode!=45;setTimeout(()=>{n.focus(),r.parentNode&&r.parentNode.removeChild(r),t?dn(n,r.value,null,i,e):dn(n,r.textContent,r.innerHTML,i,e)},50)}function dn(n,e,t,r,i){let s=Ha(n,e,t,r,n.state.selection.$from);if(n.someProp("handlePaste",a=>a(n,i,s||S.empty)))return!0;if(!s)return!1;let o=ah(s),l=o?n.state.tr.replaceSelectionWith(o,r):n.state.tr.replaceSelection(s);return n.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function Ga(n){let e=n.getData("text/plain")||n.getData("Text");if(e)return e;let t=n.getData("text/uri-list");return t?t.replace(/\r?\n/g," "):""}ue.paste=(n,e)=>{let t=e;if(n.composing&&!_e)return;let r=un?null:t.clipboardData,i=n.input.shiftKey&&n.input.lastKeyCode!=45;r&&dn(n,Ga(r),r.getData("text/html"),i,t)?t.preventDefault():ch(n,t)};var nr=class{constructor(e,t,r){this.slice=e,this.move=t,this.node=r}},uh=ye?"altKey":"ctrlKey";function Ya(n,e){let t;return n.someProp("dragCopies",r=>{t=t||r(e)}),t!=null?!t:!e[uh]}ce.dragstart=(n,e)=>{let t=e,r=n.input.mouseDown;if(r&&r.done(),!t.dataTransfer)return;let i=n.state.selection,s=i.empty?null:n.posAtCoords(lr(t)),o;if(!(s&&s.pos>=i.from&&s.pos<=(i instanceof M?i.to-1:i.to))){if(r&&r.mightDrag)o=M.create(n.state.doc,r.mightDrag.pos);else if(t.target&&t.target.nodeType==1){let d=n.docView.nearestDesc(t.target,!0);d&&d.node.type.spec.draggable&&d!=n.docView&&(o=M.create(n.state.doc,d.posBefore))}}let l=(o||n.state.selection).content(),{dom:a,text:c,slice:u}=Ms(n,l);(!t.dataTransfer.files.length||!ee||Ca>120)&&t.dataTransfer.clearData(),t.dataTransfer.setData(un?"Text":"text/html",a.innerHTML),t.dataTransfer.effectAllowed="copyMove",un||t.dataTransfer.setData("text/plain",c),n.dragging=new nr(u,Ya(n,t),o)};ce.dragend=n=>{let e=n.dragging;window.setTimeout(()=>{n.dragging==e&&(n.dragging=null)},50)};ue.dragover=ue.dragenter=(n,e)=>e.preventDefault();ue.drop=(n,e)=>{try{dh(n,e,n.dragging)}finally{n.dragging=null}};function dh(n,e,t){if(!e.dataTransfer)return;let r=n.posAtCoords(lr(e));if(!r)return;let i=n.state.doc.resolve(r.pos),s=t&&t.slice;s?n.someProp("transformPasted",h=>{s=h(s,n,!1)}):s=Ha(n,Ga(e.dataTransfer),un?null:e.dataTransfer.getData("text/html"),!1,i);let o=!!(t&&Ya(n,e));if(n.someProp("handleDrop",h=>h(n,e,s||S.empty,o))){e.preventDefault();return}if(!s)return;e.preventDefault();let l=s?Wn(n.state.doc,i.pos,s):i.pos;l==null&&(l=i.pos);let a=n.state.tr;if(o){let{node:h}=t;h?h.replace(a):a.deleteSelection()}let c=a.mapping.map(l),u=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,d=a.doc;if(u?a.replaceRangeWith(c,c,s.content.firstChild):a.replaceRange(c,c,s),a.doc.eq(d))return;let f=a.doc.resolve(c);if(u&&M.isSelectable(s.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(s.content.firstChild))a.setSelection(new M(f));else{let h=a.mapping.map(l);a.mapping.maps[a.mapping.maps.length-1].forEach((p,m,g,y)=>h=y),a.setSelection(Ss(n,f,a.doc.resolve(h)))}n.focus(),n.dispatch(a.setMeta("uiEvent","drop"))}ce.focus=n=>{n.input.lastFocus=Date.now(),n.focused||(n.domObserver.stop(),n.dom.classList.add("ProseMirror-focused"),n.domObserver.start(),n.focused=!0,setTimeout(()=>{n.docView&&n.hasFocus()&&!n.domObserver.currentSelection.eq(n.domSelectionRange())&&Ve(n)},20))};ce.blur=(n,e)=>{let t=e;n.focused&&(n.domObserver.stop(),n.dom.classList.remove("ProseMirror-focused"),n.domObserver.start(),t.relatedTarget&&n.dom.contains(t.relatedTarget)&&n.domObserver.currentSelection.clear(),n.focused=!1)};ce.beforeinput=(n,e)=>{if(ee&&_e&&e.inputType=="deleteContentBackward"){n.domObserver.flushSoon();let{domChangeCount:r}=n.input;setTimeout(()=>{if(n.input.domChangeCount!=r||(n.dom.blur(),n.focus(),n.someProp("handleKeyDown",s=>s(n,ht(8,"Backspace")))))return;let{$cursor:i}=n.state.selection;i&&i.pos>0&&n.dispatch(n.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let n in ue)ce[n]=ue[n];function fn(n,e){if(n==e)return!0;for(let t in n)if(n[t]!==e[t])return!1;for(let t in e)if(!(t in n))return!1;return!0}var rr=class n{constructor(e,t){this.toDOM=e,this.spec=t||yt,this.side=this.spec.side||0}map(e,t,r,i){let{pos:s,deleted:o}=e.mapResult(t.from+i,this.side<0?-1:1);return o?null:new se(s-r,s-r,this)}valid(){return!0}eq(e){return this==e||e instanceof n&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&fn(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}},gt=class n{constructor(e,t){this.attrs=e,this.spec=t||yt}map(e,t,r,i){let s=e.map(t.from+i,this.spec.inclusiveStart?-1:1)-r,o=e.map(t.to+i,this.spec.inclusiveEnd?1:-1)-r;return s>=o?null:new se(s,o,this)}valid(e,t){return t.from=e&&(!s||s(l.spec))&&r.push(l.copy(l.from+i,l.to+i))}for(let o=0;oe){let l=this.children[o]+1;this.children[o+2].findInner(e-l,t-l,r,i+l,s)}}map(e,t,r){return this==re||e.maps.length==0?this:this.mapInner(e,t,0,0,r||yt)}mapInner(e,t,r,i,s){let o;for(let l=0;l{let c=a+r,u;if(u=Qa(t,l,c)){for(i||(i=this.children.slice());sl&&d.to=e){this.children[l]==e&&(r=this.children[l+2]);break}let s=e+1,o=s+t.content.size;for(let l=0;ls&&a.type instanceof gt){let c=Math.max(s,a.from)-s,u=Math.min(o,a.to)-s;ci.map(e,t,yt));return n.from(r)}forChild(e,t){if(t.isLeaf)return W.empty;let r=[];for(let i=0;it instanceof W)?e:e.reduce((t,r)=>t.concat(r instanceof W?r:r.members),[]))}}forEachSet(e){for(let t=0;t{let g=m-p-(h-f);for(let y=0;yx+u-d)continue;let C=l[y]+u-d;h>=C?l[y+1]=f<=C?-2:-1:f>=u&&g&&(l[y]+=g,l[y+1]+=g)}d+=g}),u=t.maps[c].map(u,-1)}let a=!1;for(let c=0;c=r.content.size){a=!0;continue}let f=t.map(n[c+1]+s,-1),h=f-i,{index:p,offset:m}=r.content.findIndex(d),g=r.maybeChild(p);if(g&&m==d&&m+g.nodeSize==h){let y=l[c+2].mapInner(t,g,u+1,n[c]+s+1,o);y!=re?(l[c]=d,l[c+1]=h,l[c+2]=y):(l[c+1]=-2,a=!0)}else a=!0}if(a){let c=hh(l,n,e,t,i,s,o),u=sr(c,r,0,o);e=u.local;for(let d=0;dt&&o.to{let c=Qa(n,l,a+t);if(c){s=!0;let u=sr(c,l,t+a+1,r);u!=re&&i.push(a,a+l.nodeSize,u)}});let o=Xa(s?Za(n):n,-t).sort(kt);for(let l=0;l0;)e++;n.splice(e,0,t)}function Qi(n){let e=[];return n.someProp("decorations",t=>{let r=t(n.state);r&&r!=re&&e.push(r)}),n.cursorWrapper&&e.push(W.create(n.state.doc,[n.cursorWrapper.deco])),ir.from(e)}var ph={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},mh=fe&&Ze<=11,ys=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}},ks=class{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new ys,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let i=0;ii.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():ie&&e.composing&&r.some(i=>i.type=="childList"&&i.target.nodeName=="TR")?(e.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),mh&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,ph)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;tthis.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(ia(this.view)){if(this.suppressingSelectionUpdates)return Ve(this.view);if(fe&&Ze<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&bt(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t=new Set,r;for(let s=e.focusNode;s;s=$t(s))t.add(s);for(let s=e.anchorNode;s;s=$t(s))if(t.has(s)){r=s;break}let i=r&&this.view.docView.nearestDesc(r);if(i&&i.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let t=this.pendingRecords();t.length&&(this.queue=[]);let r=e.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&ia(e)&&!this.ignoreSelectionChange(r),s=-1,o=-1,l=!1,a=[];if(e.editable)for(let u=0;uu.nodeName=="BR")&&(e.input.lastKeyCode==8||e.input.lastKeyCode==46)){for(let u of a)if(u.nodeName=="BR"&&u.parentNode){let d=u.nextSibling;for(;d&&d.nodeType==1;){if(d.contentEditable=="false"){u.parentNode.removeChild(u);break}d=d.firstChild}}}else if(be&&a.length){let u=a.filter(d=>d.nodeName=="BR");if(u.length==2){let[d,f]=u;d.parentNode&&d.parentNode.parentNode==f.parentNode?f.remove():d.remove()}else{let{focusNode:d}=this.currentSelection;for(let f of u){let h=f.parentNode;h&&h.nodeName=="LI"&&(!d||kh(e,d)!=h)&&f.remove()}}}let c=null;s<0&&i&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)-1||i)&&(s>-1&&(e.docView.markDirty(s,o),gh(e)),e.input.badSafariComposition&&(e.input.badSafariComposition=!1,bh(e,a)),this.handleDOMChange(s,o,l,a),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||Ve(e),this.currentSelection.set(r))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let u=0;ui;g--){let y=r.childNodes[g-1],x=y.pmViewDesc;if(y.nodeName=="BR"&&!x){s=g;break}if(!x||x.size)break}let d=n.state.doc,f=n.someProp("domParser")||ve.fromSchema(n.state.schema),h=d.resolve(o),p=null,m=f.parse(r,{topNode:h.parent,topMatch:h.parent.contentMatchAt(h.index()),topOpen:!0,from:i,to:s,preserveWhitespace:h.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:Sh,context:h});if(c&&c[0].pos!=null){let g=c[0].pos,y=c[1]&&c[1].pos;y==null&&(y=g),p={anchor:g+o,head:y+o}}return{doc:m,sel:p,from:o,to:l}}function Sh(n){let e=n.pmViewDesc;if(e)return e.parseRule();if(n.nodeName=="BR"&&n.parentNode){if(ie&&/^(ul|ol)$/i.test(n.parentNode.nodeName)){let t=document.createElement("div");return t.appendChild(document.createElement("li")),{skip:t}}else if(n.parentNode.lastChild==n||ie&&/^(tr|table)$/i.test(n.parentNode.nodeName))return{ignore:!0}}else if(n.nodeName=="IMG"&&n.getAttribute("mark-placeholder"))return{ignore:!0};return null}var Mh=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function wh(n,e,t,r,i){let s=n.input.compositionPendingChanges||(n.composing?n.input.compositionID:0);if(n.input.compositionPendingChanges=0,e<0){let v=n.input.lastSelectionTime>Date.now()-50?n.input.lastSelectionOrigin:null,L=xs(n,v);if(L&&!n.state.selection.eq(L)){if(ee&&_e&&n.input.lastKeyCode===13&&Date.now()-100J(n,ht(13,"Enter"))))return;let z=n.state.tr.setSelection(L);v=="pointer"?z.setMeta("pointer",!0):v=="key"&&z.scrollIntoView(),s&&z.setMeta("composition",s),n.dispatch(z)}return}let o=n.state.doc.resolve(e),l=o.sharedDepth(t);e=o.before(l+1),t=n.state.doc.resolve(t).after(l+1);let a=n.state.selection,c=xh(n,e,t),u=n.state.doc,d=u.slice(c.from,c.to),f,h;n.input.lastKeyCode===8&&Date.now()-100Date.now()-225||_e)&&i.some(v=>v.nodeType==1&&!Mh.test(v.nodeName))&&(!p||p.endA>=p.endB)&&n.someProp("handleKeyDown",v=>v(n,ht(13,"Enter")))){n.input.lastIOSEnter=0;return}if(!p)if(r&&a instanceof E&&!a.empty&&a.$head.sameParent(a.$anchor)&&!n.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))p={start:a.from,endA:a.to,endB:a.to};else{if(c.sel){let v=ga(n,n.state.doc,c.sel);if(v&&!v.eq(n.state.selection)){let L=n.state.tr.setSelection(v);s&&L.setMeta("composition",s),n.dispatch(L)}}return}n.state.selection.fromn.state.selection.from&&p.start<=n.state.selection.from+2&&n.state.selection.from>=c.from?p.start=n.state.selection.from:p.endA=n.state.selection.to-2&&n.state.selection.to<=c.to&&(p.endB+=n.state.selection.to-p.endA,p.endA=n.state.selection.to)),fe&&Ze<=11&&p.endB==p.start+1&&p.endA==p.start&&p.start>c.from&&c.doc.textBetween(p.start-c.from-1,p.start-c.from+1)==" \xA0"&&(p.start--,p.endA--,p.endB--);let m=c.doc.resolveNoCache(p.start-c.from),g=c.doc.resolveNoCache(p.endB-c.from),y=u.resolve(p.start),x=m.sameParent(g)&&m.parent.inlineContent&&y.end()>=p.endA;if((_t&&n.input.lastIOSEnter>Date.now()-225&&(!x||i.some(v=>v.nodeName=="DIV"||v.nodeName=="P"))||!x&&m.posv(n,ht(13,"Enter")))){n.input.lastIOSEnter=0;return}if(n.state.selection.anchor>p.start&&vh(u,p.start,p.endA,m,g)&&n.someProp("handleKeyDown",v=>v(n,ht(8,"Backspace")))){_e&&ee&&n.domObserver.suppressSelectionUpdates();return}ee&&p.endB==p.start&&(n.input.lastChromeDelete=Date.now()),_e&&!x&&m.start()!=g.start()&&g.parentOffset==0&&m.depth==g.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==p.endA&&(p.endB-=2,g=c.doc.resolveNoCache(p.endB-c.from),setTimeout(()=>{n.someProp("handleKeyDown",function(v){return v(n,ht(13,"Enter"))})},20));let C=p.start,A=p.endA,w=v=>{let L=v||n.state.tr.replace(C,A,c.doc.slice(p.start-c.from,p.endB-c.from));if(c.sel){let z=ga(n,L.doc,c.sel);z&&!(ee&&n.composing&&z.empty&&(p.start!=p.endB||n.input.lastChromeDeleteVe(n),20));let v=w(n.state.tr.delete(C,A)),L=u.resolve(p.start).marksAcross(u.resolve(p.endA));L&&v.ensureMarks(L),n.dispatch(v)}else if(p.endA==p.endB&&(I=Ch(m.parent.content.cut(m.parentOffset,g.parentOffset),y.parent.content.cut(y.parentOffset,p.endA-y.start())))){let v=w(n.state.tr);I.type=="add"?v.addMark(C,A,I.mark):v.removeMark(C,A,I.mark),n.dispatch(v)}else if(m.parent.child(m.index()).isText&&m.index()==g.index()-(g.textOffset?0:1)){let v=m.parent.textBetween(m.parentOffset,g.parentOffset),L=()=>w(n.state.tr.insertText(v,C,A));n.someProp("handleTextInput",z=>z(n,C,A,v,L))||n.dispatch(L())}else n.dispatch(w());else n.dispatch(w())}function ga(n,e,t){return Math.max(t.anchor,t.head)>e.content.size?null:Ss(n,e.resolve(t.anchor),e.resolve(t.head))}function Ch(n,e){let t=n.firstChild.marks,r=e.firstChild.marks,i=t,s=r,o,l,a;for(let u=0;uu.mark(l.addToSet(u.marks));else if(i.length==0&&s.length==1)l=s[0],o="remove",a=u=>u.mark(l.removeFromSet(u.marks));else return null;let c=[];for(let u=0;ut||Zi(o,!0,!1)0&&(e||n.indexAfter(r)==n.node(r).childCount);)r--,i++,e=!1;if(t){let s=n.node(r).maybeChild(n.indexAfter(r));for(;s&&!s.isLeaf;)s=s.firstChild,i++}return i}function Th(n,e,t,r,i){let s=n.findDiffStart(e,t);if(s==null)return null;let{a:o,b:l}=n.findDiffEnd(e,t+n.size,t+e.size);if(i=="end"){let a=Math.max(0,s-Math.min(o,l));r-=o+a-s}if(o=o?s-r:0;s-=a,s&&s=l?s-r:0;s-=a,s&&s=56320&&e<=57343&&t>=55296&&t<=56319}var hn=class{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new hs,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(Ma),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=xa(this),ba(this),this.nodeViews=Sa(this),this.docView=Ql(this.state.doc,ka(this),Qi(this),this.dom,this),this.domObserver=new ks(this,(r,i,s,o)=>wh(this,r,i,s,o)),this.domObserver.start(),Uf(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&ps(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(Ma),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let r in this._props)t[r]=this._props[r];t.state=this.state;for(let r in e)t[r]=e[r];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){var r;let i=this.state,s=!1,o=!1;e.storedMarks&&this.composing&&(qa(this),o=!0),this.state=e;let l=i.plugins!=e.plugins||this._props.plugins!=t.plugins;if(l||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let h=Sa(this);Ah(h,this.nodeViews)&&(this.nodeViews=h,s=!0)}(l||t.handleDOMEvents!=this._props.handleDOMEvents)&&ps(this),this.editable=xa(this),ba(this);let a=Qi(this),c=ka(this),u=i.plugins!=e.plugins&&!i.doc.eq(e.doc)?"reset":e.scrollToSelection>i.scrollToSelection?"to selection":"preserve",d=s||!this.docView.matchesNode(e.doc,c,a);(d||!e.selection.eq(i.selection))&&(o=!0);let f=u=="preserve"&&o&&this.dom.style.overflowAnchor==null&&uf(this);if(o){this.domObserver.stop();let h=d&&(fe||ee)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&Eh(i.selection,e.selection);if(d){let p=ee?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=sh(this)),(s||!this.docView.update(e.doc,c,a,this))&&(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=Ql(e.doc,c,a,this.dom,this)),p&&(!this.trackWrites||!this.dom.contains(this.trackWrites))&&(h=!0)}h||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&If(this))?Ve(this,h):(za(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),!((r=this.dragging)===null||r===void 0)&&r.node&&!i.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,i),u=="reset"?this.dom.scrollTop=0:u=="to selection"?this.scrollToSelection():f&&df(f)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))){if(!this.someProp("handleScrollToSelection",t=>t(this)))if(this.state.selection instanceof M){let t=this.docView.domAfterPos(this.state.selection.from);t.nodeType==1&&Ul(this,t.getBoundingClientRect(),e)}else Ul(this,this.coordsAtPos(this.state.selection.head,1),e)}}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let t=0;t0&&st.ownerDocument.getSelection()),this._root=t}return e||document}updateRoot(){this._root=null}posAtCoords(e){return yf(this,e)}coordsAtPos(e,t=1){return Oa(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,r=-1){let i=this.docView.posFromDOM(e,t,r);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(e,t){return Mf(this,t||this.state,e)}pasteHTML(e,t){return dn(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return dn(this,e,null,!0,t||new ClipboardEvent("paste"))}serializeForClipboard(e){return Ms(this,e)}destroy(){this.docView&&(Jf(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Qi(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,Zd())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return Gf(this,e)}domSelectionRange(){let e=this.domSelection();return e?ie&&this.root.nodeType===11&&sf(this.dom.ownerDocument)==this.dom&&yh(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}};hn.prototype.dispatch=function(n){let e=this._props.dispatchTransaction;e?e.call(this,n):this.updateState(this.state.apply(n))};function ka(n){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(n.editable),n.someProp("attributes",t=>{if(typeof t=="function"&&(t=t(n.state)),t)for(let r in t)r=="class"?e.class+=" "+t[r]:r=="style"?e.style=(e.style?e.style+";":"")+t[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(t[r]))}),e.translate||(e.translate="no"),[se.node(0,n.state.doc.content.size,e)]}function ba(n){if(n.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),n.cursorWrapper={dom:e,deco:se.widget(n.state.selection.from,e,{raw:!0,marks:n.markCursor})}}else n.cursorWrapper=null}function xa(n){return!n.someProp("editable",e=>e(n.state)===!1)}function Eh(n,e){let t=Math.min(n.$anchor.sharedDepth(n.head),e.$anchor.sharedDepth(e.head));return n.$anchor.start(t)!=e.$anchor.start(t)}function Sa(n){let e=Object.create(null);function t(r){for(let i in r)Object.prototype.hasOwnProperty.call(e,i)||(e[i]=r[i])}return n.someProp("nodeViews",t),n.someProp("markViews",t),e}function Ah(n,e){let t=0,r=0;for(let i in n){if(n[i]!=e[i])return!0;t++}for(let i in e)r++;return t!=r}function Ma(n){if(n.spec.state||n.spec.filterTransaction||n.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var je={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},cr={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Nh=typeof navigator!="undefined"&&/Mac/.test(navigator.platform),Oh=typeof navigator!="undefined"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(U=0;U<10;U++)je[48+U]=je[96+U]=String(U);var U;for(U=1;U<=24;U++)je[U+111]="F"+U;var U;for(U=65;U<=90;U++)je[U]=String.fromCharCode(U+32),cr[U]=String.fromCharCode(U);var U;for(ar in je)cr.hasOwnProperty(ar)||(cr[ar]=je[ar]);var ar;function ec(n){var e=Nh&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||Oh&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?cr:je)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}var Ih=typeof navigator!="undefined"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),Rh=typeof navigator!="undefined"&&/Win/.test(navigator.platform);function Dh(n){let e=n.split(/-(?!$)/),t=e[e.length-1];t=="Space"&&(t=" ");let r,i,s,o;for(let l=0;l{for(var t in e)Lh(n,t,{get:e[t],enumerable:!0})};function yr(n){let{state:e,transaction:t}=n,{selection:r}=t,{doc:i}=t,{storedMarks:s}=t;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return s},get selection(){return r},get doc(){return i},get tr(){return r=t.selection,i=t.doc,s=t.storedMarks,t}}}var kr=class{constructor(n){this.editor=n.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=n.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){let{rawCommands:n,editor:e,state:t}=this,{view:r}=e,{tr:i}=t,s=this.buildProps(i);return Object.fromEntries(Object.entries(n).map(([o,l])=>[o,(...c)=>{let u=l(...c)(s);return!i.getMeta("preventDispatch")&&!this.hasCustomState&&r.dispatch(i),u}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(n,e=!0){let{rawCommands:t,editor:r,state:i}=this,{view:s}=r,o=[],l=!!n,a=n||i.tr,c=()=>(!l&&e&&!a.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(a),o.every(d=>d===!0)),u={...Object.fromEntries(Object.entries(t).map(([d,f])=>[d,(...p)=>{let m=this.buildProps(a,e),g=f(...p)(m);return o.push(g),u}])),run:c};return u}createCan(n){let{rawCommands:e,state:t}=this,r=!1,i=n||t.tr,s=this.buildProps(i,r);return{...Object.fromEntries(Object.entries(e).map(([l,a])=>[l,(...c)=>a(...c)({...s,dispatch:void 0})])),chain:()=>this.createChain(i,r)}}buildProps(n,e=!0){let{rawCommands:t,editor:r,state:i}=this,{view:s}=r,o={tr:n,editor:r,view:s,state:yr({state:i,transaction:n}),dispatch:e?()=>{}:void 0,chain:()=>this.createChain(n,e),can:()=>this.createCan(n),get commands(){return Object.fromEntries(Object.entries(t).map(([l,a])=>[l,(...c)=>a(...c)(o)]))}};return o}},dc={};Ps(dc,{blur:()=>zh,clearContent:()=>Bh,clearNodes:()=>Fh,command:()=>Hh,createParagraphNear:()=>$h,cut:()=>_h,deleteCurrentNode:()=>Vh,deleteNode:()=>jh,deleteRange:()=>Wh,deleteSelection:()=>Kh,enter:()=>Uh,exitCode:()=>Jh,extendMarkRange:()=>qh,first:()=>Gh,focus:()=>Xh,forEach:()=>Qh,insertContent:()=>Zh,insertContentAt:()=>np,joinBackward:()=>sp,joinDown:()=>ip,joinForward:()=>op,joinItemBackward:()=>lp,joinItemForward:()=>ap,joinTextblockBackward:()=>cp,joinTextblockForward:()=>up,joinUp:()=>rp,keyboardShortcut:()=>fp,lift:()=>hp,liftEmptyBlock:()=>pp,liftListItem:()=>mp,newlineInCode:()=>gp,resetAttributes:()=>yp,scrollIntoView:()=>kp,selectAll:()=>bp,selectNodeBackward:()=>xp,selectNodeForward:()=>Sp,selectParentNode:()=>Mp,selectTextblockEnd:()=>wp,selectTextblockStart:()=>Cp,setContent:()=>vp,setMark:()=>Vp,setMeta:()=>jp,setNode:()=>Wp,setNodeSelection:()=>Kp,setTextDirection:()=>Up,setTextSelection:()=>Jp,sinkListItem:()=>qp,splitBlock:()=>Gp,splitListItem:()=>Yp,toggleList:()=>Qp,toggleMark:()=>Zp,toggleNode:()=>em,toggleWrap:()=>tm,undoInputRule:()=>nm,unsetAllMarks:()=>rm,unsetMark:()=>im,unsetTextDirection:()=>sm,updateAttributes:()=>om,wrapIn:()=>lm,wrapInList:()=>am});var zh=()=>({editor:n,view:e})=>(requestAnimationFrame(()=>{var t;n.isDestroyed||(e.dom.blur(),(t=window==null?void 0:window.getSelection())==null||t.removeAllRanges())}),!0),Bh=(n=!0)=>({commands:e})=>e.setContent("",{emitUpdate:n}),Fh=()=>({state:n,tr:e,dispatch:t})=>{let{selection:r}=e,{ranges:i}=r;return t&&i.forEach(({$from:s,$to:o})=>{n.doc.nodesBetween(s.pos,o.pos,(l,a)=>{if(l.type.isText)return;let{doc:c,mapping:u}=e,d=c.resolve(u.map(a)),f=c.resolve(u.map(a+l.nodeSize)),h=d.blockRange(f);if(!h)return;let p=Fe(h);if(l.type.isTextblock){let{defaultType:m}=d.parent.contentMatchAt(d.index());e.setNodeMarkup(h.start,m)}(p||p===0)&&e.lift(h,p)})}),!0},Hh=n=>e=>n(e),$h=()=>({state:n,dispatch:e})=>ji(n,e),_h=(n,e)=>({editor:t,tr:r})=>{let{state:i}=t,s=i.doc.slice(n.from,n.to);r.deleteRange(n.from,n.to);let o=r.mapping.map(e);return r.insert(o,s.content),r.setSelection(new E(r.doc.resolve(Math.max(o-1,0)))),!0},Vh=()=>({tr:n,dispatch:e})=>{let{selection:t}=n,r=t.$anchor.node();if(r.content.size>0)return!1;let i=n.selection.$anchor;for(let s=i.depth;s>0;s-=1)if(i.node(s).type===r.type){if(e){let l=i.before(s),a=i.after(s);n.delete(l,a).scrollIntoView()}return!0}return!1};function V(n,e){if(typeof n=="string"){if(!e.nodes[n])throw Error(`There is no node type named '${n}'. Maybe you forgot to add the extension?`);return e.nodes[n]}return n}var jh=n=>({tr:e,state:t,dispatch:r})=>{let i=V(n,t.schema),s=e.selection.$anchor;for(let o=s.depth;o>0;o-=1)if(s.node(o).type===i){if(r){let a=s.before(o),c=s.after(o);e.delete(a,c).scrollIntoView()}return!0}return!1},Wh=n=>({tr:e,dispatch:t})=>{let{from:r,to:i}=n;return t&&e.delete(r,i),!0},Kh=()=>({state:n,dispatch:e})=>Gn(n,e),Uh=()=>({commands:n})=>n.keyboardShortcut("Enter"),Jh=()=>({state:n,dispatch:e})=>Vi(n,e);function Ls(n){return Object.prototype.toString.call(n)==="[object RegExp]"}function mr(n,e,t={strict:!0}){let r=Object.keys(e);return r.length?r.every(i=>t.strict?e[i]===n[i]:Ls(e[i])?e[i].test(n[i]):e[i]===n[i]):!0}function fc(n,e,t={}){return n.find(r=>r.type===e&&mr(Object.fromEntries(Object.keys(t).map(i=>[i,r.attrs[i]])),t))}function nc(n,e,t={}){return!!fc(n,e,t)}function zs(n,e,t){if(!n||!e)return;let r=n.parent.childAfter(n.parentOffset);if((!r.node||!r.node.marks.some(c=>c.type===e))&&(r=n.parent.childBefore(n.parentOffset)),!r.node||!r.node.marks.some(c=>c.type===e))return;if(!t){let c=r.node.marks.find(u=>u.type===e);c&&(t=c.attrs)}if(!fc([...r.node.marks],e,t))return;let s=r.index,o=n.start()+r.offset,l=s+1,a=o+r.node.nodeSize;for(;s>0&&nc([...n.parent.child(s-1).marks],e,t);)s-=1,o-=n.parent.child(s).nodeSize;for(;l({tr:t,state:r,dispatch:i})=>{let s=We(n,r.schema),{doc:o,selection:l}=t,{$from:a,from:c,to:u}=l;if(i){let d=zs(a,s,e);if(d&&d.from<=c&&d.to>=u){let f=E.create(o,d.from,d.to);t.setSelection(f)}}return!0},Gh=n=>e=>{let t=typeof n=="function"?n(e):n;for(let r=0;r({editor:t,view:r,tr:i,dispatch:s})=>{e={scrollIntoView:!0,...e};let o=()=>{(gr()||rc())&&r.dom.focus(),Yh()&&!gr()&&!rc()&&r.dom.focus({preventScroll:!0}),requestAnimationFrame(()=>{t.isDestroyed||(r.focus(),e!=null&&e.scrollIntoView&&t.commands.scrollIntoView())})};try{if(r.hasFocus()&&n===null||n===!1)return!0}catch{return!1}if(s&&n===null&&!hc(t.state.selection))return o(),!0;let l=pc(i.doc,n)||t.state.selection,a=t.state.selection.eq(l);return s&&(a||i.setSelection(l),a&&i.storedMarks&&i.setStoredMarks(i.storedMarks),o()),!0},Qh=(n,e)=>t=>n.every((r,i)=>e(r,{...t,index:i})),Zh=(n,e)=>({tr:t,commands:r})=>r.insertContentAt({from:t.selection.from,to:t.selection.to},n,e),mc=n=>{let e=n.childNodes;for(let t=e.length-1;t>=0;t-=1){let r=e[t];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?n.removeChild(r):r.nodeType===1&&mc(r)}return n};function ur(n){if(typeof window=="undefined")throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");let e=`${n}`,t=new window.DOMParser().parseFromString(e,"text/html").body;return mc(t)}function bn(n,e,t){if(n instanceof de||n instanceof k)return n;t={slice:!0,parseOptions:{},...t};let r=typeof n=="object"&&n!==null,i=typeof n=="string";if(r)try{if(Array.isArray(n)&&n.length>0)return k.fromArray(n.map(l=>e.nodeFromJSON(l)));let o=e.nodeFromJSON(n);return t.errorOnInvalidContent&&o.check(),o}catch(s){if(t.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:s});return console.warn("[tiptap warn]: Invalid content.","Passed value:",n,"Error:",s),bn("",e,t)}if(i){if(t.errorOnInvalidContent){let o=!1,l="",a=new Nt({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:c=>(o=!0,l=typeof c=="string"?c:c.outerHTML,null)}]}})});if(t.slice?ve.fromSchema(a).parseSlice(ur(n),t.parseOptions):ve.fromSchema(a).parse(ur(n),t.parseOptions),t.errorOnInvalidContent&&o)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${l}`)})}let s=ve.fromSchema(e);return t.slice?s.parseSlice(ur(n),t.parseOptions).content:s.parse(ur(n),t.parseOptions)}return bn("",e,t)}function ep(n,e,t){let r=n.steps.length-1;if(r{o===0&&(o=u)}),n.setSelection(N.near(n.doc.resolve(o),t))}var tp=n=>!("type"in n),np=(n,e,t)=>({tr:r,dispatch:i,editor:s})=>{var o;if(i){t={parseOptions:s.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...t};let l,a=g=>{s.emit("contentError",{editor:s,error:g,disableCollaboration:()=>{"collaboration"in s.storage&&typeof s.storage.collaboration=="object"&&s.storage.collaboration&&(s.storage.collaboration.isDisabled=!0)}})},c={preserveWhitespace:"full",...t.parseOptions};if(!t.errorOnInvalidContent&&!s.options.enableContentCheck&&s.options.emitContentError)try{bn(e,s.schema,{parseOptions:c,errorOnInvalidContent:!0})}catch(g){a(g)}try{l=bn(e,s.schema,{parseOptions:c,errorOnInvalidContent:(o=t.errorOnInvalidContent)!=null?o:s.options.enableContentCheck})}catch(g){return a(g),!1}let{from:u,to:d}=typeof n=="number"?{from:n,to:n}:{from:n.from,to:n.to},f=!0,h=!0;if((tp(l)?l:[l]).forEach(g=>{g.check(),f=f?g.isText&&g.marks.length===0:!1,h=h?g.isBlock:!1}),u===d&&h){let{parent:g}=r.doc.resolve(u);g.isTextblock&&!g.type.spec.code&&!g.childCount&&(u-=1,d+=1)}let m;if(f){if(Array.isArray(e))m=e.map(g=>g.text||"").join("");else if(e instanceof k){let g="";e.forEach(y=>{y.text&&(g+=y.text)}),m=g}else typeof e=="object"&&e&&e.text?m=e.text:m=e;r.insertText(m,u,d)}else{m=l;let g=r.doc.resolve(u),y=g.node(),x=g.parentOffset===0,C=y.isText||y.isTextblock,A=y.content.size>0;x&&C&&A&&h&&(u=Math.max(0,u-1)),r.replaceWith(u,d,m)}t.updateSelection&&ep(r,r.steps.length-1,-1),t.applyInputRules&&r.setMeta("applyInputRules",{from:u,text:m}),t.applyPasteRules&&r.setMeta("applyPasteRules",{from:u,text:m})}return!0},rp=()=>({state:n,dispatch:e})=>Pl(n,e),ip=()=>({state:n,dispatch:e})=>Ll(n,e),sp=()=>({state:n,dispatch:e})=>Pi(n,e),op=()=>({state:n,dispatch:e})=>Bi(n,e),lp=()=>({state:n,dispatch:e,tr:t})=>{try{let r=dt(n.doc,n.selection.$from.pos,-1);return r==null?!1:(t.join(r,2),e&&e(t),!0)}catch{return!1}},ap=()=>({state:n,dispatch:e,tr:t})=>{try{let r=dt(n.doc,n.selection.$from.pos,1);return r==null?!1:(t.join(r,2),e&&e(t),!0)}catch{return!1}},cp=()=>({state:n,dispatch:e})=>Ol(n,e),up=()=>({state:n,dispatch:e})=>Il(n,e);function gc(){return typeof navigator!="undefined"?/Mac/.test(navigator.platform):!1}function dp(n){let e=n.split(/-(?!$)/),t=e[e.length-1];t==="Space"&&(t=" ");let r,i,s,o;for(let l=0;l({editor:e,view:t,tr:r,dispatch:i})=>{let s=dp(n).split(/-(?!$)/),o=s.find(c=>!["Alt","Ctrl","Meta","Shift"].includes(c)),l=new KeyboardEvent("keydown",{key:o==="Space"?" ":o,altKey:s.includes("Alt"),ctrlKey:s.includes("Ctrl"),metaKey:s.includes("Meta"),shiftKey:s.includes("Shift"),bubbles:!0,cancelable:!0}),a=e.captureTransaction(()=>{t.someProp("handleKeyDown",c=>c(t,l))});return a==null||a.steps.forEach(c=>{let u=c.map(r.mapping);u&&i&&r.maybeStep(u)}),!0};function Ae(n,e,t={}){let{from:r,to:i,empty:s}=n.selection,o=e?V(e,n.schema):null,l=[];n.doc.nodesBetween(r,i,(d,f)=>{if(d.isText)return;let h=Math.max(r,f),p=Math.min(i,f+d.nodeSize);l.push({node:d,from:h,to:p})});let a=i-r,c=l.filter(d=>o?o.name===d.node.type.name:!0).filter(d=>mr(d.node.attrs,t,{strict:!1}));return s?!!c.length:c.reduce((d,f)=>d+f.to-f.from,0)>=a}var hp=(n,e={})=>({state:t,dispatch:r})=>{let i=V(n,t.schema);return Ae(t,i,e)?zl(t,r):!1},pp=()=>({state:n,dispatch:e})=>Wi(n,e),mp=n=>({state:e,dispatch:t})=>{let r=V(n,e.schema);return Vl(r)(e,t)},gp=()=>({state:n,dispatch:e})=>$i(n,e);function br(n,e){return e.nodes[n]?"node":e.marks[n]?"mark":null}function ic(n,e){let t=typeof e=="string"?[e]:e;return Object.keys(n).reduce((r,i)=>(t.includes(i)||(r[i]=n[i]),r),{})}var yp=(n,e)=>({tr:t,state:r,dispatch:i})=>{let s=null,o=null,l=br(typeof n=="string"?n:n.name,r.schema);if(!l)return!1;l==="node"&&(s=V(n,r.schema)),l==="mark"&&(o=We(n,r.schema));let a=!1;return t.selection.ranges.forEach(c=>{r.doc.nodesBetween(c.$from.pos,c.$to.pos,(u,d)=>{s&&s===u.type&&(a=!0,i&&t.setNodeMarkup(d,void 0,ic(u.attrs,e))),o&&u.marks.length&&u.marks.forEach(f=>{o===f.type&&(a=!0,i&&t.addMark(d,d+u.nodeSize,o.create(ic(f.attrs,e))))})})}),a},kp=()=>({tr:n,dispatch:e})=>(e&&n.scrollIntoView(),!0),bp=()=>({tr:n,dispatch:e})=>{if(e){let t=new ae(n.doc);n.setSelection(t)}return!0},xp=()=>({state:n,dispatch:e})=>Li(n,e),Sp=()=>({state:n,dispatch:e})=>Fi(n,e),Mp=()=>({state:n,dispatch:e})=>Bl(n,e),wp=()=>({state:n,dispatch:e})=>Ui(n,e),Cp=()=>({state:n,dispatch:e})=>Ki(n,e);function Rs(n,e,t={},r={}){return bn(n,e,{slice:!1,parseOptions:t,errorOnInvalidContent:r.errorOnInvalidContent})}var vp=(n,{errorOnInvalidContent:e,emitUpdate:t=!0,parseOptions:r={}}={})=>({editor:i,tr:s,dispatch:o,commands:l})=>{let{doc:a}=s;if(r.preserveWhitespace!=="full"){let c=Rs(n,i.schema,r,{errorOnInvalidContent:e!=null?e:i.options.enableContentCheck});return o&&s.replaceWith(0,a.content.size,c).setMeta("preventUpdate",!t),!0}return o&&s.setMeta("preventUpdate",!t),l.insertContentAt({from:0,to:a.content.size},n,{parseOptions:r,errorOnInvalidContent:e!=null?e:i.options.enableContentCheck})};function yc(n,e){let t=We(e,n.schema),{from:r,to:i,empty:s}=n.selection,o=[];s?(n.storedMarks&&o.push(...n.storedMarks),o.push(...n.selection.$head.marks())):n.doc.nodesBetween(r,i,a=>{o.push(...a.marks)});let l=o.find(a=>a.type.name===t.name);return l?{...l.attrs}:{}}function Bs(n,e){let t=new Rt(n);return e.forEach(r=>{r.steps.forEach(i=>{t.step(i)})}),t}function Tp(n){for(let e=0;e{t(i)&&r.push({node:i,pos:s})}),r}function Ep(n,e){for(let t=n.depth;t>0;t-=1){let r=n.node(t);if(e(r))return{pos:t>0?n.before(t):0,start:n.start(t),depth:t,node:r}}}function xr(n){return e=>Ep(e.$from,n)}function T(n,e,t){return n.config[e]===void 0&&n.parent?T(n.parent,e,t):typeof n.config[e]=="function"?n.config[e].bind({...t,parent:n.parent?T(n.parent,e,t):null}):n.config[e]}function Fs(n){return n.map(e=>{let t={name:e.name,options:e.options,storage:e.storage},r=T(e,"addExtensions",t);return r?[e,...Fs(r())]:e}).flat(10)}function Hs(n,e){let t=Le.fromSchema(e).serializeFragment(n),i=document.implementation.createHTMLDocument().createElement("div");return i.appendChild(t),i.innerHTML}function bc(n){return typeof n=="function"}function H(n,e=void 0,...t){return bc(n)?e?n.bind(e)(...t):n(...t):n}function Ap(n={}){return Object.keys(n).length===0&&n.constructor===Object}function jt(n){let e=n.filter(i=>i.type==="extension"),t=n.filter(i=>i.type==="node"),r=n.filter(i=>i.type==="mark");return{baseExtensions:e,nodeExtensions:t,markExtensions:r}}function xc(n){let e=[],{nodeExtensions:t,markExtensions:r}=jt(n),i=[...t,...r],s={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1},o=t.filter(c=>c.name!=="text").map(c=>c.name),l=r.map(c=>c.name),a=[...o,...l];return n.forEach(c=>{let u={name:c.name,options:c.options,storage:c.storage,extensions:i},d=T(c,"addGlobalAttributes",u);if(!d)return;d().forEach(h=>{let p;Array.isArray(h.types)?p=h.types:h.types==="*"?p=a:h.types==="nodes"?p=o:h.types==="marks"?p=l:p=[],p.forEach(m=>{Object.entries(h.attributes).forEach(([g,y])=>{e.push({type:m,name:g,attribute:{...s,...y}})})})})}),i.forEach(c=>{let u={name:c.name,options:c.options,storage:c.storage},d=T(c,"addAttributes",u);if(!d)return;let f=d();Object.entries(f).forEach(([h,p])=>{let m={...s,...p};typeof(m==null?void 0:m.default)=="function"&&(m.default=m.default()),m!=null&&m.isRequired&&(m==null?void 0:m.default)===void 0&&delete m.default,e.push({type:c.name,name:h,attribute:m})})}),e}function Np(n){let e=[],t="",r=!1,i=!1,s=0,o=n.length;for(let l=0;l0){s-=1,t+=a;continue}if(a===";"&&s===0){e.push(t),t="";continue}}t+=a}return t&&e.push(t),e}function sc(n){let e=[],t=Np(n||""),r=t.length;for(let i=0;i!!e).reduce((e,t)=>{let r={...e};return Object.entries(t).forEach(([i,s])=>{if(!r[i]){r[i]=s;return}if(i==="class"){let l=s?String(s).split(" "):[],a=r[i]?r[i].split(" "):[],c=l.filter(u=>!a.includes(u));r[i]=[...a,...c].join(" ")}else if(i==="style"){let l=new Map([...sc(r[i]),...sc(s)]);r[i]=Array.from(l.entries()).map(([a,c])=>`${a}: ${c}`).join("; ")}else r[i]=s}),r},{})}function Wt(n,e){return e.filter(t=>t.type===n.type.name).filter(t=>t.attribute.rendered).map(t=>t.attribute.renderHTML?t.attribute.renderHTML(n.attrs)||{}:{[t.name]:n.attrs[t.name]}).reduce((t,r)=>R(t,r),{})}function Op(n){return typeof n!="string"?n:n.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(n):n==="true"?!0:n==="false"?!1:n}function oc(n,e){return"style"in n?n:{...n,getAttrs:t=>{let r=n.getAttrs?n.getAttrs(t):n.attrs;if(r===!1)return!1;let i=e.reduce((s,o)=>{let l=o.attribute.parseHTML?o.attribute.parseHTML(t):Op(t.getAttribute(o.name));return l==null?s:{...s,[o.name]:l}},{});return{...r,...i}}}}function lc(n){return Object.fromEntries(Object.entries(n).filter(([e,t])=>e==="attrs"&&Ap(t)?!1:t!=null))}function ac(n){var e,t;let r={};return!((e=n==null?void 0:n.attribute)!=null&&e.isRequired)&&"default"in((n==null?void 0:n.attribute)||{})&&(r.default=n.attribute.default),((t=n==null?void 0:n.attribute)==null?void 0:t.validate)!==void 0&&(r.validate=n.attribute.validate),[n.name,r]}function Ip(n,e){var t;let r=xc(n),{nodeExtensions:i,markExtensions:s}=jt(n),o=(t=i.find(c=>T(c,"topNode")))==null?void 0:t.name,l=Object.fromEntries(i.map(c=>{let u=r.filter(y=>y.type===c.name),d={name:c.name,options:c.options,storage:c.storage,editor:e},f=n.reduce((y,x)=>{let C=T(x,"extendNodeSchema",d);return{...y,...C?C(c):{}}},{}),h=lc({...f,content:H(T(c,"content",d)),marks:H(T(c,"marks",d)),group:H(T(c,"group",d)),inline:H(T(c,"inline",d)),atom:H(T(c,"atom",d)),selectable:H(T(c,"selectable",d)),draggable:H(T(c,"draggable",d)),code:H(T(c,"code",d)),whitespace:H(T(c,"whitespace",d)),linebreakReplacement:H(T(c,"linebreakReplacement",d)),defining:H(T(c,"defining",d)),isolating:H(T(c,"isolating",d)),attrs:Object.fromEntries(u.map(ac))}),p=H(T(c,"parseHTML",d));p&&(h.parseDOM=p.map(y=>oc(y,u)));let m=T(c,"renderHTML",d);m&&(h.toDOM=y=>m({node:y,HTMLAttributes:Wt(y,u)}));let g=T(c,"renderText",d);return g&&(h.toText=g),[c.name,h]})),a=Object.fromEntries(s.map(c=>{let u=r.filter(g=>g.type===c.name),d={name:c.name,options:c.options,storage:c.storage,editor:e},f=n.reduce((g,y)=>{let x=T(y,"extendMarkSchema",d);return{...g,...x?x(c):{}}},{}),h=lc({...f,inclusive:H(T(c,"inclusive",d)),excludes:H(T(c,"excludes",d)),group:H(T(c,"group",d)),spanning:H(T(c,"spanning",d)),code:H(T(c,"code",d)),attrs:Object.fromEntries(u.map(ac))}),p=H(T(c,"parseHTML",d));p&&(h.parseDOM=p.map(g=>oc(g,u)));let m=T(c,"renderHTML",d);return m&&(h.toDOM=g=>m({mark:g,HTMLAttributes:Wt(g,u)})),[c.name,h]}));return new Nt({topNode:o,nodes:l,marks:a})}function Rp(n){let e=n.filter((t,r)=>n.indexOf(t)!==r);return Array.from(new Set(e))}function kn(n){return n.sort((t,r)=>{let i=T(t,"priority")||100,s=T(r,"priority")||100;return i>s?-1:ir.name));return t.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${t.map(r=>`'${r}'`).join(", ")}]. This can lead to issues.`),e}function Mc(n,e,t){let{from:r,to:i}=e,{blockSeparator:s=` +`);return{dom:a,text:f,slice:e}}function $a(n,e,t,r,i){let s=i.parent.type.spec.code,o,l;if(!t&&!e)return null;let a=!!e&&(r||s||!t);if(a){if(n.someProp("transformPastedText",f=>{e=f(e,s||r,n)}),s)return l=new S(k.from(n.state.schema.text(e.replace(/\r\n?/g,` +`))),0,0),n.someProp("transformPasted",f=>{l=f(l,n,!0)}),l;let d=n.someProp("clipboardTextParser",f=>f(e,i,r,n));if(d)l=d;else{let f=i.marks(),{schema:h}=n.state,p=Le.fromSchema(h);o=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(m=>{let g=o.appendChild(document.createElement("p"));m&&g.appendChild(p.serializeNode(h.text(m,f)))})}}else n.someProp("transformPastedHTML",d=>{t=d(t,n)}),o=Wf(t),mn&&Kf(o);let c=o&&o.querySelector("[data-pm-slice]"),u=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let d=+u[3];d>0;d--){let f=o.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;o=f}if(l||(l=(n.someProp("clipboardParser")||n.someProp("domParser")||ve.fromSchema(n.state.schema)).parseSlice(o,{preserveWhitespace:!!(a||u),context:i,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!_f.test(f.parentNode.nodeName)?{ignore:!0}:null}})),u)l=Uf(da(l,+u[1],+u[2]),u[4]);else if(l=S.maxOpen(Vf(l.content,i),!0),l.openStart||l.openEnd){let d=0,f=0;for(let h=l.content.firstChild;d{l=d(l,n,a)}),l}var _f=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function Vf(n,e){if(n.childCount<2)return n;for(let t=e.depth;t>=0;t--){let i=e.node(t).contentMatchAt(e.index(t)),s,o=[];if(n.forEach(l=>{if(!o)return;let a=i.findWrapping(l.type),c;if(!a)return o=null;if(c=o.length&&s.length&&Va(a,s,l,o[o.length-1],0))o[o.length-1]=c;else{o.length&&(o[o.length-1]=ja(o[o.length-1],s.length));let u=_a(l,a);o.push(u),i=i.matchType(u.type),s=a}}),o)return k.from(o)}return n}function _a(n,e,t=0){for(let r=e.length-1;r>=t;r--)n=e[r].create(null,k.from(n));return n}function Va(n,e,t,r,i){if(i1&&(s=0),i=t&&(l=e<0?o.contentMatchAt(0).fillBefore(l,s<=i).append(l):l.append(o.contentMatchAt(o.childCount).fillBefore(k.empty,!0))),n.replaceChild(e<0?0:n.childCount-1,o.copy(l))}function da(n,e,t){return et})),Qi.createHTML(n)):n}function Wf(n){let e=/^(\s*]*>)*/.exec(n);e&&(n=n.slice(e[0].length));let t=Ka().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(n),i;if((i=r&&Wa[r[1].toLowerCase()])&&(n=i.map(s=>"<"+s+">").join("")+n+i.map(s=>"").reverse().join("")),t.innerHTML=jf(n),i)for(let s=0;s=0;l-=2){let a=t.nodes[r[l]];if(!a||a.hasRequiredAttrs())break;i=k.from(a.create(r[l+1],i)),s++,o++}return new S(i,s,o)}var ce={},ue={},Jf={touchstart:!0,touchmove:!0},ps=class{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}};function qf(n){for(let e in ce){let t=ce[e];n.dom.addEventListener(e,n.input.eventHandlers[e]=r=>{Yf(n,r)&&!Cs(n,r)&&(n.editable||!(r.type in ue))&&t(n,r)},Jf[e]?{passive:!0}:void 0)}ie&&n.dom.addEventListener("input",()=>null),ms(n)}function Qe(n,e){n.input.lastSelectionOrigin=e,n.input.lastSelectionTime=Date.now()}function Gf(n){n.domObserver.stop();for(let e in n.input.eventHandlers)n.dom.removeEventListener(e,n.input.eventHandlers[e]);clearTimeout(n.input.composingTimeout),clearTimeout(n.input.lastIOSEnterFallbackTimeout)}function ms(n){n.someProp("handleDOMEvents",e=>{for(let t in e)n.input.eventHandlers[t]||n.dom.addEventListener(t,n.input.eventHandlers[t]=r=>Cs(n,r))})}function Cs(n,e){return n.someProp("handleDOMEvents",t=>{let r=t[e.type];return r?r(n,e)||e.defaultPrevented:!1})}function Yf(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target;t!=n.dom;t=t.parentNode)if(!t||t.nodeType==11||t.pmViewDesc&&t.pmViewDesc.stopEvent(e))return!1;return!0}function Xf(n,e){!Cs(n,e)&&ce[e.type]&&(n.editable||!(e.type in ue))&&ce[e.type](n,e)}ue.keydown=(n,e)=>{let t=e;if(n.input.shiftKey=t.keyCode==16||t.shiftKey,!Ja(n,t)&&(n.input.lastKeyCode=t.keyCode,n.input.lastKeyCodeTime=Date.now(),!(_e&&ee&&t.keyCode==13)))if(t.keyCode!=229&&n.domObserver.forceFlush(),_t&&t.keyCode==13&&!t.ctrlKey&&!t.altKey&&!t.metaKey){let r=Date.now();n.input.lastIOSEnter=r,n.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{n.input.lastIOSEnter==r&&(n.someProp("handleKeyDown",i=>i(n,ht(13,"Enter"))),n.input.lastIOSEnter=0)},200)}else n.someProp("handleKeyDown",r=>r(n,t))||$f(n,t)?t.preventDefault():Qe(n,"key")};ue.keyup=(n,e)=>{e.keyCode==16&&(n.input.shiftKey=!1)};ue.keypress=(n,e)=>{let t=e;if(Ja(n,t)||!t.charCode||t.ctrlKey&&!t.altKey||ye&&t.metaKey)return;if(n.someProp("handleKeyPress",i=>i(n,t))){t.preventDefault();return}let r=n.state.selection;if(!(r instanceof E)||!r.$from.sameParent(r.$to)){let i=String.fromCharCode(t.charCode),s=()=>n.state.tr.insertText(i).scrollIntoView();!/[\r\n]/.test(i)&&!n.someProp("handleTextInput",o=>o(n,r.$from.pos,r.$to.pos,i,s))&&n.dispatch(s()),t.preventDefault()}};function lr(n){return{left:n.clientX,top:n.clientY}}function Qf(n,e){let t=e.x-n.clientX,r=e.y-n.clientY;return t*t+r*r<100}function vs(n,e,t,r,i){if(r==-1)return!1;let s=n.state.doc.resolve(r);for(let o=s.depth+1;o>0;o--)if(n.someProp(e,l=>o>s.depth?l(n,t,s.nodeAfter,s.before(o),i,!0):l(n,t,s.node(o),s.before(o),i,!1)))return!0;return!1}function Ht(n,e,t){if(n.focused||n.focus(),n.state.selection.eq(e))return;let r=n.state.tr.setSelection(e);t=="pointer"&&r.setMeta("pointer",!0),n.dispatch(r)}function Zf(n,e){if(e==-1)return!1;let t=n.state.doc.resolve(e),r=t.nodeAfter;return r&&r.isAtom&&M.isSelectable(r)?(Ht(n,new M(t),"pointer"),!0):!1}function eh(n,e){if(e==-1)return!1;let t=n.state.selection,r,i;t instanceof M&&(r=t.node);let s=n.state.doc.resolve(e);for(let o=s.depth+1;o>0;o--){let l=o>s.depth?s.nodeAfter:s.node(o);if(M.isSelectable(l)){r&&t.$from.depth>0&&o>=t.$from.depth&&s.before(t.$from.depth+1)==t.$from.pos?i=s.before(t.$from.depth):i=s.before(o);break}}return i!=null?(Ht(n,M.create(n.state.doc,i),"pointer"),!0):!1}function th(n,e,t,r,i){return vs(n,"handleClickOn",e,t,r)||n.someProp("handleClick",s=>s(n,e,r))||(i?eh(n,t):Zf(n,t))}function nh(n,e,t,r){return vs(n,"handleDoubleClickOn",e,t,r)||n.someProp("handleDoubleClick",i=>i(n,e,r))}function rh(n,e,t,r){return vs(n,"handleTripleClickOn",e,t,r)||n.someProp("handleTripleClick",i=>i(n,e,r))||ih(n,t,r)}function ih(n,e,t){if(t.button!=0)return!1;let r=n.state.doc;if(e==-1)return r.inlineContent?(Ht(n,E.create(r,0,r.content.size),"pointer"),!0):!1;let i=r.resolve(e);for(let s=i.depth+1;s>0;s--){let o=s>i.depth?i.nodeAfter:i.node(s),l=i.before(s);if(o.inlineContent)Ht(n,E.create(r,l+1,l+1+o.content.size),"pointer");else if(M.isSelectable(o))Ht(n,M.create(r,l),"pointer");else continue;return!0}}function Ts(n){return tr(n)}var Ua=ye?"metaKey":"ctrlKey";ce.mousedown=(n,e)=>{let t=e;n.input.shiftKey=t.shiftKey;let r=Ts(n),i=Date.now(),s="singleClick";i-n.input.lastClick.time<500&&Qf(t,n.input.lastClick)&&!t[Ua]&&n.input.lastClick.button==t.button&&(n.input.lastClick.type=="singleClick"?s="doubleClick":n.input.lastClick.type=="doubleClick"&&(s="tripleClick")),n.input.lastClick={time:i,x:t.clientX,y:t.clientY,type:s,button:t.button};let o=n.posAtCoords(lr(t));o&&(s=="singleClick"?(n.input.mouseDown&&n.input.mouseDown.done(),n.input.mouseDown=new gs(n,o,t,!!r)):(s=="doubleClick"?nh:rh)(n,o.pos,o.inside,t)?t.preventDefault():Qe(n,"pointer"))};var gs=class{constructor(e,t,r,i){this.view=e,this.pos=t,this.event=r,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[Ua],this.allowDefault=r.shiftKey;let s,o;if(t.inside>-1)s=e.state.doc.nodeAt(t.inside),o=t.inside;else{let u=e.state.doc.resolve(t.pos);s=u.parent,o=u.depth?u.before():0}let l=i?null:r.target,a=l?e.docView.nearestDesc(l,!0):null;this.target=a&&a.nodeDOM.nodeType==1?a.nodeDOM:null;let{selection:c}=e.state;r.button==0&&(s.type.spec.draggable&&s.type.spec.selectable!==!1||c instanceof M&&c.from<=o&&c.to>o)&&(this.mightDrag={node:s,pos:o,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&be&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),Qe(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>Ve(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(lr(e))),this.updateAllowDefault(e),this.allowDefault||!t?Qe(this.view,"pointer"):th(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||ie&&this.mightDrag&&!this.mightDrag.node.isAtom||ee&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(Ht(this.view,N.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):Qe(this.view,"pointer")}move(e){this.updateAllowDefault(e),Qe(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}};ce.touchstart=n=>{n.input.lastTouch=Date.now(),Ts(n),Qe(n,"pointer")};ce.touchmove=n=>{n.input.lastTouch=Date.now(),Qe(n,"pointer")};ce.contextmenu=n=>Ts(n);function Ja(n,e){return n.composing?!0:ie&&Math.abs(e.timeStamp-n.input.compositionEndedAt)<500?(n.input.compositionEndedAt=-2e8,!0):!1}var sh=_e?5e3:-1;ue.compositionstart=ue.compositionupdate=n=>{if(!n.composing){n.domObserver.flush();let{state:e}=n,t=e.selection.$to;if(e.selection instanceof E&&(e.storedMarks||!t.textOffset&&t.parentOffset&&t.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||ee&&Ta&&oh(n)))n.markCursor=n.state.storedMarks||t.marks(),tr(n,!0),n.markCursor=null;else if(tr(n,!e.selection.empty),be&&e.selection.empty&&t.parentOffset&&!t.textOffset&&t.nodeBefore.marks.length){let r=n.domSelectionRange();for(let i=r.focusNode,s=r.focusOffset;i&&i.nodeType==1&&s!=0;){let o=s<0?i.lastChild:i.childNodes[s-1];if(!o)break;if(o.nodeType==3){let l=n.domSelection();l&&l.collapse(o,o.nodeValue.length);break}else i=o,s=-1}}n.input.composing=!0}qa(n,sh)};function oh(n){let{focusNode:e,focusOffset:t}=n.domSelectionRange();if(!e||e.nodeType!=1||t>=e.childNodes.length)return!1;let r=e.childNodes[t];return r.nodeType==1&&r.contentEditable=="false"}ue.compositionend=(n,e)=>{n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=e.timeStamp,n.input.compositionPendingChanges=n.domObserver.pendingRecords().length?n.input.compositionID:0,n.input.compositionNode=null,n.input.badSafariComposition?n.domObserver.forceFlush():n.input.compositionPendingChanges&&Promise.resolve().then(()=>n.domObserver.flush()),n.input.compositionID++,qa(n,20))};function qa(n,e){clearTimeout(n.input.composingTimeout),e>-1&&(n.input.composingTimeout=setTimeout(()=>tr(n),e))}function Ga(n){for(n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=ah());n.input.compositionNodes.length>0;)n.input.compositionNodes.pop().markParentsDirty()}function lh(n){let e=n.domSelectionRange();if(!e.focusNode)return null;let t=rf(e.focusNode,e.focusOffset),r=sf(e.focusNode,e.focusOffset);if(t&&r&&t!=r){let i=r.pmViewDesc,s=n.domObserver.lastChangedTextNode;if(t==s||r==s)return s;if(!i||!i.isText(r.nodeValue))return r;if(n.input.compositionNode==r){let o=t.pmViewDesc;if(!(!o||!o.isText(t.nodeValue)))return r}}return t||r}function ah(){let n=document.createEvent("Event");return n.initEvent("event",!0,!0),n.timeStamp}function tr(n,e=!1){if(!(_e&&n.domObserver.flushingSoon>=0)){if(n.domObserver.forceFlush(),Ga(n),e||n.docView&&n.docView.dirty){let t=Ss(n),r=n.state.selection;return t&&!t.eq(r)?n.dispatch(n.state.tr.setSelection(t)):(n.markCursor||e)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?n.dispatch(n.state.tr.deleteSelection()):n.updateState(n.state),!0}return!1}}function ch(n,e){if(!n.dom.parentNode)return;let t=n.dom.parentNode.appendChild(document.createElement("div"));t.appendChild(e),t.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),i=document.createRange();i.selectNodeContents(e),n.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(()=>{t.parentNode&&t.parentNode.removeChild(t),n.focus()},50)}var un=fe&&Ze<15||_t&&cf<604;ce.copy=ue.cut=(n,e)=>{let t=e,r=n.state.selection,i=t.type=="cut";if(r.empty)return;let s=un?null:t.clipboardData,o=r.content(),{dom:l,text:a}=ws(n,o);s?(t.preventDefault(),s.clearData(),s.setData("text/html",l.innerHTML),s.setData("text/plain",a)):ch(n,l),i&&n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function uh(n){return n.openStart==0&&n.openEnd==0&&n.content.childCount==1?n.content.firstChild:null}function dh(n,e){if(!n.dom.parentNode)return;let t=n.input.shiftKey||n.state.selection.$from.parent.type.spec.code,r=n.dom.parentNode.appendChild(document.createElement(t?"textarea":"div"));t||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let i=n.input.shiftKey&&n.input.lastKeyCode!=45;setTimeout(()=>{n.focus(),r.parentNode&&r.parentNode.removeChild(r),t?dn(n,r.value,null,i,e):dn(n,r.textContent,r.innerHTML,i,e)},50)}function dn(n,e,t,r,i){let s=$a(n,e,t,r,n.state.selection.$from);if(n.someProp("handlePaste",a=>a(n,i,s||S.empty)))return!0;if(!s)return!1;let o=uh(s),l=o?n.state.tr.replaceSelectionWith(o,r):n.state.tr.replaceSelection(s);return n.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function Ya(n){let e=n.getData("text/plain")||n.getData("Text");if(e)return e;let t=n.getData("text/uri-list");return t?t.replace(/\r?\n/g," "):""}ue.paste=(n,e)=>{let t=e;if(n.composing&&!_e)return;let r=un?null:t.clipboardData,i=n.input.shiftKey&&n.input.lastKeyCode!=45;r&&dn(n,Ya(r),r.getData("text/html"),i,t)?t.preventDefault():dh(n,t)};var nr=class{constructor(e,t,r){this.slice=e,this.move=t,this.node=r}},fh=ye?"altKey":"ctrlKey";function Xa(n,e){let t;return n.someProp("dragCopies",r=>{t=t||r(e)}),t!=null?!t:!e[fh]}ce.dragstart=(n,e)=>{let t=e,r=n.input.mouseDown;if(r&&r.done(),!t.dataTransfer)return;let i=n.state.selection,s=i.empty?null:n.posAtCoords(lr(t)),o;if(!(s&&s.pos>=i.from&&s.pos<=(i instanceof M?i.to-1:i.to))){if(r&&r.mightDrag)o=M.create(n.state.doc,r.mightDrag.pos);else if(t.target&&t.target.nodeType==1){let d=n.docView.nearestDesc(t.target,!0);d&&d.node.type.spec.draggable&&d!=n.docView&&(o=M.create(n.state.doc,d.posBefore))}}let l=(o||n.state.selection).content(),{dom:a,text:c,slice:u}=ws(n,l);(!t.dataTransfer.files.length||!ee||va>120)&&t.dataTransfer.clearData(),t.dataTransfer.setData(un?"Text":"text/html",a.innerHTML),t.dataTransfer.effectAllowed="copyMove",un||t.dataTransfer.setData("text/plain",c),n.dragging=new nr(u,Xa(n,t),o)};ce.dragend=n=>{let e=n.dragging;window.setTimeout(()=>{n.dragging==e&&(n.dragging=null)},50)};ue.dragover=ue.dragenter=(n,e)=>e.preventDefault();ue.drop=(n,e)=>{try{hh(n,e,n.dragging)}finally{n.dragging=null}};function hh(n,e,t){if(!e.dataTransfer)return;let r=n.posAtCoords(lr(e));if(!r)return;let i=n.state.doc.resolve(r.pos),s=t&&t.slice;s?n.someProp("transformPasted",h=>{s=h(s,n,!1)}):s=$a(n,Ya(e.dataTransfer),un?null:e.dataTransfer.getData("text/html"),!1,i);let o=!!(t&&Xa(n,e));if(n.someProp("handleDrop",h=>h(n,e,s||S.empty,o))){e.preventDefault();return}if(!s)return;e.preventDefault();let l=s?Wn(n.state.doc,i.pos,s):i.pos;l==null&&(l=i.pos);let a=n.state.tr;if(o){let{node:h}=t;h?h.replace(a):a.deleteSelection()}let c=a.mapping.map(l),u=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,d=a.doc;if(u?a.replaceRangeWith(c,c,s.content.firstChild):a.replaceRange(c,c,s),a.doc.eq(d))return;let f=a.doc.resolve(c);if(u&&M.isSelectable(s.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(s.content.firstChild))a.setSelection(new M(f));else{let h=a.mapping.map(l);a.mapping.maps[a.mapping.maps.length-1].forEach((p,m,g,y)=>h=y),a.setSelection(Ms(n,f,a.doc.resolve(h)))}n.focus(),n.dispatch(a.setMeta("uiEvent","drop"))}ce.focus=n=>{n.input.lastFocus=Date.now(),n.focused||(n.domObserver.stop(),n.dom.classList.add("ProseMirror-focused"),n.domObserver.start(),n.focused=!0,setTimeout(()=>{n.docView&&n.hasFocus()&&!n.domObserver.currentSelection.eq(n.domSelectionRange())&&Ve(n)},20))};ce.blur=(n,e)=>{let t=e;n.focused&&(n.domObserver.stop(),n.dom.classList.remove("ProseMirror-focused"),n.domObserver.start(),t.relatedTarget&&n.dom.contains(t.relatedTarget)&&n.domObserver.currentSelection.clear(),n.focused=!1)};ce.beforeinput=(n,e)=>{if(ee&&_e&&e.inputType=="deleteContentBackward"){n.domObserver.flushSoon();let{domChangeCount:r}=n.input;setTimeout(()=>{if(n.input.domChangeCount!=r||(n.dom.blur(),n.focus(),n.someProp("handleKeyDown",s=>s(n,ht(8,"Backspace")))))return;let{$cursor:i}=n.state.selection;i&&i.pos>0&&n.dispatch(n.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let n in ue)ce[n]=ue[n];function fn(n,e){if(n==e)return!0;for(let t in n)if(n[t]!==e[t])return!1;for(let t in e)if(!(t in n))return!1;return!0}var rr=class n{constructor(e,t){this.toDOM=e,this.spec=t||yt,this.side=this.spec.side||0}map(e,t,r,i){let{pos:s,deleted:o}=e.mapResult(t.from+i,this.side<0?-1:1);return o?null:new se(s-r,s-r,this)}valid(){return!0}eq(e){return this==e||e instanceof n&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&fn(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}},gt=class n{constructor(e,t){this.attrs=e,this.spec=t||yt}map(e,t,r,i){let s=e.map(t.from+i,this.spec.inclusiveStart?-1:1)-r,o=e.map(t.to+i,this.spec.inclusiveEnd?1:-1)-r;return s>=o?null:new se(s,o,this)}valid(e,t){return t.from=e&&(!s||s(l.spec))&&r.push(l.copy(l.from+i,l.to+i))}for(let o=0;oe){let l=this.children[o]+1;this.children[o+2].findInner(e-l,t-l,r,i+l,s)}}map(e,t,r){return this==re||e.maps.length==0?this:this.mapInner(e,t,0,0,r||yt)}mapInner(e,t,r,i,s){let o;for(let l=0;l{let c=a+r,u;if(u=Za(t,l,c)){for(i||(i=this.children.slice());sl&&d.to=e){this.children[l]==e&&(r=this.children[l+2]);break}let s=e+1,o=s+t.content.size;for(let l=0;ls&&a.type instanceof gt){let c=Math.max(s,a.from)-s,u=Math.min(o,a.to)-s;ci.map(e,t,yt));return n.from(r)}forChild(e,t){if(t.isLeaf)return W.empty;let r=[];for(let i=0;it instanceof W)?e:e.reduce((t,r)=>t.concat(r instanceof W?r:r.members),[]))}}forEachSet(e){for(let t=0;t{let g=m-p-(h-f);for(let y=0;yx+u-d)continue;let C=l[y]+u-d;h>=C?l[y+1]=f<=C?-2:-1:f>=u&&g&&(l[y]+=g,l[y+1]+=g)}d+=g}),u=t.maps[c].map(u,-1)}let a=!1;for(let c=0;c=r.content.size){a=!0;continue}let f=t.map(n[c+1]+s,-1),h=f-i,{index:p,offset:m}=r.content.findIndex(d),g=r.maybeChild(p);if(g&&m==d&&m+g.nodeSize==h){let y=l[c+2].mapInner(t,g,u+1,n[c]+s+1,o);y!=re?(l[c]=d,l[c+1]=h,l[c+2]=y):(l[c+1]=-2,a=!0)}else a=!0}if(a){let c=mh(l,n,e,t,i,s,o),u=sr(c,r,0,o);e=u.local;for(let d=0;dt&&o.to{let c=Za(n,l,a+t);if(c){s=!0;let u=sr(c,l,t+a+1,r);u!=re&&i.push(a,a+l.nodeSize,u)}});let o=Qa(s?ec(n):n,-t).sort(kt);for(let l=0;l0;)e++;n.splice(e,0,t)}function Zi(n){let e=[];return n.someProp("decorations",t=>{let r=t(n.state);r&&r!=re&&e.push(r)}),n.cursorWrapper&&e.push(W.create(n.state.doc,[n.cursorWrapper.deco])),ir.from(e)}var gh={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},yh=fe&&Ze<=11,ks=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}},bs=class{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new ks,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let i=0;ii.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():ie&&e.composing&&r.some(i=>i.type=="childList"&&i.target.nodeName=="TR")?(e.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),yh&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,gh)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;tthis.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(sa(this.view)){if(this.suppressingSelectionUpdates)return Ve(this.view);if(fe&&Ze<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&bt(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t=new Set,r;for(let s=e.focusNode;s;s=$t(s))t.add(s);for(let s=e.anchorNode;s;s=$t(s))if(t.has(s)){r=s;break}let i=r&&this.view.docView.nearestDesc(r);if(i&&i.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let t=this.pendingRecords();t.length&&(this.queue=[]);let r=e.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&sa(e)&&!this.ignoreSelectionChange(r),s=-1,o=-1,l=!1,a=[];if(e.editable)for(let u=0;uu.nodeName=="BR")&&(e.input.lastKeyCode==8||e.input.lastKeyCode==46)){for(let u of a)if(u.nodeName=="BR"&&u.parentNode){let d=u.nextSibling;for(;d&&d.nodeType==1;){if(d.contentEditable=="false"){u.parentNode.removeChild(u);break}d=d.firstChild}}}else if(be&&a.length){let u=a.filter(d=>d.nodeName=="BR");if(u.length==2){let[d,f]=u;d.parentNode&&d.parentNode.parentNode==f.parentNode?f.remove():d.remove()}else{let{focusNode:d}=this.currentSelection;for(let f of u){let h=f.parentNode;h&&h.nodeName=="LI"&&(!d||xh(e,d)!=h)&&f.remove()}}}let c=null;s<0&&i&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)-1||i)&&(s>-1&&(e.docView.markDirty(s,o),kh(e)),e.input.badSafariComposition&&(e.input.badSafariComposition=!1,Sh(e,a)),this.handleDOMChange(s,o,l,a),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||Ve(e),this.currentSelection.set(r))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let u=0;ui;g--){let y=r.childNodes[g-1],x=y.pmViewDesc;if(y.nodeName=="BR"&&!x){s=g;break}if(!x||x.size)break}let d=n.state.doc,f=n.someProp("domParser")||ve.fromSchema(n.state.schema),h=d.resolve(o),p=null,m=f.parse(r,{topNode:h.parent,topMatch:h.parent.contentMatchAt(h.index()),topOpen:!0,from:i,to:s,preserveWhitespace:h.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:wh,context:h});if(c&&c[0].pos!=null){let g=c[0].pos,y=c[1]&&c[1].pos;y==null&&(y=g),p={anchor:g+o,head:y+o}}return{doc:m,sel:p,from:o,to:l}}function wh(n){let e=n.pmViewDesc;if(e)return e.parseRule();if(n.nodeName=="BR"&&n.parentNode){if(ie&&/^(ul|ol)$/i.test(n.parentNode.nodeName)){let t=document.createElement("div");return t.appendChild(document.createElement("li")),{skip:t}}else if(n.parentNode.lastChild==n||ie&&/^(tr|table)$/i.test(n.parentNode.nodeName))return{ignore:!0}}else if(n.nodeName=="IMG"&&n.getAttribute("mark-placeholder"))return{ignore:!0};return null}var Ch=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function vh(n,e,t,r,i){let s=n.input.compositionPendingChanges||(n.composing?n.input.compositionID:0);if(n.input.compositionPendingChanges=0,e<0){let v=n.input.lastSelectionTime>Date.now()-50?n.input.lastSelectionOrigin:null,L=Ss(n,v);if(L&&!n.state.selection.eq(L)){if(ee&&_e&&n.input.lastKeyCode===13&&Date.now()-100J(n,ht(13,"Enter"))))return;let z=n.state.tr.setSelection(L);v=="pointer"?z.setMeta("pointer",!0):v=="key"&&z.scrollIntoView(),s&&z.setMeta("composition",s),n.dispatch(z)}return}let o=n.state.doc.resolve(e),l=o.sharedDepth(t);e=o.before(l+1),t=n.state.doc.resolve(t).after(l+1);let a=n.state.selection,c=Mh(n,e,t),u=n.state.doc,d=u.slice(c.from,c.to),f,h;n.input.lastKeyCode===8&&Date.now()-100Date.now()-225||_e)&&i.some(v=>v.nodeType==1&&!Ch.test(v.nodeName))&&(!p||p.endA>=p.endB)&&n.someProp("handleKeyDown",v=>v(n,ht(13,"Enter")))){n.input.lastIOSEnter=0;return}if(!p)if(r&&a instanceof E&&!a.empty&&a.$head.sameParent(a.$anchor)&&!n.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))p={start:a.from,endA:a.to,endB:a.to};else{if(c.sel){let v=ya(n,n.state.doc,c.sel);if(v&&!v.eq(n.state.selection)){let L=n.state.tr.setSelection(v);s&&L.setMeta("composition",s),n.dispatch(L)}}return}n.state.selection.fromn.state.selection.from&&p.start<=n.state.selection.from+2&&n.state.selection.from>=c.from?p.start=n.state.selection.from:p.endA=n.state.selection.to-2&&n.state.selection.to<=c.to&&(p.endB+=n.state.selection.to-p.endA,p.endA=n.state.selection.to)),fe&&Ze<=11&&p.endB==p.start+1&&p.endA==p.start&&p.start>c.from&&c.doc.textBetween(p.start-c.from-1,p.start-c.from+1)==" \xA0"&&(p.start--,p.endA--,p.endB--);let m=c.doc.resolveNoCache(p.start-c.from),g=c.doc.resolveNoCache(p.endB-c.from),y=u.resolve(p.start),x=m.sameParent(g)&&m.parent.inlineContent&&y.end()>=p.endA;if((_t&&n.input.lastIOSEnter>Date.now()-225&&(!x||i.some(v=>v.nodeName=="DIV"||v.nodeName=="P"))||!x&&m.posv(n,ht(13,"Enter")))){n.input.lastIOSEnter=0;return}if(n.state.selection.anchor>p.start&&Eh(u,p.start,p.endA,m,g)&&n.someProp("handleKeyDown",v=>v(n,ht(8,"Backspace")))){_e&&ee&&n.domObserver.suppressSelectionUpdates();return}ee&&p.endB==p.start&&(n.input.lastChromeDelete=Date.now()),_e&&!x&&m.start()!=g.start()&&g.parentOffset==0&&m.depth==g.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==p.endA&&(p.endB-=2,g=c.doc.resolveNoCache(p.endB-c.from),setTimeout(()=>{n.someProp("handleKeyDown",function(v){return v(n,ht(13,"Enter"))})},20));let C=p.start,A=p.endA,w=v=>{let L=v||n.state.tr.replace(C,A,c.doc.slice(p.start-c.from,p.endB-c.from));if(c.sel){let z=ya(n,L.doc,c.sel);z&&!(ee&&n.composing&&z.empty&&(p.start!=p.endB||n.input.lastChromeDeleteVe(n),20));let v=w(n.state.tr.delete(C,A)),L=u.resolve(p.start).marksAcross(u.resolve(p.endA));L&&v.ensureMarks(L),n.dispatch(v)}else if(p.endA==p.endB&&(I=Th(m.parent.content.cut(m.parentOffset,g.parentOffset),y.parent.content.cut(y.parentOffset,p.endA-y.start())))){let v=w(n.state.tr);I.type=="add"?v.addMark(C,A,I.mark):v.removeMark(C,A,I.mark),n.dispatch(v)}else if(m.parent.child(m.index()).isText&&m.index()==g.index()-(g.textOffset?0:1)){let v=m.parent.textBetween(m.parentOffset,g.parentOffset),L=()=>w(n.state.tr.insertText(v,C,A));n.someProp("handleTextInput",z=>z(n,C,A,v,L))||n.dispatch(L())}else n.dispatch(w());else n.dispatch(w())}function ya(n,e,t){return Math.max(t.anchor,t.head)>e.content.size?null:Ms(n,e.resolve(t.anchor),e.resolve(t.head))}function Th(n,e){let t=n.firstChild.marks,r=e.firstChild.marks,i=t,s=r,o,l,a;for(let u=0;uu.mark(l.addToSet(u.marks));else if(i.length==0&&s.length==1)l=s[0],o="remove",a=u=>u.mark(l.removeFromSet(u.marks));else return null;let c=[];for(let u=0;ut||es(o,!0,!1)0&&(e||n.indexAfter(r)==n.node(r).childCount);)r--,i++,e=!1;if(t){let s=n.node(r).maybeChild(n.indexAfter(r));for(;s&&!s.isLeaf;)s=s.firstChild,i++}return i}function Ah(n,e,t,r,i){let s=n.findDiffStart(e,t);if(s==null)return null;let{a:o,b:l}=n.findDiffEnd(e,t+n.size,t+e.size);if(i=="end"){let a=Math.max(0,s-Math.min(o,l));r-=o+a-s}if(o=o?s-r:0;s-=a,s&&s=l?s-r:0;s-=a,s&&s=56320&&e<=57343&&t>=55296&&t<=56319}var hn=class{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new ps,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(wa),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=Sa(this),xa(this),this.nodeViews=Ma(this),this.docView=Zl(this.state.doc,ba(this),Zi(this),this.dom,this),this.domObserver=new bs(this,(r,i,s,o)=>vh(this,r,i,s,o)),this.domObserver.start(),qf(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&ms(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(wa),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let r in this._props)t[r]=this._props[r];t.state=this.state;for(let r in e)t[r]=e[r];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){var r;let i=this.state,s=!1,o=!1;e.storedMarks&&this.composing&&(Ga(this),o=!0),this.state=e;let l=i.plugins!=e.plugins||this._props.plugins!=t.plugins;if(l||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let h=Ma(this);Oh(h,this.nodeViews)&&(this.nodeViews=h,s=!0)}(l||t.handleDOMEvents!=this._props.handleDOMEvents)&&ms(this),this.editable=Sa(this),xa(this);let a=Zi(this),c=ba(this),u=i.plugins!=e.plugins&&!i.doc.eq(e.doc)?"reset":e.scrollToSelection>i.scrollToSelection?"to selection":"preserve",d=s||!this.docView.matchesNode(e.doc,c,a);(d||!e.selection.eq(i.selection))&&(o=!0);let f=u=="preserve"&&o&&this.dom.style.overflowAnchor==null&&ff(this);if(o){this.domObserver.stop();let h=d&&(fe||ee)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&Nh(i.selection,e.selection);if(d){let p=ee?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=lh(this)),(s||!this.docView.update(e.doc,c,a,this))&&(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=Zl(e.doc,c,a,this.dom,this)),p&&(!this.trackWrites||!this.dom.contains(this.trackWrites))&&(h=!0)}h||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&Rf(this))?Ve(this,h):(Ba(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),!((r=this.dragging)===null||r===void 0)&&r.node&&!i.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,i),u=="reset"?this.dom.scrollTop=0:u=="to selection"?this.scrollToSelection():f&&hf(f)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))){if(!this.someProp("handleScrollToSelection",t=>t(this)))if(this.state.selection instanceof M){let t=this.docView.domAfterPos(this.state.selection.from);t.nodeType==1&&Jl(this,t.getBoundingClientRect(),e)}else Jl(this,this.coordsAtPos(this.state.selection.head,1),e)}}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let t=0;t0&&st.ownerDocument.getSelection()),this._root=t}return e||document}updateRoot(){this._root=null}posAtCoords(e){return bf(this,e)}coordsAtPos(e,t=1){return Ia(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,r=-1){let i=this.docView.posFromDOM(e,t,r);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(e,t){return Cf(this,t||this.state,e)}pasteHTML(e,t){return dn(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return dn(this,e,null,!0,t||new ClipboardEvent("paste"))}serializeForClipboard(e){return ws(this,e)}destroy(){this.docView&&(Gf(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Zi(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,tf())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return Xf(this,e)}domSelectionRange(){let e=this.domSelection();return e?ie&&this.root.nodeType===11&&lf(this.dom.ownerDocument)==this.dom&&bh(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}};hn.prototype.dispatch=function(n){let e=this._props.dispatchTransaction;e?e.call(this,n):this.updateState(this.state.apply(n))};function ba(n){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(n.editable),n.someProp("attributes",t=>{if(typeof t=="function"&&(t=t(n.state)),t)for(let r in t)r=="class"?e.class+=" "+t[r]:r=="style"?e.style=(e.style?e.style+";":"")+t[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(t[r]))}),e.translate||(e.translate="no"),[se.node(0,n.state.doc.content.size,e)]}function xa(n){if(n.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),n.cursorWrapper={dom:e,deco:se.widget(n.state.selection.from,e,{raw:!0,marks:n.markCursor})}}else n.cursorWrapper=null}function Sa(n){return!n.someProp("editable",e=>e(n.state)===!1)}function Nh(n,e){let t=Math.min(n.$anchor.sharedDepth(n.head),e.$anchor.sharedDepth(e.head));return n.$anchor.start(t)!=e.$anchor.start(t)}function Ma(n){let e=Object.create(null);function t(r){for(let i in r)Object.prototype.hasOwnProperty.call(e,i)||(e[i]=r[i])}return n.someProp("nodeViews",t),n.someProp("markViews",t),e}function Oh(n,e){let t=0,r=0;for(let i in n){if(n[i]!=e[i])return!0;t++}for(let i in e)r++;return t!=r}function wa(n){if(n.spec.state||n.spec.filterTransaction||n.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var je={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},cr={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Ih=typeof navigator!="undefined"&&/Mac/.test(navigator.platform),Dh=typeof navigator!="undefined"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(U=0;U<10;U++)je[48+U]=je[96+U]=String(U);var U;for(U=1;U<=24;U++)je[U+111]="F"+U;var U;for(U=65;U<=90;U++)je[U]=String.fromCharCode(U+32),cr[U]=String.fromCharCode(U);var U;for(ar in je)cr.hasOwnProperty(ar)||(cr[ar]=je[ar]);var ar;function tc(n){var e=Ih&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||Dh&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?cr:je)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}var Rh=typeof navigator!="undefined"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),Ph=typeof navigator!="undefined"&&/Win/.test(navigator.platform);function Lh(n){let e=n.split(/-(?!$)/),t=e[e.length-1];t=="Space"&&(t=" ");let r,i,s,o;for(let l=0;l{for(var t in e)Bh(n,t,{get:e[t],enumerable:!0})};function yr(n){let{state:e,transaction:t}=n,{selection:r}=t,{doc:i}=t,{storedMarks:s}=t;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return s},get selection(){return r},get doc(){return i},get tr(){return r=t.selection,i=t.doc,s=t.storedMarks,t}}}var kr=class{constructor(n){this.editor=n.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=n.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){let{rawCommands:n,editor:e,state:t}=this,{view:r}=e,{tr:i}=t,s=this.buildProps(i);return Object.fromEntries(Object.entries(n).map(([o,l])=>[o,(...c)=>{let u=l(...c)(s);return!i.getMeta("preventDispatch")&&!this.hasCustomState&&r.dispatch(i),u}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(n,e=!0){let{rawCommands:t,editor:r,state:i}=this,{view:s}=r,o=[],l=!!n,a=n||i.tr,c=()=>(!l&&e&&!a.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(a),o.every(d=>d===!0)),u={...Object.fromEntries(Object.entries(t).map(([d,f])=>[d,(...p)=>{let m=this.buildProps(a,e),g=f(...p)(m);return o.push(g),u}])),run:c};return u}createCan(n){let{rawCommands:e,state:t}=this,r=!1,i=n||t.tr,s=this.buildProps(i,r);return{...Object.fromEntries(Object.entries(e).map(([l,a])=>[l,(...c)=>a(...c)({...s,dispatch:void 0})])),chain:()=>this.createChain(i,r)}}buildProps(n,e=!0){let{rawCommands:t,editor:r,state:i}=this,{view:s}=r,o={tr:n,editor:r,view:s,state:yr({state:i,transaction:n}),dispatch:e?()=>{}:void 0,chain:()=>this.createChain(n,e),can:()=>this.createCan(n),get commands(){return Object.fromEntries(Object.entries(t).map(([l,a])=>[l,(...c)=>a(...c)(o)]))}};return o}},fc={};Ls(fc,{blur:()=>Fh,clearContent:()=>Hh,clearNodes:()=>$h,command:()=>_h,createParagraphNear:()=>Vh,cut:()=>jh,deleteCurrentNode:()=>Wh,deleteNode:()=>Kh,deleteRange:()=>Uh,deleteSelection:()=>Jh,enter:()=>qh,exitCode:()=>Gh,extendMarkRange:()=>Yh,first:()=>Xh,focus:()=>Zh,forEach:()=>ep,insertContent:()=>tp,insertContentAt:()=>ip,joinBackward:()=>lp,joinDown:()=>op,joinForward:()=>ap,joinItemBackward:()=>cp,joinItemForward:()=>up,joinTextblockBackward:()=>dp,joinTextblockForward:()=>fp,joinUp:()=>sp,keyboardShortcut:()=>pp,lift:()=>mp,liftEmptyBlock:()=>gp,liftListItem:()=>yp,newlineInCode:()=>kp,resetAttributes:()=>bp,scrollIntoView:()=>xp,selectAll:()=>Sp,selectNodeBackward:()=>Mp,selectNodeForward:()=>wp,selectParentNode:()=>Cp,selectTextblockEnd:()=>vp,selectTextblockStart:()=>Tp,setContent:()=>Ep,setMark:()=>Wp,setMeta:()=>Kp,setNode:()=>Up,setNodeSelection:()=>Jp,setTextDirection:()=>qp,setTextSelection:()=>Gp,sinkListItem:()=>Yp,splitBlock:()=>Xp,splitListItem:()=>Qp,toggleList:()=>em,toggleMark:()=>tm,toggleNode:()=>nm,toggleWrap:()=>rm,undoInputRule:()=>im,unsetAllMarks:()=>sm,unsetMark:()=>om,unsetTextDirection:()=>lm,updateAttributes:()=>am,wrapIn:()=>cm,wrapInList:()=>um});var Fh=()=>({editor:n,view:e})=>(requestAnimationFrame(()=>{var t;n.isDestroyed||(e.dom.blur(),(t=window==null?void 0:window.getSelection())==null||t.removeAllRanges())}),!0),Hh=(n=!0)=>({commands:e})=>e.setContent("",{emitUpdate:n}),$h=()=>({state:n,tr:e,dispatch:t})=>{let{selection:r}=e,{ranges:i}=r;return t&&i.forEach(({$from:s,$to:o})=>{n.doc.nodesBetween(s.pos,o.pos,(l,a)=>{if(l.type.isText)return;let{doc:c,mapping:u}=e,d=c.resolve(u.map(a)),f=c.resolve(u.map(a+l.nodeSize)),h=d.blockRange(f);if(!h)return;let p=Fe(h);if(l.type.isTextblock){let{defaultType:m}=d.parent.contentMatchAt(d.index());e.setNodeMarkup(h.start,m)}(p||p===0)&&e.lift(h,p)})}),!0},_h=n=>e=>n(e),Vh=()=>({state:n,dispatch:e})=>Wi(n,e),jh=(n,e)=>({editor:t,tr:r})=>{let{state:i}=t,s=i.doc.slice(n.from,n.to);r.deleteRange(n.from,n.to);let o=r.mapping.map(e);return r.insert(o,s.content),r.setSelection(new E(r.doc.resolve(Math.max(o-1,0)))),!0},Wh=()=>({tr:n,dispatch:e})=>{let{selection:t}=n,r=t.$anchor.node();if(r.content.size>0)return!1;let i=n.selection.$anchor;for(let s=i.depth;s>0;s-=1)if(i.node(s).type===r.type){if(e){let l=i.before(s),a=i.after(s);n.delete(l,a).scrollIntoView()}return!0}return!1};function V(n,e){if(typeof n=="string"){if(!e.nodes[n])throw Error(`There is no node type named '${n}'. Maybe you forgot to add the extension?`);return e.nodes[n]}return n}var Kh=n=>({tr:e,state:t,dispatch:r})=>{let i=V(n,t.schema),s=e.selection.$anchor;for(let o=s.depth;o>0;o-=1)if(s.node(o).type===i){if(r){let a=s.before(o),c=s.after(o);e.delete(a,c).scrollIntoView()}return!0}return!1},Uh=n=>({tr:e,dispatch:t})=>{let{from:r,to:i}=n;return t&&e.delete(r,i),!0},Jh=()=>({state:n,dispatch:e})=>Gn(n,e),qh=()=>({commands:n})=>n.keyboardShortcut("Enter"),Gh=()=>({state:n,dispatch:e})=>ji(n,e);function zs(n){return Object.prototype.toString.call(n)==="[object RegExp]"}function mr(n,e,t={strict:!0}){let r=Object.keys(e);return r.length?r.every(i=>t.strict?e[i]===n[i]:zs(e[i])?e[i].test(n[i]):e[i]===n[i]):!0}function hc(n,e,t={}){return n.find(r=>r.type===e&&mr(Object.fromEntries(Object.keys(t).map(i=>[i,r.attrs[i]])),t))}function rc(n,e,t={}){return!!hc(n,e,t)}function Bs(n,e,t){if(!n||!e)return;let r=n.parent.childAfter(n.parentOffset);if((!r.node||!r.node.marks.some(c=>c.type===e))&&(r=n.parent.childBefore(n.parentOffset)),!r.node||!r.node.marks.some(c=>c.type===e))return;if(!t){let c=r.node.marks.find(u=>u.type===e);c&&(t=c.attrs)}if(!hc([...r.node.marks],e,t))return;let s=r.index,o=n.start()+r.offset,l=s+1,a=o+r.node.nodeSize;for(;s>0&&rc([...n.parent.child(s-1).marks],e,t);)s-=1,o-=n.parent.child(s).nodeSize;for(;l({tr:t,state:r,dispatch:i})=>{let s=We(n,r.schema),{doc:o,selection:l}=t,{$from:a,from:c,to:u}=l;if(i){let d=Bs(a,s,e);if(d&&d.from<=c&&d.to>=u){let f=E.create(o,d.from,d.to);t.setSelection(f)}}return!0},Xh=n=>e=>{let t=typeof n=="function"?n(e):n;for(let r=0;r({editor:t,view:r,tr:i,dispatch:s})=>{e={scrollIntoView:!0,...e};let o=()=>{(gr()||ic())&&r.dom.focus(),Qh()&&!gr()&&!ic()&&r.dom.focus({preventScroll:!0}),requestAnimationFrame(()=>{t.isDestroyed||(r.focus(),e!=null&&e.scrollIntoView&&t.commands.scrollIntoView())})};try{if(r.hasFocus()&&n===null||n===!1)return!0}catch{return!1}if(s&&n===null&&!pc(t.state.selection))return o(),!0;let l=mc(i.doc,n)||t.state.selection,a=t.state.selection.eq(l);return s&&(a||i.setSelection(l),a&&i.storedMarks&&i.setStoredMarks(i.storedMarks),o()),!0},ep=(n,e)=>t=>n.every((r,i)=>e(r,{...t,index:i})),tp=(n,e)=>({tr:t,commands:r})=>r.insertContentAt({from:t.selection.from,to:t.selection.to},n,e),gc=n=>{let e=n.childNodes;for(let t=e.length-1;t>=0;t-=1){let r=e[t];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?n.removeChild(r):r.nodeType===1&&gc(r)}return n};function ur(n){if(typeof window=="undefined")throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");let e=`${n}`,t=new window.DOMParser().parseFromString(e,"text/html").body;return gc(t)}function bn(n,e,t){if(n instanceof de||n instanceof k)return n;t={slice:!0,parseOptions:{},...t};let r=typeof n=="object"&&n!==null,i=typeof n=="string";if(r)try{if(Array.isArray(n)&&n.length>0)return k.fromArray(n.map(l=>e.nodeFromJSON(l)));let o=e.nodeFromJSON(n);return t.errorOnInvalidContent&&o.check(),o}catch(s){if(t.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:s});return console.warn("[tiptap warn]: Invalid content.","Passed value:",n,"Error:",s),bn("",e,t)}if(i){if(t.errorOnInvalidContent){let o=!1,l="",a=new Nt({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:c=>(o=!0,l=typeof c=="string"?c:c.outerHTML,null)}]}})});if(t.slice?ve.fromSchema(a).parseSlice(ur(n),t.parseOptions):ve.fromSchema(a).parse(ur(n),t.parseOptions),t.errorOnInvalidContent&&o)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${l}`)})}let s=ve.fromSchema(e);return t.slice?s.parseSlice(ur(n),t.parseOptions).content:s.parse(ur(n),t.parseOptions)}return bn("",e,t)}function np(n,e,t){let r=n.steps.length-1;if(r{o===0&&(o=u)}),n.setSelection(N.near(n.doc.resolve(o),t))}var rp=n=>!("type"in n),ip=(n,e,t)=>({tr:r,dispatch:i,editor:s})=>{var o;if(i){t={parseOptions:s.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...t};let l,a=g=>{s.emit("contentError",{editor:s,error:g,disableCollaboration:()=>{"collaboration"in s.storage&&typeof s.storage.collaboration=="object"&&s.storage.collaboration&&(s.storage.collaboration.isDisabled=!0)}})},c={preserveWhitespace:"full",...t.parseOptions};if(!t.errorOnInvalidContent&&!s.options.enableContentCheck&&s.options.emitContentError)try{bn(e,s.schema,{parseOptions:c,errorOnInvalidContent:!0})}catch(g){a(g)}try{l=bn(e,s.schema,{parseOptions:c,errorOnInvalidContent:(o=t.errorOnInvalidContent)!=null?o:s.options.enableContentCheck})}catch(g){return a(g),!1}let{from:u,to:d}=typeof n=="number"?{from:n,to:n}:{from:n.from,to:n.to},f=!0,h=!0;if((rp(l)?l:[l]).forEach(g=>{g.check(),f=f?g.isText&&g.marks.length===0:!1,h=h?g.isBlock:!1}),u===d&&h){let{parent:g}=r.doc.resolve(u);g.isTextblock&&!g.type.spec.code&&!g.childCount&&(u-=1,d+=1)}let m;if(f){if(Array.isArray(e))m=e.map(g=>g.text||"").join("");else if(e instanceof k){let g="";e.forEach(y=>{y.text&&(g+=y.text)}),m=g}else typeof e=="object"&&e&&e.text?m=e.text:m=e;r.insertText(m,u,d)}else{m=l;let g=r.doc.resolve(u),y=g.node(),x=g.parentOffset===0,C=y.isText||y.isTextblock,A=y.content.size>0;x&&C&&A&&h&&(u=Math.max(0,u-1)),r.replaceWith(u,d,m)}t.updateSelection&&np(r,r.steps.length-1,-1),t.applyInputRules&&r.setMeta("applyInputRules",{from:u,text:m}),t.applyPasteRules&&r.setMeta("applyPasteRules",{from:u,text:m})}return!0},sp=()=>({state:n,dispatch:e})=>Ll(n,e),op=()=>({state:n,dispatch:e})=>zl(n,e),lp=()=>({state:n,dispatch:e})=>Li(n,e),ap=()=>({state:n,dispatch:e})=>Fi(n,e),cp=()=>({state:n,dispatch:e,tr:t})=>{try{let r=dt(n.doc,n.selection.$from.pos,-1);return r==null?!1:(t.join(r,2),e&&e(t),!0)}catch{return!1}},up=()=>({state:n,dispatch:e,tr:t})=>{try{let r=dt(n.doc,n.selection.$from.pos,1);return r==null?!1:(t.join(r,2),e&&e(t),!0)}catch{return!1}},dp=()=>({state:n,dispatch:e})=>Il(n,e),fp=()=>({state:n,dispatch:e})=>Dl(n,e);function yc(){return typeof navigator!="undefined"?/Mac/.test(navigator.platform):!1}function hp(n){let e=n.split(/-(?!$)/),t=e[e.length-1];t==="Space"&&(t=" ");let r,i,s,o;for(let l=0;l({editor:e,view:t,tr:r,dispatch:i})=>{let s=hp(n).split(/-(?!$)/),o=s.find(c=>!["Alt","Ctrl","Meta","Shift"].includes(c)),l=new KeyboardEvent("keydown",{key:o==="Space"?" ":o,altKey:s.includes("Alt"),ctrlKey:s.includes("Ctrl"),metaKey:s.includes("Meta"),shiftKey:s.includes("Shift"),bubbles:!0,cancelable:!0}),a=e.captureTransaction(()=>{t.someProp("handleKeyDown",c=>c(t,l))});return a==null||a.steps.forEach(c=>{let u=c.map(r.mapping);u&&i&&r.maybeStep(u)}),!0};function Ae(n,e,t={}){let{from:r,to:i,empty:s}=n.selection,o=e?V(e,n.schema):null,l=[];n.doc.nodesBetween(r,i,(d,f)=>{if(d.isText)return;let h=Math.max(r,f),p=Math.min(i,f+d.nodeSize);l.push({node:d,from:h,to:p})});let a=i-r,c=l.filter(d=>o?o.name===d.node.type.name:!0).filter(d=>mr(d.node.attrs,t,{strict:!1}));return s?!!c.length:c.reduce((d,f)=>d+f.to-f.from,0)>=a}var mp=(n,e={})=>({state:t,dispatch:r})=>{let i=V(n,t.schema);return Ae(t,i,e)?Bl(t,r):!1},gp=()=>({state:n,dispatch:e})=>Ki(n,e),yp=n=>({state:e,dispatch:t})=>{let r=V(n,e.schema);return jl(r)(e,t)},kp=()=>({state:n,dispatch:e})=>_i(n,e);function br(n,e){return e.nodes[n]?"node":e.marks[n]?"mark":null}function sc(n,e){let t=typeof e=="string"?[e]:e;return Object.keys(n).reduce((r,i)=>(t.includes(i)||(r[i]=n[i]),r),{})}var bp=(n,e)=>({tr:t,state:r,dispatch:i})=>{let s=null,o=null,l=br(typeof n=="string"?n:n.name,r.schema);if(!l)return!1;l==="node"&&(s=V(n,r.schema)),l==="mark"&&(o=We(n,r.schema));let a=!1;return t.selection.ranges.forEach(c=>{r.doc.nodesBetween(c.$from.pos,c.$to.pos,(u,d)=>{s&&s===u.type&&(a=!0,i&&t.setNodeMarkup(d,void 0,sc(u.attrs,e))),o&&u.marks.length&&u.marks.forEach(f=>{o===f.type&&(a=!0,i&&t.addMark(d,d+u.nodeSize,o.create(sc(f.attrs,e))))})})}),a},xp=()=>({tr:n,dispatch:e})=>(e&&n.scrollIntoView(),!0),Sp=()=>({tr:n,dispatch:e})=>{if(e){let t=new ae(n.doc);n.setSelection(t)}return!0},Mp=()=>({state:n,dispatch:e})=>zi(n,e),wp=()=>({state:n,dispatch:e})=>Hi(n,e),Cp=()=>({state:n,dispatch:e})=>Fl(n,e),vp=()=>({state:n,dispatch:e})=>Ji(n,e),Tp=()=>({state:n,dispatch:e})=>Ui(n,e);function Rs(n,e,t={},r={}){return bn(n,e,{slice:!1,parseOptions:t,errorOnInvalidContent:r.errorOnInvalidContent})}var Ep=(n,{errorOnInvalidContent:e,emitUpdate:t=!0,parseOptions:r={}}={})=>({editor:i,tr:s,dispatch:o,commands:l})=>{let{doc:a}=s;if(r.preserveWhitespace!=="full"){let c=Rs(n,i.schema,r,{errorOnInvalidContent:e!=null?e:i.options.enableContentCheck});return o&&s.replaceWith(0,a.content.size,c).setMeta("preventUpdate",!t),!0}return o&&s.setMeta("preventUpdate",!t),l.insertContentAt({from:0,to:a.content.size},n,{parseOptions:r,errorOnInvalidContent:e!=null?e:i.options.enableContentCheck})};function kc(n,e){let t=We(e,n.schema),{from:r,to:i,empty:s}=n.selection,o=[];s?(n.storedMarks&&o.push(...n.storedMarks),o.push(...n.selection.$head.marks())):n.doc.nodesBetween(r,i,a=>{o.push(...a.marks)});let l=o.find(a=>a.type.name===t.name);return l?{...l.attrs}:{}}function Fs(n,e){let t=new Dt(n);return e.forEach(r=>{r.steps.forEach(i=>{t.step(i)})}),t}function Ap(n){for(let e=0;e{t(i)&&r.push({node:i,pos:s})}),r}function Np(n,e){for(let t=n.depth;t>0;t-=1){let r=n.node(t);if(e(r))return{pos:t>0?n.before(t):0,start:n.start(t),depth:t,node:r}}}function xr(n){return e=>Np(e.$from,n)}function T(n,e,t){return n.config[e]===void 0&&n.parent?T(n.parent,e,t):typeof n.config[e]=="function"?n.config[e].bind({...t,parent:n.parent?T(n.parent,e,t):null}):n.config[e]}function Hs(n){return n.map(e=>{let t={name:e.name,options:e.options,storage:e.storage},r=T(e,"addExtensions",t);return r?[e,...Hs(r())]:e}).flat(10)}function $s(n,e){let t=Le.fromSchema(e).serializeFragment(n),i=document.implementation.createHTMLDocument().createElement("div");return i.appendChild(t),i.innerHTML}function xc(n){return typeof n=="function"}function H(n,e=void 0,...t){return xc(n)?e?n.bind(e)(...t):n(...t):n}function Op(n={}){return Object.keys(n).length===0&&n.constructor===Object}function jt(n){let e=n.filter(i=>i.type==="extension"),t=n.filter(i=>i.type==="node"),r=n.filter(i=>i.type==="mark");return{baseExtensions:e,nodeExtensions:t,markExtensions:r}}function Sc(n){let e=[],{nodeExtensions:t,markExtensions:r}=jt(n),i=[...t,...r],s={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1},o=t.filter(c=>c.name!=="text").map(c=>c.name),l=r.map(c=>c.name),a=[...o,...l];return n.forEach(c=>{let u={name:c.name,options:c.options,storage:c.storage,extensions:i},d=T(c,"addGlobalAttributes",u);if(!d)return;d().forEach(h=>{let p;Array.isArray(h.types)?p=h.types:h.types==="*"?p=a:h.types==="nodes"?p=o:h.types==="marks"?p=l:p=[],p.forEach(m=>{Object.entries(h.attributes).forEach(([g,y])=>{e.push({type:m,name:g,attribute:{...s,...y}})})})})}),i.forEach(c=>{let u={name:c.name,options:c.options,storage:c.storage},d=T(c,"addAttributes",u);if(!d)return;let f=d();Object.entries(f).forEach(([h,p])=>{let m={...s,...p};typeof(m==null?void 0:m.default)=="function"&&(m.default=m.default()),m!=null&&m.isRequired&&(m==null?void 0:m.default)===void 0&&delete m.default,e.push({type:c.name,name:h,attribute:m})})}),e}function Ip(n){let e=[],t="",r=!1,i=!1,s=0,o=n.length;for(let l=0;l0){s-=1,t+=a;continue}if(a===";"&&s===0){e.push(t),t="";continue}}t+=a}return t&&e.push(t),e}function oc(n){let e=[],t=Ip(n||""),r=t.length;for(let i=0;i!!e).reduce((e,t)=>{let r={...e};return Object.entries(t).forEach(([i,s])=>{if(!r[i]){r[i]=s;return}if(i==="class"){let l=s?String(s).split(" "):[],a=r[i]?r[i].split(" "):[],c=l.filter(u=>!a.includes(u));r[i]=[...a,...c].join(" ")}else if(i==="style"){let l=new Map([...oc(r[i]),...oc(s)]);r[i]=Array.from(l.entries()).map(([a,c])=>`${a}: ${c}`).join("; ")}else r[i]=s}),r},{})}function Wt(n,e){return e.filter(t=>t.type===n.type.name).filter(t=>t.attribute.rendered).map(t=>t.attribute.renderHTML?t.attribute.renderHTML(n.attrs)||{}:{[t.name]:n.attrs[t.name]}).reduce((t,r)=>D(t,r),{})}function Dp(n){return typeof n!="string"?n:n.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(n):n==="true"?!0:n==="false"?!1:n}function lc(n,e){return"style"in n?n:{...n,getAttrs:t=>{let r=n.getAttrs?n.getAttrs(t):n.attrs;if(r===!1)return!1;let i=e.reduce((s,o)=>{let l=o.attribute.parseHTML?o.attribute.parseHTML(t):Dp(t.getAttribute(o.name));return l==null?s:{...s,[o.name]:l}},{});return{...r,...i}}}}function ac(n){return Object.fromEntries(Object.entries(n).filter(([e,t])=>e==="attrs"&&Op(t)?!1:t!=null))}function cc(n){var e,t;let r={};return!((e=n==null?void 0:n.attribute)!=null&&e.isRequired)&&"default"in((n==null?void 0:n.attribute)||{})&&(r.default=n.attribute.default),((t=n==null?void 0:n.attribute)==null?void 0:t.validate)!==void 0&&(r.validate=n.attribute.validate),[n.name,r]}function Rp(n,e){var t;let r=Sc(n),{nodeExtensions:i,markExtensions:s}=jt(n),o=(t=i.find(c=>T(c,"topNode")))==null?void 0:t.name,l=Object.fromEntries(i.map(c=>{let u=r.filter(y=>y.type===c.name),d={name:c.name,options:c.options,storage:c.storage,editor:e},f=n.reduce((y,x)=>{let C=T(x,"extendNodeSchema",d);return{...y,...C?C(c):{}}},{}),h=ac({...f,content:H(T(c,"content",d)),marks:H(T(c,"marks",d)),group:H(T(c,"group",d)),inline:H(T(c,"inline",d)),atom:H(T(c,"atom",d)),selectable:H(T(c,"selectable",d)),draggable:H(T(c,"draggable",d)),code:H(T(c,"code",d)),whitespace:H(T(c,"whitespace",d)),linebreakReplacement:H(T(c,"linebreakReplacement",d)),defining:H(T(c,"defining",d)),isolating:H(T(c,"isolating",d)),attrs:Object.fromEntries(u.map(cc))}),p=H(T(c,"parseHTML",d));p&&(h.parseDOM=p.map(y=>lc(y,u)));let m=T(c,"renderHTML",d);m&&(h.toDOM=y=>m({node:y,HTMLAttributes:Wt(y,u)}));let g=T(c,"renderText",d);return g&&(h.toText=g),[c.name,h]})),a=Object.fromEntries(s.map(c=>{let u=r.filter(g=>g.type===c.name),d={name:c.name,options:c.options,storage:c.storage,editor:e},f=n.reduce((g,y)=>{let x=T(y,"extendMarkSchema",d);return{...g,...x?x(c):{}}},{}),h=ac({...f,inclusive:H(T(c,"inclusive",d)),excludes:H(T(c,"excludes",d)),group:H(T(c,"group",d)),spanning:H(T(c,"spanning",d)),code:H(T(c,"code",d)),attrs:Object.fromEntries(u.map(cc))}),p=H(T(c,"parseHTML",d));p&&(h.parseDOM=p.map(g=>lc(g,u)));let m=T(c,"renderHTML",d);return m&&(h.toDOM=g=>m({mark:g,HTMLAttributes:Wt(g,u)})),[c.name,h]}));return new Nt({topNode:o,nodes:l,marks:a})}function Pp(n){let e=n.filter((t,r)=>n.indexOf(t)!==r);return Array.from(new Set(e))}function kn(n){return n.sort((t,r)=>{let i=T(t,"priority")||100,s=T(r,"priority")||100;return i>s?-1:ir.name));return t.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${t.map(r=>`'${r}'`).join(", ")}]. This can lead to issues.`),e}function wc(n,e,t){let{from:r,to:i}=e,{blockSeparator:s=` -`,textSerializers:o={}}=t||{},l="";return n.nodesBetween(r,i,(a,c,u,d)=>{var f;a.isBlock&&c>r&&(l+=s);let h=o==null?void 0:o[a.type.name];if(h)return u&&(l+=h({node:a,pos:c,parent:u,index:d,range:e})),!1;a.isText&&(l+=(f=a==null?void 0:a.text)==null?void 0:f.slice(Math.max(r,c)-c,i-c))}),l}function Dp(n,e){let t={from:0,to:n.content.size};return Mc(n,t,e)}function wc(n){return Object.fromEntries(Object.entries(n.nodes).filter(([,e])=>e.spec.toText).map(([e,t])=>[e,t.spec.toText]))}function Pp(n,e){let t=V(e,n.schema),{from:r,to:i}=n.selection,s=[];n.doc.nodesBetween(r,i,l=>{s.push(l)});let o=s.reverse().find(l=>l.type.name===t.name);return o?{...o.attrs}:{}}function $s(n,e){let t=br(typeof e=="string"?e:e.name,n.schema);return t==="node"?Pp(n,e):t==="mark"?yc(n,e):{}}function Lp(n,e=JSON.stringify){let t={};return n.filter(r=>{let i=e(r);return Object.prototype.hasOwnProperty.call(t,i)?!1:t[i]=!0})}function zp(n){let e=Lp(n);return e.length===1?e:e.filter((t,r)=>!e.filter((s,o)=>o!==r).some(s=>t.oldRange.from>=s.oldRange.from&&t.oldRange.to<=s.oldRange.to&&t.newRange.from>=s.newRange.from&&t.newRange.to<=s.newRange.to))}function _s(n){let{mapping:e,steps:t}=n,r=[];return e.maps.forEach((i,s)=>{let o=[];if(i.ranges.length)i.forEach((l,a)=>{o.push({from:l,to:a})});else{let{from:l,to:a}=t[s];if(l===void 0||a===void 0)return;o.push({from:l,to:a})}o.forEach(({from:l,to:a})=>{let c=e.slice(s).map(l,-1),u=e.slice(s).map(a),d=e.invert().map(c,-1),f=e.invert().map(u);r.push({oldRange:{from:d,to:f},newRange:{from:c,to:u}})})}),zp(r)}function Sr(n,e,t){let r=[];return n===e?t.resolve(n).marks().forEach(i=>{let s=t.resolve(n),o=zs(s,i.type);o&&r.push({mark:i,...o})}):t.nodesBetween(n,e,(i,s)=>{!i||(i==null?void 0:i.nodeSize)===void 0||r.push(...i.marks.map(o=>({from:s,to:s+i.nodeSize,mark:o})))}),r}var Cc=(n,e,t,r=20)=>{let i=n.doc.resolve(t),s=r,o=null;for(;s>0&&o===null;){let l=i.node(s);(l==null?void 0:l.type.name)===e?o=l:s-=1}return[o,s]};function gn(n,e){return e.nodes[n]||e.marks[n]||null}function pr(n,e,t){return Object.fromEntries(Object.entries(t).filter(([r])=>{let i=n.find(s=>s.type===e&&s.name===r);return i?i.attribute.keepOnSplit:!1}))}var Bp=(n,e=500)=>{let t="",r=n.parentOffset;return n.parent.nodesBetween(Math.max(0,r-e),r,(i,s,o,l)=>{var a,c;let u=((c=(a=i.type.spec).toText)==null?void 0:c.call(a,{node:i,pos:s,parent:o,index:l}))||i.textContent||"%leaf%";t+=i.isAtom&&!i.isText?u:u.slice(0,Math.max(0,r-s))}),t};function Ds(n,e,t={}){let{empty:r,ranges:i}=n.selection,s=e?We(e,n.schema):null;if(r)return!!(n.storedMarks||n.selection.$from.marks()).filter(d=>s?s.name===d.type.name:!0).find(d=>mr(d.attrs,t,{strict:!1}));let o=0,l=[];if(i.forEach(({$from:d,$to:f})=>{let h=d.pos,p=f.pos;n.doc.nodesBetween(h,p,(m,g)=>{if(s&&m.inlineContent&&!m.type.allowsMarkType(s))return!1;if(!m.isText&&!m.marks.length)return;let y=Math.max(h,g),x=Math.min(p,g+m.nodeSize),C=x-y;o+=C,l.push(...m.marks.map(A=>({mark:A,from:y,to:x})))})}),o===0)return!1;let a=l.filter(d=>s?s.name===d.mark.type.name:!0).filter(d=>mr(d.mark.attrs,t,{strict:!1})).reduce((d,f)=>d+f.to-f.from,0),c=l.filter(d=>s?d.mark.type!==s&&d.mark.type.excludes(s):!0).reduce((d,f)=>d+f.to-f.from,0);return(a>0?a+c:a)>=o}function Fp(n,e,t={}){if(!e)return Ae(n,null,t)||Ds(n,null,t);let r=br(e,n.schema);return r==="node"?Ae(n,e,t):r==="mark"?Ds(n,e,t):!1}var vc=(n,e)=>{let{$from:t,$to:r,$anchor:i}=n.selection;if(e){let s=xr(l=>l.type.name===e)(n.selection);if(!s)return!1;let o=n.doc.resolve(s.pos+1);return i.pos+1===o.end()}return!(r.parentOffset{let{$from:e,$to:t}=n.selection;return!(e.parentOffset>0||e.pos!==t.pos)};function cc(n,e){return Array.isArray(e)?e.some(t=>(typeof t=="string"?t:t.name)===n.name):e}function Ns(n,e){let{nodeExtensions:t}=jt(e),r=t.find(o=>o.name===n);if(!r)return!1;let i={name:r.name,options:r.options,storage:r.storage},s=H(T(r,"group",i));return typeof s!="string"?!1:s.split(" ").includes("list")}function xn(n,{checkChildren:e=!0,ignoreWhitespace:t=!1}={}){var r;if(t){if(n.type.name==="hardBreak")return!0;if(n.isText)return!/\S/.test((r=n.text)!=null?r:"")}if(n.isText)return!n.text;if(n.isAtom||n.isLeaf)return!1;if(n.content.childCount===0)return!0;if(e){let i=!0;return n.content.forEach(s=>{i!==!1&&(xn(s,{ignoreWhitespace:t,checkChildren:e})||(i=!1))}),i}return!1}function Mr(n){return n instanceof M}var Ec=class Ac{constructor(e){this.position=e}static fromJSON(e){return new Ac(e.position)}toJSON(){return{position:this.position}}};function Hp(n,e){let t=e.mapping.mapResult(n.position);return{position:new Ec(t.pos),mapResult:t}}function $p(n){return new Ec(n)}function _p(n,e,t){var r;let{selection:i}=e,s=null;if(hc(i)&&(s=i.$cursor),s){let l=(r=n.storedMarks)!=null?r:s.marks();return s.parent.type.allowsMarkType(t)&&(!!t.isInSet(l)||!l.some(c=>c.type.excludes(t)))}let{ranges:o}=i;return o.some(({$from:l,$to:a})=>{let c=l.depth===0?n.doc.inlineContent&&n.doc.type.allowsMarkType(t):!1;return n.doc.nodesBetween(l.pos,a.pos,(u,d,f)=>{if(c)return!1;if(u.isInline){let h=!f||f.type.allowsMarkType(t),p=!!t.isInSet(u.marks)||!u.marks.some(m=>m.type.excludes(t));c=h&&p}return!c}),c})}var Vp=(n,e={})=>({tr:t,state:r,dispatch:i})=>{let{selection:s}=t,{empty:o,ranges:l}=s,a=We(n,r.schema);if(i)if(o){let c=yc(r,a);t.addStoredMark(a.create({...c,...e}))}else l.forEach(c=>{let u=c.$from.pos,d=c.$to.pos;r.doc.nodesBetween(u,d,(f,h)=>{let p=Math.max(h,u),m=Math.min(h+f.nodeSize,d);f.marks.find(y=>y.type===a)?f.marks.forEach(y=>{a===y.type&&t.addMark(p,m,a.create({...y.attrs,...e}))}):t.addMark(p,m,a.create(e))})});return _p(r,t,a)},jp=(n,e)=>({tr:t})=>(t.setMeta(n,e),!0),Wp=(n,e={})=>({state:t,dispatch:r,chain:i})=>{let s=V(n,t.schema),o;return t.selection.$anchor.sameParent(t.selection.$head)&&(o=t.selection.$anchor.parent.attrs),s.isTextblock?i().command(({commands:l})=>Ji(s,{...o,...e})(t)?!0:l.clearNodes()).command(({state:l})=>Ji(s,{...o,...e})(l,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},Kp=n=>({tr:e,dispatch:t})=>{if(t){let{doc:r}=e,i=St(n,0,r.content.size),s=M.create(r,i);e.setSelection(s)}return!0},Up=(n,e)=>({tr:t,state:r,dispatch:i})=>{let{selection:s}=r,o,l;return typeof e=="number"?(o=e,l=e):e&&"from"in e&&"to"in e?(o=e.from,l=e.to):(o=s.from,l=s.to),i&&t.doc.nodesBetween(o,l,(a,c)=>{a.isText||t.setNodeMarkup(c,void 0,{...a.attrs,dir:n})}),!0},Jp=n=>({tr:e,dispatch:t})=>{if(t){let{doc:r}=e,{from:i,to:s}=typeof n=="number"?{from:n,to:n}:n,o=E.atStart(r).from,l=E.atEnd(r).to,a=St(i,o,l),c=St(s,o,l),u=E.create(r,a,c);e.setSelection(u)}return!0},qp=n=>({state:e,dispatch:t})=>{let r=V(n,e.schema);return jl(r)(e,t)};function uc(n,e){let t=n.storedMarks||n.selection.$to.parentOffset&&n.selection.$from.marks();if(t){let r=t.filter(i=>e==null?void 0:e.includes(i.type.name));n.tr.ensureMarks(r)}}var Gp=({keepMarks:n=!0}={})=>({tr:e,state:t,dispatch:r,editor:i})=>{let{selection:s,doc:o}=e,{$from:l,$to:a}=s,c=i.extensionManager.attributes,u=pr(c,l.node().type.name,l.node().attrs);if(s instanceof M&&s.node.isBlock)return!l.parentOffset||!pe(o,l.pos)?!1:(r&&(n&&uc(t,i.extensionManager.splittableMarks),e.split(l.pos).scrollIntoView()),!0);if(!l.parent.isBlock)return!1;let d=a.parentOffset===a.parent.content.size,f=l.depth===0?void 0:Tp(l.node(-1).contentMatchAt(l.indexAfter(-1))),h=d&&f?[{type:f,attrs:u}]:void 0,p=pe(e.doc,e.mapping.map(l.pos),1,h);if(!h&&!p&&pe(e.doc,e.mapping.map(l.pos),1,f?[{type:f}]:void 0)&&(p=!0,h=f?[{type:f,attrs:u}]:void 0),r){if(p&&(s instanceof E&&e.deleteSelection(),e.split(e.mapping.map(l.pos),1,h),f&&!d&&!l.parentOffset&&l.parent.type!==f)){let m=e.mapping.map(l.before()),g=e.doc.resolve(m);l.node(-1).canReplaceWith(g.index(),g.index()+1,f)&&e.setNodeMarkup(e.mapping.map(l.before()),f)}n&&uc(t,i.extensionManager.splittableMarks),e.scrollIntoView()}return p},Yp=(n,e={})=>({tr:t,state:r,dispatch:i,editor:s})=>{var o;let l=V(n,r.schema),{$from:a,$to:c}=r.selection,u=r.selection.node;if(u&&u.isBlock||a.depth<2||!a.sameParent(c))return!1;let d=a.node(-1);if(d.type!==l)return!1;let f=s.extensionManager.attributes;if(a.parent.content.size===0&&a.node(-1).childCount===a.indexAfter(-1)){if(a.depth===2||a.node(-3).type!==l||a.index(-2)!==a.node(-2).childCount-1)return!1;if(i){let y=k.empty,x=a.index(-1)?1:a.index(-2)?2:3;for(let L=a.depth-x;L>=a.depth-3;L-=1)y=k.from(a.node(L).copy(y));let C=a.indexAfter(-1){if(v>-1)return!1;L.isTextblock&&L.content.size===0&&(v=z+1)}),v>-1&&t.setSelection(E.near(t.doc.resolve(v))),t.scrollIntoView()}return!0}let h=c.pos===a.end()?d.contentMatchAt(0).defaultType:null,p={...pr(f,d.type.name,d.attrs),...e},m={...pr(f,a.node().type.name,a.node().attrs),...e};t.delete(a.pos,c.pos);let g=h?[{type:l,attrs:p},{type:h,attrs:m}]:[{type:l,attrs:p}];if(!pe(t.doc,a.pos,2))return!1;if(i){let{selection:y,storedMarks:x}=r,{splittableMarks:C}=s.extensionManager,A=x||y.$to.parentOffset&&y.$from.marks();if(t.split(a.pos,2,g).scrollIntoView(),!A||!i)return!0;let w=A.filter(I=>C.includes(I.type.name));t.ensureMarks(w)}return!0},Os=(n,e)=>{let t=xr(o=>o.type===e)(n.selection);if(!t)return!0;let r=n.doc.resolve(Math.max(0,t.pos-1)).before(t.depth);if(r===void 0)return!0;let i=n.doc.nodeAt(r);return t.node.type===(i==null?void 0:i.type)&&ge(n.doc,t.pos)&&n.join(t.pos),!0},Is=(n,e)=>{let t=xr(o=>o.type===e)(n.selection);if(!t)return!0;let r=n.doc.resolve(t.start).after(t.depth);if(r===void 0)return!0;let i=n.doc.nodeAt(r);return t.node.type===(i==null?void 0:i.type)&&ge(n.doc,r)&&n.join(r),!0};function Xp(n){let e=n.doc,t=e.firstChild;if(!t)return null;let r=1,i=t.nodeSize-1;return E.create(e,r,i)}var Qp=(n,e,t,r={})=>({editor:i,tr:s,state:o,dispatch:l,chain:a,commands:c,can:u})=>{let{extensions:d,splittableMarks:f}=i.extensionManager,h=V(n,o.schema),p=V(e,o.schema),{selection:m,storedMarks:g}=o,{$from:y,$to:x}=m,C=y.blockRange(x),A=g||m.$to.parentOffset&&m.$from.marks();if(!C)return!1;let w=xr(le=>Ns(le.type.name,d))(m),I=m.from===0&&m.to===o.doc.content.size,v=o.doc.content.content,L=v.length===1?v[0]:null,z=I&&L&&Ns(L.type.name,d)?{node:L,pos:0,depth:0}:null,J=w!=null?w:z,qe=!!w&&C.depth>=1&&C.depth-w.depth<=1,Ce=!!z;if((qe||Ce)&&J){if(J.node.type===h)return I&&Ce?a().command(({tr:le,dispatch:Y})=>{let q=Xp(le);return q?(le.setSelection(q),Y&&Y(le),!0):!1}).liftListItem(p).run():c.liftListItem(p);if(Ns(J.node.type.name,d)&&h.validContent(J.node.content))return a().command(()=>(s.setNodeMarkup(J.pos,h),!0)).command(()=>Os(s,h)).command(()=>Is(s,h)).run()}return!t||!A||!l?a().command(()=>u().wrapInList(h,r)?!0:c.clearNodes()).wrapInList(h,r).command(()=>Os(s,h)).command(()=>Is(s,h)).run():a().command(()=>{let le=u().wrapInList(h,r),Y=A.filter(q=>f.includes(q.type.name));return s.ensureMarks(Y),le?!0:c.clearNodes()}).wrapInList(h,r).command(()=>Os(s,h)).command(()=>Is(s,h)).run()},Zp=(n,e={},t={})=>({state:r,commands:i})=>{let{extendEmptyMarkRange:s=!1}=t,o=We(n,r.schema);return Ds(r,o,e)?i.unsetMark(o,{extendEmptyMarkRange:s}):i.setMark(o,e)},em=(n,e,t={})=>({state:r,commands:i})=>{let s=V(n,r.schema),o=V(e,r.schema),l=Ae(r,s,t),a;return r.selection.$anchor.sameParent(r.selection.$head)&&(a=r.selection.$anchor.parent.attrs),l?i.setNode(o,a):i.setNode(s,{...a,...t})},tm=(n,e={})=>({state:t,commands:r})=>{let i=V(n,t.schema);return Ae(t,i,e)?r.lift(i):r.wrapIn(i,e)},nm=()=>({state:n,dispatch:e})=>{let t=n.plugins;for(let r=0;r=0;a-=1)o.step(l.steps[a].invert(l.docs[a]));if(s.text){let a=o.doc.resolve(s.from).marks();o.replaceWith(s.from,s.to,n.schema.text(s.text,a))}else o.delete(s.from,s.to)}return!0}}return!1},rm=()=>({tr:n,dispatch:e})=>{let{selection:t}=n,{empty:r,ranges:i}=t;return r||e&&i.forEach(s=>{n.removeMark(s.$from.pos,s.$to.pos)}),!0},im=(n,e={})=>({tr:t,state:r,dispatch:i})=>{var s;let{extendEmptyMarkRange:o=!1}=e,{selection:l}=t,a=We(n,r.schema),{$from:c,empty:u,ranges:d}=l;if(!i)return!0;if(u&&o){let{from:f,to:h}=l,p=(s=c.marks().find(g=>g.type===a))==null?void 0:s.attrs,m=zs(c,a,p);m&&(f=m.from,h=m.to),t.removeMark(f,h,a)}else d.forEach(f=>{t.removeMark(f.$from.pos,f.$to.pos,a)});return t.removeStoredMark(a),!0},sm=n=>({tr:e,state:t,dispatch:r})=>{let{selection:i}=t,s,o;return typeof n=="number"?(s=n,o=n):n&&"from"in n&&"to"in n?(s=n.from,o=n.to):(s=i.from,o=i.to),r&&e.doc.nodesBetween(s,o,(l,a)=>{if(l.isText)return;let c={...l.attrs};delete c.dir,e.setNodeMarkup(a,void 0,c)}),!0},om=(n,e={})=>({tr:t,state:r,dispatch:i})=>{let s=null,o=null,l=br(typeof n=="string"?n:n.name,r.schema);if(!l)return!1;l==="node"&&(s=V(n,r.schema)),l==="mark"&&(o=We(n,r.schema));let a=!1;return t.selection.ranges.forEach(c=>{let u=c.$from.pos,d=c.$to.pos,f,h,p,m;t.selection.empty?r.doc.nodesBetween(u,d,(g,y)=>{s&&s===g.type&&(a=!0,p=Math.max(y,u),m=Math.min(y+g.nodeSize,d),f=y,h=g)}):r.doc.nodesBetween(u,d,(g,y)=>{y=u&&y<=d&&(s&&s===g.type&&(a=!0,i&&t.setNodeMarkup(y,void 0,{...g.attrs,...e})),o&&g.marks.length&&g.marks.forEach(x=>{if(o===x.type&&(a=!0,i)){let C=Math.max(y,u),A=Math.min(y+g.nodeSize,d);t.addMark(C,A,o.create({...x.attrs,...e}))}}))}),h&&(f!==void 0&&i&&t.setNodeMarkup(f,void 0,{...h.attrs,...e}),o&&h.marks.length&&h.marks.forEach(g=>{o===g.type&&i&&t.addMark(p,m,o.create({...g.attrs,...e}))}))}),a},lm=(n,e={})=>({state:t,dispatch:r})=>{let i=V(n,t.schema);return $l(i,e)(t,r)},am=(n,e={})=>({state:t,dispatch:r})=>{let i=V(n,t.schema);return _l(i,e)(t,r)},cm=class{constructor(){this.callbacks={}}on(n,e){return this.callbacks[n]||(this.callbacks[n]=[]),this.callbacks[n].push(e),this}emit(n,...e){let t=this.callbacks[n];return t&&t.forEach(r=>r.apply(this,e)),this}off(n,e){let t=this.callbacks[n];return t&&(e?this.callbacks[n]=t.filter(r=>r!==e):delete this.callbacks[n]),this}once(n,e){let t=(...r)=>{this.off(n,t),e.apply(this,r)};return this.on(n,t)}removeAllListeners(){this.callbacks={}}},wr=class{constructor(n){var e;this.find=n.find,this.handler=n.handler,this.undoable=(e=n.undoable)!=null?e:!0}},um=(n,e)=>{if(Ls(e))return e.exec(n);let t=e(n);if(!t)return null;let r=[t.text];return r.index=t.index,r.input=n,r.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(t.replaceWith)),r};function dr(n){var e;let{editor:t,from:r,to:i,text:s,rules:o,plugin:l}=n,{view:a}=t;if(a.composing)return!1;let c=a.state.doc.resolve(r);if(c.parent.type.spec.code||(e=c.nodeBefore||c.nodeAfter)!=null&&e.marks.find(f=>f.type.spec.code))return!1;let u=!1,d=Bp(c)+s;return o.forEach(f=>{if(u)return;let h=um(d,f.find);if(!h)return;let p=a.state.tr,m=yr({state:a.state,transaction:p}),g={from:r-(h[0].length-s.length),to:i},{commands:y,chain:x,can:C}=new kr({editor:t,state:m});f.handler({state:m,range:g,match:h,commands:y,chain:x,can:C})===null||!p.steps.length||(f.undoable&&p.setMeta(l,{transform:p,from:r,to:i,text:s}),a.dispatch(p),u=!0)}),u}function dm(n){let{editor:e,rules:t}=n,r=new O({state:{init(){return null},apply(i,s,o){let l=i.getMeta(r);if(l)return l;let a=i.getMeta("applyInputRules");return!!a&&setTimeout(()=>{let{text:u}=a;typeof u=="string"?u=u:u=Hs(k.from(u),o.schema);let{from:d}=a,f=d+u.length;dr({editor:e,from:d,to:f,text:u,rules:t,plugin:r})}),i.selectionSet||i.docChanged?null:s}},props:{handleTextInput(i,s,o,l){return dr({editor:e,from:s,to:o,text:l,rules:t,plugin:r})},handleDOMEvents:{compositionend:i=>(setTimeout(()=>{let{$cursor:s}=i.state.selection;s&&dr({editor:e,from:s.pos,to:s.pos,text:"",rules:t,plugin:r})}),!1)},handleKeyDown(i,s){if(s.key!=="Enter")return!1;let{$cursor:o}=i.state.selection;return o?dr({editor:e,from:o.pos,to:o.pos,text:` -`,rules:t,plugin:r}):!1}},isInputRules:!0});return r}function fm(n){return Object.prototype.toString.call(n).slice(8,-1)}function fr(n){return fm(n)!=="Object"?!1:n.constructor===Object&&Object.getPrototypeOf(n)===Object.prototype}function Nc(n,e){let t={...n};return fr(n)&&fr(e)&&Object.keys(e).forEach(r=>{fr(e[r])&&fr(n[r])?t[r]=Nc(n[r],e[r]):t[r]=e[r]}),t}var Vs=class{constructor(n={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...n},this.name=this.config.name}get options(){return{...H(T(this,"addOptions",{name:this.name}))||{}}}get storage(){return{...H(T(this,"addStorage",{name:this.name,options:this.options}))||{}}}configure(n={}){let e=this.extend({...this.config,addOptions:()=>Nc(this.options,n)});return e.name=this.name,e.parent=this.parent,e}extend(n={}){let e=new this.constructor({...this.config,...n});return e.parent=this,this.child=e,e.name="name"in n?n.name:e.parent.name,e}},me=class Oc extends Vs{constructor(){super(...arguments),this.type="mark"}static create(e={}){let t=typeof e=="function"?e():e;return new Oc(t)}static handleExit({editor:e,mark:t}){let{tr:r}=e.state,i=e.state.selection.$from;if(i.pos===i.end()){let o=i.marks();if(!!!o.find(c=>(c==null?void 0:c.type.name)===t.name))return!1;let a=o.find(c=>(c==null?void 0:c.type.name)===t.name);return a&&r.removeStoredMark(a),r.insertText(" ",i.pos),e.view.dispatch(r),!0}return!1}configure(e){return super.configure(e)}extend(e){let t=typeof e=="function"?e():e;return super.extend(t)}};function hm(n){return typeof n=="number"}var pm=class{constructor(n){this.find=n.find,this.handler=n.handler}},mm=(n,e,t)=>{if(Ls(e))return[...n.matchAll(e)];let r=e(n,t);return r?r.map(i=>{let s=[i.text];return s.index=i.index,s.input=n,s.data=i.data,i.replaceWith&&(i.text.includes(i.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),s.push(i.replaceWith)),s}):[]};function gm(n){let{editor:e,state:t,from:r,to:i,rule:s,pasteEvent:o,dropEvent:l}=n,{commands:a,chain:c,can:u}=new kr({editor:e,state:t}),d=[];return t.doc.nodesBetween(r,i,(h,p)=>{var m,g,y,x,C;if((g=(m=h.type)==null?void 0:m.spec)!=null&&g.code||!(h.isText||h.isTextblock||h.isInline))return;let A=(C=(x=(y=h.content)==null?void 0:y.size)!=null?x:h.nodeSize)!=null?C:0,w=Math.max(r,p),I=Math.min(i,p+A);if(w>=I)return;let v=h.isText?h.text||"":h.textBetween(w-p,I-p,void 0,"\uFFFC");mm(v,s.find,o).forEach(z=>{if(z.index===void 0)return;let J=w+z.index+1,qe=J+z[0].length,Ce={from:t.tr.mapping.map(J),to:t.tr.mapping.map(qe)},le=s.handler({state:t,range:Ce,match:z,commands:a,chain:c,can:u,pasteEvent:o,dropEvent:l});d.push(le)})}),d.every(h=>h!==null)}var hr=null,ym=n=>{var e;let t=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=t.clipboardData)==null||e.setData("text/html",n),t};function km(n){let{editor:e,rules:t}=n,r=null,i=!1,s=!1,o=typeof ClipboardEvent!="undefined"?new ClipboardEvent("paste"):null,l;try{l=typeof DragEvent!="undefined"?new DragEvent("drop"):null}catch{l=null}let a=({state:u,from:d,to:f,rule:h,pasteEvt:p})=>{let m=u.tr,g=yr({state:u,transaction:m});if(!(!gm({editor:e,state:g,from:Math.max(d-1,0),to:f.b-1,rule:h,pasteEvent:p,dropEvent:l})||!m.steps.length)){try{l=typeof DragEvent!="undefined"?new DragEvent("drop"):null}catch{l=null}return o=typeof ClipboardEvent!="undefined"?new ClipboardEvent("paste"):null,m}};return t.map(u=>new O({view(d){let f=p=>{var m;r=(m=d.dom.parentElement)!=null&&m.contains(p.target)?d.dom.parentElement:null,r&&(hr=e)},h=()=>{hr&&(hr=null)};return window.addEventListener("dragstart",f),window.addEventListener("dragend",h),{destroy(){window.removeEventListener("dragstart",f),window.removeEventListener("dragend",h)}}},props:{handleDOMEvents:{drop:(d,f)=>{if(s=r===d.dom.parentElement,l=f,!s){let h=hr;h!=null&&h.isEditable&&setTimeout(()=>{let p=h.state.selection;p&&h.commands.deleteRange({from:p.from,to:p.to})},10)}return!1},paste:(d,f)=>{var h;let p=(h=f.clipboardData)==null?void 0:h.getData("text/html");return o=f,i=!!(p!=null&&p.includes("data-pm-slice")),!1}}},appendTransaction:(d,f,h)=>{let p=d[0],m=p.getMeta("uiEvent")==="paste"&&!i,g=p.getMeta("uiEvent")==="drop"&&!s,y=p.getMeta("applyPasteRules"),x=!!y;if(!m&&!g&&!x)return;if(x){let{text:w}=y;typeof w=="string"?w=w:w=Hs(k.from(w),h.schema);let{from:I}=y,v=I+w.length,L=ym(w);return a({rule:u,state:h,from:I,to:{b:v},pasteEvt:L})}let C=f.doc.content.findDiffStart(h.doc.content),A=f.doc.content.findDiffEnd(h.doc.content);if(!(!hm(C)||!A||C===A.b))return a({rule:u,state:h,from:C,to:A,pasteEvt:o})}}))}var Cr=class{constructor(n,e){this.splittableMarks=[],this.editor=e,this.baseExtensions=n,this.extensions=Sc(n),this.schema=Ip(this.extensions,e),this.setupExtensions()}get commands(){return this.extensions.reduce((n,e)=>{let t={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:gn(e.name,this.schema)},r=T(e,"addCommands",t);return r?{...n,...r()}:n},{})}get plugins(){let{editor:n}=this;return kn([...this.extensions].reverse()).flatMap(r=>{let i={name:r.name,options:r.options,storage:this.editor.extensionStorage[r.name],editor:n,type:gn(r.name,this.schema)},s=[],o=T(r,"addKeyboardShortcuts",i),l={};if(r.type==="mark"&&T(r,"exitable",i)&&(l.ArrowRight=()=>me.handleExit({editor:n,mark:r})),o){let f=Object.fromEntries(Object.entries(o()).map(([h,p])=>[h,()=>p({editor:n})]));l={...l,...f}}let a=tc(l);s.push(a);let c=T(r,"addInputRules",i);if(cc(r,n.options.enableInputRules)&&c){let f=c();if(f&&f.length){let h=dm({editor:n,rules:f}),p=Array.isArray(h)?h:[h];s.push(...p)}}let u=T(r,"addPasteRules",i);if(cc(r,n.options.enablePasteRules)&&u){let f=u();if(f&&f.length){let h=km({editor:n,rules:f});s.push(...h)}}let d=T(r,"addProseMirrorPlugins",i);if(d){let f=d();s.push(...f)}return s})}get attributes(){return xc(this.extensions)}get nodeViews(){let{editor:n}=this,{nodeExtensions:e}=jt(this.extensions);return Object.fromEntries(e.filter(t=>!!T(t,"addNodeView")).map(t=>{let r=this.attributes.filter(a=>a.type===t.name),i={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:n,type:V(t.name,this.schema)},s=T(t,"addNodeView",i);if(!s)return[];let o=s();if(!o)return[];let l=(a,c,u,d,f)=>{let h=Wt(a,r);return o({node:a,view:c,getPos:u,decorations:d,innerDecorations:f,editor:n,extension:t,HTMLAttributes:h})};return[t.name,l]}))}dispatchTransaction(n){let{editor:e}=this;return kn([...this.extensions].reverse()).reduceRight((r,i)=>{let s={name:i.name,options:i.options,storage:this.editor.extensionStorage[i.name],editor:e,type:gn(i.name,this.schema)},o=T(i,"dispatchTransaction",s);return o?l=>{o.call(s,{transaction:l,next:r})}:r},n)}transformPastedHTML(n){let{editor:e}=this;return kn([...this.extensions]).reduce((r,i)=>{let s={name:i.name,options:i.options,storage:this.editor.extensionStorage[i.name],editor:e,type:gn(i.name,this.schema)},o=T(i,"transformPastedHTML",s);return o?(l,a)=>{let c=r(l,a);return o.call(s,c)}:r},n||(r=>r))}get markViews(){let{editor:n}=this,{markExtensions:e}=jt(this.extensions);return Object.fromEntries(e.filter(t=>!!T(t,"addMarkView")).map(t=>{let r=this.attributes.filter(l=>l.type===t.name),i={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:n,type:We(t.name,this.schema)},s=T(t,"addMarkView",i);if(!s)return[];let o=(l,a,c)=>{let u=Wt(l,r);return s()({mark:l,view:a,inline:c,editor:n,extension:t,HTMLAttributes:u,updateAttributes:d=>{Om(l,n,d)}})};return[t.name,o]}))}setupExtensions(){let n=this.extensions;this.editor.extensionStorage=Object.fromEntries(n.map(e=>[e.name,e.storage])),n.forEach(e=>{var t;let r={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:gn(e.name,this.schema)};e.type==="mark"&&((t=H(T(e,"keepOnSplit",r)))==null||t)&&this.splittableMarks.push(e.name);let i=T(e,"onBeforeCreate",r),s=T(e,"onCreate",r),o=T(e,"onUpdate",r),l=T(e,"onSelectionUpdate",r),a=T(e,"onTransaction",r),c=T(e,"onFocus",r),u=T(e,"onBlur",r),d=T(e,"onDestroy",r);i&&this.editor.on("beforeCreate",i),s&&this.editor.on("create",s),o&&this.editor.on("update",o),l&&this.editor.on("selectionUpdate",l),a&&this.editor.on("transaction",a),c&&this.editor.on("focus",c),u&&this.editor.on("blur",u),d&&this.editor.on("destroy",d)})}};Cr.resolve=Sc;Cr.sort=kn;Cr.flatten=Fs;var bm={};Ps(bm,{ClipboardTextSerializer:()=>Rc,Commands:()=>Dc,Delete:()=>Pc,Drop:()=>Lc,Editable:()=>zc,FocusEvents:()=>Fc,Keymap:()=>Hc,Paste:()=>$c,Tabindex:()=>_c,TextDirection:()=>Vc,focusEventsPluginKey:()=>Bc});var F=class Ic extends Vs{constructor(){super(...arguments),this.type="extension"}static create(e={}){let t=typeof e=="function"?e():e;return new Ic(t)}configure(e){return super.configure(e)}extend(e){let t=typeof e=="function"?e():e;return super.extend(t)}},Rc=F.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new O({key:new P("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{let{editor:n}=this,{state:e,schema:t}=n,{doc:r,selection:i}=e,{ranges:s}=i,o=Math.min(...s.map(u=>u.$from.pos)),l=Math.max(...s.map(u=>u.$to.pos)),a=wc(t);return Mc(r,{from:o,to:l},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:a})}}})]}}),Dc=F.create({name:"commands",addCommands(){return{...dc}}}),Pc=F.create({name:"delete",onUpdate({transaction:n,appendedTransactions:e}){var t,r,i;let s=()=>{var o,l,a,c;if((c=(a=(l=(o=this.editor.options.coreExtensionOptions)==null?void 0:o.delete)==null?void 0:l.filterTransaction)==null?void 0:a.call(l,n))!=null?c:n.getMeta("y-sync$"))return;let u=Bs(n.before,[n,...e]);_s(u).forEach(h=>{u.mapping.mapResult(h.oldRange.from).deletedAfter&&u.mapping.mapResult(h.oldRange.to).deletedBefore&&u.before.nodesBetween(h.oldRange.from,h.oldRange.to,(p,m)=>{let g=m+p.nodeSize-2,y=h.oldRange.from<=m&&g<=h.oldRange.to;this.editor.emit("delete",{type:"node",node:p,from:m,to:g,newFrom:u.mapping.map(m),newTo:u.mapping.map(g),deletedRange:h.oldRange,newRange:h.newRange,partial:!y,editor:this.editor,transaction:n,combinedTransform:u})})});let f=u.mapping;u.steps.forEach((h,p)=>{var m,g;if(h instanceof Be){let y=f.slice(p).map(h.from,-1),x=f.slice(p).map(h.to),C=f.invert().map(y,-1),A=f.invert().map(x),w=y>0?(m=u.doc.nodeAt(y-1))==null?void 0:m.marks.some(v=>v.eq(h.mark)):!1,I=(g=u.doc.nodeAt(x))==null?void 0:g.marks.some(v=>v.eq(h.mark));this.editor.emit("delete",{type:"mark",mark:h.mark,from:h.from,to:h.to,deletedRange:{from:C,to:A},newRange:{from:y,to:x},partial:!!(I||w),editor:this.editor,transaction:n,combinedTransform:u})}})};(i=(r=(t=this.editor.options.coreExtensionOptions)==null?void 0:t.delete)==null?void 0:r.async)==null||i?setTimeout(s,0):s()}}),Lc=F.create({name:"drop",addProseMirrorPlugins(){return[new O({key:new P("tiptapDrop"),props:{handleDrop:(n,e,t,r)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:t,moved:r})}}})]}}),zc=F.create({name:"editable",addProseMirrorPlugins(){return[new O({key:new P("editable"),props:{editable:()=>this.editor.options.editable}})]}}),Bc=new P("focusEvents"),Fc=F.create({name:"focusEvents",addProseMirrorPlugins(){let{editor:n}=this;return[new O({key:Bc,props:{handleDOMEvents:{focus:(e,t)=>{n.isFocused=!0;let r=n.state.tr.setMeta("focus",{event:t}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,t)=>{n.isFocused=!1;let r=n.state.tr.setMeta("blur",{event:t}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}}),Hc=F.create({name:"keymap",addKeyboardShortcuts(){let n=()=>this.editor.commands.first(({commands:o})=>[()=>o.undoInputRule(),()=>o.command(({tr:l})=>{let{selection:a,doc:c}=l,{empty:u,$anchor:d}=a,{pos:f,parent:h}=d,p=d.parent.isTextblock&&f>0?l.doc.resolve(f-1):d,m=p.parent.type.spec.isolating,g=d.pos-d.parentOffset,y=m&&p.parent.childCount===1?g===d.pos:N.atStart(c).from===f;return!u||!h.type.isTextblock||h.textContent.length||!y||y&&d.parent.type.name==="paragraph"?!1:o.clearNodes()}),()=>o.deleteSelection(),()=>o.joinBackward(),()=>o.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:o})=>[()=>o.deleteSelection(),()=>o.deleteCurrentNode(),()=>o.joinForward(),()=>o.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:o})=>[()=>o.newlineInCode(),()=>o.createParagraphNear(),()=>o.liftEmptyBlock(),()=>o.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:n,"Mod-Backspace":n,"Shift-Backspace":n,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},i={...r},s={...r,"Ctrl-h":n,"Alt-Backspace":n,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return gr()||gc()?s:i},addProseMirrorPlugins(){return[new O({key:new P("clearDocument"),appendTransaction:(n,e,t)=>{if(n.some(m=>m.getMeta("composition")))return;let r=n.some(m=>m.docChanged)&&!e.doc.eq(t.doc),i=n.some(m=>m.getMeta("preventClearDocument"));if(!r||i)return;let{empty:s,from:o,to:l}=e.selection,a=N.atStart(e.doc).from,c=N.atEnd(e.doc).to;if(s||!(o===a&&l===c)||!xn(t.doc))return;let f=t.tr,h=yr({state:t,transaction:f}),{commands:p}=new kr({editor:this.editor,state:h});if(p.clearNodes(),!!f.steps.length)return f}})]}}),$c=F.create({name:"paste",addProseMirrorPlugins(){return[new O({key:new P("tiptapPaste"),props:{handlePaste:(n,e,t)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:t})}}})]}}),_c=F.create({name:"tabindex",addProseMirrorPlugins(){return[new O({key:new P("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}}),Vc=F.create({name:"textDirection",addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];let{nodeExtensions:n}=jt(this.extensions);return[{types:n.filter(e=>e.name!=="text").map(e=>e.name),attributes:{dir:{default:this.options.direction,parseHTML:e=>{let t=e.getAttribute("dir");return t&&(t==="ltr"||t==="rtl"||t==="auto")?t:this.options.direction},renderHTML:e=>e.dir?{dir:e.dir}:{}}}}]},addProseMirrorPlugins(){return[new O({key:new P("textDirection"),props:{attributes:()=>{let n=this.options.direction;return n?{dir:n}:{}}}})]}}),xm=class yn{constructor(e,t,r=!1,i=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=e,this.editor=t,this.currentNode=i}get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var e;return(e=this.actualDepth)!=null?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let t=this.from,r=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can\u2019t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}t=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:t,to:r},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;let e=this.resolvedPos.start(this.resolvedPos.depth-1),t=this.resolvedPos.doc.resolve(e);return new yn(t,this.editor)}get before(){let e=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.from-3)),new yn(e,this.editor)}get after(){let e=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.to+3)),new yn(e,this.editor)}get children(){let e=[];return this.node.content.forEach((t,r)=>{let i=t.isBlock&&!t.isTextblock,s=t.isAtom&&!t.isText,o=t.isInline,l=this.pos+r+(s?0:1);if(l<0||l>this.resolvedPos.doc.nodeSize-2)return;let a=this.resolvedPos.doc.resolve(l);if(!i&&!o&&a.depth<=this.depth)return;let c=new yn(a,this.editor,i,i||o?t:null);i&&(c.actualDepth=this.depth+1),e.push(c)}),e}get firstChild(){return this.children[0]||null}get lastChild(){let e=this.children;return e[e.length-1]||null}closest(e,t={}){let r=null,i=this.parent;for(;i&&!r;){if(i.node.type.name===e)if(Object.keys(t).length>0){let s=i.node.attrs,o=Object.keys(t);for(let l=0;l{r&&i.length>0||(o.node.type.name===e&&s.every(a=>t[a]===o.node.attrs[a])&&i.push(o),!(r&&i.length>0)&&(i=i.concat(o.querySelectorAll(e,t,r))))}),i}setAttribute(e){let{tr:t}=this.editor.state;t.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(t)}},Sm=`.ProseMirror { +`,textSerializers:o={}}=t||{},l="";return n.nodesBetween(r,i,(a,c,u,d)=>{var f;a.isBlock&&c>r&&(l+=s);let h=o==null?void 0:o[a.type.name];if(h)return u&&(l+=h({node:a,pos:c,parent:u,index:d,range:e})),!1;a.isText&&(l+=(f=a==null?void 0:a.text)==null?void 0:f.slice(Math.max(r,c)-c,i-c))}),l}function Lp(n,e){let t={from:0,to:n.content.size};return wc(n,t,e)}function Cc(n){return Object.fromEntries(Object.entries(n.nodes).filter(([,e])=>e.spec.toText).map(([e,t])=>[e,t.spec.toText]))}function zp(n,e){let t=V(e,n.schema),{from:r,to:i}=n.selection,s=[];n.doc.nodesBetween(r,i,l=>{s.push(l)});let o=s.reverse().find(l=>l.type.name===t.name);return o?{...o.attrs}:{}}function _s(n,e){let t=br(typeof e=="string"?e:e.name,n.schema);return t==="node"?zp(n,e):t==="mark"?kc(n,e):{}}function Bp(n,e=JSON.stringify){let t={};return n.filter(r=>{let i=e(r);return Object.prototype.hasOwnProperty.call(t,i)?!1:t[i]=!0})}function Fp(n){let e=Bp(n);return e.length===1?e:e.filter((t,r)=>!e.filter((s,o)=>o!==r).some(s=>t.oldRange.from>=s.oldRange.from&&t.oldRange.to<=s.oldRange.to&&t.newRange.from>=s.newRange.from&&t.newRange.to<=s.newRange.to))}function Vs(n){let{mapping:e,steps:t}=n,r=[];return e.maps.forEach((i,s)=>{let o=[];if(i.ranges.length)i.forEach((l,a)=>{o.push({from:l,to:a})});else{let{from:l,to:a}=t[s];if(l===void 0||a===void 0)return;o.push({from:l,to:a})}o.forEach(({from:l,to:a})=>{let c=e.slice(s).map(l,-1),u=e.slice(s).map(a),d=e.invert().map(c,-1),f=e.invert().map(u);r.push({oldRange:{from:d,to:f},newRange:{from:c,to:u}})})}),Fp(r)}function Sr(n,e,t){let r=[];return n===e?t.resolve(n).marks().forEach(i=>{let s=t.resolve(n),o=Bs(s,i.type);o&&r.push({mark:i,...o})}):t.nodesBetween(n,e,(i,s)=>{!i||(i==null?void 0:i.nodeSize)===void 0||r.push(...i.marks.map(o=>({from:s,to:s+i.nodeSize,mark:o})))}),r}var vc=(n,e,t,r=20)=>{let i=n.doc.resolve(t),s=r,o=null;for(;s>0&&o===null;){let l=i.node(s);(l==null?void 0:l.type.name)===e?o=l:s-=1}return[o,s]};function gn(n,e){return e.nodes[n]||e.marks[n]||null}function pr(n,e,t){return Object.fromEntries(Object.entries(t).filter(([r])=>{let i=n.find(s=>s.type===e&&s.name===r);return i?i.attribute.keepOnSplit:!1}))}var Hp=(n,e=500)=>{let t="",r=n.parentOffset;return n.parent.nodesBetween(Math.max(0,r-e),r,(i,s,o,l)=>{var a,c;let u=((c=(a=i.type.spec).toText)==null?void 0:c.call(a,{node:i,pos:s,parent:o,index:l}))||i.textContent||"%leaf%";t+=i.isAtom&&!i.isText?u:u.slice(0,Math.max(0,r-s))}),t};function Ps(n,e,t={}){let{empty:r,ranges:i}=n.selection,s=e?We(e,n.schema):null;if(r)return!!(n.storedMarks||n.selection.$from.marks()).filter(d=>s?s.name===d.type.name:!0).find(d=>mr(d.attrs,t,{strict:!1}));let o=0,l=[];if(i.forEach(({$from:d,$to:f})=>{let h=d.pos,p=f.pos;n.doc.nodesBetween(h,p,(m,g)=>{if(s&&m.inlineContent&&!m.type.allowsMarkType(s))return!1;if(!m.isText&&!m.marks.length)return;let y=Math.max(h,g),x=Math.min(p,g+m.nodeSize),C=x-y;o+=C,l.push(...m.marks.map(A=>({mark:A,from:y,to:x})))})}),o===0)return!1;let a=l.filter(d=>s?s.name===d.mark.type.name:!0).filter(d=>mr(d.mark.attrs,t,{strict:!1})).reduce((d,f)=>d+f.to-f.from,0),c=l.filter(d=>s?d.mark.type!==s&&d.mark.type.excludes(s):!0).reduce((d,f)=>d+f.to-f.from,0);return(a>0?a+c:a)>=o}function $p(n,e,t={}){if(!e)return Ae(n,null,t)||Ps(n,null,t);let r=br(e,n.schema);return r==="node"?Ae(n,e,t):r==="mark"?Ps(n,e,t):!1}var Tc=(n,e)=>{let{$from:t,$to:r,$anchor:i}=n.selection;if(e){let s=xr(l=>l.type.name===e)(n.selection);if(!s)return!1;let o=n.doc.resolve(s.pos+1);return i.pos+1===o.end()}return!(r.parentOffset{let{$from:e,$to:t}=n.selection;return!(e.parentOffset>0||e.pos!==t.pos)};function uc(n,e){return Array.isArray(e)?e.some(t=>(typeof t=="string"?t:t.name)===n.name):e}function Os(n,e){let{nodeExtensions:t}=jt(e),r=t.find(o=>o.name===n);if(!r)return!1;let i={name:r.name,options:r.options,storage:r.storage},s=H(T(r,"group",i));return typeof s!="string"?!1:s.split(" ").includes("list")}function xn(n,{checkChildren:e=!0,ignoreWhitespace:t=!1}={}){var r;if(t){if(n.type.name==="hardBreak")return!0;if(n.isText)return!/\S/.test((r=n.text)!=null?r:"")}if(n.isText)return!n.text;if(n.isAtom||n.isLeaf)return!1;if(n.content.childCount===0)return!0;if(e){let i=!0;return n.content.forEach(s=>{i!==!1&&(xn(s,{ignoreWhitespace:t,checkChildren:e})||(i=!1))}),i}return!1}function Mr(n){return n instanceof M}var Ac=class Nc{constructor(e){this.position=e}static fromJSON(e){return new Nc(e.position)}toJSON(){return{position:this.position}}};function _p(n,e){let t=e.mapping.mapResult(n.position);return{position:new Ac(t.pos),mapResult:t}}function Vp(n){return new Ac(n)}function jp(n,e,t){var r;let{selection:i}=e,s=null;if(pc(i)&&(s=i.$cursor),s){let l=(r=n.storedMarks)!=null?r:s.marks();return s.parent.type.allowsMarkType(t)&&(!!t.isInSet(l)||!l.some(c=>c.type.excludes(t)))}let{ranges:o}=i;return o.some(({$from:l,$to:a})=>{let c=l.depth===0?n.doc.inlineContent&&n.doc.type.allowsMarkType(t):!1;return n.doc.nodesBetween(l.pos,a.pos,(u,d,f)=>{if(c)return!1;if(u.isInline){let h=!f||f.type.allowsMarkType(t),p=!!t.isInSet(u.marks)||!u.marks.some(m=>m.type.excludes(t));c=h&&p}return!c}),c})}var Wp=(n,e={})=>({tr:t,state:r,dispatch:i})=>{let{selection:s}=t,{empty:o,ranges:l}=s,a=We(n,r.schema);if(i)if(o){let c=kc(r,a);t.addStoredMark(a.create({...c,...e}))}else l.forEach(c=>{let u=c.$from.pos,d=c.$to.pos;r.doc.nodesBetween(u,d,(f,h)=>{let p=Math.max(h,u),m=Math.min(h+f.nodeSize,d);f.marks.find(y=>y.type===a)?f.marks.forEach(y=>{a===y.type&&t.addMark(p,m,a.create({...y.attrs,...e}))}):t.addMark(p,m,a.create(e))})});return jp(r,t,a)},Kp=(n,e)=>({tr:t})=>(t.setMeta(n,e),!0),Up=(n,e={})=>({state:t,dispatch:r,chain:i})=>{let s=V(n,t.schema),o;return t.selection.$anchor.sameParent(t.selection.$head)&&(o=t.selection.$anchor.parent.attrs),s.isTextblock?i().command(({commands:l})=>qi(s,{...o,...e})(t)?!0:l.clearNodes()).command(({state:l})=>qi(s,{...o,...e})(l,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},Jp=n=>({tr:e,dispatch:t})=>{if(t){let{doc:r}=e,i=St(n,0,r.content.size),s=M.create(r,i);e.setSelection(s)}return!0},qp=(n,e)=>({tr:t,state:r,dispatch:i})=>{let{selection:s}=r,o,l;return typeof e=="number"?(o=e,l=e):e&&"from"in e&&"to"in e?(o=e.from,l=e.to):(o=s.from,l=s.to),i&&t.doc.nodesBetween(o,l,(a,c)=>{a.isText||t.setNodeMarkup(c,void 0,{...a.attrs,dir:n})}),!0},Gp=n=>({tr:e,dispatch:t})=>{if(t){let{doc:r}=e,{from:i,to:s}=typeof n=="number"?{from:n,to:n}:n,o=E.atStart(r).from,l=E.atEnd(r).to,a=St(i,o,l),c=St(s,o,l),u=E.create(r,a,c);e.setSelection(u)}return!0},Yp=n=>({state:e,dispatch:t})=>{let r=V(n,e.schema);return Wl(r)(e,t)};function dc(n,e){let t=n.storedMarks||n.selection.$to.parentOffset&&n.selection.$from.marks();if(t){let r=t.filter(i=>e==null?void 0:e.includes(i.type.name));n.tr.ensureMarks(r)}}var Xp=({keepMarks:n=!0}={})=>({tr:e,state:t,dispatch:r,editor:i})=>{let{selection:s,doc:o}=e,{$from:l,$to:a}=s,c=i.extensionManager.attributes,u=pr(c,l.node().type.name,l.node().attrs);if(s instanceof M&&s.node.isBlock)return!l.parentOffset||!pe(o,l.pos)?!1:(r&&(n&&dc(t,i.extensionManager.splittableMarks),e.split(l.pos).scrollIntoView()),!0);if(!l.parent.isBlock)return!1;let d=a.parentOffset===a.parent.content.size,f=l.depth===0?void 0:Ap(l.node(-1).contentMatchAt(l.indexAfter(-1))),h=d&&f?[{type:f,attrs:u}]:void 0,p=pe(e.doc,e.mapping.map(l.pos),1,h);if(!h&&!p&&pe(e.doc,e.mapping.map(l.pos),1,f?[{type:f}]:void 0)&&(p=!0,h=f?[{type:f,attrs:u}]:void 0),r){if(p&&(s instanceof E&&e.deleteSelection(),e.split(e.mapping.map(l.pos),1,h),f&&!d&&!l.parentOffset&&l.parent.type!==f)){let m=e.mapping.map(l.before()),g=e.doc.resolve(m);l.node(-1).canReplaceWith(g.index(),g.index()+1,f)&&e.setNodeMarkup(e.mapping.map(l.before()),f)}n&&dc(t,i.extensionManager.splittableMarks),e.scrollIntoView()}return p},Qp=(n,e={})=>({tr:t,state:r,dispatch:i,editor:s})=>{var o;let l=V(n,r.schema),{$from:a,$to:c}=r.selection,u=r.selection.node;if(u&&u.isBlock||a.depth<2||!a.sameParent(c))return!1;let d=a.node(-1);if(d.type!==l)return!1;let f=s.extensionManager.attributes;if(a.parent.content.size===0&&a.node(-1).childCount===a.indexAfter(-1)){if(a.depth===2||a.node(-3).type!==l||a.index(-2)!==a.node(-2).childCount-1)return!1;if(i){let y=k.empty,x=a.index(-1)?1:a.index(-2)?2:3;for(let L=a.depth-x;L>=a.depth-3;L-=1)y=k.from(a.node(L).copy(y));let C=a.indexAfter(-1){if(v>-1)return!1;L.isTextblock&&L.content.size===0&&(v=z+1)}),v>-1&&t.setSelection(E.near(t.doc.resolve(v))),t.scrollIntoView()}return!0}let h=c.pos===a.end()?d.contentMatchAt(0).defaultType:null,p={...pr(f,d.type.name,d.attrs),...e},m={...pr(f,a.node().type.name,a.node().attrs),...e};t.delete(a.pos,c.pos);let g=h?[{type:l,attrs:p},{type:h,attrs:m}]:[{type:l,attrs:p}];if(!pe(t.doc,a.pos,2))return!1;if(i){let{selection:y,storedMarks:x}=r,{splittableMarks:C}=s.extensionManager,A=x||y.$to.parentOffset&&y.$from.marks();if(t.split(a.pos,2,g).scrollIntoView(),!A||!i)return!0;let w=A.filter(I=>C.includes(I.type.name));t.ensureMarks(w)}return!0},Is=(n,e)=>{let t=xr(o=>o.type===e)(n.selection);if(!t)return!0;let r=n.doc.resolve(Math.max(0,t.pos-1)).before(t.depth);if(r===void 0)return!0;let i=n.doc.nodeAt(r);return t.node.type===(i==null?void 0:i.type)&&ge(n.doc,t.pos)&&n.join(t.pos),!0},Ds=(n,e)=>{let t=xr(o=>o.type===e)(n.selection);if(!t)return!0;let r=n.doc.resolve(t.start).after(t.depth);if(r===void 0)return!0;let i=n.doc.nodeAt(r);return t.node.type===(i==null?void 0:i.type)&&ge(n.doc,r)&&n.join(r),!0};function Zp(n){let e=n.doc,t=e.firstChild;if(!t)return null;let r=1,i=t.nodeSize-1;return E.create(e,r,i)}var em=(n,e,t,r={})=>({editor:i,tr:s,state:o,dispatch:l,chain:a,commands:c,can:u})=>{let{extensions:d,splittableMarks:f}=i.extensionManager,h=V(n,o.schema),p=V(e,o.schema),{selection:m,storedMarks:g}=o,{$from:y,$to:x}=m,C=y.blockRange(x),A=g||m.$to.parentOffset&&m.$from.marks();if(!C)return!1;let w=xr(le=>Os(le.type.name,d))(m),I=m.from===0&&m.to===o.doc.content.size,v=o.doc.content.content,L=v.length===1?v[0]:null,z=I&&L&&Os(L.type.name,d)?{node:L,pos:0,depth:0}:null,J=w!=null?w:z,qe=!!w&&C.depth>=1&&C.depth-w.depth<=1,Ce=!!z;if((qe||Ce)&&J){if(J.node.type===h)return I&&Ce?a().command(({tr:le,dispatch:Y})=>{let q=Zp(le);return q?(le.setSelection(q),Y&&Y(le),!0):!1}).liftListItem(p).run():c.liftListItem(p);if(Os(J.node.type.name,d)&&h.validContent(J.node.content))return a().command(()=>(s.setNodeMarkup(J.pos,h),!0)).command(()=>Is(s,h)).command(()=>Ds(s,h)).run()}return!t||!A||!l?a().command(()=>u().wrapInList(h,r)?!0:c.clearNodes()).wrapInList(h,r).command(()=>Is(s,h)).command(()=>Ds(s,h)).run():a().command(()=>{let le=u().wrapInList(h,r),Y=A.filter(q=>f.includes(q.type.name));return s.ensureMarks(Y),le?!0:c.clearNodes()}).wrapInList(h,r).command(()=>Is(s,h)).command(()=>Ds(s,h)).run()},tm=(n,e={},t={})=>({state:r,commands:i})=>{let{extendEmptyMarkRange:s=!1}=t,o=We(n,r.schema);return Ps(r,o,e)?i.unsetMark(o,{extendEmptyMarkRange:s}):i.setMark(o,e)},nm=(n,e,t={})=>({state:r,commands:i})=>{let s=V(n,r.schema),o=V(e,r.schema),l=Ae(r,s,t),a;return r.selection.$anchor.sameParent(r.selection.$head)&&(a=r.selection.$anchor.parent.attrs),l?i.setNode(o,a):i.setNode(s,{...a,...t})},rm=(n,e={})=>({state:t,commands:r})=>{let i=V(n,t.schema);return Ae(t,i,e)?r.lift(i):r.wrapIn(i,e)},im=()=>({state:n,dispatch:e})=>{let t=n.plugins;for(let r=0;r=0;a-=1)o.step(l.steps[a].invert(l.docs[a]));if(s.text){let a=o.doc.resolve(s.from).marks();o.replaceWith(s.from,s.to,n.schema.text(s.text,a))}else o.delete(s.from,s.to)}return!0}}return!1},sm=()=>({tr:n,dispatch:e})=>{let{selection:t}=n,{empty:r,ranges:i}=t;return r||e&&i.forEach(s=>{n.removeMark(s.$from.pos,s.$to.pos)}),!0},om=(n,e={})=>({tr:t,state:r,dispatch:i})=>{var s;let{extendEmptyMarkRange:o=!1}=e,{selection:l}=t,a=We(n,r.schema),{$from:c,empty:u,ranges:d}=l;if(!i)return!0;if(u&&o){let{from:f,to:h}=l,p=(s=c.marks().find(g=>g.type===a))==null?void 0:s.attrs,m=Bs(c,a,p);m&&(f=m.from,h=m.to),t.removeMark(f,h,a)}else d.forEach(f=>{t.removeMark(f.$from.pos,f.$to.pos,a)});return t.removeStoredMark(a),!0},lm=n=>({tr:e,state:t,dispatch:r})=>{let{selection:i}=t,s,o;return typeof n=="number"?(s=n,o=n):n&&"from"in n&&"to"in n?(s=n.from,o=n.to):(s=i.from,o=i.to),r&&e.doc.nodesBetween(s,o,(l,a)=>{if(l.isText)return;let c={...l.attrs};delete c.dir,e.setNodeMarkup(a,void 0,c)}),!0},am=(n,e={})=>({tr:t,state:r,dispatch:i})=>{let s=null,o=null,l=br(typeof n=="string"?n:n.name,r.schema);if(!l)return!1;l==="node"&&(s=V(n,r.schema)),l==="mark"&&(o=We(n,r.schema));let a=!1;return t.selection.ranges.forEach(c=>{let u=c.$from.pos,d=c.$to.pos,f,h,p,m;t.selection.empty?r.doc.nodesBetween(u,d,(g,y)=>{s&&s===g.type&&(a=!0,p=Math.max(y,u),m=Math.min(y+g.nodeSize,d),f=y,h=g)}):r.doc.nodesBetween(u,d,(g,y)=>{y=u&&y<=d&&(s&&s===g.type&&(a=!0,i&&t.setNodeMarkup(y,void 0,{...g.attrs,...e})),o&&g.marks.length&&g.marks.forEach(x=>{if(o===x.type&&(a=!0,i)){let C=Math.max(y,u),A=Math.min(y+g.nodeSize,d);t.addMark(C,A,o.create({...x.attrs,...e}))}}))}),h&&(f!==void 0&&i&&t.setNodeMarkup(f,void 0,{...h.attrs,...e}),o&&h.marks.length&&h.marks.forEach(g=>{o===g.type&&i&&t.addMark(p,m,o.create({...g.attrs,...e}))}))}),a},cm=(n,e={})=>({state:t,dispatch:r})=>{let i=V(n,t.schema);return _l(i,e)(t,r)},um=(n,e={})=>({state:t,dispatch:r})=>{let i=V(n,t.schema);return Vl(i,e)(t,r)},dm=class{constructor(){this.callbacks={}}on(n,e){return this.callbacks[n]||(this.callbacks[n]=[]),this.callbacks[n].push(e),this}emit(n,...e){let t=this.callbacks[n];return t&&t.forEach(r=>r.apply(this,e)),this}off(n,e){let t=this.callbacks[n];return t&&(e?this.callbacks[n]=t.filter(r=>r!==e):delete this.callbacks[n]),this}once(n,e){let t=(...r)=>{this.off(n,t),e.apply(this,r)};return this.on(n,t)}removeAllListeners(){this.callbacks={}}},wr=class{constructor(n){var e;this.find=n.find,this.handler=n.handler,this.undoable=(e=n.undoable)!=null?e:!0}},fm=(n,e)=>{if(zs(e))return e.exec(n);let t=e(n);if(!t)return null;let r=[t.text];return r.index=t.index,r.input=n,r.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(t.replaceWith)),r};function dr(n){var e;let{editor:t,from:r,to:i,text:s,rules:o,plugin:l}=n,{view:a}=t;if(a.composing)return!1;let c=a.state.doc.resolve(r);if(c.parent.type.spec.code||(e=c.nodeBefore||c.nodeAfter)!=null&&e.marks.find(f=>f.type.spec.code))return!1;let u=!1,d=Hp(c)+s;return o.forEach(f=>{if(u)return;let h=fm(d,f.find);if(!h)return;let p=a.state.tr,m=yr({state:a.state,transaction:p}),g={from:r-(h[0].length-s.length),to:i},{commands:y,chain:x,can:C}=new kr({editor:t,state:m});f.handler({state:m,range:g,match:h,commands:y,chain:x,can:C})===null||!p.steps.length||(f.undoable&&p.setMeta(l,{transform:p,from:r,to:i,text:s}),a.dispatch(p),u=!0)}),u}function hm(n){let{editor:e,rules:t}=n,r=new O({state:{init(){return null},apply(i,s,o){let l=i.getMeta(r);if(l)return l;let a=i.getMeta("applyInputRules");return!!a&&setTimeout(()=>{let{text:u}=a;typeof u=="string"?u=u:u=$s(k.from(u),o.schema);let{from:d}=a,f=d+u.length;dr({editor:e,from:d,to:f,text:u,rules:t,plugin:r})}),i.selectionSet||i.docChanged?null:s}},props:{handleTextInput(i,s,o,l){return dr({editor:e,from:s,to:o,text:l,rules:t,plugin:r})},handleDOMEvents:{compositionend:i=>(setTimeout(()=>{let{$cursor:s}=i.state.selection;s&&dr({editor:e,from:s.pos,to:s.pos,text:"",rules:t,plugin:r})}),!1)},handleKeyDown(i,s){if(s.key!=="Enter")return!1;let{$cursor:o}=i.state.selection;return o?dr({editor:e,from:o.pos,to:o.pos,text:` +`,rules:t,plugin:r}):!1}},isInputRules:!0});return r}function pm(n){return Object.prototype.toString.call(n).slice(8,-1)}function fr(n){return pm(n)!=="Object"?!1:n.constructor===Object&&Object.getPrototypeOf(n)===Object.prototype}function Oc(n,e){let t={...n};return fr(n)&&fr(e)&&Object.keys(e).forEach(r=>{fr(e[r])&&fr(n[r])?t[r]=Oc(n[r],e[r]):t[r]=e[r]}),t}var js=class{constructor(n={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...n},this.name=this.config.name}get options(){return{...H(T(this,"addOptions",{name:this.name}))||{}}}get storage(){return{...H(T(this,"addStorage",{name:this.name,options:this.options}))||{}}}configure(n={}){let e=this.extend({...this.config,addOptions:()=>Oc(this.options,n)});return e.name=this.name,e.parent=this.parent,e}extend(n={}){let e=new this.constructor({...this.config,...n});return e.parent=this,this.child=e,e.name="name"in n?n.name:e.parent.name,e}},me=class Ic extends js{constructor(){super(...arguments),this.type="mark"}static create(e={}){let t=typeof e=="function"?e():e;return new Ic(t)}static handleExit({editor:e,mark:t}){let{tr:r}=e.state,i=e.state.selection.$from;if(i.pos===i.end()){let o=i.marks();if(!!!o.find(c=>(c==null?void 0:c.type.name)===t.name))return!1;let a=o.find(c=>(c==null?void 0:c.type.name)===t.name);return a&&r.removeStoredMark(a),r.insertText(" ",i.pos),e.view.dispatch(r),!0}return!1}configure(e){return super.configure(e)}extend(e){let t=typeof e=="function"?e():e;return super.extend(t)}};function mm(n){return typeof n=="number"}var gm=class{constructor(n){this.find=n.find,this.handler=n.handler}},ym=(n,e,t)=>{if(zs(e))return[...n.matchAll(e)];let r=e(n,t);return r?r.map(i=>{let s=[i.text];return s.index=i.index,s.input=n,s.data=i.data,i.replaceWith&&(i.text.includes(i.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),s.push(i.replaceWith)),s}):[]};function km(n){let{editor:e,state:t,from:r,to:i,rule:s,pasteEvent:o,dropEvent:l}=n,{commands:a,chain:c,can:u}=new kr({editor:e,state:t}),d=[];return t.doc.nodesBetween(r,i,(h,p)=>{var m,g,y,x,C;if((g=(m=h.type)==null?void 0:m.spec)!=null&&g.code||!(h.isText||h.isTextblock||h.isInline))return;let A=(C=(x=(y=h.content)==null?void 0:y.size)!=null?x:h.nodeSize)!=null?C:0,w=Math.max(r,p),I=Math.min(i,p+A);if(w>=I)return;let v=h.isText?h.text||"":h.textBetween(w-p,I-p,void 0,"\uFFFC");ym(v,s.find,o).forEach(z=>{if(z.index===void 0)return;let J=w+z.index+1,qe=J+z[0].length,Ce={from:t.tr.mapping.map(J),to:t.tr.mapping.map(qe)},le=s.handler({state:t,range:Ce,match:z,commands:a,chain:c,can:u,pasteEvent:o,dropEvent:l});d.push(le)})}),d.every(h=>h!==null)}var hr=null,bm=n=>{var e;let t=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=t.clipboardData)==null||e.setData("text/html",n),t};function xm(n){let{editor:e,rules:t}=n,r=null,i=!1,s=!1,o=typeof ClipboardEvent!="undefined"?new ClipboardEvent("paste"):null,l;try{l=typeof DragEvent!="undefined"?new DragEvent("drop"):null}catch{l=null}let a=({state:u,from:d,to:f,rule:h,pasteEvt:p})=>{let m=u.tr,g=yr({state:u,transaction:m});if(!(!km({editor:e,state:g,from:Math.max(d-1,0),to:f.b-1,rule:h,pasteEvent:p,dropEvent:l})||!m.steps.length)){try{l=typeof DragEvent!="undefined"?new DragEvent("drop"):null}catch{l=null}return o=typeof ClipboardEvent!="undefined"?new ClipboardEvent("paste"):null,m}};return t.map(u=>new O({view(d){let f=p=>{var m;r=(m=d.dom.parentElement)!=null&&m.contains(p.target)?d.dom.parentElement:null,r&&(hr=e)},h=()=>{hr&&(hr=null)};return window.addEventListener("dragstart",f),window.addEventListener("dragend",h),{destroy(){window.removeEventListener("dragstart",f),window.removeEventListener("dragend",h)}}},props:{handleDOMEvents:{drop:(d,f)=>{if(s=r===d.dom.parentElement,l=f,!s){let h=hr;h!=null&&h.isEditable&&setTimeout(()=>{let p=h.state.selection;p&&h.commands.deleteRange({from:p.from,to:p.to})},10)}return!1},paste:(d,f)=>{var h;let p=(h=f.clipboardData)==null?void 0:h.getData("text/html");return o=f,i=!!(p!=null&&p.includes("data-pm-slice")),!1}}},appendTransaction:(d,f,h)=>{let p=d[0],m=p.getMeta("uiEvent")==="paste"&&!i,g=p.getMeta("uiEvent")==="drop"&&!s,y=p.getMeta("applyPasteRules"),x=!!y;if(!m&&!g&&!x)return;if(x){let{text:w}=y;typeof w=="string"?w=w:w=$s(k.from(w),h.schema);let{from:I}=y,v=I+w.length,L=bm(w);return a({rule:u,state:h,from:I,to:{b:v},pasteEvt:L})}let C=f.doc.content.findDiffStart(h.doc.content),A=f.doc.content.findDiffEnd(h.doc.content);if(!(!mm(C)||!A||C===A.b))return a({rule:u,state:h,from:C,to:A,pasteEvt:o})}}))}var Cr=class{constructor(n,e){this.splittableMarks=[],this.editor=e,this.baseExtensions=n,this.extensions=Mc(n),this.schema=Rp(this.extensions,e),this.setupExtensions()}get commands(){return this.extensions.reduce((n,e)=>{let t={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:gn(e.name,this.schema)},r=T(e,"addCommands",t);return r?{...n,...r()}:n},{})}get plugins(){let{editor:n}=this;return kn([...this.extensions].reverse()).flatMap(r=>{let i={name:r.name,options:r.options,storage:this.editor.extensionStorage[r.name],editor:n,type:gn(r.name,this.schema)},s=[],o=T(r,"addKeyboardShortcuts",i),l={};if(r.type==="mark"&&T(r,"exitable",i)&&(l.ArrowRight=()=>me.handleExit({editor:n,mark:r})),o){let f=Object.fromEntries(Object.entries(o()).map(([h,p])=>[h,()=>p({editor:n})]));l={...l,...f}}let a=nc(l);s.push(a);let c=T(r,"addInputRules",i);if(uc(r,n.options.enableInputRules)&&c){let f=c();if(f&&f.length){let h=hm({editor:n,rules:f}),p=Array.isArray(h)?h:[h];s.push(...p)}}let u=T(r,"addPasteRules",i);if(uc(r,n.options.enablePasteRules)&&u){let f=u();if(f&&f.length){let h=xm({editor:n,rules:f});s.push(...h)}}let d=T(r,"addProseMirrorPlugins",i);if(d){let f=d();s.push(...f)}return s})}get attributes(){return Sc(this.extensions)}get nodeViews(){let{editor:n}=this,{nodeExtensions:e}=jt(this.extensions);return Object.fromEntries(e.filter(t=>!!T(t,"addNodeView")).map(t=>{let r=this.attributes.filter(a=>a.type===t.name),i={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:n,type:V(t.name,this.schema)},s=T(t,"addNodeView",i);if(!s)return[];let o=s();if(!o)return[];let l=(a,c,u,d,f)=>{let h=Wt(a,r);return o({node:a,view:c,getPos:u,decorations:d,innerDecorations:f,editor:n,extension:t,HTMLAttributes:h})};return[t.name,l]}))}dispatchTransaction(n){let{editor:e}=this;return kn([...this.extensions].reverse()).reduceRight((r,i)=>{let s={name:i.name,options:i.options,storage:this.editor.extensionStorage[i.name],editor:e,type:gn(i.name,this.schema)},o=T(i,"dispatchTransaction",s);return o?l=>{o.call(s,{transaction:l,next:r})}:r},n)}transformPastedHTML(n){let{editor:e}=this;return kn([...this.extensions]).reduce((r,i)=>{let s={name:i.name,options:i.options,storage:this.editor.extensionStorage[i.name],editor:e,type:gn(i.name,this.schema)},o=T(i,"transformPastedHTML",s);return o?(l,a)=>{let c=r(l,a);return o.call(s,c)}:r},n||(r=>r))}get markViews(){let{editor:n}=this,{markExtensions:e}=jt(this.extensions);return Object.fromEntries(e.filter(t=>!!T(t,"addMarkView")).map(t=>{let r=this.attributes.filter(l=>l.type===t.name),i={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:n,type:We(t.name,this.schema)},s=T(t,"addMarkView",i);if(!s)return[];let o=(l,a,c)=>{let u=Wt(l,r);return s()({mark:l,view:a,inline:c,editor:n,extension:t,HTMLAttributes:u,updateAttributes:d=>{Dm(l,n,d)}})};return[t.name,o]}))}setupExtensions(){let n=this.extensions;this.editor.extensionStorage=Object.fromEntries(n.map(e=>[e.name,e.storage])),n.forEach(e=>{var t;let r={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:gn(e.name,this.schema)};e.type==="mark"&&((t=H(T(e,"keepOnSplit",r)))==null||t)&&this.splittableMarks.push(e.name);let i=T(e,"onBeforeCreate",r),s=T(e,"onCreate",r),o=T(e,"onUpdate",r),l=T(e,"onSelectionUpdate",r),a=T(e,"onTransaction",r),c=T(e,"onFocus",r),u=T(e,"onBlur",r),d=T(e,"onDestroy",r);i&&this.editor.on("beforeCreate",i),s&&this.editor.on("create",s),o&&this.editor.on("update",o),l&&this.editor.on("selectionUpdate",l),a&&this.editor.on("transaction",a),c&&this.editor.on("focus",c),u&&this.editor.on("blur",u),d&&this.editor.on("destroy",d)})}};Cr.resolve=Mc;Cr.sort=kn;Cr.flatten=Hs;var Sm={};Ls(Sm,{ClipboardTextSerializer:()=>Rc,Commands:()=>Pc,Delete:()=>Lc,Drop:()=>zc,Editable:()=>Bc,FocusEvents:()=>Hc,Keymap:()=>$c,Paste:()=>_c,Tabindex:()=>Vc,TextDirection:()=>jc,focusEventsPluginKey:()=>Fc});var F=class Dc extends js{constructor(){super(...arguments),this.type="extension"}static create(e={}){let t=typeof e=="function"?e():e;return new Dc(t)}configure(e){return super.configure(e)}extend(e){let t=typeof e=="function"?e():e;return super.extend(t)}},Rc=F.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new O({key:new P("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{let{editor:n}=this,{state:e,schema:t}=n,{doc:r,selection:i}=e,{ranges:s}=i,o=Math.min(...s.map(u=>u.$from.pos)),l=Math.max(...s.map(u=>u.$to.pos)),a=Cc(t);return wc(r,{from:o,to:l},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:a})}}})]}}),Pc=F.create({name:"commands",addCommands(){return{...fc}}}),Lc=F.create({name:"delete",onUpdate({transaction:n,appendedTransactions:e}){var t,r,i;let s=()=>{var o,l,a,c;if((c=(a=(l=(o=this.editor.options.coreExtensionOptions)==null?void 0:o.delete)==null?void 0:l.filterTransaction)==null?void 0:a.call(l,n))!=null?c:n.getMeta("y-sync$"))return;let u=Fs(n.before,[n,...e]);Vs(u).forEach(h=>{u.mapping.mapResult(h.oldRange.from).deletedAfter&&u.mapping.mapResult(h.oldRange.to).deletedBefore&&u.before.nodesBetween(h.oldRange.from,h.oldRange.to,(p,m)=>{let g=m+p.nodeSize-2,y=h.oldRange.from<=m&&g<=h.oldRange.to;this.editor.emit("delete",{type:"node",node:p,from:m,to:g,newFrom:u.mapping.map(m),newTo:u.mapping.map(g),deletedRange:h.oldRange,newRange:h.newRange,partial:!y,editor:this.editor,transaction:n,combinedTransform:u})})});let f=u.mapping;u.steps.forEach((h,p)=>{var m,g;if(h instanceof Be){let y=f.slice(p).map(h.from,-1),x=f.slice(p).map(h.to),C=f.invert().map(y,-1),A=f.invert().map(x),w=y>0?(m=u.doc.nodeAt(y-1))==null?void 0:m.marks.some(v=>v.eq(h.mark)):!1,I=(g=u.doc.nodeAt(x))==null?void 0:g.marks.some(v=>v.eq(h.mark));this.editor.emit("delete",{type:"mark",mark:h.mark,from:h.from,to:h.to,deletedRange:{from:C,to:A},newRange:{from:y,to:x},partial:!!(I||w),editor:this.editor,transaction:n,combinedTransform:u})}})};(i=(r=(t=this.editor.options.coreExtensionOptions)==null?void 0:t.delete)==null?void 0:r.async)==null||i?setTimeout(s,0):s()}}),zc=F.create({name:"drop",addProseMirrorPlugins(){return[new O({key:new P("tiptapDrop"),props:{handleDrop:(n,e,t,r)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:t,moved:r})}}})]}}),Bc=F.create({name:"editable",addProseMirrorPlugins(){return[new O({key:new P("editable"),props:{editable:()=>this.editor.options.editable}})]}}),Fc=new P("focusEvents"),Hc=F.create({name:"focusEvents",addProseMirrorPlugins(){let{editor:n}=this;return[new O({key:Fc,props:{handleDOMEvents:{focus:(e,t)=>{n.isFocused=!0;let r=n.state.tr.setMeta("focus",{event:t}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,t)=>{n.isFocused=!1;let r=n.state.tr.setMeta("blur",{event:t}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}}),$c=F.create({name:"keymap",addKeyboardShortcuts(){let n=()=>this.editor.commands.first(({commands:o})=>[()=>o.undoInputRule(),()=>o.command(({tr:l})=>{let{selection:a,doc:c}=l,{empty:u,$anchor:d}=a,{pos:f,parent:h}=d,p=d.parent.isTextblock&&f>0?l.doc.resolve(f-1):d,m=p.parent.type.spec.isolating,g=d.pos-d.parentOffset,y=m&&p.parent.childCount===1?g===d.pos:N.atStart(c).from===f;return!u||!h.type.isTextblock||h.textContent.length||!y||y&&d.parent.type.name==="paragraph"?!1:o.clearNodes()}),()=>o.deleteSelection(),()=>o.joinBackward(),()=>o.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:o})=>[()=>o.deleteSelection(),()=>o.deleteCurrentNode(),()=>o.joinForward(),()=>o.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:o})=>[()=>o.newlineInCode(),()=>o.createParagraphNear(),()=>o.liftEmptyBlock(),()=>o.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:n,"Mod-Backspace":n,"Shift-Backspace":n,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},i={...r},s={...r,"Ctrl-h":n,"Alt-Backspace":n,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return gr()||yc()?s:i},addProseMirrorPlugins(){return[new O({key:new P("clearDocument"),appendTransaction:(n,e,t)=>{if(n.some(m=>m.getMeta("composition")))return;let r=n.some(m=>m.docChanged)&&!e.doc.eq(t.doc),i=n.some(m=>m.getMeta("preventClearDocument"));if(!r||i)return;let{empty:s,from:o,to:l}=e.selection,a=N.atStart(e.doc).from,c=N.atEnd(e.doc).to;if(s||!(o===a&&l===c)||!xn(t.doc))return;let f=t.tr,h=yr({state:t,transaction:f}),{commands:p}=new kr({editor:this.editor,state:h});if(p.clearNodes(),!!f.steps.length)return f}})]}}),_c=F.create({name:"paste",addProseMirrorPlugins(){return[new O({key:new P("tiptapPaste"),props:{handlePaste:(n,e,t)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:t})}}})]}}),Vc=F.create({name:"tabindex",addProseMirrorPlugins(){return[new O({key:new P("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}}),jc=F.create({name:"textDirection",addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];let{nodeExtensions:n}=jt(this.extensions);return[{types:n.filter(e=>e.name!=="text").map(e=>e.name),attributes:{dir:{default:this.options.direction,parseHTML:e=>{let t=e.getAttribute("dir");return t&&(t==="ltr"||t==="rtl"||t==="auto")?t:this.options.direction},renderHTML:e=>e.dir?{dir:e.dir}:{}}}}]},addProseMirrorPlugins(){return[new O({key:new P("textDirection"),props:{attributes:()=>{let n=this.options.direction;return n?{dir:n}:{}}}})]}}),Mm=class yn{constructor(e,t,r=!1,i=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=e,this.editor=t,this.currentNode=i}get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var e;return(e=this.actualDepth)!=null?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let t=this.from,r=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can\u2019t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}t=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:t,to:r},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;let e=this.resolvedPos.start(this.resolvedPos.depth-1),t=this.resolvedPos.doc.resolve(e);return new yn(t,this.editor)}get before(){let e=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.from-3)),new yn(e,this.editor)}get after(){let e=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.to+3)),new yn(e,this.editor)}get children(){let e=[];return this.node.content.forEach((t,r)=>{let i=t.isBlock&&!t.isTextblock,s=t.isAtom&&!t.isText,o=t.isInline,l=this.pos+r+(s?0:1);if(l<0||l>this.resolvedPos.doc.nodeSize-2)return;let a=this.resolvedPos.doc.resolve(l);if(!i&&!o&&a.depth<=this.depth)return;let c=new yn(a,this.editor,i,i||o?t:null);i&&(c.actualDepth=this.depth+1),e.push(c)}),e}get firstChild(){return this.children[0]||null}get lastChild(){let e=this.children;return e[e.length-1]||null}closest(e,t={}){let r=null,i=this.parent;for(;i&&!r;){if(i.node.type.name===e)if(Object.keys(t).length>0){let s=i.node.attrs,o=Object.keys(t);for(let l=0;l{r&&i.length>0||(o.node.type.name===e&&s.every(a=>t[a]===o.node.attrs[a])&&i.push(o),!(r&&i.length>0)&&(i=i.concat(o.querySelectorAll(e,t,r))))}),i}setAttribute(e){let{tr:t}=this.editor.state;t.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(t)}},wm=`.ProseMirror { position: relative; } @@ -80,15 +80,15 @@ img.ProseMirror-separator { .ProseMirror-focused .ProseMirror-gapcursor { display: block; -}`;function Mm(n,e,t){let r=document.querySelector(`style[data-tiptap-style${t?`-${t}`:""}]`);if(r!==null)return r;let i=document.createElement("style");return e&&i.setAttribute("nonce",e),i.setAttribute(`data-tiptap-style${t?`-${t}`:""}`,""),i.innerHTML=n,document.getElementsByTagName("head")[0].appendChild(i),i}var jc=class extends cm{constructor(n={}){super(),this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:typeof document!="undefined"?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:r})=>{throw r},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null,enableExtensionDispatchTransaction:!0},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:Hp,createMappablePosition:$p},this.setOptions(n),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("mount",this.options.onMount),this.on("unmount",this.options.onUnmount),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:r,slice:i,moved:s})=>this.options.onDrop(r,i,s)),this.on("paste",({event:r,slice:i})=>this.options.onPaste(r,i)),this.on("delete",this.options.onDelete);let e=this.createDoc(),t=pc(e,this.options.autofocus);this.editorState=qn.create({doc:e,schema:this.schema,selection:t||void 0}),this.options.element&&this.mount(this.options.element)}mount(n){if(typeof document=="undefined")throw new Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(n),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(this.options.autofocus!==!1&&this.options.autofocus!==null&&this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){let n=this.editorView.dom;n!=null&&n.editor&&delete n.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{typeof this.css.remove=="function"?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch(n){console.warn("Failed to remove CSS element:",n)}this.css=null,this.emit("unmount",{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&typeof document!="undefined"&&(this.css=Mm(Sm,this.options.injectNonce))}setOptions(n={}){this.options={...this.options,...n},!(!this.editorView||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(n,e=!0){this.setOptions({editable:n}),e&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:n=>{this.editorState=n},dispatch:n=>{this.dispatchTransaction(n)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(n,e)=>{if(this.editorView)return this.editorView[e];if(e==="state")return this.editorState;if(e in n)return Reflect.get(n,e);throw new Error(`[tiptap error]: The editor view is not available. Cannot access view['${e}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(n,e){let t=bc(e)?e(n,[...this.state.plugins]):[...this.state.plugins,n],r=this.state.reconfigure({plugins:t});return this.view.updateState(r),r}unregisterPlugin(n){if(this.isDestroyed)return;let e=this.state.plugins,t=e;if([].concat(n).forEach(i=>{let s=typeof i=="string"?`${i}$`:i.key;t=t.filter(o=>!o.key.startsWith(s))}),e.length===t.length)return;let r=this.state.reconfigure({plugins:t});return this.view.updateState(r),r}createExtensionManager(){var n,e;let r=[...this.options.enableCoreExtensions?[zc,Rc.configure({blockSeparator:(e=(n=this.options.coreExtensionOptions)==null?void 0:n.clipboardTextSerializer)==null?void 0:e.blockSeparator}),Dc,Fc,Hc,_c,Lc,$c,Pc,Vc.configure({direction:this.options.textDirection})].filter(i=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[i.name]!==!1:!0):[],...this.options.extensions].filter(i=>["extension","node","mark"].includes(i==null?void 0:i.type));this.extensionManager=new Cr(r,this)}createCommandManager(){this.commandManager=new kr({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let n;try{n=Rs(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(e){if(!(e instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(e.message))throw e;this.emit("contentError",{editor:this,error:e,disableCollaboration:()=>{"collaboration"in this.storage&&typeof this.storage.collaboration=="object"&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(t=>t.name!=="collaboration"),this.createExtensionManager()}}),n=Rs(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}return n}createView(n){let{editorProps:e,enableExtensionDispatchTransaction:t}=this.options,r=e.dispatchTransaction||this.dispatchTransaction.bind(this),i=t?this.extensionManager.dispatchTransaction(r):r,s=e.transformPastedHTML,o=this.extensionManager.transformPastedHTML(s);this.editorView=new hn(n,{...e,attributes:{role:"textbox",...e==null?void 0:e.attributes},dispatchTransaction:i,transformPastedHTML:o,state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});let l=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(l),this.prependClass(),this.injectCSS();let a=this.view.dom;a.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(n){this.isCapturingTransaction=!0,n(),this.isCapturingTransaction=!1;let e=this.capturedTransaction;return this.capturedTransaction=null,e}dispatchTransaction(n){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=n;return}n.steps.forEach(c=>{var u;return(u=this.capturedTransaction)==null?void 0:u.step(c)});return}let{state:e,transactions:t}=this.state.applyTransaction(n),r=!this.state.selection.eq(e.selection),i=t.includes(n),s=this.state;if(this.emit("beforeTransaction",{editor:this,transaction:n,nextState:e}),!i)return;this.view.updateState(e),this.emit("transaction",{editor:this,transaction:n,appendedTransactions:t.slice(1)}),r&&this.emit("selectionUpdate",{editor:this,transaction:n});let o=t.findLast(c=>c.getMeta("focus")||c.getMeta("blur")),l=o==null?void 0:o.getMeta("focus"),a=o==null?void 0:o.getMeta("blur");l&&this.emit("focus",{editor:this,event:l.event,transaction:o}),a&&this.emit("blur",{editor:this,event:a.event,transaction:o}),!(n.getMeta("preventUpdate")||!t.some(c=>c.docChanged)||s.doc.eq(e.doc))&&this.emit("update",{editor:this,transaction:n,appendedTransactions:t.slice(1)})}getAttributes(n){return $s(this.state,n)}isActive(n,e){let t=typeof n=="string"?n:null,r=typeof n=="string"?e:n;return Fp(this.state,t,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return Hs(this.state.doc.content,this.schema)}getText(n){let{blockSeparator:e=` +}`;function Cm(n,e,t){let r=document.querySelector(`style[data-tiptap-style${t?`-${t}`:""}]`);if(r!==null)return r;let i=document.createElement("style");return e&&i.setAttribute("nonce",e),i.setAttribute(`data-tiptap-style${t?`-${t}`:""}`,""),i.innerHTML=n,document.getElementsByTagName("head")[0].appendChild(i),i}var Wc=class extends dm{constructor(n={}){super(),this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:typeof document!="undefined"?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:r})=>{throw r},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null,enableExtensionDispatchTransaction:!0},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:_p,createMappablePosition:Vp},this.setOptions(n),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("mount",this.options.onMount),this.on("unmount",this.options.onUnmount),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:r,slice:i,moved:s})=>this.options.onDrop(r,i,s)),this.on("paste",({event:r,slice:i})=>this.options.onPaste(r,i)),this.on("delete",this.options.onDelete);let e=this.createDoc(),t=mc(e,this.options.autofocus);this.editorState=qn.create({doc:e,schema:this.schema,selection:t||void 0}),this.options.element&&this.mount(this.options.element)}mount(n){if(typeof document=="undefined")throw new Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(n),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(this.options.autofocus!==!1&&this.options.autofocus!==null&&this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){let n=this.editorView.dom;n!=null&&n.editor&&delete n.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{typeof this.css.remove=="function"?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch(n){console.warn("Failed to remove CSS element:",n)}this.css=null,this.emit("unmount",{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&typeof document!="undefined"&&(this.css=Cm(wm,this.options.injectNonce))}setOptions(n={}){this.options={...this.options,...n},!(!this.editorView||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(n,e=!0){this.setOptions({editable:n}),e&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:n=>{this.editorState=n},dispatch:n=>{this.dispatchTransaction(n)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(n,e)=>{if(this.editorView)return this.editorView[e];if(e==="state")return this.editorState;if(e in n)return Reflect.get(n,e);throw new Error(`[tiptap error]: The editor view is not available. Cannot access view['${e}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(n,e){let t=xc(e)?e(n,[...this.state.plugins]):[...this.state.plugins,n],r=this.state.reconfigure({plugins:t});return this.view.updateState(r),r}unregisterPlugin(n){if(this.isDestroyed)return;let e=this.state.plugins,t=e;if([].concat(n).forEach(i=>{let s=typeof i=="string"?`${i}$`:i.key;t=t.filter(o=>!o.key.startsWith(s))}),e.length===t.length)return;let r=this.state.reconfigure({plugins:t});return this.view.updateState(r),r}createExtensionManager(){var n,e;let r=[...this.options.enableCoreExtensions?[Bc,Rc.configure({blockSeparator:(e=(n=this.options.coreExtensionOptions)==null?void 0:n.clipboardTextSerializer)==null?void 0:e.blockSeparator}),Pc,Hc,$c,Vc,zc,_c,Lc,jc.configure({direction:this.options.textDirection})].filter(i=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[i.name]!==!1:!0):[],...this.options.extensions].filter(i=>["extension","node","mark"].includes(i==null?void 0:i.type));this.extensionManager=new Cr(r,this)}createCommandManager(){this.commandManager=new kr({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let n;try{n=Rs(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(e){if(!(e instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(e.message))throw e;this.emit("contentError",{editor:this,error:e,disableCollaboration:()=>{"collaboration"in this.storage&&typeof this.storage.collaboration=="object"&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(t=>t.name!=="collaboration"),this.createExtensionManager()}}),n=Rs(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}return n}createView(n){let{editorProps:e,enableExtensionDispatchTransaction:t}=this.options,r=e.dispatchTransaction||this.dispatchTransaction.bind(this),i=t?this.extensionManager.dispatchTransaction(r):r,s=e.transformPastedHTML,o=this.extensionManager.transformPastedHTML(s);this.editorView=new hn(n,{...e,attributes:{role:"textbox",...e==null?void 0:e.attributes},dispatchTransaction:i,transformPastedHTML:o,state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});let l=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(l),this.prependClass(),this.injectCSS();let a=this.view.dom;a.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(n){this.isCapturingTransaction=!0,n(),this.isCapturingTransaction=!1;let e=this.capturedTransaction;return this.capturedTransaction=null,e}dispatchTransaction(n){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=n;return}n.steps.forEach(c=>{var u;return(u=this.capturedTransaction)==null?void 0:u.step(c)});return}let{state:e,transactions:t}=this.state.applyTransaction(n),r=!this.state.selection.eq(e.selection),i=t.includes(n),s=this.state;if(this.emit("beforeTransaction",{editor:this,transaction:n,nextState:e}),!i)return;this.view.updateState(e),this.emit("transaction",{editor:this,transaction:n,appendedTransactions:t.slice(1)}),r&&this.emit("selectionUpdate",{editor:this,transaction:n});let o=t.findLast(c=>c.getMeta("focus")||c.getMeta("blur")),l=o==null?void 0:o.getMeta("focus"),a=o==null?void 0:o.getMeta("blur");l&&this.emit("focus",{editor:this,event:l.event,transaction:o}),a&&this.emit("blur",{editor:this,event:a.event,transaction:o}),!(n.getMeta("preventUpdate")||!t.some(c=>c.docChanged)||s.doc.eq(e.doc))&&this.emit("update",{editor:this,transaction:n,appendedTransactions:t.slice(1)})}getAttributes(n){return _s(this.state,n)}isActive(n,e){let t=typeof n=="string"?n:null,r=typeof n=="string"?e:n;return $p(this.state,t,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return $s(this.state.doc.content,this.schema)}getText(n){let{blockSeparator:e=` -`,textSerializers:t={}}=n||{};return Dp(this.state.doc,{blockSeparator:e,textSerializers:{...wc(this.schema),...t}})}get isEmpty(){return xn(this.state.doc)}destroy(){this.emit("destroy"),this.unmount(),this.removeAllListeners()}get isDestroyed(){var n,e;return(e=(n=this.editorView)==null?void 0:n.isDestroyed)!=null?e:!0}$node(n,e){var t;return((t=this.$doc)==null?void 0:t.querySelector(n,e))||null}$nodes(n,e){var t;return((t=this.$doc)==null?void 0:t.querySelectorAll(n,e))||null}$pos(n){let e=this.state.doc.resolve(n);return new xm(e,this)}get $doc(){return this.$pos(0)}};function Ne(n){return new wr({find:n.find,handler:({state:e,range:t,match:r})=>{let i=H(n.getAttributes,void 0,r);if(i===!1||i===null)return null;let{tr:s}=e,o=r[r.length-1],l=r[0];if(o){let a=l.search(/\S/),c=t.from+l.indexOf(o),u=c+o.length;if(Sr(t.from,t.to,e.doc).filter(h=>h.mark.type.excluded.find(m=>m===n.type&&m!==h.mark.type)).filter(h=>h.to>c).length)return null;ut.from&&s.delete(t.from+a,c);let f=t.from+a+o.length;s.addMark(t.from+a,f,n.type.create(i||{})),s.removeStoredMark(n.type)}},undoable:n.undoable})}function vr(n){return new wr({find:n.find,handler:({state:e,range:t,match:r})=>{let i=H(n.getAttributes,void 0,r)||{},{tr:s}=e,o=t.from,l=t.to,a=n.type.create(i);if(r[1]){let c=r[0].lastIndexOf(r[1]),u=o+c;u>l?u=l:l=u+r[1].length;let d=r[0][r[0].length-1];s.insertText(d,o+r[0].length-1),s.replaceWith(u,l,a)}else if(r[0]){let c=n.type.isInline?o:o-1;s.insert(c,n.type.create(i)).delete(s.mapping.map(o),s.mapping.map(l))}s.scrollIntoView()},undoable:n.undoable})}function Sn(n){return new wr({find:n.find,handler:({state:e,range:t,match:r})=>{let i=e.doc.resolve(t.from),s=H(n.getAttributes,void 0,r)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),n.type))return null;e.tr.delete(t.from,t.to).setBlockType(t.from,t.from,n.type,s)},undoable:n.undoable})}function Oe(n){return new wr({find:n.find,handler:({state:e,range:t,match:r,chain:i})=>{let s=H(n.getAttributes,void 0,r)||{},o=e.tr.delete(t.from,t.to),a=o.doc.resolve(t.from).blockRange(),c=a&&Dt(a,n.type,s);if(!c)return null;if(o.wrap(a,c),n.keepMarks&&n.editor){let{selection:d,storedMarks:f}=e,{splittableMarks:h}=n.editor.extensionManager,p=f||d.$to.parentOffset&&d.$from.marks();if(p){let m=p.filter(g=>h.includes(g.type.name));o.ensureMarks(m)}}if(n.keepAttributes){let d=n.type.name==="bulletList"||n.type.name==="orderedList"?"listItem":"taskList";i().updateAttributes(d,s).run()}let u=o.doc.resolve(t.from-1).nodeBefore;u&&u.type===n.type&&ge(o.doc,t.from-1)&&(!n.joinPredicate||n.joinPredicate(r,u))&&o.join(t.from-1)},undoable:n.undoable})}var wm=n=>"touches"in n,Wc=class{constructor(n){this.directions=["bottom-left","bottom-right","top-left","top-right"],this.minSize={height:8,width:8},this.preserveAspectRatio=!1,this.classNames={container:"",wrapper:"",handle:"",resizing:""},this.initialWidth=0,this.initialHeight=0,this.aspectRatio=1,this.isResizing=!1,this.activeHandle=null,this.startX=0,this.startY=0,this.startWidth=0,this.startHeight=0,this.isShiftKeyPressed=!1,this.lastEditableState=void 0,this.handleMap=new Map,this.handleMouseMove=l=>{if(!this.isResizing||!this.activeHandle)return;let a=l.clientX-this.startX,c=l.clientY-this.startY;this.handleResize(a,c)},this.handleTouchMove=l=>{if(!this.isResizing||!this.activeHandle)return;let a=l.touches[0];if(!a)return;let c=a.clientX-this.startX,u=a.clientY-this.startY;this.handleResize(c,u)},this.handleMouseUp=()=>{if(!this.isResizing)return;let l=this.element.offsetWidth,a=this.element.offsetHeight;this.onCommit(l,a),this.isResizing=!1,this.activeHandle=null,this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)},this.handleKeyDown=l=>{l.key==="Shift"&&(this.isShiftKeyPressed=!0)},this.handleKeyUp=l=>{l.key==="Shift"&&(this.isShiftKeyPressed=!1)};var e,t,r,i,s,o;this.node=n.node,this.editor=n.editor,this.element=n.element,this.contentElement=n.contentElement,this.getPos=n.getPos,this.onResize=n.onResize,this.onCommit=n.onCommit,this.onUpdate=n.onUpdate,(e=n.options)!=null&&e.min&&(this.minSize={...this.minSize,...n.options.min}),(t=n.options)!=null&&t.max&&(this.maxSize=n.options.max),(r=n==null?void 0:n.options)!=null&&r.directions&&(this.directions=n.options.directions),(i=n.options)!=null&&i.preserveAspectRatio&&(this.preserveAspectRatio=n.options.preserveAspectRatio),(s=n.options)!=null&&s.className&&(this.classNames={container:n.options.className.container||"",wrapper:n.options.className.wrapper||"",handle:n.options.className.handle||"",resizing:n.options.className.resizing||""}),(o=n.options)!=null&&o.createCustomHandle&&(this.createCustomHandle=n.options.createCustomHandle),this.wrapper=this.createWrapper(),this.container=this.createContainer(),this.applyInitialSize(),this.attachHandles(),this.editor.on("update",this.handleEditorUpdate.bind(this))}get dom(){return this.container}get contentDOM(){var n;return(n=this.contentElement)!=null?n:null}handleEditorUpdate(){let n=this.editor.isEditable;n!==this.lastEditableState&&(this.lastEditableState=n,n?n&&this.handleMap.size===0&&this.attachHandles():this.removeHandles())}update(n,e,t){return n.type!==this.node.type?!1:(this.node=n,this.onUpdate?this.onUpdate(n,e,t):!0)}destroy(){this.isResizing&&(this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp),this.isResizing=!1,this.activeHandle=null),this.editor.off("update",this.handleEditorUpdate.bind(this)),this.container.remove()}createContainer(){let n=document.createElement("div");return n.dataset.resizeContainer="",n.dataset.node=this.node.type.name,n.style.display=this.node.type.isInline?"inline-flex":"flex",this.classNames.container&&(n.className=this.classNames.container),n.appendChild(this.wrapper),n}createWrapper(){let n=document.createElement("div");return n.style.position="relative",n.style.display="block",n.dataset.resizeWrapper="",this.classNames.wrapper&&(n.className=this.classNames.wrapper),n.appendChild(this.element),n}createHandle(n){let e=document.createElement("div");return e.dataset.resizeHandle=n,e.style.position="absolute",this.classNames.handle&&(e.className=this.classNames.handle),e}positionHandle(n,e){let t=e.includes("top"),r=e.includes("bottom"),i=e.includes("left"),s=e.includes("right");t&&(n.style.top="0"),r&&(n.style.bottom="0"),i&&(n.style.left="0"),s&&(n.style.right="0"),(e==="top"||e==="bottom")&&(n.style.left="0",n.style.right="0"),(e==="left"||e==="right")&&(n.style.top="0",n.style.bottom="0")}attachHandles(){this.directions.forEach(n=>{let e;this.createCustomHandle?e=this.createCustomHandle(n):e=this.createHandle(n),e instanceof HTMLElement||(console.warn(`[ResizableNodeView] createCustomHandle("${n}") did not return an HTMLElement. Falling back to default handle.`),e=this.createHandle(n)),this.createCustomHandle||this.positionHandle(e,n),e.addEventListener("mousedown",t=>this.handleResizeStart(t,n)),e.addEventListener("touchstart",t=>this.handleResizeStart(t,n)),this.handleMap.set(n,e),this.wrapper.appendChild(e)})}removeHandles(){this.handleMap.forEach(n=>n.remove()),this.handleMap.clear()}applyInitialSize(){let n=this.node.attrs.width,e=this.node.attrs.height;n?(this.element.style.width=`${n}px`,this.initialWidth=n):this.initialWidth=this.element.offsetWidth,e?(this.element.style.height=`${e}px`,this.initialHeight=e):this.initialHeight=this.element.offsetHeight,this.initialWidth>0&&this.initialHeight>0&&(this.aspectRatio=this.initialWidth/this.initialHeight)}handleResizeStart(n,e){n.preventDefault(),n.stopPropagation(),this.isResizing=!0,this.activeHandle=e,wm(n)?(this.startX=n.touches[0].clientX,this.startY=n.touches[0].clientY):(this.startX=n.clientX,this.startY=n.clientY),this.startWidth=this.element.offsetWidth,this.startHeight=this.element.offsetHeight,this.startWidth>0&&this.startHeight>0&&(this.aspectRatio=this.startWidth/this.startHeight);let t=this.getPos();this.container.dataset.resizeState="true",this.classNames.resizing&&this.container.classList.add(this.classNames.resizing),document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("touchmove",this.handleTouchMove),document.addEventListener("mouseup",this.handleMouseUp),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}handleResize(n,e){if(!this.activeHandle)return;let t=this.preserveAspectRatio||this.isShiftKeyPressed,{width:r,height:i}=this.calculateNewDimensions(this.activeHandle,n,e),s=this.applyConstraints(r,i,t);this.element.style.width=`${s.width}px`,this.element.style.height=`${s.height}px`,this.onResize&&this.onResize(s.width,s.height)}calculateNewDimensions(n,e,t){let r=this.startWidth,i=this.startHeight,s=n.includes("right"),o=n.includes("left"),l=n.includes("bottom"),a=n.includes("top");return s?r=this.startWidth+e:o&&(r=this.startWidth-e),l?i=this.startHeight+t:a&&(i=this.startHeight-t),(n==="right"||n==="left")&&(r=this.startWidth+(s?e:-e)),(n==="top"||n==="bottom")&&(i=this.startHeight+(l?t:-t)),this.preserveAspectRatio||this.isShiftKeyPressed?this.applyAspectRatio(r,i,n):{width:r,height:i}}applyConstraints(n,e,t){var r,i,s,o;if(!t){let c=Math.max(this.minSize.width,n),u=Math.max(this.minSize.height,e);return(r=this.maxSize)!=null&&r.width&&(c=Math.min(this.maxSize.width,c)),(i=this.maxSize)!=null&&i.height&&(u=Math.min(this.maxSize.height,u)),{width:c,height:u}}let l=n,a=e;return lthis.maxSize.width&&(l=this.maxSize.width,a=l/this.aspectRatio),(o=this.maxSize)!=null&&o.height&&a>this.maxSize.height&&(a=this.maxSize.height,l=a*this.aspectRatio),{width:l,height:a}}applyAspectRatio(n,e,t){let r=t==="left"||t==="right",i=t==="top"||t==="bottom";return r?{width:n,height:n/this.aspectRatio}:i?{width:e*this.aspectRatio,height:e}:{width:n,height:n/this.aspectRatio}}};function Kc(n,e){let{selection:t}=n,{$from:r}=t;if(t instanceof M){let s=r.index();return r.parent.canReplaceWith(s,s+1,e)}let i=r.depth;for(;i>=0;){let s=r.index(i);if(r.node(i).contentMatchAt(s).matchType(e))return!0;i-=1}return!1}var Cm={};Ps(Cm,{createAtomBlockMarkdownSpec:()=>vm,createBlockMarkdownSpec:()=>Tm,createInlineMarkdownSpec:()=>Nm,parseAttributes:()=>js,parseIndentedBlocks:()=>Tr,renderNestedMarkdownContent:()=>Mn,serializeAttributes:()=>Ws});function js(n){if(!(n!=null&&n.trim()))return{};let e={},t=[],r=n.replace(/["']([^"']*)["']/g,c=>(t.push(c),`__QUOTED_${t.length-1}__`)),i=r.match(/(?:^|\s)\.([a-zA-Z][\w-]*)/g);if(i){let c=i.map(u=>u.trim().slice(1));e.class=c.join(" ")}let s=r.match(/(?:^|\s)#([a-zA-Z][\w-]*)/);s&&(e.id=s[1]);let o=/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g;Array.from(r.matchAll(o)).forEach(([,c,u])=>{var d;let f=parseInt(((d=u.match(/__QUOTED_(\d+)__/))==null?void 0:d[1])||"0",10),h=t[f];h&&(e[c]=h.slice(1,-1))});let a=r.replace(/(?:^|\s)\.([a-zA-Z][\w-]*)/g,"").replace(/(?:^|\s)#([a-zA-Z][\w-]*)/g,"").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g,"").trim();return a&&a.split(/\s+/).filter(Boolean).forEach(u=>{u.match(/^[a-zA-Z][\w-]*$/)&&(e[u]=!0)}),e}function Ws(n){if(!n||Object.keys(n).length===0)return"";let e=[];return n.class&&String(n.class).split(/\s+/).filter(Boolean).forEach(r=>e.push(`.${r}`)),n.id&&e.push(`#${n.id}`),Object.entries(n).forEach(([t,r])=>{t==="class"||t==="id"||(r===!0?e.push(t):r!==!1&&r!=null&&e.push(`${t}="${String(r)}"`))}),e.join(" ")}function vm(n){let{nodeName:e,name:t,parseAttributes:r=js,serializeAttributes:i=Ws,defaultAttributes:s={},requiredAttributes:o=[],allowedAttributes:l}=n,a=t||e,c=u=>{if(!l)return u;let d={};return l.forEach(f=>{f in u&&(d[f]=u[f])}),d};return{parseMarkdown:(u,d)=>{let f={...s,...u.attributes};return d.createNode(e,f,[])},markdownTokenizer:{name:e,level:"block",start(u){var d;let f=new RegExp(`^:::${a}(?:\\s|$)`,"m"),h=(d=u.match(f))==null?void 0:d.index;return h!==void 0?h:-1},tokenize(u,d,f){let h=new RegExp(`^:::${a}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),p=u.match(h);if(!p)return;let m=p[1]||"",g=r(m);if(!o.find(x=>!(x in g)))return{type:e,raw:p[0],attributes:g}}},renderMarkdown:u=>{let d=c(u.attrs||{}),f=i(d),h=f?` {${f}}`:"";return`:::${a}${h} :::`}}}function Tm(n){let{nodeName:e,name:t,getContent:r,parseAttributes:i=js,serializeAttributes:s=Ws,defaultAttributes:o={},content:l="block",allowedAttributes:a}=n,c=t||e,u=d=>{if(!a)return d;let f={};return a.forEach(h=>{h in d&&(f[h]=d[h])}),f};return{parseMarkdown:(d,f)=>{let h;if(r){let m=r(d);h=typeof m=="string"?[{type:"text",text:m}]:m}else l==="block"?h=f.parseChildren(d.tokens||[]):h=f.parseInline(d.tokens||[]);let p={...o,...d.attributes};return f.createNode(e,p,h)},markdownTokenizer:{name:e,level:"block",start(d){var f;let h=new RegExp(`^:::${c}`,"m"),p=(f=d.match(h))==null?void 0:f.index;return p!==void 0?p:-1},tokenize(d,f,h){var p;let m=new RegExp(`^:::${c}(?:\\s+\\{([^}]*)\\})?\\s*\\n`),g=d.match(m);if(!g)return;let[y,x=""]=g,C=i(x),A=1,w=y.length,I="",v=/^:::([\w-]*)(\s.*)?/gm,L=d.slice(w);for(v.lastIndex=0;;){let z=v.exec(L);if(z===null)break;let J=z.index,qe=z[1];if(!((p=z[2])!=null&&p.endsWith(":::"))){if(qe)A+=1;else if(A-=1,A===0){let Ce=L.slice(0,J);I=Ce.trim();let le=d.slice(0,w+J+z[0].length),Y=[];if(I)if(l==="block")for(Y=h.blockTokens(Ce),Y.forEach(q=>{q.text&&(!q.tokens||q.tokens.length===0)&&(q.tokens=h.inlineTokens(q.text))});Y.length>0;){let q=Y[Y.length-1];if(q.type==="paragraph"&&(!q.text||q.text.trim()===""))Y.pop();else break}else Y=h.inlineTokens(I);return{type:e,raw:le,attributes:C,content:I,tokens:Y}}}}}},renderMarkdown:(d,f)=>{let h=u(d.attrs||{}),p=s(h),m=p?` {${p}}`:"",g=f.renderChildren(d.content||[],` +`,textSerializers:t={}}=n||{};return Lp(this.state.doc,{blockSeparator:e,textSerializers:{...Cc(this.schema),...t}})}get isEmpty(){return xn(this.state.doc)}destroy(){this.emit("destroy"),this.unmount(),this.removeAllListeners()}get isDestroyed(){var n,e;return(e=(n=this.editorView)==null?void 0:n.isDestroyed)!=null?e:!0}$node(n,e){var t;return((t=this.$doc)==null?void 0:t.querySelector(n,e))||null}$nodes(n,e){var t;return((t=this.$doc)==null?void 0:t.querySelectorAll(n,e))||null}$pos(n){let e=this.state.doc.resolve(n);return new Mm(e,this)}get $doc(){return this.$pos(0)}};function Ne(n){return new wr({find:n.find,handler:({state:e,range:t,match:r})=>{let i=H(n.getAttributes,void 0,r);if(i===!1||i===null)return null;let{tr:s}=e,o=r[r.length-1],l=r[0];if(o){let a=l.search(/\S/),c=t.from+l.indexOf(o),u=c+o.length;if(Sr(t.from,t.to,e.doc).filter(h=>h.mark.type.excluded.find(m=>m===n.type&&m!==h.mark.type)).filter(h=>h.to>c).length)return null;ut.from&&s.delete(t.from+a,c);let f=t.from+a+o.length;s.addMark(t.from+a,f,n.type.create(i||{})),s.removeStoredMark(n.type)}},undoable:n.undoable})}function vr(n){return new wr({find:n.find,handler:({state:e,range:t,match:r})=>{let i=H(n.getAttributes,void 0,r)||{},{tr:s}=e,o=t.from,l=t.to,a=n.type.create(i);if(r[1]){let c=r[0].lastIndexOf(r[1]),u=o+c;u>l?u=l:l=u+r[1].length;let d=r[0][r[0].length-1];s.insertText(d,o+r[0].length-1),s.replaceWith(u,l,a)}else if(r[0]){let c=n.type.isInline?o:o-1;s.insert(c,n.type.create(i)).delete(s.mapping.map(o),s.mapping.map(l))}s.scrollIntoView()},undoable:n.undoable})}function Sn(n){return new wr({find:n.find,handler:({state:e,range:t,match:r})=>{let i=e.doc.resolve(t.from),s=H(n.getAttributes,void 0,r)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),n.type))return null;e.tr.delete(t.from,t.to).setBlockType(t.from,t.from,n.type,s)},undoable:n.undoable})}function Oe(n){return new wr({find:n.find,handler:({state:e,range:t,match:r,chain:i})=>{let s=H(n.getAttributes,void 0,r)||{},o=e.tr.delete(t.from,t.to),a=o.doc.resolve(t.from).blockRange(),c=a&&Rt(a,n.type,s);if(!c)return null;if(o.wrap(a,c),n.keepMarks&&n.editor){let{selection:d,storedMarks:f}=e,{splittableMarks:h}=n.editor.extensionManager,p=f||d.$to.parentOffset&&d.$from.marks();if(p){let m=p.filter(g=>h.includes(g.type.name));o.ensureMarks(m)}}if(n.keepAttributes){let d=n.type.name==="bulletList"||n.type.name==="orderedList"?"listItem":"taskList";i().updateAttributes(d,s).run()}let u=o.doc.resolve(t.from-1).nodeBefore;u&&u.type===n.type&&ge(o.doc,t.from-1)&&(!n.joinPredicate||n.joinPredicate(r,u))&&o.join(t.from-1)},undoable:n.undoable})}var vm=n=>"touches"in n,Kc=class{constructor(n){this.directions=["bottom-left","bottom-right","top-left","top-right"],this.minSize={height:8,width:8},this.preserveAspectRatio=!1,this.classNames={container:"",wrapper:"",handle:"",resizing:""},this.initialWidth=0,this.initialHeight=0,this.aspectRatio=1,this.isResizing=!1,this.activeHandle=null,this.startX=0,this.startY=0,this.startWidth=0,this.startHeight=0,this.isShiftKeyPressed=!1,this.lastEditableState=void 0,this.handleMap=new Map,this.handleMouseMove=l=>{if(!this.isResizing||!this.activeHandle)return;let a=l.clientX-this.startX,c=l.clientY-this.startY;this.handleResize(a,c)},this.handleTouchMove=l=>{if(!this.isResizing||!this.activeHandle)return;let a=l.touches[0];if(!a)return;let c=a.clientX-this.startX,u=a.clientY-this.startY;this.handleResize(c,u)},this.handleMouseUp=()=>{if(!this.isResizing)return;let l=this.element.offsetWidth,a=this.element.offsetHeight;this.onCommit(l,a),this.isResizing=!1,this.activeHandle=null,this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)},this.handleKeyDown=l=>{l.key==="Shift"&&(this.isShiftKeyPressed=!0)},this.handleKeyUp=l=>{l.key==="Shift"&&(this.isShiftKeyPressed=!1)};var e,t,r,i,s,o;this.node=n.node,this.editor=n.editor,this.element=n.element,this.contentElement=n.contentElement,this.getPos=n.getPos,this.onResize=n.onResize,this.onCommit=n.onCommit,this.onUpdate=n.onUpdate,(e=n.options)!=null&&e.min&&(this.minSize={...this.minSize,...n.options.min}),(t=n.options)!=null&&t.max&&(this.maxSize=n.options.max),(r=n==null?void 0:n.options)!=null&&r.directions&&(this.directions=n.options.directions),(i=n.options)!=null&&i.preserveAspectRatio&&(this.preserveAspectRatio=n.options.preserveAspectRatio),(s=n.options)!=null&&s.className&&(this.classNames={container:n.options.className.container||"",wrapper:n.options.className.wrapper||"",handle:n.options.className.handle||"",resizing:n.options.className.resizing||""}),(o=n.options)!=null&&o.createCustomHandle&&(this.createCustomHandle=n.options.createCustomHandle),this.wrapper=this.createWrapper(),this.container=this.createContainer(),this.applyInitialSize(),this.attachHandles(),this.editor.on("update",this.handleEditorUpdate.bind(this))}get dom(){return this.container}get contentDOM(){var n;return(n=this.contentElement)!=null?n:null}handleEditorUpdate(){let n=this.editor.isEditable;n!==this.lastEditableState&&(this.lastEditableState=n,n?n&&this.handleMap.size===0&&this.attachHandles():this.removeHandles())}update(n,e,t){return n.type!==this.node.type?!1:(this.node=n,this.onUpdate?this.onUpdate(n,e,t):!0)}destroy(){this.isResizing&&(this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp),this.isResizing=!1,this.activeHandle=null),this.editor.off("update",this.handleEditorUpdate.bind(this)),this.container.remove()}createContainer(){let n=document.createElement("div");return n.dataset.resizeContainer="",n.dataset.node=this.node.type.name,n.style.display=this.node.type.isInline?"inline-flex":"flex",this.classNames.container&&(n.className=this.classNames.container),n.appendChild(this.wrapper),n}createWrapper(){let n=document.createElement("div");return n.style.position="relative",n.style.display="block",n.dataset.resizeWrapper="",this.classNames.wrapper&&(n.className=this.classNames.wrapper),n.appendChild(this.element),n}createHandle(n){let e=document.createElement("div");return e.dataset.resizeHandle=n,e.style.position="absolute",this.classNames.handle&&(e.className=this.classNames.handle),e}positionHandle(n,e){let t=e.includes("top"),r=e.includes("bottom"),i=e.includes("left"),s=e.includes("right");t&&(n.style.top="0"),r&&(n.style.bottom="0"),i&&(n.style.left="0"),s&&(n.style.right="0"),(e==="top"||e==="bottom")&&(n.style.left="0",n.style.right="0"),(e==="left"||e==="right")&&(n.style.top="0",n.style.bottom="0")}attachHandles(){this.directions.forEach(n=>{let e;this.createCustomHandle?e=this.createCustomHandle(n):e=this.createHandle(n),e instanceof HTMLElement||(console.warn(`[ResizableNodeView] createCustomHandle("${n}") did not return an HTMLElement. Falling back to default handle.`),e=this.createHandle(n)),this.createCustomHandle||this.positionHandle(e,n),e.addEventListener("mousedown",t=>this.handleResizeStart(t,n)),e.addEventListener("touchstart",t=>this.handleResizeStart(t,n)),this.handleMap.set(n,e),this.wrapper.appendChild(e)})}removeHandles(){this.handleMap.forEach(n=>n.remove()),this.handleMap.clear()}applyInitialSize(){let n=this.node.attrs.width,e=this.node.attrs.height;n?(this.element.style.width=`${n}px`,this.initialWidth=n):this.initialWidth=this.element.offsetWidth,e?(this.element.style.height=`${e}px`,this.initialHeight=e):this.initialHeight=this.element.offsetHeight,this.initialWidth>0&&this.initialHeight>0&&(this.aspectRatio=this.initialWidth/this.initialHeight)}handleResizeStart(n,e){n.preventDefault(),n.stopPropagation(),this.isResizing=!0,this.activeHandle=e,vm(n)?(this.startX=n.touches[0].clientX,this.startY=n.touches[0].clientY):(this.startX=n.clientX,this.startY=n.clientY),this.startWidth=this.element.offsetWidth,this.startHeight=this.element.offsetHeight,this.startWidth>0&&this.startHeight>0&&(this.aspectRatio=this.startWidth/this.startHeight);let t=this.getPos();this.container.dataset.resizeState="true",this.classNames.resizing&&this.container.classList.add(this.classNames.resizing),document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("touchmove",this.handleTouchMove),document.addEventListener("mouseup",this.handleMouseUp),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}handleResize(n,e){if(!this.activeHandle)return;let t=this.preserveAspectRatio||this.isShiftKeyPressed,{width:r,height:i}=this.calculateNewDimensions(this.activeHandle,n,e),s=this.applyConstraints(r,i,t);this.element.style.width=`${s.width}px`,this.element.style.height=`${s.height}px`,this.onResize&&this.onResize(s.width,s.height)}calculateNewDimensions(n,e,t){let r=this.startWidth,i=this.startHeight,s=n.includes("right"),o=n.includes("left"),l=n.includes("bottom"),a=n.includes("top");return s?r=this.startWidth+e:o&&(r=this.startWidth-e),l?i=this.startHeight+t:a&&(i=this.startHeight-t),(n==="right"||n==="left")&&(r=this.startWidth+(s?e:-e)),(n==="top"||n==="bottom")&&(i=this.startHeight+(l?t:-t)),this.preserveAspectRatio||this.isShiftKeyPressed?this.applyAspectRatio(r,i,n):{width:r,height:i}}applyConstraints(n,e,t){var r,i,s,o;if(!t){let c=Math.max(this.minSize.width,n),u=Math.max(this.minSize.height,e);return(r=this.maxSize)!=null&&r.width&&(c=Math.min(this.maxSize.width,c)),(i=this.maxSize)!=null&&i.height&&(u=Math.min(this.maxSize.height,u)),{width:c,height:u}}let l=n,a=e;return lthis.maxSize.width&&(l=this.maxSize.width,a=l/this.aspectRatio),(o=this.maxSize)!=null&&o.height&&a>this.maxSize.height&&(a=this.maxSize.height,l=a*this.aspectRatio),{width:l,height:a}}applyAspectRatio(n,e,t){let r=t==="left"||t==="right",i=t==="top"||t==="bottom";return r?{width:n,height:n/this.aspectRatio}:i?{width:e*this.aspectRatio,height:e}:{width:n,height:n/this.aspectRatio}}};function Uc(n,e){let{selection:t}=n,{$from:r}=t;if(t instanceof M){let s=r.index();return r.parent.canReplaceWith(s,s+1,e)}let i=r.depth;for(;i>=0;){let s=r.index(i);if(r.node(i).contentMatchAt(s).matchType(e))return!0;i-=1}return!1}var Tm={};Ls(Tm,{createAtomBlockMarkdownSpec:()=>Em,createBlockMarkdownSpec:()=>Am,createInlineMarkdownSpec:()=>Im,parseAttributes:()=>Ws,parseIndentedBlocks:()=>Tr,renderNestedMarkdownContent:()=>Mn,serializeAttributes:()=>Ks});function Ws(n){if(!(n!=null&&n.trim()))return{};let e={},t=[],r=n.replace(/["']([^"']*)["']/g,c=>(t.push(c),`__QUOTED_${t.length-1}__`)),i=r.match(/(?:^|\s)\.([a-zA-Z][\w-]*)/g);if(i){let c=i.map(u=>u.trim().slice(1));e.class=c.join(" ")}let s=r.match(/(?:^|\s)#([a-zA-Z][\w-]*)/);s&&(e.id=s[1]);let o=/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g;Array.from(r.matchAll(o)).forEach(([,c,u])=>{var d;let f=parseInt(((d=u.match(/__QUOTED_(\d+)__/))==null?void 0:d[1])||"0",10),h=t[f];h&&(e[c]=h.slice(1,-1))});let a=r.replace(/(?:^|\s)\.([a-zA-Z][\w-]*)/g,"").replace(/(?:^|\s)#([a-zA-Z][\w-]*)/g,"").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g,"").trim();return a&&a.split(/\s+/).filter(Boolean).forEach(u=>{u.match(/^[a-zA-Z][\w-]*$/)&&(e[u]=!0)}),e}function Ks(n){if(!n||Object.keys(n).length===0)return"";let e=[];return n.class&&String(n.class).split(/\s+/).filter(Boolean).forEach(r=>e.push(`.${r}`)),n.id&&e.push(`#${n.id}`),Object.entries(n).forEach(([t,r])=>{t==="class"||t==="id"||(r===!0?e.push(t):r!==!1&&r!=null&&e.push(`${t}="${String(r)}"`))}),e.join(" ")}function Em(n){let{nodeName:e,name:t,parseAttributes:r=Ws,serializeAttributes:i=Ks,defaultAttributes:s={},requiredAttributes:o=[],allowedAttributes:l}=n,a=t||e,c=u=>{if(!l)return u;let d={};return l.forEach(f=>{f in u&&(d[f]=u[f])}),d};return{parseMarkdown:(u,d)=>{let f={...s,...u.attributes};return d.createNode(e,f,[])},markdownTokenizer:{name:e,level:"block",start(u){var d;let f=new RegExp(`^:::${a}(?:\\s|$)`,"m"),h=(d=u.match(f))==null?void 0:d.index;return h!==void 0?h:-1},tokenize(u,d,f){let h=new RegExp(`^:::${a}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),p=u.match(h);if(!p)return;let m=p[1]||"",g=r(m);if(!o.find(x=>!(x in g)))return{type:e,raw:p[0],attributes:g}}},renderMarkdown:u=>{let d=c(u.attrs||{}),f=i(d),h=f?` {${f}}`:"";return`:::${a}${h} :::`}}}function Am(n){let{nodeName:e,name:t,getContent:r,parseAttributes:i=Ws,serializeAttributes:s=Ks,defaultAttributes:o={},content:l="block",allowedAttributes:a}=n,c=t||e,u=d=>{if(!a)return d;let f={};return a.forEach(h=>{h in d&&(f[h]=d[h])}),f};return{parseMarkdown:(d,f)=>{let h;if(r){let m=r(d);h=typeof m=="string"?[{type:"text",text:m}]:m}else l==="block"?h=f.parseChildren(d.tokens||[]):h=f.parseInline(d.tokens||[]);let p={...o,...d.attributes};return f.createNode(e,p,h)},markdownTokenizer:{name:e,level:"block",start(d){var f;let h=new RegExp(`^:::${c}`,"m"),p=(f=d.match(h))==null?void 0:f.index;return p!==void 0?p:-1},tokenize(d,f,h){var p;let m=new RegExp(`^:::${c}(?:\\s+\\{([^}]*)\\})?\\s*\\n`),g=d.match(m);if(!g)return;let[y,x=""]=g,C=i(x),A=1,w=y.length,I="",v=/^:::([\w-]*)(\s.*)?/gm,L=d.slice(w);for(v.lastIndex=0;;){let z=v.exec(L);if(z===null)break;let J=z.index,qe=z[1];if(!((p=z[2])!=null&&p.endsWith(":::"))){if(qe)A+=1;else if(A-=1,A===0){let Ce=L.slice(0,J);I=Ce.trim();let le=d.slice(0,w+J+z[0].length),Y=[];if(I)if(l==="block")for(Y=h.blockTokens(Ce),Y.forEach(q=>{q.text&&(!q.tokens||q.tokens.length===0)&&(q.tokens=h.inlineTokens(q.text))});Y.length>0;){let q=Y[Y.length-1];if(q.type==="paragraph"&&(!q.text||q.text.trim()===""))Y.pop();else break}else Y=h.inlineTokens(I);return{type:e,raw:le,attributes:C,content:I,tokens:Y}}}}}},renderMarkdown:(d,f)=>{let h=u(d.attrs||{}),p=s(h),m=p?` {${p}}`:"",g=f.renderChildren(d.content||[],` `);return`:::${c}${m} ${g} -:::`}}}function Em(n){if(!n.trim())return{};let e={},t=/(\w+)=(?:"([^"]*)"|'([^']*)')/g,r=t.exec(n);for(;r!==null;){let[,i,s,o]=r;e[i]=s||o,r=t.exec(n)}return e}function Am(n){return Object.entries(n).filter(([,e])=>e!=null).map(([e,t])=>`${e}="${t}"`).join(" ")}function Nm(n){let{nodeName:e,name:t,getContent:r,parseAttributes:i=Em,serializeAttributes:s=Am,defaultAttributes:o={},selfClosing:l=!1,allowedAttributes:a}=n,c=t||e,u=f=>{if(!a)return f;let h={};return a.forEach(p=>{let m=typeof p=="string"?p:p.name,g=typeof p=="string"?void 0:p.skipIfDefault;if(m in f){let y=f[m];if(g!==void 0&&y===g)return;h[m]=y}}),h},d=c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return{parseMarkdown:(f,h)=>{let p={...o,...f.attributes};if(l)return h.createNode(e,p);let m=r?r(f):f.content||"";return m?h.createNode(e,p,[h.createTextNode(m)]):h.createNode(e,p,[])},markdownTokenizer:{name:e,level:"inline",start(f){let h=l?new RegExp(`\\[${d}\\s*[^\\]]*\\]`):new RegExp(`\\[${d}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${d}\\]`),p=f.match(h),m=p==null?void 0:p.index;return m!==void 0?m:-1},tokenize(f,h,p){let m=l?new RegExp(`^\\[${d}\\s*([^\\]]*)\\]`):new RegExp(`^\\[${d}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${d}\\]`),g=f.match(m);if(!g)return;let y="",x="";if(l){let[,A]=g;x=A}else{let[,A,w]=g;x=A,y=w||""}let C=i(x.trim());return{type:e,raw:g[0],content:y.trim(),attributes:C}}},renderMarkdown:f=>{let h="";r?h=r(f):f.content&&f.content.length>0&&(h=f.content.filter(y=>y.type==="text").map(y=>y.text).join(""));let p=u(f.attrs||{}),m=s(p),g=m?` ${m}`:"";return l?`[${c}${g}]`:`[${c}${g}]${h}[/${c}]`}}}function Tr(n,e,t){var r,i,s,o;let l=n.split(` +:::`}}}function Nm(n){if(!n.trim())return{};let e={},t=/(\w+)=(?:"([^"]*)"|'([^']*)')/g,r=t.exec(n);for(;r!==null;){let[,i,s,o]=r;e[i]=s||o,r=t.exec(n)}return e}function Om(n){return Object.entries(n).filter(([,e])=>e!=null).map(([e,t])=>`${e}="${t}"`).join(" ")}function Im(n){let{nodeName:e,name:t,getContent:r,parseAttributes:i=Nm,serializeAttributes:s=Om,defaultAttributes:o={},selfClosing:l=!1,allowedAttributes:a}=n,c=t||e,u=f=>{if(!a)return f;let h={};return a.forEach(p=>{let m=typeof p=="string"?p:p.name,g=typeof p=="string"?void 0:p.skipIfDefault;if(m in f){let y=f[m];if(g!==void 0&&y===g)return;h[m]=y}}),h},d=c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return{parseMarkdown:(f,h)=>{let p={...o,...f.attributes};if(l)return h.createNode(e,p);let m=r?r(f):f.content||"";return m?h.createNode(e,p,[h.createTextNode(m)]):h.createNode(e,p,[])},markdownTokenizer:{name:e,level:"inline",start(f){let h=l?new RegExp(`\\[${d}\\s*[^\\]]*\\]`):new RegExp(`\\[${d}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${d}\\]`),p=f.match(h),m=p==null?void 0:p.index;return m!==void 0?m:-1},tokenize(f,h,p){let m=l?new RegExp(`^\\[${d}\\s*([^\\]]*)\\]`):new RegExp(`^\\[${d}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${d}\\]`),g=f.match(m);if(!g)return;let y="",x="";if(l){let[,A]=g;x=A}else{let[,A,w]=g;x=A,y=w||""}let C=i(x.trim());return{type:e,raw:g[0],content:y.trim(),attributes:C}}},renderMarkdown:f=>{let h="";r?h=r(f):f.content&&f.content.length>0&&(h=f.content.filter(y=>y.type==="text").map(y=>y.text).join(""));let p=u(f.attrs||{}),m=s(p),g=m?` ${m}`:"";return l?`[${c}${g}]`:`[${c}${g}]${h}[/${c}]`}}}function Tr(n,e,t){var r,i,s,o;let l=n.split(` `),a=[],c="",u=0,d=e.baseIndentSize||2;for(;u0)break;if(f.trim()===""){u+=1,c=`${c}${f} `;continue}else return}let p=e.extractItemData(h),{indentLevel:m,mainContent:g}=p;c=`${c}${f} `;let y=[g];for(u+=1;uJ.trim()!=="");if(v===-1)break;if((((i=(r=l[u+1+v].match(/^(\s*)/))==null?void 0:r[1])==null?void 0:i.length)||0)>m){y.push(w),c=`${c}${w} @@ -99,18 +99,18 @@ ${g} `);a+=c.type==="paragraph"?` ${p}`:` -${p}`}}),a}function Om(n,e,t={}){let{state:r}=e,{doc:i,tr:s}=r,o=n;i.descendants((l,a)=>{let c=s.mapping.map(a),u=s.mapping.map(a)+l.nodeSize,d=null;if(l.marks.forEach(h=>{if(h!==o)return!1;d=h}),!d)return;let f=!1;if(Object.keys(t).forEach(h=>{t[h]!==d.attrs[h]&&(f=!0)}),f){let h=n.type.create({...n.attrs,...t});s.removeMark(c,u,n.type),s.addMark(c,u,h)}}),s.docChanged&&e.view.dispatch(s)}var $=class Uc extends Vs{constructor(){super(...arguments),this.type="node"}static create(e={}){let t=typeof e=="function"?e():e;return new Uc(t)}configure(e){return super.configure(e)}extend(e){let t=typeof e=="function"?e():e;return super.extend(t)}};function Se(n){return new pm({find:n.find,handler:({state:e,range:t,match:r,pasteEvent:i})=>{let s=H(n.getAttributes,void 0,r,i);if(s===!1||s===null)return null;let{tr:o}=e,l=r[r.length-1],a=r[0],c=t.to;if(l){let u=a.search(/\S/),d=t.from+a.indexOf(l),f=d+l.length;if(Sr(t.from,t.to,e.doc).filter(m=>m.mark.type.excluded.find(y=>y===n.type&&y!==m.mark.type)).filter(m=>m.to>d).length)return null;ft.from&&o.delete(t.from+u,d),c=t.from+u+l.length,o.addMark(t.from+u,c,n.type.create(s||{})),r.index!==void 0&&r.input!==void 0&&r.index+r[0].length>=r.input.length||o.removeStoredMark(n.type)}}})}var Kt=(n,e)=>{if(n==="slot")return 0;if(n instanceof Function)return n(e);let{children:t,...r}=e!=null?e:{};if(n==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[n,r,t]};var Im=/^\s*>\s$/,Jc=$.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:n}){return Kt("blockquote",{...R(this.options.HTMLAttributes,n),children:Kt("slot",{})})},parseMarkdown:(n,e)=>{var t;let r=(t=e.parseBlockChildren)!=null?t:e.parseChildren;return e.createNode("blockquote",void 0,r(n.tokens||[]))},renderMarkdown:(n,e)=>{if(!n.content)return"";let t=">",r=[];return n.content.forEach((i,s)=>{var o,l;let u=((l=(o=e.renderChild)==null?void 0:o.call(e,i,s))!=null?l:e.renderChildren([i])).split(` +${p}`}}),a}function Dm(n,e,t={}){let{state:r}=e,{doc:i,tr:s}=r,o=n;i.descendants((l,a)=>{let c=s.mapping.map(a),u=s.mapping.map(a)+l.nodeSize,d=null;if(l.marks.forEach(h=>{if(h!==o)return!1;d=h}),!d)return;let f=!1;if(Object.keys(t).forEach(h=>{t[h]!==d.attrs[h]&&(f=!0)}),f){let h=n.type.create({...n.attrs,...t});s.removeMark(c,u,n.type),s.addMark(c,u,h)}}),s.docChanged&&e.view.dispatch(s)}var $=class Jc extends js{constructor(){super(...arguments),this.type="node"}static create(e={}){let t=typeof e=="function"?e():e;return new Jc(t)}configure(e){return super.configure(e)}extend(e){let t=typeof e=="function"?e():e;return super.extend(t)}};function Se(n){return new gm({find:n.find,handler:({state:e,range:t,match:r,pasteEvent:i})=>{let s=H(n.getAttributes,void 0,r,i);if(s===!1||s===null)return null;let{tr:o}=e,l=r[r.length-1],a=r[0],c=t.to;if(l){let u=a.search(/\S/),d=t.from+a.indexOf(l),f=d+l.length;if(Sr(t.from,t.to,e.doc).filter(m=>m.mark.type.excluded.find(y=>y===n.type&&y!==m.mark.type)).filter(m=>m.to>d).length)return null;ft.from&&o.delete(t.from+u,d),c=t.from+u+l.length,o.addMark(t.from+u,c,n.type.create(s||{})),r.index!==void 0&&r.input!==void 0&&r.index+r[0].length>=r.input.length||o.removeStoredMark(n.type)}}})}var Kt=(n,e)=>{if(n==="slot")return 0;if(n instanceof Function)return n(e);let{children:t,...r}=e!=null?e:{};if(n==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[n,r,t]};var Rm=/^\s*>\s$/,qc=$.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:n}){return Kt("blockquote",{...D(this.options.HTMLAttributes,n),children:Kt("slot",{})})},parseMarkdown:(n,e)=>{var t;let r=(t=e.parseBlockChildren)!=null?t:e.parseChildren;return e.createNode("blockquote",void 0,r(n.tokens||[]))},renderMarkdown:(n,e)=>{if(!n.content)return"";let t=">",r=[];return n.content.forEach((i,s)=>{var o,l;let u=((l=(o=e.renderChild)==null?void 0:o.call(e,i,s))!=null?l:e.renderChildren([i])).split(` `).map(d=>d.trim()===""?t:`${t} ${d}`);r.push(u.join(` `))}),r.join(` ${t} -`)},addCommands(){return{setBlockquote:()=>({commands:n})=>n.wrapIn(this.name),toggleBlockquote:()=>({commands:n})=>n.toggleWrap(this.name),unsetBlockquote:()=>({commands:n})=>n.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[Oe({find:Im,type:this.type})]}});var Rm=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,Dm=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,Pm=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,Lm=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,qc=me.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:n=>n.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:n=>n.type.name===this.name},{style:"font-weight",getAttrs:n=>/^(bold(er)?|[5-9]\d{2,})$/.test(n)&&null}]},renderHTML({HTMLAttributes:n}){return Kt("strong",{...R(this.options.HTMLAttributes,n),children:Kt("slot",{})})},markdownTokenName:"strong",parseMarkdown:(n,e)=>e.applyMark("bold",e.parseInline(n.tokens||[])),markdownOptions:{htmlReopen:{open:"",close:""}},renderMarkdown:(n,e)=>`**${e.renderChildren(n)}**`,addCommands(){return{setBold:()=>({commands:n})=>n.setMark(this.name),toggleBold:()=>({commands:n})=>n.toggleMark(this.name),unsetBold:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Ne({find:Rm,type:this.type}),Ne({find:Pm,type:this.type})]},addPasteRules(){return[Se({find:Dm,type:this.type}),Se({find:Lm,type:this.type})]}});var zm=/(^|[^`])`([^`]+)`(?!`)$/,Bm=/(^|[^`])`([^`]+)`(?!`)/g,Gc=me.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:n}){return["code",R(this.options.HTMLAttributes,n),0]},markdownTokenName:"codespan",parseMarkdown:(n,e)=>e.applyMark("code",[{type:"text",text:n.text||""}]),renderMarkdown:(n,e)=>n.content?`\`${e.renderChildren(n.content)}\``:"",addCommands(){return{setCode:()=>({commands:n})=>n.setMark(this.name),toggleCode:()=>({commands:n})=>n.toggleMark(this.name),unsetCode:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[Ne({find:zm,type:this.type})]},addPasteRules(){return[Se({find:Bm,type:this.type})]}});var Ks=4,Fm=/^```([a-z]+)?[\s\n]$/,Hm=/^~~~([a-z]+)?[\s\n]$/,Yc=$.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:Ks,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:n=>{var e;let{languageClassPrefix:t}=this.options;if(!t)return null;let s=[...((e=n.firstElementChild)==null?void 0:e.classList)||[]].filter(o=>o.startsWith(t)).map(o=>o.replace(t,""))[0];return s||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:n,HTMLAttributes:e}){return["pre",R(this.options.HTMLAttributes,e),["code",{class:n.attrs.language?this.options.languageClassPrefix+n.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(n,e)=>{var t,r;return((t=n.raw)==null?void 0:t.startsWith("```"))===!1&&((r=n.raw)==null?void 0:r.startsWith("~~~"))===!1&&n.codeBlockStyle!=="indented"?[]:e.createNode("codeBlock",{language:n.lang||null},n.text?[e.createTextNode(n.text)]:[])},renderMarkdown:(n,e)=>{var t;let r="",i=((t=n.attrs)==null?void 0:t.language)||"";return n.content?r=[`\`\`\`${i}`,e.renderChildren(n.content),"```"].join(` +`)},addCommands(){return{setBlockquote:()=>({commands:n})=>n.wrapIn(this.name),toggleBlockquote:()=>({commands:n})=>n.toggleWrap(this.name),unsetBlockquote:()=>({commands:n})=>n.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[Oe({find:Rm,type:this.type})]}});var Pm=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,Lm=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,zm=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,Bm=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,Gc=me.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:n=>n.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:n=>n.type.name===this.name},{style:"font-weight",getAttrs:n=>/^(bold(er)?|[5-9]\d{2,})$/.test(n)&&null}]},renderHTML({HTMLAttributes:n}){return Kt("strong",{...D(this.options.HTMLAttributes,n),children:Kt("slot",{})})},markdownTokenName:"strong",parseMarkdown:(n,e)=>e.applyMark("bold",e.parseInline(n.tokens||[])),markdownOptions:{htmlReopen:{open:"",close:""}},renderMarkdown:(n,e)=>`**${e.renderChildren(n)}**`,addCommands(){return{setBold:()=>({commands:n})=>n.setMark(this.name),toggleBold:()=>({commands:n})=>n.toggleMark(this.name),unsetBold:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Ne({find:Pm,type:this.type}),Ne({find:zm,type:this.type})]},addPasteRules(){return[Se({find:Lm,type:this.type}),Se({find:Bm,type:this.type})]}});var Fm=/(^|[^`])`([^`]+)`(?!`)$/,Hm=/(^|[^`])`([^`]+)`(?!`)/g,Yc=me.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:n}){return["code",D(this.options.HTMLAttributes,n),0]},markdownTokenName:"codespan",parseMarkdown:(n,e)=>e.applyMark("code",[{type:"text",text:n.text||""}]),renderMarkdown:(n,e)=>n.content?`\`${e.renderChildren(n.content)}\``:"",addCommands(){return{setCode:()=>({commands:n})=>n.setMark(this.name),toggleCode:()=>({commands:n})=>n.toggleMark(this.name),unsetCode:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[Ne({find:Fm,type:this.type})]},addPasteRules(){return[Se({find:Hm,type:this.type})]}});var Us=4,$m=/^```([a-z]+)?[\s\n]$/,_m=/^~~~([a-z]+)?[\s\n]$/,Xc=$.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:Us,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:n=>{var e;let{languageClassPrefix:t}=this.options;if(!t)return null;let s=[...((e=n.firstElementChild)==null?void 0:e.classList)||[]].filter(o=>o.startsWith(t)).map(o=>o.replace(t,""))[0];return s||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:n,HTMLAttributes:e}){return["pre",D(this.options.HTMLAttributes,e),["code",{class:n.attrs.language?this.options.languageClassPrefix+n.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(n,e)=>{var t,r;return((t=n.raw)==null?void 0:t.startsWith("```"))===!1&&((r=n.raw)==null?void 0:r.startsWith("~~~"))===!1&&n.codeBlockStyle!=="indented"?[]:e.createNode("codeBlock",{language:n.lang||null},n.text?[e.createTextNode(n.text)]:[])},renderMarkdown:(n,e)=>{var t;let r="",i=((t=n.attrs)==null?void 0:t.language)||"";return n.content?r=[`\`\`\`${i}`,e.renderChildren(n.content),"```"].join(` `):r=`\`\`\`${i} -\`\`\``,r},addCommands(){return{setCodeBlock:n=>({commands:e})=>e.setNode(this.name,n),toggleCodeBlock:n=>({commands:e})=>e.toggleNode(this.name,"paragraph",n)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{let{empty:n,$anchor:e}=this.editor.state.selection,t=e.pos===1;return!n||e.parent.type.name!==this.name?!1:t||!e.parent.textContent.length?this.editor.commands.clearNodes():!1},Tab:({editor:n})=>{var e;if(!this.options.enableTabIndentation)return!1;let t=(e=this.options.tabSize)!=null?e:Ks,{state:r}=n,{selection:i}=r,{$from:s,empty:o}=i;if(s.parent.type!==this.type)return!1;let l=" ".repeat(t);return o?n.commands.insertContent(l):n.commands.command(({tr:a})=>{let{from:c,to:u}=i,h=r.doc.textBetween(c,u,` +\`\`\``,r},addCommands(){return{setCodeBlock:n=>({commands:e})=>e.setNode(this.name,n),toggleCodeBlock:n=>({commands:e})=>e.toggleNode(this.name,"paragraph",n)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{let{empty:n,$anchor:e}=this.editor.state.selection,t=e.pos===1;return!n||e.parent.type.name!==this.name?!1:t||!e.parent.textContent.length?this.editor.commands.clearNodes():!1},Tab:({editor:n})=>{var e;if(!this.options.enableTabIndentation)return!1;let t=(e=this.options.tabSize)!=null?e:Us,{state:r}=n,{selection:i}=r,{$from:s,empty:o}=i;if(s.parent.type!==this.type)return!1;let l=" ".repeat(t);return o?n.commands.insertContent(l):n.commands.command(({tr:a})=>{let{from:c,to:u}=i,h=r.doc.textBetween(c,u,` `,` `).split(` `).map(p=>l+p).join(` -`);return a.replaceWith(c,u,r.schema.text(h)),!0})},"Shift-Tab":({editor:n})=>{var e;if(!this.options.enableTabIndentation)return!1;let t=(e=this.options.tabSize)!=null?e:Ks,{state:r}=n,{selection:i}=r,{$from:s,empty:o}=i;return s.parent.type!==this.type?!1:o?n.commands.command(({tr:l})=>{var a;let{pos:c}=s,u=s.start(),d=s.end(),h=r.doc.textBetween(u,d,` +`);return a.replaceWith(c,u,r.schema.text(h)),!0})},"Shift-Tab":({editor:n})=>{var e;if(!this.options.enableTabIndentation)return!1;let t=(e=this.options.tabSize)!=null?e:Us,{state:r}=n,{selection:i}=r,{$from:s,empty:o}=i;return s.parent.type!==this.type?!1:o?n.commands.command(({tr:l})=>{var a;let{pos:c}=s,u=s.start(),d=s.end(),h=r.doc.textBetween(u,d,` `,` `).split(` `),p=0,m=0,g=c-u;for(let I=0;I=g){p=I;break}m+=h[I].length+1}let x=((a=h[p].match(/^ */))==null?void 0:a[0])||"",C=Math.min(x.length,t);if(C===0)return!0;let A=u;for(let I=0;I{let{from:a,to:c}=i,f=r.doc.textBetween(a,c,` @@ -119,24 +119,24 @@ ${t} `).map(h=>{var p;let m=((p=h.match(/^ */))==null?void 0:p[0])||"",g=Math.min(m.length,t);return h.slice(g)}).join(` `);return l.replaceWith(a,c,r.schema.text(f)),!0})},Enter:({editor:n})=>{if(!this.options.exitOnTripleEnter)return!1;let{state:e}=n,{selection:t}=e,{$from:r,empty:i}=t;if(!i||r.parent.type!==this.type)return!1;let s=r.parentOffset===r.parent.nodeSize-2,o=r.parent.textContent.endsWith(` -`);return!s||!o?!1:n.chain().command(({tr:l})=>(l.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:n})=>{if(!this.options.exitOnArrowDown)return!1;let{state:e}=n,{selection:t,doc:r}=e,{$from:i,empty:s}=t;if(!s||i.parent.type!==this.type||!(i.parentOffset===i.parent.nodeSize-2))return!1;let l=i.after();return l===void 0?!1:r.nodeAt(l)?n.commands.command(({tr:c})=>(c.setSelection(N.near(r.resolve(l))),!0)):n.commands.exitCode()}}},addInputRules(){return[Sn({find:Fm,type:this.type,getAttributes:n=>({language:n[1]})}),Sn({find:Hm,type:this.type,getAttributes:n=>({language:n[1]})})]},addProseMirrorPlugins(){return[new O({key:new P("codeBlockVSCodeHandler"),props:{handlePaste:(n,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;let t=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),i=r?JSON.parse(r):void 0,s=i==null?void 0:i.mode;if(!t||!s)return!1;let{tr:o,schema:l}=n.state,a=l.text(t.replace(/\r\n?/g,` -`));return o.replaceSelectionWith(this.type.create({language:s},a)),o.selection.$from.parent.type!==this.type&&o.setSelection(E.near(o.doc.resolve(Math.max(0,o.selection.from-2)))),o.setMeta("paste",!0),n.dispatch(o),!0}}})]}});var Xc=$.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(n,e)=>n.content?e.renderChildren(n.content,` +`);return!s||!o?!1:n.chain().command(({tr:l})=>(l.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:n})=>{if(!this.options.exitOnArrowDown)return!1;let{state:e}=n,{selection:t,doc:r}=e,{$from:i,empty:s}=t;if(!s||i.parent.type!==this.type||!(i.parentOffset===i.parent.nodeSize-2))return!1;let l=i.after();return l===void 0?!1:r.nodeAt(l)?n.commands.command(({tr:c})=>(c.setSelection(N.near(r.resolve(l))),!0)):n.commands.exitCode()}}},addInputRules(){return[Sn({find:$m,type:this.type,getAttributes:n=>({language:n[1]})}),Sn({find:_m,type:this.type,getAttributes:n=>({language:n[1]})})]},addProseMirrorPlugins(){return[new O({key:new P("codeBlockVSCodeHandler"),props:{handlePaste:(n,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;let t=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),i=r?JSON.parse(r):void 0,s=i==null?void 0:i.mode;if(!t||!s)return!1;let{tr:o,schema:l}=n.state,a=l.text(t.replace(/\r\n?/g,` +`));return o.replaceSelectionWith(this.type.create({language:s},a)),o.selection.$from.parent.type!==this.type&&o.setSelection(E.near(o.doc.resolve(Math.max(0,o.selection.from-2)))),o.setMeta("paste",!0),n.dispatch(o),!0}}})]}});var Qc=$.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(n,e)=>n.content?e.renderChildren(n.content,` -`):""});var Qc=$.create({name:"hardBreak",markdownTokenName:"br",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:n}){return["br",R(this.options.HTMLAttributes,n)]},renderText(){return` +`):""});var Zc=$.create({name:"hardBreak",markdownTokenName:"br",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:n}){return["br",D(this.options.HTMLAttributes,n)]},renderText(){return` `},renderMarkdown:()=>` -`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:n,chain:e,state:t,editor:r})=>n.first([()=>n.exitCode(),()=>n.command(()=>{let{selection:i,storedMarks:s}=t;if(i.$from.parent.type.spec.isolating)return!1;let{keepMarks:o}=this.options,{splittableMarks:l}=r.extensionManager,a=s||i.$to.parentOffset&&i.$from.marks();return e().insertContent({type:this.name}).command(({tr:c,dispatch:u})=>{if(u&&a&&o){let d=a.filter(f=>l.includes(f.type.name));c.ensureMarks(d)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}});var Zc=$.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(n=>({tag:`h${n}`,attrs:{level:n}}))},renderHTML({node:n,HTMLAttributes:e}){return[`h${this.options.levels.includes(n.attrs.level)?n.attrs.level:this.options.levels[0]}`,R(this.options.HTMLAttributes,e),0]},parseMarkdown:(n,e)=>e.createNode("heading",{level:n.depth||1},e.parseInline(n.tokens||[])),renderMarkdown:(n,e)=>{var t;let r=(t=n.attrs)!=null&&t.level?parseInt(n.attrs.level,10):1,i="#".repeat(r);return n.content?`${i} ${e.renderChildren(n.content)}`:""},addCommands(){return{setHeading:n=>({commands:e})=>this.options.levels.includes(n.level)?e.setNode(this.name,n):!1,toggleHeading:n=>({commands:e})=>this.options.levels.includes(n.level)?e.toggleNode(this.name,"paragraph",n):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((n,e)=>({...n,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(n=>Sn({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${n}})\\s$`),type:this.type,getAttributes:{level:n}}))}});var eu=$.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{},nextNodeType:"paragraph"}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:n}){return["hr",R(this.options.HTMLAttributes,n)]},markdownTokenName:"hr",parseMarkdown:(n,e)=>e.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:n,state:e})=>{if(!Kc(e,e.schema.nodes[this.name]))return!1;let{selection:t}=e,{$to:r}=t,i=n();return Mr(t)?i.insertContentAt(r.pos,{type:this.name}):i.insertContent({type:this.name}),i.command(({state:s,tr:o,dispatch:l})=>{if(l){let{$to:a}=o.selection,c=a.end();if(a.nodeAfter)a.nodeAfter.isTextblock?o.setSelection(E.create(o.doc,a.pos+1)):a.nodeAfter.isBlock?o.setSelection(M.create(o.doc,a.pos)):o.setSelection(E.create(o.doc,a.pos));else{let u=s.schema.nodes[this.options.nextNodeType]||a.parent.type.contentMatch.defaultType,d=u==null?void 0:u.create();d&&(o.insert(c,d),o.setSelection(E.create(o.doc,c+1)))}o.scrollIntoView()}return!0}).run()}}},addInputRules(){return[vr({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}});var $m=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,_m=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,Vm=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,jm=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,tu=me.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:n=>n.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:n=>n.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:n}){return["em",R(this.options.HTMLAttributes,n),0]},addCommands(){return{setItalic:()=>({commands:n})=>n.setMark(this.name),toggleItalic:()=>({commands:n})=>n.toggleMark(this.name),unsetItalic:()=>({commands:n})=>n.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(n,e)=>e.applyMark("italic",e.parseInline(n.tokens||[])),markdownOptions:{htmlReopen:{open:"",close:""}},renderMarkdown:(n,e)=>`*${e.renderChildren(n)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Ne({find:$m,type:this.type}),Ne({find:Vm,type:this.type})]},addPasteRules(){return[Se({find:_m,type:this.type}),Se({find:jm,type:this.type})]}});var Wm="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xF6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",Km="\u03B5\u03BB1\u03C52\u0431\u04331\u0435\u043B3\u0434\u0435\u0442\u04384\u0435\u044E2\u043A\u0430\u0442\u043E\u043B\u0438\u043A6\u043E\u043C3\u043C\u043A\u04342\u043E\u043D1\u0441\u043A\u0432\u04306\u043E\u043D\u043B\u0430\u0439\u043D5\u0440\u04333\u0440\u0443\u04412\u04442\u0441\u0430\u0439\u04423\u0440\u04313\u0443\u043A\u04403\u049B\u0430\u04373\u0570\u0561\u05753\u05D9\u05E9\u05E8\u05D0\u05DC5\u05E7\u05D5\u05DD3\u0627\u0628\u0648\u0638\u0628\u064A5\u0631\u0627\u0645\u0643\u06485\u0644\u0627\u0631\u062F\u06464\u0628\u062D\u0631\u064A\u06465\u062C\u0632\u0627\u0626\u06315\u0633\u0639\u0648\u062F\u064A\u06296\u0639\u0644\u064A\u0627\u06465\u0645\u063A\u0631\u06285\u0645\u0627\u0631\u0627\u062A5\u06CC\u0631\u0627\u06465\u0628\u0627\u0631\u062A2\u0632\u0627\u06314\u064A\u062A\u06433\u06BE\u0627\u0631\u062A5\u062A\u0648\u0646\u06334\u0633\u0648\u062F\u0627\u06463\u0631\u064A\u06295\u0634\u0628\u0643\u06294\u0639\u0631\u0627\u06422\u06282\u0645\u0627\u06464\u0641\u0644\u0633\u0637\u064A\u06466\u0642\u0637\u06313\u0643\u0627\u062B\u0648\u0644\u064A\u06436\u0648\u06453\u0645\u0635\u06312\u0644\u064A\u0633\u064A\u06275\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u06277\u0642\u06394\u0647\u0645\u0631\u0627\u06475\u067E\u0627\u06A9\u0633\u062A\u0627\u06467\u0680\u0627\u0631\u062A4\u0915\u0949\u092E3\u0928\u0947\u091F3\u092D\u093E\u0930\u09240\u092E\u094D3\u094B\u09245\u0938\u0902\u0917\u0920\u09285\u09AC\u09BE\u0982\u09B2\u09BE5\u09AD\u09BE\u09B0\u09A42\u09F0\u09A44\u0A2D\u0A3E\u0A30\u0A244\u0AAD\u0ABE\u0AB0\u0AA44\u0B2D\u0B3E\u0B30\u0B244\u0B87\u0BA8\u0BCD\u0BA4\u0BBF\u0BAF\u0BBE6\u0BB2\u0B99\u0BCD\u0B95\u0BC86\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD11\u0C2D\u0C3E\u0C30\u0C24\u0C4D5\u0CAD\u0CBE\u0CB0\u0CA44\u0D2D\u0D3E\u0D30\u0D24\u0D025\u0DBD\u0D82\u0D9A\u0DCF4\u0E04\u0E2D\u0E213\u0E44\u0E17\u0E223\u0EA5\u0EB2\u0EA73\u10D2\u10D42\u307F\u3093\u306A3\u30A2\u30DE\u30BE\u30F34\u30AF\u30E9\u30A6\u30C94\u30B0\u30FC\u30B0\u30EB4\u30B3\u30E02\u30B9\u30C8\u30A23\u30BB\u30FC\u30EB3\u30D5\u30A1\u30C3\u30B7\u30E7\u30F36\u30DD\u30A4\u30F3\u30C84\u4E16\u754C2\u4E2D\u4FE11\u56FD1\u570B1\u6587\u7F513\u4E9A\u9A6C\u900A3\u4F01\u4E1A2\u4F5B\u5C712\u4FE1\u606F2\u5065\u5EB72\u516B\u53662\u516C\u53F81\u76CA2\u53F0\u6E7E1\u70632\u5546\u57CE1\u5E971\u68072\u5609\u91CC0\u5927\u9152\u5E975\u5728\u7EBF2\u5927\u62FF2\u5929\u4E3B\u65593\u5A31\u4E502\u5BB6\u96FB2\u5E7F\u4E1C2\u5FAE\u535A2\u6148\u55842\u6211\u7231\u4F603\u624B\u673A2\u62DB\u80582\u653F\u52A11\u5E9C2\u65B0\u52A0\u57612\u95FB2\u65F6\u5C1A2\u66F8\u7C4D2\u673A\u67842\u6DE1\u9A6C\u95213\u6E38\u620F2\u6FB3\u95802\u70B9\u770B2\u79FB\u52A82\u7EC4\u7EC7\u673A\u67844\u7F51\u57401\u5E971\u7AD91\u7EDC2\u8054\u901A2\u8C37\u6B4C2\u8D2D\u72692\u901A\u8CA92\u96C6\u56E22\u96FB\u8A0A\u76C8\u79D14\u98DE\u5229\u6D663\u98DF\u54C12\u9910\u53852\u9999\u683C\u91CC\u62C93\u6E2F2\uB2F7\uB1371\uCEF42\uC0BC\uC1312\uD55C\uAD6D2",Qs="numeric",Zs="ascii",eo="alpha",vn="asciinumeric",Cn="alphanumeric",to="domain",au="emoji",Um="scheme",Jm="slashscheme",Us="whitespace";function qm(n,e){return n in e||(e[n]=[]),e[n]}function Mt(n,e,t){e[Qs]&&(e[vn]=!0,e[Cn]=!0),e[Zs]&&(e[vn]=!0,e[eo]=!0),e[vn]&&(e[Cn]=!0),e[eo]&&(e[Cn]=!0),e[Cn]&&(e[to]=!0),e[au]&&(e[to]=!0);for(let r in e){let i=qm(r,t);i.indexOf(n)<0&&i.push(n)}}function Gm(n,e){let t={};for(let r in e)e[r].indexOf(n)>=0&&(t[r]=!0);return t}function he(n=null){this.j={},this.jr=[],this.jd=null,this.t=n}he.groups={};he.prototype={accepts(){return!!this.t},go(n){let e=this,t=e.j[n];if(t)return t;for(let r=0;rn.ta(e,t,r,i),j=(n,e,t,r,i)=>n.tr(e,t,r,i),nu=(n,e,t,r,i)=>n.ts(e,t,r,i),b=(n,e,t,r,i)=>n.tt(e,t,r,i),Je="WORD",no="UWORD",cu="ASCIINUMERICAL",uu="ALPHANUMERICAL",In="LOCALHOST",ro="TLD",io="UTLD",Or="SCHEME",Ut="SLASH_SCHEME",oo="NUM",so="WS",lo="NL",Tn="OPENBRACE",En="CLOSEBRACE",Ir="OPENBRACKET",Rr="CLOSEBRACKET",Dr="OPENPAREN",Pr="CLOSEPAREN",Lr="OPENANGLEBRACKET",zr="CLOSEANGLEBRACKET",Br="FULLWIDTHLEFTPAREN",Fr="FULLWIDTHRIGHTPAREN",Hr="LEFTCORNERBRACKET",$r="RIGHTCORNERBRACKET",_r="LEFTWHITECORNERBRACKET",Vr="RIGHTWHITECORNERBRACKET",jr="FULLWIDTHLESSTHAN",Wr="FULLWIDTHGREATERTHAN",Kr="AMPERSAND",Ur="APOSTROPHE",Jr="ASTERISK",rt="AT",qr="BACKSLASH",Gr="BACKTICK",Yr="CARET",it="COLON",ao="COMMA",Xr="DOLLAR",Ie="DOT",Qr="EQUALS",co="EXCLAMATION",we="HYPHEN",An="PERCENT",Zr="PIPE",ei="PLUS",ti="POUND",Nn="QUERY",uo="QUOTE",du="FULLWIDTHMIDDLEDOT",fo="SEMI",Re="SLASH",On="TILDE",ni="UNDERSCORE",fu="EMOJI",ri="SYM",hu=Object.freeze({__proto__:null,ALPHANUMERICAL:uu,AMPERSAND:Kr,APOSTROPHE:Ur,ASCIINUMERICAL:cu,ASTERISK:Jr,AT:rt,BACKSLASH:qr,BACKTICK:Gr,CARET:Yr,CLOSEANGLEBRACKET:zr,CLOSEBRACE:En,CLOSEBRACKET:Rr,CLOSEPAREN:Pr,COLON:it,COMMA:ao,DOLLAR:Xr,DOT:Ie,EMOJI:fu,EQUALS:Qr,EXCLAMATION:co,FULLWIDTHGREATERTHAN:Wr,FULLWIDTHLEFTPAREN:Br,FULLWIDTHLESSTHAN:jr,FULLWIDTHMIDDLEDOT:du,FULLWIDTHRIGHTPAREN:Fr,HYPHEN:we,LEFTCORNERBRACKET:Hr,LEFTWHITECORNERBRACKET:_r,LOCALHOST:In,NL:lo,NUM:oo,OPENANGLEBRACKET:Lr,OPENBRACE:Tn,OPENBRACKET:Ir,OPENPAREN:Dr,PERCENT:An,PIPE:Zr,PLUS:ei,POUND:ti,QUERY:Nn,QUOTE:uo,RIGHTCORNERBRACKET:$r,RIGHTWHITECORNERBRACKET:Vr,SCHEME:Or,SEMI:fo,SLASH:Re,SLASH_SCHEME:Ut,SYM:ri,TILDE:On,TLD:ro,UNDERSCORE:ni,UTLD:io,UWORD:no,WORD:Je,WS:so}),Ke=/[a-z]/,wn=/\p{L}/u,Js=/\p{Emoji}/u;var Ue=/\d/,qs=/\s/;var ru="\r",Gs=` -`,Ym="\uFE0F",Xm="\u200D",Ys="\uFFFC",Er=null,Ar=null;function Qm(n=[]){let e={};he.groups=e;let t=new he;Er==null&&(Er=iu(Wm)),Ar==null&&(Ar=iu(Km)),b(t,"'",Ur),b(t,"{",Tn),b(t,"}",En),b(t,"[",Ir),b(t,"]",Rr),b(t,"(",Dr),b(t,")",Pr),b(t,"<",Lr),b(t,">",zr),b(t,"\uFF08",Br),b(t,"\uFF09",Fr),b(t,"\u300C",Hr),b(t,"\u300D",$r),b(t,"\u300E",_r),b(t,"\u300F",Vr),b(t,"\uFF1C",jr),b(t,"\uFF1E",Wr),b(t,"&",Kr),b(t,"*",Jr),b(t,"@",rt),b(t,"`",Gr),b(t,"^",Yr),b(t,":",it),b(t,",",ao),b(t,"$",Xr),b(t,".",Ie),b(t,"=",Qr),b(t,"!",co),b(t,"-",we),b(t,"%",An),b(t,"|",Zr),b(t,"+",ei),b(t,"#",ti),b(t,"?",Nn),b(t,'"',uo),b(t,"/",Re),b(t,";",fo),b(t,"~",On),b(t,"_",ni),b(t,"\\",qr),b(t,"\u30FB",du);let r=j(t,Ue,oo,{[Qs]:!0});j(r,Ue,r);let i=j(r,Ke,cu,{[vn]:!0}),s=j(r,wn,uu,{[Cn]:!0}),o=j(t,Ke,Je,{[Zs]:!0});j(o,Ue,i),j(o,Ke,o),j(i,Ue,i),j(i,Ke,i);let l=j(t,wn,no,{[eo]:!0});j(l,Ke),j(l,Ue,s),j(l,wn,l),j(s,Ue,s),j(s,Ke),j(s,wn,s);let a=b(t,Gs,lo,{[Us]:!0}),c=b(t,ru,so,{[Us]:!0}),u=j(t,qs,so,{[Us]:!0});b(t,Ys,u),b(c,Gs,a),b(c,Ys,u),j(c,qs,u),b(u,ru),b(u,Gs),j(u,qs,u),b(u,Ys,u);let d=j(t,Js,fu,{[au]:!0});b(d,"#"),j(d,Js,d),b(d,Ym,d);let f=b(d,Xm);b(f,"#"),j(f,Js,d);let h=[[Ke,o],[Ue,i]],p=[[Ke,null],[wn,l],[Ue,s]];for(let m=0;mm[0]>g[0]?1:-1);for(let m=0;m=0?x[to]=!0:Ke.test(g)?Ue.test(g)?x[vn]=!0:x[Zs]=!0:x[Qs]=!0,nu(t,g,g,x)}return nu(t,"localhost",In,{ascii:!0}),t.jd=new he(ri),{start:t,tokens:Object.assign({groups:e},hu)}}function pu(n,e){let t=Zm(e.replace(/[A-Z]/g,l=>l.toLowerCase())),r=t.length,i=[],s=0,o=0;for(;o=0&&(d+=t[o].length,f++),c+=t[o].length,s+=t[o].length,o++;s-=d,o-=f,c-=d,i.push({t:u.t,v:e.slice(s-c,s),s:s-c,e:s})}return i}function Zm(n){let e=[],t=n.length,r=0;for(;r56319||r+1===t||(s=n.charCodeAt(r+1))<56320||s>57343?n[r]:n.slice(r,r+2);e.push(o),r+=o.length}return e}function nt(n,e,t,r,i){let s,o=e.length;for(let l=0;l=0;)s++;if(s>0){e.push(t.join(""));for(let o=parseInt(n.substring(r,r+s),10);o>0;o--)t.pop();r+=s}else t.push(n[r]),r++}return e}var Rn={defaultProtocol:"http",events:null,format:su,formatHref:su,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function ho(n,e=null){let t=Object.assign({},Rn);n&&(t=Object.assign(t,n instanceof ho?n.o:n));let r=t.ignoreTags,i=[];for(let s=0;st?r.substring(0,t)+"\u2026":r},toFormattedHref(n){return n.get("formatHref",this.toHref(n.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(n=Rn.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(n),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(n){return{type:this.t,value:this.toFormattedString(n),isLink:this.isLink,href:this.toFormattedHref(n),start:this.startIndex(),end:this.endIndex()}},validate(n){return n.get("validate",this.toString(),this)},render(n){let e=this,t=this.toHref(n.get("defaultProtocol")),r=n.get("formatHref",t,this),i=n.get("tagName",t,e),s=this.toFormattedString(n),o={},l=n.get("className",t,e),a=n.get("target",t,e),c=n.get("rel",t,e),u=n.getObj("attributes",t,e),d=n.getObj("events",t,e);return o.href=r,l&&(o.class=l),a&&(o.target=a),c&&(o.rel=c),u&&Object.assign(o,u),{tagName:i,attributes:o,content:s,eventListeners:d}}};function ii(n,e){class t extends mu{constructor(i,s){super(i,s),this.t=n}}for(let r in e)t.prototype[r]=e[r];return t.t=n,t}var ou=ii("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),lu=ii("text"),eg=ii("nl"),Nr=ii("url",{isLink:!0,toHref(n=Rn.defaultProtocol){return this.hasProtocol()?this.v:`${n}://${this.v}`},hasProtocol(){let n=this.tk;return n.length>=2&&n[0].t!==In&&n[1].t===it}});var Me=n=>new he(n);function tg({groups:n}){let e=n.domain.concat([Kr,Jr,rt,qr,Gr,Yr,Xr,Qr,we,oo,An,Zr,ei,ti,Re,ri,On,ni]),t=[Ur,it,ao,Ie,co,An,Nn,uo,fo,Lr,zr,Tn,En,Rr,Ir,Dr,Pr,Br,Fr,Hr,$r,_r,Vr,jr,Wr],r=[Kr,Ur,Jr,qr,Gr,Yr,Xr,Qr,we,Tn,En,An,Zr,ei,ti,Nn,Re,ri,On,ni],i=Me(),s=b(i,On);D(s,r,s),D(s,n.domain,s);let o=Me(),l=Me(),a=Me();D(i,n.domain,o),D(i,n.scheme,l),D(i,n.slashscheme,a),D(o,r,s),D(o,n.domain,o);let c=b(o,rt);b(s,rt,c),b(l,rt,c),b(a,rt,c);let u=b(s,Ie);D(u,r,s),D(u,n.domain,s);let d=Me();D(c,n.domain,d),D(d,n.domain,d);let f=b(d,Ie);D(f,n.domain,d);let h=Me(ou);D(f,n.tld,h),D(f,n.utld,h),b(c,In,h);let p=b(d,we);b(p,we,p),D(p,n.domain,d),D(h,n.domain,d),b(h,Ie,f),b(h,we,p);let m=b(h,it);D(m,n.numeric,ou);let g=b(o,we),y=b(o,Ie);b(g,we,g),D(g,n.domain,o),D(y,r,s),D(y,n.domain,o);let x=Me(Nr);D(y,n.tld,x),D(y,n.utld,x),D(x,n.domain,o),D(x,r,s),b(x,Ie,y),b(x,we,g),b(x,rt,c);let C=b(x,it),A=Me(Nr);D(C,n.numeric,A);let w=Me(Nr),I=Me();D(w,e,w),D(w,t,I),D(I,e,w),D(I,t,I),b(x,Re,w),b(A,Re,w);let v=b(l,it),L=b(a,it),z=b(L,Re),J=b(z,Re);D(l,n.domain,o),b(l,Ie,y),b(l,we,g),D(a,n.domain,o),b(a,Ie,y),b(a,we,g),D(v,n.domain,w),b(v,Re,w),b(v,Nn,w),D(J,n.domain,w),D(J,e,w),b(J,Re,w);let qe=[[Tn,En],[Ir,Rr],[Dr,Pr],[Lr,zr],[Br,Fr],[Hr,$r],[_r,Vr],[jr,Wr]];for(let Ce=0;Ce=0&&f++,i++,u++;if(f<0)i-=u,i0&&(s.push(Xs(lu,e,o)),o=[]),i-=f,u-=f;let h=d.t,p=t.slice(i-u,i);s.push(Xs(h,e,p))}}return o.length>0&&s.push(Xs(lu,e,o)),s}function Xs(n,e,t){let r=t[0].s,i=t[t.length-1].e,s=e.slice(r,i);return new n(s,t)}var rg=typeof console!="undefined"&&console&&console.warn||(()=>{}),ig="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",_={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function gu(){return he.groups={},_.scanner=null,_.parser=null,_.tokenQueue=[],_.pluginQueue=[],_.customSchemes=[],_.initialized=!1,_}function po(n,e=!1){if(_.initialized&&rg(`linkifyjs: already initialized - will not register custom scheme "${n}" ${ig}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(n))throw new Error(`linkifyjs: incorrect scheme format. +`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:n,chain:e,state:t,editor:r})=>n.first([()=>n.exitCode(),()=>n.command(()=>{let{selection:i,storedMarks:s}=t;if(i.$from.parent.type.spec.isolating)return!1;let{keepMarks:o}=this.options,{splittableMarks:l}=r.extensionManager,a=s||i.$to.parentOffset&&i.$from.marks();return e().insertContent({type:this.name}).command(({tr:c,dispatch:u})=>{if(u&&a&&o){let d=a.filter(f=>l.includes(f.type.name));c.ensureMarks(d)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}});var eu=$.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(n=>({tag:`h${n}`,attrs:{level:n}}))},renderHTML({node:n,HTMLAttributes:e}){return[`h${this.options.levels.includes(n.attrs.level)?n.attrs.level:this.options.levels[0]}`,D(this.options.HTMLAttributes,e),0]},parseMarkdown:(n,e)=>e.createNode("heading",{level:n.depth||1},e.parseInline(n.tokens||[])),renderMarkdown:(n,e)=>{var t;let r=(t=n.attrs)!=null&&t.level?parseInt(n.attrs.level,10):1,i="#".repeat(r);return n.content?`${i} ${e.renderChildren(n.content)}`:""},addCommands(){return{setHeading:n=>({commands:e})=>this.options.levels.includes(n.level)?e.setNode(this.name,n):!1,toggleHeading:n=>({commands:e})=>this.options.levels.includes(n.level)?e.toggleNode(this.name,"paragraph",n):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((n,e)=>({...n,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(n=>Sn({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${n}})\\s$`),type:this.type,getAttributes:{level:n}}))}});var tu=$.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{},nextNodeType:"paragraph"}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:n}){return["hr",D(this.options.HTMLAttributes,n)]},markdownTokenName:"hr",parseMarkdown:(n,e)=>e.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:n,state:e})=>{if(!Uc(e,e.schema.nodes[this.name]))return!1;let{selection:t}=e,{$to:r}=t,i=n();return Mr(t)?i.insertContentAt(r.pos,{type:this.name}):i.insertContent({type:this.name}),i.command(({state:s,tr:o,dispatch:l})=>{if(l){let{$to:a}=o.selection,c=a.end();if(a.nodeAfter)a.nodeAfter.isTextblock?o.setSelection(E.create(o.doc,a.pos+1)):a.nodeAfter.isBlock?o.setSelection(M.create(o.doc,a.pos)):o.setSelection(E.create(o.doc,a.pos));else{let u=s.schema.nodes[this.options.nextNodeType]||a.parent.type.contentMatch.defaultType,d=u==null?void 0:u.create();d&&(o.insert(c,d),o.setSelection(E.create(o.doc,c+1)))}o.scrollIntoView()}return!0}).run()}}},addInputRules(){return[vr({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}});var Vm=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,jm=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,Wm=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,Km=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,nu=me.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:n=>n.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:n=>n.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:n}){return["em",D(this.options.HTMLAttributes,n),0]},addCommands(){return{setItalic:()=>({commands:n})=>n.setMark(this.name),toggleItalic:()=>({commands:n})=>n.toggleMark(this.name),unsetItalic:()=>({commands:n})=>n.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(n,e)=>e.applyMark("italic",e.parseInline(n.tokens||[])),markdownOptions:{htmlReopen:{open:"",close:""}},renderMarkdown:(n,e)=>`*${e.renderChildren(n)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Ne({find:Vm,type:this.type}),Ne({find:Wm,type:this.type})]},addPasteRules(){return[Se({find:jm,type:this.type}),Se({find:Km,type:this.type})]}});var Um="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xF6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",Jm="\u03B5\u03BB1\u03C52\u0431\u04331\u0435\u043B3\u0434\u0435\u0442\u04384\u0435\u044E2\u043A\u0430\u0442\u043E\u043B\u0438\u043A6\u043E\u043C3\u043C\u043A\u04342\u043E\u043D1\u0441\u043A\u0432\u04306\u043E\u043D\u043B\u0430\u0439\u043D5\u0440\u04333\u0440\u0443\u04412\u04442\u0441\u0430\u0439\u04423\u0440\u04313\u0443\u043A\u04403\u049B\u0430\u04373\u0570\u0561\u05753\u05D9\u05E9\u05E8\u05D0\u05DC5\u05E7\u05D5\u05DD3\u0627\u0628\u0648\u0638\u0628\u064A5\u0631\u0627\u0645\u0643\u06485\u0644\u0627\u0631\u062F\u06464\u0628\u062D\u0631\u064A\u06465\u062C\u0632\u0627\u0626\u06315\u0633\u0639\u0648\u062F\u064A\u06296\u0639\u0644\u064A\u0627\u06465\u0645\u063A\u0631\u06285\u0645\u0627\u0631\u0627\u062A5\u06CC\u0631\u0627\u06465\u0628\u0627\u0631\u062A2\u0632\u0627\u06314\u064A\u062A\u06433\u06BE\u0627\u0631\u062A5\u062A\u0648\u0646\u06334\u0633\u0648\u062F\u0627\u06463\u0631\u064A\u06295\u0634\u0628\u0643\u06294\u0639\u0631\u0627\u06422\u06282\u0645\u0627\u06464\u0641\u0644\u0633\u0637\u064A\u06466\u0642\u0637\u06313\u0643\u0627\u062B\u0648\u0644\u064A\u06436\u0648\u06453\u0645\u0635\u06312\u0644\u064A\u0633\u064A\u06275\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u06277\u0642\u06394\u0647\u0645\u0631\u0627\u06475\u067E\u0627\u06A9\u0633\u062A\u0627\u06467\u0680\u0627\u0631\u062A4\u0915\u0949\u092E3\u0928\u0947\u091F3\u092D\u093E\u0930\u09240\u092E\u094D3\u094B\u09245\u0938\u0902\u0917\u0920\u09285\u09AC\u09BE\u0982\u09B2\u09BE5\u09AD\u09BE\u09B0\u09A42\u09F0\u09A44\u0A2D\u0A3E\u0A30\u0A244\u0AAD\u0ABE\u0AB0\u0AA44\u0B2D\u0B3E\u0B30\u0B244\u0B87\u0BA8\u0BCD\u0BA4\u0BBF\u0BAF\u0BBE6\u0BB2\u0B99\u0BCD\u0B95\u0BC86\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD11\u0C2D\u0C3E\u0C30\u0C24\u0C4D5\u0CAD\u0CBE\u0CB0\u0CA44\u0D2D\u0D3E\u0D30\u0D24\u0D025\u0DBD\u0D82\u0D9A\u0DCF4\u0E04\u0E2D\u0E213\u0E44\u0E17\u0E223\u0EA5\u0EB2\u0EA73\u10D2\u10D42\u307F\u3093\u306A3\u30A2\u30DE\u30BE\u30F34\u30AF\u30E9\u30A6\u30C94\u30B0\u30FC\u30B0\u30EB4\u30B3\u30E02\u30B9\u30C8\u30A23\u30BB\u30FC\u30EB3\u30D5\u30A1\u30C3\u30B7\u30E7\u30F36\u30DD\u30A4\u30F3\u30C84\u4E16\u754C2\u4E2D\u4FE11\u56FD1\u570B1\u6587\u7F513\u4E9A\u9A6C\u900A3\u4F01\u4E1A2\u4F5B\u5C712\u4FE1\u606F2\u5065\u5EB72\u516B\u53662\u516C\u53F81\u76CA2\u53F0\u6E7E1\u70632\u5546\u57CE1\u5E971\u68072\u5609\u91CC0\u5927\u9152\u5E975\u5728\u7EBF2\u5927\u62FF2\u5929\u4E3B\u65593\u5A31\u4E502\u5BB6\u96FB2\u5E7F\u4E1C2\u5FAE\u535A2\u6148\u55842\u6211\u7231\u4F603\u624B\u673A2\u62DB\u80582\u653F\u52A11\u5E9C2\u65B0\u52A0\u57612\u95FB2\u65F6\u5C1A2\u66F8\u7C4D2\u673A\u67842\u6DE1\u9A6C\u95213\u6E38\u620F2\u6FB3\u95802\u70B9\u770B2\u79FB\u52A82\u7EC4\u7EC7\u673A\u67844\u7F51\u57401\u5E971\u7AD91\u7EDC2\u8054\u901A2\u8C37\u6B4C2\u8D2D\u72692\u901A\u8CA92\u96C6\u56E22\u96FB\u8A0A\u76C8\u79D14\u98DE\u5229\u6D663\u98DF\u54C12\u9910\u53852\u9999\u683C\u91CC\u62C93\u6E2F2\uB2F7\uB1371\uCEF42\uC0BC\uC1312\uD55C\uAD6D2",Zs="numeric",eo="ascii",to="alpha",vn="asciinumeric",Cn="alphanumeric",no="domain",cu="emoji",qm="scheme",Gm="slashscheme",Js="whitespace";function Ym(n,e){return n in e||(e[n]=[]),e[n]}function Mt(n,e,t){e[Zs]&&(e[vn]=!0,e[Cn]=!0),e[eo]&&(e[vn]=!0,e[to]=!0),e[vn]&&(e[Cn]=!0),e[to]&&(e[Cn]=!0),e[Cn]&&(e[no]=!0),e[cu]&&(e[no]=!0);for(let r in e){let i=Ym(r,t);i.indexOf(n)<0&&i.push(n)}}function Xm(n,e){let t={};for(let r in e)e[r].indexOf(n)>=0&&(t[r]=!0);return t}function he(n=null){this.j={},this.jr=[],this.jd=null,this.t=n}he.groups={};he.prototype={accepts(){return!!this.t},go(n){let e=this,t=e.j[n];if(t)return t;for(let r=0;rn.ta(e,t,r,i),j=(n,e,t,r,i)=>n.tr(e,t,r,i),ru=(n,e,t,r,i)=>n.ts(e,t,r,i),b=(n,e,t,r,i)=>n.tt(e,t,r,i),Je="WORD",ro="UWORD",uu="ASCIINUMERICAL",du="ALPHANUMERICAL",In="LOCALHOST",io="TLD",so="UTLD",Or="SCHEME",Ut="SLASH_SCHEME",lo="NUM",oo="WS",ao="NL",Tn="OPENBRACE",En="CLOSEBRACE",Ir="OPENBRACKET",Dr="CLOSEBRACKET",Rr="OPENPAREN",Pr="CLOSEPAREN",Lr="OPENANGLEBRACKET",zr="CLOSEANGLEBRACKET",Br="FULLWIDTHLEFTPAREN",Fr="FULLWIDTHRIGHTPAREN",Hr="LEFTCORNERBRACKET",$r="RIGHTCORNERBRACKET",_r="LEFTWHITECORNERBRACKET",Vr="RIGHTWHITECORNERBRACKET",jr="FULLWIDTHLESSTHAN",Wr="FULLWIDTHGREATERTHAN",Kr="AMPERSAND",Ur="APOSTROPHE",Jr="ASTERISK",rt="AT",qr="BACKSLASH",Gr="BACKTICK",Yr="CARET",it="COLON",co="COMMA",Xr="DOLLAR",Ie="DOT",Qr="EQUALS",uo="EXCLAMATION",we="HYPHEN",An="PERCENT",Zr="PIPE",ei="PLUS",ti="POUND",Nn="QUERY",fo="QUOTE",fu="FULLWIDTHMIDDLEDOT",ho="SEMI",De="SLASH",On="TILDE",ni="UNDERSCORE",hu="EMOJI",ri="SYM",pu=Object.freeze({__proto__:null,ALPHANUMERICAL:du,AMPERSAND:Kr,APOSTROPHE:Ur,ASCIINUMERICAL:uu,ASTERISK:Jr,AT:rt,BACKSLASH:qr,BACKTICK:Gr,CARET:Yr,CLOSEANGLEBRACKET:zr,CLOSEBRACE:En,CLOSEBRACKET:Dr,CLOSEPAREN:Pr,COLON:it,COMMA:co,DOLLAR:Xr,DOT:Ie,EMOJI:hu,EQUALS:Qr,EXCLAMATION:uo,FULLWIDTHGREATERTHAN:Wr,FULLWIDTHLEFTPAREN:Br,FULLWIDTHLESSTHAN:jr,FULLWIDTHMIDDLEDOT:fu,FULLWIDTHRIGHTPAREN:Fr,HYPHEN:we,LEFTCORNERBRACKET:Hr,LEFTWHITECORNERBRACKET:_r,LOCALHOST:In,NL:ao,NUM:lo,OPENANGLEBRACKET:Lr,OPENBRACE:Tn,OPENBRACKET:Ir,OPENPAREN:Rr,PERCENT:An,PIPE:Zr,PLUS:ei,POUND:ti,QUERY:Nn,QUOTE:fo,RIGHTCORNERBRACKET:$r,RIGHTWHITECORNERBRACKET:Vr,SCHEME:Or,SEMI:ho,SLASH:De,SLASH_SCHEME:Ut,SYM:ri,TILDE:On,TLD:io,UNDERSCORE:ni,UTLD:so,UWORD:ro,WORD:Je,WS:oo}),Ke=/[a-z]/,wn=/\p{L}/u,qs=/\p{Emoji}/u;var Ue=/\d/,Gs=/\s/;var iu="\r",Ys=` +`,Qm="\uFE0F",Zm="\u200D",Xs="\uFFFC",Er=null,Ar=null;function eg(n=[]){let e={};he.groups=e;let t=new he;Er==null&&(Er=su(Um)),Ar==null&&(Ar=su(Jm)),b(t,"'",Ur),b(t,"{",Tn),b(t,"}",En),b(t,"[",Ir),b(t,"]",Dr),b(t,"(",Rr),b(t,")",Pr),b(t,"<",Lr),b(t,">",zr),b(t,"\uFF08",Br),b(t,"\uFF09",Fr),b(t,"\u300C",Hr),b(t,"\u300D",$r),b(t,"\u300E",_r),b(t,"\u300F",Vr),b(t,"\uFF1C",jr),b(t,"\uFF1E",Wr),b(t,"&",Kr),b(t,"*",Jr),b(t,"@",rt),b(t,"`",Gr),b(t,"^",Yr),b(t,":",it),b(t,",",co),b(t,"$",Xr),b(t,".",Ie),b(t,"=",Qr),b(t,"!",uo),b(t,"-",we),b(t,"%",An),b(t,"|",Zr),b(t,"+",ei),b(t,"#",ti),b(t,"?",Nn),b(t,'"',fo),b(t,"/",De),b(t,";",ho),b(t,"~",On),b(t,"_",ni),b(t,"\\",qr),b(t,"\u30FB",fu);let r=j(t,Ue,lo,{[Zs]:!0});j(r,Ue,r);let i=j(r,Ke,uu,{[vn]:!0}),s=j(r,wn,du,{[Cn]:!0}),o=j(t,Ke,Je,{[eo]:!0});j(o,Ue,i),j(o,Ke,o),j(i,Ue,i),j(i,Ke,i);let l=j(t,wn,ro,{[to]:!0});j(l,Ke),j(l,Ue,s),j(l,wn,l),j(s,Ue,s),j(s,Ke),j(s,wn,s);let a=b(t,Ys,ao,{[Js]:!0}),c=b(t,iu,oo,{[Js]:!0}),u=j(t,Gs,oo,{[Js]:!0});b(t,Xs,u),b(c,Ys,a),b(c,Xs,u),j(c,Gs,u),b(u,iu),b(u,Ys),j(u,Gs,u),b(u,Xs,u);let d=j(t,qs,hu,{[cu]:!0});b(d,"#"),j(d,qs,d),b(d,Qm,d);let f=b(d,Zm);b(f,"#"),j(f,qs,d);let h=[[Ke,o],[Ue,i]],p=[[Ke,null],[wn,l],[Ue,s]];for(let m=0;mm[0]>g[0]?1:-1);for(let m=0;m=0?x[no]=!0:Ke.test(g)?Ue.test(g)?x[vn]=!0:x[eo]=!0:x[Zs]=!0,ru(t,g,g,x)}return ru(t,"localhost",In,{ascii:!0}),t.jd=new he(ri),{start:t,tokens:Object.assign({groups:e},pu)}}function mu(n,e){let t=tg(e.replace(/[A-Z]/g,l=>l.toLowerCase())),r=t.length,i=[],s=0,o=0;for(;o=0&&(d+=t[o].length,f++),c+=t[o].length,s+=t[o].length,o++;s-=d,o-=f,c-=d,i.push({t:u.t,v:e.slice(s-c,s),s:s-c,e:s})}return i}function tg(n){let e=[],t=n.length,r=0;for(;r56319||r+1===t||(s=n.charCodeAt(r+1))<56320||s>57343?n[r]:n.slice(r,r+2);e.push(o),r+=o.length}return e}function nt(n,e,t,r,i){let s,o=e.length;for(let l=0;l=0;)s++;if(s>0){e.push(t.join(""));for(let o=parseInt(n.substring(r,r+s),10);o>0;o--)t.pop();r+=s}else t.push(n[r]),r++}return e}var Dn={defaultProtocol:"http",events:null,format:ou,formatHref:ou,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function po(n,e=null){let t=Object.assign({},Dn);n&&(t=Object.assign(t,n instanceof po?n.o:n));let r=t.ignoreTags,i=[];for(let s=0;st?r.substring(0,t)+"\u2026":r},toFormattedHref(n){return n.get("formatHref",this.toHref(n.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(n=Dn.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(n),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(n){return{type:this.t,value:this.toFormattedString(n),isLink:this.isLink,href:this.toFormattedHref(n),start:this.startIndex(),end:this.endIndex()}},validate(n){return n.get("validate",this.toString(),this)},render(n){let e=this,t=this.toHref(n.get("defaultProtocol")),r=n.get("formatHref",t,this),i=n.get("tagName",t,e),s=this.toFormattedString(n),o={},l=n.get("className",t,e),a=n.get("target",t,e),c=n.get("rel",t,e),u=n.getObj("attributes",t,e),d=n.getObj("events",t,e);return o.href=r,l&&(o.class=l),a&&(o.target=a),c&&(o.rel=c),u&&Object.assign(o,u),{tagName:i,attributes:o,content:s,eventListeners:d}}};function ii(n,e){class t extends gu{constructor(i,s){super(i,s),this.t=n}}for(let r in e)t.prototype[r]=e[r];return t.t=n,t}var lu=ii("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),au=ii("text"),ng=ii("nl"),Nr=ii("url",{isLink:!0,toHref(n=Dn.defaultProtocol){return this.hasProtocol()?this.v:`${n}://${this.v}`},hasProtocol(){let n=this.tk;return n.length>=2&&n[0].t!==In&&n[1].t===it}});var Me=n=>new he(n);function rg({groups:n}){let e=n.domain.concat([Kr,Jr,rt,qr,Gr,Yr,Xr,Qr,we,lo,An,Zr,ei,ti,De,ri,On,ni]),t=[Ur,it,co,Ie,uo,An,Nn,fo,ho,Lr,zr,Tn,En,Dr,Ir,Rr,Pr,Br,Fr,Hr,$r,_r,Vr,jr,Wr],r=[Kr,Ur,Jr,qr,Gr,Yr,Xr,Qr,we,Tn,En,An,Zr,ei,ti,Nn,De,ri,On,ni],i=Me(),s=b(i,On);R(s,r,s),R(s,n.domain,s);let o=Me(),l=Me(),a=Me();R(i,n.domain,o),R(i,n.scheme,l),R(i,n.slashscheme,a),R(o,r,s),R(o,n.domain,o);let c=b(o,rt);b(s,rt,c),b(l,rt,c),b(a,rt,c);let u=b(s,Ie);R(u,r,s),R(u,n.domain,s);let d=Me();R(c,n.domain,d),R(d,n.domain,d);let f=b(d,Ie);R(f,n.domain,d);let h=Me(lu);R(f,n.tld,h),R(f,n.utld,h),b(c,In,h);let p=b(d,we);b(p,we,p),R(p,n.domain,d),R(h,n.domain,d),b(h,Ie,f),b(h,we,p);let m=b(h,it);R(m,n.numeric,lu);let g=b(o,we),y=b(o,Ie);b(g,we,g),R(g,n.domain,o),R(y,r,s),R(y,n.domain,o);let x=Me(Nr);R(y,n.tld,x),R(y,n.utld,x),R(x,n.domain,o),R(x,r,s),b(x,Ie,y),b(x,we,g),b(x,rt,c);let C=b(x,it),A=Me(Nr);R(C,n.numeric,A);let w=Me(Nr),I=Me();R(w,e,w),R(w,t,I),R(I,e,w),R(I,t,I),b(x,De,w),b(A,De,w);let v=b(l,it),L=b(a,it),z=b(L,De),J=b(z,De);R(l,n.domain,o),b(l,Ie,y),b(l,we,g),R(a,n.domain,o),b(a,Ie,y),b(a,we,g),R(v,n.domain,w),b(v,De,w),b(v,Nn,w),R(J,n.domain,w),R(J,e,w),b(J,De,w);let qe=[[Tn,En],[Ir,Dr],[Rr,Pr],[Lr,zr],[Br,Fr],[Hr,$r],[_r,Vr],[jr,Wr]];for(let Ce=0;Ce=0&&f++,i++,u++;if(f<0)i-=u,i0&&(s.push(Qs(au,e,o)),o=[]),i-=f,u-=f;let h=d.t,p=t.slice(i-u,i);s.push(Qs(h,e,p))}}return o.length>0&&s.push(Qs(au,e,o)),s}function Qs(n,e,t){let r=t[0].s,i=t[t.length-1].e,s=e.slice(r,i);return new n(s,t)}var sg=typeof console!="undefined"&&console&&console.warn||(()=>{}),og="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",_={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function yu(){return he.groups={},_.scanner=null,_.parser=null,_.tokenQueue=[],_.pluginQueue=[],_.customSchemes=[],_.initialized=!1,_}function mo(n,e=!1){if(_.initialized&&sg(`linkifyjs: already initialized - will not register custom scheme "${n}" ${og}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(n))throw new Error(`linkifyjs: incorrect scheme format. 1. Must only contain digits, lowercase ASCII letters or "-" 2. Cannot start or end with "-" -3. "-" cannot repeat`);_.customSchemes.push([n,e])}function sg(){_.scanner=Qm(_.customSchemes);for(let n=0;n<_.tokenQueue.length;n++)_.tokenQueue[n][1]({scanner:_.scanner});_.parser=tg(_.scanner.tokens);for(let n=0;n<_.pluginQueue.length;n++)_.pluginQueue[n][1]({scanner:_.scanner,parser:_.parser});return _.initialized=!0,_}function si(n){return _.initialized||sg(),ng(_.parser.start,n,pu(_.scanner.start,n))}si.scan=pu;function oi(n,e=null,t=null){if(e&&typeof e=="object"){if(t)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);t=e,e=null}let r=new ho(t),i=si(n),s=[];for(let o=0;o{let i=e.some(c=>c.docChanged)&&!t.doc.eq(r.doc),s=e.some(c=>c.getMeta("preventAutolink"));if(!i||s)return;let{tr:o}=r,l=Bs(t.doc,[...e]);if(_s(l).forEach(({newRange:c})=>{let u=kc(r.doc,c,h=>h.isTextblock),d,f;if(u.length>1)d=u[0],f=r.doc.textBetween(d.pos,d.pos+d.node.nodeSize,void 0," ");else if(u.length){let h=r.doc.textBetween(c.from,c.to," "," ");if(!lg.test(h))return;d=u[0],f=r.doc.textBetween(d.pos,c.to,void 0," ")}if(d&&f){let h=f.split(og).filter(Boolean);if(h.length<=0)return!1;let p=h[h.length-1],m=d.pos+f.lastIndexOf(p);if(!p)return!1;let g=si(p).map(y=>y.toObject(n.defaultProtocol));if(!cg(g))return!1;g.filter(y=>y.isLink).map(y=>({...y,from:m+y.start+1,to:m+y.end+1})).filter(y=>r.schema.marks.code?!r.doc.rangeHasMark(y.from,y.to,r.schema.marks.code):!0).filter(y=>n.validate(y.value)).filter(y=>n.shouldAutoLink(y.value)).forEach(y=>{Sr(y.from,y.to,r.doc).some(x=>x.mark.type===n.type)||o.addMark(y.from,y.to,n.type.create({href:y.href}))})}}),!!o.steps.length)return o}})}function dg(n){return new O({key:new P("handleClickLink"),props:{handleClick:(e,t,r)=>{var i,s;if(r.button!==0||!e.editable)return!1;let o=null;if(r.target instanceof HTMLAnchorElement)o=r.target;else{let a=r.target;if(!a)return!1;let c=n.editor.view.dom;o=a.closest("a"),o&&!c.contains(o)&&(o=null)}if(!o)return!1;let l=!1;if(n.enableClickSelection&&(l=n.editor.commands.extendMarkRange(n.type.name)),n.openOnClick){let a=$s(e.state,n.type.name),c=(i=o.href)!=null?i:a.href,u=(s=o.target)!=null?s:a.target;c&&(window.open(c,u),l=!0)}return l}}})}function fg(n){return new O({key:new P("handlePasteLink"),props:{handlePaste:(e,t,r)=>{let{shouldAutoLink:i}=n,{state:s}=e,{selection:o}=s,{empty:l}=o;if(l)return!1;let a="";r.content.forEach(u=>{a+=u.textContent});let c=oi(a,{defaultProtocol:n.defaultProtocol}).find(u=>u.isLink&&u.value===a);return!a||!c||i!==void 0&&!i(c.value)?!1:n.editor.commands.setMark(n.type,{href:c.href})}}})}function wt(n,e){let t=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(r=>{let i=typeof r=="string"?r:r.scheme;i&&t.push(i)}),!n||n.replace(ag,"").match(new RegExp(`^(?:(?:${t.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var yu=me.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(n=>{if(typeof n=="string"){po(n);return}po(n.scheme,n.optionalSlashes)})},onDestroy(){gu()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(n,e)=>!!wt(n,e.protocols),validate:n=>!!n,shouldAutoLink:n=>{let e=/^[a-z][a-z0-9+.-]*:\/\//i.test(n),t=/^[a-z][a-z0-9+.-]*:/i.test(n);if(e||t&&!n.includes("@"))return!0;let i=(n.includes("@")?n.split("@").pop():n).split(/[/?#:]/)[0];return!(/^\d{1,3}(\.\d{1,3}){3}$/.test(i)||!/\./.test(i))}}},addAttributes(){return{href:{default:null,parseHTML(n){return n.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:n=>{let e=n.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:t=>!!wt(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:n}){return this.options.isAllowedUri(n.href,{defaultValidate:e=>!!wt(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",R(this.options.HTMLAttributes,n),0]:["a",R(this.options.HTMLAttributes,{...n,href:""}),0]},markdownTokenName:"link",parseMarkdown:(n,e)=>e.applyMark("link",e.parseInline(n.tokens||[]),{href:n.href,title:n.title||null}),renderMarkdown:(n,e)=>{var t,r,i,s;let o=(r=(t=n.attrs)==null?void 0:t.href)!=null?r:"",l=(s=(i=n.attrs)==null?void 0:i.title)!=null?s:"",a=e.renderChildren(n);return l?`[${a}](${o} "${l}")`:`[${a}](${o})`},addCommands(){return{setLink:n=>({chain:e})=>{let{href:t}=n;return this.options.isAllowedUri(t,{defaultValidate:r=>!!wt(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,n).setMeta("preventAutolink",!0).run():!1},toggleLink:n=>({chain:e})=>{let{href:t}=n||{};return t&&!this.options.isAllowedUri(t,{defaultValidate:r=>!!wt(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:e().toggleMark(this.name,n,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:n})=>n().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[Se({find:n=>{let e=[];if(n){let{protocols:t,defaultProtocol:r}=this.options,i=oi(n).filter(s=>s.isLink&&this.options.isAllowedUri(s.value,{defaultValidate:o=>!!wt(o,t),protocols:t,defaultProtocol:r}));i.length&&i.forEach(s=>{this.options.shouldAutoLink(s.value)&&e.push({text:s.value,data:{href:s.href},index:s.start})})}return e},type:this.type,getAttributes:n=>{var e;return{href:(e=n.data)==null?void 0:e.href}}})]},addProseMirrorPlugins(){let n=[],{protocols:e,defaultProtocol:t}=this.options;return this.options.autolink&&n.push(ug({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:i=>!!wt(i,e),protocols:e,defaultProtocol:t}),shouldAutoLink:this.options.shouldAutoLink})),n.push(dg({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&n.push(fg({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),n}});var hg=Object.defineProperty,pg=(n,e)=>{for(var t in e)hg(n,t,{get:e[t],enumerable:!0})},mg="listItem",ku="textStyle",bu=/^\s*([-+*])\s$/,ko=$.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:n}){return["ul",R(this.options.HTMLAttributes,n),0]},markdownTokenName:"list",parseMarkdown:(n,e)=>n.type!=="list"||n.ordered?[]:{type:"bulletList",content:n.items?e.parseChildren(n.items):[]},renderMarkdown:(n,e)=>n.content?e.renderChildren(n.content,` -`):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:n,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(mg,this.editor.getAttributes(ku)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let n=Oe({find:bu,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(n=Oe({find:bu,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(ku),editor:this.editor})),[n]}}),bo=$.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:n}){return["li",R(this.options.HTMLAttributes,n),0]},markdownTokenName:"list_item",parseMarkdown:(n,e)=>{var t;if(n.type!=="list_item")return[];let r=(t=e.parseBlockChildren)!=null?t:e.parseChildren,i=[];if(n.tokens&&n.tokens.length>0)if(n.tokens.some(o=>o.type==="paragraph"))i=r(n.tokens);else{let o=n.tokens[0];if(o&&o.type==="text"&&o.tokens&&o.tokens.length>0){if(i=[{type:"paragraph",content:e.parseInline(o.tokens)}],n.tokens.length>1){let a=n.tokens.slice(1),c=r(a);i.push(...c)}}else i=r(n.tokens)}return i.length===0&&(i=[{type:"paragraph",content:[]}]),{type:"listItem",content:i}},renderMarkdown:(n,e,t)=>Mn(n,e,r=>{var i,s;return r.parentType==="bulletList"?"- ":r.parentType==="orderedList"?`${(((s=(i=r.meta)==null?void 0:i.parentAttrs)==null?void 0:s.start)||1)+r.index}. `:"- "},t),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),gg={};pg(gg,{findListItemPos:()=>Dn,getNextListDepth:()=>xo,handleBackspace:()=>go,handleDelete:()=>yo,hasListBefore:()=>wu,hasListItemAfter:()=>yg,hasListItemBefore:()=>Cu,listItemHasSubList:()=>vu,nextListIsDeeper:()=>Tu,nextListIsHigher:()=>Eu});var Dn=(n,e)=>{let{$from:t}=e.selection,r=V(n,e.schema),i=null,s=t.depth,o=t.pos,l=null;for(;s>0&&l===null;)i=t.node(s),i.type===r?l=s:(s-=1,o-=1);return l===null?null:{$pos:e.doc.resolve(o),depth:l}},xo=(n,e)=>{let t=Dn(n,e);if(!t)return!1;let[,r]=Cc(e,n,t.$pos.pos+4);return r},wu=(n,e,t)=>{let{$anchor:r}=n.selection,i=Math.max(0,r.pos-2),s=n.doc.resolve(i).node();return!(!s||!t.includes(s.type.name))},Cu=(n,e)=>{var t;let{$anchor:r}=e.selection,i=e.doc.resolve(r.pos-2);return!(i.index()===0||((t=i.nodeBefore)==null?void 0:t.type.name)!==n)},vu=(n,e,t)=>{if(!t)return!1;let r=V(n,e.schema),i=!1;return t.descendants(s=>{s.type===r&&(i=!0)}),i},go=(n,e,t)=>{if(n.commands.undoInputRule())return!0;if(n.state.selection.from!==n.state.selection.to)return!1;if(!Ae(n.state,e)&&wu(n.state,e,t)){let{$anchor:l}=n.state.selection,a=n.state.doc.resolve(l.before()-1),c=[];a.node().descendants((f,h)=>{f.type.name===e&&c.push({node:f,pos:h})});let u=c.at(-1);if(!u)return!1;let d=n.state.doc.resolve(a.start()+u.pos+1);return n.chain().cut({from:l.start()-1,to:l.end()+1},d.end()).joinForward().run()}if(!Ae(n.state,e)||!Tc(n.state))return!1;let r=Dn(e,n.state);if(!r)return!1;let s=n.state.doc.resolve(r.$pos.pos-2).node(r.depth),o=vu(e,n.state,s);return Cu(e,n.state)&&!o?n.commands.joinItemBackward():n.chain().liftListItem(e).run()},Tu=(n,e)=>{let t=xo(n,e),r=Dn(n,e);return!r||!t?!1:t>r.depth},Eu=(n,e)=>{let t=xo(n,e),r=Dn(n,e);return!r||!t?!1:t{if(!Ae(n.state,e)||!vc(n.state,e))return!1;let{selection:t}=n.state,{$from:r,$to:i}=t;return!t.empty&&r.sameParent(i)?!1:Tu(e,n.state)?n.chain().focus(n.state.selection.from+4).lift(e).joinBackward().run():Eu(e,n.state)?n.chain().joinForward().joinBackward().run():n.commands.joinItemForward()},yg=(n,e)=>{var t;let{$anchor:r}=e.selection,i=e.doc.resolve(r.pos-r.parentOffset-2);return!(i.index()===i.parent.childCount-1||((t=i.nodeAfter)==null?void 0:t.type.name)!==n)},So=F.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:n})=>{let e=!1;return this.options.listTypes.forEach(({itemName:t})=>{n.state.schema.nodes[t]!==void 0&&yo(n,t)&&(e=!0)}),e},"Mod-Delete":({editor:n})=>{let e=!1;return this.options.listTypes.forEach(({itemName:t})=>{n.state.schema.nodes[t]!==void 0&&yo(n,t)&&(e=!0)}),e},Backspace:({editor:n})=>{let e=!1;return this.options.listTypes.forEach(({itemName:t,wrapperNames:r})=>{n.state.schema.nodes[t]!==void 0&&go(n,t,r)&&(e=!0)}),e},"Mod-Backspace":({editor:n})=>{let e=!1;return this.options.listTypes.forEach(({itemName:t,wrapperNames:r})=>{n.state.schema.nodes[t]!==void 0&&go(n,t,r)&&(e=!0)}),e}}}}),xu=/^(\s*)(\d+)\.\s+(.*)$/,kg=/^\s/;function bg(n){let e=[],t=0,r=0;for(;t{let i=e.some(c=>c.docChanged)&&!t.doc.eq(r.doc),s=e.some(c=>c.getMeta("preventAutolink"));if(!i||s)return;let{tr:o}=r,l=Fs(t.doc,[...e]);if(Vs(l).forEach(({newRange:c})=>{let u=bc(r.doc,c,h=>h.isTextblock),d,f;if(u.length>1)d=u[0],f=r.doc.textBetween(d.pos,d.pos+d.node.nodeSize,void 0," ");else if(u.length){let h=r.doc.textBetween(c.from,c.to," "," ");if(!cg.test(h))return;d=u[0],f=r.doc.textBetween(d.pos,c.to,void 0," ")}if(d&&f){let h=f.split(ag).filter(Boolean);if(h.length<=0)return!1;let p=h[h.length-1],m=d.pos+f.lastIndexOf(p);if(!p)return!1;let g=si(p).map(y=>y.toObject(n.defaultProtocol));if(!dg(g))return!1;g.filter(y=>y.isLink).map(y=>({...y,from:m+y.start+1,to:m+y.end+1})).filter(y=>r.schema.marks.code?!r.doc.rangeHasMark(y.from,y.to,r.schema.marks.code):!0).filter(y=>n.validate(y.value)).filter(y=>n.shouldAutoLink(y.value)).forEach(y=>{Sr(y.from,y.to,r.doc).some(x=>x.mark.type===n.type)||o.addMark(y.from,y.to,n.type.create({href:y.href}))})}}),!!o.steps.length)return o}})}function hg(n){return new O({key:new P("handleClickLink"),props:{handleClick:(e,t,r)=>{var i,s;if(r.button!==0||!e.editable)return!1;let o=null;if(r.target instanceof HTMLAnchorElement)o=r.target;else{let a=r.target;if(!a)return!1;let c=n.editor.view.dom;o=a.closest("a"),o&&!c.contains(o)&&(o=null)}if(!o)return!1;let l=!1;if(n.enableClickSelection&&(l=n.editor.commands.extendMarkRange(n.type.name)),n.openOnClick){let a=_s(e.state,n.type.name),c=(i=o.href)!=null?i:a.href,u=(s=o.target)!=null?s:a.target;c&&(window.open(c,u),l=!0)}return l}}})}function pg(n){return new O({key:new P("handlePasteLink"),props:{handlePaste:(e,t,r)=>{let{shouldAutoLink:i}=n,{state:s}=e,{selection:o}=s,{empty:l}=o;if(l)return!1;let a="";r.content.forEach(u=>{a+=u.textContent});let c=oi(a,{defaultProtocol:n.defaultProtocol}).find(u=>u.isLink&&u.value===a);return!a||!c||i!==void 0&&!i(c.value)?!1:n.editor.commands.setMark(n.type,{href:c.href})}}})}function wt(n,e){let t=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(r=>{let i=typeof r=="string"?r:r.scheme;i&&t.push(i)}),!n||n.replace(ug,"").match(new RegExp(`^(?:(?:${t.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var ku=me.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(n=>{if(typeof n=="string"){mo(n);return}mo(n.scheme,n.optionalSlashes)})},onDestroy(){yu()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(n,e)=>!!wt(n,e.protocols),validate:n=>!!n,shouldAutoLink:n=>{let e=/^[a-z][a-z0-9+.-]*:\/\//i.test(n),t=/^[a-z][a-z0-9+.-]*:/i.test(n);if(e||t&&!n.includes("@"))return!0;let i=(n.includes("@")?n.split("@").pop():n).split(/[/?#:]/)[0];return!(/^\d{1,3}(\.\d{1,3}){3}$/.test(i)||!/\./.test(i))}}},addAttributes(){return{href:{default:null,parseHTML(n){return n.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:n=>{let e=n.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:t=>!!wt(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:n}){return this.options.isAllowedUri(n.href,{defaultValidate:e=>!!wt(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",D(this.options.HTMLAttributes,n),0]:["a",D(this.options.HTMLAttributes,{...n,href:""}),0]},markdownTokenName:"link",parseMarkdown:(n,e)=>e.applyMark("link",e.parseInline(n.tokens||[]),{href:n.href,title:n.title||null}),renderMarkdown:(n,e)=>{var t,r,i,s;let o=(r=(t=n.attrs)==null?void 0:t.href)!=null?r:"",l=(s=(i=n.attrs)==null?void 0:i.title)!=null?s:"",a=e.renderChildren(n);return l?`[${a}](${o} "${l}")`:`[${a}](${o})`},addCommands(){return{setLink:n=>({chain:e})=>{let{href:t}=n;return this.options.isAllowedUri(t,{defaultValidate:r=>!!wt(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,n).setMeta("preventAutolink",!0).run():!1},toggleLink:n=>({chain:e})=>{let{href:t}=n||{};return t&&!this.options.isAllowedUri(t,{defaultValidate:r=>!!wt(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:e().toggleMark(this.name,n,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:n})=>n().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[Se({find:n=>{let e=[];if(n){let{protocols:t,defaultProtocol:r}=this.options,i=oi(n).filter(s=>s.isLink&&this.options.isAllowedUri(s.value,{defaultValidate:o=>!!wt(o,t),protocols:t,defaultProtocol:r}));i.length&&i.forEach(s=>{this.options.shouldAutoLink(s.value)&&e.push({text:s.value,data:{href:s.href},index:s.start})})}return e},type:this.type,getAttributes:n=>{var e;return{href:(e=n.data)==null?void 0:e.href}}})]},addProseMirrorPlugins(){let n=[],{protocols:e,defaultProtocol:t}=this.options;return this.options.autolink&&n.push(fg({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:i=>!!wt(i,e),protocols:e,defaultProtocol:t}),shouldAutoLink:this.options.shouldAutoLink})),n.push(hg({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&n.push(pg({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),n}});var mg=Object.defineProperty,gg=(n,e)=>{for(var t in e)mg(n,t,{get:e[t],enumerable:!0})},yg="listItem",bu="textStyle",xu=/^\s*([-+*])\s$/,bo=$.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:n}){return["ul",D(this.options.HTMLAttributes,n),0]},markdownTokenName:"list",parseMarkdown:(n,e)=>n.type!=="list"||n.ordered?[]:{type:"bulletList",content:n.items?e.parseChildren(n.items):[]},renderMarkdown:(n,e)=>n.content?e.renderChildren(n.content,` +`):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:n,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(yg,this.editor.getAttributes(bu)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let n=Oe({find:xu,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(n=Oe({find:xu,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(bu),editor:this.editor})),[n]}}),xo=$.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:n}){return["li",D(this.options.HTMLAttributes,n),0]},markdownTokenName:"list_item",parseMarkdown:(n,e)=>{var t;if(n.type!=="list_item")return[];let r=(t=e.parseBlockChildren)!=null?t:e.parseChildren,i=[];if(n.tokens&&n.tokens.length>0)if(n.tokens.some(o=>o.type==="paragraph"))i=r(n.tokens);else{let o=n.tokens[0];if(o&&o.type==="text"&&o.tokens&&o.tokens.length>0){if(i=[{type:"paragraph",content:e.parseInline(o.tokens)}],n.tokens.length>1){let a=n.tokens.slice(1),c=r(a);i.push(...c)}}else i=r(n.tokens)}return i.length===0&&(i=[{type:"paragraph",content:[]}]),{type:"listItem",content:i}},renderMarkdown:(n,e,t)=>Mn(n,e,r=>{var i,s;return r.parentType==="bulletList"?"- ":r.parentType==="orderedList"?`${(((s=(i=r.meta)==null?void 0:i.parentAttrs)==null?void 0:s.start)||1)+r.index}. `:"- "},t),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),kg={};gg(kg,{findListItemPos:()=>Rn,getNextListDepth:()=>So,handleBackspace:()=>yo,handleDelete:()=>ko,hasListBefore:()=>Cu,hasListItemAfter:()=>bg,hasListItemBefore:()=>vu,listItemHasSubList:()=>Tu,nextListIsDeeper:()=>Eu,nextListIsHigher:()=>Au});var Rn=(n,e)=>{let{$from:t}=e.selection,r=V(n,e.schema),i=null,s=t.depth,o=t.pos,l=null;for(;s>0&&l===null;)i=t.node(s),i.type===r?l=s:(s-=1,o-=1);return l===null?null:{$pos:e.doc.resolve(o),depth:l}},So=(n,e)=>{let t=Rn(n,e);if(!t)return!1;let[,r]=vc(e,n,t.$pos.pos+4);return r},Cu=(n,e,t)=>{let{$anchor:r}=n.selection,i=Math.max(0,r.pos-2),s=n.doc.resolve(i).node();return!(!s||!t.includes(s.type.name))},vu=(n,e)=>{var t;let{$anchor:r}=e.selection,i=e.doc.resolve(r.pos-2);return!(i.index()===0||((t=i.nodeBefore)==null?void 0:t.type.name)!==n)},Tu=(n,e,t)=>{if(!t)return!1;let r=V(n,e.schema),i=!1;return t.descendants(s=>{s.type===r&&(i=!0)}),i},yo=(n,e,t)=>{if(n.commands.undoInputRule())return!0;if(n.state.selection.from!==n.state.selection.to)return!1;if(!Ae(n.state,e)&&Cu(n.state,e,t)){let{$anchor:l}=n.state.selection,a=n.state.doc.resolve(l.before()-1),c=[];a.node().descendants((f,h)=>{f.type.name===e&&c.push({node:f,pos:h})});let u=c.at(-1);if(!u)return!1;let d=n.state.doc.resolve(a.start()+u.pos+1);return n.chain().cut({from:l.start()-1,to:l.end()+1},d.end()).joinForward().run()}if(!Ae(n.state,e)||!Ec(n.state))return!1;let r=Rn(e,n.state);if(!r)return!1;let s=n.state.doc.resolve(r.$pos.pos-2).node(r.depth),o=Tu(e,n.state,s);return vu(e,n.state)&&!o?n.commands.joinItemBackward():n.chain().liftListItem(e).run()},Eu=(n,e)=>{let t=So(n,e),r=Rn(n,e);return!r||!t?!1:t>r.depth},Au=(n,e)=>{let t=So(n,e),r=Rn(n,e);return!r||!t?!1:t{if(!Ae(n.state,e)||!Tc(n.state,e))return!1;let{selection:t}=n.state,{$from:r,$to:i}=t;return!t.empty&&r.sameParent(i)?!1:Eu(e,n.state)?n.chain().focus(n.state.selection.from+4).lift(e).joinBackward().run():Au(e,n.state)?n.chain().joinForward().joinBackward().run():n.commands.joinItemForward()},bg=(n,e)=>{var t;let{$anchor:r}=e.selection,i=e.doc.resolve(r.pos-r.parentOffset-2);return!(i.index()===i.parent.childCount-1||((t=i.nodeAfter)==null?void 0:t.type.name)!==n)},Mo=F.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:n})=>{let e=!1;return this.options.listTypes.forEach(({itemName:t})=>{n.state.schema.nodes[t]!==void 0&&ko(n,t)&&(e=!0)}),e},"Mod-Delete":({editor:n})=>{let e=!1;return this.options.listTypes.forEach(({itemName:t})=>{n.state.schema.nodes[t]!==void 0&&ko(n,t)&&(e=!0)}),e},Backspace:({editor:n})=>{let e=!1;return this.options.listTypes.forEach(({itemName:t,wrapperNames:r})=>{n.state.schema.nodes[t]!==void 0&&yo(n,t,r)&&(e=!0)}),e},"Mod-Backspace":({editor:n})=>{let e=!1;return this.options.listTypes.forEach(({itemName:t,wrapperNames:r})=>{n.state.schema.nodes[t]!==void 0&&yo(n,t,r)&&(e=!0)}),e}}}}),Su=/^(\s*)(\d+)\.\s+(.*)$/,xg=/^\s/;function Sg(n){let e=[],t=0,r=0;for(;te;)f.push(n[d]),d+=1;if(f.length>0){let h=Math.min(...f.map(m=>m.indent)),p=Au(f,h,t);c.push({type:"list",ordered:!0,start:f[0].number,items:p,raw:f.map(m=>m.raw).join(` -`)})}i.push({type:"list_item",raw:o.raw,tokens:c}),s=d}else s+=1}return i}function xg(n,e){return n.map(t=>{if(t.type!=="list_item")return e.parseChildren([t])[0];let r=[];return t.tokens&&t.tokens.length>0&&t.tokens.forEach(i=>{if(i.type==="paragraph"||i.type==="list"||i.type==="blockquote"||i.type==="code")r.push(...e.parseChildren([i]));else if(i.type==="text"&&i.tokens){let s=e.parseChildren([i]);r.push({type:"paragraph",content:s})}else{let s=e.parseChildren([i]);s.length>0&&r.push(...s)}}),{type:"listItem",content:r}})}var Sg="listItem",Su="textStyle",Mu=/^(\d+)\.\s$/,Mo=$.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:n=>n.hasAttribute("start")?parseInt(n.getAttribute("start")||"",10):1},type:{default:null,parseHTML:n=>n.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:n}){let{start:e,...t}=n;return e===1?["ol",R(this.options.HTMLAttributes,t),0]:["ol",R(this.options.HTMLAttributes,n),0]},markdownTokenName:"list",parseMarkdown:(n,e)=>{if(n.type!=="list"||!n.ordered)return[];let t=n.start||1,r=n.items?xg(n.items,e):[];return t!==1?{type:"orderedList",attrs:{start:t},content:r}:{type:"orderedList",content:r}},renderMarkdown:(n,e)=>n.content?e.renderChildren(n.content,` +`).trim();if(u){let h=t.blockTokens(u);c.push(...h)}let d=s+1,f=[];for(;de;)f.push(n[d]),d+=1;if(f.length>0){let h=Math.min(...f.map(m=>m.indent)),p=Nu(f,h,t);c.push({type:"list",ordered:!0,start:f[0].number,items:p,raw:f.map(m=>m.raw).join(` +`)})}i.push({type:"list_item",raw:o.raw,tokens:c}),s=d}else s+=1}return i}function Mg(n,e){return n.map(t=>{if(t.type!=="list_item")return e.parseChildren([t])[0];let r=[];return t.tokens&&t.tokens.length>0&&t.tokens.forEach(i=>{if(i.type==="paragraph"||i.type==="list"||i.type==="blockquote"||i.type==="code")r.push(...e.parseChildren([i]));else if(i.type==="text"&&i.tokens){let s=e.parseChildren([i]);r.push({type:"paragraph",content:s})}else{let s=e.parseChildren([i]);s.length>0&&r.push(...s)}}),{type:"listItem",content:r}})}var wg="listItem",Mu="textStyle",wu=/^(\d+)\.\s$/,wo=$.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:n=>n.hasAttribute("start")?parseInt(n.getAttribute("start")||"",10):1},type:{default:null,parseHTML:n=>n.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:n}){let{start:e,...t}=n;return e===1?["ol",D(this.options.HTMLAttributes,t),0]:["ol",D(this.options.HTMLAttributes,n),0]},markdownTokenName:"list",parseMarkdown:(n,e)=>{if(n.type!=="list"||!n.ordered)return[];let t=n.start||1,r=n.items?Mg(n.items,e):[];return t!==1?{type:"orderedList",attrs:{start:t},content:r}:{type:"orderedList",content:r}},renderMarkdown:(n,e)=>n.content?e.renderChildren(n.content,` `):"",markdownTokenizer:{name:"orderedList",level:"block",start:n=>{let e=n.match(/^(\s*)(\d+)\.\s+/),t=e==null?void 0:e.index;return t!==void 0?t:-1},tokenize:(n,e,t)=>{var r;let i=n.split(` -`),[s,o]=bg(i);if(s.length===0)return;let l=Au(s,0,t);return l.length===0?void 0:{type:"list",ordered:!0,start:((r=s[0])==null?void 0:r.number)||1,items:l,raw:i.slice(0,o).join(` -`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:n,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(Sg,this.editor.getAttributes(Su)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let n=Oe({find:Mu,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(n=Oe({find:Mu,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(Su)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[n]}}),Mg=/^\s*(\[([( |x])?\])\s$/,wg=$.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:n=>{let e=n.getAttribute("data-checked");return e===""||e==="true"},renderHTML:n=>({"data-checked":n.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:n,HTMLAttributes:e}){return["li",R(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:n.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(n,e)=>{let t=[];if(n.tokens&&n.tokens.length>0?t.push(e.createNode("paragraph",{},e.parseInline(n.tokens))):n.text?t.push(e.createNode("paragraph",{},[e.createNode("text",{text:n.text})])):t.push(e.createNode("paragraph",{},[])),n.nestedTokens&&n.nestedTokens.length>0){let r=e.parseChildren(n.nestedTokens);t.push(...r)}return e.createNode("taskItem",{checked:n.checked||!1},t)},renderMarkdown:(n,e)=>{var t;let i=`- [${(t=n.attrs)!=null&&t.checked?"x":" "}] `;return Mn(n,e,i)},addKeyboardShortcuts(){let n={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...n,Tab:()=>this.editor.commands.sinkListItem(this.name)}:n},addNodeView(){return({node:n,HTMLAttributes:e,getPos:t,editor:r})=>{let i=document.createElement("li"),s=document.createElement("label"),o=document.createElement("span"),l=document.createElement("input"),a=document.createElement("div"),c=d=>{var f,h;l.ariaLabel=((h=(f=this.options.a11y)==null?void 0:f.checkboxLabel)==null?void 0:h.call(f,d,l.checked))||`Task item checkbox for ${d.textContent||"empty task item"}`};c(n),s.contentEditable="false",l.type="checkbox",l.addEventListener("mousedown",d=>d.preventDefault()),l.addEventListener("change",d=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){l.checked=!l.checked;return}let{checked:f}=d.target;r.isEditable&&typeof t=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:h})=>{let p=t();if(typeof p!="number")return!1;let m=h.doc.nodeAt(p);return h.setNodeMarkup(p,void 0,{...m==null?void 0:m.attrs,checked:f}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(n,f)||(l.checked=!l.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([d,f])=>{i.setAttribute(d,f)}),i.dataset.checked=n.attrs.checked,l.checked=n.attrs.checked,s.append(l,o),i.append(s,a),Object.entries(e).forEach(([d,f])=>{i.setAttribute(d,f)});let u=new Set(Object.keys(e));return{dom:i,contentDOM:a,update:d=>{if(d.type!==this.type)return!1;i.dataset.checked=d.attrs.checked,l.checked=d.attrs.checked,c(d);let f=r.extensionManager.attributes,h=Wt(d,f),p=new Set(Object.keys(h)),m=this.options.HTMLAttributes;return u.forEach(g=>{p.has(g)||(g in m?i.setAttribute(g,m[g]):i.removeAttribute(g))}),Object.entries(h).forEach(([g,y])=>{y==null?g in m?i.setAttribute(g,m[g]):i.removeAttribute(g):i.setAttribute(g,y)}),u=p,!0}}}},addInputRules(){return[Oe({find:Mg,type:this.type,getAttributes:n=>({checked:n[n.length-1]==="x"})})]}}),Cg=$.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:n}){return["ul",R(this.options.HTMLAttributes,n,{"data-type":this.name}),0]},parseMarkdown:(n,e)=>e.createNode("taskList",{},e.parseChildren(n.items||[])),renderMarkdown:(n,e)=>n.content?e.renderChildren(n.content,` -`):"",markdownTokenizer:{name:"taskList",level:"block",start(n){var e;let t=(e=n.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:e.index;return t!==void 0?t:-1},tokenize(n,e,t){let r=s=>{let o=Tr(s,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:l=>({indentLevel:l[1].length,mainContent:l[4],checked:l[3].toLowerCase()==="x"}),createToken:(l,a)=>({type:"taskItem",raw:"",mainContent:l.mainContent,indentLevel:l.indentLevel,checked:l.checked,text:l.mainContent,tokens:t.inlineTokens(l.mainContent),nestedTokens:a}),customNestedParser:r},t);return o?[{type:"taskList",raw:o.raw,items:o.items}]:t.blockTokens(s)},i=Tr(n,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:s=>({indentLevel:s[1].length,mainContent:s[4],checked:s[3].toLowerCase()==="x"}),createToken:(s,o)=>({type:"taskItem",raw:"",mainContent:s.mainContent,indentLevel:s.indentLevel,checked:s.checked,text:s.mainContent,tokens:t.inlineTokens(s.mainContent),nestedTokens:o}),customNestedParser:r},t);if(i)return{type:"taskList",raw:i.raw,items:i.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:n})=>n.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),Zk=F.create({name:"listKit",addExtensions(){let n=[];return this.options.bulletList!==!1&&n.push(ko.configure(this.options.bulletList)),this.options.listItem!==!1&&n.push(bo.configure(this.options.listItem)),this.options.listKeymap!==!1&&n.push(So.configure(this.options.listKeymap)),this.options.orderedList!==!1&&n.push(Mo.configure(this.options.orderedList)),this.options.taskItem!==!1&&n.push(wg.configure(this.options.taskItem)),this.options.taskList!==!1&&n.push(Cg.configure(this.options.taskList)),n}});var li=" ",wo="\xA0",Nu=$.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:n}){return["p",R(this.options.HTMLAttributes,n),0]},parseMarkdown:(n,e)=>{let t=n.tokens||[];if(t.length===1&&t[0].type==="image")return e.parseChildren([t[0]]);let r=e.parseInline(t);return t.length===1&&t[0].type==="text"&&(t[0].raw===li||t[0].text===li||t[0].raw===wo||t[0].text===wo)&&r.length===1&&r[0].type==="text"&&(r[0].text===li||r[0].text===wo)?e.createNode("paragraph",void 0,[]):e.createNode("paragraph",void 0,r)},renderMarkdown:(n,e,t)=>{var r,i;if(!n)return"";let s=Array.isArray(n.content)?n.content:[];if(s.length===0){let o=Array.isArray((r=t==null?void 0:t.previousNode)==null?void 0:r.content)?t.previousNode.content:[];return((i=t==null?void 0:t.previousNode)==null?void 0:i.type)==="paragraph"&&o.length===0?li:""}return e.renderChildren(s)},addCommands(){return{setParagraph:()=>({commands:n})=>n.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}});var vg=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,Tg=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,Ou=me.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:n=>n.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["s",R(this.options.HTMLAttributes,n),0]},markdownTokenName:"del",parseMarkdown:(n,e)=>e.applyMark("strike",e.parseInline(n.tokens||[])),renderMarkdown:(n,e)=>`~~${e.renderChildren(n)}~~`,addCommands(){return{setStrike:()=>({commands:n})=>n.setMark(this.name),toggleStrike:()=>({commands:n})=>n.toggleMark(this.name),unsetStrike:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Ne({find:vg,type:this.type})]},addPasteRules(){return[Se({find:Tg,type:this.type})]}});var Iu=$.create({name:"text",group:"inline",parseMarkdown:n=>({type:"text",text:n.text||""}),renderMarkdown:n=>n.text||""});var Ru=me.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:n=>n.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["u",R(this.options.HTMLAttributes,n),0]},parseMarkdown(n,e){return e.applyMark(this.name||"underline",e.parseInline(n.tokens||[]))},renderMarkdown(n,e){return`++${e.renderChildren(n)}++`},markdownTokenizer:{name:"underline",level:"inline",start(n){return n.indexOf("++")},tokenize(n,e,t){let i=/^(\+\+)([\s\S]+?)(\+\+)/.exec(n);if(!i)return;let s=i[2].trim();return{type:"underline",raw:i[0],text:s,tokens:t.inlineTokens(s)}}},addCommands(){return{setUnderline:()=>({commands:n})=>n.setMark(this.name),toggleUnderline:()=>({commands:n})=>n.toggleMark(this.name),unsetUnderline:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});function Du(n={}){return new O({view(e){return new Co(e,n)}})}var Co=class{constructor(e,t){var r;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=t.width)!==null&&r!==void 0?r:1,this.color=t.color===!1?void 0:t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map(i=>{let s=o=>{this[i](o)};return e.dom.addEventListener(i,s),{name:i,handler:s}})}destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){this.cursorPos!=null&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),t=!e.parent.inlineContent,r,i=this.editorView.dom,s=i.getBoundingClientRect(),o=s.width/i.offsetWidth,l=s.height/i.offsetHeight;if(t){let d=e.nodeBefore,f=e.nodeAfter;if(d||f){let h=this.editorView.nodeDOM(this.cursorPos-(d?d.nodeSize:0));if(h){let p=h.getBoundingClientRect(),m=d?p.bottom:p.top;d&&f&&(m=(m+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let g=this.width/2*l;r={left:p.left,right:p.right,top:m-g,bottom:m+g}}}}if(!r){let d=this.editorView.coordsAtPos(this.cursorPos),f=this.width/2*o;r={left:d.left-f,right:d.left+f,top:d.top,bottom:d.bottom}}let a=this.editorView.dom.offsetParent;this.element||(this.element=a.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",t),this.element.classList.toggle("prosemirror-dropcursor-inline",!t);let c,u;if(!a||a==document.body&&getComputedStyle(a).position=="static")c=-pageXOffset,u=-pageYOffset;else{let d=a.getBoundingClientRect(),f=d.width/a.offsetWidth,h=d.height/a.offsetHeight;c=d.left-a.scrollLeft*f,u=d.top-a.scrollTop*h}this.element.style.left=(r.left-c)/o+"px",this.element.style.top=(r.top-u)/l+"px",this.element.style.width=(r.right-r.left)/o+"px",this.element.style.height=(r.bottom-r.top)/l+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),r=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),i=r&&r.type.spec.disableDropCursor,s=typeof i=="function"?i(this.editorView,t,e):i;if(t&&!s){let o=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let l=Wn(this.editorView.state.doc,o,this.editorView.dragging.slice);l!=null&&(o=l)}this.setCursor(o),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}};var oe=class n extends N{constructor(e){super(e,e)}map(e,t){let r=e.resolve(t.map(this.head));return n.valid(r)?new n(r):N.near(r)}content(){return S.empty}eq(e){return e instanceof n&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new n(e.resolve(t.pos))}getBookmark(){return new vo(this.anchor)}static valid(e){let t=e.parent;if(t.inlineContent||!Eg(e)||!Ag(e))return!1;let r=t.type.spec.allowGapCursor;if(r!=null)return r;let i=t.contentMatchAt(e.index()).defaultType;return i&&i.isTextblock}static findGapCursorFrom(e,t,r=!1){e:for(;;){if(!r&&n.valid(e))return e;let i=e.pos,s=null;for(let o=e.depth;;o--){let l=e.node(o);if(t>0?e.indexAfter(o)0){s=l.child(t>0?e.indexAfter(o):e.index(o)-1);break}else if(o==0)return null;i+=t;let a=e.doc.resolve(i);if(n.valid(a))return a}for(;;){let o=t>0?s.firstChild:s.lastChild;if(!o){if(s.isAtom&&!s.isText&&!M.isSelectable(s)){e=e.doc.resolve(i+s.nodeSize*t),r=!1;continue e}break}s=o,i+=t;let l=e.doc.resolve(i);if(n.valid(l))return l}return null}}};oe.prototype.visible=!1;oe.findFrom=oe.findGapCursorFrom;N.jsonID("gapcursor",oe);var vo=class n{constructor(e){this.pos=e}map(e){return new n(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return oe.valid(t)?new oe(t):N.near(t)}};function Pu(n){return n.isAtom||n.spec.isolating||n.spec.createGapCursor}function Eg(n){for(let e=n.depth;e>=0;e--){let t=n.index(e),r=n.node(e);if(t==0){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(t-1);;i=i.lastChild){if(i.childCount==0&&!i.inlineContent||Pu(i.type))return!0;if(i.inlineContent)return!1}}return!0}function Ag(n){for(let e=n.depth;e>=0;e--){let t=n.indexAfter(e),r=n.node(e);if(t==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(t);;i=i.firstChild){if(i.childCount==0&&!i.inlineContent||Pu(i.type))return!0;if(i.inlineContent)return!1}}return!0}function Lu(){return new O({props:{decorations:Rg,createSelectionBetween(n,e,t){return e.pos==t.pos&&oe.valid(t)?new oe(t):null},handleClick:Og,handleKeyDown:Ng,handleDOMEvents:{beforeinput:Ig}}})}var Ng=As({ArrowLeft:ai("horiz",-1),ArrowRight:ai("horiz",1),ArrowUp:ai("vert",-1),ArrowDown:ai("vert",1)});function ai(n,e){let t=n=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,i,s){let o=r.selection,l=e>0?o.$to:o.$from,a=o.empty;if(o instanceof E){if(!s.endOfTextblock(t)||l.depth==0)return!1;a=!1,l=r.doc.resolve(e>0?l.after():l.before())}let c=oe.findGapCursorFrom(l,e,a);return c?(i&&i(r.tr.setSelection(new oe(c))),!0):!1}}function Og(n,e,t){if(!n||!n.editable)return!1;let r=n.state.doc.resolve(e);if(!oe.valid(r))return!1;let i=n.posAtCoords({left:t.clientX,top:t.clientY});return i&&i.inside>-1&&M.isSelectable(n.state.doc.nodeAt(i.inside))?!1:(n.dispatch(n.state.tr.setSelection(new oe(r))),!0)}function Ig(n,e){if(e.inputType!="insertCompositionText"||!(n.state.selection instanceof oe))return!1;let{$from:t}=n.state.selection,r=t.parent.contentMatchAt(t.index()).findWrapping(n.state.schema.nodes.text);if(!r)return!1;let i=k.empty;for(let o=r.length-1;o>=0;o--)i=k.from(r[o].createAndFill(null,i));let s=n.state.tr.replace(t.pos,t.pos,new S(i,0,0));return s.setSelection(E.near(s.doc.resolve(t.pos+1))),n.dispatch(s),!1}function Rg(n){if(!(n.selection instanceof oe))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",W.create(n.doc,[se.widget(n.selection.head,e,{key:"gapcursor"})])}var ci=200,te=function(){};te.prototype.append=function(e){return e.length?(e=te.from(e),!this.length&&e||e.length=t?te.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))};te.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};te.prototype.forEach=function(e,t,r){t===void 0&&(t=0),r===void 0&&(r=this.length),t<=r?this.forEachInner(e,t,r,0):this.forEachInvertedInner(e,t,r,0)};te.prototype.map=function(e,t,r){t===void 0&&(t=0),r===void 0&&(r=this.length);var i=[];return this.forEach(function(s,o){return i.push(e(s,o))},t,r),i};te.from=function(e){return e instanceof te?e:e&&e.length?new zu(e):te.empty};var zu=(function(n){function e(r){n.call(this),this.values=r}n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e;var t={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(i,s){return i==0&&s==this.length?this:new e(this.values.slice(i,s))},e.prototype.getInner=function(i){return this.values[i]},e.prototype.forEachInner=function(i,s,o,l){for(var a=s;a=o;a--)if(i(this.values[a],l+a)===!1)return!1},e.prototype.leafAppend=function(i){if(this.length+i.length<=ci)return new e(this.values.concat(i.flatten()))},e.prototype.leafPrepend=function(i){if(this.length+i.length<=ci)return new e(i.flatten().concat(this.values))},t.length.get=function(){return this.values.length},t.depth.get=function(){return 0},Object.defineProperties(e.prototype,t),e})(te);te.empty=new zu([]);var Dg=(function(n){function e(t,r){n.call(this),this.left=t,this.right=r,this.length=t.length+r.length,this.depth=Math.max(t.depth,r.depth)+1}return n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return rl&&this.right.forEachInner(r,Math.max(i-l,0),Math.min(this.length,s)-l,o+l)===!1)return!1},e.prototype.forEachInvertedInner=function(r,i,s,o){var l=this.left.length;if(i>l&&this.right.forEachInvertedInner(r,i-l,Math.max(s,l)-l,o+l)===!1||s=s?this.right.slice(r-s,i-s):this.left.slice(r,s).append(this.right.slice(0,i-s))},e.prototype.leafAppend=function(r){var i=this.right.leafAppend(r);if(i)return new e(this.left,i)},e.prototype.leafPrepend=function(r){var i=this.left.leafPrepend(r);if(i)return new e(i,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e})(te),To=te;var Pg=500,vt=class n{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,s;t&&(i=this.remapping(r,this.items.length),s=i.maps.length);let o=e.tr,l,a,c=[],u=[];return this.items.forEach((d,f)=>{if(!d.step){i||(i=this.remapping(r,f+1),s=i.maps.length),s--,u.push(d);return}if(i){u.push(new De(d.map));let h=d.step.map(i.slice(s)),p;h&&o.maybeStep(h).doc&&(p=o.mapping.maps[o.mapping.maps.length-1],c.push(new De(p,void 0,void 0,c.length+u.length))),s--,p&&i.appendMap(p,s)}else o.maybeStep(d.step);if(d.selection)return l=i?d.selection.map(i.slice(s)):d.selection,a=new n(this.items.slice(0,r).append(u.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:a,transform:o,selection:l}}addTransform(e,t,r,i){let s=[],o=this.eventCount,l=this.items,a=!i&&l.length?l.get(l.length-1):null;for(let u=0;uzg&&(l=Lg(l,c),o-=c),new n(l.append(s),o)}remapping(e,t){let r=new tn;return this.items.forEach((i,s)=>{let o=i.mirrorOffset!=null&&s-i.mirrorOffset>=e?r.maps.length-i.mirrorOffset:void 0;r.appendMap(i.map,o)},e,t),r}addMaps(e){return this.eventCount==0?this:new n(this.items.append(e.map(t=>new De(t))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-t),s=e.mapping,o=e.steps.length,l=this.eventCount;this.items.forEach(f=>{f.selection&&l--},i);let a=t;this.items.forEach(f=>{let h=s.getMirror(--a);if(h==null)return;o=Math.min(o,h);let p=s.maps[h];if(f.step){let m=e.steps[h].invert(e.docs[h]),g=f.selection&&f.selection.map(s.slice(a+1,h));g&&l++,r.push(new De(p,m,g))}else r.push(new De(p))},i);let c=[];for(let f=t;fPg&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),r=t.maps.length,i=[],s=0;return this.items.forEach((o,l)=>{if(l>=e)i.push(o),o.selection&&s++;else if(o.step){let a=o.step.map(t.slice(r)),c=a&&a.getMap();if(r--,c&&t.appendMap(c,r),a){let u=o.selection&&o.selection.map(t.slice(r));u&&s++;let d=new De(c.invert(),a,u),f,h=i.length-1;(f=i.length&&i[h].merge(d))?i[h]=f:i.push(d)}}else o.map&&r--},this.items.length,0),new n(To.from(i.reverse()),s)}};vt.empty=new vt(To.empty,0);function Lg(n,e){let t;return n.forEach((r,i)=>{if(r.selection&&e--==0)return t=i,!1}),n.slice(t)}var De=class n{constructor(e,t,r,i){this.map=e,this.step=t,this.selection=r,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new n(t.getMap().invert(),t,this.selection)}}},Pe=class{constructor(e,t,r,i,s){this.done=e,this.undone=t,this.prevRanges=r,this.prevTime=i,this.prevComposition=s}},zg=20;function Bg(n,e,t,r){let i=t.getMeta(Ct),s;if(i)return i.historyState;t.getMeta($g)&&(n=new Pe(n.done,n.undone,null,0,-1));let o=t.getMeta("appendedTransaction");if(t.steps.length==0)return n;if(o&&o.getMeta(Ct))return o.getMeta(Ct).redo?new Pe(n.done.addTransform(t,void 0,r,ui(e)),n.undone,Bu(t.mapping.maps),n.prevTime,n.prevComposition):new Pe(n.done,n.undone.addTransform(t,void 0,r,ui(e)),null,n.prevTime,n.prevComposition);if(t.getMeta("addToHistory")!==!1&&!(o&&o.getMeta("addToHistory")===!1)){let l=t.getMeta("composition"),a=n.prevTime==0||!o&&n.prevComposition!=l&&(n.prevTime<(t.time||0)-r.newGroupDelay||!Fg(t,n.prevRanges)),c=o?Eo(n.prevRanges,t.mapping):Bu(t.mapping.maps);return new Pe(n.done.addTransform(t,a?e.selection.getBookmark():void 0,r,ui(e)),vt.empty,c,t.time,l==null?n.prevComposition:l)}else return(s=t.getMeta("rebased"))?new Pe(n.done.rebased(t,s),n.undone.rebased(t,s),Eo(n.prevRanges,t.mapping),n.prevTime,n.prevComposition):new Pe(n.done.addMaps(t.mapping.maps),n.undone.addMaps(t.mapping.maps),Eo(n.prevRanges,t.mapping),n.prevTime,n.prevComposition)}function Fg(n,e){if(!e)return!1;if(!n.docChanged)return!0;let t=!1;return n.mapping.maps[0].forEach((r,i)=>{for(let s=0;s=e[s]&&(t=!0)}),t}function Bu(n){let e=[];for(let t=n.length-1;t>=0&&e.length==0;t--)n[t].forEach((r,i,s,o)=>e.push(s,o));return e}function Eo(n,e){if(!n)return null;let t=[];for(let r=0;r{let i=Ct.getState(t);if(!i||(n?i.undone:i.done).eventCount==0)return!1;if(r){let s=Hg(i,t,n);s&&r(e?s.scrollIntoView():s)}return!0}}var No=di(!1,!0),Oo=di(!0,!0),vb=di(!1,!1),Tb=di(!0,!1);var Rb=F.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:n=>n.length,wordCounter:n=>n.split(" ").filter(e=>e!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=n=>{let e=(n==null?void 0:n.node)||this.editor.state.doc;if(((n==null?void 0:n.mode)||this.options.mode)==="textSize"){let r=e.textBetween(0,e.content.size,void 0," ");return this.options.textCounter(r)}return e.nodeSize},this.storage.words=n=>{let e=(n==null?void 0:n.node)||this.editor.state.doc,t=e.textBetween(0,e.content.size," "," ");return this.options.wordCounter(t)}},addProseMirrorPlugins(){let n=!1;return[new O({key:new P("characterCount"),appendTransaction:(e,t,r)=>{if(n)return;let i=this.options.limit;if(i==null||i===0){n=!0;return}let s=this.storage.characters({node:r.doc});if(s>i){let o=s-i,l=0,a=o;console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);let c=r.tr.deleteRange(l,a);return n=!0,c}n=!0},filterTransaction:(e,t)=>{let r=this.options.limit;if(!e.docChanged||r===0||r===null||r===void 0)return!0;let i=this.storage.characters({node:t.doc}),s=this.storage.characters({node:e.doc});if(s<=r||i>r&&s>r&&s<=i)return!0;if(i>r&&s>r&&s>i||!e.getMeta("paste"))return!1;let l=e.selection.$head.pos,a=s-r,c=l-a,u=l;return e.deleteRange(c,u),!(this.storage.characters({node:e.doc})>r)}})]}}),Vu=F.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[Du(this.options)]}}),Fb=F.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new O({key:new P("focus"),props:{decorations:({doc:n,selection:e})=>{let{isEditable:t,isFocused:r}=this.editor,{anchor:i}=e,s=[];if(!t||!r)return W.create(n,[]);let o=0;this.options.mode==="deepest"&&n.descendants((a,c)=>{if(a.isText)return;if(!(i>=c&&i<=c+a.nodeSize-1))return!1;o+=1});let l=0;return n.descendants((a,c)=>{if(a.isText||!(i>=c&&i<=c+a.nodeSize-1))return!1;if(l+=1,this.options.mode==="deepest"&&o-l>0||this.options.mode==="shallowest"&&l>1)return this.options.mode==="deepest";s.push(se.node(c,c+a.nodeSize,{class:this.options.className}))}),W.create(n,s)}}})]}}),ju=F.create({name:"gapCursor",addProseMirrorPlugins(){return[Lu()]},extendNodeSchema(n){var e;let t={name:n.name,options:n.options,storage:n.storage};return{allowGapCursor:(e=H(T(n,"allowGapCursor",t)))!=null?e:null}}}),$u="placeholder";function _g(n){return n.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}var Wb=F.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:$u,placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){let n=this.options.dataAttribute?`data-${_g(this.options.dataAttribute)}`:`data-${$u}`;return[new O({key:new P("placeholder"),props:{decorations:({doc:e,selection:t})=>{let r=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:i}=t,s=[];if(!r)return null;let o=this.editor.isEmpty;return e.descendants((l,a)=>{let c=i>=a&&i<=a+l.nodeSize,u=!l.isLeaf&&xn(l);if(!l.type.isTextblock)return this.options.includeChildren;if((c||!this.options.showOnlyCurrent)&&u){let d=[this.options.emptyNodeClass];o&&d.push(this.options.emptyEditorClass);let f=se.node(a,a+l.nodeSize,{class:d.join(" "),[n]:typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:l,pos:a,hasAnchor:c}):this.options.placeholder});s.push(f)}return this.options.includeChildren}),W.create(e,s)}}})]}}),qb=F.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){let{editor:n,options:e}=this;return[new O({key:new P("selection"),props:{decorations(t){return t.selection.empty||n.isFocused||!n.isEditable||Mr(t.selection)||n.view.dragging?null:W.create(t.doc,[se.inline(t.selection.from,t.selection.to,{class:e.className})])}}})]}}),Vg="skipTrailingNode";function _u({types:n,node:e}){return e&&Array.isArray(n)&&n.includes(e.type)||(e==null?void 0:e.type)===n}var Wu=F.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var n;let e=new P(this.name),t=this.options.node||((n=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:n.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(([,i])=>i).filter(i=>(this.options.notAfter||[]).concat(t).includes(i.name));return[new O({key:e,appendTransaction:(i,s,o)=>{let{doc:l,tr:a,schema:c}=o,u=e.getState(o),d=l.content.size,f=c.nodes[t];if(!i.some(h=>h.getMeta(Vg))&&u)return a.insert(d,f.create())},state:{init:(i,s)=>{let o=s.tr.doc.lastChild;return!_u({node:o,types:r})},apply:(i,s)=>{if(!i.docChanged||i.getMeta("__uniqueIDTransaction"))return s;let o=i.doc.lastChild;return!_u({node:o,types:r})}}})]}}),Ku=F.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:n,dispatch:e})=>No(n,e),redo:()=>({state:n,dispatch:e})=>Oo(n,e)}},addProseMirrorPlugins(){return[Hu(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-\u044F":()=>this.editor.commands.undo(),"Shift-Mod-\u044F":()=>this.editor.commands.redo()}}});var jg=F.create({name:"starterKit",addExtensions(){var n,e,t,r;let i=[];return this.options.bold!==!1&&i.push(qc.configure(this.options.bold)),this.options.blockquote!==!1&&i.push(Jc.configure(this.options.blockquote)),this.options.bulletList!==!1&&i.push(ko.configure(this.options.bulletList)),this.options.code!==!1&&i.push(Gc.configure(this.options.code)),this.options.codeBlock!==!1&&i.push(Yc.configure(this.options.codeBlock)),this.options.document!==!1&&i.push(Xc.configure(this.options.document)),this.options.dropcursor!==!1&&i.push(Vu.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&i.push(ju.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&i.push(Qc.configure(this.options.hardBreak)),this.options.heading!==!1&&i.push(Zc.configure(this.options.heading)),this.options.undoRedo!==!1&&i.push(Ku.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&i.push(eu.configure(this.options.horizontalRule)),this.options.italic!==!1&&i.push(tu.configure(this.options.italic)),this.options.listItem!==!1&&i.push(bo.configure(this.options.listItem)),this.options.listKeymap!==!1&&i.push(So.configure((n=this.options)==null?void 0:n.listKeymap)),this.options.link!==!1&&i.push(yu.configure((e=this.options)==null?void 0:e.link)),this.options.orderedList!==!1&&i.push(Mo.configure(this.options.orderedList)),this.options.paragraph!==!1&&i.push(Nu.configure(this.options.paragraph)),this.options.strike!==!1&&i.push(Ou.configure(this.options.strike)),this.options.text!==!1&&i.push(Iu.configure(this.options.text)),this.options.underline!==!1&&i.push(Ru.configure((t=this.options)==null?void 0:t.underline)),this.options.trailingNode!==!1&&i.push(Wu.configure((r=this.options)==null?void 0:r.trailingNode)),i}}),Uu=jg;var Wg=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,Kg=$.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{},resize:!1}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:n}){return["img",R(this.options.HTMLAttributes,n)]},parseMarkdown:(n,e)=>e.createNode("image",{src:n.href,title:n.title,alt:n.text}),renderMarkdown:n=>{var e,t,r,i,s,o;let l=(t=(e=n.attrs)==null?void 0:e.src)!=null?t:"",a=(i=(r=n.attrs)==null?void 0:r.alt)!=null?i:"",c=(o=(s=n.attrs)==null?void 0:s.title)!=null?o:"";return c?`![${a}](${l} "${c}")`:`![${a}](${l})`},addNodeView(){if(!this.options.resize||!this.options.resize.enabled||typeof document=="undefined")return null;let{directions:n,minWidth:e,minHeight:t,alwaysPreserveAspectRatio:r}=this.options.resize;return({node:i,getPos:s,HTMLAttributes:o,editor:l})=>{let a=document.createElement("img");Object.entries(o).forEach(([d,f])=>{if(f!=null)switch(d){case"width":case"height":break;default:a.setAttribute(d,f);break}}),a.src=o.src;let c=new Wc({element:a,editor:l,node:i,getPos:s,onResize:(d,f)=>{a.style.width=`${d}px`,a.style.height=`${f}px`},onCommit:(d,f)=>{let h=s();h!==void 0&&this.editor.chain().setNodeSelection(h).updateAttributes(this.name,{width:d,height:f}).run()},onUpdate:(d,f,h)=>d.type===i.type,options:{directions:n,min:{width:e,height:t},preserveAspectRatio:r===!0}}),u=c.dom;return u.style.visibility="hidden",u.style.pointerEvents="none",a.onload=()=>{u.style.visibility="",u.style.pointerEvents=""},c}},addCommands(){return{setImage:n=>({commands:e})=>e.insertContent({type:this.name,attrs:n})}},addInputRules(){return[vr({find:Wg,type:this.type,getAttributes:n=>{let[,,e,t,r]=n;return{src:t,alt:e,title:r}}})]}}),Ju=Kg;var Tt="portfolioImage";function st(n){return Number.parseInt(String(n||"0"),10)||0}function Do(n){if(!n)return null;let e=String(n);try{e=new URL(e,window.location.origin).pathname}catch{}let t=e.match(/\/comn\/file\/view\/([^/?#]+)\/(\d+)/);return t?{atchFileIdntfNo:decodeURIComponent(t[1]),fileSn:st(t[2])}:null}var Ug=Ju.extend({name:Tt,group:"block",draggable:!0,selectable:!0,addAttributes(){var n;return{...(n=this.parent)==null?void 0:n.call(this),atchFileIdntfNo:{default:"",parseHTML:e=>{let t=Do(e.getAttribute("src"));return e.getAttribute("data-atch-file-idntf-no")||(t==null?void 0:t.atchFileIdntfNo)||""},renderHTML:e=>e.atchFileIdntfNo?{"data-atch-file-idntf-no":e.atchFileIdntfNo}:{}},fileSn:{default:0,parseHTML:e=>{var r;let t=st(e.getAttribute("data-file-sn"));return t>0?t:((r=Do(e.getAttribute("src")))==null?void 0:r.fileSn)||0},renderHTML:e=>e.fileSn>0?{"data-file-sn":String(e.fileSn)}:{}},isRepresentative:{default:!1,parseHTML:e=>e.getAttribute("data-is-representative")==="true",renderHTML:e=>e.isRepresentative?{"data-is-representative":"true"}:{}}}},parseHTML(){return[{tag:"img[src]"}]},renderHTML({HTMLAttributes:n}){return["img",R(this.options.HTMLAttributes,n)]},addNodeView(){return({node:n,editor:e,getPos:t})=>{let r=n,i=document.createElement("figure"),s=document.createElement("img");i.className="iotdoor-editor-image-node",i.appendChild(s);let o=a=>{if(a.preventDefault(),a.stopPropagation(),typeof t!="function")return;let c=t();if(typeof c!="number")return;let u=e.state.tr.setSelection(M.create(e.state.doc,c));e.view.dispatch(u),e.view.focus()},l=()=>{s.src=r.attrs.src||"",s.alt=r.attrs.alt||"",i.classList.toggle("is-representative",r.attrs.isRepresentative===!0)};return l(),i.addEventListener("mousedown",o),{dom:i,update(a){return a.type.name!==r.type.name?!1:(r=a,l(),!0)},selectNode(){i.classList.add("ProseMirror-selectednode")},deselectNode(){i.classList.remove("ProseMirror-selectednode")},destroy(){i.removeEventListener("mousedown",o)}}}}});function Jg(n){let{selection:e}=n.state;return e instanceof M&&e.node.type.name===Tt?e.from:null}function Po(n){let e=null;return n.state.doc.descendants(t=>t.type.name!==Tt?!0:t.attrs.isRepresentative?(e=t.attrs,!1):!0),e}function qg(n,e){let t=null;return n.state.doc.descendants((r,i)=>r.type.name!==Tt?!0:e(r,i)?(t=i,!1):!0),t}function qu(n,e){let t=n.state.tr,r=!1;return n.state.doc.descendants((i,s)=>{if(i.type.name!==Tt)return!0;let o=s===e,l=Do(i.attrs.src),a=i.attrs.atchFileIdntfNo||(l==null?void 0:l.atchFileIdntfNo)||"",c=st(i.attrs.fileSn)||(l==null?void 0:l.fileSn)||0,u={...i.attrs,atchFileIdntfNo:a,fileSn:c,isRepresentative:o};return(!!i.attrs.isRepresentative!==o||i.attrs.atchFileIdntfNo!==a||st(i.attrs.fileSn)!==c)&&(t.setNodeMarkup(s,void 0,u),r=!0),!0}),r&&n.view.dispatch(t),r}function Io(n,e){e.querySelectorAll("button[data-editor-action]").forEach(t=>{let r=t.dataset.editorAction,i=!1;r==="paragraph"?i=n.isActive("paragraph"):r==="heading"?i=n.isActive("heading",{level:st(t.dataset.level)}):r==="bold"?i=n.isActive("bold"):r==="italic"?i=n.isActive("italic"):r==="strike"?i=n.isActive("strike"):r==="bulletList"?i=n.isActive("bulletList"):r==="orderedList"?i=n.isActive("orderedList"):r==="blockquote"&&(i=n.isActive("blockquote")),t.classList.toggle("is-active",i)})}function Ro(n,e,t,r){e.value=n.getHTML();let i=Po(n);t.value=(i==null?void 0:i.atchFileIdntfNo)||"",r.value=i!=null&&i.fileSn?String(i.fileSn):""}async function Gg(n,e,t){let r=new FormData;r.append("file",n),r.append("directory",e.uploadDirectory),r.append("description",e.uploadDescription);let i={},s=t.dataset.csrfHeader,o=t.dataset.csrfToken;s&&o&&(i[s]=o);let l=await fetch(e.uploadUrl,{method:"POST",headers:i,body:r});if(!l.ok)throw new Error("\uC774\uBBF8\uC9C0 \uC5C5\uB85C\uB4DC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.");return l.json()}function Yg(n,e){let t=e.dataset.currentThumbnailUrl||"",r=e.dataset.currentThumbnailAtchFileIdntfNo||"",i=st(e.dataset.currentThumbnailFileSn);if(!r||i<=0||Po(n))return;let s=qg(n,o=>o.attrs.atchFileIdntfNo===r&&st(o.attrs.fileSn)===i);if(s!==null){qu(n,s);return}t&&n.commands.insertContent({type:Tt,attrs:{src:t,alt:"\uB300\uD45C \uC774\uBBF8\uC9C0",atchFileIdntfNo:r,fileSn:i,isRepresentative:!0}})}function Xg(n,e,t){e.addEventListener("mousedown",r=>{r.target.closest("button[data-editor-action]")&&r.preventDefault()}),e.addEventListener("click",r=>{let i=r.target.closest("button[data-editor-action]");if(!i)return;let s=i.dataset.editorAction,o=n.chain().focus();if(s==="paragraph"){o.setParagraph().run();return}if(s==="heading"){o.toggleHeading({level:st(i.dataset.level)}).run();return}if(s==="bold"){o.toggleBold().run();return}if(s==="italic"){o.toggleItalic().run();return}if(s==="strike"){o.toggleStrike().run();return}if(s==="bulletList"){o.toggleBulletList().run();return}if(s==="orderedList"){o.toggleOrderedList().run();return}if(s==="blockquote"){o.toggleBlockquote().run();return}if(s==="horizontalRule"){o.setHorizontalRule().run();return}if(s==="undo"){o.undo().run();return}if(s==="redo"){o.redo().run();return}if(s==="imageUpload"){t.click();return}if(s==="setRepresentative"){let l=Jg(n);if(l===null){window.alert("\uB300\uD45C \uC774\uBBF8\uC9C0\uB85C \uC9C0\uC815\uD560 \uC774\uBBF8\uC9C0\uB97C \uBA3C\uC800 \uC120\uD0DD\uD574\uC8FC\uC138\uC694.");return}qu(n,l)}})}function Qg(n){let e=document.querySelector(n.formSelector),t=document.querySelector(n.editorSelector),r=document.querySelector(n.toolbarSelector),i=document.querySelector(n.hiddenInputSelector),s=document.querySelector(n.fileInputSelector),o=document.querySelector(n.representativeIdSelector),l=document.querySelector(n.representativeSnSelector);if(!e||!t||!r||!i||!s||!o||!l)return null;let a=new jc({element:t,extensions:[Uu,Ug],content:i.value||"

",editorProps:{attributes:{class:"ProseMirror"}},onCreate({editor:c}){Yg(c,e),Ro(c,i,o,l),Io(c,r)},onUpdate({editor:c}){Ro(c,i,o,l),Io(c,r)},onSelectionUpdate({editor:c}){Io(c,r)}});return Xg(a,r,s),s.addEventListener("change",async()=>{var u;if(!((u=s.files)!=null&&u.length))return;let[c]=s.files;try{let d=await Gg(c,n,e),f=!Po(a);a.chain().focus().insertContent({type:Tt,attrs:{src:d.url,alt:d.orgnlFileNm||c.name,atchFileIdntfNo:d.atchFileIdntfNo,fileSn:d.fileSn,isRepresentative:f}}).run()}catch(d){window.alert(d.message||"\uC774\uBBF8\uC9C0 \uC5C5\uB85C\uB4DC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.")}finally{s.value=""}}),e.addEventListener("submit",c=>{Ro(a,i,o,l),(!o.value||!l.value)&&(c.preventDefault(),window.alert("\uB300\uD45C \uC774\uBBF8\uC9C0\uB85C \uC9C0\uC815\uD560 \uBCF8\uBB38 \uC774\uBBF8\uC9C0\uB97C \uC120\uD0DD\uD574\uC8FC\uC138\uC694."))}),a}return ed(Zg);})(); +`),[s,o]=Sg(i);if(s.length===0)return;let l=Nu(s,0,t);return l.length===0?void 0:{type:"list",ordered:!0,start:((r=s[0])==null?void 0:r.number)||1,items:l,raw:i.slice(0,o).join(` +`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:n,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(wg,this.editor.getAttributes(Mu)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let n=Oe({find:wu,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(n=Oe({find:wu,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(Mu)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[n]}}),Cg=/^\s*(\[([( |x])?\])\s$/,vg=$.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:n=>{let e=n.getAttribute("data-checked");return e===""||e==="true"},renderHTML:n=>({"data-checked":n.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:n,HTMLAttributes:e}){return["li",D(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:n.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(n,e)=>{let t=[];if(n.tokens&&n.tokens.length>0?t.push(e.createNode("paragraph",{},e.parseInline(n.tokens))):n.text?t.push(e.createNode("paragraph",{},[e.createNode("text",{text:n.text})])):t.push(e.createNode("paragraph",{},[])),n.nestedTokens&&n.nestedTokens.length>0){let r=e.parseChildren(n.nestedTokens);t.push(...r)}return e.createNode("taskItem",{checked:n.checked||!1},t)},renderMarkdown:(n,e)=>{var t;let i=`- [${(t=n.attrs)!=null&&t.checked?"x":" "}] `;return Mn(n,e,i)},addKeyboardShortcuts(){let n={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...n,Tab:()=>this.editor.commands.sinkListItem(this.name)}:n},addNodeView(){return({node:n,HTMLAttributes:e,getPos:t,editor:r})=>{let i=document.createElement("li"),s=document.createElement("label"),o=document.createElement("span"),l=document.createElement("input"),a=document.createElement("div"),c=d=>{var f,h;l.ariaLabel=((h=(f=this.options.a11y)==null?void 0:f.checkboxLabel)==null?void 0:h.call(f,d,l.checked))||`Task item checkbox for ${d.textContent||"empty task item"}`};c(n),s.contentEditable="false",l.type="checkbox",l.addEventListener("mousedown",d=>d.preventDefault()),l.addEventListener("change",d=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){l.checked=!l.checked;return}let{checked:f}=d.target;r.isEditable&&typeof t=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:h})=>{let p=t();if(typeof p!="number")return!1;let m=h.doc.nodeAt(p);return h.setNodeMarkup(p,void 0,{...m==null?void 0:m.attrs,checked:f}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(n,f)||(l.checked=!l.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([d,f])=>{i.setAttribute(d,f)}),i.dataset.checked=n.attrs.checked,l.checked=n.attrs.checked,s.append(l,o),i.append(s,a),Object.entries(e).forEach(([d,f])=>{i.setAttribute(d,f)});let u=new Set(Object.keys(e));return{dom:i,contentDOM:a,update:d=>{if(d.type!==this.type)return!1;i.dataset.checked=d.attrs.checked,l.checked=d.attrs.checked,c(d);let f=r.extensionManager.attributes,h=Wt(d,f),p=new Set(Object.keys(h)),m=this.options.HTMLAttributes;return u.forEach(g=>{p.has(g)||(g in m?i.setAttribute(g,m[g]):i.removeAttribute(g))}),Object.entries(h).forEach(([g,y])=>{y==null?g in m?i.setAttribute(g,m[g]):i.removeAttribute(g):i.setAttribute(g,y)}),u=p,!0}}}},addInputRules(){return[Oe({find:Cg,type:this.type,getAttributes:n=>({checked:n[n.length-1]==="x"})})]}}),Tg=$.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:n}){return["ul",D(this.options.HTMLAttributes,n,{"data-type":this.name}),0]},parseMarkdown:(n,e)=>e.createNode("taskList",{},e.parseChildren(n.items||[])),renderMarkdown:(n,e)=>n.content?e.renderChildren(n.content,` +`):"",markdownTokenizer:{name:"taskList",level:"block",start(n){var e;let t=(e=n.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:e.index;return t!==void 0?t:-1},tokenize(n,e,t){let r=s=>{let o=Tr(s,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:l=>({indentLevel:l[1].length,mainContent:l[4],checked:l[3].toLowerCase()==="x"}),createToken:(l,a)=>({type:"taskItem",raw:"",mainContent:l.mainContent,indentLevel:l.indentLevel,checked:l.checked,text:l.mainContent,tokens:t.inlineTokens(l.mainContent),nestedTokens:a}),customNestedParser:r},t);return o?[{type:"taskList",raw:o.raw,items:o.items}]:t.blockTokens(s)},i=Tr(n,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:s=>({indentLevel:s[1].length,mainContent:s[4],checked:s[3].toLowerCase()==="x"}),createToken:(s,o)=>({type:"taskItem",raw:"",mainContent:s.mainContent,indentLevel:s.indentLevel,checked:s.checked,text:s.mainContent,tokens:t.inlineTokens(s.mainContent),nestedTokens:o}),customNestedParser:r},t);if(i)return{type:"taskList",raw:i.raw,items:i.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:n})=>n.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),lb=F.create({name:"listKit",addExtensions(){let n=[];return this.options.bulletList!==!1&&n.push(bo.configure(this.options.bulletList)),this.options.listItem!==!1&&n.push(xo.configure(this.options.listItem)),this.options.listKeymap!==!1&&n.push(Mo.configure(this.options.listKeymap)),this.options.orderedList!==!1&&n.push(wo.configure(this.options.orderedList)),this.options.taskItem!==!1&&n.push(vg.configure(this.options.taskItem)),this.options.taskList!==!1&&n.push(Tg.configure(this.options.taskList)),n}});var li=" ",Co="\xA0",Ou=$.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:n}){return["p",D(this.options.HTMLAttributes,n),0]},parseMarkdown:(n,e)=>{let t=n.tokens||[];if(t.length===1&&t[0].type==="image")return e.parseChildren([t[0]]);let r=e.parseInline(t);return t.length===1&&t[0].type==="text"&&(t[0].raw===li||t[0].text===li||t[0].raw===Co||t[0].text===Co)&&r.length===1&&r[0].type==="text"&&(r[0].text===li||r[0].text===Co)?e.createNode("paragraph",void 0,[]):e.createNode("paragraph",void 0,r)},renderMarkdown:(n,e,t)=>{var r,i;if(!n)return"";let s=Array.isArray(n.content)?n.content:[];if(s.length===0){let o=Array.isArray((r=t==null?void 0:t.previousNode)==null?void 0:r.content)?t.previousNode.content:[];return((i=t==null?void 0:t.previousNode)==null?void 0:i.type)==="paragraph"&&o.length===0?li:""}return e.renderChildren(s)},addCommands(){return{setParagraph:()=>({commands:n})=>n.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}});var Eg=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,Ag=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,Iu=me.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:n=>n.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["s",D(this.options.HTMLAttributes,n),0]},markdownTokenName:"del",parseMarkdown:(n,e)=>e.applyMark("strike",e.parseInline(n.tokens||[])),renderMarkdown:(n,e)=>`~~${e.renderChildren(n)}~~`,addCommands(){return{setStrike:()=>({commands:n})=>n.setMark(this.name),toggleStrike:()=>({commands:n})=>n.toggleMark(this.name),unsetStrike:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Ne({find:Eg,type:this.type})]},addPasteRules(){return[Se({find:Ag,type:this.type})]}});var Du=$.create({name:"text",group:"inline",parseMarkdown:n=>({type:"text",text:n.text||""}),renderMarkdown:n=>n.text||""});var Ru=me.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:n=>n.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["u",D(this.options.HTMLAttributes,n),0]},parseMarkdown(n,e){return e.applyMark(this.name||"underline",e.parseInline(n.tokens||[]))},renderMarkdown(n,e){return`++${e.renderChildren(n)}++`},markdownTokenizer:{name:"underline",level:"inline",start(n){return n.indexOf("++")},tokenize(n,e,t){let i=/^(\+\+)([\s\S]+?)(\+\+)/.exec(n);if(!i)return;let s=i[2].trim();return{type:"underline",raw:i[0],text:s,tokens:t.inlineTokens(s)}}},addCommands(){return{setUnderline:()=>({commands:n})=>n.setMark(this.name),toggleUnderline:()=>({commands:n})=>n.toggleMark(this.name),unsetUnderline:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});function Pu(n={}){return new O({view(e){return new vo(e,n)}})}var vo=class{constructor(e,t){var r;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=t.width)!==null&&r!==void 0?r:1,this.color=t.color===!1?void 0:t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map(i=>{let s=o=>{this[i](o)};return e.dom.addEventListener(i,s),{name:i,handler:s}})}destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){this.cursorPos!=null&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),t=!e.parent.inlineContent,r,i=this.editorView.dom,s=i.getBoundingClientRect(),o=s.width/i.offsetWidth,l=s.height/i.offsetHeight;if(t){let d=e.nodeBefore,f=e.nodeAfter;if(d||f){let h=this.editorView.nodeDOM(this.cursorPos-(d?d.nodeSize:0));if(h){let p=h.getBoundingClientRect(),m=d?p.bottom:p.top;d&&f&&(m=(m+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let g=this.width/2*l;r={left:p.left,right:p.right,top:m-g,bottom:m+g}}}}if(!r){let d=this.editorView.coordsAtPos(this.cursorPos),f=this.width/2*o;r={left:d.left-f,right:d.left+f,top:d.top,bottom:d.bottom}}let a=this.editorView.dom.offsetParent;this.element||(this.element=a.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",t),this.element.classList.toggle("prosemirror-dropcursor-inline",!t);let c,u;if(!a||a==document.body&&getComputedStyle(a).position=="static")c=-pageXOffset,u=-pageYOffset;else{let d=a.getBoundingClientRect(),f=d.width/a.offsetWidth,h=d.height/a.offsetHeight;c=d.left-a.scrollLeft*f,u=d.top-a.scrollTop*h}this.element.style.left=(r.left-c)/o+"px",this.element.style.top=(r.top-u)/l+"px",this.element.style.width=(r.right-r.left)/o+"px",this.element.style.height=(r.bottom-r.top)/l+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),r=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),i=r&&r.type.spec.disableDropCursor,s=typeof i=="function"?i(this.editorView,t,e):i;if(t&&!s){let o=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let l=Wn(this.editorView.state.doc,o,this.editorView.dragging.slice);l!=null&&(o=l)}this.setCursor(o),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}};var oe=class n extends N{constructor(e){super(e,e)}map(e,t){let r=e.resolve(t.map(this.head));return n.valid(r)?new n(r):N.near(r)}content(){return S.empty}eq(e){return e instanceof n&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new n(e.resolve(t.pos))}getBookmark(){return new To(this.anchor)}static valid(e){let t=e.parent;if(t.inlineContent||!Ng(e)||!Og(e))return!1;let r=t.type.spec.allowGapCursor;if(r!=null)return r;let i=t.contentMatchAt(e.index()).defaultType;return i&&i.isTextblock}static findGapCursorFrom(e,t,r=!1){e:for(;;){if(!r&&n.valid(e))return e;let i=e.pos,s=null;for(let o=e.depth;;o--){let l=e.node(o);if(t>0?e.indexAfter(o)0){s=l.child(t>0?e.indexAfter(o):e.index(o)-1);break}else if(o==0)return null;i+=t;let a=e.doc.resolve(i);if(n.valid(a))return a}for(;;){let o=t>0?s.firstChild:s.lastChild;if(!o){if(s.isAtom&&!s.isText&&!M.isSelectable(s)){e=e.doc.resolve(i+s.nodeSize*t),r=!1;continue e}break}s=o,i+=t;let l=e.doc.resolve(i);if(n.valid(l))return l}return null}}};oe.prototype.visible=!1;oe.findFrom=oe.findGapCursorFrom;N.jsonID("gapcursor",oe);var To=class n{constructor(e){this.pos=e}map(e){return new n(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return oe.valid(t)?new oe(t):N.near(t)}};function Lu(n){return n.isAtom||n.spec.isolating||n.spec.createGapCursor}function Ng(n){for(let e=n.depth;e>=0;e--){let t=n.index(e),r=n.node(e);if(t==0){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(t-1);;i=i.lastChild){if(i.childCount==0&&!i.inlineContent||Lu(i.type))return!0;if(i.inlineContent)return!1}}return!0}function Og(n){for(let e=n.depth;e>=0;e--){let t=n.indexAfter(e),r=n.node(e);if(t==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(t);;i=i.firstChild){if(i.childCount==0&&!i.inlineContent||Lu(i.type))return!0;if(i.inlineContent)return!1}}return!0}function zu(){return new O({props:{decorations:Pg,createSelectionBetween(n,e,t){return e.pos==t.pos&&oe.valid(t)?new oe(t):null},handleClick:Dg,handleKeyDown:Ig,handleDOMEvents:{beforeinput:Rg}}})}var Ig=Ns({ArrowLeft:ai("horiz",-1),ArrowRight:ai("horiz",1),ArrowUp:ai("vert",-1),ArrowDown:ai("vert",1)});function ai(n,e){let t=n=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,i,s){let o=r.selection,l=e>0?o.$to:o.$from,a=o.empty;if(o instanceof E){if(!s.endOfTextblock(t)||l.depth==0)return!1;a=!1,l=r.doc.resolve(e>0?l.after():l.before())}let c=oe.findGapCursorFrom(l,e,a);return c?(i&&i(r.tr.setSelection(new oe(c))),!0):!1}}function Dg(n,e,t){if(!n||!n.editable)return!1;let r=n.state.doc.resolve(e);if(!oe.valid(r))return!1;let i=n.posAtCoords({left:t.clientX,top:t.clientY});return i&&i.inside>-1&&M.isSelectable(n.state.doc.nodeAt(i.inside))?!1:(n.dispatch(n.state.tr.setSelection(new oe(r))),!0)}function Rg(n,e){if(e.inputType!="insertCompositionText"||!(n.state.selection instanceof oe))return!1;let{$from:t}=n.state.selection,r=t.parent.contentMatchAt(t.index()).findWrapping(n.state.schema.nodes.text);if(!r)return!1;let i=k.empty;for(let o=r.length-1;o>=0;o--)i=k.from(r[o].createAndFill(null,i));let s=n.state.tr.replace(t.pos,t.pos,new S(i,0,0));return s.setSelection(E.near(s.doc.resolve(t.pos+1))),n.dispatch(s),!1}function Pg(n){if(!(n.selection instanceof oe))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",W.create(n.doc,[se.widget(n.selection.head,e,{key:"gapcursor"})])}var ci=200,te=function(){};te.prototype.append=function(e){return e.length?(e=te.from(e),!this.length&&e||e.length=t?te.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))};te.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};te.prototype.forEach=function(e,t,r){t===void 0&&(t=0),r===void 0&&(r=this.length),t<=r?this.forEachInner(e,t,r,0):this.forEachInvertedInner(e,t,r,0)};te.prototype.map=function(e,t,r){t===void 0&&(t=0),r===void 0&&(r=this.length);var i=[];return this.forEach(function(s,o){return i.push(e(s,o))},t,r),i};te.from=function(e){return e instanceof te?e:e&&e.length?new Bu(e):te.empty};var Bu=(function(n){function e(r){n.call(this),this.values=r}n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e;var t={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(i,s){return i==0&&s==this.length?this:new e(this.values.slice(i,s))},e.prototype.getInner=function(i){return this.values[i]},e.prototype.forEachInner=function(i,s,o,l){for(var a=s;a=o;a--)if(i(this.values[a],l+a)===!1)return!1},e.prototype.leafAppend=function(i){if(this.length+i.length<=ci)return new e(this.values.concat(i.flatten()))},e.prototype.leafPrepend=function(i){if(this.length+i.length<=ci)return new e(i.flatten().concat(this.values))},t.length.get=function(){return this.values.length},t.depth.get=function(){return 0},Object.defineProperties(e.prototype,t),e})(te);te.empty=new Bu([]);var Lg=(function(n){function e(t,r){n.call(this),this.left=t,this.right=r,this.length=t.length+r.length,this.depth=Math.max(t.depth,r.depth)+1}return n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return rl&&this.right.forEachInner(r,Math.max(i-l,0),Math.min(this.length,s)-l,o+l)===!1)return!1},e.prototype.forEachInvertedInner=function(r,i,s,o){var l=this.left.length;if(i>l&&this.right.forEachInvertedInner(r,i-l,Math.max(s,l)-l,o+l)===!1||s=s?this.right.slice(r-s,i-s):this.left.slice(r,s).append(this.right.slice(0,i-s))},e.prototype.leafAppend=function(r){var i=this.right.leafAppend(r);if(i)return new e(this.left,i)},e.prototype.leafPrepend=function(r){var i=this.left.leafPrepend(r);if(i)return new e(i,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e})(te),Eo=te;var zg=500,vt=class n{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,s;t&&(i=this.remapping(r,this.items.length),s=i.maps.length);let o=e.tr,l,a,c=[],u=[];return this.items.forEach((d,f)=>{if(!d.step){i||(i=this.remapping(r,f+1),s=i.maps.length),s--,u.push(d);return}if(i){u.push(new Re(d.map));let h=d.step.map(i.slice(s)),p;h&&o.maybeStep(h).doc&&(p=o.mapping.maps[o.mapping.maps.length-1],c.push(new Re(p,void 0,void 0,c.length+u.length))),s--,p&&i.appendMap(p,s)}else o.maybeStep(d.step);if(d.selection)return l=i?d.selection.map(i.slice(s)):d.selection,a=new n(this.items.slice(0,r).append(u.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:a,transform:o,selection:l}}addTransform(e,t,r,i){let s=[],o=this.eventCount,l=this.items,a=!i&&l.length?l.get(l.length-1):null;for(let u=0;uFg&&(l=Bg(l,c),o-=c),new n(l.append(s),o)}remapping(e,t){let r=new tn;return this.items.forEach((i,s)=>{let o=i.mirrorOffset!=null&&s-i.mirrorOffset>=e?r.maps.length-i.mirrorOffset:void 0;r.appendMap(i.map,o)},e,t),r}addMaps(e){return this.eventCount==0?this:new n(this.items.append(e.map(t=>new Re(t))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-t),s=e.mapping,o=e.steps.length,l=this.eventCount;this.items.forEach(f=>{f.selection&&l--},i);let a=t;this.items.forEach(f=>{let h=s.getMirror(--a);if(h==null)return;o=Math.min(o,h);let p=s.maps[h];if(f.step){let m=e.steps[h].invert(e.docs[h]),g=f.selection&&f.selection.map(s.slice(a+1,h));g&&l++,r.push(new Re(p,m,g))}else r.push(new Re(p))},i);let c=[];for(let f=t;fzg&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),r=t.maps.length,i=[],s=0;return this.items.forEach((o,l)=>{if(l>=e)i.push(o),o.selection&&s++;else if(o.step){let a=o.step.map(t.slice(r)),c=a&&a.getMap();if(r--,c&&t.appendMap(c,r),a){let u=o.selection&&o.selection.map(t.slice(r));u&&s++;let d=new Re(c.invert(),a,u),f,h=i.length-1;(f=i.length&&i[h].merge(d))?i[h]=f:i.push(d)}}else o.map&&r--},this.items.length,0),new n(Eo.from(i.reverse()),s)}};vt.empty=new vt(Eo.empty,0);function Bg(n,e){let t;return n.forEach((r,i)=>{if(r.selection&&e--==0)return t=i,!1}),n.slice(t)}var Re=class n{constructor(e,t,r,i){this.map=e,this.step=t,this.selection=r,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new n(t.getMap().invert(),t,this.selection)}}},Pe=class{constructor(e,t,r,i,s){this.done=e,this.undone=t,this.prevRanges=r,this.prevTime=i,this.prevComposition=s}},Fg=20;function Hg(n,e,t,r){let i=t.getMeta(Ct),s;if(i)return i.historyState;t.getMeta(Vg)&&(n=new Pe(n.done,n.undone,null,0,-1));let o=t.getMeta("appendedTransaction");if(t.steps.length==0)return n;if(o&&o.getMeta(Ct))return o.getMeta(Ct).redo?new Pe(n.done.addTransform(t,void 0,r,ui(e)),n.undone,Fu(t.mapping.maps),n.prevTime,n.prevComposition):new Pe(n.done,n.undone.addTransform(t,void 0,r,ui(e)),null,n.prevTime,n.prevComposition);if(t.getMeta("addToHistory")!==!1&&!(o&&o.getMeta("addToHistory")===!1)){let l=t.getMeta("composition"),a=n.prevTime==0||!o&&n.prevComposition!=l&&(n.prevTime<(t.time||0)-r.newGroupDelay||!$g(t,n.prevRanges)),c=o?Ao(n.prevRanges,t.mapping):Fu(t.mapping.maps);return new Pe(n.done.addTransform(t,a?e.selection.getBookmark():void 0,r,ui(e)),vt.empty,c,t.time,l==null?n.prevComposition:l)}else return(s=t.getMeta("rebased"))?new Pe(n.done.rebased(t,s),n.undone.rebased(t,s),Ao(n.prevRanges,t.mapping),n.prevTime,n.prevComposition):new Pe(n.done.addMaps(t.mapping.maps),n.undone.addMaps(t.mapping.maps),Ao(n.prevRanges,t.mapping),n.prevTime,n.prevComposition)}function $g(n,e){if(!e)return!1;if(!n.docChanged)return!0;let t=!1;return n.mapping.maps[0].forEach((r,i)=>{for(let s=0;s=e[s]&&(t=!0)}),t}function Fu(n){let e=[];for(let t=n.length-1;t>=0&&e.length==0;t--)n[t].forEach((r,i,s,o)=>e.push(s,o));return e}function Ao(n,e){if(!n)return null;let t=[];for(let r=0;r{let i=Ct.getState(t);if(!i||(n?i.undone:i.done).eventCount==0)return!1;if(r){let s=_g(i,t,n);s&&r(e?s.scrollIntoView():s)}return!0}}var Oo=di(!1,!0),Io=di(!0,!0),Rb=di(!1,!1),Pb=di(!0,!1);var $b=F.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:n=>n.length,wordCounter:n=>n.split(" ").filter(e=>e!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=n=>{let e=(n==null?void 0:n.node)||this.editor.state.doc;if(((n==null?void 0:n.mode)||this.options.mode)==="textSize"){let r=e.textBetween(0,e.content.size,void 0," ");return this.options.textCounter(r)}return e.nodeSize},this.storage.words=n=>{let e=(n==null?void 0:n.node)||this.editor.state.doc,t=e.textBetween(0,e.content.size," "," ");return this.options.wordCounter(t)}},addProseMirrorPlugins(){let n=!1;return[new O({key:new P("characterCount"),appendTransaction:(e,t,r)=>{if(n)return;let i=this.options.limit;if(i==null||i===0){n=!0;return}let s=this.storage.characters({node:r.doc});if(s>i){let o=s-i,l=0,a=o;console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);let c=r.tr.deleteRange(l,a);return n=!0,c}n=!0},filterTransaction:(e,t)=>{let r=this.options.limit;if(!e.docChanged||r===0||r===null||r===void 0)return!0;let i=this.storage.characters({node:t.doc}),s=this.storage.characters({node:e.doc});if(s<=r||i>r&&s>r&&s<=i)return!0;if(i>r&&s>r&&s>i||!e.getMeta("paste"))return!1;let l=e.selection.$head.pos,a=s-r,c=l-a,u=l;return e.deleteRange(c,u),!(this.storage.characters({node:e.doc})>r)}})]}}),ju=F.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[Pu(this.options)]}}),Ub=F.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new O({key:new P("focus"),props:{decorations:({doc:n,selection:e})=>{let{isEditable:t,isFocused:r}=this.editor,{anchor:i}=e,s=[];if(!t||!r)return W.create(n,[]);let o=0;this.options.mode==="deepest"&&n.descendants((a,c)=>{if(a.isText)return;if(!(i>=c&&i<=c+a.nodeSize-1))return!1;o+=1});let l=0;return n.descendants((a,c)=>{if(a.isText||!(i>=c&&i<=c+a.nodeSize-1))return!1;if(l+=1,this.options.mode==="deepest"&&o-l>0||this.options.mode==="shallowest"&&l>1)return this.options.mode==="deepest";s.push(se.node(c,c+a.nodeSize,{class:this.options.className}))}),W.create(n,s)}}})]}}),Wu=F.create({name:"gapCursor",addProseMirrorPlugins(){return[zu()]},extendNodeSchema(n){var e;let t={name:n.name,options:n.options,storage:n.storage};return{allowGapCursor:(e=H(T(n,"allowGapCursor",t)))!=null?e:null}}}),_u="placeholder";function jg(n){return n.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}var Qb=F.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:_u,placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){let n=this.options.dataAttribute?`data-${jg(this.options.dataAttribute)}`:`data-${_u}`;return[new O({key:new P("placeholder"),props:{decorations:({doc:e,selection:t})=>{let r=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:i}=t,s=[];if(!r)return null;let o=this.editor.isEmpty;return e.descendants((l,a)=>{let c=i>=a&&i<=a+l.nodeSize,u=!l.isLeaf&&xn(l);if(!l.type.isTextblock)return this.options.includeChildren;if((c||!this.options.showOnlyCurrent)&&u){let d=[this.options.emptyNodeClass];o&&d.push(this.options.emptyEditorClass);let f=se.node(a,a+l.nodeSize,{class:d.join(" "),[n]:typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:l,pos:a,hasAnchor:c}):this.options.placeholder});s.push(f)}return this.options.includeChildren}),W.create(e,s)}}})]}}),nx=F.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){let{editor:n,options:e}=this;return[new O({key:new P("selection"),props:{decorations(t){return t.selection.empty||n.isFocused||!n.isEditable||Mr(t.selection)||n.view.dragging?null:W.create(t.doc,[se.inline(t.selection.from,t.selection.to,{class:e.className})])}}})]}}),Wg="skipTrailingNode";function Vu({types:n,node:e}){return e&&Array.isArray(n)&&n.includes(e.type)||(e==null?void 0:e.type)===n}var Ku=F.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var n;let e=new P(this.name),t=this.options.node||((n=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:n.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(([,i])=>i).filter(i=>(this.options.notAfter||[]).concat(t).includes(i.name));return[new O({key:e,appendTransaction:(i,s,o)=>{let{doc:l,tr:a,schema:c}=o,u=e.getState(o),d=l.content.size,f=c.nodes[t];if(!i.some(h=>h.getMeta(Wg))&&u)return a.insert(d,f.create())},state:{init:(i,s)=>{let o=s.tr.doc.lastChild;return!Vu({node:o,types:r})},apply:(i,s)=>{if(!i.docChanged||i.getMeta("__uniqueIDTransaction"))return s;let o=i.doc.lastChild;return!Vu({node:o,types:r})}}})]}}),Uu=F.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:n,dispatch:e})=>Oo(n,e),redo:()=>({state:n,dispatch:e})=>Io(n,e)}},addProseMirrorPlugins(){return[$u(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-\u044F":()=>this.editor.commands.undo(),"Shift-Mod-\u044F":()=>this.editor.commands.redo()}}});var Kg=F.create({name:"starterKit",addExtensions(){var n,e,t,r;let i=[];return this.options.bold!==!1&&i.push(Gc.configure(this.options.bold)),this.options.blockquote!==!1&&i.push(qc.configure(this.options.blockquote)),this.options.bulletList!==!1&&i.push(bo.configure(this.options.bulletList)),this.options.code!==!1&&i.push(Yc.configure(this.options.code)),this.options.codeBlock!==!1&&i.push(Xc.configure(this.options.codeBlock)),this.options.document!==!1&&i.push(Qc.configure(this.options.document)),this.options.dropcursor!==!1&&i.push(ju.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&i.push(Wu.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&i.push(Zc.configure(this.options.hardBreak)),this.options.heading!==!1&&i.push(eu.configure(this.options.heading)),this.options.undoRedo!==!1&&i.push(Uu.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&i.push(tu.configure(this.options.horizontalRule)),this.options.italic!==!1&&i.push(nu.configure(this.options.italic)),this.options.listItem!==!1&&i.push(xo.configure(this.options.listItem)),this.options.listKeymap!==!1&&i.push(Mo.configure((n=this.options)==null?void 0:n.listKeymap)),this.options.link!==!1&&i.push(ku.configure((e=this.options)==null?void 0:e.link)),this.options.orderedList!==!1&&i.push(wo.configure(this.options.orderedList)),this.options.paragraph!==!1&&i.push(Ou.configure(this.options.paragraph)),this.options.strike!==!1&&i.push(Iu.configure(this.options.strike)),this.options.text!==!1&&i.push(Du.configure(this.options.text)),this.options.underline!==!1&&i.push(Ru.configure((t=this.options)==null?void 0:t.underline)),this.options.trailingNode!==!1&&i.push(Ku.configure((r=this.options)==null?void 0:r.trailingNode)),i}}),Ju=Kg;var Ug=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,Jg=$.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{},resize:!1}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:n}){return["img",D(this.options.HTMLAttributes,n)]},parseMarkdown:(n,e)=>e.createNode("image",{src:n.href,title:n.title,alt:n.text}),renderMarkdown:n=>{var e,t,r,i,s,o;let l=(t=(e=n.attrs)==null?void 0:e.src)!=null?t:"",a=(i=(r=n.attrs)==null?void 0:r.alt)!=null?i:"",c=(o=(s=n.attrs)==null?void 0:s.title)!=null?o:"";return c?`![${a}](${l} "${c}")`:`![${a}](${l})`},addNodeView(){if(!this.options.resize||!this.options.resize.enabled||typeof document=="undefined")return null;let{directions:n,minWidth:e,minHeight:t,alwaysPreserveAspectRatio:r}=this.options.resize;return({node:i,getPos:s,HTMLAttributes:o,editor:l})=>{let a=document.createElement("img");Object.entries(o).forEach(([d,f])=>{if(f!=null)switch(d){case"width":case"height":break;default:a.setAttribute(d,f);break}}),a.src=o.src;let c=new Kc({element:a,editor:l,node:i,getPos:s,onResize:(d,f)=>{a.style.width=`${d}px`,a.style.height=`${f}px`},onCommit:(d,f)=>{let h=s();h!==void 0&&this.editor.chain().setNodeSelection(h).updateAttributes(this.name,{width:d,height:f}).run()},onUpdate:(d,f,h)=>d.type===i.type,options:{directions:n,min:{width:e,height:t},preserveAspectRatio:r===!0}}),u=c.dom;return u.style.visibility="hidden",u.style.pointerEvents="none",a.onload=()=>{u.style.visibility="",u.style.pointerEvents=""},c}},addCommands(){return{setImage:n=>({commands:e})=>e.insertContent({type:this.name,attrs:n})}},addInputRules(){return[vr({find:Ug,type:this.type,getAttributes:n=>{let[,,e,t,r]=n;return{src:t,alt:e,title:r}}})]}}),qu=Jg;var Tt="portfolioImage";function st(n){return Number.parseInt(String(n||"0"),10)||0}function Po(n){if(!n)return null;let e=String(n);try{e=new URL(e,window.location.origin).pathname}catch{}let t=e.match(/\/comn\/file\/view\/([^/?#]+)\/(\d+)/);return t?{atchFileIdntfNo:decodeURIComponent(t[1]),fileSn:st(t[2])}:null}var qg=qu.extend({name:Tt,group:"block",draggable:!0,selectable:!0,addAttributes(){var n;return{...(n=this.parent)==null?void 0:n.call(this),atchFileIdntfNo:{default:"",parseHTML:e=>{let t=Po(e.getAttribute("src"));return e.getAttribute("data-atch-file-idntf-no")||(t==null?void 0:t.atchFileIdntfNo)||""},renderHTML:e=>e.atchFileIdntfNo?{"data-atch-file-idntf-no":e.atchFileIdntfNo}:{}},fileSn:{default:0,parseHTML:e=>{var r;let t=st(e.getAttribute("data-file-sn"));return t>0?t:((r=Po(e.getAttribute("src")))==null?void 0:r.fileSn)||0},renderHTML:e=>e.fileSn>0?{"data-file-sn":String(e.fileSn)}:{}},isRepresentative:{default:!1,parseHTML:e=>e.getAttribute("data-is-representative")==="true",renderHTML:e=>e.isRepresentative?{"data-is-representative":"true"}:{}}}},parseHTML(){return[{tag:"img[src]"}]},renderHTML({HTMLAttributes:n}){return["img",D(this.options.HTMLAttributes,n)]},addNodeView(){return({node:n,editor:e,getPos:t})=>{let r=n,i=document.createElement("figure"),s=document.createElement("img");i.className="iotdoor-editor-image-node",i.appendChild(s);let o=a=>{if(a.preventDefault(),a.stopPropagation(),typeof t!="function")return;let c=t();if(typeof c!="number")return;let u=e.state.tr.setSelection(M.create(e.state.doc,c));e.view.dispatch(u),e.view.focus()},l=()=>{s.src=r.attrs.src||"",s.alt=r.attrs.alt||"",i.classList.toggle("is-representative",r.attrs.isRepresentative===!0)};return l(),i.addEventListener("mousedown",o),{dom:i,update(a){return a.type.name!==r.type.name?!1:(r=a,l(),!0)},selectNode(){i.classList.add("ProseMirror-selectednode")},deselectNode(){i.classList.remove("ProseMirror-selectednode")},destroy(){i.removeEventListener("mousedown",o)}}}}});function Gg(n){let{selection:e}=n.state;return e instanceof M&&e.node.type.name===Tt?e.from:null}function Lo(n){let e=null;return n.state.doc.descendants(t=>t.type.name!==Tt?!0:t.attrs.isRepresentative?(e=t.attrs,!1):!0),e}function Yg(n,e){let t=null;return n.state.doc.descendants((r,i)=>r.type.name!==Tt?!0:e(r,i)?(t=i,!1):!0),t}function Gu(n,e){let t=n.state.tr,r=!1;return n.state.doc.descendants((i,s)=>{if(i.type.name!==Tt)return!0;let o=s===e,l=Po(i.attrs.src),a=i.attrs.atchFileIdntfNo||(l==null?void 0:l.atchFileIdntfNo)||"",c=st(i.attrs.fileSn)||(l==null?void 0:l.fileSn)||0,u={...i.attrs,atchFileIdntfNo:a,fileSn:c,isRepresentative:o};return(!!i.attrs.isRepresentative!==o||i.attrs.atchFileIdntfNo!==a||st(i.attrs.fileSn)!==c)&&(t.setNodeMarkup(s,void 0,u),r=!0),!0}),r&&n.view.dispatch(t),r}function Do(n,e){e.querySelectorAll("button[data-editor-action]").forEach(t=>{let r=t.dataset.editorAction,i=!1;r==="paragraph"?i=n.isActive("paragraph"):r==="heading"?i=n.isActive("heading",{level:st(t.dataset.level)}):r==="bold"?i=n.isActive("bold"):r==="italic"?i=n.isActive("italic"):r==="strike"?i=n.isActive("strike"):r==="bulletList"?i=n.isActive("bulletList"):r==="orderedList"?i=n.isActive("orderedList"):r==="blockquote"&&(i=n.isActive("blockquote")),t.classList.toggle("is-active",i)})}function Ro(n,e,t,r){e.value=n.getHTML();let i=Lo(n);t.value=(i==null?void 0:i.atchFileIdntfNo)||"",r.value=i!=null&&i.fileSn?String(i.fileSn):""}async function Xg(n,e,t){let r=new FormData;r.append("file",n),r.append("directory",e.uploadDirectory),r.append("description",e.uploadDescription);let i={},s=t.dataset.csrfHeader,o=t.dataset.csrfToken;s&&o&&(i[s]=o);let l=await fetch(e.uploadUrl,{method:"POST",headers:i,body:r});if(!l.ok)throw new Error("\uC774\uBBF8\uC9C0 \uC5C5\uB85C\uB4DC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.");return l.json()}function Qg(n){var e;return n?(e=n.type)!=null&&e.startsWith("image/")?!0:/\.(avif|bmp|gif|jpe?g|png|svg|webp)$/i.test(n.name||""):!1}function fi(n){var e;return n?Array.from(n.types||[]).includes("Files")||Array.from(n.items||[]).some(t=>t.kind==="file")||(((e=n.files)==null?void 0:e.length)||0)>0:!1}function Zg(n){return Array.from(n||[]).filter(Qg)}function ey(n,e){let t=n.view.posAtCoords({left:e.clientX,top:e.clientY});return typeof(t==null?void 0:t.pos)!="number"?null:Math.max(0,Math.min(t.pos,n.state.doc.content.size))}function ty(n,e,t){return{type:Tt,attrs:{src:n.url,alt:n.orgnlFileNm||e.name,atchFileIdntfNo:n.atchFileIdntfNo,fileSn:n.fileSn,isRepresentative:t}}}function ny(n,e,t){if(!e.length)return;let r=n.chain().focus();if(typeof t=="number"){r.insertContentAt(t,e).run();return}r.insertContent(e).run()}async function Yu(n,e,t,r,i,s){let o=Zg(n);if(!o.length){window.alert("\uC774\uBBF8\uC9C0 \uD30C\uC77C\uB9CC \uC5C5\uB85C\uB4DC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.");return}s==null||s.classList.add("is-uploading-image");try{let l=[],a=!Lo(e);for(let c of o){let u=await Xg(c,t,r);l.push(ty(u,c,a)),a=!1}ny(e,l,i)}catch(l){window.alert(l.message||"\uC774\uBBF8\uC9C0 \uC5C5\uB85C\uB4DC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.")}finally{s==null||s.classList.remove("is-uploading-image")}}function ry(n,e){let t=e.dataset.currentThumbnailUrl||"",r=e.dataset.currentThumbnailAtchFileIdntfNo||"",i=st(e.dataset.currentThumbnailFileSn);if(!r||i<=0||Lo(n))return;let s=Yg(n,o=>o.attrs.atchFileIdntfNo===r&&st(o.attrs.fileSn)===i);if(s!==null){Gu(n,s);return}t&&n.commands.insertContent({type:Tt,attrs:{src:t,alt:"\uB300\uD45C \uC774\uBBF8\uC9C0",atchFileIdntfNo:r,fileSn:i,isRepresentative:!0}})}function iy(n,e,t){e.addEventListener("mousedown",r=>{r.target.closest("button[data-editor-action]")&&r.preventDefault()}),e.addEventListener("click",r=>{let i=r.target.closest("button[data-editor-action]");if(!i)return;let s=i.dataset.editorAction,o=n.chain().focus();if(s==="paragraph"){o.setParagraph().run();return}if(s==="heading"){o.toggleHeading({level:st(i.dataset.level)}).run();return}if(s==="bold"){o.toggleBold().run();return}if(s==="italic"){o.toggleItalic().run();return}if(s==="strike"){o.toggleStrike().run();return}if(s==="bulletList"){o.toggleBulletList().run();return}if(s==="orderedList"){o.toggleOrderedList().run();return}if(s==="blockquote"){o.toggleBlockquote().run();return}if(s==="horizontalRule"){o.setHorizontalRule().run();return}if(s==="undo"){o.undo().run();return}if(s==="redo"){o.redo().run();return}if(s==="imageUpload"){t.click();return}if(s==="setRepresentative"){let l=Gg(n);if(l===null){window.alert("\uB300\uD45C \uC774\uBBF8\uC9C0\uB85C \uC9C0\uC815\uD560 \uC774\uBBF8\uC9C0\uB97C \uBA3C\uC800 \uC120\uD0DD\uD574\uC8FC\uC138\uC694.");return}Gu(n,l)}})}function sy(n,e,t,r){let i=0,s=()=>{i=0,e.classList.remove("is-dragging-image")},o=u=>{fi(u.dataTransfer)&&(i+=1,e.classList.add("is-dragging-image"),u.preventDefault())},l=u=>{fi(u.dataTransfer)&&(u.preventDefault(),u.dataTransfer.dropEffect="copy")},a=u=>{fi(u.dataTransfer)&&(i-=1,(i<=0||!e.contains(u.relatedTarget))&&s())},c=u=>{if(!fi(u.dataTransfer))return;u.preventDefault(),u.stopPropagation(),s();let d=ey(n,u);Yu(u.dataTransfer.files,n,t,r,d,e)};e.addEventListener("dragenter",o,!0),e.addEventListener("dragover",l,!0),e.addEventListener("dragleave",a,!0),e.addEventListener("drop",c,!0)}function oy(n){let e=document.querySelector(n.formSelector),t=document.querySelector(n.editorSelector),r=document.querySelector(n.toolbarSelector),i=document.querySelector(n.hiddenInputSelector),s=document.querySelector(n.fileInputSelector),o=document.querySelector(n.representativeIdSelector),l=document.querySelector(n.representativeSnSelector);if(!e||!t||!r||!i||!s||!o||!l)return null;let a=new Wc({element:t,extensions:[Ju,qg],content:i.value||"

",editorProps:{attributes:{class:"ProseMirror"}},onCreate({editor:c}){ry(c,e),Ro(c,i,o,l),Do(c,r)},onUpdate({editor:c}){Ro(c,i,o,l),Do(c,r)},onSelectionUpdate({editor:c}){Do(c,r)}});return iy(a,r,s),sy(a,t,n,e),s.addEventListener("change",async()=>{var c;if((c=s.files)!=null&&c.length)try{await Yu(s.files,a,n,e,null,t)}finally{s.value=""}}),e.addEventListener("submit",c=>{Ro(a,i,o,l),(!o.value||!l.value)&&(c.preventDefault(),window.alert("\uB300\uD45C \uC774\uBBF8\uC9C0\uB85C \uC9C0\uC815\uD560 \uBCF8\uBB38 \uC774\uBBF8\uC9C0\uB97C \uC120\uD0DD\uD574\uC8FC\uC138\uC694."))}),a}return nd(ly);})(); diff --git a/src/main/resources/static/resources/kr/iotdoor/cmty/portfolio/portfolio-post-list.css b/src/main/resources/static/resources/kr/iotdoor/cmty/portfolio/portfolio-post-list.css new file mode 100644 index 0000000..acf659a --- /dev/null +++ b/src/main/resources/static/resources/kr/iotdoor/cmty/portfolio/portfolio-post-list.css @@ -0,0 +1,344 @@ +.portfolio-post-list-panel { + background: #ffffff; + color: #202124; +} + +.portfolio-post-list-bar { + display: flex; + align-items: center; + justify-content: space-between; + gap: 1rem; + padding: 0 0 14px; +} + +.portfolio-post-list-summary { + display: inline-flex; + align-items: baseline; + gap: 0.35rem; + font-size: 0.95rem; +} + +.portfolio-post-list-summary a { + color: #111111; + font-weight: 500; + text-decoration: none; +} + +.portfolio-post-list-summary span { + color: #333333; +} + +.portfolio-post-list-toggle { + border: 0; + background: transparent; + color: #111111; + font-size: 0.95rem; + font-weight: 500; + line-height: 1; + padding: 0; +} + +.portfolio-post-list-toggle:hover, +.portfolio-post-list-toggle:focus-visible { + color: #1f5aa0; +} + +.portfolio-post-list-body { + border-top: 1px solid #d5d9df; +} + +.portfolio-post-list-grid { + width: 100%; + height: auto; + min-height: 0; +} + +.portfolio-post-list-grid.ag-theme-quartz { + --ag-font-family: "Noto Sans KR", "Helvetica Neue", Helvetica, Arial, sans-serif; + --ag-font-size: 14px; + --ag-foreground-color: #111111; + --ag-secondary-foreground-color: #94979d; + --ag-header-background-color: #ffffff; + --ag-header-foreground-color: #8c9097; + --ag-row-hover-color: #fafafa; + --ag-selected-row-background-color: #ffffff; + --ag-border-color: transparent; + --ag-row-border-color: #e6e6e6; + --ag-wrapper-border-radius: 0; + --ag-cell-horizontal-padding: 10px; +} + +.portfolio-post-list-grid .ag-root-wrapper, +.portfolio-post-list-grid .ag-root, +.portfolio-post-list-grid .ag-body-viewport, +.portfolio-post-list-grid .ag-center-cols-viewport { + border: 0; + border-radius: 0; +} + +.portfolio-post-list-grid .ag-header { + border-bottom: 1px solid #9da3ad; +} + +.portfolio-post-list-grid .ag-header-cell { + padding-inline: 10px; +} + +.portfolio-post-list-grid .ag-header-cell-label { + font-weight: 400; +} + +.portfolio-post-number-header .ag-header-cell-label { + justify-content: flex-end; +} + +.portfolio-post-date-header .ag-header-cell-label { + justify-content: center; +} + +.portfolio-post-list-grid .ag-header-cell-resize, +.portfolio-post-list-grid .ag-sort-indicator-container { + display: none; +} + +.portfolio-post-list-grid .ag-row { + border-bottom: 1px solid #e6e6e6; +} + +.portfolio-post-list-grid .ag-cell { + display: flex; + align-items: center; + border: 0; + padding-inline: 10px; +} + +.portfolio-post-list-grid .ag-row-current-post { + font-weight: 700; +} + +.portfolio-post-number-cell { + justify-content: flex-end; +} + +.portfolio-post-date-cell { + justify-content: center; + color: #111111; +} + +.portfolio-post-title-link { + display: inline-block; + max-width: 100%; + overflow: hidden; + color: #111111; + text-decoration: none; + text-overflow: ellipsis; + vertical-align: middle; + white-space: nowrap; +} + +.portfolio-post-title-link:hover { + color: #111111; + text-decoration: underline; +} + +.portfolio-post-list-footer { + display: grid; + grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); + align-items: start; + gap: 1rem; + padding-top: 12px; +} + +.portfolio-post-list-footer-side { + min-height: 32px; +} + +.portfolio-post-page-size-wrap { + display: flex; + justify-content: flex-end; +} + +.portfolio-post-manage-link { + display: inline-flex; + align-items: center; + min-height: 32px; + border: 1px solid #d8d8d8; + background: #ffffff; + color: #333333; + padding: 0.35rem 0.85rem; + font-size: 0.875rem; + text-decoration: none; +} + +.portfolio-post-manage-link:hover { + border-color: #aaaaaa; + color: #111111; +} + +.portfolio-post-pagination { + display: flex; + align-items: center; + justify-content: center; + gap: 0.35rem; + min-height: 32px; +} + +.portfolio-post-page-button { + min-width: 28px; + height: 28px; + border: 0; + background: transparent; + color: #111111; + font-size: 0.875rem; + line-height: 1; + padding: 0 0.35rem; +} + +.portfolio-post-page-button:hover, +.portfolio-post-page-button:focus-visible { + color: #1f5aa0; +} + +.portfolio-post-page-button.is-active { + border: 1px solid #dddddd; + background: #ffffff; + font-weight: 700; +} + +.portfolio-post-page-size { + min-width: 106px; + height: 32px; + border: 1px solid #d8d8d8; + background: #ffffff; + color: #111111; + font-size: 0.875rem; + padding: 0 2rem 0 0.75rem; +} + +@media (max-width: 575.98px) { + .portfolio-post-list-bar { + align-items: flex-start; + flex-direction: column; + } + + .portfolio-post-list-toggle { + align-self: flex-end; + } + + .portfolio-post-list-footer { + grid-template-columns: 1fr; + } + + .portfolio-post-page-size-wrap { + justify-content: flex-start; + } +} + +.portfolio-frame-card { + display: flex; + flex-direction: column; + width: 100%; + height: 520px; + overflow: hidden; + border-radius: 0.25rem; + background: #ffffff; + box-shadow: 0 0 45px rgba(0, 0, 0, 0.08); + color: inherit; + cursor: pointer; + text-decoration: none; +} + +.portfolio-frame-card:hover { + color: inherit; + text-decoration: none; +} + +.portfolio-frame-card:focus-visible { + outline: 3px solid rgba(31, 90, 160, 0.35); + outline-offset: 3px; +} + +.portfolio-frame-image-link { + display: block; + flex: 0 0 285px; + width: 100%; + overflow: hidden; + background: #f8f9fa; + text-decoration: none; +} + +.portfolio-frame-image { + display: block; + width: 100%; + height: 285px; + object-fit: cover; + transition: transform 0.35s ease; +} + +.portfolio-frame-card:hover .portfolio-frame-image, +.portfolio-frame-card:focus-visible .portfolio-frame-image { + transform: scale(1.1); +} + +.portfolio-frame-body { + display: flex; + flex: 1 1 auto; + flex-direction: column; + justify-content: flex-end; + min-height: 0; + padding: 1.5rem; +} + +.portfolio-frame-meta { + display: flex; + align-items: center; + justify-content: space-between; + gap: 1rem; + margin-bottom: 0.75rem; + color: #667085; + font-size: 0.875rem; +} + +.portfolio-frame-title { + display: -webkit-box; + min-height: 3.1rem; + margin: 0 0 0.9rem; + overflow: hidden; + color: #101828; + font-size: 1.25rem; + font-weight: 600; + line-height: 1.25; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; +} + +.portfolio-frame-card:hover .portfolio-frame-title, +.portfolio-frame-card:focus-visible .portfolio-frame-title { + color: #1f5aa0; +} + +.portfolio-frame-summary { + display: -webkit-box; + min-height: 5.4rem; + margin: 0; + overflow: hidden; + color: #667085; + font-size: 1rem; + line-height: 1.8; + -webkit-box-orient: vertical; + -webkit-line-clamp: 3; +} + +@media (max-width: 767.98px) { + .portfolio-frame-card { + height: 500px; + } + + .portfolio-frame-image-link { + flex-basis: 265px; + } + + .portfolio-frame-image { + height: 265px; + } +} diff --git a/src/main/resources/static/resources/kr/iotdoor/cmty/portfolio/portfolio-public.css b/src/main/resources/static/resources/kr/iotdoor/cmty/portfolio/portfolio-public.css new file mode 100644 index 0000000..2b18833 --- /dev/null +++ b/src/main/resources/static/resources/kr/iotdoor/cmty/portfolio/portfolio-public.css @@ -0,0 +1 @@ +.ag-filter-panel-buttons{display:flex;justify-content:flex-end;overflow:hidden;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding) 0;flex-wrap:wrap;gap:var(--ag-widget-vertical-spacing) var(--ag-widget-horizontal-spacing)}.ag-filter-panel-buttons-button{line-height:1.5}.ag-filter-panel .ag-standard-button.ag-filter-panel-buttons-apply-button{color:var(--ag-filter-panel-apply-button-color);background-color:var(--ag-filter-panel-apply-button-background-color)}.ag-filter-panel>*:where(:last-child){padding-bottom:var(--ag-widget-container-vertical-padding)}.ag-row.ag-row-pinned-source{color:var(--ag-pinned-source-row-text-color);background-color:var(--ag-pinned-source-row-background-color);font-weight:var(--ag-pinned-source-row-font-weight)}.ag-row.ag-row-pinned{color:var(--ag-pinned-row-text-color);background-color:var(--ag-pinned-row-background-color);font-weight:var(--ag-pinned-row-font-weight)}.ag-floating-top-viewport{border-bottom:var(--ag-pinned-row-border)}.ag-floating-bottom-viewport{border-top:var(--ag-pinned-row-border)}.ag-measurement-container{--ag-legacy-styles-loaded: "true"}.ag-icon{font-family:var(--ag-icon-font-family);font-weight:var(--ag-icon-font-weight);color:var(--ag-icon-font-color);font-size:var(--ag-icon-size);line-height:var(--ag-icon-size);font-style:normal;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:var(--ag-icon-size);height:var(--ag-icon-size);position:relative}.ag-icon:before{content:"";font-family:inherit}.ag-icon:after{background:transparent var(--ag-icon-image, none) center/contain no-repeat;display:var(--ag-icon-image-display);opacity:var(--ag-icon-image-opacity, .9);position:absolute;inset:0;content:""}.ag-icon-aggregation{font-family:var(--ag-icon-font-family-aggregation, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-aggregation, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-aggregation, var(--ag-icon-font-color))}.ag-icon-aggregation:before{content:var(--ag-icon-font-code-aggregation, "\f101");display:var(--ag-icon-font-display-aggregation, var(--ag-icon-font-display))}.ag-icon-aggregation:after{background-image:var(--ag-icon-image-aggregation, var(--ag-icon-image));display:var(--ag-icon-image-display-aggregation, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-aggregation, var(--ag-icon-image-opacity, .9))}.ag-icon-arrows{font-family:var(--ag-icon-font-family-arrows, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-arrows, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-arrows, var(--ag-icon-font-color))}.ag-icon-arrows:before{content:var(--ag-icon-font-code-arrows, "\f102");display:var(--ag-icon-font-display-arrows, var(--ag-icon-font-display))}.ag-icon-arrows:after{background-image:var(--ag-icon-image-arrows, var(--ag-icon-image));display:var(--ag-icon-image-display-arrows, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-arrows, var(--ag-icon-image-opacity, .9))}.ag-icon-asc{font-family:var(--ag-icon-font-family-asc, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-asc, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-asc, var(--ag-icon-font-color))}.ag-icon-asc:before{content:var(--ag-icon-font-code-asc, "\f103");display:var(--ag-icon-font-display-asc, var(--ag-icon-font-display))}.ag-icon-asc:after{background-image:var(--ag-icon-image-asc, var(--ag-icon-image));display:var(--ag-icon-image-display-asc, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-asc, var(--ag-icon-image-opacity, .9))}.ag-icon-aasc{font-family:var(--ag-icon-font-family-aasc, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-aasc, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-aasc, var(--ag-icon-font-color))}.ag-icon-aasc:before{content:var(--ag-icon-font-code-aasc, "\f13c");display:var(--ag-icon-font-display-aasc, var(--ag-icon-font-display))}.ag-icon-aasc:after{background-image:var(--ag-icon-image-aasc, var(--ag-icon-image));display:var(--ag-icon-image-display-aasc, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-aasc, var(--ag-icon-image-opacity, .9))}.ag-icon-adesc{font-family:var(--ag-icon-font-family-adesc, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-adesc, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-adesc, var(--ag-icon-font-color))}.ag-icon-adesc:before{content:var(--ag-icon-font-code-adesc, "\f13d");display:var(--ag-icon-font-display-adesc, var(--ag-icon-font-display))}.ag-icon-adesc:after{background-image:var(--ag-icon-image-adesc, var(--ag-icon-image));display:var(--ag-icon-image-display-adesc, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-adesc, var(--ag-icon-image-opacity, .9))}.ag-icon-cancel{font-family:var(--ag-icon-font-family-cancel, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-cancel, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-cancel, var(--ag-icon-font-color))}.ag-icon-cancel:before{content:var(--ag-icon-font-code-cancel, "\f104");display:var(--ag-icon-font-display-cancel, var(--ag-icon-font-display))}.ag-icon-cancel:after{background-image:var(--ag-icon-image-cancel, var(--ag-icon-image));display:var(--ag-icon-image-display-cancel, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-cancel, var(--ag-icon-image-opacity, .9))}.ag-icon-chart{font-family:var(--ag-icon-font-family-chart, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-chart, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-chart, var(--ag-icon-font-color))}.ag-icon-chart:before{content:var(--ag-icon-font-code-chart, "\f105");display:var(--ag-icon-font-display-chart, var(--ag-icon-font-display))}.ag-icon-chart:after{background-image:var(--ag-icon-image-chart, var(--ag-icon-image));display:var(--ag-icon-image-display-chart, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-chart, var(--ag-icon-image-opacity, .9))}.ag-icon-checkbox-checked{font-family:var(--ag-icon-font-family-checkbox-checked, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-checkbox-checked, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-checkbox-checked, var(--ag-icon-font-color))}.ag-icon-checkbox-checked:before{content:var(--ag-icon-font-code-checkbox-checked, "\f106");display:var(--ag-icon-font-display-checkbox-checked, var(--ag-icon-font-display))}.ag-icon-checkbox-checked:after{background-image:var(--ag-icon-image-checkbox-checked, var(--ag-icon-image));display:var(--ag-icon-image-display-checkbox-checked, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-checkbox-checked, var(--ag-icon-image-opacity, .9))}.ag-icon-checkbox-indeterminate{font-family:var(--ag-icon-font-family-checkbox-indeterminate, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-checkbox-indeterminate, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-checkbox-indeterminate, var(--ag-icon-font-color))}.ag-icon-checkbox-indeterminate:before{content:var(--ag-icon-font-code-checkbox-indeterminate, "\f107");display:var(--ag-icon-font-display-checkbox-indeterminate, var(--ag-icon-font-display))}.ag-icon-checkbox-indeterminate:after{background-image:var(--ag-icon-image-checkbox-indeterminate, var(--ag-icon-image));display:var(--ag-icon-image-display-checkbox-indeterminate, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-checkbox-indeterminate, var(--ag-icon-image-opacity, .9))}.ag-icon-checkbox-unchecked{font-family:var(--ag-icon-font-family-checkbox-unchecked, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-checkbox-unchecked, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-checkbox-unchecked, var(--ag-icon-font-color))}.ag-icon-checkbox-unchecked:before{content:var(--ag-icon-font-code-checkbox-unchecked, "\f108");display:var(--ag-icon-font-display-checkbox-unchecked, var(--ag-icon-font-display))}.ag-icon-checkbox-unchecked:after{background-image:var(--ag-icon-image-checkbox-unchecked, var(--ag-icon-image));display:var(--ag-icon-image-display-checkbox-unchecked, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-checkbox-unchecked, var(--ag-icon-image-opacity, .9))}.ag-icon-color-picker{font-family:var(--ag-icon-font-family-color-picker, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-color-picker, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-color-picker, var(--ag-icon-font-color))}.ag-icon-color-picker:before{content:var(--ag-icon-font-code-color-picker, "\f109");display:var(--ag-icon-font-display-color-picker, var(--ag-icon-font-display))}.ag-icon-color-picker:after{background-image:var(--ag-icon-image-color-picker, var(--ag-icon-image));display:var(--ag-icon-image-display-color-picker, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-color-picker, var(--ag-icon-image-opacity, .9))}.ag-icon-columns{font-family:var(--ag-icon-font-family-columns, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-columns, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-columns, var(--ag-icon-font-color))}.ag-icon-columns:before{content:var(--ag-icon-font-code-columns, "\f10a");display:var(--ag-icon-font-display-columns, var(--ag-icon-font-display))}.ag-icon-columns:after{background-image:var(--ag-icon-image-columns, var(--ag-icon-image));display:var(--ag-icon-image-display-columns, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-columns, var(--ag-icon-image-opacity, .9))}.ag-icon-contracted{font-family:var(--ag-icon-font-family-contracted, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-contracted, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-contracted, var(--ag-icon-font-color))}.ag-icon-contracted:before{content:var(--ag-icon-font-code-contracted, "\f10b");display:var(--ag-icon-font-display-contracted, var(--ag-icon-font-display))}.ag-icon-contracted:after{background-image:var(--ag-icon-image-contracted, var(--ag-icon-image));display:var(--ag-icon-image-display-contracted, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-contracted, var(--ag-icon-image-opacity, .9))}.ag-icon-copy{font-family:var(--ag-icon-font-family-copy, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-copy, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-copy, var(--ag-icon-font-color))}.ag-icon-copy:before{content:var(--ag-icon-font-code-copy, "\f10c");display:var(--ag-icon-font-display-copy, var(--ag-icon-font-display))}.ag-icon-copy:after{background-image:var(--ag-icon-image-copy, var(--ag-icon-image));display:var(--ag-icon-image-display-copy, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-copy, var(--ag-icon-image-opacity, .9))}.ag-icon-cross{font-family:var(--ag-icon-font-family-cross, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-cross, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-cross, var(--ag-icon-font-color))}.ag-icon-cross:before{content:var(--ag-icon-font-code-cross, "\f10d");display:var(--ag-icon-font-display-cross, var(--ag-icon-font-display))}.ag-icon-cross:after{background-image:var(--ag-icon-image-cross, var(--ag-icon-image));display:var(--ag-icon-image-display-cross, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-cross, var(--ag-icon-image-opacity, .9))}.ag-icon-csv{font-family:var(--ag-icon-font-family-csv, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-csv, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-csv, var(--ag-icon-font-color))}.ag-icon-csv:before{content:var(--ag-icon-font-code-csv, "\f10e");display:var(--ag-icon-font-display-csv, var(--ag-icon-font-display))}.ag-icon-csv:after{background-image:var(--ag-icon-image-csv, var(--ag-icon-image));display:var(--ag-icon-image-display-csv, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-csv, var(--ag-icon-image-opacity, .9))}.ag-icon-cut{font-family:var(--ag-icon-font-family-cut, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-cut, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-cut, var(--ag-icon-font-color))}.ag-icon-cut:before{content:var(--ag-icon-font-code-cut, "\f10f");display:var(--ag-icon-font-display-cut, var(--ag-icon-font-display))}.ag-icon-cut:after{background-image:var(--ag-icon-image-cut, var(--ag-icon-image));display:var(--ag-icon-image-display-cut, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-cut, var(--ag-icon-image-opacity, .9))}.ag-icon-desc{font-family:var(--ag-icon-font-family-desc, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-desc, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-desc, var(--ag-icon-font-color))}.ag-icon-desc:before{content:var(--ag-icon-font-code-desc, "\f110");display:var(--ag-icon-font-display-desc, var(--ag-icon-font-display))}.ag-icon-desc:after{background-image:var(--ag-icon-image-desc, var(--ag-icon-image));display:var(--ag-icon-image-display-desc, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-desc, var(--ag-icon-image-opacity, .9))}.ag-icon-excel{font-family:var(--ag-icon-font-family-excel, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-excel, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-excel, var(--ag-icon-font-color))}.ag-icon-excel:before{content:var(--ag-icon-font-code-excel, "\f111");display:var(--ag-icon-font-display-excel, var(--ag-icon-font-display))}.ag-icon-excel:after{background-image:var(--ag-icon-image-excel, var(--ag-icon-image));display:var(--ag-icon-image-display-excel, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-excel, var(--ag-icon-image-opacity, .9))}.ag-icon-expanded{font-family:var(--ag-icon-font-family-expanded, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-expanded, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-expanded, var(--ag-icon-font-color))}.ag-icon-expanded:before{content:var(--ag-icon-font-code-expanded, "\f112");display:var(--ag-icon-font-display-expanded, var(--ag-icon-font-display))}.ag-icon-expanded:after{background-image:var(--ag-icon-image-expanded, var(--ag-icon-image));display:var(--ag-icon-image-display-expanded, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-expanded, var(--ag-icon-image-opacity, .9))}.ag-icon-eye-slash{font-family:var(--ag-icon-font-family-eye-slash, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-eye-slash, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-eye-slash, var(--ag-icon-font-color))}.ag-icon-eye-slash:before{content:var(--ag-icon-font-code-eye-slash, "\f113");display:var(--ag-icon-font-display-eye-slash, var(--ag-icon-font-display))}.ag-icon-eye-slash:after{background-image:var(--ag-icon-image-eye-slash, var(--ag-icon-image));display:var(--ag-icon-image-display-eye-slash, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-eye-slash, var(--ag-icon-image-opacity, .9))}.ag-icon-eye{font-family:var(--ag-icon-font-family-eye, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-eye, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-eye, var(--ag-icon-font-color))}.ag-icon-eye:before{content:var(--ag-icon-font-code-eye, "\f114");display:var(--ag-icon-font-display-eye, var(--ag-icon-font-display))}.ag-icon-eye:after{background-image:var(--ag-icon-image-eye, var(--ag-icon-image));display:var(--ag-icon-image-display-eye, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-eye, var(--ag-icon-image-opacity, .9))}.ag-icon-filter{font-family:var(--ag-icon-font-family-filter, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-filter, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-filter, var(--ag-icon-font-color))}.ag-icon-filter:before{content:var(--ag-icon-font-code-filter, "\f115");display:var(--ag-icon-font-display-filter, var(--ag-icon-font-display))}.ag-icon-filter:after{background-image:var(--ag-icon-image-filter, var(--ag-icon-image));display:var(--ag-icon-image-display-filter, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-filter, var(--ag-icon-image-opacity, .9))}.ag-icon-first{font-family:var(--ag-icon-font-family-first, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-first, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-first, var(--ag-icon-font-color))}.ag-icon-first:before{content:var(--ag-icon-font-code-first, "\f116");display:var(--ag-icon-font-display-first, var(--ag-icon-font-display))}.ag-icon-first:after{background-image:var(--ag-icon-image-first, var(--ag-icon-image));display:var(--ag-icon-image-display-first, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-first, var(--ag-icon-image-opacity, .9))}.ag-icon-grip{font-family:var(--ag-icon-font-family-grip, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-grip, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-grip, var(--ag-icon-font-color))}.ag-icon-grip:before{content:var(--ag-icon-font-code-grip, "\f117");display:var(--ag-icon-font-display-grip, var(--ag-icon-font-display))}.ag-icon-grip:after{background-image:var(--ag-icon-image-grip, var(--ag-icon-image));display:var(--ag-icon-image-display-grip, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-grip, var(--ag-icon-image-opacity, .9))}.ag-icon-group{font-family:var(--ag-icon-font-family-group, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-group, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-group, var(--ag-icon-font-color))}.ag-icon-group:before{content:var(--ag-icon-font-code-group, "\f118");display:var(--ag-icon-font-display-group, var(--ag-icon-font-display))}.ag-icon-group:after{background-image:var(--ag-icon-image-group, var(--ag-icon-image));display:var(--ag-icon-image-display-group, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-group, var(--ag-icon-image-opacity, .9))}.ag-icon-last{font-family:var(--ag-icon-font-family-last, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-last, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-last, var(--ag-icon-font-color))}.ag-icon-last:before{content:var(--ag-icon-font-code-last, "\f119");display:var(--ag-icon-font-display-last, var(--ag-icon-font-display))}.ag-icon-last:after{background-image:var(--ag-icon-image-last, var(--ag-icon-image));display:var(--ag-icon-image-display-last, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-last, var(--ag-icon-image-opacity, .9))}.ag-icon-left{font-family:var(--ag-icon-font-family-left, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-left, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-left, var(--ag-icon-font-color))}.ag-icon-left:before{content:var(--ag-icon-font-code-left, "\f11a");display:var(--ag-icon-font-display-left, var(--ag-icon-font-display))}.ag-icon-left:after{background-image:var(--ag-icon-image-left, var(--ag-icon-image));display:var(--ag-icon-image-display-left, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-left, var(--ag-icon-image-opacity, .9))}.ag-icon-linked{font-family:var(--ag-icon-font-family-linked, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-linked, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-linked, var(--ag-icon-font-color))}.ag-icon-linked:before{content:var(--ag-icon-font-code-linked, "\f11b");display:var(--ag-icon-font-display-linked, var(--ag-icon-font-display))}.ag-icon-linked:after{background-image:var(--ag-icon-image-linked, var(--ag-icon-image));display:var(--ag-icon-image-display-linked, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-linked, var(--ag-icon-image-opacity, .9))}.ag-icon-loading{font-family:var(--ag-icon-font-family-loading, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-loading, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-loading, var(--ag-icon-font-color))}.ag-icon-loading:before{content:var(--ag-icon-font-code-loading, "\f11c");display:var(--ag-icon-font-display-loading, var(--ag-icon-font-display))}.ag-icon-loading:after{background-image:var(--ag-icon-image-loading, var(--ag-icon-image));display:var(--ag-icon-image-display-loading, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-loading, var(--ag-icon-image-opacity, .9))}.ag-icon-maximize{font-family:var(--ag-icon-font-family-maximize, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-maximize, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-maximize, var(--ag-icon-font-color))}.ag-icon-maximize:before{content:var(--ag-icon-font-code-maximize, "\f11d");display:var(--ag-icon-font-display-maximize, var(--ag-icon-font-display))}.ag-icon-maximize:after{background-image:var(--ag-icon-image-maximize, var(--ag-icon-image));display:var(--ag-icon-image-display-maximize, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-maximize, var(--ag-icon-image-opacity, .9))}.ag-icon-menu{font-family:var(--ag-icon-font-family-menu, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-menu, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-menu, var(--ag-icon-font-color))}.ag-icon-menu:before{content:var(--ag-icon-font-code-menu, "\f11e");display:var(--ag-icon-font-display-menu, var(--ag-icon-font-display))}.ag-icon-menu:after{background-image:var(--ag-icon-image-menu, var(--ag-icon-image));display:var(--ag-icon-image-display-menu, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-menu, var(--ag-icon-image-opacity, .9))}.ag-icon-minimize{font-family:var(--ag-icon-font-family-minimize, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-minimize, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-minimize, var(--ag-icon-font-color))}.ag-icon-minimize:before{content:var(--ag-icon-font-code-minimize, "\f11f");display:var(--ag-icon-font-display-minimize, var(--ag-icon-font-display))}.ag-icon-minimize:after{background-image:var(--ag-icon-image-minimize, var(--ag-icon-image));display:var(--ag-icon-image-display-minimize, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-minimize, var(--ag-icon-image-opacity, .9))}.ag-icon-next{font-family:var(--ag-icon-font-family-next, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-next, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-next, var(--ag-icon-font-color))}.ag-icon-next:before{content:var(--ag-icon-font-code-next, "\f120");display:var(--ag-icon-font-display-next, var(--ag-icon-font-display))}.ag-icon-next:after{background-image:var(--ag-icon-image-next, var(--ag-icon-image));display:var(--ag-icon-image-display-next, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-next, var(--ag-icon-image-opacity, .9))}.ag-icon-none{font-family:var(--ag-icon-font-family-none, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-none, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-none, var(--ag-icon-font-color))}.ag-icon-none:before{content:var(--ag-icon-font-code-none, "\f121");display:var(--ag-icon-font-display-none, var(--ag-icon-font-display))}.ag-icon-none:after{background-image:var(--ag-icon-image-none, var(--ag-icon-image));display:var(--ag-icon-image-display-none, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-none, var(--ag-icon-image-opacity, .9))}.ag-icon-not-allowed{font-family:var(--ag-icon-font-family-not-allowed, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-not-allowed, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-not-allowed, var(--ag-icon-font-color))}.ag-icon-not-allowed:before{content:var(--ag-icon-font-code-not-allowed, "\f122");display:var(--ag-icon-font-display-not-allowed, var(--ag-icon-font-display))}.ag-icon-not-allowed:after{background-image:var(--ag-icon-image-not-allowed, var(--ag-icon-image));display:var(--ag-icon-image-display-not-allowed, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-not-allowed, var(--ag-icon-image-opacity, .9))}.ag-icon-paste{font-family:var(--ag-icon-font-family-paste, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-paste, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-paste, var(--ag-icon-font-color))}.ag-icon-paste:before{content:var(--ag-icon-font-code-paste, "\f123");display:var(--ag-icon-font-display-paste, var(--ag-icon-font-display))}.ag-icon-paste:after{background-image:var(--ag-icon-image-paste, var(--ag-icon-image));display:var(--ag-icon-image-display-paste, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-paste, var(--ag-icon-image-opacity, .9))}.ag-icon-pin{font-family:var(--ag-icon-font-family-pin, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-pin, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-pin, var(--ag-icon-font-color))}.ag-icon-pin:before{content:var(--ag-icon-font-code-pin, "\f124");display:var(--ag-icon-font-display-pin, var(--ag-icon-font-display))}.ag-icon-pin:after{background-image:var(--ag-icon-image-pin, var(--ag-icon-image));display:var(--ag-icon-image-display-pin, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-pin, var(--ag-icon-image-opacity, .9))}.ag-icon-pivot{font-family:var(--ag-icon-font-family-pivot, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-pivot, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-pivot, var(--ag-icon-font-color))}.ag-icon-pivot:before{content:var(--ag-icon-font-code-pivot, "\f125");display:var(--ag-icon-font-display-pivot, var(--ag-icon-font-display))}.ag-icon-pivot:after{background-image:var(--ag-icon-image-pivot, var(--ag-icon-image));display:var(--ag-icon-image-display-pivot, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-pivot, var(--ag-icon-image-opacity, .9))}.ag-icon-previous{font-family:var(--ag-icon-font-family-previous, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-previous, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-previous, var(--ag-icon-font-color))}.ag-icon-previous:before{content:var(--ag-icon-font-code-previous, "\f126");display:var(--ag-icon-font-display-previous, var(--ag-icon-font-display))}.ag-icon-previous:after{background-image:var(--ag-icon-image-previous, var(--ag-icon-image));display:var(--ag-icon-image-display-previous, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-previous, var(--ag-icon-image-opacity, .9))}.ag-icon-radio-button-off{font-family:var(--ag-icon-font-family-radio-button-off, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-radio-button-off, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-radio-button-off, var(--ag-icon-font-color))}.ag-icon-radio-button-off:before{content:var(--ag-icon-font-code-radio-button-off, "\f127");display:var(--ag-icon-font-display-radio-button-off, var(--ag-icon-font-display))}.ag-icon-radio-button-off:after{background-image:var(--ag-icon-image-radio-button-off, var(--ag-icon-image));display:var(--ag-icon-image-display-radio-button-off, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-radio-button-off, var(--ag-icon-image-opacity, .9))}.ag-icon-radio-button-on{font-family:var(--ag-icon-font-family-radio-button-on, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-radio-button-on, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-radio-button-on, var(--ag-icon-font-color))}.ag-icon-radio-button-on:before{content:var(--ag-icon-font-code-radio-button-on, "\f128");display:var(--ag-icon-font-display-radio-button-on, var(--ag-icon-font-display))}.ag-icon-radio-button-on:after{background-image:var(--ag-icon-image-radio-button-on, var(--ag-icon-image));display:var(--ag-icon-image-display-radio-button-on, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-radio-button-on, var(--ag-icon-image-opacity, .9))}.ag-icon-right{font-family:var(--ag-icon-font-family-right, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-right, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-right, var(--ag-icon-font-color))}.ag-icon-right:before{content:var(--ag-icon-font-code-right, "\f129");display:var(--ag-icon-font-display-right, var(--ag-icon-font-display))}.ag-icon-right:after{background-image:var(--ag-icon-image-right, var(--ag-icon-image));display:var(--ag-icon-image-display-right, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-right, var(--ag-icon-image-opacity, .9))}.ag-icon-save{font-family:var(--ag-icon-font-family-save, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-save, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-save, var(--ag-icon-font-color))}.ag-icon-save:before{content:var(--ag-icon-font-code-save, "\f12a");display:var(--ag-icon-font-display-save, var(--ag-icon-font-display))}.ag-icon-save:after{background-image:var(--ag-icon-image-save, var(--ag-icon-image));display:var(--ag-icon-image-display-save, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-save, var(--ag-icon-image-opacity, .9))}.ag-icon-small-down{font-family:var(--ag-icon-font-family-small-down, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-small-down, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-small-down, var(--ag-icon-font-color))}.ag-icon-small-down:before{content:var(--ag-icon-font-code-small-down, "\f12b");display:var(--ag-icon-font-display-small-down, var(--ag-icon-font-display))}.ag-icon-small-down:after{background-image:var(--ag-icon-image-small-down, var(--ag-icon-image));display:var(--ag-icon-image-display-small-down, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-small-down, var(--ag-icon-image-opacity, .9))}.ag-icon-small-left{font-family:var(--ag-icon-font-family-small-left, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-small-left, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-small-left, var(--ag-icon-font-color))}.ag-icon-small-left:before{content:var(--ag-icon-font-code-small-left, "\f12c");display:var(--ag-icon-font-display-small-left, var(--ag-icon-font-display))}.ag-icon-small-left:after{background-image:var(--ag-icon-image-small-left, var(--ag-icon-image));display:var(--ag-icon-image-display-small-left, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-small-left, var(--ag-icon-image-opacity, .9))}.ag-icon-small-right{font-family:var(--ag-icon-font-family-small-right, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-small-right, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-small-right, var(--ag-icon-font-color))}.ag-icon-small-right:before{content:var(--ag-icon-font-code-small-right, "\f12d");display:var(--ag-icon-font-display-small-right, var(--ag-icon-font-display))}.ag-icon-small-right:after{background-image:var(--ag-icon-image-small-right, var(--ag-icon-image));display:var(--ag-icon-image-display-small-right, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-small-right, var(--ag-icon-image-opacity, .9))}.ag-icon-small-up{font-family:var(--ag-icon-font-family-small-up, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-small-up, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-small-up, var(--ag-icon-font-color))}.ag-icon-small-up:before{content:var(--ag-icon-font-code-small-up, "\f12e");display:var(--ag-icon-font-display-small-up, var(--ag-icon-font-display))}.ag-icon-small-up:after{background-image:var(--ag-icon-image-small-up, var(--ag-icon-image));display:var(--ag-icon-image-display-small-up, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-small-up, var(--ag-icon-image-opacity, .9))}.ag-icon-tick{font-family:var(--ag-icon-font-family-tick, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-tick, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-tick, var(--ag-icon-font-color))}.ag-icon-tick:before{content:var(--ag-icon-font-code-tick, "\f12f");display:var(--ag-icon-font-display-tick, var(--ag-icon-font-display))}.ag-icon-tick:after{background-image:var(--ag-icon-image-tick, var(--ag-icon-image));display:var(--ag-icon-image-display-tick, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-tick, var(--ag-icon-image-opacity, .9))}.ag-icon-tree-closed{font-family:var(--ag-icon-font-family-tree-closed, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-tree-closed, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-tree-closed, var(--ag-icon-font-color))}.ag-icon-tree-closed:before{content:var(--ag-icon-font-code-tree-closed, "\f130");display:var(--ag-icon-font-display-tree-closed, var(--ag-icon-font-display))}.ag-icon-tree-closed:after{background-image:var(--ag-icon-image-tree-closed, var(--ag-icon-image));display:var(--ag-icon-image-display-tree-closed, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-tree-closed, var(--ag-icon-image-opacity, .9))}.ag-icon-tree-indeterminate{font-family:var(--ag-icon-font-family-tree-indeterminate, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-tree-indeterminate, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-tree-indeterminate, var(--ag-icon-font-color))}.ag-icon-tree-indeterminate:before{content:var(--ag-icon-font-code-tree-indeterminate, "\f131");display:var(--ag-icon-font-display-tree-indeterminate, var(--ag-icon-font-display))}.ag-icon-tree-indeterminate:after{background-image:var(--ag-icon-image-tree-indeterminate, var(--ag-icon-image));display:var(--ag-icon-image-display-tree-indeterminate, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-tree-indeterminate, var(--ag-icon-image-opacity, .9))}.ag-icon-tree-open{font-family:var(--ag-icon-font-family-tree-open, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-tree-open, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-tree-open, var(--ag-icon-font-color))}.ag-icon-tree-open:before{content:var(--ag-icon-font-code-tree-open, "\f132");display:var(--ag-icon-font-display-tree-open, var(--ag-icon-font-display))}.ag-icon-tree-open:after{background-image:var(--ag-icon-image-tree-open, var(--ag-icon-image));display:var(--ag-icon-image-display-tree-open, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-tree-open, var(--ag-icon-image-opacity, .9))}.ag-icon-unlinked{font-family:var(--ag-icon-font-family-unlinked, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-unlinked, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-unlinked, var(--ag-icon-font-color))}.ag-icon-unlinked:before{content:var(--ag-icon-font-code-unlinked, "\f133");display:var(--ag-icon-font-display-unlinked, var(--ag-icon-font-display))}.ag-icon-unlinked:after{background-image:var(--ag-icon-image-unlinked, var(--ag-icon-image));display:var(--ag-icon-image-display-unlinked, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-unlinked, var(--ag-icon-image-opacity, .9))}.ag-icon-up{font-family:var(--ag-icon-font-family-up, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-up, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-up, var(--ag-icon-font-color))}.ag-icon-up:before{content:var(--ag-icon-font-code-up, "\f134");display:var(--ag-icon-font-display-up, var(--ag-icon-font-display))}.ag-icon-up:after{background-image:var(--ag-icon-image-up, var(--ag-icon-image));display:var(--ag-icon-image-display-up, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-up, var(--ag-icon-image-opacity, .9))}.ag-icon-down{font-family:var(--ag-icon-font-family-down, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-down, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-down, var(--ag-icon-font-color))}.ag-icon-down:before{content:var(--ag-icon-font-code-down, "\f135");display:var(--ag-icon-font-display-down, var(--ag-icon-font-display))}.ag-icon-down:after{background-image:var(--ag-icon-image-down, var(--ag-icon-image));display:var(--ag-icon-image-display-down, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-down, var(--ag-icon-image-opacity, .9))}.ag-icon-plus{font-family:var(--ag-icon-font-family-plus, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-plus, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-plus, var(--ag-icon-font-color))}.ag-icon-plus:before{content:var(--ag-icon-font-code-plus, "\f136");display:var(--ag-icon-font-display-plus, var(--ag-icon-font-display))}.ag-icon-plus:after{background-image:var(--ag-icon-image-plus, var(--ag-icon-image));display:var(--ag-icon-image-display-plus, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-plus, var(--ag-icon-image-opacity, .9))}.ag-icon-minus{font-family:var(--ag-icon-font-family-minus, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-minus, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-minus, var(--ag-icon-font-color))}.ag-icon-minus:before{content:var(--ag-icon-font-code-minus, "\f137");display:var(--ag-icon-font-display-minus, var(--ag-icon-font-display))}.ag-icon-minus:after{background-image:var(--ag-icon-image-minus, var(--ag-icon-image));display:var(--ag-icon-image-display-minus, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-minus, var(--ag-icon-image-opacity, .9))}.ag-icon-menu-alt{font-family:var(--ag-icon-font-family-menu-alt, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-menu-alt, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-menu-alt, var(--ag-icon-font-color))}.ag-icon-menu-alt:before{content:var(--ag-icon-font-code-menu-alt, "\f138");display:var(--ag-icon-font-display-menu-alt, var(--ag-icon-font-display))}.ag-icon-menu-alt:after{background-image:var(--ag-icon-image-menu-alt, var(--ag-icon-image));display:var(--ag-icon-image-display-menu-alt, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-menu-alt, var(--ag-icon-image-opacity, .9))}.ag-icon-settings{font-family:var(--ag-icon-font-family-settings, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-settings, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-settings, var(--ag-icon-font-color))}.ag-icon-settings:before{content:var(--ag-icon-font-code-settings, "\f139");display:var(--ag-icon-font-display-settings, var(--ag-icon-font-display))}.ag-icon-settings:after{background-image:var(--ag-icon-image-settings, var(--ag-icon-image));display:var(--ag-icon-image-display-settings, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-settings, var(--ag-icon-image-opacity, .9))}.ag-icon-column-arrow{font-family:var(--ag-icon-font-family-column-arrow, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-column-arrow, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-column-arrow, var(--ag-icon-font-color))}.ag-icon-column-arrow:before{content:var(--ag-icon-font-code-column-arrow, "\f13a");display:var(--ag-icon-font-display-column-arrow, var(--ag-icon-font-display))}.ag-icon-column-arrow:after{background-image:var(--ag-icon-image-column-arrow, var(--ag-icon-image));display:var(--ag-icon-image-display-column-arrow, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-column-arrow, var(--ag-icon-image-opacity, .9))}.ag-icon-un-pin{font-family:var(--ag-icon-font-family-un-pin, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-un-pin, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-un-pin, var(--ag-icon-font-color))}.ag-icon-un-pin:before{content:var(--ag-icon-font-code-un-pin, "\f13b");display:var(--ag-icon-font-display-un-pin, var(--ag-icon-font-display))}.ag-icon-un-pin:after{background-image:var(--ag-icon-image-un-pin, var(--ag-icon-image));display:var(--ag-icon-image-display-un-pin, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-un-pin, var(--ag-icon-image-opacity, .9))}.ag-icon-pinned-bottom{font-family:var(--ag-icon-font-family-pinned-bottom, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-pinned-bottom, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-pinned-bottom, var(--ag-icon-font-color))}.ag-icon-pinned-bottom:before{content:var(--ag-icon-font-code-pinned-bottom, "\f13e");display:var(--ag-icon-font-display-pinned-bottom, var(--ag-icon-font-display))}.ag-icon-pinned-bottom:after{background-image:var(--ag-icon-image-pinned-bottom, var(--ag-icon-image));display:var(--ag-icon-image-display-pinned-bottom, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-pinned-bottom, var(--ag-icon-image-opacity, .9))}.ag-icon-pinned-top{font-family:var(--ag-icon-font-family-pinned-top, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-pinned-top, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-pinned-top, var(--ag-icon-font-color))}.ag-icon-pinned-top:before{content:var(--ag-icon-font-code-pinned-top, "\f13f");display:var(--ag-icon-font-display-pinned-top, var(--ag-icon-font-display))}.ag-icon-pinned-top:after{background-image:var(--ag-icon-image-pinned-top, var(--ag-icon-image));display:var(--ag-icon-image-display-pinned-top, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-pinned-top, var(--ag-icon-image-opacity, .9))}.ag-icon-chevron-up{font-family:var(--ag-icon-font-family-chevron-up, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-chevron-up, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-chevron-up, var(--ag-icon-font-color))}.ag-icon-chevron-up:before{content:var(--ag-icon-font-code-chevron-up, "\f140");display:var(--ag-icon-font-display-chevron-up, var(--ag-icon-font-display))}.ag-icon-chevron-up:after{background-image:var(--ag-icon-image-chevron-up, var(--ag-icon-image));display:var(--ag-icon-image-display-chevron-up, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-chevron-up, var(--ag-icon-image-opacity, .9))}.ag-icon-chevron-down{font-family:var(--ag-icon-font-family-chevron-down, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-chevron-down, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-chevron-down, var(--ag-icon-font-color))}.ag-icon-chevron-down:before{content:var(--ag-icon-font-code-chevron-down, "\f141");display:var(--ag-icon-font-display-chevron-down, var(--ag-icon-font-display))}.ag-icon-chevron-down:after{background-image:var(--ag-icon-image-chevron-down, var(--ag-icon-image));display:var(--ag-icon-image-display-chevron-down, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-chevron-down, var(--ag-icon-image-opacity, .9))}.ag-icon-chevron-left{font-family:var(--ag-icon-font-family-chevron-left, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-chevron-left, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-chevron-left, var(--ag-icon-font-color))}.ag-icon-chevron-left:before{content:var(--ag-icon-font-code-chevron-left, "\f142");display:var(--ag-icon-font-display-chevron-left, var(--ag-icon-font-display))}.ag-icon-chevron-left:after{background-image:var(--ag-icon-image-chevron-left, var(--ag-icon-image));display:var(--ag-icon-image-display-chevron-left, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-chevron-left, var(--ag-icon-image-opacity, .9))}.ag-icon-chevron-right{font-family:var(--ag-icon-font-family-chevron-right, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-chevron-right, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-chevron-right, var(--ag-icon-font-color))}.ag-icon-chevron-right:before{content:var(--ag-icon-font-code-chevron-right, "\f143");display:var(--ag-icon-font-display-chevron-right, var(--ag-icon-font-display))}.ag-icon-chevron-right:after{background-image:var(--ag-icon-image-chevron-right, var(--ag-icon-image));display:var(--ag-icon-image-display-chevron-right, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-chevron-right, var(--ag-icon-image-opacity, .9))}.ag-icon-filter-add{font-family:var(--ag-icon-font-family-filter-add, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-filter-add, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-filter-add, var(--ag-icon-font-color))}.ag-icon-filter-add:before{content:var(--ag-icon-font-code-filter-add, "\f144");display:var(--ag-icon-font-display-filter-add, var(--ag-icon-font-display))}.ag-icon-filter-add:after{background-image:var(--ag-icon-image-filter-add, var(--ag-icon-image));display:var(--ag-icon-image-display-filter-add, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-filter-add, var(--ag-icon-image-opacity, .9))}.ag-icon-edit{font-family:var(--ag-icon-font-family-edit, var(--ag-icon-font-family));font-weight:var(--ag-icon-font-weight-edit, var(--ag-icon-font-weight));color:var(--ag-icon-font-color-edit, var(--ag-icon-font-color))}.ag-icon-edit:before{content:var(--ag-icon-font-code-edit, "\f145");display:var(--ag-icon-font-display-edit, var(--ag-icon-font-display))}.ag-icon-edit:after{background-image:var(--ag-icon-image-edit, var(--ag-icon-image));display:var(--ag-icon-image-display-edit, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-edit, var(--ag-icon-image-opacity, .9))}.ag-icon-row-drag:before{content:var(--ag-icon-font-code-grip)}.ag-left-arrow:before{content:var(--ag-icon-font-code-left)}.ag-right-arrow:before{content:var(--ag-icon-font-code-right)}[class*=ag-theme-]{--ag-foreground-color: #000;--ag-data-color: var(--ag-foreground-color);--ag-secondary-foreground-color: var(--ag-foreground-color);--ag-header-foreground-color: var(--ag-secondary-foreground-color);--ag-disabled-foreground-color: rgba(0, 0, 0, .5);--ag-background-color: #fff;--ag-header-background-color: transparent;--ag-tooltip-background-color: transparent;--ag-tooltip-error-background-color: color-mix( in srgb, var(--ag-background-color), var(--ag-invalid-color) 10% );--ag-tooltip-error-text-color: var(--ag-invalid-color);--ag-tooltip-error-border-color: color-mix(in srgb, var(--ag-background-color), var(--ag-invalid-color) 25%);--ag-subheader-background-color: transparent;--ag-subheader-toolbar-background-color: transparent;--ag-control-panel-background-color: transparent;--ag-side-button-selected-background-color: var(--ag-control-panel-background-color);--ag-selected-row-background-color: #bbb;--ag-data-background-color: var(--ag-background-color);--ag-odd-row-background-color: var(--ag-data-background-color);--ag-modal-overlay-background-color: rgba(255, 255, 255, .66);--ag-menu-background-color: var(--ag-background-color);--ag-menu-border-color: var(--ag-border-color);--ag-panel-background-color: var(--ag-background-color);--ag-panel-border-color: var(--ag-border-color);--ag-row-hover-color: transparent;--ag-column-hover-color: transparent;--ag-range-selection-border-color: var(--ag-foreground-color);--ag-row-drag-indicator-color: var(--ag-range-selection-border-color);--ag-row-drag-indicator-width: 2px;--ag-column-drag-indicator-color: var(--ag-range-selection-border-color);--ag-column-drag-indicator-width: 2px;--ag-range-selection-border-style: solid;--ag-range-selection-background-color: rgba(0, 0, 0, .2);--ag-range-selection-background-color-2: var(--ag-range-selection-background-color);--ag-range-selection-background-color-3: var(--ag-range-selection-background-color);--ag-range-selection-background-color-4: var(--ag-range-selection-background-color);--ag-range-selection-highlight-color: var(--ag-range-selection-border-color);--ag-range-header-highlight-color: color-mix( in srgb, var(--ag-header-background-color), var(--ag-foreground-color) 8% );--ag-selected-tab-underline-color: var(--ag-range-selection-border-color);--ag-selected-tab-underline-width: 0;--ag-selected-tab-underline-transition-speed: 0s;--ag-range-selection-chart-category-background-color: rgba(0, 255, 132, .1);--ag-range-selection-chart-background-color: rgba(0, 88, 255, .1);--ag-header-cell-hover-background-color: transparent;--ag-header-cell-moving-background-color: var(--ag-background-color);--ag-value-change-value-highlight-background-color: rgba(22, 160, 133, .5);--ag-value-change-delta-up-color: #43a047;--ag-value-change-delta-down-color: #e53935;--ag-row-loading-skeleton-effect-color: rgba(66, 66, 66, .2);--ag-chip-background-color: transparent;--ag-chip-border-color: var(--ag-chip-background-color);--ag-borders: solid 1px;--ag-border-color: rgba(0, 0, 0, .25);--ag-borders-critical: var(--ag-borders);--ag-borders-secondary: var(--ag-borders);--ag-secondary-border-color: var(--ag-border-color);--ag-row-border-style: solid;--ag-row-border-width: 1px;--ag-cell-horizontal-border: solid transparent;--ag-borders-input: var(--ag-borders-secondary);--ag-input-border-color: var(--ag-secondary-border-color);--ag-borders-input-invalid: solid 2px;--ag-input-border-color-invalid: var(--ag-invalid-color);--ag-full-row-invalid-background-color: color-mix( in srgb, var(--ag-background-color), var(--ag-invalid-color) 25% );--ag-borders-side-button: var(--ag-borders);--ag-border-radius: 0px;--ag-wrapper-border-radius: var(--ag-border-radius);--ag-row-border-color: var(--ag-secondary-border-color);--ag-header-column-separator-display: none;--ag-header-column-separator-height: 100%;--ag-header-column-separator-width: 1px;--ag-header-column-separator-color: var(--ag-secondary-border-color);--ag-header-column-resize-handle-display: none;--ag-header-column-resize-handle-height: 50%;--ag-header-column-resize-handle-width: 1px;--ag-header-column-resize-handle-color: var(--ag-secondary-border-color);--ag-invalid-color: red;--ag-input-disabled-border-color: var(--ag-input-border-color);--ag-input-disabled-background-color: transparent;--ag-checkbox-background-color: transparent;--ag-checkbox-border-radius: var(--ag-border-radius);--ag-checkbox-checked-color: var(--ag-foreground-color);--ag-checkbox-unchecked-color: var(--ag-foreground-color);--ag-checkbox-indeterminate-color: var(--ag-checkbox-unchecked-color);--ag-toggle-button-off-border-color: var(--ag-checkbox-unchecked-color);--ag-toggle-button-off-background-color: var(--ag-checkbox-unchecked-color);--ag-toggle-button-on-border-color: var(--ag-checkbox-checked-color);--ag-toggle-button-on-background-color: var(--ag-checkbox-checked-color);--ag-toggle-button-switch-background-color: var(--ag-background-color);--ag-toggle-button-switch-border-color: var(--ag-toggle-button-off-border-color);--ag-toggle-button-border-width: 1px;--ag-toggle-button-height: var(--ag-icon-size);--ag-toggle-button-width: calc(var(--ag-toggle-button-height) * 2);--ag-input-focus-box-shadow: none;--ag-input-error-focus-box-shadow: none;--ag-input-focus-border-color: none;--ag-minichart-selected-chart-color: var(--ag-checkbox-checked-color);--ag-minichart-selected-page-color: var(--ag-checkbox-checked-color);--ag-grid-size: 4px;--ag-icon-size: 12px;--ag-icon-font-weight: normal;--ag-icon-font-color: var(--ag-foreground-color);--ag-icon-image-display: block;--ag-widget-container-horizontal-padding: calc(var(--ag-grid-size) * 1.5);--ag-widget-container-vertical-padding: calc(var(--ag-grid-size) * 1.5);--ag-widget-horizontal-spacing: calc(var(--ag-grid-size) * 2);--ag-widget-vertical-spacing: var(--ag-grid-size);--ag-cell-horizontal-padding: calc(var(--ag-grid-size) * 3);--ag-cell-widget-spacing: var(--ag-cell-horizontal-padding);--ag-row-height: calc(var(--ag-grid-size) * 6 + 1px);--ag-header-height: var(--ag-row-height);--ag-pagination-panel-height: var(--ag-header-height);--ag-list-item-height: calc(var(--ag-grid-size) * 5);--ag-column-select-indent-size: calc(var(--ag-grid-size) + var(--ag-icon-size));--ag-set-filter-indent-size: calc(var(--ag-grid-size) + var(--ag-icon-size));--ag-advanced-filter-builder-indent-size: calc(var(--ag-grid-size) * 2 + var(--ag-icon-size));--ag-row-group-indent-size: calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size));--ag-row-numbers-selected-color: #bbb;--ag-filter-tool-panel-group-indent: 16px;--ag-tab-min-width: 220px;--ag-chart-menu-panel-width: var(--ag-tab-min-width);--ag-menu-min-width: 181px;--ag-side-bar-panel-width: 200px;--ag-side-bar-panel-animation-duration: 0s;--ag-font-family: "Helvetica Neue", sans-serif;--ag-font-size: 14px;--ag-card-radius: var(--ag-border-radius);--ag-card-shadow: none;--ag-popup-shadow: 5px 5px 10px rgba(0, 0, 0, .3);--ag-advanced-filter-join-pill-color: #f08e8d;--ag-advanced-filter-column-pill-color: #a6e194;--ag-advanced-filter-option-pill-color: #f3c08b;--ag-advanced-filter-value-pill-color: #85c0e4;--ag-find-match-color: var(--ag-foreground-color);--ag-find-active-match-color: var(--ag-foreground-color);--ag-find-match-background-color: #ffff00;--ag-find-active-match-background-color: #ffa500;--ag-cell-batch-edit-background-color: rgb(220 181 139 / 16%);--ag-cell-batch-edit-text-color: #422f00;--ag-row-batch-edit-background-color: var(--ag-cell-batch-edit-background-color);--ag-row-batch-edit-text-color: var(--ag-cell-batch-edit-text-color);--ag-filter-panel-apply-button-color: var(--ag-foreground-color);--ag-filter-panel-apply-button-background-color: var(--ag-background-color);--ag-column-panel-apply-button-color: var(--ag-foreground-color);--ag-column-panel-apply-button-background-color: var(--ag-background-color);--ag-filter-panel-card-subtle-color: var(--ag-foreground-color);--ag-filter-panel-card-subtle-hover-color: var(--ag-foreground-color);--ag-formula-token-1-color: #3269c6;--ag-formula-token-1-background-color: rgb(50 105 198 / 16%);--ag-formula-token-1-border-color: var(--ag-formula-token-1-color);--ag-formula-token-2-color: #c0343f;--ag-formula-token-2-background-color: rgb(192 52 63 / 16%);--ag-formula-token-2-border-color: var(--ag-formula-token-2-color);--ag-formula-token-3-color: #8156b8;--ag-formula-token-3-background-color: rgb(129 86 184 / 16%);--ag-formula-token-3-border-color: var(--ag-formula-token-3-color);--ag-formula-token-4-color: #007c1f;--ag-formula-token-4-background-color: rgb(0 124 31 / 16%);--ag-formula-token-4-border-color: var(--ag-formula-token-4-color);--ag-formula-token-5-color: #b03e85;--ag-formula-token-5-background-color: rgb(176 62 133 / 16%);--ag-formula-token-5-border-color: var(--ag-formula-token-5-color);--ag-formula-token-6-color: #b74900;--ag-formula-token-6-background-color: rgb(183 73 0 / 16%);--ag-formula-token-6-border-color: var(--ag-formula-token-6-color);--ag-formula-token-7-color: #247492;--ag-formula-token-7-background-color: rgb(36 116 146 / 16%);--ag-formula-token-7-border-color: var(--ag-formula-token-7-color)}.ag-root-wrapper,.ag-dnd-ghost{background-color:var(--ag-background-color)}.ag-sticky-top,.ag-sticky-bottom{background-color:var(--ag-data-background-color)}.ag-sticky-bottom .ag-pinned-left-sticky-bottom,.ag-sticky-bottom .ag-sticky-bottom-container,.ag-sticky-bottom .ag-pinned-right-sticky-bottom{border-top:var(--ag-row-border-style) var(--ag-row-border-color) var(--ag-row-border-width)}.ag-root-wrapper,.ag-popup{--ag-indentation-level: 0}[class*=ag-theme-]{-webkit-font-smoothing:antialiased;font-family:var(--ag-font-family);font-size:var(--ag-font-size);line-height:normal;color:var(--ag-foreground-color)}ag-grid,ag-grid-angular,ag-grid-ng2,ag-grid-polymer,ag-grid-aurelia{display:block}.ag-aria-description-container{z-index:9999;border:0px;clip:rect(1px,1px,1px,1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap}.ag-hidden{display:none!important}.ag-invisible{visibility:hidden!important}.ag-drag-handle{cursor:grab}.ag-column-drop-wrapper{display:flex}.ag-column-drop-horizontal-half-width{display:inline-block;width:50%!important}.ag-unselectable{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ag-selectable{-moz-user-select:text;-webkit-user-select:text;-ms-user-select:text;user-select:text}.ag-tab{position:relative}.ag-tab-guard{position:absolute;width:0;height:0;display:block}.ag-virtual-list-viewport .ag-tab-guard{position:sticky}.ag-tab-guard-top{top:1px}.ag-tab-guard-bottom{bottom:1px}.ag-select-agg-func-popup{position:absolute}.ag-input-wrapper,.ag-picker-field-wrapper{display:flex;flex:1 1 auto;align-items:center;line-height:normal;position:relative}.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-root-wrapper{cursor:default;position:relative;display:flex;flex-direction:column;overflow:hidden;white-space:normal}.ag-root-wrapper.ag-layout-normal{height:100%}.ag-watermark{position:absolute;bottom:20px;right:25px;opacity:.7;transition:opacity 1s ease-out 3s;color:#9b9b9b}.ag-watermark:before{content:"";background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjA5IiBoZWlnaHQ9IjM2IiB2aWV3Qm94PSIwIDAgMjA5IDM2IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNMTkyLjk5MyAyMy42NTgyVjE1LjcxMTdIMTc5LjQ1MkwxNzEuNTA1IDIzLjY1ODJIMTkyLjk5M1oiIGZpbGw9IiM5QjlCOUIiLz4KPHBhdGggZD0iTTIwOC4yNSAzLjk1MDgxSDE5MS4yNzZMMTgzLjI2NiAxMS44OTczSDIwOC4yNVYzLjk1MDgxWiIgZmlsbD0iIzlCOUI5QiIvPgo8cGF0aCBkPSJNMTYzLjYyMiAzMS42MDQ4TDE2Ny42OTEgMjcuNTM2MUgxODEuNDIzVjM1LjQ4MjdIMTYzLjYyMlYzMS42MDQ4WiIgZmlsbD0iIzlCOUI5QiIvPgo8cGF0aCBkPSJNMTY2LjYxIDE5Ljc4MDNIMTc1LjM4M0wxODMuMzkzIDExLjgzMzdIMTY2LjYxVjE5Ljc4MDNaIiBmaWxsPSIjOUI5QjlCIi8+CjxwYXRoIGQ9Ik0xNTcuMDExIDMxLjYwNDdIMTYzLjYyMkwxNzEuNTA1IDIzLjY1ODJIMTU3LjAxMVYzMS42MDQ3WiIgZmlsbD0iIzlCOUI5QiIvPgo8cGF0aCBkPSJNMTkxLjI3NiAzLjk1MDgxTDE4Ny4yMDggOC4wMTk0MUgxNjEuMjdWMC4wNzI4NzZIMTkxLjI3NlYzLjk1MDgxWiIgZmlsbD0iIzlCOUI5QiIvPgo8cGF0aCBkPSJNMjAuODM5MSAzMC4yMDYxSDguMzc4OTJMNi4yMTc0NSAzNS41NDYySDAuNzUwMjQ0TDEyLjI1NjggOC41OTE1NUgxNy4wMjQ3TDI4LjUzMTMgMzUuNTQ2MkgyMy4wMDA1TDIwLjgzOTEgMzAuMjA2MVpNMTkuMTIyNyAyNS45NDY4TDE0LjYwOSAxNC45NDg4TDEwLjA5NTQgMjUuOTQ2OEgxOS4xMjI3WiIgZmlsbD0iIzlCOUI5QiIvPgo8cGF0aCBkPSJNMTA0LjQzNyAxOC41MDg5QzEwNi4wMjYgMTYuMTU2NyAxMTAuMDMxIDE1LjkwMjQgMTExLjY4NCAxNS45MDI0VjIwLjQ3OTZDMTA5LjY1IDIwLjQ3OTYgMTA3LjYxNSAyMC41NDMyIDEwNi40MDcgMjEuNDMzMkMxMDUuMiAyMi4zMjMyIDEwNC41NjQgMjMuNTMxMSAxMDQuNTY0IDI0Ljk5MzJWMzUuNTQ2Mkg5OS42MDUxVjE1LjkwMjRIMTA0LjM3M0wxMDQuNDM3IDE4LjUwODlaIiBmaWxsPSIjOUI5QjlCIi8+CjxwYXRoIGQ9Ik0xMTkuMzc2IDE1LjkwMjRIMTE0LjQxOFYzNS41NDYySDExOS4zNzZWMTUuOTAyNFoiIGZpbGw9IiM5QjlCOUIiLz4KPHBhdGggZD0iTTExOS4zNzYgNy4xMjkzOUgxMTQuNDE4VjEyLjk3OEgxMTkuMzc2VjcuMTI5MzlaIiBmaWxsPSIjOUI5QjlCIi8+CjxwYXRoIGQ9Ik0xNDMuOTc5IDcuMTI5MzlWMzUuNTQ2MkgxMzkuMjExTDEzOS4wODQgMzIuNTU4M0MxMzguMzg0IDMzLjU3NTUgMTM3LjQ5NCAzNC40MDE5IDEzNi40MTQgMzUuMDM3NkMxMzUuMzMzIDM1LjYwOTggMTMzLjk5OCAzNS45Mjc2IDEzMi40NzIgMzUuOTI3NkMxMzEuMTM3IDM1LjkyNzYgMTI5Ljg2NiAzNS42NzMzIDEyOC43ODUgMzUuMjI4M0MxMjcuNjQxIDM0LjcxOTcgMTI2LjYyMyAzNC4wODQgMTI1Ljc5NyAzMy4xOTRDMTI0Ljk3MSAzMi4zMDQgMTI0LjI3MSAzMS4yMjMzIDEyMy44MjYgMzAuMDE1NEMxMjMuMzE4IDI4LjgwNzUgMTIzLjEyNyAyNy40MDkgMTIzLjEyNyAyNS44ODMyQzEyMy4xMjcgMjQuMzU3NSAxMjMuMzgxIDIyLjk1ODkgMTIzLjgyNiAyMS42ODc0QzEyNC4zMzUgMjAuNDE2IDEyNC45NzEgMTkuMzM1MyAxMjUuNzk3IDE4LjQ0NTNDMTI2LjYyMyAxNy41NTUyIDEyNy42NDEgMTYuODU2IDEyOC43ODUgMTYuMzQ3NEMxMjkuOTI5IDE1LjgzODggMTMxLjEzNyAxNS41ODQ1IDEzMi40NzIgMTUuNTg0NUMxMzMuOTk4IDE1LjU4NDUgMTM1LjI2OSAxNS44Mzg4IDEzNi4zNSAxNi40MTA5QzEzNy40MzEgMTYuOTgzMSAxMzguMzIxIDE3Ljc0NTkgMTM5LjAyIDE4LjgyNjdWNy4xOTI5NUgxNDMuOTc5VjcuMTI5MzlaTTEzMy41NTMgMzEuNjY4M0MxMzUuMjA2IDMxLjY2ODMgMTM2LjQ3NyAzMS4wOTYyIDEzNy40OTQgMzAuMDE1NEMxMzguNTExIDI4LjkzNDcgMTM5LjAyIDI3LjQ3MjUgMTM5LjAyIDI1LjY5MjVDMTM5LjAyIDIzLjkxMjUgMTM4LjUxMSAyMi41MTM5IDEzNy40OTQgMjEuMzY5NkMxMzYuNDc3IDIwLjI4ODggMTM1LjIwNiAxOS43MTY3IDEzMy41NTMgMTkuNzE2N0MxMzEuOTYzIDE5LjcxNjcgMTMwLjYyOCAyMC4yODg4IDEyOS42NzUgMjEuMzY5NkMxMjguNjU4IDIyLjQ1MDMgMTI4LjE0OSAyMy45MTI1IDEyOC4xNDkgMjUuNjkyNUMxMjguMTQ5IDI3LjQ3MjUgMTI4LjY1OCAyOC44NzExIDEyOS42NzUgMjkuOTUxOEMxMzAuNjkyIDMxLjA5NjEgMTMxLjk2MyAzMS42NjgzIDEzMy41NTMgMzEuNjY4M1oiIGZpbGw9IiM5QjlCOUIiLz4KPHBhdGggZD0iTTU3LjIwMjQgMjAuMzUyNUg0NC45MzNWMjQuNjExOEg1MS45MjU5QzUxLjczNTIgMjYuNzczMyA1MC45MDg4IDI4LjQyNjEgNDkuNTEwMiAyOS43NjExQzQ4LjExMTYgMzEuMDMyNiA0Ni4zMzE1IDMxLjY2ODMgNDQuMDQyOSAzMS42NjgzQzQyLjc3MTUgMzEuNjY4MyA0MS41NjM2IDMxLjQxNCA0MC41NDY1IDMwLjk2OUMzOS40NjU3IDMwLjUyNCAzOC41NzU3IDI5Ljg4ODMgMzcuODEyOSAyOC45OTgzQzM3LjA1IDI4LjE3MTggMzYuNDc3OCAyNy4xNTQ3IDM2LjAzMjggMjUuOTQ2OEMzNS41ODc4IDI0LjczODkgMzUuMzk3MSAyMy40Njc1IDM1LjM5NzEgMjIuMDA1M0MzNS4zOTcxIDIwLjU0MzIgMzUuNTg3OCAxOS4yNzE3IDM2LjAzMjggMTguMDYzOEMzNi40MTQzIDE2Ljg1NiAzNy4wNSAxNS45MDI0IDM3LjgxMjkgMTUuMDEyNEMzOC41NzU3IDE0LjE4NTkgMzkuNDY1NyAxMy41NTAyIDQwLjU0NjUgMTMuMDQxNkM0MS42MjcyIDEyLjU5NjYgNDIuNzcxNSAxMi4zNDIzIDQ0LjEwNjUgMTIuMzQyM0M0Ni43NzY2IDEyLjM0MjMgNDguODEwOSAxMi45NzggNTAuMjA5NSAxNC4yNDk1TDUzLjUxNTIgMTAuOTQzOEM1MS4wMzU5IDkuMDM2NTkgNDcuODU3MyA4LjAxOTQxIDQ0LjEwNjUgOC4wMTk0MUM0Mi4wMDg2IDguMDE5NDEgNDAuMTAxNSA4LjMzNzI5IDM4LjM4NSA5LjAzNjU5QzM2LjY2ODYgOS43MzU4OCAzNS4yMDY0IDEwLjYyNTkgMzMuOTk4NSAxMS44MzM3QzMyLjc5MDYgMTMuMDQxNiAzMS44MzcxIDE0LjUwMzggMzEuMjAxNCAxNi4yMjAzQzMwLjU2NTYgMTcuOTM2NyAzMC4yNDc4IDE5Ljg0MzggMzAuMjQ3OCAyMS44NzgyQzMwLjI0NzggMjMuOTEyNSAzMC41NjU2IDI1LjgxOTcgMzEuMjY0OSAyNy41MzYxQzMxLjk2NDIgMjkuMjUyNiAzMi44NTQyIDMwLjcxNDcgMzQuMDYyMSAzMS45MjI2QzM1LjI3IDMzLjEzMDUgMzYuNzMyMSAzNC4wODQxIDM4LjQ0ODYgMzQuNzE5OEM0MC4xNjUgMzUuNDE5MSA0Mi4wNzIyIDM1LjczNyA0NC4xMDY1IDM1LjczN0M0Ni4xNDA4IDM1LjczNyA0Ny45ODQ0IDM1LjQxOTEgNDkuNjM3MyAzNC43MTk4QzUxLjI5MDIgMzQuMDIwNSA1Mi42ODg4IDMzLjEzMDUgNTMuODMzMSAzMS45MjI2QzU0Ljk3NzQgMzAuNzE0NyA1NS44Njc0IDI5LjI1MjYgNTYuNTAzMSAyNy41MzYxQzU3LjEzODggMjUuODE5NyA1Ny40NTY3IDIzLjkxMjUgNTcuNDU2NyAyMS44NzgyVjIxLjA1MTdDNTcuMjY2IDIwLjkyNDYgNTcuMjAyNCAyMC42MDY3IDU3LjIwMjQgMjAuMzUyNVoiIGZpbGw9IiM5QjlCOUIiLz4KPHBhdGggZD0iTTk1Ljk4MTUgMjAuMzUyNUg4My43MTIxVjI0LjYxMThIOTAuNzA1QzkwLjUxNDMgMjYuNzczMyA4OS42ODc5IDI4LjQyNjEgODguMjg5MyAyOS43NjExQzg2Ljg5MDcgMzEuMDMyNiA4NS4xMTA2IDMxLjY2ODMgODIuODIyIDMxLjY2ODNDODEuNTUwNiAzMS42NjgzIDgwLjM0MjcgMzEuNDE0IDc5LjMyNTYgMzAuOTY5Qzc4LjI0NDggMzAuNTI0IDc3LjM1NDggMjkuODg4MyA3Ni41OTIgMjguOTk4M0M3NS44MjkxIDI4LjE3MTggNzUuMjU3IDI3LjE1NDcgNzQuODExOSAyNS45NDY4Qzc0LjM2NjkgMjQuNzM4OSA3NC4xNzYyIDIzLjQ2NzUgNzQuMTc2MiAyMi4wMDUzQzc0LjE3NjIgMjAuNTQzMiA3NC4zNjY5IDE5LjI3MTcgNzQuODExOSAxOC4wNjM4Qzc1LjE5MzQgMTYuODU2IDc1LjgyOTEgMTUuOTAyNCA3Ni41OTIgMTUuMDEyNEM3Ny4zNTQ4IDE0LjE4NTkgNzguMjQ0OCAxMy41NTAyIDc5LjMyNTYgMTMuMDQxNkM4MC40MDYzIDEyLjU5NjYgODEuNTUwNiAxMi4zNDIzIDgyLjg4NTYgMTIuMzQyM0M4NS41NTU3IDEyLjM0MjMgODcuNTkgMTIuOTc4IDg4Ljk4ODYgMTQuMjQ5NUw5Mi4yOTQzIDEwLjk0MzhDODkuODE1IDkuMDM2NTkgODYuNjM2NCA4LjAxOTQxIDgyLjg4NTYgOC4wMTk0MUM4MC43ODc4IDguMDE5NDEgNzguODgwNiA4LjMzNzI5IDc3LjE2NDEgOS4wMzY1OUM3NS40NDc3IDkuNzM1ODggNzMuOTg1NSAxMC42MjU5IDcyLjc3NzYgMTEuODMzN0M3MS41Njk4IDEzLjA0MTYgNzAuNjE2MiAxNC41MDM4IDY5Ljk4MDUgMTYuMjIwM0M2OS4zNDQ3IDE3LjkzNjcgNjkuMDI2OSAxOS44NDM4IDY5LjAyNjkgMjEuODc4MkM2OS4wMjY5IDIzLjkxMjUgNjkuMzQ0NyAyNS44MTk3IDcwLjA0NCAyNy41MzYxQzcwLjc0MzMgMjkuMjUyNiA3MS42MzM0IDMwLjcxNDcgNzIuODQxMiAzMS45MjI2Qzc0LjA0OTEgMzMuMTMwNSA3NS41MTEyIDM0LjA4NDEgNzcuMjI3NyAzNC43MTk4Qzc4Ljk0NDEgMzUuNDE5MSA4MC44NTEzIDM1LjczNyA4Mi44ODU2IDM1LjczN0M4NC45MiAzNS43MzcgODYuNzYzNiAzNS40MTkxIDg4LjQxNjQgMzQuNzE5OEM5MC4wNjkzIDM0LjAyMDUgOTEuNDY3OSAzMy4xMzA1IDkyLjYxMjIgMzEuOTIyNkM5My43NTY1IDMwLjcxNDcgOTQuNjQ2NSAyOS4yNTI2IDk1LjI4MjIgMjcuNTM2MUM5NS45MTggMjUuODE5NyA5Ni4yMzU4IDIzLjkxMjUgOTYuMjM1OCAyMS44NzgyVjIxLjA1MTdDOTYuMDQ1MSAyMC45MjQ2IDk1Ljk4MTUgMjAuNjA2NyA5NS45ODE1IDIwLjM1MjVaIiBmaWxsPSIjOUI5QjlCIi8+Cjwvc3ZnPgo=);background-repeat:no-repeat;background-size:170px 40px;display:block;height:40px;width:170px}.ag-watermark-text{opacity:.5;font-weight:700;font-family:Impact,sans-serif;font-size:19px;padding-left:.7rem}.ag-root-wrapper-body{display:flex;flex-direction:row}.ag-root-wrapper-body.ag-layout-normal{flex:1 1 auto;height:0;min-height:0}.ag-root{position:relative;display:flex;flex-direction:column}.ag-root.ag-layout-normal,.ag-root.ag-layout-auto-height{overflow:hidden;flex:1 1 auto;width:0}.ag-root.ag-layout-normal{height:100%}.ag-header-viewport,.ag-floating-top-viewport,.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-body-horizontal-scroll-viewport,.ag-body-vertical-scroll-viewport,.ag-virtual-list-viewport,.ag-sticky-top-viewport,.ag-sticky-bottom-viewport{position:relative;height:100%;min-width:0px;overflow:hidden;flex:1 1 auto}.ag-body-viewport,.ag-center-cols-viewport,.ag-header-viewport,.ag-floating-top-viewport,.ag-floating-bottom-viewport,.ag-sticky-top-viewport,.ag-sticky-bottom-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-header-viewport::-webkit-scrollbar,.ag-floating-top-viewport::-webkit-scrollbar,.ag-floating-bottom-viewport::-webkit-scrollbar,.ag-sticky-top-viewport::-webkit-scrollbar,.ag-sticky-bottom-viewport::-webkit-scrollbar{display:none!important}.ag-body-viewport{display:flex;overflow-x:hidden}.ag-body-viewport.ag-layout-normal{overflow-y:auto;-webkit-overflow-scrolling:touch}.ag-viewport{position:relative}.ag-spanning-container{position:absolute;top:0;z-index:1}.ag-sticky-top-container,.ag-sticky-bottom-container,.ag-floating-top-container,.ag-floating-bottom-container{min-height:1px}.ag-sticky-top,.ag-sticky-bottom{z-index:1}.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-virtual-list-viewport{overflow:auto;width:100%}.ag-header-container,.ag-floating-top-container,.ag-body-container,.ag-pinned-right-cols-container,.ag-center-cols-container,.ag-pinned-left-cols-container,.ag-floating-bottom-container,.ag-body-horizontal-scroll-container,.ag-body-vertical-scroll-container,.ag-full-width-container,.ag-floating-bottom-full-width-container,.ag-virtual-list-container,.ag-sticky-top-container,.ag-sticky-bottom-container,.ag-pinned-left-sticky-bottom,.ag-pinned-right-sticky-bottom{position:relative}.ag-header-container,.ag-floating-top-container,.ag-pinned-left-floating-top,.ag-pinned-right-floating-top,.ag-floating-bottom-container,.ag-pinned-left-floating-bottom,.ag-pinned-right-floating-bottom,.ag-sticky-top-container,.ag-sticky-bottom-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-full-width-container,.ag-floating-top-full-width-container,.ag-floating-bottom-full-width-container,.ag-sticky-top-full-width-container,.ag-sticky-bottom-full-width-container{position:absolute;top:0;pointer-events:none}.ag-ltr .ag-full-width-container,.ag-ltr .ag-floating-top-full-width-container,.ag-ltr .ag-floating-bottom-full-width-container,.ag-ltr .ag-sticky-top-full-width-container,.ag-ltr .ag-sticky-bottom-full-width-container{left:0}.ag-rtl .ag-full-width-container,.ag-rtl .ag-floating-top-full-width-container,.ag-rtl .ag-floating-bottom-full-width-container,.ag-rtl .ag-sticky-top-full-width-container,.ag-rtl .ag-sticky-bottom-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;overflow:hidden;height:100%;width:100%}.ag-virtual-list-container{overflow:hidden}.ag-body{position:relative;display:flex;flex:1 1 auto;flex-direction:row!important;min-height:0}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{min-height:0;min-width:0;display:flex;position:relative}.ag-body-horizontal-scroll.ag-scrollbar-invisible,.ag-body-vertical-scroll.ag-scrollbar-invisible{position:absolute;bottom:0}.ag-body-horizontal-scroll.ag-scrollbar-invisible.ag-apple-scrollbar,.ag-body-vertical-scroll.ag-scrollbar-invisible.ag-apple-scrollbar{opacity:0;transition:opacity .4s;visibility:hidden}.ag-body-horizontal-scroll.ag-scrollbar-invisible.ag-apple-scrollbar.ag-scrollbar-scrolling,.ag-body-horizontal-scroll.ag-scrollbar-invisible.ag-apple-scrollbar.ag-scrollbar-active,.ag-body-vertical-scroll.ag-scrollbar-invisible.ag-apple-scrollbar.ag-scrollbar-scrolling,.ag-body-vertical-scroll.ag-scrollbar-invisible.ag-apple-scrollbar.ag-scrollbar-active{visibility:visible;opacity:1}.ag-body-horizontal-scroll{width:100%}.ag-body-horizontal-scroll.ag-scrollbar-invisible{left:0;right:0}.ag-body-vertical-scroll{height:100%}.ag-body-vertical-scroll.ag-scrollbar-invisible{top:0;z-index:10}.ag-ltr .ag-body-vertical-scroll.ag-scrollbar-invisible{right:0}.ag-rtl .ag-body-vertical-scroll.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}.ag-horizontal-left-spacer.ag-scroller-corner,.ag-horizontal-right-spacer.ag-scroller-corner{overflow-x:hidden}.ag-header,.ag-pinned-left-header,.ag-pinned-right-header{display:inline-block;overflow:hidden;position:relative}.ag-header-cell-sortable .ag-header-cell-label,.ag-header-group-cell-selectable .ag-header-cell-comp-wrapper{cursor:pointer}.ag-header{display:flex;width:100%;white-space:nowrap}.ag-pinned-left-header,.ag-pinned-right-header{height:100%}.ag-header-row{position:absolute}.ag-header-row:not(.ag-header-row-column-group){overflow:hidden}.ag-header.ag-header-allow-overflow .ag-header-row{overflow:visible}.ag-header-cell{display:inline-flex;align-items:center;position:absolute;height:100%;overflow:hidden}.ag-header-cell.ag-header-active .ag-header-cell-menu-button,.ag-header-cell-filter-button{opacity:1}.ag-header-cell-menu-button:not(.ag-header-menu-always-show){transition:opacity .2s;opacity:0}.ag-header-group-cell-label,.ag-header-cell-label{display:flex;flex:1 1 auto;align-self:stretch;align-items:center;overflow:hidden}.ag-header-cell-label{text-overflow:ellipsis}.ag-header-group-cell-label.ag-sticky-label{position:sticky;flex:none;max-width:100%;overflow:visible}.ag-header-group-text{overflow:hidden;text-overflow:ellipsis}.ag-header-cell-text{overflow:hidden;text-overflow:ellipsis;word-break:break-word}.ag-header-group-cell .ag-header-cell-comp-wrapper{display:flex}.ag-header-cell:not(.ag-header-cell-auto-height) .ag-header-cell-comp-wrapper{height:100%;display:flex;align-items:center}.ag-header-cell-comp-wrapper{width:100%}.ag-header-cell-wrap-text .ag-header-cell-comp-wrapper{white-space:normal}.ag-header-cell-comp-wrapper-limited-height>div{overflow:hidden}.ag-right-aligned-header .ag-header-cell-label{flex-direction:row-reverse}.ag-header-cell-resize{position:absolute;z-index:2;height:100%;width:8px;top:0;cursor:ew-resize}.ag-ltr .ag-header-cell-resize{right:-3px}.ag-rtl .ag-header-cell-resize{left:-3px}.ag-pinned-left-header .ag-header-cell-resize{right:-3px}.ag-pinned-right-header .ag-header-cell-resize{left:-3px}.ag-header-select-all{display:flex}.ag-header-cell-menu-button,.ag-header-cell-filter-button,.ag-side-button-button,.ag-panel-title-bar-button,.ag-floating-filter-button-button{cursor:pointer}.ag-column-moving .ag-cell,.ag-column-moving .ag-header-cell,.ag-column-moving .ag-spanned-cell-wrapper{transition:left .2s}.ag-column-moving .ag-header-group-cell{transition:left .2s,width .2s}.ag-delay-render .ag-cell,.ag-delay-render .ag-row,.ag-delay-render .ag-spanned-cell-wrapper,.ag-delay-render .ag-header-cell,.ag-delay-render .ag-header-group-cell{visibility:hidden}.ag-column-panel{display:flex;flex-direction:column;overflow:hidden;flex:1 1 auto}.ag-column-select{position:relative;display:flex;flex-direction:column;overflow:hidden;flex:3 1 0px}.ag-column-select-header{position:relative;display:flex;flex:none}.ag-column-select-header-icon{position:relative}.ag-column-select-header-filter-wrapper{flex:1 1 auto}.ag-column-select-header-filter{width:100%}.ag-column-select-list{flex:1 1 0px;overflow:hidden}.ag-column-drop{position:relative;display:inline-flex;align-items:center;overflow:auto;width:100%}.ag-column-drop-list{display:flex;align-items:center}.ag-column-drop-cell{position:relative;display:flex;align-items:center}.ag-column-drop-cell-text{overflow:hidden;flex:1 1 auto;text-overflow:ellipsis;white-space:nowrap}.ag-column-drop-vertical{display:flex;flex-direction:column;overflow:hidden;align-items:stretch;flex:1 1 0px}.ag-column-drop-vertical-title-bar{display:flex;align-items:center;flex:none}.ag-column-drop-vertical-list{position:relative;align-items:stretch;flex-grow:1;flex-direction:column;overflow-x:auto}.ag-column-drop-vertical-list>*{flex:none}.ag-column-drop-empty .ag-column-drop-vertical-list{overflow:hidden}.ag-column-drop-vertical-empty-message{display:block}.ag-column-drop.ag-column-drop-horizontal{white-space:nowrap;overflow:hidden}.ag-column-drop-cell-button{cursor:pointer}.ag-filter-toolpanel{flex:1 1 0px;min-width:0}.ag-filter-toolpanel-header{position:relative}.ag-filter-toolpanel-header,.ag-filter-toolpanel-search{display:flex;align-items:center}.ag-filter-toolpanel-header>*,.ag-filter-toolpanel-search>*{display:flex;align-items:center}.ag-filter-apply-panel{display:flex;justify-content:flex-end;overflow:hidden}.ag-row-animation .ag-row{transition:transform .4s,top .4s,opacity .2s}.ag-row-animation .ag-row.ag-after-created{transition:transform .4s,top .4s,height .4s,opacity .2s}.ag-row-animation.ag-prevent-animation .ag-row,.ag-row-animation.ag-prevent-animation .ag-row.ag-after-created{transition:none!important}.ag-row-no-animation .ag-row{transition:none}.ag-row{white-space:nowrap;width:100%}.ag-row-loading{display:flex;align-items:center}.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{display:flex;align-items:center}.ag-cell{display:inline-block;position:absolute;white-space:nowrap;height:100%}.ag-cell-value{flex:1 1 auto}.ag-cell-value:not(.ag-allow-overflow),.ag-group-value{overflow:hidden;text-overflow:ellipsis}.ag-cell-wrapper{display:flex;align-items:center}.ag-cell-wrapper.ag-row-group{align-items:flex-start}.ag-cell-wrap-text{white-space:normal;word-break:break-word}.ag-cell-wrap-text:not(.ag-cell-auto-height) .ag-cell-wrapper{align-items:normal;height:100%}.ag-cell-wrap-text:not(.ag-cell-auto-height) .ag-cell-wrapper .ag-cell-value{height:100%}.ag-sparkline-wrapper{position:absolute;height:100%;width:100%;top:0;line-height:initial}.ag-full-width-row .ag-cell-wrapper.ag-row-group{height:100%;align-items:center}.ag-cell-inline-editing{z-index:1}.ag-cell-inline-editing .ag-cell-wrapper,.ag-cell-inline-editing .ag-cell-edit-wrapper,.ag-cell-inline-editing .ag-cell-editor,.ag-cell-inline-editing .ag-cell-editor .ag-wrapper,.ag-cell-inline-editing .ag-cell-editor.ag-cell-editor.ag-cell-editor input{height:100%;min-height:100%;width:100%;line-height:normal}.ag-row.ag-row-editing-invalid .ag-cell-inline-editing{opacity:.8}.ag-cell .ag-icon{display:inline-block;vertical-align:middle}.ag-set-filter-item{display:flex;align-items:center;height:100%}.ag-set-filter-item-checkbox{display:flex;width:100%;height:100%}.ag-set-filter-group-icons{display:block}.ag-set-filter-group-icons>*{cursor:pointer}.ag-filter-body-wrapper{display:flex;flex-direction:column}.ag-filter-filter{flex:1 1 0px}.ag-filter-condition{display:flex;justify-content:center}.ag-floating-filter-body{position:relative;display:flex;flex:1 1 auto;height:100%}.ag-floating-filter-full-body{display:flex;flex:1 1 auto;height:100%;width:100%;align-items:center;overflow:hidden}.ag-floating-filter-full-body>div{flex:1 1 auto}.ag-floating-filter-input{align-items:center;display:flex;width:100%}.ag-floating-filter-input>*{flex:1 1 auto}.ag-floating-filter-button{display:flex;flex:none}.ag-date-floating-filter-wrapper{display:flex}.ag-set-floating-filter-input input[disabled]{pointer-events:none}.ag-dnd-ghost{display:inline-flex;align-items:center;cursor:move;white-space:nowrap}.ag-overlay{height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%;z-index:2}.ag-overlay-panel{display:flex;height:100%;width:100%}.ag-overlay-wrapper{display:flex;flex:none;width:100%;height:100%;align-items:center;justify-content:center;text-align:center}.ag-overlay-loading-wrapper,.ag-overlay-exporting-wrapper,.ag-overlay-modal-wrapper{pointer-events:all}.ag-popup-child{z-index:5;top:0}.ag-popup-editor{position:absolute;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ag-large-text-input{display:block}.ag-virtual-list-item{position:absolute;width:100%}.ag-floating-top,.ag-floating-bottom{overflow:hidden;white-space:nowrap;width:100%;position:relative;display:flex}.ag-pinned-left-floating-top,.ag-pinned-right-floating-top,.ag-pinned-left-floating-bottom,.ag-pinned-right-floating-bottom{overflow:hidden;position:relative;min-width:0px}.ag-sticky-top,.ag-sticky-bottom{position:absolute;display:flex;width:100%;overflow:hidden;height:0px}.ag-sticky-bottom{box-sizing:content-box!important}.ag-sticky-bottom .ag-pinned-left-sticky-bottom,.ag-sticky-bottom .ag-sticky-bottom-container,.ag-sticky-bottom .ag-pinned-right-sticky-bottom{box-sizing:border-box}.ag-pinned-left-sticky-top,.ag-pinned-right-sticky-top{position:relative;height:100%;overflow:hidden}.ag-sticky-top-full-width-container,.ag-sticky-bottom-full-width-container{overflow:hidden;width:100%;height:100%}.ag-dialog,.ag-panel{display:flex;flex-direction:column;position:relative;overflow:hidden}.ag-panel-title-bar{display:flex;flex:none;align-items:center;cursor:default}.ag-panel-title-bar-title{flex:1 1 auto}.ag-panel-title-bar-buttons{display:flex}.ag-panel-title-bar-button{cursor:pointer}.ag-panel-content-wrapper{display:flex;flex:1 1 auto;position:relative;overflow:hidden}.ag-dialog{position:absolute}.ag-resizer{position:absolute;pointer-events:none;z-index:1;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ag-resizer.ag-resizer-topLeft{top:0;left:0;height:5px;width:5px;cursor:nwse-resize}.ag-resizer.ag-resizer-top{top:0;left:5px;right:5px;height:5px;cursor:ns-resize}.ag-resizer.ag-resizer-topRight{top:0;right:0;height:5px;width:5px;cursor:nesw-resize}.ag-resizer.ag-resizer-right{top:5px;right:0;bottom:5px;width:5px;cursor:ew-resize}.ag-resizer.ag-resizer-bottomRight{bottom:0;right:0;height:5px;width:5px;cursor:nwse-resize}.ag-resizer.ag-resizer-bottom{bottom:0;left:5px;right:5px;height:5px;cursor:ns-resize}.ag-resizer.ag-resizer-bottomLeft{bottom:0;left:0;height:5px;width:5px;cursor:nesw-resize}.ag-resizer.ag-resizer-left{left:0;top:5px;bottom:5px;width:5px;cursor:ew-resize}.ag-tooltip,.ag-tooltip-custom{position:absolute;z-index:99999}.ag-tooltip:not(.ag-tooltip-interactive),.ag-tooltip-custom:not(.ag-tooltip-interactive){pointer-events:none}.ag-value-slide-out{margin-right:5px;opacity:1;transition:opacity 3s,margin-right 3s;transition-timing-function:linear}.ag-value-slide-out-end{margin-right:10px;opacity:0}.ag-opacity-zero{opacity:0!important}.ag-menu{max-height:100%;overflow-y:auto;position:absolute;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ag-menu-column-select-wrapper{height:265px;overflow:auto}.ag-menu-column-select-wrapper .ag-column-select{height:100%}.ag-dialog .ag-panel-content-wrapper .ag-column-select{user-select:none}.ag-menu-list{display:table;width:100%}.ag-menu-option,.ag-menu-separator{display:table-row}.ag-menu-option-part,.ag-menu-separator-part{display:table-cell;vertical-align:middle}.ag-menu-option-text{white-space:nowrap}.ag-menu-option-custom{display:contents}.ag-compact-menu-option{width:100%;display:flex;flex-wrap:nowrap}.ag-compact-menu-option-text{white-space:nowrap;flex:1 1 auto}.ag-context-menu-loading-icon{position:absolute;pointer-events:none}.ag-pill-container{display:flex;gap:.25rem;flex-wrap:nowrap}.ag-pill{display:flex;white-space:nowrap;padding:0 .25rem;align-items:center}.ag-pill .ag-pill-button{border:none;padding:0}.ag-rich-select{cursor:default;outline:none;height:100%}.ag-rich-select-value{display:flex;align-items:center;height:100%}.ag-rich-select-value .ag-picker-field-display{overflow:hidden;text-overflow:ellipsis}.ag-rich-select-value .ag-picker-field-display.ag-display-as-placeholder{opacity:.5}.ag-rich-select-list{position:relative}.ag-rich-select-list .ag-rich-select-loading{display:flex;min-height:2rem}.ag-rich-select-list .ag-rich-select-loading .ag-loading-text{overflow:hidden;text-overflow:ellipsis}.ag-rich-select-row{display:flex;flex:1 1 auto;align-items:center;white-space:nowrap;overflow:hidden;height:100%}.ag-rich-select-field-input{flex:1 1 auto}.ag-rich-select-field-input .ag-input-field-input{padding:0!important;border:none!important;box-shadow:none!important;text-overflow:ellipsis}.ag-rich-select-field-input .ag-input-field-input::placeholder{opacity:.8}.ag-rich-select-typing-multi .ag-picker-field-display{flex:0 1 auto;min-width:0;max-width:100%}.ag-rich-select-typing-multi .ag-rich-select-pill-display{display:flex;flex:0 1 auto;min-width:0;max-width:100%;align-items:center;overflow:hidden}.ag-rich-select-typing-multi .ag-rich-select-pill-display .ag-pill-container{flex:0 1 auto;min-width:0;max-width:100%;overflow:hidden}.ag-rich-select-typing-multi .ag-rich-select-field-input{flex:0 0 auto;min-width:0;max-width:100%}.ag-rich-select-typing-multi .ag-rich-select-field-input .ag-input-wrapper{flex:0 0 auto;max-width:100%}.ag-rich-select-typing-multi .ag-rich-select-field-input .ag-input-field-input{width:auto;min-width:1ch;max-width:100%}.ag-autocomplete{align-items:center;display:flex}.ag-autocomplete>*{flex:1 1 auto}.ag-autocomplete-list-popup{position:absolute;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ag-autocomplete-list{position:relative}.ag-autocomplete-virtual-list-item{display:flex}.ag-autocomplete-row{display:flex;flex:1 1 auto;align-items:center;overflow:hidden}.ag-autocomplete-row-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ag-paging-panel{align-items:center;display:flex;justify-content:flex-end}.ag-paging-page-summary-panel{display:flex;align-items:center}.ag-paging-button{position:relative}.ag-disabled .ag-paging-page-summary-panel{pointer-events:none}.ag-tool-panel-wrapper{overflow:hidden;cursor:default;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ag-column-select-column,.ag-column-select-column-group,.ag-select-agg-func-item{position:relative;align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap;height:100%}.ag-column-select-column>*,.ag-column-select-column-group>*,.ag-select-agg-func-item>*{flex:none}.ag-select-agg-func-item,.ag-column-select-column-label{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-column-select-checkbox{display:flex}.ag-tool-panel-horizontal-resize{cursor:ew-resize;height:100%;position:absolute;top:0;width:5px;z-index:1}.ag-ltr .ag-side-bar-left .ag-tool-panel-horizontal-resize{right:-3px}.ag-rtl .ag-side-bar-left .ag-tool-panel-horizontal-resize,.ag-ltr .ag-side-bar-right .ag-tool-panel-horizontal-resize{left:-3px}.ag-rtl .ag-side-bar-right .ag-tool-panel-horizontal-resize{right:-3px}.ag-details-row{width:100%}.ag-details-row-fixed-height{height:100%}.ag-details-grid{width:100%}.ag-details-grid-fixed-height{height:100%}.ag-header-group-cell{display:flex;align-items:center;height:100%;position:absolute;contain:paint}.ag-header-group-cell-no-group.ag-header-span-height{display:none}.ag-cell-label-container{display:flex;justify-content:space-between;flex-direction:row-reverse;align-items:center;height:100%;width:100%}.ag-header-group-cell-label,.ag-cell-label-container{padding:5px 0}.ag-right-aligned-header .ag-cell-label-container{flex-direction:row}.ag-right-aligned-header .ag-header-cell-text{text-align:end}.ag-side-bar{display:flex;flex-direction:row-reverse}.ag-side-bar-left{order:-1;flex-direction:row}.ag-side-button-button{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;flex-wrap:nowrap;white-space:nowrap;outline:none;cursor:pointer}.ag-side-button-label{writing-mode:vertical-lr}.ag-status-bar{display:flex;justify-content:space-between;overflow:hidden}.ag-status-panel,.ag-status-panel.ag-status-panel-aggregations .ag-status-name-value{display:inline-flex}.ag-status-name-value{white-space:nowrap}.ag-status-bar-left,.ag-status-bar-center,.ag-status-bar-right{display:inline-flex}.ag-row-number-cell{width:100%;white-space:nowrap;overflow:hidden;user-select:none}.ag-ltr .ag-row-number-cell{text-align:right}.ag-rtl .ag-row-number-cell{text-align:left}.ag-row-numbers-resizer{position:absolute;bottom:-2px;left:0;height:4px;width:100%;cursor:ns-resize}.ag-floating-bottom .ag-row-numbers-resizer{bottom:unset;top:-2px}.ag-icon{display:block;speak:none}.ag-group{position:relative;width:100%}.ag-group-title-bar{display:flex;align-items:center}.ag-group-title{display:inline;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ag-group-title-bar .ag-group-title{cursor:default}.ag-group-toolbar{display:flex;align-items:center}.ag-group-container{display:flex}.ag-disabled .ag-group-container{pointer-events:none}.ag-group-container-horizontal{flex-direction:row;flex-wrap:wrap}.ag-group-container-vertical{flex-direction:column}.ag-column-group-icons{display:block}.ag-column-group-icons>*{cursor:pointer}.ag-group-item-alignment-stretch .ag-group-item{align-items:stretch}.ag-group-item-alignment-start .ag-group-item{align-items:flex-start}.ag-group-item-alignment-end .ag-group-item{align-items:flex-end}.ag-toggle-button-icon{transition:right .3s;position:absolute;top:-1px}.ag-input-field,.ag-select{display:flex;flex-direction:row;align-items:center}.ag-input-field-input{flex:1 1 auto}.ag-floating-filter-input .ag-input-field-input[type=date],.ag-floating-filter-input .ag-input-field-input[type=datetime-local]{width:1px}.ag-range-field,.ag-angle-select{display:flex;align-items:center}.ag-angle-select-wrapper{display:flex}.ag-angle-select-parent-circle{display:block;position:relative}.ag-angle-select-child-circle{position:absolute}.ag-slider-wrapper{display:flex}.ag-slider-wrapper .ag-input-field,.ag-picker-field-display{flex:1 1 auto}.ag-picker-field{display:flex;align-items:center}.ag-picker-field-icon{display:flex;border:0;padding:0;margin:0;cursor:pointer}.ag-picker-field-wrapper{overflow:hidden}.ag-label-align-right .ag-label{order:1}.ag-label-align-right>*{flex:none}.ag-label-align-top{flex-direction:column;align-items:flex-start}.ag-label-align-top>*{align-self:stretch}.ag-label-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.ag-color-panel{width:100%;display:flex;flex-direction:column;text-align:center}.ag-spectrum-color{flex:1 1 auto;position:relative;overflow:visible;cursor:default}.ag-spectrum-fill{position:absolute;inset:0}.ag-spectrum-val{cursor:pointer}.ag-spectrum-dragger{position:absolute;pointer-events:none;cursor:pointer}.ag-spectrum-hue,.ag-spectrum-alpha{cursor:default}.ag-spectrum-hue-background{background:linear-gradient(to left,red 3%,#ff0 17%,#0f0 33%,#0ff,#00f 67%,#f0f 83%,red);width:100%;height:100%}.ag-spectrum-alpha{--ag-spectrum-alpha-background-checked: url("data:image/svg+xml;utf8,")}.ag-spectrum-alpha-background{background:linear-gradient(to right,var(--ag-internal-spectrum-alpha-color-from),var(--ag-internal-spectrum-alpha-color-to)),var(--ag-spectrum-alpha-background-checked) top left/4px 4px;width:100%;height:100%}.ag-spectrum-tool{cursor:pointer;position:relative}.ag-spectrum-slider{position:absolute;pointer-events:none}.ag-spectrum-alpha .ag-spectrum-slider{background:linear-gradient(to bottom,var(--ag-internal-spectrum-alpha-color),var(--ag-internal-spectrum-alpha-color)) #fff}.ag-recent-colors{display:flex}.ag-recent-color{cursor:pointer}.ag-pill-select{display:flex;flex-direction:column}.ag-pill-select .ag-column-drop{flex:unset}.ag-content-editable-field{display:flex;align-items:center}.ag-content-editable-field-input{cursor:text;display:block;flex:1 1 auto;outline:none;white-space:nowrap;line-height:normal;overflow:auto;overflow-y:hidden;-ms-overflow-style:none!important;scrollbar-width:none!important}.ag-content-editable-field-input::-webkit-scrollbar{display:none!important}.ag-ltr{direction:ltr}.ag-ltr .ag-body,.ag-ltr .ag-floating-top,.ag-ltr .ag-floating-bottom,.ag-ltr .ag-header,.ag-ltr .ag-sticky-top,.ag-ltr .ag-sticky-bottom,.ag-ltr .ag-body-viewport,.ag-ltr .ag-body-horizontal-scroll{flex-direction:row}.ag-rtl{direction:rtl}.ag-rtl .ag-body,.ag-rtl .ag-floating-top,.ag-rtl .ag-floating-bottom,.ag-rtl .ag-header,.ag-rtl .ag-sticky-top,.ag-rtl .ag-sticky-bottom,.ag-rtl .ag-body-viewport,.ag-rtl .ag-body-horizontal-scroll{flex-direction:row-reverse}.ag-rtl .ag-icon-contracted,.ag-rtl .ag-icon-expanded,.ag-rtl .ag-icon-tree-closed{display:block;transform:rotate(180deg)}.ag-body .ag-body-viewport{-webkit-overflow-scrolling:touch}.ag-measurement-container{width:0;overflow:hidden;visibility:hidden}.ag-measurement-container div{position:absolute}.ag-layout-print.ag-body{display:block;height:unset}.ag-layout-print.ag-root-wrapper{display:inline-block}.ag-layout-print .ag-body-vertical-scroll,.ag-layout-print .ag-body-horizontal-scroll{display:none}.ag-layout-print.ag-force-vertical-scroll{overflow-y:visible!important}@media print{.ag-root-wrapper.ag-layout-print{display:table;container-type:normal}.ag-root-wrapper.ag-layout-print .ag-root-wrapper-body,.ag-root-wrapper.ag-layout-print .ag-root,.ag-root-wrapper.ag-layout-print .ag-body-viewport,.ag-root-wrapper.ag-layout-print .ag-center-cols-container,.ag-root-wrapper.ag-layout-print .ag-center-cols-viewport,.ag-root-wrapper.ag-layout-print .ag-body-horizontal-scroll-viewport,.ag-root-wrapper.ag-layout-print .ag-virtual-list-viewport{height:auto!important;overflow:hidden!important;display:block!important}.ag-root-wrapper.ag-layout-print .ag-row,.ag-root-wrapper.ag-layout-print .ag-cell{break-inside:avoid}}[class^=ag-],[class^=ag-]:focus,[class^=ag-]:after,[class^=ag-]:before{box-sizing:border-box;outline:none}[class^=ag-]::-ms-clear{display:none}.ag-checkbox .ag-input-wrapper,.ag-radio-button .ag-input-wrapper{overflow:visible}.ag-range-field .ag-input-wrapper{height:100%}.ag-toggle-button{flex:none;width:unset;min-width:unset}.ag-button{border-radius:0;color:var(--ag-foreground-color)}.ag-button:hover{background-color:transparent}.ag-ltr .ag-label-align-right .ag-label{margin-left:var(--ag-grid-size)}.ag-rtl .ag-label-align-right .ag-label{margin-right:var(--ag-grid-size)}input[class^=ag-]{margin:0;background-color:var(--ag-background-color)}textarea[class^=ag-],select[class^=ag-]{background-color:var(--ag-background-color)}input[class^=ag-]:not([type]),input[class^=ag-][type=text],input[class^=ag-][type=number],input[class^=ag-][type=tel],input[class^=ag-][type=date],input[class^=ag-][type=datetime-local],textarea[class^=ag-]{font-size:inherit;line-height:inherit;color:inherit;font-family:inherit;border:var(--ag-borders-input) var(--ag-input-border-color)}input[class^=ag-]:not([type]):disabled,input[class^=ag-][type=text]:disabled,input[class^=ag-][type=number]:disabled,input[class^=ag-][type=tel]:disabled,input[class^=ag-][type=date]:disabled,input[class^=ag-][type=datetime-local]:disabled,textarea[class^=ag-]:disabled{color:var(--ag-disabled-foreground-color);background-color:var(--ag-input-disabled-background-color);border-color:var(--ag-input-disabled-border-color)}input[class^=ag-]:not([type]):focus,input[class^=ag-][type=text]:focus,input[class^=ag-][type=number]:focus,input[class^=ag-][type=tel]:focus,input[class^=ag-][type=date]:focus,input[class^=ag-][type=datetime-local]:focus,textarea[class^=ag-]:focus{outline:none;box-shadow:var(--ag-input-focus-box-shadow);border-color:var(--ag-input-focus-border-color)}input[class^=ag-]:not([type]):focus.invalid,input[class^=ag-]:not([type]):focus:invalid,input[class^=ag-][type=text]:focus.invalid,input[class^=ag-][type=text]:focus:invalid,input[class^=ag-][type=number]:focus.invalid,input[class^=ag-][type=number]:focus:invalid,input[class^=ag-][type=tel]:focus.invalid,input[class^=ag-][type=tel]:focus:invalid,input[class^=ag-][type=date]:focus.invalid,input[class^=ag-][type=date]:focus:invalid,input[class^=ag-][type=datetime-local]:focus.invalid,input[class^=ag-][type=datetime-local]:focus:invalid,textarea[class^=ag-]:focus.invalid,textarea[class^=ag-]:focus:invalid{box-shadow:var(--ag-input-error-focus-box-shadow);border-color:var(--ag-invalid-color)}input[class^=ag-]:not([type]):invalid,input[class^=ag-][type=text]:invalid,input[class^=ag-][type=number]:invalid,input[class^=ag-][type=tel]:invalid,input[class^=ag-][type=date]:invalid,input[class^=ag-][type=datetime-local]:invalid,textarea[class^=ag-]:invalid{border:var(--ag-borders-input-invalid) var(--ag-input-border-color-invalid)}input[class^=ag-][type=number]:not(.ag-number-field-input-stepper){-moz-appearance:textfield}input[class^=ag-][type=number]:not(.ag-number-field-input-stepper)::-webkit-outer-spin-button,input[class^=ag-][type=number]:not(.ag-number-field-input-stepper)::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[class^=ag-][type=range]{padding:0}input[class^=ag-][type=button]:focus,button[class^=ag-]:focus{box-shadow:var(--ag-input-focus-box-shadow)}input[class^=ag-][type=button]:focus:invalid,input[class^=ag-][type=button]:focus.invalid,button[class^=ag-]:focus:invalid,button[class^=ag-]:focus.invalid{box-shadow:var(--ag-input-error-focus-box-shadow)}.ag-drag-handle{color:var(--ag-secondary-foreground-color)}.ag-list-item,.ag-virtual-list-item{height:var(--ag-list-item-height)}.ag-virtual-list-item:focus-visible{outline:none}.ag-virtual-list-item:focus-visible:after{content:"";position:absolute;background-color:transparent;pointer-events:none;top:4px;left:4px;display:block;width:calc(100% - 8px);height:calc(100% - 8px);border:1px solid;border-color:var(--ag-input-focus-border-color)}.ag-select-list{background-color:var(--ag-background-color);overflow-y:auto;overflow-x:hidden;border-radius:var(--ag-border-radius);border:var(--ag-borders) var(--ag-border-color)}.ag-list-item{display:flex;align-items:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ag-list-item.ag-active-item{background-color:var(--ag-row-hover-color)}.ag-select-list-item{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.ag-ltr .ag-select-list-item{padding-left:calc(var(--ag-cell-horizontal-padding) / 2)}.ag-rtl .ag-select-list-item{padding-right:calc(var(--ag-cell-horizontal-padding) / 2)}.ag-select-list-item span{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.ag-row-drag,.ag-selection-checkbox,.ag-group-expanded,.ag-group-contracted{color:var(--ag-secondary-foreground-color)}.ag-ltr .ag-row-drag,.ag-ltr .ag-selection-checkbox,.ag-ltr .ag-group-expanded,.ag-ltr .ag-group-contracted{margin-right:var(--ag-cell-widget-spacing)}.ag-rtl .ag-row-drag,.ag-rtl .ag-selection-checkbox,.ag-rtl .ag-group-expanded,.ag-rtl .ag-group-contracted{margin-left:var(--ag-cell-widget-spacing)}.ag-drag-handle-disabled{opacity:.35;pointer-events:none}.ag-cell-wrapper>*:not(.ag-cell-value):not(.ag-group-value){--ag-internal-calculated-line-height: var( --ag-line-height, calc(var(--ag-row-height) - var(--ag-row-border-width)) );--ag-internal-padded-row-height: calc(var(--ag-row-height) - var(--ag-row-border-width) - 2px);height:min(var(--ag-internal-calculated-line-height),var(--ag-internal-padded-row-height));display:flex;align-items:center;flex:none}.ag-group-expanded,.ag-group-contracted{cursor:pointer}.ag-group-title-bar-icon{cursor:pointer;flex:none;color:var(--ag-secondary-foreground-color)}.ag-ltr .ag-group-child-count{margin-left:2px}.ag-rtl .ag-group-child-count{margin-right:2px}.ag-group-title-bar{background-color:var(--ag-subheader-background-color);padding:var(--ag-grid-size)}.ag-group-toolbar{padding:var(--ag-grid-size);background-color:var(--ag-subheader-toolbar-background-color)}.ag-disabled-group-title-bar,.ag-disabled-group-container{opacity:.5}.group-item{margin:calc(var(--ag-grid-size) * .5) 0}.ag-label{white-space:nowrap}.ag-ltr .ag-label{margin-right:var(--ag-grid-size)}.ag-rtl .ag-label{margin-left:var(--ag-grid-size)}.ag-label-align-top .ag-label{margin-bottom:calc(var(--ag-grid-size) * .5)}.ag-angle-select[disabled]{color:var(--ag-disabled-foreground-color);pointer-events:none}.ag-angle-select[disabled] .ag-angle-select-field{opacity:.4}.ag-ltr .ag-slider-field,.ag-ltr .ag-angle-select-field{margin-right:calc(var(--ag-grid-size) * 2)}.ag-rtl .ag-slider-field,.ag-rtl .ag-angle-select-field{margin-left:calc(var(--ag-grid-size) * 2)}.ag-angle-select-parent-circle{width:24px;height:24px;border-radius:12px;border:solid 1px;border-color:var(--ag-border-color);background-color:var(--ag-background-color)}.ag-angle-select-child-circle{top:4px;left:12px;width:6px;height:6px;margin-left:-3px;margin-top:-4px;border-radius:3px;background-color:var(--ag-secondary-foreground-color)}.ag-picker-field-wrapper{border:var(--ag-borders);border-color:var(--ag-border-color);border-radius:5px;background-color:var(--ag-background-color)}.ag-picker-field-wrapper:disabled{color:var(--ag-disabled-foreground-color);background-color:var(--ag-input-disabled-background-color);border-color:var(--ag-input-disabled-border-color)}.ag-picker-field-wrapper.ag-picker-has-focus,.ag-picker-field-wrapper:focus-within{outline:none;box-shadow:var(--ag-input-focus-box-shadow);border-color:var(--ag-input-focus-border-color)}.ag-picker-field-wrapper.ag-picker-has-focus.invalid,.ag-picker-field-wrapper:focus-within.invalid{box-shadow:var(--ag-input-error-focus-box-shadow)}.ag-picker-field-wrapper.invalid{border:var(--ag-borders-input-invalid) var(--ag-input-border-color-invalid)}.ag-picker-field-button{background-color:var(--ag-background-color);color:var(--ag-secondary-foreground-color)}.ag-dialog.ag-color-dialog{border-radius:5px}.ag-color-picker .ag-picker-field-wrapper{padding-left:var(--ag-grid-size);padding-right:var(--ag-grid-size)}.ag-color-picker .ag-picker-field-display{display:flex;flex-direction:row;align-items:center;min-height:var(--ag-list-item-height)}.ag-ltr .ag-color-picker-color,.ag-ltr .ag-color-picker-value{margin-right:var(--ag-grid-size)}.ag-rtl .ag-color-picker-color,.ag-rtl .ag-color-picker-value{margin-left:var(--ag-grid-size)}.ag-color-panel{padding:var(--ag-grid-size)}.ag-spectrum-color{background-color:red;border-radius:2px}.ag-spectrum-tools{padding:10px}.ag-spectrum-sat{background-image:linear-gradient(to right,#fff,#cc9a8100)}.ag-spectrum-val{background-image:linear-gradient(to top,#000,#cc9a8100)}.ag-spectrum-dragger{border-radius:12px;height:12px;width:12px;border:2px solid white;background:#000;box-shadow:0 0 2px #0000003d}.ag-spectrum-hue-background,.ag-spectrum-alpha-background{border-radius:2px}.ag-spectrum-tool{margin-bottom:10px;height:11px;border-radius:2px}.ag-spectrum-slider{margin-top:-12px;width:13px;height:13px;border-radius:13px;border:2px solid white;box-shadow:0 1px 4px #0000005e}.ag-recent-colors{margin-top:10px}.ag-recent-color{margin:0 3px}.ag-recent-color:first-child{margin-left:0}.ag-recent-color:last-child{margin-right:0}.ag-spectrum-color:focus-visible:not(:disabled):not([readonly]),.ag-spectrum-slider:focus-visible:not(:disabled):not([readonly]),.ag-recent-color:focus-visible:not(:disabled):not([readonly]){box-shadow:var(--ag-input-focus-box-shadow)}.ag-ltr .ag-color-input input[class^=ag-][type=text].ag-input-field-input{padding-left:calc(var(--ag-icon-size) + var(--ag-grid-size) * 2)}.ag-rtl .ag-color-input input[class^=ag-][type=text].ag-input-field-input{padding-right:calc(var(--ag-icon-size) + var(--ag-grid-size) * 2)}.ag-color-input .ag-color-input-color{position:absolute}.ag-ltr .ag-color-input .ag-color-input-color{margin-left:var(--ag-grid-size)}.ag-rtl .ag-color-input .ag-color-input-color{margin-right:var(--ag-grid-size)}.ag-color-picker-color,.ag-color-input-color{width:var(--ag-icon-size);height:var(--ag-icon-size);border:var(--ag-borders-secondary) var(--ag-secondary-border-color);border-radius:2px}.ag-dnd-ghost{border:var(--ag-borders) var(--ag-border-color);background:var(--ag-background-color);border-radius:var(--ag-card-radius);box-shadow:var(--ag-card-shadow);padding:var(--ag-grid-size);overflow:hidden;text-overflow:ellipsis;border:var(--ag-borders-secondary) var(--ag-secondary-border-color);color:var(--ag-secondary-foreground-color);height:var(--ag-header-height);line-height:var(--ag-header-height);margin:0;padding:0 calc(var(--ag-grid-size) * 2);transform:translateY(calc(var(--ag-grid-size) * 2))}.ag-dnd-ghost-not-allowed{border-color:color-mix(in srgb,var(--ag-background-color),var(--ag-invalid-color) 50%)}.ag-dnd-ghost-icon{margin-right:var(--ag-grid-size);color:var(--ag-foreground-color)}.ag-popup-child:not(.ag-tooltip-custom){box-shadow:var(--ag-popup-shadow)}.ag-select .ag-picker-field-wrapper{min-height:var(--ag-list-item-height);cursor:default}.ag-ltr .ag-select .ag-picker-field-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding) / 2)}.ag-rtl .ag-select .ag-picker-field-wrapper{padding-right:calc(var(--ag-cell-horizontal-padding) / 2)}.ag-ltr .ag-select .ag-picker-field-wrapper{padding-right:var(--ag-grid-size)}.ag-rtl .ag-select .ag-picker-field-wrapper{padding-left:var(--ag-grid-size)}.ag-select.ag-disabled .ag-picker-field-wrapper:focus{box-shadow:none}.ag-select:not(.ag-cell-editor,.ag-label-align-top){min-height:var(--ag-list-item-height)}.ag-select .ag-picker-field-display{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ag-select .ag-picker-field-icon{display:flex;align-items:center}.ag-select.ag-disabled{opacity:.5}.ag-rich-select-value,.ag-rich-select-list{background-color:var(--ag-background-color)}.ag-rich-select-list{width:100%;height:auto;border-radius:var(--ag-border-radius);border:var(--ag-borders) var(--ag-border-color)}.ag-rich-select-list .ag-rich-select-loading{padding:var(--ag-widget-vertical-spacing) var(--ag-widget-horizontal-spacing)}.ag-rich-select-value{border-bottom:var(--ag-borders-secondary) var(--ag-secondary-border-color);padding-top:0;padding-bottom:0}.ag-ltr .ag-rich-select-value{padding-left:calc(var(--ag-cell-horizontal-padding) / 2)}.ag-rtl .ag-rich-select-value{padding-right:calc(var(--ag-cell-horizontal-padding) / 2)}.ag-ltr .ag-rich-select-value{padding-right:var(--ag-grid-size)}.ag-rtl .ag-rich-select-value{padding-left:var(--ag-grid-size)}.ag-ltr .ag-rich-select-field-input{left:calc(var(--ag-cell-horizontal-padding))}.ag-rtl .ag-rich-select-field-input{right:calc(var(--ag-cell-horizontal-padding))}.ag-ltr .ag-rich-select-typing-multi .ag-rich-select-field-input{margin-left:.25rem}.ag-rtl .ag-rich-select-typing-multi .ag-rich-select-field-input{margin-right:.25rem}.ag-ltr .ag-rich-select-typing-multi .ag-rich-select-deselect-button{margin-left:auto}.ag-rtl .ag-rich-select-typing-multi .ag-rich-select-deselect-button{margin-right:auto}.ag-ltr .ag-rich-select-typing-multi .ag-rich-select-deselect-button.ag-hidden+.ag-picker-field-icon{margin-left:auto}.ag-rtl .ag-rich-select-typing-multi .ag-rich-select-deselect-button.ag-hidden+.ag-picker-field-icon{margin-right:auto}.ag-popup-editor .ag-rich-select-value{height:var(--ag-row-height);min-width:200px}.ag-rich-select-virtual-list-item{cursor:default;height:var(--ag-list-item-height)}.ag-rich-select-virtual-list-item:focus-visible:after{content:none}.ag-ltr .ag-rich-select-row{padding-left:calc(var(--ag-cell-horizontal-padding) / 2)}.ag-rtl .ag-rich-select-row{padding-right:calc(var(--ag-cell-horizontal-padding) / 2)}.ag-rich-select-row-selected{background-color:var(--ag-selected-row-background-color)}.ag-rich-select-row:hover,.ag-rich-select-row-highlighted{background-image:linear-gradient(var(--ag-row-hover-color),var(--ag-row-hover-color))}.ag-rich-select-row-text-highlight{font-weight:700}.ag-autocomplete{width:100%}.ag-autocomplete-list{width:100%;min-width:200px;height:calc(var(--ag-row-height) * 6.5)}.ag-autocomplete-virtual-list-item{cursor:default;height:var(--ag-list-item-height)}.ag-autocomplete-virtual-list-item:focus-visible:after{content:none}.ag-autocomplete-virtual-list-item:hover{background-color:var(--ag-row-hover-color)}.ag-autocomplete-row-label{margin:0px var(--ag-widget-container-horizontal-padding)}.ag-autocomplete-row-selected{background-color:var(--ag-selected-row-background-color)}.ag-pill{border:1px solid var(--ag-chip-border-color);border-radius:var(--ag-border-radius);background-color:var(--ag-chip-background-color)}.ag-ltr .ag-pill .ag-pill-button{margin-left:var(--ag-grid-size)}.ag-rtl .ag-pill .ag-pill-button{margin-right:var(--ag-grid-size)}.ag-pill:focus-visible{border-color:var(--ag-input-focus-border-color)}.ag-pill .ag-pill-button:hover{cursor:pointer}.ag-content-editable-field-input{background-color:var(--ag-background-color);border:var(--ag-borders-input) var(--ag-input-border-color);border-radius:var(--ag-border-radius);color:var(--ag-foreground-color)}.ag-ltr .ag-content-editable-field-input{padding-left:var(--ag-grid-size)}.ag-rtl .ag-content-editable-field-input{padding-right:var(--ag-grid-size)}.ag-cell-editor .ag-wrapper.ag-content-editable-field-input{--ag-internal-calculated-line-height: var( --ag-line-height, calc(var(--ag-row-height) - var(--ag-row-border-width)) );--ag-internal-padded-row-height: calc(var(--ag-row-height) - var(--ag-row-border-width) - 2px);line-height:min(var(--ag-internal-calculated-line-height),var(--ag-internal-padded-row-height))}.ag-content-editable-field-input:focus,.ag-content-editable-field-input:focus-within{box-shadow:var(--ag-input-focus-box-shadow);border-color:var(--ag-input-focus-border-color)}:where(.ag-content-editable-field.ag-disabled .ag-content-editable-field-input){background-color:var(--ag-input-disabled-background-color);border-color:var(--ag-input-disabled-border-color);color:var(--ag-disabled-foreground-color)}.ag-content-editable-field-input.invalid{border-color:var(--ag-invalid-color)}.ag-formula-token{line-height:var(--ag-line-height, 1.6)}.ag-formula-token-color-1{color:var(--ag-formula-token-1-color)}.ag-formula-token-color-2{color:var(--ag-formula-token-2-color)}.ag-formula-token-color-3{color:var(--ag-formula-token-3-color)}.ag-formula-token-color-4{color:var(--ag-formula-token-4-color)}.ag-formula-token-color-5{color:var(--ag-formula-token-5-color)}.ag-formula-token-color-6{color:var(--ag-formula-token-6-color)}.ag-formula-token-color-7{color:var(--ag-formula-token-7-color)}.ag-formula-range-color-1{--ag-range-selection-border-color: var(--ag-formula-token-1-color);--ag-range-selection-background-color: var(--ag-formula-token-1-background-color)}.ag-formula-range-color-2{--ag-range-selection-border-color: var(--ag-formula-token-2-color);--ag-range-selection-background-color: var(--ag-formula-token-2-background-color)}.ag-formula-range-color-3{--ag-range-selection-border-color: var(--ag-formula-token-3-color);--ag-range-selection-background-color: var(--ag-formula-token-3-background-color)}.ag-formula-range-color-4{--ag-range-selection-border-color: var(--ag-formula-token-4-color);--ag-range-selection-background-color: var(--ag-formula-token-4-background-color)}.ag-formula-range-color-5{--ag-range-selection-border-color: var(--ag-formula-token-5-color);--ag-range-selection-background-color: var(--ag-formula-token-5-background-color)}.ag-formula-range-color-6{--ag-range-selection-border-color: var(--ag-formula-token-6-color);--ag-range-selection-background-color: var(--ag-formula-token-6-background-color)}.ag-formula-range-color-7{--ag-range-selection-border-color: var(--ag-formula-token-7-color);--ag-range-selection-background-color: var(--ag-formula-token-7-background-color)}.ag-range-handle.ag-formula-range-color-1,.ag-fill-handle.ag-formula-range-color-1{background-color:var(--ag-formula-token-1-color)}.ag-range-handle.ag-formula-range-color-2,.ag-fill-handle.ag-formula-range-color-2{background-color:var(--ag-formula-token-2-color)}.ag-range-handle.ag-formula-range-color-3,.ag-fill-handle.ag-formula-range-color-3{background-color:var(--ag-formula-token-3-color)}.ag-range-handle.ag-formula-range-color-4,.ag-fill-handle.ag-formula-range-color-4{background-color:var(--ag-formula-token-4-color)}.ag-range-handle.ag-formula-range-color-5,.ag-fill-handle.ag-formula-range-color-5{background-color:var(--ag-formula-token-5-color)}.ag-range-handle.ag-formula-range-color-6,.ag-fill-handle.ag-formula-range-color-6{background-color:var(--ag-formula-token-6-color)}.ag-dragging-range-handle .ag-dialog,.ag-dragging-fill-handle .ag-dialog{opacity:.7;pointer-events:none}.ag-dialog{border-radius:var(--ag-border-radius);border:var(--ag-borders) var(--ag-border-color);box-shadow:var(--ag-popup-shadow)}.ag-panel{background-color:var(--ag-panel-background-color);border-color:var(--ag-panel-border-color)}.ag-panel-title-bar{color:var(--ag-header-foreground-color);height:var(--ag-header-height);padding:var(--ag-grid-size) var(--ag-cell-horizontal-padding);border-bottom:var(--ag-borders) var(--ag-border-color)}.ag-ltr .ag-panel-title-bar-button{margin-left:var(--ag-grid-size)}.ag-rtl .ag-panel-title-bar-button{margin-right:var(--ag-grid-size)}.ag-tooltip{background-color:var(--ag-tooltip-background-color);color:var(--ag-foreground-color);padding:var(--ag-grid-size);border:var(--ag-borders) var(--ag-border-color);border-radius:var(--ag-card-radius);white-space:normal}.ag-tooltip.ag-cell-editor-tooltip,.ag-tooltip.ag-cell-formula-tooltip{background-color:var(--ag-tooltip-error-background-color);color:var(--ag-tooltip-error-text-color);border:var(--ag-borders) var(--ag-tooltip-error-border-color);font-weight:500}.ag-tooltip.ag-tooltip-animate,.ag-tooltip-custom.ag-tooltip-animate{transition:opacity 1s}.ag-tooltip.ag-tooltip-animate.ag-tooltip-hiding,.ag-tooltip-custom.ag-tooltip-animate.ag-tooltip-hiding{opacity:0}.ag-ltr .ag-column-select-column,.ag-ltr .ag-column-select-column-group{padding-left:calc(var(--ag-indentation-level) * var(--ag-column-select-indent-size))}.ag-rtl .ag-column-select-column,.ag-rtl .ag-column-select-column-group{padding-right:calc(var(--ag-indentation-level) * var(--ag-column-select-indent-size))}.ag-column-select-header-icon{cursor:pointer}.ag-column-select-header-icon:focus-visible{outline:none}.ag-column-select-header-icon:focus-visible:after{content:"";position:absolute;background-color:transparent;pointer-events:none;top:0;left:0;display:block;width:calc(100% + -0px);height:calc(100% + -0px);border:1px solid;border-color:var(--ag-input-focus-border-color)}.ag-ltr .ag-column-group-icons:not(:last-child),.ag-ltr .ag-column-select-header-icon:not(:last-child),.ag-ltr .ag-column-select-header-checkbox:not(:last-child),.ag-ltr .ag-column-select-header-filter-wrapper:not(:last-child),.ag-ltr .ag-column-select-checkbox:not(:last-child),.ag-ltr .ag-column-select-column-drag-handle:not(:last-child),.ag-ltr .ag-column-select-column-group-drag-handle:not(:last-child),.ag-ltr .ag-column-select-column-label:not(:last-child){margin-right:var(--ag-widget-horizontal-spacing)}.ag-rtl .ag-column-group-icons:not(:last-child),.ag-rtl .ag-column-select-header-icon:not(:last-child),.ag-rtl .ag-column-select-header-checkbox:not(:last-child),.ag-rtl .ag-column-select-header-filter-wrapper:not(:last-child),.ag-rtl .ag-column-select-checkbox:not(:last-child),.ag-rtl .ag-column-select-column-drag-handle:not(:last-child),.ag-rtl .ag-column-select-column-group-drag-handle:not(:last-child),.ag-rtl .ag-column-select-column-label:not(:last-child){margin-left:var(--ag-widget-horizontal-spacing)}.ag-column-select-virtual-list-item:focus-visible{outline:none}.ag-column-select-virtual-list-item:focus-visible:after{content:"";position:absolute;background-color:transparent;pointer-events:none;top:1px;left:1px;display:block;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid;border-color:var(--ag-input-focus-border-color)}.ag-column-select-column-group:not(:last-child),.ag-column-select-column:not(:last-child){margin-bottom:var(--ag-widget-vertical-spacing)}.ag-column-select-column-readonly,.ag-column-select-column-group-readonly{color:var(--ag-disabled-foreground-color);pointer-events:none}.ag-ltr .ag-column-select-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-grid-size) * 2)}.ag-rtl .ag-column-select-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-grid-size) * 2)}.ag-column-select-virtual-list-viewport{padding:calc(var(--ag-widget-container-vertical-padding) * .5) 0px}.ag-column-select-virtual-list-item{padding:0 var(--ag-widget-container-horizontal-padding)}.ag-checkbox-edit{padding-left:var(--ag-cell-horizontal-padding);padding-right:var(--ag-cell-horizontal-padding)}.ag-pill-select .ag-column-drop{border-bottom:0;min-height:unset}.ag-pill-select .ag-column-drop-list{padding:0}.ag-pill-select .ag-select{padding-top:var(--ag-grid-size)}.ag-pill-select .ag-picker-field-wrapper{background-color:transparent;border:0}.ag-pill-select .ag-picker-field-display{cursor:pointer}.ag-rtl{text-align:right}.ag-root-wrapper{border-radius:var(--ag-wrapper-border-radius);border:var(--ag-borders) var(--ag-border-color)}.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))}.ag-cell-wrapper.ag-row-group,.ag-cell-wrapper.ag-row-group-leaf-indent,.ag-cell-wrapper.ag-pivot-leaf-group{padding-left:calc(var(--ag-indentation-level) * var(--ag-row-group-indent-size))}.ag-cell-wrapper>.ag-group-checkbox-spacing{width:var(--ag-icon-size);margin-right:var(--ag-cell-widget-spacing)}.ag-ltr .ag-row-group-leaf-indent{margin-left:var(--ag-row-group-indent-size)}.ag-rtl .ag-row-group-leaf-indent{margin-right:var(--ag-row-group-indent-size)}.ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-left:var(--ag-row-group-indent-size)}.ag-value-change-delta{padding-right: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-data-color)}.ag-row{height:var(--ag-row-height);background-color:var(--ag-data-background-color);border-bottom:var(--ag-row-border-style) var(--ag-row-border-color) var(--ag-row-border-width)}.ag-row.ag-row-editing-invalid{background-color:var(--ag-full-row-invalid-background-color)}.ag-spanned-cell-wrapper{background-color:var(--ag-data-background-color);position:absolute}.ag-spanned-cell-wrapper>.ag-spanned-cell{display:block;position:relative}.ag-row-highlight-above:after,.ag-row-highlight-inside:after,.ag-row-highlight-below:after{content:"";position:absolute;width:calc(100% - 1px);height:var(--ag-row-drag-indicator-width);background-color:var(--ag-row-drag-indicator-color);border-radius:calc(var(--ag-row-drag-indicator-width) / 2);left:1px;pointer-events:none}.ag-row-highlight-above:after{top:0}.ag-row-highlight-below:after{bottom:0}.ag-row-highlight-indent:after{display:block;width:auto;left:calc(2 * (var(--ag-cell-widget-spacing) + var(--ag-icon-size)) + var(--ag-cell-horizontal-padding) + var(--ag-row-highlight-level) * var(--ag-row-group-indent-size));right:1px}.ag-row-highlight-inside:after{display:block;width:auto;height:auto;inset:0;background-color:var(--ag-selected-row-background-color);border:1px solid var(--ag-range-selection-border-color)}.ag-body,.ag-floating-top,.ag-floating-bottom{background-color:var(--ag-data-background-color)}.ag-row-odd{background-color:var(--ag-odd-row-background-color)}.ag-body-horizontal-scroll:not(.ag-scrollbar-invisible) .ag-horizontal-left-spacer:not(.ag-scroller-corner){border-right:var(--ag-borders-critical) var(--ag-border-color)}.ag-body-horizontal-scroll:not(.ag-scrollbar-invisible) .ag-horizontal-right-spacer:not(.ag-scroller-corner){border-left:var(--ag-borders-critical) var(--ag-border-color)}.ag-row-selected:before{content:"";background-color:var(--ag-selected-row-background-color);display:block;position:absolute;inset:0}.ag-row-hover:not(.ag-full-width-row):before,.ag-row-hover.ag-full-width-row.ag-row-group:before{content:"";background-color:var(--ag-row-hover-color);display:block;position:absolute;inset:0;pointer-events:none}.ag-row.ag-full-width-row.ag-row-group>*{position:relative}.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-column-hover{background-color:var(--ag-column-hover-color)}.ag-header-range-highlight{background-color:var(--ag-range-header-highlight-color)}.ag-ltr .ag-right-aligned-cell{text-align:right}.ag-rtl .ag-right-aligned-cell{text-align:left}.ag-ltr .ag-right-aligned-cell .ag-cell-value,.ag-ltr .ag-right-aligned-cell .ag-group-value{margin-left:auto}.ag-rtl .ag-right-aligned-cell .ag-cell-value,.ag-rtl .ag-right-aligned-cell .ag-group-value{margin-right:auto}.ag-ltr .ag-right-aligned-cell .ag-skeleton-effect{margin-left:auto}.ag-rtl .ag-right-aligned-cell .ag-skeleton-effect{margin-right:auto}.ag-cell,.ag-full-width-row .ag-cell-wrapper.ag-row-group{--ag-internal-calculated-line-height: var( --ag-line-height, calc(var(--ag-row-height) - var(--ag-row-border-width)) );--ag-internal-padded-row-height: calc(var(--ag-row-height) - var(--ag-row-border-width) - 2px);border:1px solid transparent;line-height:min(var(--ag-internal-calculated-line-height),var(--ag-internal-padded-row-height));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);-webkit-font-smoothing:subpixel-antialiased}.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-cell-inline-editing{border:1px solid var(--ag-border-color);border-radius:var(--ag-card-radius);box-shadow:var(--ag-card-shadow);padding:0;background-color:var(--ag-control-panel-background-color)}.ag-popup-editor .ag-large-text,.ag-autocomplete-list-popup{border:var(--ag-borders) var(--ag-border-color);background:var(--ag-background-color);border-radius:var(--ag-card-radius);box-shadow:var(--ag-card-shadow);padding:var(--ag-grid-size);background-color:var(--ag-control-panel-background-color);padding:0}.ag-large-text-input{height:auto;padding:var(--ag-cell-horizontal-padding)}.ag-rtl .ag-large-text-input textarea{resize:none}.ag-details-row{padding:calc(var(--ag-grid-size) * 5);background-color:var(--ag-data-background-color)}.ag-layout-auto-height .ag-center-cols-viewport,.ag-layout-auto-height .ag-center-cols-container,.ag-layout-print .ag-center-cols-viewport,.ag-layout-print .ag-center-cols-container{min-height:50px}.ag-overlay-loading-wrapper,.ag-overlay-exporting-wrapper,.ag-overlay-modal-wrapper{background-color:var(--ag-modal-overlay-background-color)}.ag-overlay-loading-center,.ag-overlay-exporting-center{border:var(--ag-borders) var(--ag-border-color);background:var(--ag-background-color);border-radius:var(--ag-card-radius);box-shadow:var(--ag-card-shadow);padding:var(--ag-grid-size);display:flex}.ag-skeleton-container{width:100%;height:100%;align-content:center}.ag-skeleton-effect{background-color:var(--ag-row-loading-skeleton-effect-color);width:100%;height:1em;border-radius:.25rem;animation:ag-skeleton-loading 1.5s ease-in-out .5s infinite}@keyframes ag-skeleton-loading{0%{opacity:1}50%{opacity:.4}to{opacity:1}}.ag-loading{display:flex;height:100%;align-items:center}.ag-ltr .ag-loading{padding-left:var(--ag-cell-horizontal-padding)}.ag-rtl .ag-loading{padding-right:var(--ag-cell-horizontal-padding)}.ag-ltr .ag-loading-icon{padding-right:var(--ag-cell-widget-spacing)}.ag-rtl .ag-loading-icon{padding-left:var(--ag-cell-widget-spacing)}.ag-icon-loading{animation-name:spin;animation-duration:1s;animation-iteration-count:infinite;animation-timing-function:linear}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ag-floating-top:not(.ag-invisible){border-bottom:var(--ag-borders-critical) var(--ag-border-color)}.ag-floating-bottom:not(.ag-invisible){border-top:var(--ag-borders-critical) var(--ag-border-color)}.ag-find-cell{display:block;overflow:hidden;text-overflow:ellipsis}.ag-find-match{color:var(--ag-find-match-color);background-color:var(--ag-find-match-background-color)}.ag-find-active-match{color:var(--ag-find-active-match-color);background-color:var(--ag-find-active-match-background-color)}.ag-ltr .ag-cell{border-right:var(--ag-cell-horizontal-border)}.ag-rtl .ag-cell{border-left:var(--ag-cell-horizontal-border)}.ag-ltr .ag-cell{border-right-width:1px}.ag-rtl .ag-cell{border-left-width:1px}.ag-cell.ag-cell-first-right-pinned:not(.ag-cell-range-left):not(.ag-cell-range-single-cell){border-left:var(--ag-borders-critical) var(--ag-border-color)}.ag-cell.ag-cell-last-left-pinned:not(.ag-cell-range-right):not(.ag-cell-range-single-cell){border-right:var(--ag-borders-critical) var(--ag-border-color)}.ag-cell-range-selected:not(.ag-cell-focus),.ag-cell-range-selected.ag-cell-range-chart,.ag-body-viewport:not(.ag-has-focus) .ag-cell-range-single-cell:not(.ag-cell-inline-editing){background-color:var(--ag-range-selection-background-color)}.ag-cell-range-selected:not(.ag-cell-focus).ag-cell-range-chart,.ag-cell-range-selected.ag-cell-range-chart.ag-cell-range-chart,.ag-body-viewport:not(.ag-has-focus) .ag-cell-range-single-cell:not(.ag-cell-inline-editing).ag-cell-range-chart{background-color:var(--ag-range-selection-chart-background-color)!important}.ag-cell-range-selected:not(.ag-cell-focus).ag-cell-range-chart.ag-cell-range-chart-category,.ag-cell-range-selected.ag-cell-range-chart.ag-cell-range-chart.ag-cell-range-chart-category,.ag-body-viewport:not(.ag-has-focus) .ag-cell-range-single-cell:not(.ag-cell-inline-editing).ag-cell-range-chart.ag-cell-range-chart-category{background-color:var(--ag-range-selection-chart-category-background-color)!important}.ag-cell-range-selected-1:not(.ag-cell-focus),.ag-cell-range-selected-1.ag-cell-range-chart,.ag-cell-range-selected-1.ag-formula-range,.ag-root:not(.ag-context-menu-open) .ag-body-viewport:not(.ag-has-focus) .ag-cell-range-selected-1:not(.ag-cell-inline-editing){background-color:var(--ag-range-selection-background-color)}.ag-cell-range-selected-2:not(.ag-cell-focus),.ag-cell-range-selected-2.ag-cell-range-chart,.ag-cell-range-selected-2.ag-formula-range,.ag-body-viewport:not(.ag-has-focus) .ag-cell-range-selected-2{background-color:var(--ag-range-selection-background-color-2)}.ag-cell-range-selected-3:not(.ag-cell-focus),.ag-cell-range-selected-3.ag-cell-range-chart,.ag-cell-range-selected-3.ag-formula-range,.ag-body-viewport:not(.ag-has-focus) .ag-cell-range-selected-3{background-color:var(--ag-range-selection-background-color-3)}.ag-cell-range-selected-4:not(.ag-cell-focus),.ag-cell-range-selected-4.ag-cell-range-chart,.ag-cell-range-selected-4.ag-formula-range,.ag-body-viewport:not(.ag-has-focus) .ag-cell-range-selected-4{background-color:var(--ag-range-selection-background-color-4)}.ag-cell.ag-cell-range-selected:not(.ag-cell-range-single-cell).ag-cell-range-top{border-top-color:var(--ag-range-selection-border-color);border-top-style:var(--ag-range-selection-border-style)}.ag-cell.ag-cell-range-selected:not(.ag-cell-range-single-cell).ag-cell-range-right{border-right-color:var(--ag-range-selection-border-color);border-right-style:var(--ag-range-selection-border-style)}.ag-cell.ag-cell-range-selected:not(.ag-cell-range-single-cell).ag-cell-range-bottom{border-bottom-color:var(--ag-range-selection-border-color);border-bottom-style:var(--ag-range-selection-border-style)}.ag-cell.ag-cell-range-selected:not(.ag-cell-range-single-cell).ag-cell-range-left{border-left-color:var(--ag-range-selection-border-color);border-left-style:var(--ag-range-selection-border-style)}.ag-ltr .ag-cell-focus:not(.ag-cell-range-selected):focus-within,.ag-ltr .ag-context-menu-open .ag-cell-focus:not(.ag-cell-range-selected),.ag-ltr .ag-full-width-row.ag-row-focus:focus .ag-cell-wrapper.ag-row-group,.ag-ltr .ag-cell-range-single-cell,.ag-ltr .ag-cell-range-single-cell.ag-cell-range-handle,.ag-rtl .ag-cell-focus:not(.ag-cell-range-selected):focus-within,.ag-rtl .ag-context-menu-open .ag-cell-focus:not(.ag-cell-range-selected),.ag-rtl .ag-full-width-row.ag-row-focus:focus .ag-cell-wrapper.ag-row-group,.ag-rtl .ag-cell-range-single-cell,.ag-rtl .ag-cell-range-single-cell.ag-cell-range-handle{border:1px solid;border-color:var(--ag-range-selection-border-color);border-style:var(--ag-range-selection-border-style);outline:initial}.ag-cell.ag-selection-fill-top,.ag-cell.ag-selection-fill-top.ag-cell-range-selected{border-top:1px dashed;border-top-color:var(--ag-range-selection-border-color)}.ag-ltr .ag-cell.ag-selection-fill-right,.ag-ltr .ag-cell.ag-selection-fill-right.ag-cell-range-selected{border-right:1px dashed var(--ag-range-selection-border-color)!important}.ag-rtl .ag-cell.ag-selection-fill-right,.ag-rtl .ag-cell.ag-selection-fill-right.ag-cell-range-selected{border-left:1px dashed var(--ag-range-selection-border-color)!important}.ag-cell.ag-selection-fill-bottom,.ag-cell.ag-selection-fill-bottom.ag-cell-range-selected{border-bottom:1px dashed;border-bottom-color:var(--ag-range-selection-border-color)}.ag-ltr .ag-cell.ag-selection-fill-left,.ag-ltr .ag-cell.ag-selection-fill-left.ag-cell-range-selected{border-left:1px dashed var(--ag-range-selection-border-color)!important}.ag-rtl .ag-cell.ag-selection-fill-left,.ag-rtl .ag-cell.ag-selection-fill-left.ag-cell-range-selected{border-right:1px dashed var(--ag-range-selection-border-color)!important}.ag-fill-handle,.ag-range-handle{position:absolute;width:6px;height:6px;bottom:-1px;background-color:var(--ag-range-selection-border-color)}.ag-ltr .ag-fill-handle,.ag-ltr .ag-range-handle{right:-1px}.ag-rtl .ag-fill-handle,.ag-rtl .ag-range-handle{left:-1px}.ag-fill-handle{cursor:crosshair}.ag-range-handle{cursor:nwse-resize}.ag-cell-inline-editing{border-color:var(--ag-input-focus-border-color)!important}.ag-cell-inline-editing.ag-cell-editing-error{border-color:var(--ag-invalid-color)!important}.ag-menu{border:var(--ag-borders) var(--ag-border-color);background:var(--ag-background-color);border-radius:var(--ag-card-radius);box-shadow:var(--ag-card-shadow);padding:var(--ag-grid-size);background-color:var(--ag-menu-background-color);border-color:var(--ag-menu-border-color);padding:0}.ag-menu.ag-tabs{min-width:var(--ag-tab-min-width)}.ag-menu-list{cursor:default;padding:var(--ag-grid-size) 0}.ag-menu-separator{height:calc(var(--ag-grid-size) * 2 + 1px)}.ag-menu-separator-part:after{content:"";display:block;border-top:var(--ag-borders-critical) var(--ag-border-color)}.ag-menu-option{position:relative}.ag-menu-option:focus-visible{outline:none}.ag-menu-option:focus-visible:after{content:"";position:absolute;background-color:transparent;pointer-events:none;top:1px;left:1px;display:block;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid;border-color:var(--ag-input-focus-border-color)}.ag-menu-option-active,.ag-compact-menu-option-active{background-color:var(--ag-row-hover-color)}.ag-menu-option-part,.ag-compact-menu-option-part{line-height:var(--ag-icon-size);padding:calc(var(--ag-grid-size) + 2px) 0}.ag-menu-option-disabled,.ag-compact-menu-option-disabled{opacity:.5}.ag-menu-option-icon,.ag-compact-menu-option-icon{width:var(--ag-icon-size)}.ag-ltr .ag-menu-option-icon,.ag-ltr .ag-compact-menu-option-icon{padding-left:calc(var(--ag-grid-size) * 2)}.ag-rtl .ag-menu-option-icon,.ag-rtl .ag-compact-menu-option-icon{padding-right:calc(var(--ag-grid-size) * 2)}.ag-menu-option-text,.ag-compact-menu-option-text{padding-left:calc(var(--ag-grid-size) * 2);padding-right:calc(var(--ag-grid-size) * 2)}.ag-ltr .ag-menu-option-shortcut,.ag-ltr .ag-compact-menu-option-shortcut{padding-right:var(--ag-grid-size)}.ag-rtl .ag-menu-option-shortcut,.ag-rtl .ag-compact-menu-option-shortcut{padding-left:var(--ag-grid-size)}.ag-ltr .ag-menu-option-popup-pointer,.ag-ltr .ag-compact-menu-option-popup-pointer{padding-right:var(--ag-grid-size)}.ag-rtl .ag-menu-option-popup-pointer,.ag-rtl .ag-compact-menu-option-popup-pointer{padding-left:var(--ag-grid-size)}.ag-tabs-header,.ag-tabs-header-wrapper{display:flex}.ag-tabs-header-wrapper .ag-tabs-header{flex:1}.ag-tabs-close-button-wrapper{border:0;border-right:var(--ag-borders) var(--ag-border-color);padding:var(--ag-grid-size)}.ag-tabs-close-button{border:0;background-color:unset;cursor:pointer;padding:0}.ag-tab{border-bottom:var(--ag-selected-tab-underline-width) solid transparent;transition:border-bottom var(--ag-selected-tab-underline-transition-speed);display:flex;flex:none;align-items:center;justify-content:center;cursor:pointer}.ag-tab:focus-visible{outline:none}.ag-tab:focus-visible:after{content:"";position:absolute;background-color:transparent;pointer-events:none;top:4px;left:4px;display:block;width:calc(100% - 8px);height:calc(100% - 8px);border:1px solid;border-color:var(--ag-input-focus-border-color)}.ag-tab-selected{border-bottom-color:var(--ag-selected-tab-underline-color)}.ag-menu-header{color:var(--ag-secondary-foreground-color)}.ag-filter-separator{border-top:var(--ag-borders-critical) var(--ag-border-color)}.ag-filter-select .ag-picker-field-wrapper{width:0}.ag-filter-condition-operator{height:17px}.ag-ltr .ag-filter-condition-operator-or{margin-left:calc(var(--ag-grid-size) * 2)}.ag-rtl .ag-filter-condition-operator-or{margin-right:calc(var(--ag-grid-size) * 2)}.ag-set-filter-select-all{padding-top:var(--ag-widget-container-vertical-padding)}.ag-set-filter-list,.ag-filter-no-matches{height:calc(var(--ag-list-item-height) * 6)}.ag-set-filter-tree-list{height:calc(var(--ag-list-item-height) * 10)}.ag-set-filter-filter{margin-top:var(--ag-widget-container-vertical-padding);margin-left:var(--ag-widget-container-horizontal-padding);margin-right:var(--ag-widget-container-horizontal-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)}.ag-set-filter{--ag-indentation-level: 0}.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))}.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-ltr .ag-set-filter-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}.ag-rtl .ag-set-filter-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}.ag-ltr .ag-set-filter-group-icons{margin-right:var(--ag-widget-container-horizontal-padding)}.ag-rtl .ag-set-filter-group-icons{margin-left:var(--ag-widget-container-horizontal-padding)}.ag-filter-menu .ag-set-filter-list{min-width:200px}.ag-filter-virtual-list-item:focus-visible{outline:none}.ag-filter-virtual-list-item:focus-visible:after{content:"";position:absolute;background-color:transparent;pointer-events:none;top:1px;left:1px;display:block;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid;border-color:var(--ag-input-focus-border-color)}.ag-filter-apply-panel{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);border-top:var(--ag-borders-secondary) var(--ag-secondary-border-color)}.ag-filter-apply-panel-button{line-height:1.5}.ag-ltr .ag-filter-apply-panel-button{margin-left:calc(var(--ag-grid-size) * 2)}.ag-rtl .ag-filter-apply-panel-button{margin-right:calc(var(--ag-grid-size) * 2)}.ag-simple-filter-body-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);padding-bottom:var(--ag-widget-container-vertical-padding);overflow-y:auto;min-height:calc(var(--ag-list-item-height) + var(--ag-widget-container-vertical-padding) + var(--ag-widget-vertical-spacing))}.ag-simple-filter-body-wrapper .ag-resizer-wrapper{margin:0}.ag-menu:not(.ag-tabs) .ag-filter .ag-filter-body-wrapper,.ag-menu:not(.ag-tabs) .ag-filter>*:not(.ag-filter-wrapper){min-width:calc(var(--ag-menu-min-width) - 2px)}.ag-filter-no-matches{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-multi-filter-menu-item{margin:var(--ag-grid-size) 0}.ag-multi-filter-group-title-bar{padding:calc(var(--ag-grid-size) * 2) var(--ag-grid-size);background-color:transparent}.ag-group-filter-field-select-wrapper{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);padding-bottom:calc(var(--ag-widget-container-vertical-padding) - var(--ag-widget-vertical-spacing))}.ag-group-filter-field-select-wrapper>*{margin-bottom:var(--ag-widget-vertical-spacing)}.ag-multi-filter-group-title-bar:focus-visible{outline:none}.ag-multi-filter-group-title-bar:focus-visible:after{content:"";position:absolute;background-color:transparent;pointer-events:none;top:4px;left:4px;display:block;width:calc(100% - 8px);height:calc(100% - 8px);border:1px solid;border-color:var(--ag-input-focus-border-color)}.ag-side-bar{position:relative}.ag-tool-panel-wrapper{width:var(--ag-horizontal-size, var(--ag-side-bar-panel-width));background-color:var(--ag-control-panel-background-color)}.ag-tool-panel-content{display:flex;height:100%;overflow:hidden auto}.ag-tool-panel-wrapper.ag-tool-panel-animating{display:block!important;transition:width var(--ag-side-bar-panel-animation-duration) ease-in-out}@media(prefers-reduced-motion:reduce){.ag-tool-panel-wrapper.ag-tool-panel-animating{transition:none}}.ag-tool-panel-external{display:flex;flex-direction:row}:where(.ag-tool-panel-external) .ag-tool-panel-wrapper{flex-grow:1}.ag-side-buttons{padding-top:calc(var(--ag-grid-size) * 4);width:calc(var(--ag-icon-size) + 4px);position:relative;overflow:hidden}button.ag-side-button-button{color:inherit;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;background:transparent;padding:calc(var(--ag-grid-size) * 2) 0 calc(var(--ag-grid-size) * 2) 0;width:100%;margin:0;min-height:calc(var(--ag-grid-size) * 18);background-position-y:center;background-position-x:center;background-repeat:no-repeat;border:none;border-top:var(--ag-borders-side-button) var(--ag-border-color);border-bottom:var(--ag-borders-side-button) var(--ag-border-color)}button.ag-side-button-button:focus{box-shadow:none}.ag-side-button-button:focus-visible{outline:none}.ag-side-button-button:focus-visible:after{content:"";position:absolute;background-color:transparent;pointer-events:none;top:4px;left:4px;display:block;width:calc(100% - 8px);height:calc(100% - 8px);border:1px solid;border-color:var(--ag-input-focus-border-color)}.ag-selected button.ag-side-button-button{background-color:var(--ag-side-button-selected-background-color)}.ag-side-button-icon-wrapper{margin-bottom:3px}.ag-ltr .ag-side-bar-left,.ag-rtl .ag-side-bar-right{border-right:var(--ag-borders) var(--ag-border-color)}.ag-ltr .ag-side-bar-left .ag-tool-panel-wrapper,.ag-rtl .ag-side-bar-right .ag-tool-panel-wrapper{border-left:var(--ag-borders) var(--ag-border-color)}.ag-ltr .ag-side-bar-left .ag-side-button-button,.ag-rtl .ag-side-bar-right .ag-side-button-button{border-right:var(--ag-selected-tab-underline-width) solid transparent;transition:border-right var(--ag-selected-tab-underline-transition-speed)}.ag-ltr .ag-side-bar-left .ag-selected .ag-side-button-button,.ag-rtl .ag-side-bar-right .ag-selected .ag-side-button-button{border-right-color:var(--ag-selected-tab-underline-color)}.ag-rtl .ag-side-bar-left,.ag-ltr .ag-side-bar-right{border-left:var(--ag-borders) var(--ag-border-color)}.ag-rtl .ag-side-bar-left .ag-tool-panel-wrapper,.ag-ltr .ag-side-bar-right .ag-tool-panel-wrapper{border-right:var(--ag-borders) var(--ag-border-color)}.ag-rtl .ag-side-bar-left .ag-side-button-button,.ag-ltr .ag-side-bar-right .ag-side-button-button{border-left:var(--ag-selected-tab-underline-width) solid transparent;transition:border-left var(--ag-selected-tab-underline-transition-speed)}.ag-rtl .ag-side-bar-left .ag-selected .ag-side-button-button,.ag-ltr .ag-side-bar-right .ag-selected .ag-side-button-button{border-left-color:var(--ag-selected-tab-underline-color)}.ag-filter-toolpanel-header{height:calc(var(--ag-grid-size) * 6)}.ag-filter-toolpanel-header,.ag-filter-toolpanel-search{padding:0 var(--ag-grid-size)}.ag-filter-toolpanel-header:focus-visible{outline:none}.ag-filter-toolpanel-header:focus-visible:after{content:"";position:absolute;background-color:transparent;pointer-events:none;top:4px;left:4px;display:block;width:calc(100% - 8px);height:calc(100% - 8px);border:1px solid;border-color:var(--ag-input-focus-border-color)}.ag-filter-toolpanel-group:not(.ag-has-filter)>.ag-group-title-bar .ag-filter-toolpanel-group-instance-header-icon{display:none}.ag-filter-toolpanel-group-level-0-header{height:calc(var(--ag-grid-size) * 8)}.ag-filter-toolpanel-group-item{margin-top:calc(var(--ag-grid-size) * .5);margin-bottom:calc(var(--ag-grid-size) * .5)}.ag-filter-toolpanel-search{height:var(--ag-header-height)}.ag-filter-toolpanel-search-input{flex-grow:1;height:calc(var(--ag-grid-size) * 4)}.ag-ltr .ag-filter-toolpanel-search-input{margin-right:var(--ag-grid-size)}.ag-rtl .ag-filter-toolpanel-search-input{margin-left:var(--ag-grid-size)}.ag-filter-toolpanel-group-level-0{border-top:var(--ag-borders-secondary) var(--ag-secondary-border-color)}.ag-ltr .ag-filter-toolpanel-expand,.ag-ltr .ag-filter-toolpanel-group-title-bar-icon{margin-right:var(--ag-grid-size)}.ag-rtl .ag-filter-toolpanel-expand,.ag-rtl .ag-filter-toolpanel-group-title-bar-icon{margin-left:var(--ag-grid-size)}.ag-filter-toolpanel-group-title-bar{background-color:transparent}.ag-ltr .ag-filter-toolpanel-header{padding-left:calc(var(--ag-filter-tool-panel-group-indent) * var(--ag-indentation-level, 0) + var(--ag-grid-size))}.ag-rtl .ag-filter-toolpanel-header{padding-right:calc(var(--ag-filter-tool-panel-group-indent) * var(--ag-indentation-level, 0) + var(--ag-grid-size))}.ag-filter-toolpanel-instance-filter{border-bottom:var(--ag-borders) var(--ag-border-color);border-top:var(--ag-borders) var(--ag-border-color);margin-top:var(--ag-grid-size)}.ag-ltr .ag-filter-toolpanel-group-instance-header-icon,.ag-ltr .ag-filter-toolpanel-instance-header-icon{margin-left:var(--ag-grid-size)}.ag-rtl .ag-filter-toolpanel-group-instance-header-icon,.ag-rtl .ag-filter-toolpanel-instance-header-icon{margin-right:var(--ag-grid-size)}.ag-set-filter-group-icons{color:var(--ag-secondary-foreground-color)}.ag-filter-panel{display:flex;flex-direction:column;width:100%}.ag-filter-panel .ag-simple-filter-body-wrapper{padding:var(--ag-widget-vertical-spacing) var(--ag-widget-container-horizontal-padding) 0}.ag-filter-panel .ag-mini-filter{margin-top:var(--ag-widget-vertical-spacing);margin-left:var(--ag-widget-container-horizontal-padding);margin-right:var(--ag-widget-container-horizontal-padding)}.ag-filter-panel .ag-standard-button{transition:background-color .25s ease-in-out,color .25s ease-in-out}.ag-filter-panel .ag-simple-filter-body-wrapper>*:last-child,.ag-filter-panel .ag-set-filter-body-wrapper{margin-bottom:var(--ag-widget-container-vertical-padding)}.ag-filter-panel-container{flex:1;overflow:auto;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding) 0}.ag-filter-panel-container>*:not(:last-child){margin-bottom:var(--ag-widget-container-vertical-padding)}.ag-filter-card{border:1px solid var(--ag-border-color);border-radius:var(--ag-border-radius);background-color:var(--ag-background-color)}.ag-ltr .ag-filter-card .ag-set-filter-item{padding-left:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level) * var(--ag-set-filter-indent-size));padding-right:var(--ag-widget-container-horizontal-padding)}.ag-rtl .ag-filter-card .ag-set-filter-item{padding-right:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level) * var(--ag-set-filter-indent-size));padding-left:var(--ag-widget-container-horizontal-padding)}.ag-filter-card-header{display:flex;flex-direction:row;align-items:center;padding-top:var(--ag-widget-vertical-spacing)}.ag-ltr .ag-filter-card-header>*:not(:last-child){padding-right:var(--ag-grid-size)}.ag-rtl .ag-filter-card-header>*:not(:last-child){padding-left:var(--ag-grid-size)}.ag-filter-card-heading{flex:1;overflow:hidden;padding-top:calc(var(--ag-widget-container-vertical-padding) - var(--ag-widget-vertical-spacing));padding-bottom:calc(var(--ag-widget-container-vertical-padding) - var(--ag-widget-vertical-spacing))}.ag-ltr .ag-filter-card-heading{padding-left:var(--ag-widget-horizontal-spacing)}.ag-rtl .ag-filter-card-heading{padding-right:var(--ag-widget-horizontal-spacing)}.ag-filter-card-expand{display:flex;flex-direction:row;width:100%;justify-content:space-between;align-items:center}.ag-filter-card-title{overflow:hidden;text-overflow:ellipsis}.ag-filter-card-expand-icon{display:flex;flex:1;justify-content:end}.ag-filter-card-editing-icon{margin:0 var(--ag-grid-size)}.ag-filter-card-summary,.ag-filter-card-expand-icon .ag-icon,.ag-filter-card-delete-icon .ag-icon,.ag-filter-card-editing-icon .ag-icon{color:var(--ag-filter-panel-card-subtle-color)}.ag-filter-card-expand-icon .ag-icon,.ag-filter-card-delete-icon .ag-icon{transition:color .25s ease-in-out}.ag-filter-card-expand-icon:hover .ag-icon,.ag-filter-card-delete-icon:hover .ag-icon,.ag-filter-card-heading:hover .ag-filter-card-expand-icon .ag-icon{color:var(--ag-filter-panel-card-subtle-hover-color)}.ag-filter-card-expand,.ag-filter-card-delete{border-radius:var(--ag-button-border-radius);background:none;border:none;cursor:pointer;padding:0}.ag-filter-panel .ag-standard-button{cursor:pointer}.ag-filter-card-summary,.ag-filter-type-select{margin-left:var(--ag-widget-container-horizontal-padding);margin-right:var(--ag-widget-container-horizontal-padding)}.ag-ltr .ag-filter-card-delete{margin-right:var(--ag-widget-horizontal-spacing)}.ag-rtl .ag-filter-card-delete{margin-left:var(--ag-widget-horizontal-spacing)}.ag-filter-card-summary{margin-bottom:var(--ag-widget-container-vertical-padding)}.ag-filter-type-select{padding-top:var(--ag-widget-vertical-spacing)}.ag-filter-card-add{padding:0;border:0}.ag-filter-add-button{display:flex;flex-direction:row;width:100%;align-items:center;line-height:1.5}.ag-ltr .ag-filter-add-button-label{margin-left:var(--ag-grid-size)}.ag-rtl .ag-filter-add-button-label{margin-right:var(--ag-grid-size)}.ag-filter-add-select{border:0}.ag-ltr .ag-filter-add-select .ag-text-field-input{padding-left:calc(var(--ag-grid-size) * 1.5 + 12px)!important}.ag-rtl .ag-filter-add-select .ag-text-field-input{padding-right:calc(var(--ag-grid-size) * 1.5 + 12px)!important}.ag-filter-add-select .ag-rich-select-value{padding:calc((1.5 * var(--ag-font-size) + 4 * var(--ag-grid-size) - var(--ag-input-height)) / 2) var(--ag-grid-size);border:0}.ag-pivot-mode-panel{min-height:var(--ag-header-height);height:var(--ag-header-height);display:flex}.ag-pivot-mode-select{display:flex;align-items:center}.ag-ltr .ag-pivot-mode-select{margin-left:var(--ag-widget-container-horizontal-padding)}.ag-rtl .ag-pivot-mode-select{margin-right:var(--ag-widget-container-horizontal-padding)}.ag-column-select-header:focus-visible{outline:none}.ag-column-select-header:focus-visible:after{content:"";position:absolute;background-color:transparent;pointer-events:none;top:4px;left:4px;display:block;width:calc(100% - 8px);height:calc(100% - 8px);border:1px solid;border-color:var(--ag-input-focus-border-color)}.ag-column-select-header{height:var(--ag-header-height);align-items:center;padding:0 var(--ag-widget-container-horizontal-padding);border-bottom:var(--ag-borders-secondary) var(--ag-secondary-border-color)}.ag-column-panel-column-select{border-top:var(--ag-borders-secondary) var(--ag-secondary-border-color)}.ag-column-panel-column-select:not(.ag-last-visible-child){border-bottom:var(--ag-borders-secondary) var(--ag-secondary-border-color)}.ag-column-panel-buttons{display:flex;justify-content:flex-end;overflow:hidden;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding) 0;flex-wrap:wrap;gap:var(--ag-widget-vertical-spacing) var(--ag-widget-horizontal-spacing)}.ag-column-panel-buttons .ag-standard-button{transition:background-color .25s ease-in-out,color .25s ease-in-out}.ag-column-panel-buttons:last-child{padding-bottom:var(--ag-widget-container-vertical-padding)}.ag-column-panel-buttons-button{line-height:1.5}.ag-column-panel .ag-standard-button.ag-column-panel-buttons-apply-button:not(:disabled){color:var(--ag-column-panel-apply-button-color);background-color:var(--ag-column-panel-apply-button-background-color)}.ag-column-group-icons,.ag-column-select-header-icon{color:var(--ag-secondary-foreground-color)}.ag-column-select-list .ag-list-item-hovered:after{content:"";position:absolute;left:0;right:0;height:1px}.ag-column-select-list .ag-item-highlight-top:after{top:0}.ag-column-select-list .ag-item-highlight-bottom:after{bottom:0}.ag-header,.ag-advanced-filter-header{background-color:var(--ag-header-background-color);border-bottom:var(--ag-borders-critical) var(--ag-border-color)}.ag-header-row{color:var(--ag-header-foreground-color);height:var(--ag-header-height)}.ag-pinned-right-header{border-left:var(--ag-borders-critical) var(--ag-border-color)}.ag-pinned-left-header{border-right:var(--ag-borders-critical) var(--ag-border-color)}.ag-header-cell:not(.ag-right-aligned-header) .ag-header-col-ref{margin-right:var(--ag-grid-size);color:var(--ag-subtle-text-color)}.ag-ltr .ag-header-cell:not(.ag-right-aligned-header) .ag-header-label-icon,.ag-ltr .ag-header-cell:not(.ag-right-aligned-header) .ag-header-menu-icon{margin-left:var(--ag-grid-size)}.ag-rtl .ag-header-cell:not(.ag-right-aligned-header) .ag-header-label-icon,.ag-rtl .ag-header-cell:not(.ag-right-aligned-header) .ag-header-menu-icon{margin-right:var(--ag-grid-size)}.ag-header-cell.ag-right-aligned-header .ag-header-col-ref{margin-left:var(--ag-grid-size);color:var(--ag-subtle-text-color)}.ag-ltr .ag-header-cell.ag-right-aligned-header .ag-header-label-icon,.ag-ltr .ag-header-cell.ag-right-aligned-header .ag-header-menu-icon{margin-right:var(--ag-grid-size)}.ag-rtl .ag-header-cell.ag-right-aligned-header .ag-header-label-icon,.ag-rtl .ag-header-cell.ag-right-aligned-header .ag-header-menu-icon{margin-left:var(--ag-grid-size)}.ag-header-cell,.ag-header-group-cell{padding-left:var(--ag-cell-horizontal-padding);padding-right:var(--ag-cell-horizontal-padding)}.ag-header-cell.ag-header-cell-moving,.ag-header-group-cell.ag-header-cell-moving{background-color:var(--ag-header-cell-moving-background-color)}.ag-ltr .ag-header-group-cell-label.ag-sticky-label{left:var(--ag-cell-horizontal-padding)}.ag-rtl .ag-header-group-cell-label.ag-sticky-label{right:var(--ag-cell-horizontal-padding)}.ag-header-cell:focus-visible{outline:none}.ag-header-cell:focus-visible:after{content:"";position:absolute;background-color:transparent;pointer-events:none;top:4px;left:4px;display:block;width:calc(100% - 8px);height:calc(100% - 8px);border:1px solid;border-color:var(--ag-input-focus-border-color)}.ag-header-group-cell:focus-visible{outline:none}.ag-header-group-cell:focus-visible:after{content:"";position:absolute;background-color:transparent;pointer-events:none;top:4px;left:4px;display:block;width:calc(100% - 8px);height:calc(100% - 8px);border:1px solid;border-color:var(--ag-input-focus-border-color)}.ag-advanced-filter-header-cell:focus-visible{outline:none}.ag-advanced-filter-header-cell:focus-visible:after{content:"";position:absolute;background-color:transparent;pointer-events:none;top:4px;left:4px;display:block;width:calc(100% - 8px);height:calc(100% - 8px);border:1px solid;border-color:var(--ag-input-focus-border-color)}.ag-header-icon{color:var(--ag-secondary-foreground-color)}.ag-header-expand-icon{cursor:pointer}.ag-ltr .ag-header-expand-icon{margin-left:4px}.ag-rtl .ag-header-expand-icon{margin-right:4px}.ag-header-row:not(:first-child) .ag-header-cell:not(.ag-header-span-height.ag-header-span-total,.ag-header-parent-hidden),.ag-header-row:not(:first-child) .ag-header-group-cell.ag-header-group-cell-with-group{border-top:var(--ag-borders-critical) var(--ag-border-color)}.ag-header-group-cell:not(.ag-column-resizing)+.ag-header-group-cell:not(.ag-column-hover):not(.ag-header-cell-moving):hover,.ag-header-group-cell:not(.ag-column-resizing)+.ag-header-group-cell:not(.ag-column-hover).ag-column-resizing,.ag-header-cell:not(.ag-column-resizing)+.ag-header-cell:not(.ag-column-hover):not(.ag-header-cell-moving):hover,.ag-header-cell:not(.ag-column-resizing)+.ag-header-cell:not(.ag-column-hover).ag-column-resizing,.ag-header-group-cell:first-of-type:not(.ag-header-cell-moving):hover,.ag-header-group-cell:first-of-type.ag-column-resizing,.ag-header-cell:not(.ag-column-hover):first-of-type:not(.ag-header-cell-moving):hover,.ag-header-cell:not(.ag-column-hover):first-of-type.ag-column-resizing{background-color:var(--ag-header-cell-hover-background-color)}.ag-header-cell:before,.ag-header-group-cell:not(.ag-header-span-height.ag-header-group-cell-no-group):before{content:"";position:absolute;z-index:1;display:var(--ag-header-column-separator-display);width:var(--ag-header-column-separator-width);height:var(--ag-header-column-separator-height);top:calc(50% - var(--ag-header-column-separator-height) * .5);background-color:var(--ag-header-column-separator-color)}.ag-ltr .ag-header-cell:before,.ag-ltr .ag-header-group-cell:not(.ag-header-span-height.ag-header-group-cell-no-group):before{right:0}.ag-rtl .ag-header-cell:before,.ag-rtl .ag-header-group-cell:not(.ag-header-span-height.ag-header-group-cell-no-group):before{left:0}.ag-header-highlight-before:after,.ag-header-highlight-after:after{content:"";position:absolute;height:100%;width:var(--ag-column-drag-indicator-width);border-radius:calc(var(--ag-column-drag-indicator-width) / 2);background-color:var(--ag-column-drag-indicator-color)}.ag-header-highlight-before:after{left:0}.ag-header-highlight-after:after{right:0}.ag-pinned-left-header .ag-header-highlight-after:after{right:1px}.ag-header-cell-resize{display:flex;align-items:center}.ag-header-cell-resize:after{content:"";position:absolute;z-index:1;display:var(--ag-header-column-resize-handle-display);width:var(--ag-header-column-resize-handle-width);height:var(--ag-header-column-resize-handle-height);top:calc(50% - var(--ag-header-column-resize-handle-height) * .5);background-color:var(--ag-header-column-resize-handle-color)}.ag-header-cell.ag-header-span-height .ag-header-cell-resize:after{height:calc(100% - var(--ag-grid-size) * 4);top:calc(var(--ag-grid-size) * 2)}.ag-ltr .ag-header-viewport .ag-header-cell-resize:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}.ag-rtl .ag-header-viewport .ag-header-cell-resize:after{right:calc(50% - var(--ag-header-column-resize-handle-width))}.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-ltr .ag-header-select-all{margin-right:var(--ag-cell-horizontal-padding)}.ag-rtl .ag-header-select-all{margin-left:var(--ag-cell-horizontal-padding)}.ag-ltr .ag-floating-filter-button{margin-left:var(--ag-cell-widget-spacing)}.ag-rtl .ag-floating-filter-button{margin-right:var(--ag-cell-widget-spacing)}.ag-floating-filter-button-button{color:inherit;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;appearance:none;background:transparent;border:none;height:var(--ag-icon-size);padding:0;width:var(--ag-icon-size)}.ag-filter-loading{background-color:var(--ag-control-panel-background-color);height:100%;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;width:100%;z-index:1;align-items:unset}.ag-paging-panel{border-top:1px solid;border-top-color:var(--ag-border-color);color:var(--ag-secondary-foreground-color);height:var(--ag-pagination-panel-height)}.ag-paging-panel>*{margin:0 var(--ag-cell-horizontal-padding)}.ag-paging-panel>.ag-paging-page-size .ag-wrapper{min-width:calc(var(--ag-grid-size) * 10)}.ag-paging-button{cursor:pointer}.ag-paging-button.ag-disabled{cursor:default;color:var(--ag-disabled-foreground-color)}.ag-paging-button:focus-visible{outline:none}.ag-paging-button:focus-visible:after{content:"";position:absolute;background-color:transparent;pointer-events:none;top:0;left:0;display:block;width:calc(100% + -0px);height:calc(100% + -0px);border:1px solid;border-color:var(--ag-input-focus-border-color)}.ag-paging-button,.ag-paging-description{margin:0 var(--ag-grid-size);line-height:0}.ag-status-bar{border-top:var(--ag-borders) var(--ag-border-color);color:var(--ag-disabled-foreground-color);padding-right:calc(var(--ag-grid-size) * 4);padding-left:calc(var(--ag-grid-size) * 4);line-height:1.5}.ag-status-name-value-value{color:var(--ag-foreground-color)}.ag-status-bar-center{text-align:center}.ag-status-name-value{margin-left:var(--ag-grid-size);margin-right:var(--ag-grid-size);padding-top:calc(var(--ag-grid-size) * 2);padding-bottom:calc(var(--ag-grid-size) * 2)}.ag-column-drop-cell{background:var(--ag-chip-background-color);border-radius:calc(var(--ag-grid-size) * 4);height:calc(var(--ag-grid-size) * 4);padding:0 calc(var(--ag-grid-size) * .5);border:1px solid var(--ag-chip-border-color)}.ag-column-drop-cell:focus-visible{outline:none}.ag-column-drop-cell:focus-visible:after{content:"";position:absolute;background-color:transparent;pointer-events:none;top:2px;left:2px;display:block;width:calc(100% - 4px);height:calc(100% - 4px);border:1px solid;border-color:var(--ag-input-focus-border-color)}.ag-column-drop-cell-text{margin:0 var(--ag-grid-size)}.ag-column-drop-cell-button{min-width:calc(var(--ag-grid-size) * 4);margin:0 calc(var(--ag-grid-size) * .5);color:var(--ag-secondary-foreground-color)}.ag-column-drop-cell-drag-handle{margin-left:calc(var(--ag-grid-size) * 2)}.ag-column-drop-cell-ghost{opacity:.5}.ag-column-drop-horizontal{background-color:var(--ag-header-background-color);color:var(--ag-secondary-foreground-color);height:var(--ag-header-height);border-bottom:var(--ag-borders) var(--ag-border-color)}.ag-ltr .ag-column-drop-horizontal{padding-left:var(--ag-cell-horizontal-padding)}.ag-rtl .ag-column-drop-horizontal{padding-right:var(--ag-cell-horizontal-padding)}.ag-ltr .ag-column-drop-horizontal-half-width:not(:last-child){border-right:var(--ag-borders) var(--ag-border-color)}.ag-rtl .ag-column-drop-horizontal-half-width:not(:last-child){border-left:var(--ag-borders) var(--ag-border-color)}.ag-column-drop-horizontal-cell-separator{margin:0 var(--ag-grid-size);color:var(--ag-secondary-foreground-color)}.ag-column-drop-horizontal-empty-message{color:var(--ag-disabled-foreground-color)}.ag-ltr .ag-column-drop-horizontal-icon{margin-right:var(--ag-cell-horizontal-padding)}.ag-rtl .ag-column-drop-horizontal-icon{margin-left:var(--ag-cell-horizontal-padding)}.ag-column-drop-vertical-list{padding-bottom:var(--ag-grid-size);padding-right:var(--ag-grid-size);padding-left:var(--ag-grid-size)}.ag-column-drop-vertical-cell{margin-top:var(--ag-grid-size)}.ag-column-drop-vertical{min-height:50px;border-bottom:var(--ag-borders-secondary) var(--ag-secondary-border-color)}.ag-column-drop-vertical.ag-last-column-drop{border-bottom:none}.ag-column-drop-vertical-icon{margin-left:var(--ag-grid-size);margin-right:var(--ag-grid-size)}.ag-column-drop-vertical-empty-message{position:absolute;inset:0;overflow:hidden;color:var(--ag-disabled-foreground-color);margin-top:var(--ag-grid-size)}.ag-select-agg-func-popup{border:var(--ag-borders) var(--ag-border-color);border-radius:var(--ag-card-radius);box-shadow:var(--ag-card-shadow);padding:var(--ag-grid-size);background:var(--ag-background-color);height:calc(var(--ag-grid-size) * 5 * 3.5);padding:0}.ag-select-agg-func-virtual-list-item{cursor:default}.ag-ltr .ag-select-agg-func-virtual-list-item{padding-left:calc(var(--ag-grid-size) * 2)}.ag-rtl .ag-select-agg-func-virtual-list-item{padding-right:calc(var(--ag-grid-size) * 2)}.ag-select-agg-func-virtual-list-item:hover{background-color:var(--ag-selected-row-background-color)}.ag-select-agg-func-virtual-list-item:focus-visible{outline:none}.ag-select-agg-func-virtual-list-item:focus-visible:after{content:"";position:absolute;background-color:transparent;pointer-events:none;top:1px;left:1px;display:block;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid;border-color:var(--ag-input-focus-border-color)}.ag-sort-indicator-container{display:flex}.ag-ltr .ag-sort-indicator-icon{padding-left:var(--ag-grid-size)}.ag-rtl .ag-sort-indicator-icon{padding-right:var(--ag-grid-size)}.ag-chart{position:relative;display:flex;width:100%;height:100%}.ag-chart-components-wrapper{position:relative;display:flex;flex:1 1 auto}.ag-chart-canvas-wrapper{position:relative;flex:1 1 auto}.ag-chart-menu{position:absolute;top:16px;display:flex;flex-direction:column}.ag-ltr .ag-chart-menu{right:20px}.ag-rtl .ag-chart-menu{left:20px}.ag-chart-docked-container{position:relative;min-width:var(--ag-chart-menu-panel-width)}.ag-chart-menu-hidden~.ag-chart-docked-container{display:none}.ag-chart-tabbed-menu{width:100%;height:100%;display:flex;flex-direction:column;overflow:hidden}.ag-chart-tabbed-menu-header{flex:none;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.ag-chart-tabbed-menu-body{display:flex;flex:1 1 auto;align-items:stretch;overflow:hidden}.ag-chart-tab{width:100%;overflow:hidden;overflow-y:auto}.ag-chart-settings{overflow-x:hidden}.ag-chart-settings-wrapper{position:relative;flex-direction:column;width:100%;height:100%;display:flex;overflow:hidden}.ag-chart-settings-nav-bar{display:flex;align-items:center;width:100%;height:30px;padding:0 10px;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ag-chart-settings-card-selector{display:flex;align-items:center;justify-content:space-around;flex:1 1 auto;height:100%;padding:0 10px}.ag-chart-settings-card-item{cursor:pointer;width:10px;height:10px;background-color:#000;position:relative}.ag-chart-settings-card-item.ag-not-selected{opacity:.2}.ag-chart-settings-card-item:before{content:" ";display:block;position:absolute;background-color:transparent;left:50%;top:50%;margin-left:-10px;margin-top:-10px;width:20px;height:20px}.ag-chart-settings-prev,.ag-chart-settings-next{position:relative;flex:none}.ag-chart-settings-prev:focus-within,.ag-chart-settings-next:focus-within{box-shadow:var(--ag-input-focus-box-shadow);border-radius:1px}.ag-chart-settings-prev-button,.ag-chart-settings-next-button{position:absolute;top:0;left:0;width:100%;height:100%;cursor:pointer;opacity:0}.ag-chart-settings-mini-charts-container{position:relative;flex:1 1 auto;overflow-x:hidden;overflow-y:auto}.ag-chart-settings-mini-wrapper{position:absolute;top:0;left:0;display:flex;flex-direction:column;width:100%;min-height:100%;overflow:hidden}.ag-chart-settings-mini-wrapper.ag-animating{transition:left .3s;transition-timing-function:ease-in-out}.ag-chart-mini-thumbnail{cursor:pointer}.ag-chart-mini-thumbnail-canvas{display:block}.ag-chart-data-wrapper,.ag-chart-format-wrapper,.ag-chart-advanced-settings-wrapper{display:flex;flex-direction:column;position:relative;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;padding-bottom:16px}.ag-chart-data-wrapper,.ag-chart-advanced-settings-wrapper{height:100%;overflow-y:auto}.ag-chart-advanced-settings{background-color:var(--ag-control-panel-background-color)}.ag-chart-advanced-settings-wrapper,.ag-chart-advanced-settings{width:100%}.ag-chart-advanced-settings-wrapper{padding-bottom:0}.ag-chart-data-section,.ag-chart-format-section,.ag-chart-advanced-settings-section{display:flex;margin:0}.ag-chart-advanced-settings-section{padding-top:var(--ag-grid-size);padding-bottom:var(--ag-grid-size)}.ag-chart-advanced-settings-section:not(:last-child){border-bottom:1px solid var(--ag-secondary-border-color)}.ag-chart-empty-text{display:flex;top:0;width:100%;height:100%;align-items:center;justify-content:center;background-color:var(--ag-background-color)}.ag-chart .ag-chart-menu-wrapper .ag-chart-menu{display:flex;flex-direction:row;top:8px;gap:20px;width:auto}.ag-ltr .ag-chart .ag-chart-menu-wrapper .ag-chart-menu{right:calc(var(--ag-cell-horizontal-padding) + var(--ag-grid-size) - 4px);justify-content:right}.ag-rtl .ag-chart .ag-chart-menu-wrapper .ag-chart-menu{left:calc(var(--ag-cell-horizontal-padding) + var(--ag-grid-size) - 4px);justify-content:left}.ag-charts-font-size-color{display:flex;align-self:stretch;justify-content:space-between}.ag-charts-data-group-item{position:relative}.ag-charts-data-group-item:not(:last-child){margin-bottom:var(--ag-grid-size)}.ag-chart-menu{border-radius:var(--ag-card-radius);background:var(--ag-background-color)}.ag-chart-menu-icon{opacity:.5;margin:2px 0;cursor:pointer;border-radius:var(--ag-card-radius);color:var(--ag-secondary-foreground-color)}.ag-chart-menu-icon:hover{opacity:1}.ag-chart-menu-toolbar-button{border:0;background-color:unset;padding:0 2px;border-radius:1px}.ag-chart-mini-thumbnail{border:1px solid var(--ag-secondary-border-color);border-radius:5px;padding:1px}.ag-chart-mini-thumbnail.ag-selected{border-color:var(--ag-minichart-selected-chart-color);border-width:2px;padding:unset}.ag-chart-mini-thumbnail:focus-visible{outline:none;border-color:var(--ag-minichart-selected-chart-color);box-shadow:var(--ag-input-focus-box-shadow)}.ag-chart-settings-card-item{background:var(--ag-foreground-color);width:8px;height:8px;border-radius:4px}.ag-chart-settings-card-item.ag-selected{background-color:var(--ag-minichart-selected-page-color)}.ag-chart-data-column-drag-handle{margin-left:var(--ag-grid-size)}.ag-charts-settings-group-title-bar,.ag-charts-data-group-title-bar,.ag-charts-format-top-level-group-title-bar{border-top:var(--ag-borders-secondary) var(--ag-secondary-border-color);position:relative}.ag-charts-advanced-settings-top-level-group-title-bar{position:relative;background-color:unset}.ag-charts-data-group-title-bar:focus-visible{outline:none}.ag-charts-data-group-title-bar:focus-visible:after{content:"";position:absolute;background-color:transparent;pointer-events:none;top:4px;left:4px;display:block;width:calc(100% - 8px);height:calc(100% - 8px);border:1px solid;border-color:var(--ag-input-focus-border-color)}.ag-charts-format-top-level-group-title-bar:focus-visible{outline:none}.ag-charts-format-top-level-group-title-bar:focus-visible:after{content:"";position:absolute;background-color:transparent;pointer-events:none;top:4px;left:4px;display:block;width:calc(100% - 8px);height:calc(100% - 8px);border:1px solid;border-color:var(--ag-input-focus-border-color)}.ag-charts-data-group-title-bar .ag-charts-data-group-title,.ag-charts-format-top-level-group-title-bar .ag-charts-format-top-level-group-title{cursor:pointer}.ag-charts-data-group-container{padding:calc(var(--ag-widget-container-vertical-padding) * .5) var(--ag-widget-container-horizontal-padding)}.ag-charts-data-group-container .ag-charts-data-group-item:not(.ag-charts-format-sub-level-group):not(.ag-pill-select):not(.ag-select){height:var(--ag-list-item-height)}.ag-charts-data-group-container .ag-charts-data-group-item.ag-picker-field{margin-top:var(--ag-grid-size)}.ag-charts-data-group-container .ag-list-item-hovered:after{content:"";position:absolute;left:0;right:0;height:1px}.ag-charts-data-group-container .ag-item-highlight-top:after{top:0}.ag-charts-data-group-container .ag-item-highlight-bottom:after{bottom:0}.ag-charts-format-top-level-group-container,.ag-charts-advanced-settings-top-level-group-container{padding:var(--ag-grid-size)}.ag-ltr .ag-charts-format-top-level-group-container,.ag-ltr .ag-charts-advanced-settings-top-level-group-container{margin-left:calc(var(--ag-grid-size) * 2)}.ag-rtl .ag-charts-format-top-level-group-container,.ag-rtl .ag-charts-advanced-settings-top-level-group-container{margin-right:calc(var(--ag-grid-size) * 2)}.ag-charts-format-top-level-group-item,.ag-charts-advanced-settings-top-level-group-item{margin:var(--ag-grid-size) 0}.ag-charts-format-sub-level-group-container{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);padding-bottom:calc(var(--ag-widget-container-vertical-padding) - var(--ag-widget-vertical-spacing))}.ag-charts-format-sub-level-group-container>*{margin-bottom:var(--ag-widget-vertical-spacing)}.ag-charts-format-sub-level-no-header-group-container>*{margin-bottom:var(--ag-widget-vertical-spacing)}.ag-charts-format-sub-level-group-container .ag-charts-format-sub-level-group-item.ag-font-panel-no-header{margin:0}.ag-charts-settings-group-container{padding:var(--ag-grid-size);row-gap:8px;display:grid;grid-template-columns:60px 1fr 60px 1fr 60px}.ag-charts-settings-group-container .ag-chart-mini-thumbnail:nth-child(3n+1){grid-column:1}.ag-charts-settings-group-container .ag-chart-mini-thumbnail:nth-child(3n+2){grid-column:3}.ag-charts-settings-group-container .ag-chart-mini-thumbnail:nth-child(3n+3){grid-column:5}.ag-chart-menu-panel{background-color:var(--ag-control-panel-background-color)}.ag-ltr .ag-chart-menu-panel{border-left:solid 1px var(--ag-border-color)}.ag-rtl .ag-chart-menu-panel{border-right:solid 1px var(--ag-border-color)}.ag-date-time-list-page-title-bar{display:flex}.ag-date-time-list-page-title{flex-grow:1;text-align:center}.ag-date-time-list-page-column-labels-row,.ag-date-time-list-page-entries-row{display:flex}.ag-date-time-list-page-column-label,.ag-date-time-list-page-entry{flex-basis:0;flex-grow:1}.ag-date-time-list-page-entry{cursor:pointer;text-align:center}.ag-date-time-list-page-column-label{text-align:center}.ag-advanced-filter-header{position:relative;display:flex;align-items:center;padding-left:var(--ag-cell-horizontal-padding);padding-right:var(--ag-cell-horizontal-padding)}.ag-advanced-filter{display:flex;align-items:center;width:100%}.ag-advanced-filter-buttons{display:contents}.ag-advanced-filter-builder-button{display:flex;align-items:center;border:0;background-color:unset;color:var(--ag-foreground-color);font-size:var(--ag-font-size);font-weight:600;line-height:normal;white-space:nowrap}.ag-ltr .ag-advanced-filter-builder-button{margin-left:calc(var(--ag-grid-size) * 2)}.ag-rtl .ag-advanced-filter-builder-button{margin-right:calc(var(--ag-grid-size) * 2)}.ag-advanced-filter-builder-button:hover:not(:disabled){background-color:var(--ag-row-hover-color)}.ag-advanced-filter-builder-button:not(:disabled){cursor:pointer}.ag-advanced-filter-builder-button-label{margin-left:var(--ag-grid-size)}.ag-advanced-filter-builder{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;width:100%;background-color:var(--ag-control-panel-background-color);display:flex;flex-direction:column}.ag-advanced-filter-builder-list{flex:1;overflow:auto}.ag-advanced-filter-builder-list .ag-list-item-hovered:after{content:"";position:absolute;left:0;right:0;height:1px}.ag-advanced-filter-builder-list .ag-item-highlight-top:after{top:0}.ag-advanced-filter-builder-list .ag-item-highlight-bottom:after{bottom:0}.ag-advanced-filter-builder-button-panel{display:flex;justify-content:flex-end;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);border-top:var(--ag-borders-secondary) var(--ag-secondary-border-color)}.ag-advanced-filter-builder .ag-advanced-filter-builder-button-panel .ag-advanced-filter-builder-apply-button,.ag-advanced-filter-builder .ag-advanced-filter-builder-button-panel .ag-advanced-filter-builder-cancel-button{margin-left:calc(var(--ag-grid-size) * 2)}.ag-advanced-filter-builder-item-wrapper{display:flex;flex:1 1 auto;align-items:center;justify-content:space-between;overflow:hidden;padding-left:calc(var(--ag-icon-size) / 2);padding-right:var(--ag-icon-size)}.ag-virtual-list-viewport .ag-advanced-filter-builder-item-wrapper .ag-tab-guard{position:absolute}.ag-advanced-filter-builder-item-tree-lines>*{width:var(--ag-advanced-filter-builder-indent-size)}.ag-advanced-filter-builder-item-tree-lines .ag-advanced-filter-builder-item-tree-line-root{width:var(--ag-icon-size)}.ag-advanced-filter-builder-item-tree-lines .ag-advanced-filter-builder-item-tree-line-root:before{top:50%;height:50%}.ag-advanced-filter-builder-item-tree-line-horizontal,.ag-advanced-filter-builder-item-tree-line-vertical,.ag-advanced-filter-builder-item-tree-line-vertical-top,.ag-advanced-filter-builder-item-tree-line-vertical-bottom{position:relative;height:100%;display:flex;align-items:center}.ag-advanced-filter-builder-item-tree-line-horizontal:before,.ag-advanced-filter-builder-item-tree-line-horizontal:after,.ag-advanced-filter-builder-item-tree-line-vertical:before,.ag-advanced-filter-builder-item-tree-line-vertical:after,.ag-advanced-filter-builder-item-tree-line-vertical-top:before,.ag-advanced-filter-builder-item-tree-line-vertical-top:after,.ag-advanced-filter-builder-item-tree-line-vertical-bottom:before,.ag-advanced-filter-builder-item-tree-line-vertical-bottom:after{content:"";position:absolute;height:100%}.ag-advanced-filter-builder-item-tree-line-horizontal:after{height:50%;width:calc(var(--ag-advanced-filter-builder-indent-size) - var(--ag-icon-size));top:0;left:calc(var(--ag-icon-size) / 2);border-bottom:1px solid;border-color:var(--ag-border-color)}.ag-advanced-filter-builder-item-tree-line-vertical:before{width:calc(var(--ag-advanced-filter-builder-indent-size) - var(--ag-icon-size) / 2);top:0;left:calc(var(--ag-icon-size) / 2);border-left:1px solid;border-color:var(--ag-border-color)}.ag-advanced-filter-builder-item-tree-line-vertical-top:before{height:50%;width:calc(var(--ag-advanced-filter-builder-indent-size) - var(--ag-icon-size) / 2);top:0;left:calc(var(--ag-icon-size) / 2);border-left:1px solid;border-color:var(--ag-border-color)}.ag-advanced-filter-builder-item-tree-line-vertical-bottom:before{height:calc((100% - 1.5 * var(--ag-icon-size)) / 2);width:calc(var(--ag-icon-size) / 2);top:calc((100% + 1.5 * var(--ag-icon-size)) / 2);left:calc(var(--ag-icon-size) / 2);border-left:1px solid;border-color:var(--ag-border-color)}.ag-advanced-filter-builder-item-condition{padding-top:var(--ag-grid-size);padding-bottom:var(--ag-grid-size)}.ag-advanced-filter-builder-item,.ag-advanced-filter-builder-item-condition,.ag-advanced-filter-builder-pill-wrapper,.ag-advanced-filter-builder-pill,.ag-advanced-filter-builder-item-buttons,.ag-advanced-filter-builder-item-tree-lines{display:flex;align-items:center;height:100%}.ag-advanced-filter-builder-pill-wrapper{margin:0px var(--ag-grid-size)}.ag-advanced-filter-builder-pill{position:relative;border-radius:var(--ag-border-radius);padding:var(--ag-grid-size) calc(var(--ag-grid-size) * 2);min-height:calc(100% - var(--ag-grid-size) * 3);min-width:calc(var(--ag-grid-size) * 2)}.ag-advanced-filter-builder-pill .ag-picker-field-display{margin-right:var(--ag-grid-size)}.ag-advanced-filter-builder-pill .ag-advanced-filter-builder-value-number{font-family:monospace;font-weight:700}.ag-advanced-filter-builder-pill .ag-advanced-filter-builder-value-empty{color:var(--ag-disabled-foreground-color)}.ag-advanced-filter-builder-pill:focus-visible{outline:none}.ag-advanced-filter-builder-pill:focus-visible:after{content:"";position:absolute;background-color:transparent;pointer-events:none;top:-4px;left:-4px;display:block;width:calc(100% + 8px);height:calc(100% + 8px);border:1px solid;border-color:var(--ag-input-focus-border-color)}.ag-advanced-filter-builder-item-button:focus-visible{outline:none}.ag-advanced-filter-builder-item-button:focus-visible:after{content:"";position:absolute;background-color:transparent;pointer-events:none;top:-4px;left:-4px;display:block;width:calc(100% + 8px);height:calc(100% + 8px);border:1px solid;border-color:var(--ag-input-focus-border-color)}.ag-advanced-filter-builder-pill-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500}.ag-advanced-filter-builder-join-pill{color:var(--ag-foreground-color);background-color:var(--ag-advanced-filter-join-pill-color);cursor:pointer}.ag-advanced-filter-builder-column-pill{color:var(--ag-foreground-color);background-color:var(--ag-advanced-filter-column-pill-color);cursor:pointer}.ag-advanced-filter-builder-option-pill{color:var(--ag-foreground-color);background-color:var(--ag-advanced-filter-option-pill-color);cursor:pointer}.ag-advanced-filter-builder-value-pill{color:var(--ag-foreground-color);background-color:var(--ag-advanced-filter-value-pill-color);cursor:text;max-width:140px}.ag-advanced-filter-builder-value-pill .ag-advanced-filter-builder-pill-display{display:block}.ag-advanced-filter-builder-item-buttons>*{margin:0 calc(var(--ag-grid-size) * .5)}.ag-advanced-filter-builder-item-button{position:relative;cursor:pointer;color:var(--ag-secondary-foreground-color);opacity:50%}.ag-advanced-filter-builder-item-button-disabled{color:var(--ag-disabled-foreground-color);cursor:default}.ag-advanced-filter-builder-virtual-list-container{top:var(--ag-grid-size)}.ag-advanced-filter-builder-virtual-list-item{display:flex;cursor:default;height:var(--ag-list-item-height)}.ag-advanced-filter-builder-virtual-list-item:hover{background-color:var(--ag-row-hover-color)}.ag-advanced-filter-builder-virtual-list-item:hover .ag-advanced-filter-builder-item-button{opacity:100%}.ag-advanced-filter-builder-virtual-list-item-highlight .ag-advanced-filter-builder-item-button:focus-visible,.ag-advanced-filter-builder-validation .ag-advanced-filter-builder-invalid{opacity:100%}.ag-advanced-filter-builder-invalid{margin:0 var(--ag-grid-size);color:var(--ag-invalid-color);cursor:default}.ag-row-number-cell{background-color:var(--ag-header-background-color);color:var(--ag-header-foreground-color);font-size:var(--ag-font-size);font-family:var(--ag-font-family)}.ag-row-number-header.ag-row-number-selection-enabled{cursor:cell}.ag-row-number-range-highlight{background-color:var(--ag-range-header-highlight-color)}.ag-row-number-range-selected{background-color:var(--ag-row-numbers-selected-color)}.ag-ltr .ag-row-number-header,.ag-ltr .ag-cell.ag-row-number-cell:not(.ag-cell-last-left-pinned){border-right:var(--ag-pinned-column-border)}.ag-ltr .ag-cell.ag-row-number-cell.ag-row-number-selection-enabled{cursor:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgc3R5bGU9ImZpbGwtcnVsZTpldmVub2RkO2NsaXAtcnVsZTpldmVub2RkO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxLjU7Ij4KICAgIDxnIHRyYW5zZm9ybT0ibWF0cml4KDEuNTc4NCwwLDAsMS44NjQyOSwtNC40MTM0OSwtNy4yMTIxMikiPgogICAgICAgIDxwYXRoIGQ9Ik0zLjQ0NSw4LjkxMUwzLjQ0NSw3LjQwOUw5Ljc1LDcuNDA5TDkuNzUsNi4wMTRMMTIuMjg1LDguMTZMOS43NSwxMC4zMDZMOS43NSw4LjkxMUwzLjQ0NSw4LjkxMVoiIHN0eWxlPSJzdHJva2U6d2hpdGU7c3Ryb2tlLXdpZHRoOjAuNDFweDsiLz4KICAgIDwvZz4KPC9zdmc+Cg==),auto}.ag-rtl .ag-row-number-header,.ag-rtl .ag-cell.ag-row-number-cell:not(.ag-cell-first-right-pinned){border-left:var(--ag-pinned-column-border)}.ag-rtl .ag-cell.ag-row-number-cell.ag-row-number-selection-enabled{cursor:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgc3R5bGU9ImZpbGwtcnVsZTpldmVub2RkO2NsaXAtcnVsZTpldmVub2RkO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxLjU7Ij4KICAgIDxnIHRyYW5zZm9ybT0ibWF0cml4KDEuNTc4NCwwLDAsMS44NjQyOSwtNC40MTM0OSwtNy4yMTIxMikiPgogICAgICAgIDxwYXRoIGQ9Ik01Ljk3OSw4LjkxMUw1Ljk3OSwxMC4zMDZMMy40NDUsOC4xNkw1Ljk3OSw2LjAxNEw1Ljk3OSw3LjQwOUwxMi4yODUsNy40MDlMMTIuMjg1LDguOTExTDUuOTc5LDguOTExWiIgc3R5bGU9InN0cm9rZTp3aGl0ZTtzdHJva2Utd2lkdGg6MC40MXB4OyIvPgogICAgPC9nPgo8L3N2Zz4K),auto}.ag-cell-batch-edit{background-color:var(--ag-cell-batch-edit-background-color);color:var(--ag-cell-batch-edit-text-color)}.ag-cell.ag-cell-inline-editing{background-color:var(--ag-background-color);background-image:linear-gradient(0deg,var(--ag-input-background-color),var(--ag-input-background-color))}.ag-row-batch-edit{background-color:var(--ag-row-batch-edit-background-color);color:var(--ag-row-batch-edit-text-color)}.ag-input-field-input{width:100%;min-width:0}.ag-checkbox-input-wrapper{font-family:var(--ag-icon-font-family);font-weight:var(--ag-icon-font-weight);color:var(--ag-icon-font-color);font-size:var(--ag-icon-size);line-height:var(--ag-icon-size);font-style:normal;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:var(--ag-icon-size);height:var(--ag-icon-size);background-color:var(--ag-checkbox-background-color);border-radius:var(--ag-checkbox-border-radius);display:inline-block;vertical-align:middle;flex:none}.ag-checkbox-input-wrapper input{-webkit-appearance:none;opacity:0;width:100%;height:100%}.ag-checkbox-input-wrapper:focus-within,.ag-checkbox-input-wrapper:active{outline:none;box-shadow:var(--ag-input-focus-box-shadow)}.ag-cell-editing-error .ag-checkbox-input-wrapper:focus-within,.ag-cell-editing-error .ag-checkbox-input-wrapper:active{box-shadow:var(--ag-input-error-focus-box-shadow)}.ag-checkbox-input-wrapper.ag-disabled{opacity:.5}.ag-checkbox-input-wrapper:after{content:var(--ag-icon-font-code-checkbox-unchecked, "\f108");font-family:inherit;color:var(--ag-checkbox-unchecked-color);display:var(--ag-icon-font-display-checkbox-unchecked, var(--ag-icon-font-display));position:absolute;top:0;left:0;pointer-events:none}.ag-checkbox-input-wrapper.ag-checked:after{content:var(--ag-icon-font-code-checkbox-checked, "\f106");color:var(--ag-checkbox-checked-color);display:var(--ag-icon-font-display-checkbox-checked, var(--ag-icon-font-display));position:absolute;top:0;left:0;pointer-events:none}.ag-checkbox-input-wrapper.ag-indeterminate:after{content:var(--ag-icon-font-code-checkbox-indeterminate, "\f107");color:var(--ag-checkbox-indeterminate-color);display:var(--ag-icon-font-display-checkbox-indeterminate, var(--ag-icon-font-display));position:absolute;top:0;left:0;pointer-events:none}.ag-checkbox-input-wrapper:before{content:"";background:transparent center/contain no-repeat;position:absolute;inset:0;background-image:var(--ag-icon-image-checkbox-unchecked, var(--ag-icon-image));display:var(--ag-icon-image-display-checkbox-unchecked, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-checkbox-unchecked, var(--ag-icon-image-opacity, .9))}.ag-checkbox-input-wrapper.ag-checked:before{background-image:var(--ag-icon-image-checkbox-checked, var(--ag-icon-image));display:var(--ag-icon-image-display-checkbox-checked, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-checkbox-checked, var(--ag-icon-image-opacity, .9))}.ag-checkbox-input-wrapper.ag-indeterminate:before{background-image:var(--ag-icon-image-checkbox-indeterminate, var(--ag-icon-image));display:var(--ag-icon-image-display-checkbox-indeterminate, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-checkbox-indeterminate, var(--ag-icon-image-opacity, .9))}.ag-toggle-button-input-wrapper{box-sizing:border-box;width:var(--ag-toggle-button-width);min-width:var(--ag-toggle-button-width);max-width:var(--ag-toggle-button-width);height:var(--ag-toggle-button-height);background-color:var(--ag-toggle-button-off-background-color);border-radius:calc(var(--ag-toggle-button-height) * .5);position:relative;flex:none;border:var(--ag-toggle-button-border-width) solid;border-color:var(--ag-toggle-button-off-border-color)}.ag-toggle-button-input-wrapper input{opacity:0;height:100%;width:100%}.ag-toggle-button-input-wrapper:focus-within{outline:none;box-shadow:var(--ag-input-focus-box-shadow)}.ag-toggle-button-input-wrapper.ag-disabled{opacity:.5}.ag-toggle-button-input-wrapper.ag-checked{background-color:var(--ag-toggle-button-on-background-color);border-color:var(--ag-toggle-button-on-border-color)}.ag-toggle-button-input-wrapper:before{content:" ";position:absolute;top:calc(0px - var(--ag-toggle-button-border-width));left:calc(0px - var(--ag-toggle-button-border-width));display:block;box-sizing:border-box;height:var(--ag-toggle-button-height);width:var(--ag-toggle-button-height);background-color:var(--ag-toggle-button-switch-background-color);border-radius:100%;transition:left .1s;border:var(--ag-toggle-button-border-width) solid;border-color:var(--ag-toggle-button-switch-border-color)}.ag-toggle-button-input-wrapper.ag-checked:before{left:calc(100% - var(--ag-toggle-button-height) + var(--ag-toggle-button-border-width));border-color:var(--ag-toggle-button-on-border-color)}.ag-radio-button-input-wrapper{font-family:var(--ag-icon-font-family);font-weight:var(--ag-icon-font-weight);color:var(--ag-icon-font-color);font-size:var(--ag-icon-size);line-height:var(--ag-icon-size);font-style:normal;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:var(--ag-icon-size);height:var(--ag-icon-size);background-color:var(--ag-checkbox-background-color);border-radius:var(--ag-checkbox-border-radius);display:inline-block;vertical-align:middle;flex:none;border-radius:var(--ag-icon-size)}.ag-radio-button-input-wrapper input{-webkit-appearance:none;opacity:0;width:100%;height:100%}.ag-radio-button-input-wrapper:focus-within,.ag-radio-button-input-wrapper:active{outline:none;box-shadow:var(--ag-input-focus-box-shadow)}.ag-cell-editing-error .ag-radio-button-input-wrapper:focus-within,.ag-cell-editing-error .ag-radio-button-input-wrapper:active{box-shadow:var(--ag-input-error-focus-box-shadow)}.ag-radio-button-input-wrapper.ag-disabled{opacity:.5}.ag-radio-button-input-wrapper:after{content:var(--ag-icon-font-code-radio-button-off, "\f127");color:var(--ag-checkbox-unchecked-color);display:var(--ag-icon-font-display-radio-button-off, var(--ag-icon-font-display));position:absolute;top:0;left:0;pointer-events:none}.ag-radio-button-input-wrapper.ag-checked:after{content:var(--ag-icon-font-code-radio-button-on, "\f128");color:var(--ag-checkbox-checked-color);display:var(--ag-icon-font-display-radio-button-on, var(--ag-icon-font-display));position:absolute;top:0;left:0;pointer-events:none}.ag-radio-button-input-wrapper:before{content:"";background:transparent center/contain no-repeat;position:absolute;inset:0;background-image:var(--ag-icon-image-radio-button-off, var(--ag-icon-image));display:var(--ag-icon-image-display-radio-button-off, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-radio-button-off, var(--ag-icon-image-opacity, .9))}.ag-radio-button-input-wrapper.ag-checked:before{background-image:var(--ag-icon-image-radio-button-on, var(--ag-icon-image));display:var(--ag-icon-image-display-radio-button-on, var(--ag-icon-image-display));opacity:var(--ag-icon-image-opacity-radio-button-on, var(--ag-icon-image-opacity, .9))}.ag-range-field-input{-webkit-appearance:none;width:100%;height:100%;background:none;overflow:visible}.ag-range-field-input::-webkit-slider-runnable-track{margin:0;padding:0;width:100%;height:3px;background-color:var(--ag-border-color);border-radius:var(--ag-border-radius);border-radius:var(--ag-checkbox-border-radius)}.ag-range-field-input::-moz-range-track{margin:0;padding:0;width:100%;height:3px;background-color:var(--ag-border-color);border-radius:var(--ag-border-radius);border-radius:var(--ag-checkbox-border-radius)}.ag-range-field-input::-ms-track{margin:0;padding:0;width:100%;height:3px;background-color:var(--ag-border-color);border-radius:var(--ag-border-radius);border-radius:var(--ag-checkbox-border-radius);color:transparent;width:calc(100% - 2px)}.ag-range-field-input::-webkit-slider-thumb{margin:0;padding:0;-webkit-appearance:none;width:var(--ag-icon-size);height:var(--ag-icon-size);background-color:var(--ag-background-color);border:1px solid;border-color:var(--ag-checkbox-unchecked-color);border-radius:var(--ag-icon-size);transform:translateY(calc(var(--ag-icon-size) * -.5 + 1.5px))}.ag-range-field-input::-ms-thumb{margin:0;padding:0;-webkit-appearance:none;width:var(--ag-icon-size);height:var(--ag-icon-size);background-color:var(--ag-background-color);border:1px solid;border-color:var(--ag-checkbox-unchecked-color);border-radius:var(--ag-icon-size)}.ag-range-field-input::-moz-ag-range-thumb{margin:0;padding:0;-webkit-appearance:none;width:var(--ag-icon-size);height:var(--ag-icon-size);background-color:var(--ag-background-color);border:1px solid;border-color:var(--ag-checkbox-unchecked-color);border-radius:var(--ag-icon-size)}.ag-range-field-input:focus{outline:none}.ag-range-field-input:focus::-webkit-slider-thumb{box-shadow:var(--ag-input-focus-box-shadow);border-color:var(--ag-checkbox-checked-color)}.ag-range-field-input:focus::-ms-thumb{box-shadow:var(--ag-input-focus-box-shadow);border-color:var(--ag-checkbox-checked-color)}.ag-range-field-input:focus::-moz-ag-range-thumb{box-shadow:var(--ag-input-focus-box-shadow);border-color:var(--ag-checkbox-checked-color)}.ag-range-field-input:active::-webkit-slider-runnable-track{background-color:var(--ag-input-focus-border-color)}.ag-range-field-input:active::-moz-ag-range-track{background-color:var(--ag-input-focus-border-color)}.ag-range-field-input:active::-ms-track{background-color:var(--ag-input-focus-border-color)}.ag-range-field-input:disabled{opacity:.5}@font-face{font-family:agGridQuartz;src:url(data:font/woff2;charset=utf-8;base64,d09GMgABAAAAAB60AAsAAAAAP9AAAB5kAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHItkBmAAjSYK02DDKgE2AiQDgnALgToABCAFhEYHhlUbGDZVRoWNAxCE6WSJokyNVmT/f0mQlxh6/aA2IaNSNSSMnFiPpCFrpxM4K2otB+uVtaIChHJqIvHDENnTdjLimnVXso4TytrTJzK4pg/me9l/YydzYHHZUEoe/n/tf/vemffdUS3liyhimoYMWTONUCiBEgj1rEV/Ps+9r/et+feYGhwbKIIByglQsVguFajUU8Bc6vSDVEIwvGxhQJFLtCEtQ2/vNjUAhue32YNvIvjF/0kD+mOjuHBJiFhF6aKMlUuMra2hbnfnSte6K4W1lzBXJX9zibf9f1FyUeqFXiEMufb6HcLgvJBHHMR871Sllk9WUWBoOTCmNGMQhNhF1s/dxncbCywH32oQBABKPMP/4ONvm6pmuvZk1rDIKWNuj+d82xpMQjITCuCDoFwi4H9V01W86y5NTmllGNP3ZJsIEKIEfEASRN09UzB9pjuvvGce3eXWdFNK77N4dBHdmVLbMLmOacOSYc2WOcOecUq2UFgnyp8tvnAVMiEtgVbEqzq3Qvxp3Rok89J7f80caG99C/bAiwpChJiEMMkNsv3qO5FAi6w2cmJqYUP+8Y3XT3WgZbdMcFwwPX5w74bks4VuGJfwX0Jtizy/N79/pfqZHub8wldS/ebV1/JWTStGFpTXNhUiGebJXMhhIzw+Kow1Wp3Vx3Cx4BriBBMY7FUEVWCyPj07hjTMCLSjjXjp9iJ4cXOjtAYk5WqtyiAIE0/zHeW3d4ymMZoax5hylBHhW73RzQRXSOOUUNFlTXgHARsVeftSI8aBgBRLlEUf0YLqBlHcg1Mn5ulxGECa1zFIIFe9DPZTzxyJICgoPs6gZ4FQt31fAFGzaFNCBQfqfY4OkMwQmk11bGbRObSxGmIALe+rQ3GqsKa9Gx+mSU4dQKNLsLj5JLEOJLVbUlPrvVXQEWIGvwoagTW8hECk63NwE/pNegiVBO19+fvxO/7xo0Tb08ubS2WpOm1Ou1J72k9gtoXyPf4qXw23W0/TE2qmIGqePZKStASraUzvycGhxdVSLPoyZDNUB1xagP0Acq3XKqNOXrAtnO7AamiZGA69W2viqHLEswsRLpvw7JC0TSR9eiOQxTG1uXgOA5mrkZLA2AriEAUvOhPH5dHZkzpQ9LS+QyWUXwTDWFp6e1Gc2BNRo6JEdlF5bnbEozzK0Q14T9ATnV6siC4K4sirtu+W1Sf14g3UeLrzjqH+9c2n6Jm2qo2FsWRFrPgoThTXRxMfVQQvztMX8OaUAHQDxFxDb4daQrpI0Erq0y7c+bBJaQBKDNoaSGR4ZN0WsR7XQOD9MMK/w+MZ3BAQSRUaEQ8OKahltEb6uGEUFRpJ+9ySelSFsl/QGCqpFT+zBtqogEtzIEQ1iKNA9BsUJKWu+1dyJJrx9AYG8sd8GXwpDnz6J5cyQMYUIHsVK3cnb/uPVIwKH9grtZF+Fdj0AKiBAlycKcr5cvP0dDaofd9FFLHu46F9QxseiZZy68lPTNbrLrlx6yVSyczsRM6DTmFlQAKqsil05HHKU5ETKPYEDWrg5TI1B46FkCgsDk8g+mf2YVSoNLR09AyMTMwsrGzsHJxc3Dy8fBR+AUEhYUYRUTFxCUkpaRlZOXkFRXolZRVVNXU0RkNTS1tH1z4LpAaQPbzhzx9fW1ya2ptYmVFZ3pyb3eYuTG/tzq/v7FtdbUD53nsVuPTRBnCjceBma8CtFoHbLQF3mgLutgfcawK43wrwoBngUavA45aBJ20CT5sDnjULPG8beNkk8KoF4HXTwJu2gLftAu+aB963DnxoB/h49kEQo1gSBiwFA5YGNEAwaIRg0QTBoRmCRwuEgFYIEW0QEtohZHRAKOiEUNEFoUE3hBY9EDr0QujRB2FAP4QRAxAmDEKYMQRhwTCEFSMQNoxC2DEG4cAhCCcOQ7hwBMKNoxAeHIPwoh3Cl+MQOQGRkxA5BZHTEOiDiBgZAzwKDPAYMMDjwABPAAM8CQzwFDDA08AAzwADPAsM8BwwwPPAAC8AA7wIDPASGHrjZWDOeQUY4FVggNeAAV4HBngDGOBNOJcSonUuNYg2Q8Y7wADvAgO8BwzwPjDAB8AAHwIDfAQUTMfB13b+wG+0PwNd37NyHissKde4UwgUUmNwqY/Aon/vkN88uAmfAbkGfo4B8ovk+AjEx2oSoACDojFdV2rGpfWbber8hlTuUk5tptE2hRfFHQyEb0uOjojmRtADtjDYgavYTZIwNJIJ0Z6cHx0sCaaHD4s8jko58QxFsBCpCmwOTmUh/SRkM18oYtAD7Dr2Q0a4Zx9QKILJ8mexdStGY+SMMDRRKBayoiLp0KZwCAlnoFw+P5LFixJjdJ8mBqNKdnOxu0O4jCjS8Oyd0ulbaf7rNCvNsMSlVH3Yo+lAuQG5MjYh//wtgQBOxVvFygozrpmYk/R2l4ilVHppV4d3mgjyspFM+61xYQ+DuudwKuHE7DdFRPViyCsQ45WDMdtNptebRYJiDjuQL6FDJVdgelrTlkZEddl3l/j0crn2TZJr17fSjk4CnIhBw0jyhW9PuO1Ude0efnFjW8jbh03SrSieKnrug9sUtDTUBLbABthnNpgtcItcOwuqPqeASn7cA7uv0sDycqZn1NYFgGauWoxGHgA1VpLPhO3OsKBIOvaQqJ6wiAs5iTuYWvk6/DFePsDDJYausJ7LdYZr4+gqJnZe89JYmaMQUDTiUqVm3JXIrz8Zke3U8iXqkIcdSjVqHyWtDb9w9dmOg5nG56znz+VCGPN61Yg//8ULxczR/v6fpFSo7rwiZe4ObU/Mh8w9whXBE0yaRn4x08UbPGRK+EFXVPNWF0+MvvyGyxsG1F91/Qx+FExPiEcsX7QIw1716ptL2Z2Hvua6Mun6z8LlF7sOfyNeyBusXzTJt+Vknj9odCfI1MNRCwkt5taAOmeM+Z3CQ/MrXgkFHS4WjsRlpsEbFx/gPFwbXMDJo5soMf7QUKok1BoRWUdsW06g+VPMenLrOlVw3gPW4ds38BuuT9YdSivNUI19MjmQWeLTdctblukuo1mElw1o1VGjXoeoKibSkO8cBsKxHYsPn6O/d/PaFuqJBZwhfteZ2KPVy5B9xefRtfjmtRPUSFmhkJbk4kMNa2hkU4vd3KT35YrRZuP6GKFFM5WcsATfBQveE/UN/EWpAens6nY5xtsMU90AubaCRFGqN9wR39SFvimGFBohOwR1XTCFuMfhBNe2FYZslyF+xLKIIcNuLlGUeMgMmzSyDMO2DZNDpEjrYb2oT0yTJG/YEMecyQvFgelQ1SEeVcS6tiqrlkh3WQzhDUihoK89x6YpKGH2bovYGp6GM2QOzUoo781G3UeMUWvEbeeaerLP4sjc/Vz+TNkXzcp4Ll9ORht9nrZhinUImsHyHAbQ4A8RMWq1xr1UgpPGACnCE0yU5nnyQrIa4Qjnt1yqUkgy30tAPYFTwkMmQQcB3RORpsBBsmHHnIQjhyBRtYhGf5az+eL8zNlHghm1PqzeZH2PL2rvv58DuCDhdfjFacloc9qCkT3mj0kkpzNDiM+Xdo0oVqc3ymWeSbHQyzNvLhc0vQQZmkLyBdVvejxDo7Fy+/PF1/MVFuHPGdDBwnkTVXaWzn1yR80zrffRrZLBrfbEWF/4zz9FJcdxuDTzZl69u6O7Z2SqEc2RGTiNZ1WceQafPydeL0Jv2DulV7e3To30BLs+nSdkuMubfv3+rqN9YxOh9pKZj27JWWLO1yKfWZ92oQPWYU8+aWa1QB92oMuY6eQCsBp3w4yZGp1rR8M3O8Aai1CQd1hzWIND1521NWKUB3EhHRMzPcZvRKV78QDgxx0O8tDE2qApzmkruTr16YQdif6meHy/wWwszR3YgVKjVKeDzKZ/zEeC0l9M4AS5cXUADc5OAoC91SSGZFcHfJYpL96Cx6f74cDMRC2+kQRYqRTZqVneWObu6gEtqG687Aj7IwNrmy0cEx0zaIIbnL8h6fdq3pERt8DBSNKEHYtEp0wyHK61yUqXieJ47PInGWYoCKAppOT2wlpK4wY0rbfAOsvP8iLoqRzd/PqcTdyuuwDM7WgetmWDeGlt01RuOmhfiU063Wi1DDrSJGLOkyGLLB1FB8O7WPYSy1UMojV8M5IWC1tq+tRcHy1XJk6ylZiV7AdlnP6wH2EWHIQf1qvIJeMPeUACiSmz54pids7HxmjaiZS3JCmrgQCvsb7s/M1nAOTVGllYtMC6QculGXwvQNOjt1/k3QD3L6/NHD6jor8XF5TJxTfho7xR1Z2Qh3wNO1wbY4qERIq8VbT0aDZhZ1pncM4W5GoI2B1nk1QhOpFaZlx6pRgMZaNQKUmmxtxfsltRGCkddHTk/FnZbqcqruF60jB+LlfjxTtQZ6TVE0oXF3dlO9Py6fVVHOkK9mfaX6QcRZHWPnHunbFGZXtRy0fenIoDryUHDKHESouLclaXPVLHD3sdb/XTSV5e/sln9pqUU9scDak4sJnr7Gxp3D8hqFRGm9tAUz+y079Eo81Wo/m2kvZqccBitX3Mr1rppGvHBCgjjcdmMIshYvP9ELLQypjYFxydHAAaDVwbvAj7D/sW6w6e+azXHEx4cnYQDWmmh51l5lqZMnlEj5NhaSbwoseaqK6JjjPx5m408msdoABjtXUAXwuwHyB9AoKNygLOFgsCVfBex9PdT9qHoV2bX26ryAFPuC5DsiJyI7ZXQFcmihWONbELDzjooSouNj2bhj0hz/C6GeHlIa9Ib9yJeymc0GPeUi6heRoNBEivm9puVQb/PwJ7Kx089i5nllUydzZXA9Glpo28AyNtD3NnrYoaozjdElW2Ti5ON55Qmk7fuHmBX0ZV19NmYB+lrRb8oky7xFCFlBrfyIiVVXPhZDwVTlhfBbVadyh4QyxTjrgGhZvBI4WjhodelA1j875QJh68aOuuNBtYm5Gi/ro1g6phfOhC9xHdfPG9C7bnNSz75IkkT7yAS2g8klsT9ZMLBlw0PENy4INtQiqp1qgiWxYymbwxE+vcpzJbfFZ5iP2PuDi0eapoavPn+5YCZDvJD27f55tdRZMc5CY3/6/cj4bO//fyN3PcMg18ICr5gJST27bh/kflhIcCPDvlsLZtq4hpa21lWqq6LwPw125rOQh7pUG4hSFA8XSbLcyW2vVZiMJ+OX6Zt8GeAuHyRBIjuVzcv19N3L93HXJhDvT6hoZev0g7UHX+EjMEwBwrMAI5+oT12qTh0h+2DZ+McURh31vV/PTAHCr2g+LBOH/YldrwsiBGJPzh7Q3F/OJm/bRKtq9ZvphcGN8OGYtjDP2RLPiWBFLqK2fiDTHH1+YmzBfdY8HfHkc0qbPgjq9g5CP+bJrk3m+uYRfBPr6UOHfi2DESc8pxtxvY+fuppMu94mvEg0cdRT8ukdMX42bC2Shf0Y/Z+6YyLv25ecN9Kke8OkkfkENRHD3BG3ZftUIkSrUNU6IwOyJY4KbEb9Xm0e42nzix/etQ9MPpIHlsEPVFvd6RkVdyh3zQrtfbXY2s3WofyWR9K5rbq7aPeIFQtx5xoEdRB/YlGZMl6BnVXA+qLjxD3JgTmWpoNAVyB749pE3Tl7v4oPQN1eHDudUrc2EoBcq/TlZVwbnKFCWct7IqH969AHzMBNzgc0IoCJ1xkrqhbvMW/aZDu5Y1i4ifVR4nZaaMTmGfKaRc02wc6gISXQrzwNE3ukc7e4I23OAPpcC9iTkT4XG4srW7v3xj7I0vd69tMccbbxUVDAb301iuaS8q6kviJnWXFLueoE9cpt2lxH1FRe1PIgAs+YDAHJhn/XqCsIdpwzQYhlImihOUygoSI3NzP39YGRnNpKfQ4e8hjTRaKnvRRzduOCIdYduFB8UHhZGvreSAnM5f9bEDhoFYPWjMZnIsr5X2hnz4ZcexLz8MgY3RehCkW8Ec5xukp+MkcebY01KD5FJsQv78tdLP0+H64ycWnThcDxth6eThrg3FmcaDXcc3hlYD1nKYlJOTk+AjCo/44yOZj5SD4JsYCe35aIQ4MTcCxZ5W9ihPx0I9j/9NKeLGXEj1005+hapCO5MQUZhkP0/SKeF3fnb28pPxTovBtCf/EJgTI9lsDhvH3BhRnIVNYi4MR4/MUZ0ITH8yWlVhW7c7/SIFq8KSsUps+se/pN4+MBzxVW19G+VZkEId9pKyrucFPPf9U798z7pYfUAuHmhFwjlRf7+1y4+275reEFNUNUybu+Y3bqS1pDaUuVLP2xF64kIojzc5W7lb/WDjTjTk5LW96Y0/0JlGhHGp8f0B1tRdKB718eRbO6rtrFOM1OmKvC/DrkkYweW6T75iv3Un/Nys12NdMW5uLODs8Q/JY9H8ualPOev6QvvWcZLvqYJop8IN780NlIs8GlxDaoihvOlzLSukVXx9EW3VycamuHhCr2+G/PXXdEqJJFubUsQo4Lo5BfSiFG22pISqa8xejq0c5CfEFzg/EOEaj4bQkK/VXVHxesnvZECkSkAcmAv98slTYolDjkvEJPYp7VVO+eDY2p4+Qe6rfHLXUp+9au/abE7BMNP+S+9s63zrzTO650HDSjozN39Naf2xtZnIySA0KIOrrzA1TOt7FjysZYSDGImVYMuYv7uqmtla22Yw/y2kHAh0BrB+aUquQp0+W63Irzndu7ExSn33YYk34+E35Yzx2S95Citno3g0Y7v4CfcTPODVR31ke8fgko/ZONXKK2NrtewynlVILGlMmapYbJrSJqzcIs5q3NjbW7PzvdhhdXquYmnK+qQkoNspWzFlKzBPDlZETQPWPOzzrHHG7PWdhSSGp0q0Hh9DRSMCA6t9TTE5FYfV7HT2Lunew8MVOTFNWsiSrBmh3dbG6xJzeCWRPdChH71H3qaNaJIt0LwoIanOF8kbSspPSMhfJN2FRfsbPKymMISW6RIg71/Ehfws9JfenxHXO9/EyFFKZ8X5Abqn70DAqXwHmH8KmTDhb8uemxwZwf2PFBIou221raIZMAAUrwtJjYl0Twr3nc4ajbgNvNl5PqY6Lw7E3lQRGClezB9Pnc/rZRHmRHrhUnix2F5t1uiF7MUlBIaXFFcpixGn3IlIp+5AkYLqRqIPehWdo1rpZAYgH6DCGmn/Uh2h7o8gV7PX2UhDINFF4PL+QiIubixLlDVmZNovW4aP+jyIC3MhHuCt5ftl6NJ0GRMRmaFl0czEYsl8rah0ofrnaUqkiTXD7uDyJ0yqNJVpgp+JVx00M6FEOk8jMi4YqE1ZkpAqw6wFbSGfcl8+kEhaZiF456tzArGQd/mtaxvFMdJm8/g7Cj2eTmLy+xFQ2mxIdzCrZyVvCEC6oK+ue5pumKZMGpTKZ7MRcof/93Qc+7p1KeLabHvqpQ7U2UEs5FCt0zY25qX22G/2fpZ2oVOIC5mClkyNDJkkMYlr/22M5CKCHBsD9/8ibuE5g0mdk98i3+aJk/gBssf/IsDsgeMkRo6O2qUmPeE+l23z+TyYkjmuPMHMJ7Xuqd+iDfxu4RToL9krvvXo0S1z51boeULu9CdP5bW1toTbGarEDZmF1Z6fOwfg5dMAh6vRpM1UWxcWJOYlJOQlFriku5iX0Id2vdZlmutmVaQtW5ZWMfvnqU/96N0BP83+Oe0nUDHrMWZ2RR1gQ/fFdCFfeilu4qqOuySd4I3r5vMtbA6cDk9o75Shfhg/SV8n/15WZ0xKh19QcukDKOHPTx/npSca7dLAY6/mvbrwDHUhMpMJ93MUEm+/Q2BkfrD21lpmVbXdZJQhbhB6syl8nJ8nvRhL0UccFHaF9DRnyeAaWRbqQA2IC21fXg2cLWvuCela+mOEAc6pjYD10elwLOJG7shqQLa0uZfG/55P6z2YJQU1sjuIE40JS4/Wh/VAHWGYI/8w6gJ0JHeCpAbXIh+eEb4nlU6d0w2SgdgBgmSyDoruo05kaEj7XUPHCxjSnzV0x9RKd04kH7pTeMeDOBAQpRpdE3i1Um3OWYY0z7DMgCuXvlM4d1l2M7LJsqmc0V2YplbMaQzJr/6TA2nOXjan8HzFcvp4TmtkHLRWtqElaw2yeAnDurBrf6U5vHtJd2GY3bqoCSnYYcg17Ija9O67m6Jak5t2FVOYlPSz74XmnqYqjlmmr9dvGtOmbVte+5O9HQUDP3RXWUS1e+wRoKNfnh71CPfE5wPROgfqRLz9/YTcIccnp/wSPFNTdrMlrLbW3t/vRVyI+Ed06iKZiAtzI+Dro6F5XAwoNvnZ+favMn3Ow+TbJyftnw8HbMTPXs4zWyjwde5Vy01Xwbgcf3DfAzrkxDJ9fSSGA+PIXLdK/EVrrGALyXRExN4BI51tMsFipY0D31w4NDjgf69rOPSd9evaaltElupu228P/V1L8F+DFk+UhWdGwBUOvEcGfIyRX4Q+FNOwSbyKTP6EWTVTBUQScdJB0cEkOv3XTMlDnTNyHtj1rTYBqB3D+u2rylLNKpU5texZarmLZlUvPyt/TZU3lelokNeyTGaVmlpaTFKr7LZ0P/eWFqlJZr1dE/wqAXUia2tCj1VTY5Yo5a5SvxMshFbRXImJyTZV3lp2h1rylq1X3lj/vceIpSFTJUwDh8axyvw8n7xr8wZB2JtzsMo82M4XC1UpRmOKSrOi4MeAd/jbyTsBP63I16iMySnG13VyksCrhH9W5KsroLJ1Tt2tf7dH0ZcELvMSxE94adwn4rmBlj89uN/Rwv9GKfb5NVcGImzPUmR9peePy9y54qfcNN5TcQJ3W/TaV3sv08Mz6GKGey94+eA8I5xh3lu3sHafmSFmrAXja4gbeRwc9Hr5rjjj+Ypv9FcwZLU5WXzqe0n4pKHxQxx1BJ/mrJhfd8oLBh/LMFkNyJIeDDnx5a71/+z6UjWPGi19tnvlwpbw3mQsHHh8sAuMjJIywoSkes1MvYXghhhZsQFZgrMRjqm/v/TGtNS3XpSFR4FyHBC7I0Ycax5HYAT+jUhfPTzzCIEB5diBytGFRLnzE1fAb9nfFgjW7r+OqpwZYVukW5hnXKGK9peuQdbAXM2dvHp6XJZs2Elpl7ZTdq6auRV11WbOIjY3oC7fu9o0zZ4O7wy8LLDZrBbb5kc83Wz6bF1mZuoAfSDVvnkz2Pl/Nurz6UUUtKbI3aIBaSU097A70EuhqGtmpBOgDbftg3xg0pjggDqOyT1QVPo+5IhaDeUCUP/OGujHVXo9dOMWadCCpCu/2UXcoyUIkSYchRK68m9N6SjqZ+kOSCtC07QBWp12U3+55VPofRH4FhpmeWb+gzoqMmlKt0IPhBZER3FlH/SdyULMSCdA1GP3yJ1QaGLWlYsNomUxSRuoKiWkvgniMi0nCTJAja/oysWQO8qr/1+XRWh1JaJkEAKWt4ii9hYIaqNZOyPQC8xE6J/KXxt4fudfxWJ4zu9BIZAPgFQW/NWVXQUyG/VP+vQjmv4sMSUBoH9DmKF8f1HM/PHjH03h+7jB/9dJ/v45JMTVmXg+8TJoSXqgDk6XXzpyEpnYI+NK5IkWe2EArWz1nFYjSZzWQFamLTWiDztvZfAogiiDAcHqfXUaSfVBqU3rJ6Wh9edpDLM/lIXW/6eJzsnvd5OE094CqI/i3UcG0fs3rHMA+blKsi+/UJJnKl4Oz1Vv7IiEAoquON2K1NavqlVRCTfFO1O8qhC4iMKfaPVwVo1vT09VmvBguelAfRTvPjIkfr1/w43K4WytCNaqzv6FTzTBwcZUvByeCbUjEPFZQdHZp9uXndqN/aq5XRUf1cJN8U4VE9KQUl5DrPc+0abqcO7gxbenfKiKVB0sFfPPUpdF/D/Cc0CVyrQcttPl9mivzw8gwoQyLqTSxjofhFGcpFlelFXdtF0/jNO8rNt+nNf9vN+v0erS9RmGzKzsnNy8/ILCouKSUqPJbLGWlS8wwO9OK9S1YA3qmYYgwpfUg2T78Dl1AA6vBkMLZDEM7BlE1xFE+3Xia7nrQff4YzeeHCpK4wkUt1VdmYgWn1sOLGX0J50y+ihyQ2lqmVTAKrq+5XgbWOGUeja1PZu1z9oe4PUhNy4ZgXqom+ANyxQgnXt7d1j5cMPcwHGStF+Lj4NaOMf+xZymHysdBk+Mk44Cg/NUjxu4+sbfsd8g5bGgpNSAmHBGrCWEwBfIQby6iD0sToPoW9a1rPcPl6esylRyVa1+xNFAfH3WfoIWp6mhMFA6vtABc8FnYLTh43ckItWxqDNTQSxt4ATYpqviCJOf83JEGmeShHY7eTHkNGjUi42HgbhGfdqoOsBymo8tlMq0h5kQl7T42ByhK0+sys205CrHqXJkKwOYkuP8gMXObvAmvwBjw6dj/tWW4FwfnVcDpjZi0Kjxhg2Zi0nGGmeCOZsvczJXUzYmm2hupjWVuXcA);font-weight:400;font-style:normal}.ag-theme-quartz,.ag-theme-quartz-dark,.ag-theme-quartz-auto-dark{--ag-active-color: #2196f3;--ag-background-color: #fff;--ag-foreground-color: #181d1f;--ag-border-color: color-mix(in srgb, transparent, var(--ag-foreground-color) 15%);--ag-secondary-border-color: var(--ag-border-color);--ag-header-background-color: color-mix(in srgb, var(--ag-background-color), var(--ag-foreground-color) 2%);--ag-tooltip-background-color: var(--ag-header-background-color);--ag-control-panel-background-color: var(--ag-header-background-color);--ag-subheader-background-color: transparent;--ag-invalid-color: #e02525;--ag-checkbox-unchecked-color: color-mix(in srgb, var(--ag-background-color), var(--ag-foreground-color) 30%);--ag-advanced-filter-join-pill-color: #f08e8d;--ag-advanced-filter-column-pill-color: #a6e194;--ag-advanced-filter-option-pill-color: #f3c08b;--ag-advanced-filter-value-pill-color: #85c0e4;--ag-header-column-resize-handle-color: var(--ag-secondary-border-color);--ag-icon-font-color: color-mix(in srgb, transparent, var(--ag-foreground-color) 90%);--ag-find-match-color: var(--ag-foreground-color);--ag-find-match-background-color: #ffff00;--ag-find-active-match-color: var(--ag-foreground-color);--ag-find-active-match-background-color: #ffa500;--ag-panel-background-color: color-mix(in srgb, var(--ag-background-color), var(--ag-foreground-color) 3%);--ag-panel-border-color: color-mix(in srgb, transparent, var(--ag-foreground-color) 20%);--ag-menu-background-color: color-mix(in srgb, var(--ag-background-color), var(--ag-foreground-color) 3%);--ag-menu-border-color: color-mix(in srgb, transparent, var(--ag-foreground-color) 20%);--ag-selected-row-background-color: color-mix(in srgb, transparent, var(--ag-active-color) 8%);--ag-row-hover-color: color-mix(in srgb, transparent, var(--ag-active-color) 12%);--ag-column-hover-color: color-mix(in srgb, transparent, var(--ag-foreground-color) 5%);--ag-input-focus-border-color: var(--ag-active-color);--ag-range-selection-background-color: color-mix(in srgb, transparent, var(--ag-active-color) 20%);--ag-input-focus-box-shadow: 0 0 0 3px color-mix(in srgb, transparent, var(--ag-input-focus-border-color) 47%);--ag-input-error-focus-box-shadow: 0 0 0 3px color-mix(in srgb, var(--ag-background-color), var(--ag-invalid-color) 50%);--ag-range-selection-background-color-2: color-mix(in srgb, transparent, var(--ag-active-color) 36%);--ag-range-selection-background-color-3: color-mix(in srgb, transparent, var(--ag-active-color) 49%);--ag-range-selection-background-color-4: color-mix(in srgb, transparent, var(--ag-active-color) 59%);--ag-row-numbers-selected-color: color-mix(in srgb, transparent, var(--ag-active-color) 50%);--ag-checkbox-background-color: var(--ag-background-color);--ag-checkbox-checked-color: var(--ag-active-color);--ag-range-selection-border-color: var(--ag-active-color);--ag-secondary-foreground-color: var(--ag-foreground-color);--ag-input-border-color: var(--ag-border-color);--ag-input-border-color-invalid: var(--ag-invalid-color);--ag-disabled-foreground-color: color-mix(in srgb, transparent, var(--ag-foreground-color) 50%);--ag-chip-background-color: color-mix(in srgb, transparent, var(--ag-foreground-color) 7%);--ag-chip-border-color: color-mix(in srgb, var(--ag-header-background-color), var(--ag-foreground-color) 13%);--ag-input-disabled-border-color: var(--ag-border-color);--ag-input-disabled-background-color: color-mix(in srgb, var(--ag-background-color), var(--ag-foreground-color) 6%);--ag-modal-overlay-background-color: color-mix(in srgb, transparent, var(--ag-background-color) 66%);--ag-chart-menu-label-color: color-mix(in srgb, transparent, var(--ag-foreground-color) 80%);--ag-chart-menu-pill-select-button-color: color-mix(in srgb, transparent, var(--ag-foreground-color) 70%);--ag-filter-panel-card-subtle-color: color-mix(in srgb, transparent, var(--ag-foreground-color) 70%);--ag-column-drag-indicator-color: var(--ag-active-color);--ag-borders: solid 1px;--ag-border-radius: 4px;--ag-wrapper-border-radius: 8px;--ag-borders-side-button: none;--ag-side-button-selected-background-color: transparent;--ag-header-column-resize-handle-display: block;--ag-header-column-resize-handle-width: 2px;--ag-header-column-resize-handle-height: 30%;--ag-grid-size: 8px;--ag-icon-size: 16px;--ag-header-height: calc(var(--ag-font-size) + var(--ag-grid-size) * 4.25);--ag-row-height: calc(var(--ag-font-size) + var(--ag-grid-size) * 3.5);--ag-list-item-height: calc( var(--ag-icon-size) + var(--ag-widget-vertical-spacing) );--ag-column-select-indent-size: var(--ag-icon-size);--ag-set-filter-indent-size: var(--ag-icon-size);--ag-filter-tool-panel-group-indent: var(--ag-grid-size);--ag-advanced-filter-builder-indent-size: calc(var(--ag-icon-size) + var(--ag-grid-size) * 2);--ag-cell-horizontal-padding: calc(var(--ag-grid-size) * 2);--ag-cell-widget-spacing: calc(var(--ag-grid-size) * 1.5);--ag-widget-container-vertical-padding: calc(var(--ag-grid-size) * 1.5);--ag-widget-container-horizontal-padding: calc(var(--ag-grid-size) * 1.5);--ag-widget-horizontal-spacing: calc(var(--ag-grid-size) * 1.5);--ag-widget-vertical-spacing: calc(var(--ag-grid-size) * 1);--ag-toggle-button-height: 18px;--ag-toggle-button-width: 28px;--ag-toggle-button-border-width: 2px;--ag-font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;--ag-font-size: 14px;--ag-icon-font-family: agGridQuartz;--ag-tab-min-width: 290px;--ag-chart-menu-panel-width: 260px;--ag-card-shadow: 0 1px 4px 1px rgba(186, 191, 199, .4);--ag-popup-shadow: 0 0 16px 0 rgba(0, 0, 0, .15);--ag-side-bar-panel-width: 250px;--ag-filter-panel-apply-button-color: var(--ag-background-color);--ag-filter-panel-apply-button-background-color: var(--ag-active-color);--ag-column-panel-apply-button-color: var(--ag-background-color);--ag-column-panel-apply-button-background-color: var(--ag-active-color)}.ag-theme-quartz-dark{--ag-background-color: color-mix(in srgb, #fff, #182230 97%);--ag-foreground-color: #fff;--ag-border-color: rgba(255, 255, 255, .16);--ag-secondary-border-color: color-mix(in srgb, transparent, var(--ag-foreground-color) 10%);--ag-header-background-color: color-mix(in srgb, #fff, #182230 93%);--ag-tooltip-background-color: color-mix(in srgb, #fff, #182230 96%);--ag-control-panel-background-color: color-mix(in srgb, #fff, #182230 93%);--ag-input-disabled-background-color: #68686e12;--ag-card-shadow: 0 1px 20px 1px black;--ag-input-border-color: var(--ag-border-color);--ag-input-disabled-border-color: rgba(255, 255, 255, .07);--ag-checkbox-unchecked-color: color-mix(in srgb, var(--ag-background-color), var(--ag-foreground-color) 40%);--ag-row-hover-color: color-mix(in srgb, transparent, var(--ag-active-color) 20%);--ag-selected-row-background-color: var(--ag-row-hover-color);--ag-panel-background-color: color-mix(in srgb, var(--ag-background-color), var(--ag-foreground-color) 10%);--ag-panel-border-color: color-mix(in srgb, transparent, var(--ag-foreground-color) 10%);--ag-menu-background-color: color-mix(in srgb, var(--ag-background-color), var(--ag-foreground-color) 10%);--ag-menu-border-color: color-mix(in srgb, transparent, var(--ag-foreground-color) 10%);--ag-advanced-filter-join-pill-color: #7a3a37;--ag-advanced-filter-column-pill-color: #355f2d;--ag-advanced-filter-option-pill-color: #5a3168;--ag-advanced-filter-value-pill-color: #374c86;--ag-find-match-color: var(--ag-background-color);--ag-find-active-match-color: var(--ag-background-color);--ag-filter-panel-apply-button-color: var(--ag-foreground-color);--ag-column-panel-apply-button-color: var(--ag-foreground-color);--ag-popup-shadow: 0 0px 20px rgba(0, 0, 0, .3);--ag-row-loading-skeleton-effect-color: rgba(202, 203, 204, .4);--ag-cell-batch-edit-text-color: #f3d0b3;--ag-formula-token-1-color: #4da3e5;--ag-formula-token-1-background-color: rgb(77 163 229 / 16%);--ag-formula-token-2-color: #f55864;--ag-formula-token-2-background-color: rgb(245 88 100 / 16%);--ag-formula-token-3-color: #b688f2;--ag-formula-token-3-background-color: rgb(182 136 242 / 16%);--ag-formula-token-4-color: #24bb4a;--ag-formula-token-4-background-color: rgb(36 187 74 / 16%);--ag-formula-token-5-color: #e772ba;--ag-formula-token-5-background-color: rgb(231 114 186 / 16%);--ag-formula-token-6-color: #f69b5f;--ag-formula-token-6-background-color: rgb(246 155 95 / 16%);--ag-formula-token-7-color: #a3e6ff;--ag-formula-token-7-background-color: rgb(163 230 255 / 16%);color-scheme:dark}@media(prefers-color-scheme:dark){.ag-theme-quartz-auto-dark{--ag-background-color: color-mix(in srgb, #fff, #182230 97%);--ag-foreground-color: #fff;--ag-border-color: rgba(255, 255, 255, .16);--ag-secondary-border-color: color-mix(in srgb, transparent, var(--ag-foreground-color) 10%);--ag-header-background-color: color-mix(in srgb, #fff, #182230 93%);--ag-tooltip-background-color: color-mix(in srgb, #fff, #182230 96%);--ag-control-panel-background-color: color-mix(in srgb, #fff, #182230 93%);--ag-input-disabled-background-color: #68686e12;--ag-card-shadow: 0 1px 20px 1px black;--ag-input-border-color: var(--ag-border-color);--ag-input-disabled-border-color: rgba(255, 255, 255, .07);--ag-checkbox-unchecked-color: color-mix(in srgb, var(--ag-background-color), var(--ag-foreground-color) 40%);--ag-row-hover-color: color-mix(in srgb, transparent, var(--ag-active-color) 20%);--ag-selected-row-background-color: var(--ag-row-hover-color);--ag-panel-background-color: color-mix(in srgb, var(--ag-background-color), var(--ag-foreground-color) 10%);--ag-panel-border-color: color-mix(in srgb, transparent, var(--ag-foreground-color) 10%);--ag-menu-background-color: color-mix(in srgb, var(--ag-background-color), var(--ag-foreground-color) 10%);--ag-menu-border-color: color-mix(in srgb, transparent, var(--ag-foreground-color) 10%);--ag-advanced-filter-join-pill-color: #7a3a37;--ag-advanced-filter-column-pill-color: #355f2d;--ag-advanced-filter-option-pill-color: #5a3168;--ag-advanced-filter-value-pill-color: #374c86;--ag-find-match-color: var(--ag-background-color);--ag-find-active-match-color: var(--ag-background-color);--ag-filter-panel-apply-button-color: var(--ag-foreground-color);--ag-column-panel-apply-button-color: var(--ag-foreground-color);--ag-popup-shadow: 0 0px 20px rgba(0, 0, 0, .3);--ag-row-loading-skeleton-effect-color: rgba(202, 203, 204, .4);--ag-cell-batch-edit-text-color: #f3d0b3;--ag-formula-token-1-color: #4da3e5;--ag-formula-token-1-background-color: rgb(77 163 229 / 16%);--ag-formula-token-2-color: #f55864;--ag-formula-token-2-background-color: rgb(245 88 100 / 16%);--ag-formula-token-3-color: #b688f2;--ag-formula-token-3-background-color: rgb(182 136 242 / 16%);--ag-formula-token-4-color: #24bb4a;--ag-formula-token-4-background-color: rgb(36 187 74 / 16%);--ag-formula-token-5-color: #e772ba;--ag-formula-token-5-background-color: rgb(231 114 186 / 16%);--ag-formula-token-6-color: #f69b5f;--ag-formula-token-6-background-color: rgb(246 155 95 / 16%);--ag-formula-token-7-color: #a3e6ff;--ag-formula-token-7-background-color: rgb(163 230 255 / 16%);color-scheme:dark}}.ag-theme-quartz .ag-filter-toolpanel-header,.ag-theme-quartz .ag-filter-toolpanel-search,.ag-theme-quartz .ag-status-bar,.ag-theme-quartz .ag-header-row,.ag-theme-quartz .ag-row-number-cell,.ag-theme-quartz .ag-panel-title-bar-title,.ag-theme-quartz .ag-multi-filter-group-title-bar,.ag-theme-quartz .ag-filter-card-title,.ag-theme-quartz-dark .ag-filter-toolpanel-header,.ag-theme-quartz-dark .ag-filter-toolpanel-search,.ag-theme-quartz-dark .ag-status-bar,.ag-theme-quartz-dark .ag-header-row,.ag-theme-quartz-dark .ag-row-number-cell,.ag-theme-quartz-dark .ag-panel-title-bar-title,.ag-theme-quartz-dark .ag-multi-filter-group-title-bar,.ag-theme-quartz-dark .ag-filter-card-title,.ag-theme-quartz-auto-dark .ag-filter-toolpanel-header,.ag-theme-quartz-auto-dark .ag-filter-toolpanel-search,.ag-theme-quartz-auto-dark .ag-status-bar,.ag-theme-quartz-auto-dark .ag-header-row,.ag-theme-quartz-auto-dark .ag-row-number-cell,.ag-theme-quartz-auto-dark .ag-panel-title-bar-title,.ag-theme-quartz-auto-dark .ag-multi-filter-group-title-bar,.ag-theme-quartz-auto-dark .ag-filter-card-title{font-weight:500;color:var(--ag-header-foreground-color)}.ag-theme-quartz input[class^=ag-]:not([type]),.ag-theme-quartz input[class^=ag-][type=text],.ag-theme-quartz input[class^=ag-][type=number],.ag-theme-quartz input[class^=ag-][type=tel],.ag-theme-quartz input[class^=ag-][type=date],.ag-theme-quartz input[class^=ag-][type=datetime-local],.ag-theme-quartz textarea[class^=ag-],.ag-theme-quartz-dark input[class^=ag-]:not([type]),.ag-theme-quartz-dark input[class^=ag-][type=text],.ag-theme-quartz-dark input[class^=ag-][type=number],.ag-theme-quartz-dark input[class^=ag-][type=tel],.ag-theme-quartz-dark input[class^=ag-][type=date],.ag-theme-quartz-dark input[class^=ag-][type=datetime-local],.ag-theme-quartz-dark textarea[class^=ag-],.ag-theme-quartz-auto-dark input[class^=ag-]:not([type]),.ag-theme-quartz-auto-dark input[class^=ag-][type=text],.ag-theme-quartz-auto-dark input[class^=ag-][type=number],.ag-theme-quartz-auto-dark input[class^=ag-][type=tel],.ag-theme-quartz-auto-dark input[class^=ag-][type=date],.ag-theme-quartz-auto-dark input[class^=ag-][type=datetime-local],.ag-theme-quartz-auto-dark textarea[class^=ag-]{min-height:calc(var(--ag-grid-size) * 4);border-radius:var(--ag-border-radius)}.ag-theme-quartz .ag-ltr input[class^=ag-]:not([type]),.ag-theme-quartz .ag-ltr input[class^=ag-][type=text],.ag-theme-quartz .ag-ltr input[class^=ag-][type=number],.ag-theme-quartz .ag-ltr input[class^=ag-][type=tel],.ag-theme-quartz .ag-ltr input[class^=ag-][type=date],.ag-theme-quartz .ag-ltr input[class^=ag-][type=datetime-local],.ag-theme-quartz .ag-ltr textarea[class^=ag-],.ag-theme-quartz-dark .ag-ltr input[class^=ag-]:not([type]),.ag-theme-quartz-dark .ag-ltr input[class^=ag-][type=text],.ag-theme-quartz-dark .ag-ltr input[class^=ag-][type=number],.ag-theme-quartz-dark .ag-ltr input[class^=ag-][type=tel],.ag-theme-quartz-dark .ag-ltr input[class^=ag-][type=date],.ag-theme-quartz-dark .ag-ltr input[class^=ag-][type=datetime-local],.ag-theme-quartz-dark .ag-ltr textarea[class^=ag-],.ag-theme-quartz-auto-dark .ag-ltr input[class^=ag-]:not([type]),.ag-theme-quartz-auto-dark .ag-ltr input[class^=ag-][type=text],.ag-theme-quartz-auto-dark .ag-ltr input[class^=ag-][type=number],.ag-theme-quartz-auto-dark .ag-ltr input[class^=ag-][type=tel],.ag-theme-quartz-auto-dark .ag-ltr input[class^=ag-][type=date],.ag-theme-quartz-auto-dark .ag-ltr input[class^=ag-][type=datetime-local],.ag-theme-quartz-auto-dark .ag-ltr textarea[class^=ag-]{padding-left:var(--ag-grid-size)}.ag-theme-quartz .ag-rtl input[class^=ag-]:not([type]),.ag-theme-quartz .ag-rtl input[class^=ag-][type=text],.ag-theme-quartz .ag-rtl input[class^=ag-][type=number],.ag-theme-quartz .ag-rtl input[class^=ag-][type=tel],.ag-theme-quartz .ag-rtl input[class^=ag-][type=date],.ag-theme-quartz .ag-rtl input[class^=ag-][type=datetime-local],.ag-theme-quartz .ag-rtl textarea[class^=ag-],.ag-theme-quartz-dark .ag-rtl input[class^=ag-]:not([type]),.ag-theme-quartz-dark .ag-rtl input[class^=ag-][type=text],.ag-theme-quartz-dark .ag-rtl input[class^=ag-][type=number],.ag-theme-quartz-dark .ag-rtl input[class^=ag-][type=tel],.ag-theme-quartz-dark .ag-rtl input[class^=ag-][type=date],.ag-theme-quartz-dark .ag-rtl input[class^=ag-][type=datetime-local],.ag-theme-quartz-dark .ag-rtl textarea[class^=ag-],.ag-theme-quartz-auto-dark .ag-rtl input[class^=ag-]:not([type]),.ag-theme-quartz-auto-dark .ag-rtl input[class^=ag-][type=text],.ag-theme-quartz-auto-dark .ag-rtl input[class^=ag-][type=number],.ag-theme-quartz-auto-dark .ag-rtl input[class^=ag-][type=tel],.ag-theme-quartz-auto-dark .ag-rtl input[class^=ag-][type=date],.ag-theme-quartz-auto-dark .ag-rtl input[class^=ag-][type=datetime-local],.ag-theme-quartz-auto-dark .ag-rtl textarea[class^=ag-]{padding-right:var(--ag-grid-size)}.ag-theme-quartz .ag-picker-field-wrapper,.ag-theme-quartz-dark .ag-picker-field-wrapper,.ag-theme-quartz-auto-dark .ag-picker-field-wrapper{min-height:calc(var(--ag-grid-size) * 4)}.ag-theme-quartz .ag-tab,.ag-theme-quartz-dark .ag-tab,.ag-theme-quartz-auto-dark .ag-tab{padding:var(--ag-grid-size);border-left:var(--ag-borders) transparent;border-right:var(--ag-borders) transparent;flex:1 1 auto}.ag-theme-quartz .ag-tab-selected,.ag-theme-quartz-dark .ag-tab-selected,.ag-theme-quartz-auto-dark .ag-tab-selected{background-color:var(--ag-background-color)}.ag-theme-quartz .ag-ltr .ag-tab-selected:not(:first-of-type),.ag-theme-quartz-dark .ag-ltr .ag-tab-selected:not(:first-of-type),.ag-theme-quartz-auto-dark .ag-ltr .ag-tab-selected:not(:first-of-type){border-left-color:var(--ag-border-color)}.ag-theme-quartz .ag-rtl .ag-tab-selected:not(:first-of-type),.ag-theme-quartz-dark .ag-rtl .ag-tab-selected:not(:first-of-type),.ag-theme-quartz-auto-dark .ag-rtl .ag-tab-selected:not(:first-of-type){border-right-color:var(--ag-border-color)}.ag-theme-quartz .ag-ltr .ag-tab-selected:not(:last-of-type),.ag-theme-quartz-dark .ag-ltr .ag-tab-selected:not(:last-of-type),.ag-theme-quartz-auto-dark .ag-ltr .ag-tab-selected:not(:last-of-type){border-right-color:var(--ag-border-color)}.ag-theme-quartz .ag-rtl .ag-tab-selected:not(:last-of-type),.ag-theme-quartz-dark .ag-rtl .ag-tab-selected:not(:last-of-type),.ag-theme-quartz-auto-dark .ag-rtl .ag-tab-selected:not(:last-of-type){border-left-color:var(--ag-border-color)}.ag-theme-quartz .ag-tab:not(.ag-tab-selected),.ag-theme-quartz-dark .ag-tab:not(.ag-tab-selected),.ag-theme-quartz-auto-dark .ag-tab:not(.ag-tab-selected){opacity:.7}.ag-theme-quartz .ag-tab:not(.ag-tab-selected):hover,.ag-theme-quartz-dark .ag-tab:not(.ag-tab-selected):hover,.ag-theme-quartz-auto-dark .ag-tab:not(.ag-tab-selected):hover{opacity:1}.ag-theme-quartz .ag-menu,.ag-theme-quartz-dark .ag-menu,.ag-theme-quartz-auto-dark .ag-menu{color:color-mix(in srgb,transparent,var(--ag-foreground-color) 95%)}.ag-theme-quartz .ag-panel-content-wrapper .ag-column-select,.ag-theme-quartz-dark .ag-panel-content-wrapper .ag-column-select,.ag-theme-quartz-auto-dark .ag-panel-content-wrapper .ag-column-select{background-color:var(--ag-control-panel-background-color);color:color-mix(in srgb,transparent,var(--ag-foreground-color) 95%)}.ag-theme-quartz .ag-menu-header,.ag-theme-quartz-dark .ag-menu-header,.ag-theme-quartz-auto-dark .ag-menu-header{background-color:var(--ag-control-panel-background-color)}.ag-theme-quartz .ag-menu-option,.ag-theme-quartz-dark .ag-menu-option,.ag-theme-quartz-auto-dark .ag-menu-option{font-weight:500;cursor:pointer}.ag-theme-quartz .ag-ltr .ag-menu-option-popup-pointer .ag-icon,.ag-theme-quartz-dark .ag-ltr .ag-menu-option-popup-pointer .ag-icon,.ag-theme-quartz-auto-dark .ag-ltr .ag-menu-option-popup-pointer .ag-icon{text-align:right}.ag-theme-quartz .ag-rtl .ag-menu-option-popup-pointer .ag-icon,.ag-theme-quartz-dark .ag-rtl .ag-menu-option-popup-pointer .ag-icon,.ag-theme-quartz-auto-dark .ag-rtl .ag-menu-option-popup-pointer .ag-icon{text-align:left}.ag-theme-quartz .ag-tabs-header,.ag-theme-quartz-dark .ag-tabs-header,.ag-theme-quartz-auto-dark .ag-tabs-header{border-bottom:var(--ag-borders) var(--ag-border-color);display:flex;background-color:color-mix(in srgb,transparent,var(--ag-foreground-color) 5%)}.ag-theme-quartz .ag-side-bar,.ag-theme-quartz-dark .ag-side-bar,.ag-theme-quartz-auto-dark .ag-side-bar{background-color:var(--ag-control-panel-background-color);min-width:calc(var(--ag-icon-size) + var(--ag-grid-size) * 2)}.ag-theme-quartz .ag-side-buttons,.ag-theme-quartz-dark .ag-side-buttons,.ag-theme-quartz-auto-dark .ag-side-buttons{padding:0;align-self:stretch;width:calc(var(--ag-icon-size) + var(--ag-grid-size) * 2);background:var(--ag-control-panel-background-color)}.ag-theme-quartz .ag-side-button,.ag-theme-quartz-dark .ag-side-button,.ag-theme-quartz-auto-dark .ag-side-button{border-top:var(--ag-borders) transparent;border-bottom:var(--ag-borders) transparent}@media(max-resolution:1.5x){.ag-theme-quartz .ag-side-button-label,.ag-theme-quartz-dark .ag-side-button-label,.ag-theme-quartz-auto-dark .ag-side-button-label{font-family:"Segoe UI",var(--ag-font-family);transform:rotate(.05deg)}}.ag-theme-quartz .ag-side-button.ag-selected,.ag-theme-quartz-dark .ag-side-button.ag-selected,.ag-theme-quartz-auto-dark .ag-side-button.ag-selected{border-bottom-color:var(--ag-border-color);background-color:var(--ag-background-color)}.ag-theme-quartz .ag-side-button.ag-selected:not(:first-of-type),.ag-theme-quartz-dark .ag-side-button.ag-selected:not(:first-of-type),.ag-theme-quartz-auto-dark .ag-side-button.ag-selected:not(:first-of-type){border-top-color:var(--ag-border-color)}.ag-theme-quartz .ag-column-panel-column-select,.ag-theme-quartz-dark .ag-column-panel-column-select,.ag-theme-quartz-auto-dark .ag-column-panel-column-select{border-top:none}.ag-theme-quartz .ag-column-panel-column-select:not(.ag-last-visible-child),.ag-theme-quartz-dark .ag-column-panel-column-select:not(.ag-last-visible-child),.ag-theme-quartz-auto-dark .ag-column-panel-column-select:not(.ag-last-visible-child){border-bottom:1px solid var(--ag-secondary-border-color)}.ag-theme-quartz .ag-filter-toolpanel-search,.ag-theme-quartz-dark .ag-filter-toolpanel-search,.ag-theme-quartz-auto-dark .ag-filter-toolpanel-search{height:initial;margin-top:var(--ag-widget-container-vertical-padding)}.ag-theme-quartz .ag-filter-toolpanel-search-input,.ag-theme-quartz-dark .ag-filter-toolpanel-search-input,.ag-theme-quartz-auto-dark .ag-filter-toolpanel-search-input{margin:0}.ag-theme-quartz .ag-filter-apply-panel,.ag-theme-quartz-dark .ag-filter-apply-panel,.ag-theme-quartz-auto-dark .ag-filter-apply-panel{border:none;padding-top:var(--ag-widget-vertical-spacing)}.ag-theme-quartz .ag-chart-tabbed-menu-body,.ag-theme-quartz-dark .ag-chart-tabbed-menu-body,.ag-theme-quartz-auto-dark .ag-chart-tabbed-menu-body{position:relative}.ag-theme-quartz .ag-chart-tabbed-menu-body:after,.ag-theme-quartz-dark .ag-chart-tabbed-menu-body:after,.ag-theme-quartz-auto-dark .ag-chart-tabbed-menu-body:after{content:"";position:absolute;display:block;top:0;left:0;right:0;height:16px;background:linear-gradient(var(--ag-control-panel-background-color),transparent)}.ag-theme-quartz .ag-charts-settings-group-title-bar,.ag-theme-quartz .ag-charts-data-group-title-bar,.ag-theme-quartz .ag-charts-format-top-level-group-title-bar,.ag-theme-quartz .ag-charts-advanced-settings-top-level-group-title-bar,.ag-theme-quartz .ag-charts-settings-group-container,.ag-theme-quartz-dark .ag-charts-settings-group-title-bar,.ag-theme-quartz-dark .ag-charts-data-group-title-bar,.ag-theme-quartz-dark .ag-charts-format-top-level-group-title-bar,.ag-theme-quartz-dark .ag-charts-advanced-settings-top-level-group-title-bar,.ag-theme-quartz-dark .ag-charts-settings-group-container,.ag-theme-quartz-auto-dark .ag-charts-settings-group-title-bar,.ag-theme-quartz-auto-dark .ag-charts-data-group-title-bar,.ag-theme-quartz-auto-dark .ag-charts-format-top-level-group-title-bar,.ag-theme-quartz-auto-dark .ag-charts-advanced-settings-top-level-group-title-bar,.ag-theme-quartz-auto-dark .ag-charts-settings-group-container{border-top:none;font-weight:500}.ag-theme-quartz .ag-chart-mini-thumbnail,.ag-theme-quartz-dark .ag-chart-mini-thumbnail,.ag-theme-quartz-auto-dark .ag-chart-mini-thumbnail{background-color:var(--ag-background-color);margin-top:0;margin-bottom:0}.ag-theme-quartz .ag-chart-settings-nav-bar,.ag-theme-quartz-dark .ag-chart-settings-nav-bar,.ag-theme-quartz-auto-dark .ag-chart-settings-nav-bar{border-top:var(--ag-borders-secondary) var(--ag-secondary-border-color)}.ag-theme-quartz .ag-charts-format-sub-level-group-title-bar,.ag-theme-quartz-dark .ag-charts-format-sub-level-group-title-bar,.ag-theme-quartz-auto-dark .ag-charts-format-sub-level-group-title-bar{background:none;font-weight:500}.ag-theme-quartz .ag-chart-data-section .ag-label:not(.ag-group-title-bar),.ag-theme-quartz .ag-chart-format-section .ag-label:not(.ag-group-title-bar),.ag-theme-quartz-dark .ag-chart-data-section .ag-label:not(.ag-group-title-bar),.ag-theme-quartz-dark .ag-chart-format-section .ag-label:not(.ag-group-title-bar),.ag-theme-quartz-auto-dark .ag-chart-data-section .ag-label:not(.ag-group-title-bar),.ag-theme-quartz-auto-dark .ag-chart-format-section .ag-label:not(.ag-group-title-bar){color:var(--ag-chart-menu-label-color)}.ag-theme-quartz .ag-chart-data-section .ag-label-align-top .ag-label,.ag-theme-quartz .ag-chart-format-section .ag-label-align-top .ag-label,.ag-theme-quartz-dark .ag-chart-data-section .ag-label-align-top .ag-label,.ag-theme-quartz-dark .ag-chart-format-section .ag-label-align-top .ag-label,.ag-theme-quartz-auto-dark .ag-chart-data-section .ag-label-align-top .ag-label,.ag-theme-quartz-auto-dark .ag-chart-format-section .ag-label-align-top .ag-label{margin-top:calc(var(--ag-widget-vertical-spacing) * .5);margin-bottom:var(--ag-widget-vertical-spacing)}.ag-theme-quartz .ag-chart-data-section .ag-slider.ag-label-align-top .ag-label,.ag-theme-quartz .ag-chart-format-section .ag-slider.ag-label-align-top .ag-label,.ag-theme-quartz-dark .ag-chart-data-section .ag-slider.ag-label-align-top .ag-label,.ag-theme-quartz-dark .ag-chart-format-section .ag-slider.ag-label-align-top .ag-label,.ag-theme-quartz-auto-dark .ag-chart-data-section .ag-slider.ag-label-align-top .ag-label,.ag-theme-quartz-auto-dark .ag-chart-format-section .ag-slider.ag-label-align-top .ag-label{margin-bottom:0}.ag-theme-quartz .ag-chart-data-section label,.ag-theme-quartz .ag-chart-format-section label,.ag-theme-quartz-dark .ag-chart-data-section label,.ag-theme-quartz-dark .ag-chart-format-section label,.ag-theme-quartz-auto-dark .ag-chart-data-section label,.ag-theme-quartz-auto-dark .ag-chart-format-section label{display:inline-block}.ag-theme-quartz .ag-chart-format-wrapper,.ag-theme-quartz .ag-chart-data-wrapper,.ag-theme-quartz .ag-charts-format-top-level-group,.ag-theme-quartz .ag-charts-format-top-level-group-title-bar,.ag-theme-quartz .ag-charts-format-top-level-group .ag-charts-format-top-level-group-container,.ag-theme-quartz .ag-charts-format-top-level-group-item,.ag-theme-quartz .ag-charts-format-sub-level-group,.ag-theme-quartz .ag-charts-format-sub-level-group-title-bar,.ag-theme-quartz .ag-charts-format-sub-level-group-container,.ag-theme-quartz .ag-charts-format-sub-level-group-item:last-child,.ag-theme-quartz .ag-charts-format-sub-level-group-container>*,.ag-theme-quartz .ag-charts-data-group-title-bar,.ag-theme-quartz .ag-charts-data-group-container,.ag-theme-quartz .ag-charts-settings-group-title-bar,.ag-theme-quartz .ag-charts-settings-group-container,.ag-theme-quartz-dark .ag-chart-format-wrapper,.ag-theme-quartz-dark .ag-chart-data-wrapper,.ag-theme-quartz-dark .ag-charts-format-top-level-group,.ag-theme-quartz-dark .ag-charts-format-top-level-group-title-bar,.ag-theme-quartz-dark .ag-charts-format-top-level-group .ag-charts-format-top-level-group-container,.ag-theme-quartz-dark .ag-charts-format-top-level-group-item,.ag-theme-quartz-dark .ag-charts-format-sub-level-group,.ag-theme-quartz-dark .ag-charts-format-sub-level-group-title-bar,.ag-theme-quartz-dark .ag-charts-format-sub-level-group-container,.ag-theme-quartz-dark .ag-charts-format-sub-level-group-item:last-child,.ag-theme-quartz-dark .ag-charts-format-sub-level-group-container>*,.ag-theme-quartz-dark .ag-charts-data-group-title-bar,.ag-theme-quartz-dark .ag-charts-data-group-container,.ag-theme-quartz-dark .ag-charts-settings-group-title-bar,.ag-theme-quartz-dark .ag-charts-settings-group-container,.ag-theme-quartz-auto-dark .ag-chart-format-wrapper,.ag-theme-quartz-auto-dark .ag-chart-data-wrapper,.ag-theme-quartz-auto-dark .ag-charts-format-top-level-group,.ag-theme-quartz-auto-dark .ag-charts-format-top-level-group-title-bar,.ag-theme-quartz-auto-dark .ag-charts-format-top-level-group .ag-charts-format-top-level-group-container,.ag-theme-quartz-auto-dark .ag-charts-format-top-level-group-item,.ag-theme-quartz-auto-dark .ag-charts-format-sub-level-group,.ag-theme-quartz-auto-dark .ag-charts-format-sub-level-group-title-bar,.ag-theme-quartz-auto-dark .ag-charts-format-sub-level-group-container,.ag-theme-quartz-auto-dark .ag-charts-format-sub-level-group-item:last-child,.ag-theme-quartz-auto-dark .ag-charts-format-sub-level-group-container>*,.ag-theme-quartz-auto-dark .ag-charts-data-group-title-bar,.ag-theme-quartz-auto-dark .ag-charts-data-group-container,.ag-theme-quartz-auto-dark .ag-charts-settings-group-title-bar,.ag-theme-quartz-auto-dark .ag-charts-settings-group-container{padding:0;margin:0}.ag-theme-quartz .ag-charts-format-top-level-group,.ag-theme-quartz .ag-charts-data-group,.ag-theme-quartz-dark .ag-charts-format-top-level-group,.ag-theme-quartz-dark .ag-charts-data-group,.ag-theme-quartz-auto-dark .ag-charts-format-top-level-group,.ag-theme-quartz-auto-dark .ag-charts-data-group{border-top:var(--ag-borders-secondary) var(--ag-secondary-border-color)}.ag-theme-quartz .ag-charts-format-top-level-group-title-bar,.ag-theme-quartz .ag-charts-data-group-title-bar,.ag-theme-quartz .ag-charts-settings-group-title-bar,.ag-theme-quartz-dark .ag-charts-format-top-level-group-title-bar,.ag-theme-quartz-dark .ag-charts-data-group-title-bar,.ag-theme-quartz-dark .ag-charts-settings-group-title-bar,.ag-theme-quartz-auto-dark .ag-charts-format-top-level-group-title-bar,.ag-theme-quartz-auto-dark .ag-charts-data-group-title-bar,.ag-theme-quartz-auto-dark .ag-charts-settings-group-title-bar{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-theme-quartz .ag-charts-format-top-level-group .ag-charts-format-top-level-group-container,.ag-theme-quartz .ag-charts-data-group .ag-charts-data-group-container,.ag-theme-quartz .ag-charts-settings-group .ag-charts-settings-group-container,.ag-theme-quartz-dark .ag-charts-format-top-level-group .ag-charts-format-top-level-group-container,.ag-theme-quartz-dark .ag-charts-data-group .ag-charts-data-group-container,.ag-theme-quartz-dark .ag-charts-settings-group .ag-charts-settings-group-container,.ag-theme-quartz-auto-dark .ag-charts-format-top-level-group .ag-charts-format-top-level-group-container,.ag-theme-quartz-auto-dark .ag-charts-data-group .ag-charts-data-group-container,.ag-theme-quartz-auto-dark .ag-charts-settings-group .ag-charts-settings-group-container{padding:0 var(--ag-widget-container-horizontal-padding)}.ag-theme-quartz .ag-charts-format-sub-level-group-title-bar,.ag-theme-quartz-dark .ag-charts-format-sub-level-group-title-bar,.ag-theme-quartz-auto-dark .ag-charts-format-sub-level-group-title-bar{padding:var(--ag-widget-vertical-spacing) 0}.ag-theme-quartz .ag-charts-format-sub-level-group-container,.ag-theme-quartz-dark .ag-charts-format-sub-level-group-container,.ag-theme-quartz-auto-dark .ag-charts-format-sub-level-group-container{padding-top:var(--ag-widget-vertical-spacing);padding-bottom:var(--ag-widget-container-vertical-padding)}.ag-theme-quartz .ag-charts-format-top-level-group-container>*,.ag-theme-quartz .ag-charts-format-sub-level-group-container>*,.ag-theme-quartz-dark .ag-charts-format-top-level-group-container>*,.ag-theme-quartz-dark .ag-charts-format-sub-level-group-container>*,.ag-theme-quartz-auto-dark .ag-charts-format-top-level-group-container>*,.ag-theme-quartz-auto-dark .ag-charts-format-sub-level-group-container>*{margin-bottom:var(--ag-widget-vertical-spacing)}.ag-theme-quartz .ag-charts-data-group-item,.ag-theme-quartz-dark .ag-charts-data-group-item,.ag-theme-quartz-auto-dark .ag-charts-data-group-item,.ag-theme-quartz .ag-chart-settings-mini-wrapper,.ag-theme-quartz-dark .ag-chart-settings-mini-wrapper,.ag-theme-quartz-auto-dark .ag-chart-settings-mini-wrapper{padding-bottom:var(--ag-widget-container-vertical-padding)}.ag-theme-quartz .ag-chart-advanced-settings-section,.ag-theme-quartz-dark .ag-chart-advanced-settings-section,.ag-theme-quartz-auto-dark .ag-chart-advanced-settings-section{padding-top:var(--ag-widget-container-vertical-padding);padding-bottom:var(--ag-widget-container-vertical-padding)}.ag-theme-quartz .ag-charts-advanced-settings-top-level-group .ag-charts-advanced-settings-top-level-group-title-bar,.ag-theme-quartz .ag-charts-advanced-settings-top-level-group .ag-charts-advanced-settings-top-level-group-container,.ag-theme-quartz-dark .ag-charts-advanced-settings-top-level-group .ag-charts-advanced-settings-top-level-group-title-bar,.ag-theme-quartz-dark .ag-charts-advanced-settings-top-level-group .ag-charts-advanced-settings-top-level-group-container,.ag-theme-quartz-auto-dark .ag-charts-advanced-settings-top-level-group .ag-charts-advanced-settings-top-level-group-title-bar,.ag-theme-quartz-auto-dark .ag-charts-advanced-settings-top-level-group .ag-charts-advanced-settings-top-level-group-container{padding:0 var(--ag-widget-container-horizontal-padding)}.ag-theme-quartz .ag-charts-advanced-settings-top-level-group-container,.ag-theme-quartz-dark .ag-charts-advanced-settings-top-level-group-container,.ag-theme-quartz-auto-dark .ag-charts-advanced-settings-top-level-group-container{margin:0}.ag-theme-quartz .ag-charts-advanced-settings-top-level-group-item,.ag-theme-quartz-dark .ag-charts-advanced-settings-top-level-group-item,.ag-theme-quartz-auto-dark .ag-charts-advanced-settings-top-level-group-item{margin-top:calc(var(--ag-widget-vertical-spacing) * 2);margin-bottom:0}.ag-theme-quartz .ag-ltr .ag-group-title-bar-icon,.ag-theme-quartz-dark .ag-ltr .ag-group-title-bar-icon,.ag-theme-quartz-auto-dark .ag-ltr .ag-group-title-bar-icon{margin-right:var(--ag-grid-size)}.ag-theme-quartz .ag-rtl .ag-group-title-bar-icon,.ag-theme-quartz-dark .ag-rtl .ag-group-title-bar-icon,.ag-theme-quartz-auto-dark .ag-rtl .ag-group-title-bar-icon{margin-left:var(--ag-grid-size)}.ag-theme-quartz .ag-spectrum-color,.ag-theme-quartz .ag-spectrum-fill,.ag-theme-quartz-dark .ag-spectrum-color,.ag-theme-quartz-dark .ag-spectrum-fill,.ag-theme-quartz-auto-dark .ag-spectrum-color,.ag-theme-quartz-auto-dark .ag-spectrum-fill{border-radius:var(--ag-border-radius)}.ag-theme-quartz .ag-spectrum-dragger,.ag-theme-quartz-dark .ag-spectrum-dragger,.ag-theme-quartz-auto-dark .ag-spectrum-dragger{border-radius:18px;height:18px;width:18px;border:3px solid white}.ag-theme-quartz .ag-spectrum-tools,.ag-theme-quartz-dark .ag-spectrum-tools,.ag-theme-quartz-auto-dark .ag-spectrum-tools{padding-left:0;padding-right:0;padding-bottom:0}.ag-theme-quartz .ag-spectrum-tool,.ag-theme-quartz-dark .ag-spectrum-tool,.ag-theme-quartz-auto-dark .ag-spectrum-tool{height:12px}.ag-theme-quartz .ag-spectrum-hue-background,.ag-theme-quartz .ag-spectrum-alpha-background,.ag-theme-quartz-dark .ag-spectrum-hue-background,.ag-theme-quartz-dark .ag-spectrum-alpha-background,.ag-theme-quartz-auto-dark .ag-spectrum-hue-background,.ag-theme-quartz-auto-dark .ag-spectrum-alpha-background{border-radius:12px}.ag-theme-quartz .ag-spectrum-slider,.ag-theme-quartz-dark .ag-spectrum-slider,.ag-theme-quartz-auto-dark .ag-spectrum-slider{margin-top:-15px;width:18px;height:18px;border-radius:18px;border:3px solid rgb(248,248,248)}.ag-theme-quartz .ag-recent-colors,.ag-theme-quartz-dark .ag-recent-colors,.ag-theme-quartz-auto-dark .ag-recent-colors{margin-left:var(--ag-grid-size);margin-right:var(--ag-grid-size);margin-bottom:2px}.ag-theme-quartz .ag-color-input-color,.ag-theme-quartz .ag-color-picker-color,.ag-theme-quartz .ag-recent-color,.ag-theme-quartz-dark .ag-color-input-color,.ag-theme-quartz-dark .ag-color-picker-color,.ag-theme-quartz-dark .ag-recent-color,.ag-theme-quartz-auto-dark .ag-color-input-color,.ag-theme-quartz-auto-dark .ag-color-picker-color,.ag-theme-quartz-auto-dark .ag-recent-color{border-radius:4px}.ag-theme-quartz .ag-recent-color,.ag-theme-quartz-dark .ag-recent-color,.ag-theme-quartz-auto-dark .ag-recent-color{border:var(--ag-borders-secondary) var(--ag-secondary-border-color)}.ag-theme-quartz.ag-dnd-ghost,.ag-theme-quartz-dark.ag-dnd-ghost,.ag-theme-quartz-auto-dark.ag-dnd-ghost{font-weight:500}.ag-theme-quartz .ag-standard-button,.ag-theme-quartz-dark .ag-standard-button,.ag-theme-quartz-auto-dark .ag-standard-button{font-family:inherit;appearance:none;-webkit-appearance:none;border-radius:var(--ag-border-radius);border:solid 1px var(--ag-input-border-color);background-color:var(--ag-background-color);padding:var(--ag-grid-size) calc(var(--ag-grid-size) * 2);cursor:pointer}.ag-theme-quartz .ag-standard-button:hover,.ag-theme-quartz-dark .ag-standard-button:hover,.ag-theme-quartz-auto-dark .ag-standard-button:hover{background-color:var(--ag-row-hover-color)}.ag-theme-quartz .ag-standard-button:active,.ag-theme-quartz-dark .ag-standard-button:active,.ag-theme-quartz-auto-dark .ag-standard-button:active{border-color:var(--ag-active-color)}.ag-theme-quartz .ag-standard-button:disabled,.ag-theme-quartz-dark .ag-standard-button:disabled,.ag-theme-quartz-auto-dark .ag-standard-button:disabled{color:var(--ag-disabled-foreground-color);background-color:var(--ag-input-disabled-background-color);border-color:var(--ag-input-disabled-border-color)}.ag-theme-quartz .ag-column-drop-cell,.ag-theme-quartz-dark .ag-column-drop-cell,.ag-theme-quartz-auto-dark .ag-column-drop-cell{border-radius:calc(var(--ag-grid-size) * 3);height:calc(var(--ag-grid-size) * 3);padding:0 var(--ag-grid-size)}.ag-theme-quartz .ag-column-drop-cell-button,.ag-theme-quartz-dark .ag-column-drop-cell-button,.ag-theme-quartz-auto-dark .ag-column-drop-cell-button{min-width:0;margin:0}.ag-theme-quartz .ag-column-drop-cell-drag-handle,.ag-theme-quartz-dark .ag-column-drop-cell-drag-handle,.ag-theme-quartz-auto-dark .ag-column-drop-cell-drag-handle{margin-left:0}.ag-theme-quartz .ag-column-drop-vertical,.ag-theme-quartz-dark .ag-column-drop-vertical,.ag-theme-quartz-auto-dark .ag-column-drop-vertical{min-height:75px}.ag-theme-quartz .ag-column-drop-vertical-title-bar,.ag-theme-quartz-dark .ag-column-drop-vertical-title-bar,.ag-theme-quartz-auto-dark .ag-column-drop-vertical-title-bar{padding:var(--ag-widget-container-vertical-padding) calc(var(--ag-grid-size) * 2) 0}.ag-theme-quartz .ag-ltr .ag-column-drop-vertical-icon,.ag-theme-quartz-dark .ag-ltr .ag-column-drop-vertical-icon,.ag-theme-quartz-auto-dark .ag-ltr .ag-column-drop-vertical-icon{margin-left:0;margin-right:var(--ag-widget-horizontal-spacing)}.ag-theme-quartz .ag-rtl .ag-column-drop-vertical-icon,.ag-theme-quartz-dark .ag-rtl .ag-column-drop-vertical-icon,.ag-theme-quartz-auto-dark .ag-rtl .ag-column-drop-vertical-icon{margin-right:0;margin-left:var(--ag-widget-horizontal-spacing)}.ag-theme-quartz .ag-column-drop-vertical-empty-message,.ag-theme-quartz-dark .ag-column-drop-vertical-empty-message,.ag-theme-quartz-auto-dark .ag-column-drop-vertical-empty-message{display:flex;align-items:center;justify-content:center;border:dashed 1px;border-color:var(--ag-border-color);margin:calc(var(--ag-grid-size) * 1.5) calc(var(--ag-grid-size) * 2);padding:calc(var(--ag-grid-size) * 2)}.ag-theme-quartz .ag-column-drop-empty-message,.ag-theme-quartz-dark .ag-column-drop-empty-message,.ag-theme-quartz-auto-dark .ag-column-drop-empty-message{color:var(--ag-foreground-color)}.ag-theme-quartz .ag-pill-select .ag-column-drop,.ag-theme-quartz-dark .ag-pill-select .ag-column-drop,.ag-theme-quartz-auto-dark .ag-pill-select .ag-column-drop{min-height:unset}.ag-theme-quartz .ag-pill-select .ag-picker-field-display,.ag-theme-quartz-dark .ag-pill-select .ag-picker-field-display,.ag-theme-quartz-auto-dark .ag-pill-select .ag-picker-field-display{font-weight:500;color:var(--ag-chart-menu-pill-select-button-color)}.ag-theme-quartz .ag-pill-select .ag-picker-field-icon .ag-icon,.ag-theme-quartz-dark .ag-pill-select .ag-picker-field-icon .ag-icon,.ag-theme-quartz-auto-dark .ag-pill-select .ag-picker-field-icon .ag-icon{color:var(--ag-chart-menu-pill-select-button-color)}.ag-theme-quartz .ag-status-bar,.ag-theme-quartz-dark .ag-status-bar,.ag-theme-quartz-auto-dark .ag-status-bar{font-weight:400}.ag-theme-quartz .ag-status-name-value,.ag-theme-quartz-dark .ag-status-name-value,.ag-theme-quartz-auto-dark .ag-status-name-value{padding:var(--ag-widget-container-vertical-padding) 0}.ag-theme-quartz .ag-status-name-value-value,.ag-theme-quartz .ag-paging-number,.ag-theme-quartz .ag-paging-row-summary-panel-number,.ag-theme-quartz-dark .ag-status-name-value-value,.ag-theme-quartz-dark .ag-paging-number,.ag-theme-quartz-dark .ag-paging-row-summary-panel-number,.ag-theme-quartz-auto-dark .ag-status-name-value-value,.ag-theme-quartz-auto-dark .ag-paging-number,.ag-theme-quartz-auto-dark .ag-paging-row-summary-panel-number{font-weight:500}.ag-theme-quartz .ag-column-drop-cell-button,.ag-theme-quartz-dark .ag-column-drop-cell-button,.ag-theme-quartz-auto-dark .ag-column-drop-cell-button{opacity:.75}.ag-theme-quartz .ag-column-drop-cell-button:hover,.ag-theme-quartz-dark .ag-column-drop-cell-button:hover,.ag-theme-quartz-auto-dark .ag-column-drop-cell-button:hover{opacity:1}.ag-theme-quartz .ag-header-cell-menu-button,.ag-theme-quartz .ag-header-cell-filter-button,.ag-theme-quartz .ag-panel-title-bar-button,.ag-theme-quartz .ag-header-expand-icon,.ag-theme-quartz .ag-column-group-icons,.ag-theme-quartz .ag-set-filter-group-icons,.ag-theme-quartz .ag-group-expanded .ag-icon,.ag-theme-quartz .ag-group-contracted .ag-icon,.ag-theme-quartz .ag-chart-settings-prev,.ag-theme-quartz .ag-chart-settings-next,.ag-theme-quartz .ag-group-title-bar-icon,.ag-theme-quartz .ag-column-select-header-icon,.ag-theme-quartz .ag-floating-filter-button-button,.ag-theme-quartz .ag-filter-toolpanel-expand,.ag-theme-quartz .ag-panel-title-bar-button-icon,.ag-theme-quartz .ag-chart-menu-icon,.ag-theme-quartz-dark .ag-header-cell-menu-button,.ag-theme-quartz-dark .ag-header-cell-filter-button,.ag-theme-quartz-dark .ag-panel-title-bar-button,.ag-theme-quartz-dark .ag-header-expand-icon,.ag-theme-quartz-dark .ag-column-group-icons,.ag-theme-quartz-dark .ag-set-filter-group-icons,.ag-theme-quartz-dark .ag-group-expanded .ag-icon,.ag-theme-quartz-dark .ag-group-contracted .ag-icon,.ag-theme-quartz-dark .ag-chart-settings-prev,.ag-theme-quartz-dark .ag-chart-settings-next,.ag-theme-quartz-dark .ag-group-title-bar-icon,.ag-theme-quartz-dark .ag-column-select-header-icon,.ag-theme-quartz-dark .ag-floating-filter-button-button,.ag-theme-quartz-dark .ag-filter-toolpanel-expand,.ag-theme-quartz-dark .ag-panel-title-bar-button-icon,.ag-theme-quartz-dark .ag-chart-menu-icon,.ag-theme-quartz-auto-dark .ag-header-cell-menu-button,.ag-theme-quartz-auto-dark .ag-header-cell-filter-button,.ag-theme-quartz-auto-dark .ag-panel-title-bar-button,.ag-theme-quartz-auto-dark .ag-header-expand-icon,.ag-theme-quartz-auto-dark .ag-column-group-icons,.ag-theme-quartz-auto-dark .ag-set-filter-group-icons,.ag-theme-quartz-auto-dark .ag-group-expanded .ag-icon,.ag-theme-quartz-auto-dark .ag-group-contracted .ag-icon,.ag-theme-quartz-auto-dark .ag-chart-settings-prev,.ag-theme-quartz-auto-dark .ag-chart-settings-next,.ag-theme-quartz-auto-dark .ag-group-title-bar-icon,.ag-theme-quartz-auto-dark .ag-column-select-header-icon,.ag-theme-quartz-auto-dark .ag-floating-filter-button-button,.ag-theme-quartz-auto-dark .ag-filter-toolpanel-expand,.ag-theme-quartz-auto-dark .ag-panel-title-bar-button-icon,.ag-theme-quartz-auto-dark .ag-chart-menu-icon{--ag-quartz-icon-hover-color: color-mix(in srgb, transparent, var(--ag-foreground-color) 10%)}.ag-theme-quartz .ag-header-cell-menu-button:hover,.ag-theme-quartz .ag-header-cell-filter-button:hover,.ag-theme-quartz .ag-panel-title-bar-button:hover,.ag-theme-quartz .ag-header-expand-icon:hover,.ag-theme-quartz .ag-column-group-icons:hover,.ag-theme-quartz .ag-set-filter-group-icons:hover,.ag-theme-quartz .ag-group-expanded .ag-icon:hover,.ag-theme-quartz .ag-group-contracted .ag-icon:hover,.ag-theme-quartz .ag-chart-settings-prev:hover,.ag-theme-quartz .ag-chart-settings-next:hover,.ag-theme-quartz .ag-group-title-bar-icon:hover,.ag-theme-quartz .ag-column-select-header-icon:hover,.ag-theme-quartz .ag-floating-filter-button-button:hover,.ag-theme-quartz .ag-filter-toolpanel-expand:hover,.ag-theme-quartz .ag-panel-title-bar-button-icon:hover,.ag-theme-quartz .ag-chart-menu-icon:hover,.ag-theme-quartz-dark .ag-header-cell-menu-button:hover,.ag-theme-quartz-dark .ag-header-cell-filter-button:hover,.ag-theme-quartz-dark .ag-panel-title-bar-button:hover,.ag-theme-quartz-dark .ag-header-expand-icon:hover,.ag-theme-quartz-dark .ag-column-group-icons:hover,.ag-theme-quartz-dark .ag-set-filter-group-icons:hover,.ag-theme-quartz-dark .ag-group-expanded .ag-icon:hover,.ag-theme-quartz-dark .ag-group-contracted .ag-icon:hover,.ag-theme-quartz-dark .ag-chart-settings-prev:hover,.ag-theme-quartz-dark .ag-chart-settings-next:hover,.ag-theme-quartz-dark .ag-group-title-bar-icon:hover,.ag-theme-quartz-dark .ag-column-select-header-icon:hover,.ag-theme-quartz-dark .ag-floating-filter-button-button:hover,.ag-theme-quartz-dark .ag-filter-toolpanel-expand:hover,.ag-theme-quartz-dark .ag-panel-title-bar-button-icon:hover,.ag-theme-quartz-dark .ag-chart-menu-icon:hover,.ag-theme-quartz-auto-dark .ag-header-cell-menu-button:hover,.ag-theme-quartz-auto-dark .ag-header-cell-filter-button:hover,.ag-theme-quartz-auto-dark .ag-panel-title-bar-button:hover,.ag-theme-quartz-auto-dark .ag-header-expand-icon:hover,.ag-theme-quartz-auto-dark .ag-column-group-icons:hover,.ag-theme-quartz-auto-dark .ag-set-filter-group-icons:hover,.ag-theme-quartz-auto-dark .ag-group-expanded .ag-icon:hover,.ag-theme-quartz-auto-dark .ag-group-contracted .ag-icon:hover,.ag-theme-quartz-auto-dark .ag-chart-settings-prev:hover,.ag-theme-quartz-auto-dark .ag-chart-settings-next:hover,.ag-theme-quartz-auto-dark .ag-group-title-bar-icon:hover,.ag-theme-quartz-auto-dark .ag-column-select-header-icon:hover,.ag-theme-quartz-auto-dark .ag-floating-filter-button-button:hover,.ag-theme-quartz-auto-dark .ag-filter-toolpanel-expand:hover,.ag-theme-quartz-auto-dark .ag-panel-title-bar-button-icon:hover,.ag-theme-quartz-auto-dark .ag-chart-menu-icon:hover{border-radius:1px;background-color:var(--ag-quartz-icon-hover-color);box-shadow:0 0 0 4px var(--ag-quartz-icon-hover-color)}.ag-theme-quartz .ag-filter-active,.ag-theme-quartz .ag-filter-toolpanel-group-instance-header-icon,.ag-theme-quartz .ag-filter-toolpanel-instance-header-icon,.ag-theme-quartz-dark .ag-filter-active,.ag-theme-quartz-dark .ag-filter-toolpanel-group-instance-header-icon,.ag-theme-quartz-dark .ag-filter-toolpanel-instance-header-icon,.ag-theme-quartz-auto-dark .ag-filter-active,.ag-theme-quartz-auto-dark .ag-filter-toolpanel-group-instance-header-icon,.ag-theme-quartz-auto-dark .ag-filter-toolpanel-instance-header-icon{position:relative}.ag-theme-quartz .ag-filter-active:after,.ag-theme-quartz .ag-filter-toolpanel-group-instance-header-icon:after,.ag-theme-quartz .ag-filter-toolpanel-instance-header-icon:after,.ag-theme-quartz-dark .ag-filter-active:after,.ag-theme-quartz-dark .ag-filter-toolpanel-group-instance-header-icon:after,.ag-theme-quartz-dark .ag-filter-toolpanel-instance-header-icon:after,.ag-theme-quartz-auto-dark .ag-filter-active:after,.ag-theme-quartz-auto-dark .ag-filter-toolpanel-group-instance-header-icon:after,.ag-theme-quartz-auto-dark .ag-filter-toolpanel-instance-header-icon:after{content:"";position:absolute;width:6px;height:6px;top:-1px;right:-1px;border-radius:50%;background-color:var(--ag-active-color)}.ag-theme-quartz .ag-filter-active,.ag-theme-quartz-dark .ag-filter-active,.ag-theme-quartz-auto-dark .ag-filter-active{--ag-quartz-icon-active-color: color-mix(in srgb, transparent, var(--ag-active-color) 14%);--ag-quartz-icon-hover-color: color-mix(in srgb, transparent, var(--ag-active-color) 28%);border-radius:1px;background-color:var(--ag-quartz-icon-active-color);box-shadow:0 0 0 4px var(--ag-quartz-icon-active-color)}.ag-theme-quartz .ag-filter-active .ag-icon-filter,.ag-theme-quartz-dark .ag-filter-active .ag-icon-filter,.ag-theme-quartz-auto-dark .ag-filter-active .ag-icon-filter{clip-path:path("M8,0C8,4.415 11.585,8 16,8L16,16L0,16L0,0L8,0Z")}.ag-theme-quartz .ag-chart-menu,.ag-theme-quartz-dark .ag-chart-menu,.ag-theme-quartz-auto-dark .ag-chart-menu{--ag-icon-size: 20px;background-color:color-mix(in srgb,transparent,var(--ag-background-color) 30%);padding:4px 2px}.ag-theme-quartz .ag-chart-menu-icon,.ag-theme-quartz-dark .ag-chart-menu-icon,.ag-theme-quartz-auto-dark .ag-chart-menu-icon{opacity:.8}.ag-theme-quartz .ag-drag-handle,.ag-theme-quartz-dark .ag-drag-handle,.ag-theme-quartz-auto-dark .ag-drag-handle{color:var(--ag-icon-font-color)}.ag-theme-quartz .ag-menu-option-icon,.ag-theme-quartz .ag-compact-menu-option-icon,.ag-theme-quartz-dark .ag-menu-option-icon,.ag-theme-quartz-dark .ag-compact-menu-option-icon,.ag-theme-quartz-auto-dark .ag-menu-option-icon,.ag-theme-quartz-auto-dark .ag-compact-menu-option-icon{width:var(--ag-icon-size);cursor:pointer}.ag-theme-quartz .ag-ltr .ag-menu-option-icon,.ag-theme-quartz .ag-ltr .ag-compact-menu-option-icon,.ag-theme-quartz-dark .ag-ltr .ag-menu-option-icon,.ag-theme-quartz-dark .ag-ltr .ag-compact-menu-option-icon,.ag-theme-quartz-auto-dark .ag-ltr .ag-menu-option-icon,.ag-theme-quartz-auto-dark .ag-ltr .ag-compact-menu-option-icon{padding-left:calc(var(--ag-grid-size) * 1.5)}.ag-theme-quartz .ag-rtl .ag-menu-option-icon,.ag-theme-quartz .ag-rtl .ag-compact-menu-option-icon,.ag-theme-quartz-dark .ag-rtl .ag-menu-option-icon,.ag-theme-quartz-dark .ag-rtl .ag-compact-menu-option-icon,.ag-theme-quartz-auto-dark .ag-rtl .ag-menu-option-icon,.ag-theme-quartz-auto-dark .ag-rtl .ag-compact-menu-option-icon{padding-right:calc(var(--ag-grid-size) * 1.5)}.ag-theme-quartz .ag-chart-settings-card-item.ag-not-selected:hover,.ag-theme-quartz-dark .ag-chart-settings-card-item.ag-not-selected:hover,.ag-theme-quartz-auto-dark .ag-chart-settings-card-item.ag-not-selected:hover{opacity:.35}.ag-theme-quartz .ag-ltr .ag-panel-title-bar-button,.ag-theme-quartz-dark .ag-ltr .ag-panel-title-bar-button,.ag-theme-quartz-auto-dark .ag-ltr .ag-panel-title-bar-button{margin-left:calc(var(--ag-grid-size) * 2);margin-right:var(--ag-grid-size)}.ag-theme-quartz .ag-rtl .ag-panel-title-bar-button,.ag-theme-quartz-dark .ag-rtl .ag-panel-title-bar-button,.ag-theme-quartz-auto-dark .ag-rtl .ag-panel-title-bar-button{margin-right:calc(var(--ag-grid-size) * 2);margin-left:var(--ag-grid-size)}.ag-theme-quartz .ag-multi-filter-group-title-bar,.ag-theme-quartz-dark .ag-multi-filter-group-title-bar,.ag-theme-quartz-auto-dark .ag-multi-filter-group-title-bar{padding:calc(var(--ag-grid-size) * 1.5) var(--ag-grid-size)}.ag-theme-quartz .ag-ltr .ag-filter-toolpanel-instance-body,.ag-theme-quartz-dark .ag-ltr .ag-filter-toolpanel-instance-body,.ag-theme-quartz-auto-dark .ag-ltr .ag-filter-toolpanel-instance-body{padding-left:var(--ag-grid-size)}.ag-theme-quartz .ag-rtl .ag-filter-toolpanel-instance-body,.ag-theme-quartz-dark .ag-rtl .ag-filter-toolpanel-instance-body,.ag-theme-quartz-auto-dark .ag-rtl .ag-filter-toolpanel-instance-body{padding-right:var(--ag-grid-size)}.ag-theme-quartz .ag-filter-toolpanel-instance-filter,.ag-theme-quartz-dark .ag-filter-toolpanel-instance-filter,.ag-theme-quartz-auto-dark .ag-filter-toolpanel-instance-filter{border:none;background-color:var(--ag-control-panel-background-color)}.ag-theme-quartz .ag-ltr .ag-filter-toolpanel-instance-filter,.ag-theme-quartz-dark .ag-ltr .ag-filter-toolpanel-instance-filter,.ag-theme-quartz-auto-dark .ag-ltr .ag-filter-toolpanel-instance-filter{margin-left:calc(var(--ag-icon-size) * .5)}.ag-theme-quartz .ag-rtl .ag-filter-toolpanel-instance-filter,.ag-theme-quartz-dark .ag-rtl .ag-filter-toolpanel-instance-filter,.ag-theme-quartz-auto-dark .ag-rtl .ag-filter-toolpanel-instance-filter{margin-right:calc(var(--ag-icon-size) * .5)}.ag-theme-quartz .ag-filter-toolpanel-group-level-0,.ag-theme-quartz-dark .ag-filter-toolpanel-group-level-0,.ag-theme-quartz-auto-dark .ag-filter-toolpanel-group-level-0{border-top:none}.ag-theme-quartz .ag-filter-toolpanel-header,.ag-theme-quartz-dark .ag-filter-toolpanel-header,.ag-theme-quartz-auto-dark .ag-filter-toolpanel-header{height:initial;padding-top:var(--ag-grid-size);padding-bottom:var(--ag-grid-size)}.ag-theme-quartz .ag-filter-toolpanel-group-item,.ag-theme-quartz-dark .ag-filter-toolpanel-group-item,.ag-theme-quartz-auto-dark .ag-filter-toolpanel-group-item{margin:0}.ag-theme-quartz .ag-layout-auto-height .ag-center-cols-viewport,.ag-theme-quartz .ag-layout-auto-height .ag-center-cols-container,.ag-theme-quartz .ag-layout-print .ag-center-cols-viewport,.ag-theme-quartz .ag-layout-print .ag-center-cols-container,.ag-theme-quartz-dark .ag-layout-auto-height .ag-center-cols-viewport,.ag-theme-quartz-dark .ag-layout-auto-height .ag-center-cols-container,.ag-theme-quartz-dark .ag-layout-print .ag-center-cols-viewport,.ag-theme-quartz-dark .ag-layout-print .ag-center-cols-container,.ag-theme-quartz-auto-dark .ag-layout-auto-height .ag-center-cols-viewport,.ag-theme-quartz-auto-dark .ag-layout-auto-height .ag-center-cols-container,.ag-theme-quartz-auto-dark .ag-layout-print .ag-center-cols-viewport,.ag-theme-quartz-auto-dark .ag-layout-print .ag-center-cols-container{min-height:150px}.ag-theme-quartz .ag-date-time-list-page-entry-is-current,.ag-theme-quartz-dark .ag-date-time-list-page-entry-is-current,.ag-theme-quartz-auto-dark .ag-date-time-list-page-entry-is-current{background-color:var(--ag-active-color)}.ag-theme-quartz .ag-advanced-filter-builder-button,.ag-theme-quartz-dark .ag-advanced-filter-builder-button,.ag-theme-quartz-auto-dark .ag-advanced-filter-builder-button{padding:var(--ag-grid-size);font-weight:600}.ag-theme-quartz .ag-advanced-filter-builder-item-button-disabled .ag-icon,.ag-theme-quartz .ag-disabled .ag-icon,.ag-theme-quartz .ag-column-select-column-group-readonly .ag-icon,.ag-theme-quartz [disabled] .ag-icon,.ag-theme-quartz-dark .ag-advanced-filter-builder-item-button-disabled .ag-icon,.ag-theme-quartz-dark .ag-disabled .ag-icon,.ag-theme-quartz-dark .ag-column-select-column-group-readonly .ag-icon,.ag-theme-quartz-dark [disabled] .ag-icon,.ag-theme-quartz-auto-dark .ag-advanced-filter-builder-item-button-disabled .ag-icon,.ag-theme-quartz-auto-dark .ag-disabled .ag-icon,.ag-theme-quartz-auto-dark .ag-column-select-column-group-readonly .ag-icon,.ag-theme-quartz-auto-dark [disabled] .ag-icon{opacity:.6}.ag-theme-quartz .ag-icon-grip,.ag-theme-quartz-dark .ag-icon-grip,.ag-theme-quartz-auto-dark .ag-icon-grip{opacity:.7}.ag-theme-quartz .ag-column-select-column-readonly.ag-icon-grip,.ag-theme-quartz .ag-column-select-column-readonly .ag-icon-grip,.ag-theme-quartz-dark .ag-column-select-column-readonly.ag-icon-grip,.ag-theme-quartz-dark .ag-column-select-column-readonly .ag-icon-grip,.ag-theme-quartz-auto-dark .ag-column-select-column-readonly.ag-icon-grip,.ag-theme-quartz-auto-dark .ag-column-select-column-readonly .ag-icon-grip{opacity:.35}.ag-theme-quartz .ag-column-select-header-filter-wrapper .ag-input-wrapper:before,.ag-theme-quartz .ag-filter-toolpanel-search .ag-input-wrapper:before,.ag-theme-quartz .ag-mini-filter .ag-input-wrapper:before,.ag-theme-quartz .ag-filter-filter .ag-input-wrapper:before,.ag-theme-quartz .ag-filter-add-select .ag-input-wrapper:before,.ag-theme-quartz-dark .ag-column-select-header-filter-wrapper .ag-input-wrapper:before,.ag-theme-quartz-dark .ag-filter-toolpanel-search .ag-input-wrapper:before,.ag-theme-quartz-dark .ag-mini-filter .ag-input-wrapper:before,.ag-theme-quartz-dark .ag-filter-filter .ag-input-wrapper:before,.ag-theme-quartz-dark .ag-filter-add-select .ag-input-wrapper:before,.ag-theme-quartz-auto-dark .ag-column-select-header-filter-wrapper .ag-input-wrapper:before,.ag-theme-quartz-auto-dark .ag-filter-toolpanel-search .ag-input-wrapper:before,.ag-theme-quartz-auto-dark .ag-mini-filter .ag-input-wrapper:before,.ag-theme-quartz-auto-dark .ag-filter-filter .ag-input-wrapper:before,.ag-theme-quartz-auto-dark .ag-filter-add-select .ag-input-wrapper:before{position:absolute;display:block;width:12px;height:12px;background-image:url(data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==);background-position:50% 50%;background-size:contain;opacity:40%;content:"";filter:var(--ag-icon-filter)}.ag-theme-quartz .ag-ltr .ag-column-select-header-filter-wrapper .ag-input-wrapper:before,.ag-theme-quartz .ag-ltr .ag-filter-toolpanel-search .ag-input-wrapper:before,.ag-theme-quartz .ag-ltr .ag-mini-filter .ag-input-wrapper:before,.ag-theme-quartz .ag-ltr .ag-filter-filter .ag-input-wrapper:before,.ag-theme-quartz .ag-ltr .ag-filter-add-select .ag-input-wrapper:before,.ag-theme-quartz-dark .ag-ltr .ag-column-select-header-filter-wrapper .ag-input-wrapper:before,.ag-theme-quartz-dark .ag-ltr .ag-filter-toolpanel-search .ag-input-wrapper:before,.ag-theme-quartz-dark .ag-ltr .ag-mini-filter .ag-input-wrapper:before,.ag-theme-quartz-dark .ag-ltr .ag-filter-filter .ag-input-wrapper:before,.ag-theme-quartz-dark .ag-ltr .ag-filter-add-select .ag-input-wrapper:before,.ag-theme-quartz-auto-dark .ag-ltr .ag-column-select-header-filter-wrapper .ag-input-wrapper:before,.ag-theme-quartz-auto-dark .ag-ltr .ag-filter-toolpanel-search .ag-input-wrapper:before,.ag-theme-quartz-auto-dark .ag-ltr .ag-mini-filter .ag-input-wrapper:before,.ag-theme-quartz-auto-dark .ag-ltr .ag-filter-filter .ag-input-wrapper:before,.ag-theme-quartz-auto-dark .ag-ltr .ag-filter-add-select .ag-input-wrapper:before{margin-left:var(--ag-grid-size)}.ag-theme-quartz .ag-rtl .ag-column-select-header-filter-wrapper .ag-input-wrapper:before,.ag-theme-quartz .ag-rtl .ag-filter-toolpanel-search .ag-input-wrapper:before,.ag-theme-quartz .ag-rtl .ag-mini-filter .ag-input-wrapper:before,.ag-theme-quartz .ag-rtl .ag-filter-filter .ag-input-wrapper:before,.ag-theme-quartz .ag-rtl .ag-filter-add-select .ag-input-wrapper:before,.ag-theme-quartz-dark .ag-rtl .ag-column-select-header-filter-wrapper .ag-input-wrapper:before,.ag-theme-quartz-dark .ag-rtl .ag-filter-toolpanel-search .ag-input-wrapper:before,.ag-theme-quartz-dark .ag-rtl .ag-mini-filter .ag-input-wrapper:before,.ag-theme-quartz-dark .ag-rtl .ag-filter-filter .ag-input-wrapper:before,.ag-theme-quartz-dark .ag-rtl .ag-filter-add-select .ag-input-wrapper:before,.ag-theme-quartz-auto-dark .ag-rtl .ag-column-select-header-filter-wrapper .ag-input-wrapper:before,.ag-theme-quartz-auto-dark .ag-rtl .ag-filter-toolpanel-search .ag-input-wrapper:before,.ag-theme-quartz-auto-dark .ag-rtl .ag-mini-filter .ag-input-wrapper:before,.ag-theme-quartz-auto-dark .ag-rtl .ag-filter-filter .ag-input-wrapper:before,.ag-theme-quartz-auto-dark .ag-rtl .ag-filter-add-select .ag-input-wrapper:before{margin-right:var(--ag-grid-size)}.ag-theme-quartz .ag-ltr .ag-column-select-header-filter-wrapper input.ag-text-field-input,.ag-theme-quartz .ag-ltr .ag-column-select-header-filter-wrapper input.ag-number-field-input,.ag-theme-quartz .ag-ltr .ag-filter-toolpanel-search input.ag-text-field-input,.ag-theme-quartz .ag-ltr .ag-filter-toolpanel-search input.ag-number-field-input,.ag-theme-quartz .ag-ltr .ag-mini-filter input.ag-text-field-input,.ag-theme-quartz .ag-ltr .ag-mini-filter input.ag-number-field-input,.ag-theme-quartz .ag-ltr .ag-filter-filter input.ag-text-field-input,.ag-theme-quartz .ag-ltr .ag-filter-filter input.ag-number-field-input,.ag-theme-quartz .ag-ltr .ag-filter-add-select input.ag-text-field-input,.ag-theme-quartz .ag-ltr .ag-filter-add-select input.ag-number-field-input,.ag-theme-quartz-dark .ag-ltr .ag-column-select-header-filter-wrapper input.ag-text-field-input,.ag-theme-quartz-dark .ag-ltr .ag-column-select-header-filter-wrapper input.ag-number-field-input,.ag-theme-quartz-dark .ag-ltr .ag-filter-toolpanel-search input.ag-text-field-input,.ag-theme-quartz-dark .ag-ltr .ag-filter-toolpanel-search input.ag-number-field-input,.ag-theme-quartz-dark .ag-ltr .ag-mini-filter input.ag-text-field-input,.ag-theme-quartz-dark .ag-ltr .ag-mini-filter input.ag-number-field-input,.ag-theme-quartz-dark .ag-ltr .ag-filter-filter input.ag-text-field-input,.ag-theme-quartz-dark .ag-ltr .ag-filter-filter input.ag-number-field-input,.ag-theme-quartz-dark .ag-ltr .ag-filter-add-select input.ag-text-field-input,.ag-theme-quartz-dark .ag-ltr .ag-filter-add-select input.ag-number-field-input,.ag-theme-quartz-auto-dark .ag-ltr .ag-column-select-header-filter-wrapper input.ag-text-field-input,.ag-theme-quartz-auto-dark .ag-ltr .ag-column-select-header-filter-wrapper input.ag-number-field-input,.ag-theme-quartz-auto-dark .ag-ltr .ag-filter-toolpanel-search input.ag-text-field-input,.ag-theme-quartz-auto-dark .ag-ltr .ag-filter-toolpanel-search input.ag-number-field-input,.ag-theme-quartz-auto-dark .ag-ltr .ag-mini-filter input.ag-text-field-input,.ag-theme-quartz-auto-dark .ag-ltr .ag-mini-filter input.ag-number-field-input,.ag-theme-quartz-auto-dark .ag-ltr .ag-filter-filter input.ag-text-field-input,.ag-theme-quartz-auto-dark .ag-ltr .ag-filter-filter input.ag-number-field-input,.ag-theme-quartz-auto-dark .ag-ltr .ag-filter-add-select input.ag-text-field-input,.ag-theme-quartz-auto-dark .ag-ltr .ag-filter-add-select input.ag-number-field-input{padding-left:26px}.ag-theme-quartz .ag-rtl .ag-column-select-header-filter-wrapper input.ag-text-field-input,.ag-theme-quartz .ag-rtl .ag-column-select-header-filter-wrapper input.ag-number-field-input,.ag-theme-quartz .ag-rtl .ag-filter-toolpanel-search input.ag-text-field-input,.ag-theme-quartz .ag-rtl .ag-filter-toolpanel-search input.ag-number-field-input,.ag-theme-quartz .ag-rtl .ag-mini-filter input.ag-text-field-input,.ag-theme-quartz .ag-rtl .ag-mini-filter input.ag-number-field-input,.ag-theme-quartz .ag-rtl .ag-filter-filter input.ag-text-field-input,.ag-theme-quartz .ag-rtl .ag-filter-filter input.ag-number-field-input,.ag-theme-quartz .ag-rtl .ag-filter-add-select input.ag-text-field-input,.ag-theme-quartz .ag-rtl .ag-filter-add-select input.ag-number-field-input,.ag-theme-quartz-dark .ag-rtl .ag-column-select-header-filter-wrapper input.ag-text-field-input,.ag-theme-quartz-dark .ag-rtl .ag-column-select-header-filter-wrapper input.ag-number-field-input,.ag-theme-quartz-dark .ag-rtl .ag-filter-toolpanel-search input.ag-text-field-input,.ag-theme-quartz-dark .ag-rtl .ag-filter-toolpanel-search input.ag-number-field-input,.ag-theme-quartz-dark .ag-rtl .ag-mini-filter input.ag-text-field-input,.ag-theme-quartz-dark .ag-rtl .ag-mini-filter input.ag-number-field-input,.ag-theme-quartz-dark .ag-rtl .ag-filter-filter input.ag-text-field-input,.ag-theme-quartz-dark .ag-rtl .ag-filter-filter input.ag-number-field-input,.ag-theme-quartz-dark .ag-rtl .ag-filter-add-select input.ag-text-field-input,.ag-theme-quartz-dark .ag-rtl .ag-filter-add-select input.ag-number-field-input,.ag-theme-quartz-auto-dark .ag-rtl .ag-column-select-header-filter-wrapper input.ag-text-field-input,.ag-theme-quartz-auto-dark .ag-rtl .ag-column-select-header-filter-wrapper input.ag-number-field-input,.ag-theme-quartz-auto-dark .ag-rtl .ag-filter-toolpanel-search input.ag-text-field-input,.ag-theme-quartz-auto-dark .ag-rtl .ag-filter-toolpanel-search input.ag-number-field-input,.ag-theme-quartz-auto-dark .ag-rtl .ag-mini-filter input.ag-text-field-input,.ag-theme-quartz-auto-dark .ag-rtl .ag-mini-filter input.ag-number-field-input,.ag-theme-quartz-auto-dark .ag-rtl .ag-filter-filter input.ag-text-field-input,.ag-theme-quartz-auto-dark .ag-rtl .ag-filter-filter input.ag-number-field-input,.ag-theme-quartz-auto-dark .ag-rtl .ag-filter-add-select input.ag-text-field-input,.ag-theme-quartz-auto-dark .ag-rtl .ag-filter-add-select input.ag-number-field-input{padding-right:26px}.ag-theme-quartz .ag-ltr .ag-column-select-add-group-indent,.ag-theme-quartz-dark .ag-ltr .ag-column-select-add-group-indent,.ag-theme-quartz-auto-dark .ag-ltr .ag-column-select-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-grid-size) * 1.5)}.ag-theme-quartz .ag-rtl .ag-column-select-add-group-indent,.ag-theme-quartz-dark .ag-rtl .ag-column-select-add-group-indent,.ag-theme-quartz-auto-dark .ag-rtl .ag-column-select-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-grid-size) * 1.5)}.ag-theme-quartz .ag-text-field-input[disabled],.ag-theme-quartz .ag-menu-option-disabled,.ag-theme-quartz-dark .ag-text-field-input[disabled],.ag-theme-quartz-dark .ag-menu-option-disabled,.ag-theme-quartz-auto-dark .ag-text-field-input[disabled],.ag-theme-quartz-auto-dark .ag-menu-option-disabled{cursor:not-allowed}.ag-theme-quartz .ag-checkbox-input-wrapper.ag-checked.ag-disabled,.ag-theme-quartz-dark .ag-checkbox-input-wrapper.ag-checked.ag-disabled,.ag-theme-quartz-auto-dark .ag-checkbox-input-wrapper.ag-checked.ag-disabled{--ag-checkbox-checked-color: var(--ag-checkbox-unchecked-color)}.ag-theme-quartz .ag-checkbox-input,.ag-theme-quartz .ag-toggle-button-input,.ag-theme-quartz .ag-radio-button-input,.ag-theme-quartz input[class^=ag-][type=range],.ag-theme-quartz-dark .ag-checkbox-input,.ag-theme-quartz-dark .ag-toggle-button-input,.ag-theme-quartz-dark .ag-radio-button-input,.ag-theme-quartz-dark input[class^=ag-][type=range],.ag-theme-quartz-auto-dark .ag-checkbox-input,.ag-theme-quartz-auto-dark .ag-toggle-button-input,.ag-theme-quartz-auto-dark .ag-radio-button-input,.ag-theme-quartz-auto-dark input[class^=ag-][type=range]{cursor:pointer}.ag-theme-quartz .ag-details-row,.ag-theme-quartz-dark .ag-details-row,.ag-theme-quartz-auto-dark .ag-details-row{padding:calc(var(--ag-grid-size) * 3.75)}.ag-theme-quartz .ag-list-item-hovered:after,.ag-theme-quartz-dark .ag-list-item-hovered:after,.ag-theme-quartz-auto-dark .ag-list-item-hovered:after{background-color:var(--ag-active-color)}.ag-theme-quartz .ag-pill .ag-pill-button:hover,.ag-theme-quartz-dark .ag-pill .ag-pill-button:hover,.ag-theme-quartz-auto-dark .ag-pill .ag-pill-button:hover{color:var(--ag-active-color)}.ag-theme-quartz-dark .ag-column-select-header-filter-wrapper .ag-input-wrapper:before,.ag-theme-quartz-dark .ag-filter-toolpanel-search .ag-input-wrapper:before,.ag-theme-quartz-dark .ag-mini-filter .ag-input-wrapper:before,.ag-theme-quartz-dark .ag-filter-filter .ag-input-wrapper:before{opacity:66%;filter:invert(100%)}.ag-theme-quartz-dark .ag-chart-menu{background-color:color-mix(in srgb,rgba(24,39,50,.3),var(--ag-background-color) 30%)}.ag-theme-quartz-dark .ag-text-field-input::placeholder{color:var(--ag-data-color);opacity:.8} diff --git a/src/main/resources/static/resources/kr/iotdoor/cmty/portfolio/portfolio-public.js b/src/main/resources/static/resources/kr/iotdoor/cmty/portfolio/portfolio-public.js new file mode 100644 index 0000000..b9b16c7 --- /dev/null +++ b/src/main/resources/static/resources/kr/iotdoor/cmty/portfolio/portfolio-public.js @@ -0,0 +1,64 @@ +var IotdoorPortfolio=(()=>{var Nr=Object.defineProperty;var lu=Object.getOwnPropertyDescriptor;var cu=Object.getOwnPropertyNames;var du=Object.prototype.hasOwnProperty;var gu=(e,t)=>{for(var o in t)Nr(e,o,{get:t[o],enumerable:!0})},uu=(e,t,o,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of cu(t))!du.call(e,r)&&r!==o&&Nr(e,r,{get:()=>t[r],enumerable:!(i=lu(t,r))||i.enumerable});return e};var hu=e=>uu(Nr({},"__esModule",{value:!0}),e);var JE={};gu(JE,{initPortfolioListPanel:()=>su});function U(e){if(e!=null&&e.length)return e[e.length-1]}function It(e,t,o){if(e===t)return!0;if(!e||!t)return e==null&&t==null;let i=e.length;if(i!==t.length)return!1;for(let r=0;r=0&&e.splice(o,1)}function pu(e,t){let o=0,i=0;for(;o=0;i--)e.splice(o,0,t[i])}var st=e=>e==null||e===""?null:e;function M(e){return e!=null&&e!==""}function Q(e){return!M(e)}var Sa=e=>e!=null&&typeof e.toString=="function"?e.toString():null,oi=(e,t)=>{let o=e?JSON.stringify(e):null,i=t?JSON.stringify(t):null;return o===i},fu=(e,t,o=!1)=>e==null?t==null?0:-1:t==null?1:(typeof e=="object"&&e.toNumber&&(e=e.toNumber()),typeof t=="object"&&t.toNumber&&(t=t.toNumber()),!o||typeof e!="string"?e>t?1:e{let c=i?()=>i.wrapIncoming(l):l;t?this.dispatchAsync(c):c()},a=this.getListeners(o,t,!1);if(((s=a==null?void 0:a.size)!=null?s:0)>0){let l=new Set(a);for(let c of l)a!=null&&a.has(c)&&r(()=>c(e))}let n=this.getGlobalListeners(t);if(n.size>0){let l=new Set(n);for(let c of l)r(()=>c(o,e))}}getGlobalListeners(e){return e?this.globalAsyncListeners:this.globalSyncListeners}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){let t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)},o=this.frameworkOverrides;o?o.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;let e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[];for(let t of e)t()}},mu=/[&<>"']/g,vu={"&":"&","<":"<",">":">",'"':""","'":"'"};function zo(e){var t;return(t=e==null?void 0:e.toString().toString())!=null?t:null}function Ko(e){var t,o;return(o=(t=zo(e))==null?void 0:t.replace(mu,i=>vu[i]))!=null?o:null}function ws(e){return typeof e=="string"&&e.startsWith("=")&&e.length>1}function Cu(e){if(!e||e==null)return null;let t=/([a-z])([A-Z])/g,o=/([A-Z]+)([A-Z])([a-z])/g;return e.replace(t,"$1 $2").replace(o,"$1 $2$3").replace(/\./g," ").split(" ").map(r=>r.substring(0,1).toUpperCase()+(r.length>1?r.substring(1,r.length):"")).join(" ")}function Ue(e){return e.eRootDiv.getRootNode()}function Y(e){return Ue(e).activeElement}function te(e){let{gos:t,eRootDiv:o}=e,i=null,r=t.get("getDocument");return r&&M(r)?i=r():o&&(i=o.ownerDocument),i&&M(i)?i:document}function ln(e){let t=Y(e);return t===null||t===te(e).body}function cn(e){return te(e).defaultView||window}function dn(e){let t=null,o=null;try{t=te(e).fullscreenElement}catch{}finally{t||(t=Ue(e));let i=t.querySelector("body");i?o=i:t instanceof ShadowRoot?o=t:t instanceof Document?o=t==null?void 0:t.documentElement:o=t}return o}function wu(e){var o;let t=dn(e);return(o=t==null?void 0:t.clientWidth)!=null?o:window.innerWidth||-1}function bu(e){var o;let t=dn(e);return(o=t==null?void 0:t.clientHeight)!=null?o:window.innerHeight||-1}function Ge(e,t,o){o==null||typeof o=="string"&&o==""?tc(e,t):Te(e,t,o)}function Te(e,t,o){e.setAttribute(oc(t),o.toString())}function tc(e,t){e.removeAttribute(oc(t))}function oc(e){return`aria-${e}`}function Rt(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function yu(e){let t=e==null?void 0:e.direction;return t==="asc"?"ascending":t==="desc"?"descending":t==="mixed"?"other":"none"}function Su(e){return e.getAttribute("aria-label")}function Fo(e,t){Ge(e,"label",t)}function ii(e,t){Ge(e,"labelledby",t)}function ic(e,t){Ge(e,"live",t)}function xu(e,t){Ge(e,"atomic",t)}function ku(e,t){Ge(e,"relevant",t)}function gn(e,t){Ge(e,"invalid",t)}function Ru(e,t){Ge(e,"disabled",t)}function rc(e,t){Ge(e,"hidden",t)}function xa(e,t){Te(e,"expanded",t)}function Eu(e,t){Te(e,"setsize",t)}function Fu(e,t){Te(e,"posinset",t)}function Du(e,t){Te(e,"multiselectable",t)}function Mu(e,t){Te(e,"rowcount",t)}function ri(e,t){Te(e,"rowindex",t)}function Pu(e,t){Te(e,"rowspan",t)}function Iu(e,t){Te(e,"colcount",t)}function ac(e,t){Te(e,"colindex",t)}function Tu(e,t){Te(e,"colspan",t)}function Au(e,t){Te(e,"sort",t)}function zu(e){tc(e,"sort")}function nc(e,t){Ge(e,"selected",t)}function Lu(e,t){Ge(e,"controls",t)}function Ou(e,t){Lu(e,t.id),ii(t,e.id)}function bs(e,t){Ge(e,"owns",t)}function yr(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var Hu="[tabindex], input, select, button, textarea, [href]",sc="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function $o(e){return!e||!e.matches("input, select, button, textarea")||!e.matches(sc)?!1:Ie(e)}function q(e,t,o={}){let{skipAriaHidden:i}=o;e.classList.toggle("ag-hidden",!t),i||rc(e,!t)}function Bu(e,t,o={}){let{skipAriaHidden:i}=o;e.classList.toggle("ag-invisible",!t),i||rc(e,!t)}function ai(e,t){var a;let o="disabled",i=t?n=>n.setAttribute(o,""):n=>n.removeAttribute(o);i(e);let r=(a=e.querySelectorAll("input"))!=null?a:[];for(let n of r)i(n)}function qt(e,t,o){let i=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof o=="number"){if(++i>o)break}else if(e===o)break}return!1}function ro(e){let{height:t,width:o,borderTopWidth:i,borderRightWidth:r,borderBottomWidth:a,borderLeftWidth:n,paddingTop:s,paddingRight:l,paddingBottom:c,paddingLeft:d,marginTop:g,marginRight:u,marginBottom:h,marginLeft:p,boxSizing:f}=window.getComputedStyle(e),m=Number.parseFloat;return{height:m(t||"0"),width:m(o||"0"),borderTopWidth:m(i||"0"),borderRightWidth:m(r||"0"),borderBottomWidth:m(a||"0"),borderLeftWidth:m(n||"0"),paddingTop:m(s||"0"),paddingRight:m(l||"0"),paddingBottom:m(c||"0"),paddingLeft:m(d||"0"),marginTop:m(g||"0"),marginRight:m(u||"0"),marginBottom:m(h||"0"),marginLeft:m(p||"0"),boxSizing:f}}function un(e){let t=ro(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function ni(e){let t=ro(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function lc(e){let{height:t,marginBottom:o,marginTop:i}=ro(e);return Math.floor(t+o+i)}function $i(e){let{width:t,marginLeft:o,marginRight:i}=ro(e);return Math.floor(t+o+i)}function cc(e){let t=e.getBoundingClientRect(),{borderTopWidth:o,borderLeftWidth:i,borderRightWidth:r,borderBottomWidth:a}=ro(e);return{top:t.top+(o||0),left:t.left+(i||0),right:t.right+(r||0),bottom:t.bottom+(a||0)}}function Yi(e,t){let o=e.scrollLeft;return t&&(o=Math.abs(o)),o}function Qi(e,t,o){o&&(t*=-1),e.scrollLeft=t}function ne(e){for(;e!=null&&e.firstChild;)e.firstChild.remove()}function De(e){e!=null&&e.parentNode&&e.remove()}function dc(e){return!!e.offsetParent}function Ie(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!dc(e)||window.getComputedStyle(e).visibility!=="visible")}function hn(e){let t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function gc(e,t,o){o&&o.nextSibling===t||(e.firstChild?o?o.nextSibling?e.insertBefore(t,o.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.prepend(t):e.appendChild(t))}function uc(e,t){for(let o=0;o`-${t.toLocaleLowerCase()}`)}function fi(e,t){if(t)for(let o of Object.keys(t)){let i=t[o];if(!(o!=null&&o.length)||i==null)continue;let r=Vu(o),a=i.toString(),n=a.replace(/\s*!important/g,""),s=n.length!=a.length?"important":void 0;e.style.setProperty(r,n,s)}}function si(e){return()=>{let t=e();return t?hc(t)||Nu(t):!0}}function hc(e){return e.clientWidtha==null?void 0:a.disconnect()}function ht(e,t){let o=cn(e);o.requestAnimationFrame?o.requestAnimationFrame(t):o.webkitRequestAnimationFrame?o.webkitRequestAnimationFrame(t):o.setTimeout(t,0)}var pc="data-ref",Vo;function ys(){return Vo!=null||(Vo=document.createTextNode(" ")),Vo.cloneNode()}function Qt(e){let{attrs:t,children:o,cls:i,ref:r,role:a,tag:n}=e,s=document.createElement(n);if(i&&(s.className=i),r&&s.setAttribute(pc,r),a&&s.setAttribute("role",a),t)for(let l of Object.keys(t))s.setAttribute(l,t[l]);if(o)if(typeof o=="string")s.textContent=o;else{let l=!0;for(let c of o)c&&(typeof c=="string"?(s.appendChild(document.createTextNode(c)),l=!1):typeof c=="function"?s.appendChild(c()):(l&&(s.appendChild(ys()),l=!1),s.append(Qt(c)),s.appendChild(ys())))}return s}var Wu=["touchstart","touchend","touchmove","touchcancel","scroll"],qu=["wheel"],Gr={},Ji=(()=>{let e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return o=>{if(typeof Gr[o]=="boolean")return Gr[o];let i=document.createElement(e[o]||"div");return o="on"+o,Gr[o]=o in i}})();function _u(e,t){return!t||!e?!1:ju(t).indexOf(e)>=0}function Uu(e){let t=[],o=e.target;for(;o;)t.push(o),o=o.parentElement;return t}function ju(e){let t=e;return t.path?t.path:t.composedPath?t.composedPath():Uu(t)}function Ku(e,t,o){let i=$u(t),r;i!=null&&(r={passive:i}),e.addEventListener(t,o,r)}var $u=e=>{let t=Wu.includes(e),o=qu.includes(e);if(t)return!0;if(o)return!1};function fc(e,t,o){if(o===0)return!1;let i=Math.abs(e.clientX-t.clientX),r=Math.abs(e.clientY-t.clientY);return Math.max(i,r)<=o}var mo=(e,t)=>{let o=e.identifier;for(let i=0,r=t.length;i0&&u+e.clientWidth>a+m&&(u=a+m-e.clientWidth),u<0&&(u=0),n>0&&g+e.clientHeight>n+f&&(g=n+f-e.clientHeight),g<0&&(g=0),e.style.left=`${u}px`,e.style.top=`${g}px`}var Oi=(e,...t)=>{for(let o of t){let[i,r,a,n]=o;i.addEventListener(r,a,n),e.push(o)}},mn=e=>{if(e){for(let[t,o,i,r]of e)t.removeEventListener(o,i,r);e.length=0}},yt=e=>{e.cancelable&&e.preventDefault()};function Qu(e,t){return t}function mc(e){var t;return(t=e==null?void 0:e.getLocaleTextFunc())!=null?t:Qu}function Zu(e,t,o,i){let r=t[o];return e.getLocaleTextFunc()(o,typeof r=="function"?r(i):r,i)}function Ju(e){return(t,o,i)=>e({key:t,defaultValue:o,variableValues:i})}function Xu(e){return(t,o,i)=>{let r=e==null?void 0:e[t];if(r&&(i!=null&&i.length)){let a=0;for(;!(a>=i.length||r.indexOf("${variable}")===-1);)r=r.replace("${variable}",i[a++])}return r!=null?r:o}}var ve=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(){let{destroyFunctions:e}=this;for(let t=0;tnull;let i;if(eh(e))e.__addEventListener(t,o),i=()=>(e.__removeEventListener(t,o),null);else{let r=th(e);e instanceof HTMLElement?Ku(e,t,o):r?e.addListener(t,o):e.addEventListener(t,o),i=r?()=>(e.removeListener(t,o),null):()=>(e.removeEventListener(t,o),null)}return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(r=>r!==i),null)}setupPropertyListener(e,t){let{gos:o}=this;o.addPropertyEventListener(e,t);let i=()=>(o.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(r=>r!==i),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupPropertyListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;let o=e.join("-")+this.propertyListenerId++,i=r=>{if(r.changeSet){if(r.changeSet&&r.changeSet.id===this.lastChangeSetIdLookup[o])return;this.lastChangeSetIdLookup[o]=r.changeSet.id}let a={type:"propertyChanged",changeSet:r.changeSet,source:r.source};t(a)};for(let r of e)this.setupPropertyListener(r,i)}getLocaleTextFunc(){return mc(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){let 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)}};function eh(e){return e.__addEventListener!==void 0}function th(e){return e.eventServiceType==="global"}var S=class extends ve{},ka=new Set,Sr=(e,t)=>{ka.has(t)||(ka.add(t),e())};Sr._set=ka;var oh={pending:!1,funcs:[]},ih={pending:!1,funcs:[]};function Ra(e,t="setTimeout",o){let i=t==="raf"?ih:oh;if(i.funcs.push(e),i.pending)return;i.pending=!0;let r=()=>{let a=i.funcs.slice();i.funcs.length=0,i.pending=!1;for(let n of a)n()};t==="raf"?ht(o,r):window.setTimeout(r,0)}function re(e,t,o){let i;return function(...r){let a=this;return window.clearTimeout(i),i=window.setTimeout(function(){e.isAlive()&&t.apply(a,r)},o),i}}function Ss(e,t){let o=0;return function(...i){let r=this,a=Date.now();a-o{a!=null&&(window.clearInterval(a),a=null)};e.addDestroyFunc(s);let l=()=>{let c=Date.now()-r>i;(t()||c)&&(o(),n=!0,s())};l(),n||(a=window.setInterval(l,10))}var vc=new Set(["__proto__","constructor","prototype"]);function ah(e,t){if(e!=null){if(Array.isArray(e)){for(let o=0;o!vc.has(i)))t(o,e[o])}}function he(e,t,o=!0,i=!1){M(t)&&ah(t,(r,a)=>{let n=e[r];n!==a&&(i&&n==null&&a!=null&&typeof a=="object"&&a.constructor===Object&&(n={},e[r]=n),xs(a)&&xs(n)&&!Array.isArray(n)?he(n,a,o,i):(o||a!==void 0)&&(e[r]=a))})}function xs(e){return typeof e=="object"&&e!==null}var vn=class rt{static applyGlobalGridOptions(t){if(!rt.gridOptions)return{...t};let o={};return he(o,rt.gridOptions,!0,!0),rt.mergeStrategy==="deep"?he(o,t,!0,!0):o={...o,...t},rt.gridOptions.context&&(o.context=rt.gridOptions.context),t.context&&(rt.mergeStrategy==="deep"&&o.context&&he(t.context,o.context,!0,!0),o.context=t.context),o}static applyGlobalGridOption(t,o){if(rt.mergeStrategy==="deep"){let i=nh(t);if(i&&typeof i=="object"&&typeof o=="object")return rt.applyGlobalGridOptions({[t]:o})[t]}return o}};vn.gridOptions=void 0;vn.mergeStrategy="shallow";var Cn=vn;function nh(e){var t;return(t=Cn.gridOptions)==null?void 0:t[e]}var sh={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:" ",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,groupHideColumnsUntilExpanded:!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},Cc="https://www.ag-grid.com";function Et(e,t,...o){e.get("debug")&&console.log("AG Grid: "+t,...o)}function Qo(e,...t){Sr(()=>wc(e,...t),e+(t==null?void 0:t.join("")))}function vo(e,...t){Sr(()=>lh(e,...t),e+(t==null?void 0:t.join("")))}function lh(e,...t){console.error("AG Grid: "+e,...t)}function wc(e,...t){console.warn("AG Grid: "+e,...t)}var bc=new Set,Xi={},Co={},Hi,yc=!1,Sc=!1,ch=!1;function dh(e){let[t,o]=e.version.split(".")||[],[i,r]=Hi.split(".")||[];return t===i&&o===r}function gh(e){var i;Hi||(Hi=e.version);let t=r=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${r} Please update all modules to the same version.`;e.version?dh(e)||vo(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${Hi}.`)):vo(t(`'${e.moduleName}' is incompatible.`));let o=(i=e.validate)==null?void 0:i.call(e);o&&!o.isValid&&vo(`${o.message}`)}function ci(e,t,o=!1){var a;o||(yc=!0),gh(e);let i=(a=e.rowModels)!=null?a:["all"];bc.add(e);let r;t!==void 0?(Sc=!0,Co[t]===void 0&&(Co[t]={}),r=Co[t]):r=Xi;for(let n of i)r[n]===void 0&&(r[n]={}),r[n][e.moduleName]=e;if(e.dependsOn)for(let n of e.dependsOn)ci(n,t,o)}function uh(e){delete Co[e]}function Ea(e,t,o){let i=r=>{var a,n,s;return!!((a=Xi[r])!=null&&a[e])||!!((s=(n=Co[t])==null?void 0:n[r])!=null&&s[e])};return i(o)||i("all")}function wn(){return Sc}function hh(e,t){var i,r,a,n,s;let o=(i=Co[e])!=null?i:{};return[...Object.values((r=Xi.all)!=null?r:{}),...Object.values((a=o.all)!=null?a:{}),...Object.values((n=Xi[t])!=null?n:{}),...Object.values((s=o[t])!=null?s:{})]}function ph(){return new Set(bc)}function fh(){return yc}function bn(){return ch}var xc=class{static register(e){ci(e,void 0)}static registerModules(e){for(let t of e)ci(t,void 0)}};var D="35.2.1",ks=2e3,Rs=100,kc="_version_",Bi=null,wo=`${Cc}/javascript-data-grid`;function mh(e){Bi=e}function vh(e){wo=e}function Rc(e,t,o){var i;return(i=Bi==null?void 0:Bi(e,t))!=null?i:[yh(e,t,o)]}function yn(e,t,o,i,r){e(`${i?"warning":"error"} #${t}`,...Rc(t,o,r))}function Ch(e){if(!e)return String(e);let t={};for(let o of Object.keys(e))typeof e[o]!="object"&&typeof e[o]!="function"&&(t[o]=e[o]);return JSON.stringify(t)}function wh(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=Ch(e)),t}function Vi(e){return e===void 0?"undefined":e===null?"null":e}function Fa(e,t){return`${e}?${t.toString()}`}function bh(e,t,o){let i=Array.from(t.entries()).sort((a,n)=>n[1].length-a[1].length),r=Fa(e,t);for(let[a,n]of i){if(a===kc)continue;let s=r.length-o;if(s<=0)break;let l="...",c=s+l.length,d=n.length-c>Rs?n.slice(0,n.length-c)+l:n.slice(0,Rs)+l;t.set(a,d),r=Fa(e,t)}return r}function Ec(e,t){let o=new URLSearchParams;if(o.append(kc,D),t)for(let a of Object.keys(t))o.append(a,wh(t[a]));let i=`${wo}/errors/${e}`,r=Fa(i,o);return r.length<=ks?r:bh(i,o,ks)}var yh=(e,t,o)=>{let i=Ec(e,t),r=`${o?o+` +`:""}Visit ${i}`;return bn()?r:`${r}${o?"":` + Alternatively register the ValidationModule to see the full message in the console.`}`};function k(...e){yn(Qo,e[0],e[1],!0)}function W(...e){yn(vo,e[0],e[1],!1)}function _o(e,t,o){yn(vo,e,t,!1,o)}function Sh(e,t){let o=t[0];return`error #${o} `+Rc(o,t[1],e).join(" ")}function Je(...e){return Sh(void 0,e)}function Fc(e,t){return e.get("rowModelType")===t}function ee(e,t){return Fc(e,"clientSide")}function mi(e,t){return Fc(e,"serverSide")}function se(e,t){return e.get("domLayout")===t}function _t(e){return or(e)!==void 0}function Dc(e){return typeof e.get("getRowHeight")=="function"}function xh(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function kh({gos:e,formula:t}){let o=e.get("rowNumbers");return o||!!(t!=null&&t.active)&&o!==!1}function Ft(e,t,o=!1,i){let{gos:r,environment:a}=e;if(i==null&&(i=a.getDefaultRowHeight()),Dc(r)){if(o)return{height:i,estimated:!0};let l={node:t,data:t.data},c=r.getCallback("getRowHeight")(l);if(Da(c))return c===0&&k(23),{height:Math.max(1,c),estimated:!1}}if(t.detail&&r.get("masterDetail"))return Rh(r);let n=r.get("rowHeight");return{height:n&&Da(n)?n:i,estimated:!1}}function Rh(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};let t=e.get("detailRowHeight");return Da(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function Ut(e){let{environment:t,gos:o}=e,i=o.get("rowHeight");if(!i||Q(i))return t.getDefaultRowHeight();let r=t.refreshRowHeightVariable();return r!==-1?r:(k(24),t.getDefaultRowHeight())}function Da(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function Mc(e,t,o){let i=t[e.getDomDataKey()];return i?i[o]:void 0}function Zt(e,t,o,i){let r=e.getDomDataKey(),a=t[r];Q(a)&&(a={},t[r]=a),a[o]=i}function bo(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function Pc(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||se(e,"print"))}function nt(e){let t=e.get("autoGroupColumnDef");return!(t!=null&&t.comparator)&&!e.get("treeData")}function er(e){let t=e.get("groupAggFiltering");if(typeof t=="function")return e.getCallback("groupAggFiltering");if(t===!0)return()=>!0}function Ic(e){return e.get("grandTotalRow")}function Eh(e){return e.get("groupHideOpenParents")?!0:e.get("groupDisplayType")==="multipleColumns"}function Fh(e){return Eh(e)&&e.get("groupHideColumnsUntilExpanded")&&ee(e)}function Tc(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function Ac(e,t,o){return!!t.group&&!t.footer&&Tc(e,o)}function Do(e){let t=e.getCallback("getRowId");return t===void 0?t:o=>{let i=t(o);return typeof i!="string"&&(Sr(()=>k(25,{id:i}),"getRowIdString"),i=String(i)),i}}function Dh(e,t){let o=e.get("groupHideParentOfSingleChild");return!!(o===!0||o==="leafGroupsOnly"&&t.leafGroup||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")&&t.leafGroup)}function Mh(e){let t=e.get("maxConcurrentDatasourceRequests");return t>0?t:void 0}function yo(e){var t;return(t=e==null?void 0:e.checkboxes)!=null?t:!0}function Ni(e){var t;return(e==null?void 0:e.mode)==="multiRow"&&((t=e.headerCheckbox)!=null?t:!0)}function tr(e){var t;if(typeof e=="object")return(t=e.checkboxLocation)!=null?t:"selectionColumn"}function Wr(e){var t;return(t=e==null?void 0:e.hideDisabledCheckboxes)!=null?t:!1}function Ph(e){return typeof e.get("rowSelection")!="string"}function dt(e){let t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function So(e){var o,i;let t=(o=e.get("cellSelection"))!=null?o:!1;return(i=typeof t=="object"&&t.enableColumnSelection)!=null?i:!1}function zc(e){var o,i;let t=(o=e.get("rowSelection"))!=null?o:"single";if(typeof t=="string"){let r=e.get("suppressRowClickSelection"),a=e.get("suppressRowDeselection");return r&&a?!1:r?"enableDeselection":a?"enableSelection":!0}return(t.mode==="singleRow"||t.mode==="multiRow")&&(i=t.enableClickSelection)!=null?i:!1}function Ih(e){let t=zc(e);return t===!0||t==="enableSelection"}function Th(e){let t=zc(e);return t===!0||t==="enableDeselection"}function Ma(e){let t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t==null?void 0:t.isRowSelectable}function or(e){let t="beanName"in e&&e.beanName==="gos"?e.get("rowSelection"):e.rowSelection;if(typeof t=="string")switch(t){case"multiple":return"multiRow";case"single":return"singleRow";default:return}switch(t==null?void 0:t.mode){case"multiRow":case"singleRow":return t.mode;default:return}}function di(e){return or(e)==="multiRow"}function Ah(e){var o;let t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):(o=t==null?void 0:t.enableSelectionWithoutKeys)!=null?o:!1}function ir(e){let t=e.get("rowSelection");if(typeof t=="string"){let o=e.get("groupSelectsChildren"),i=e.get("groupSelectsFiltered");return o&&i?"filteredDescendants":o?"descendants":"self"}return(t==null?void 0:t.mode)==="multiRow"?t.groupSelects:void 0}function Lc(e,t=!0){let o=e.get("rowSelection");return typeof o!="object"?t?"all":void 0:o.mode==="multiRow"?o.selectAll:"all"}function zh(e){var o;let t=e.get("rowSelection");return typeof t=="string"?!1:(t==null?void 0:t.mode)==="multiRow"&&(o=t.ctrlASelectsRows)!=null?o:!1}function gi(e){let t=ir(e);return t==="descendants"||t==="filteredDescendants"}function Es(e){let t=e.get("rowSelection");return typeof t=="object"&&t.masterSelects||"self"}function Lh(e){return e.isModuleRegistered("SetFilter")&&!e.get("suppressSetFilterByDefault")}function be(e){return e.get("columnMenu")==="legacy"}function Oh(e){return!be(e)}function Hh(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}function O(e,t){return e.addCommon(t)}function Bh({gos:e},t){return t.button===2||t.ctrlKey&&e.get("allowContextMenuWithControlKey")}var Vh={resizable:!0,sortable:!0},Nh=0;function Oc(){return Nh++}function Dt(e){return e instanceof ao}var Gh=["asc","desc",null],Wh=[{type:"absolute",direction:"asc"},{type:"absolute",direction:"desc"},null],ao=class extends S{constructor(e,t,o,i){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=o,this.primary=i,this.isColumn=!0,this.instanceId=Oc(),this.autoHeaderHeight=null,this.sortDef=Me(),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 Yt,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=Ko(o)}destroy(){var e;super.destroy(),(e=this.beans.rowSpanSvc)==null||e.deregister(this)}getInstanceId(){return this.instanceId}initState(){let{colDef:e,beans:{sortSvc:t,pinnedCols:o,colFlex:i}}=this;t==null||t.initCol(this);let r=e.hide;r!==void 0?this.visible=!r:this.visible=!e.initialHide,o==null||o.initCol(this),i==null||i.initCol(this)}setColDef(e,t,o){var r;let i=e.spanRows!==this.colDef.spanRows;this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),i&&((r=this.beans.rowSpanSvc)==null||r.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(){let{gos:e,colDef:{field:t,tooltipField:o}}=this,i=e.get("suppressFieldDotNotation");this.fieldContainsDots=M(t)&&t.includes(".")&&!i,this.tooltipFieldContainsDots=M(o)&&o.includes(".")&&!i}initMinAndMaxWidths(){var t,o;let e=this.colDef;this.minWidth=(t=e.minWidth)!=null?t:this.beans.environment.getDefaultColumnMinWidth(),this.maxWidth=(o=e.maxWidth)!=null?o:Number.MAX_SAFE_INTEGER}initTooltip(){var e;(e=this.beans.tooltipSvc)==null||e.initCol(this)}initRowSpan(){var e;this.colDef.spanRows&&((e=this.beans.rowSpanSvc)==null||e.register(this))}addPivotListener(){let e=this.beans.pivotColDefSvc,t=this.colDef.pivotValueColumn;!e||!t||this.addManagedListeners(t,{colDefChanged:o=>{let i=e.recreateColDef(this.colDef);this.setColDef(i,i,o.source)}})}resetActualWidth(e){let t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){var o,i;let t=(i=(o=e.width)!=null?o:e.initialWidth)!=null?i:200;return Math.max(Math.min(t,this.maxWidth),this.minWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){var t,o;return(o=(t=this.beans.showRowGroupCols)==null?void 0:t.isRowGroupDisplayed(this,e))!=null?o:!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){var i,r,a,n;this.frameworkEventListenerService=(r=(i=this.beans.frameworkOverrides).createLocalEventListenerWrapper)==null?void 0:r.call(i,this.frameworkEventListenerService,this.colEventSvc);let o=(n=(a=this.frameworkEventListenerService)==null?void 0:a.wrap(e,t))!=null?n:t;this.colEventSvc.addEventListener(e,o)}removeEventListener(e,t){var i,r;let o=(r=(i=this.frameworkEventListenerService)==null?void 0:i.unwrap(e,t))!=null?r:t;this.colEventSvc.removeEventListener(e,o)}createColumnFunctionCallbackParams(e){return O(this.gos,{node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){var t,o;return(o=(t=this.beans.cellNavigation)==null?void 0:t.isSuppressNavigable(this,e))!=null?o:!1}isCellEditable(e){var t,o;return(o=(t=this.beans.editSvc)==null?void 0:t.isCellEditable({rowNode:e,column:this}))!=null?o:!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){var t,o;return(o=(t=this.beans.selectionSvc)==null?void 0:t.isCellCheckboxSelection(this,e))!=null?o:!1}isSuppressPaste(e){var t,o;return this.isColumnFunc(e,(o=(t=this.colDef)==null?void 0:t.suppressPaste)!=null?o:null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(e){var t;return(t=this.colDef[e])!=null?t:Vh[e]}isColumnFunc(e,t){if(typeof t=="boolean")return t;if(typeof t=="function"){let o=this.createColumnFunctionCallbackParams(e);return t(o)}return!1}createColumnEvent(e,t){return O(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(){let e=[],{sort:t,initialSort:o}=this.colDef,i=t===null?t:gt(t==null?void 0:t.type),r=o===null?o:gt(o==null?void 0:o.type);return i&&e.push(i),r&&e.push(r),e}getSortingOrder(){var t,o;let e=this.getColDefAllowedSortTypes().includes("absolute")?Wh:Gh;return((o=(t=this.colDef.sortingOrder)!=null?t:this.gos.get("sortingOrder"))!=null?o:e).map(i=>Me(i))}getAvailableSortTypes(){let e=this.getSortingOrder().reduce((t,o)=>(o.direction&&t.push(o.type),t),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 this.getSort()==="asc"}isSortDescending(){return this.getSort()==="desc"}isSortNone(){return Q(this.getSort())}isSorting(){return M(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(){var e;return k(261),!!((e=this.beans.colHover)!=null&&e.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 this.pinned==="left"||this.pinned==="right"}isPinnedLeft(){return this.pinned==="left"}isPinnedRight(){return this.pinned==="right"}getPinned(){return this.pinned}setVisible(e,t){let o=e===!0;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!=null&&e.isPadding();)e=e.getOriginalParent();return e}getColumnGroupPaddingInfo(){let e=this.getParent();if(!(e!=null&&e.isPadding()))return{numberOfParents:0,isSpanningTotal:!1};let t=e.getPaddingLevel()+1,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){let t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}createBaseColDefParams(e){return O(this.gos,{node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(Q(this.colDef.colSpan))return 1;let t=this.createBaseColDefParams(e),o=this.colDef.colSpan(t);return Math.max(o,1)}getRowSpan(e){if(Q(this.colDef.rowSpan))return 1;let 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,this.flex!=null&&t!=="flex"&&t!=="gridInitializing"&&(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 this.colDef.enablePivot===!0}isAllowValue(){return this.colDef.enableValue===!0}isAllowRowGroup(){return this.colDef.enableRowGroup===!0}isAllowFormula(){return this.colDef.allowFormula===!0}dispatchColEvent(e,t,o){let i=this.createColumnEvent(e,t);o&&he(i,o),this.colEventSvc.dispatchEvent(i)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function Me(e){return xo(e)?{direction:e.direction,type:e.type}:{direction:xr(e),type:gt(e)}}function xt(e){return e==="asc"||e==="desc"||e===null}function Sn(e){return e==="default"||e==="absolute"}function xo(e){if(!e||typeof e!="object")return!1;let t=e;return Sn(t.type)&&xt(t.direction)}function Gi(e,t){return e?t?e.type===t.type&&e.direction===t.direction:e?e.direction===null:!0:t?t.direction===null:!0}function xr(e){return xt(e)?e:null}function gt(e){return Sn(e)?e:"default"}function qh(e,t,o){let i=o==null?void 0:o(),r=i!=null?i:t.sortSvc.getDisplaySortForColumn(e),a=gt(r==null?void 0:r.type),n=xr(r==null?void 0:r.direction),s=e.getAvailableSortTypes(),l=s.has("default"),c=s.has("absolute");return{isDefaultSortAllowed:l,isAbsoluteSortAllowed:c,isAbsoluteSort:a==="absolute",isDefaultSort:a==="default",isAscending:n==="asc",isDescending:n==="desc",direction:n}}function de(e){return e instanceof Wi}var Wi=class extends S{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=Oc(),this.expandableListenerRemoveCallback=null,this.expanded=!!(e!=null&&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()):!1}isPadding(){return this.padding}setExpanded(e){this.expanded=e===void 0?!1: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(){let e=[];return this.addLeafColumns(e),e}forEachLeafColumn(e){if(this.children)for(let t of this.children)Dt(t)?e(t):de(t)&&t.forEachLeafColumn(e)}addLeafColumns(e){if(this.children)for(let t of this.children)Dt(t)?e.push(t):de(t)&&t.addLeafColumns(e)}getColumnGroupShow(){let e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();let e=this.onColumnVisibilityChanged.bind(this);for(let t of this.getLeafColumns())t.__addEventListener("visibleChanged",e);this.expandableListenerRemoveCallback=()=>{for(let t of this.getLeafColumns())t.__removeEventListener("visibleChanged",e);this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,o=!1,i=this.findChildrenRemovingPadding();for(let a=0,n=i.length;a{for(let i of o)de(i)&&i.isPadding()?t(i.children):e.push(i)};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},_h={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};function Fs(e,t,o){let i={},r=e.gos;return Object.assign(i,r.get("defaultColGroupDef")),Object.assign(i,t),r.validateColDef(i,o),i}var Uh=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t0&&k(273,{providedId:e,usedId:r}),this.existingKeys[r]=!0,r}o++}}},jh=(e,t)=>{de(e)&&e.setupExpandable(),e.originalParent=t};function Kh(e,t=null,o,i,r){var h;let a=new Uh,{existingCols:n,existingGroups:s,existingColKeys:l}=$h(i);a.addExistingKeys(l);let c=Hc(e,t,0,o,n,a,s,r),{colGroupSvc:d}=e,g=(h=d==null?void 0:d.findMaxDepth(c,0))!=null?h:0,u=d?d.balanceColumnTree(c,0,g,a):c;return lt(null,u,jh),{columnTree:u,treeDepth:g}}function $h(e){let t=[],o=[],i=[];return e&<(null,e,r=>{if(de(r)){let a=r;o.push(a)}else{let a=r;i.push(a.getId()),t.push(a)}}),{existingCols:t,existingGroups:o,existingColKeys:i}}function Hc(e,t,o,i,r,a,n,s){if(!t)return[];let{colGroupSvc:l}=e,c=new Array(t.length);for(let d=0;d0))if(o.width!=null)t.setActualWidth(o.width,i);else{let a=t.getActualWidth();t.setActualWidth(a,i)}}function Zh(e,t){if(t)for(let o=0;o{for(let r=0;rt+o.getActualWidth(),0)}function rr(e,t,o){let i={};if(!t)return;lt(null,t,a=>{i[a.getInstanceId()]=a}),o&<(null,o,a=>{i[a.getInstanceId()]=null});let r=Object.values(i).filter(a=>a!=null);e.context.destroyBeans(r)}function xn(e){return e.getId().startsWith(kr)}function At(e){var o;let t=typeof e=="string"?e:"getColId"in e?e.getColId():e.colId;return(o=t==null?void 0:t.startsWith(Vc))!=null?o:!1}function pe(e){var o;let t=typeof e=="string"?e:"getColId"in e?e.getColId():e.colId;return(o=t==null?void 0:t.startsWith(Nc))!=null?o:!1}function tp(e){return At(e)||pe(e)}function ar(e){let t=[];return e instanceof Array?t=e:typeof e=="string"&&(t=e.split(",")),t}function op(e,t){return It(e,t,(o,i)=>o.getColId()===i.getColId())}function ip(e){e.map={};for(let t of e.list)e.map[t.getId()]=t}function ko(e){return e==="optionsUpdated"?"gridOptionsChanged":e}function Zo(e,t){return e===t||e.colId==t||e.getColDef()===t}var rp=(e,t)=>(o,i)=>{let r={value1:void 0,value2:void 0},a=!1;return e&&(e[o]!==void 0&&(r.value1=e[o],a=!0),M(i)&&e[i]!==void 0&&(r.value2=e[i],a=!0)),!a&&t&&(t[o]!==void 0&&(r.value1=t[o]),M(i)&&t[i]!==void 0&&(r.value2=t[i])),r};function ap(e,t){let o={...e,sort:void 0,colId:t},i=Wc(e);return i&&(o.sort=i.direction,o.sortType=i.type),o}function Wc(e){let{sort:t,initialSort:o}=e,i=xo(t)||xt(t),r=xo(o)||xt(o);return i?Me(t):r?Me(o):null}function qc(e,t){return e+"_"+t}function X(e){return e instanceof ui}var ui=class extends S{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=Ko(this.getUniqueId())}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}getUniqueId(){return qc(this.groupId,this.partId)}isEmptyGroup(){return this.displayedChildren.length===0}isMoving(){let e=this.getProvidedColumnGroup().getLeafColumns();return!e||e.length===0?!1:e.every(t=>t.isMoving())}checkLeft(){for(let e of this.displayedChildren)X(e)&&e.checkLeft();if(this.displayedChildren.length>0)if(this.gos.get("enableRtl")){let t=U(this.displayedChildren).getLeft();this.setLeft(t)}else{let 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(){var t;let e=0;for(let o of(t=this.displayedChildren)!=null?t:[])e+=o.getActualWidth();return e}isResizable(){if(!this.displayedChildren)return!1;let e=!1;for(let t of this.displayedChildren)t.isResizable()&&(e=!0);return e}getMinWidth(){let e=0;for(let t of this.displayedChildren)e+=t.getMinWidth();return e}addChild(e){this.children||(this.children=[]),this.children.push(e)}getDisplayedChildren(){return this.displayedChildren}getLeafColumns(){let e=[];return this.addLeafColumns(e),e}getDisplayedLeafColumns(){let 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(){var e;return!!((e=this.getColGroupDef())!=null&&e.autoHeaderHeight)}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){let t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}addDisplayedLeafColumns(e){var t;for(let o of(t=this.displayedChildren)!=null?t:[])Dt(o)?e.push(o):X(o)&&o.addDisplayedLeafColumns(e)}addLeafColumns(e){var t;for(let o of(t=this.children)!=null?t:[])Dt(o)?e.push(o):X(o)&&o.addLeafColumns(e)}getChildren(){return this.children}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow()}getProvidedColumnGroup(){return this.providedColumnGroup}getPaddingLevel(){let e=this.getParent();return!this.isPadding()||!(e!=null&&e.isPadding())?0:1+e.getPaddingLevel()}calculateDisplayedColumns(){var o,i;this.displayedChildren=[];let e=this;for(;e!=null&&e.isPadding();)e=e.getParent();if(!(e?e.getProvidedColumnGroup().isExpandable():!1)){this.displayedChildren=this.children,this.dispatchLocalEvent({type:"displayedChildrenChanged"});return}for(let r of(o=this.children)!=null?o:[]){if(X(r)&&!((i=r.displayedChildren)!=null&&i.length))continue;switch(r.getColumnGroupShow()){case"open":e.getProvidedColumnGroup().isExpanded()&&this.displayedChildren.push(r);break;case"closed":e.getProvidedColumnGroup().isExpanded()||this.displayedChildren.push(r);break;default:this.displayedChildren.push(r);break}}this.dispatchLocalEvent({type:"displayedChildrenChanged"})}},b={BACKSPACE:"Backspace",TAB:"Tab",ENTER:"Enter",ESCAPE:"Escape",SPACE:" ",LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown",DELETE:"Delete",F2:"F2",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",PAGE_HOME:"Home",PAGE_END:"End",A:"KeyA",C:"KeyC",D:"KeyD",V:"KeyV",X:"KeyX",Y:"KeyY",Z:"KeyZ"},np=65,sp=67,lp=86,cp=68,dp=90,gp=89;function _c(e){let{keyCode:t}=e,o;switch(t){case np:o=b.A;break;case sp:o=b.C;break;case lp:o=b.V;break;case cp:o=b.D;break;case dp:o=b.Z;break;case gp:o=b.Y;break;default:o=e.code}return o}function up(e,t){return new $(o=>{o(window.setInterval(e,t))})}var $=class Uo{constructor(t){this.status=0,this.resolution=null,this.waiters=[],t(o=>this.onDone(o),o=>this.onReject(o))}static all(t){return t.length?new Uo(o=>{let i=t.length,r=new Array(i);t.forEach((a,n)=>{a.then(s=>{r[n]=s,i--,i===0&&o(r)})})}):Uo.resolve()}static resolve(t=null){return new Uo(o=>o(t))}then(t){return new Uo(o=>{this.status===1?o(t(this.resolution)):this.waiters.push(i=>o(t(i)))})}onDone(t){this.status=1,this.resolution=t;for(let o of this.waiters)o(t)}onReject(t){}},hp=class extends ve{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){let o={capturePointer:!0,dragSource:e,eElement:e.eElement,dragStartPixels:e.dragStartPixels,onDragStart:i=>this.onDragStart(e,i),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){let o=this.dragImageComp;o&&(t||this.dragImageLastIcon!==e)&&(this.dragImageLastIcon=e,o.setIcon(e,t))}removeDragSource(e){var i;let{dragSourceAndParamsList:t,beans:o}=this;for(let r=0,a=t.length;r{for(let c of l){let{width:d,height:g,left:u,right:h,top:p,bottom:f}=c.getBoundingClientRect();if(d===0||g===0)return!1;let m=s.clientX>=u&&s.clientX=p&&s.clientY0}findExternalZone(e){let t=this.dropTargets;for(let o=0,i=t.length;o0?"down":p<0?"up":null,hDirection:h<0?"left":h>0?"right":null,initialSourcePointerOffsetX:s,initialSourcePointerOffsetY:l,dragSource:i,fromNudge:o,dragItem:r,dropZoneTarget:c,dropTarget:(m=a==null?void 0:a.dropTarget)!=null?m:null,changed:!!(a!=null&&a.changed)});return this.lastDraggingEvent=f,f}positionDragImageComp(e){var o;let t=(o=this.dragImageComp)==null?void 0:o.getGui();t&&Yu(t,e,this.beans)}removeDragImageComp(e){var t;this.dragImageComp===e&&(this.dragImageComp=null),e&&((t=e.getGui())==null||t.remove(),this.destroyBean(e))}createAndUpdateDragImageComp(e){var o;let t=(o=this.createDragImageComp(e))!=null?o:null;this.dragImageCompPromise=t,t==null||t.then(i=>{let r=this.lastMouseEvent;if(t!==this.dragImageCompPromise||!r||!this.isAlive()){this.destroyBean(i);return}this.dragImageCompPromise=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0;let a=this.dragImageComp;a!==i&&(this.dragImageComp=i,this.removeDragImageComp(a)),i&&(this.appendDragImageComp(i),this.updateDragImageComp(),this.positionDragImageComp(r))})}appendDragImageComp(e){var r;let t=e.getGui(),o=t.style;o.position="absolute",o.zIndex="9999",(r=this.beans.dragSvc)!=null&&r.hasPointerCapture()&&(o.pointerEvents="none"),this.gos.setInstanceDomData(t),this.beans.environment.applyThemeClasses(t),o.top="20px",o.left="20px";let i=dn(this.beans);i?i.appendChild(t):this.warnNoBody()}updateDragImageComp(){var n,s;let{dragImageComp:e,dragSource:t,lastDropTarget:o,lastDraggingEvent:i,dragImageLastLabel:r}=this;if(!e)return;this.setDragImageCompIcon((s=(n=o==null?void 0:o.getIconName)==null?void 0:n.call(o,i))!=null?s:null);let a=t==null?void 0:t.dragItemName;typeof a=="function"&&(a=a(i)),a||(a=""),r!==a&&(this.dragImageLastLabel=a,e.setLabel(a))}};function Uc(e){return typeof e=="object"&&!!e.component}function pp(e){return e?e.prototype&&"getGui"in e.prototype:!1}function jc(e,t,o,i){let{name:r}=o,a,n,s,l,c,d;if(t){let g=t,u=g[r+"Selector"],h=u?u(i):null,p=f=>{typeof f=="string"?a=f:f!=null&&f!==!0&&(e.isFrameworkComponent(f)?s=f:n=f)};h?(p(h.component),l=h.params,c=h.popup,d=h.popupPosition):p(g[r])}return{compName:a,jsComp:n,fwComp:s,paramsFromSelector:l,popupFromSelector:c,popupPositionFromSelector:d}}var fp=class extends S{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,r=!1){var w;let{name:a,cellRenderer:n}=t,{compName:s,jsComp:l,fwComp:c,paramsFromSelector:d,popupFromSelector:g,popupPositionFromSelector:u}=jc(this.beans.frameworkOverrides,e,t,i),h,p,f=y=>{let x=this.registry.getUserComponent(a,y);x&&(l=x.componentFromFramework?void 0:x.component,c=x.componentFromFramework?x.component:void 0,h=x.params,p=x.processParams)};if(s!=null&&f(s),l==null&&c==null&&o!=null&&f(o),l&&n&&!pp(l)&&(l=(w=this.agCompUtils)==null?void 0:w.adaptFunction(t,l)),!l&&!c){let{validation:y}=this.beans;r&&(s!==o||!o)?s?y!=null&&y.isProvidedUserComp(s)||W(50,{compName:s}):o?y||W(260,{...this.gos.getModuleErrorParams(),propName:a,compName:o}):W(216,{name:a}):o&&!y&&W(146,{comp:o});return}let m=this.mergeParams(e,t,i,d,h,p),v=l==null,C=l!=null?l:c;return{componentFromFramework:v,componentClass:C,params:m,type:t,popupFromSelector:g,popupPositionFromSelector:u,newAgStackInstance:()=>this.newAgStackInstance(C,v,m,t)}}newAgStackInstance(e,t,o,i){var s;let r=!t,a;r?a=new e:a=this.frameworkCompWrapper.wrap(e,i.mandatoryMethods,i.optionalMethods,i),this.createBean(a);let n=(s=a.init)==null?void 0:s.call(a,o);return n==null?$.resolve(a):n.then(()=>a)}mergeParams(e,t,o,i=null,r,a){let n={...o,...r},s=e,l=s==null?void 0:s[t.name+"Params"];if(typeof l=="function"){let c=l(o);he(n,c)}else typeof l=="object"&&he(n,l);return he(n,i),a?a(n):n}},mp={name:"dateComponent",mandatoryMethods:["getDate","setDate"],optionalMethods:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","refresh"]},vp={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},Cp={name:"headerComponent",optionalMethods:["refresh"]},wp={name:"innerHeaderComponent"},bp={name:"innerHeaderGroupComponent"},yp={name:"headerGroupComponent"};var Sp={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0};var xp={name:"loadingCellRenderer",cellRenderer:!0},kp={name:"cellEditor",mandatoryMethods:["getValue"],optionalMethods:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},Rp={name:"tooltipComponent"},kn={name:"filter",mandatoryMethods:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethods:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},Ep={name:"floatingFilterComponent",mandatoryMethods:["onParentModelChanged"],optionalMethods:["afterGuiAttached","refresh"]},Fp={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},Dp={name:"loadingCellRenderer",cellRenderer:!0},Mp={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},Pp={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function Ip(e,t){return e.getCompDetailsFromGridOptions(vp,"agDragAndDropImage",t,!0)}function Tp(e,t,o){return e.getCompDetails(t,Cp,"agColumnHeader",o)}function Ap(e,t,o){return e.getCompDetails(t,wp,void 0,o)}function zp(e,t){let o=t.columnGroup.getColGroupDef();return e.getCompDetails(o,yp,"agColumnGroupHeader",t)}function Lp(e,t,o){return e.getCompDetails(t,bp,void 0,o)}function Op(e,t){return e.getCompDetailsFromGridOptions(Fp,void 0,t,!0)}function Hp(e,t){return e.getCompDetailsFromGridOptions(Dp,"agLoadingCellRenderer",t,!0)}function Bp(e,t){return e.getCompDetailsFromGridOptions(Mp,"agGroupRowRenderer",t,!0)}function Vp(e,t){return e.getCompDetailsFromGridOptions(Pp,"agDetailCellRenderer",t,!0)}function Ds(e,t,o){return e.getCompDetails(t,Sp,void 0,o)}function Ms(e,t,o){return e.getCompDetails(t,xp,"agSkeletonCellRenderer",o,!0)}function Kc(e,t,o){return e.getCompDetails(t,kp,"agCellEditor",o,!0)}function Np(e,t,o,i){let r=t.filter;return Uc(r)&&(t={filter:r.component,filterParams:t.filterParams}),e.getCompDetails(t,kn,i,o,!0)}function Gp(e,t,o){return e.getCompDetails(t,mp,"agDateInput",o,!0)}function Wp(e,t){return e.getCompDetails(t.colDef,Rp,"agTooltipComponent",t,!0)}function qp(e,t,o,i){return e.getCompDetails(t,Ep,i,o)}function $c(e,t){return jc(e,t,kn)}function qr(e,t,o){return e.mergeParams(t,kn,o)}var _p=class extends hp{createEvent(e){return O(this.gos,e)}createDragImageComp(e){let{gos:t,beans:o}=this,i=Ip(o.userCompFactory,O(t,{dragSource:e}));return i==null?void 0:i.newAgStackInstance()}handleEnter(e,t){var o;(o=e==null?void 0:e.onGridEnter)==null||o.call(e,t)}handleExit(e,t){var o;(o=e==null?void 0:e.onGridExit)==null||o.call(e,t)}warnNoBody(){k(54)}isDropZoneWithinThisGrid(e){return this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody.contains(e.dropZoneTarget)}registerGridDropTarget(e,t){let o={getContainer:e,isInterestedIn:i=>i===1||i===0,getIconName:()=>"notAllowed"};this.addDropTarget(o),t.addDestroyFunc(()=>this.removeDropTarget(o))}};function Yc(e){return!!e.operator}var Qc="ag-resizer-wrapper",pt=(e,t)=>({tag:"div",ref:`${e}Resizer`,cls:`ag-resizer ag-resizer-${t}`}),Up={tag:"div",cls:Qc,children:[pt("eTopLeft","topLeft"),pt("eTop","top"),pt("eTopRight","topRight"),pt("eRight","right"),pt("eBottomRight","bottomRight"),pt("eBottom","bottom"),pt("eBottomLeft","bottomLeft"),pt("eLeft","left")]},jp=class extends ve{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){let{clientHeight:t,clientWidth:o}=this.offsetParent,i=o/2-this.getWidth()/2,r=t/2-this.getHeight()/2;this.offsetElement(i,r,e)}initialisePosition(e){if(this.positioned)return;let{centered:t,forcePopupParentAsOffsetParent:o,minWidth:i,width:r,minHeight:a,height:n,x:s,y:l}=this.config;this.offsetParent||this.setOffsetParent();let c=0,d=0,g=Ie(this.element);if(g){let u=this.findBoundaryElement(),h=window.getComputedStyle(u);if(h.minWidth!=null){let p=u.offsetWidth-this.element.offsetWidth;d=Number.parseInt(h.minWidth,10)-p}if(h.minHeight!=null){let p=u.offsetHeight-this.element.offsetHeight;c=Number.parseInt(h.minHeight,10)-p}}if(this.minHeight=a||c,this.minWidth=i||d,r&&this.setWidth(r),n&&this.setHeight(n),(!r||!n)&&this.refreshSize(),t)this.center(e);else if(s||l)this.offsetElement(s,l,e);else if(g&&o){let u=this.boundaryEl,h=!0;if(u||(u=this.findBoundaryElement(),h=!1),u){let p=Number.parseFloat(u.style.top),f=Number.parseFloat(u.style.left);h?this.offsetElement(Number.isNaN(f)?0:f,Number.isNaN(p)?0:p,e):this.setPosition(f,p)}}this.positioned=!!this.offsetParent}isPositioned(){return this.positioned}getPosition(){return this.position}setMovable(e,t){var i,r;if(!this.config.popup||e===this.movable)return;this.movable=e;let o=this.moveElementDragListener||{eElement:t,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};e?((i=this.dragSvc)==null||i.addDragSource(o),this.moveElementDragListener=o):((r=this.dragSvc)==null||r.removeDragSource(o),this.moveElementDragListener=void 0)}setResizable(e){var t;if(this.clearResizeListeners(),e?this.addResizers():this.removeResizers(),typeof e=="boolean"){if(e===!1)return;e={topLeft:e,top:e,topRight:e,right:e,bottomRight:e,bottom:e,bottomLeft:e,left:e}}for(let o of Object.keys(e)){let i=!!e[o],r=this.getResizerElement(o),a={dragStartPixels:0,eElement:r,onDragStart:n=>this.onResizeStart(n,o),onDragging:this.onResize.bind(this),onDragStop:n=>this.onResizeEnd(n,o)};(i||!this.isAlive()&&!i)&&(i?((t=this.dragSvc)==null||t.addDragSource(a),this.resizeListeners.push(a),r.style.pointerEvents="all"):r.style.pointerEvents="none",this.resizable[o]=i)}}removeSizeFromEl(){this.element.style.removeProperty("height"),this.element.style.removeProperty("width"),this.element.style.removeProperty("flex")}restoreLastSize(){this.element.style.flex="0 0 auto";let{height:e,width:t}=this.lastSize;t!==-1&&(this.element.style.width=`${t}px`),e!==-1&&(this.element.style.height=`${e}px`)}getHeight(){return this.element.offsetHeight}setHeight(e){let{popup:t}=this.config,o=this.element,i=!1;if(typeof e=="string"&&e.includes("%"))Yo(o,e),e=lc(o),i=!0;else if(e=Math.max(this.minHeight,e),this.positioned){let r=this.getAvailableHeight();r&&e>r&&(e=r)}this.getHeight()!==e&&(i?(o.style.maxHeight="unset",o.style.minHeight="unset"):t?Yo(o,e):(o.style.height=`${e}px`,o.style.flex="0 0 auto",this.lastSize.height=typeof e=="number"?e:Number.parseFloat(e)))}getAvailableHeight(){let{popup:e,forcePopupParentAsOffsetParent:t}=this.config;this.positioned||this.initialisePosition();let{clientHeight:o}=this.offsetParent;if(!o)return null;let i=this.element.getBoundingClientRect(),r=this.offsetParent.getBoundingClientRect(),a=e?this.position.y:i.top,n=e?0:r.top,s=0;if(t){let c=this.element.parentElement;if(c){let{bottom:d}=c.getBoundingClientRect();s=d-i.bottom}}return o+n-a-s}getWidth(){return this.element.offsetWidth}setWidth(e){let t=this.element,{popup:o}=this.config,i=!1;if(typeof e=="string"&&e.includes("%"))Ze(t,e),e=$i(t),i=!0;else if(this.positioned){e=Math.max(this.minWidth,e);let{clientWidth:r}=this.offsetParent,a=o?this.position.x:this.element.getBoundingClientRect().left;r&&e+a>r&&(e=r-a)}this.getWidth()!==e&&(i?(t.style.maxWidth="unset",t.style.minWidth="unset"):this.config.popup?Ze(t,e):(t.style.width=`${e}px`,t.style.flex=" unset",this.lastSize.width=typeof e=="number"?e:Number.parseFloat(e)))}offsetElement(e=0,t=0,o){var a;let{forcePopupParentAsOffsetParent:i}=this.config,r=i?this.boundaryEl:this.element;r&&((a=this.popupSvc)==null||a.positionPopup({ePopup:r,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:()=>({x:e,y:t}),postProcessCallback:o}),this.setPosition(Number.parseFloat(r.style.left),Number.parseFloat(r.style.top)))}constrainSizeToAvailableHeight(e){var o,i;if(!this.config.forcePopupParentAsOffsetParent)return;let t=()=>{let r=this.getAvailableHeight();this.element.style.setProperty("max-height",`${r}px`)};e&&this.popupSvc?((o=this.resizeObserverSubscriber)==null||o.call(this),this.resizeObserverSubscriber=Tt(this.beans,(i=this.popupSvc)==null?void 0:i.getPopupParent(),t)):(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){let{e:t,isLeft:o,isTop:i,anywhereWithin:r,topBuffer:a}=e,n=t.clientX-this.dragStartPosition.x,s=t.clientY-this.dragStartPosition.y,l=this.shouldSkipX(t,!!o,!!r,n)?0:n,c=this.shouldSkipY(t,!!i,a,s)?0:s;return{movementX:l,movementY:c}}shouldSkipX(e,t,o,i){let r=this.element.getBoundingClientRect(),a=this.offsetParent.getBoundingClientRect(),n=this.boundaryEl.getBoundingClientRect(),s=this.config.popup?this.position.x:r.left,l=s<=0&&a.left>=e.clientX||a.right<=e.clientX&&a.right<=n.right;return l?!0:(t?l=i<0&&e.clientX>s+a.left||i>0&&e.clientXn.right||i>0&&e.clientXn.right||i>0&&e.clientX=e.clientY||a.bottom<=e.clientY&&a.bottom<=n.bottom;return l?!0:(t?l=i<0&&e.clientY>s+a.top+o||i>0&&e.clientYn.bottom||i>0&&e.clientY({element:this.element.querySelector(`[data-ref=${t}Resizer]`)});this.resizerMap={topLeft:e("eTopLeft"),top:e("eTop"),topRight:e("eTopRight"),right:e("eRight"),bottomRight:e("eBottomRight"),bottom:e("eBottom"),bottomLeft:e("eBottomLeft"),left:e("eLeft")}}addResizers(){if(this.resizersAdded)return;let e=this.element;e&&(e.appendChild(Qt(Up)),this.createResizeMap(),this.resizersAdded=!0)}removeResizers(){this.resizerMap=void 0;let e=this.element.querySelector(`.${Qc}`);e==null||e.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");let{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(){let t=this.element.parentElement;return t?Array.prototype.slice.call(t.children).filter(o=>!o.classList.contains("ag-hidden")):null}getMinSizeOfSiblings(){let e=this.getSiblings()||[],t=0,o=0;for(let i of e){let r=!!i.style.flex&&i.style.flex!=="0 0 auto";if(i===this.element)continue;let a=this.minHeight||0,n=this.minWidth||0;if(r){let s=window.getComputedStyle(i);s.minHeight&&(a=Number.parseInt(s.minHeight,10)),s.minWidth&&(n=Number.parseInt(s.minWidth,10))}else a=i.offsetHeight,n=i.offsetWidth;t+=a,o+=n}return{height:t,width:o}}applySizeToSiblings(e){let t=null,o=this.getSiblings();if(o){for(let i=0;ie)}onResize(e){if(!this.isResizing||!this.currentResizer)return;let{popup:t,forcePopupParentAsOffsetParent:o}=this.config,{isTop:i,isRight:r,isBottom:a,isLeft:n}=this.currentResizer,s=r||n,l=a||i,{movementX:c,movementY:d}=this.calculateMouseMovement({e,isLeft:n,isTop:i}),g=this.position.x,u=this.position.y,h=0,p=0;if(s&&c){let f=n?-1:1,m=this.getWidth(),v=m+c*f,C=!1;n&&(h=m-v,(g+h<=0||v<=this.minWidth)&&(C=!0,h=0)),C||this.setWidth(v)}if(l&&d){let f=i?-1:1,m=this.getHeight(),v=m+d*f,C=!1;i?(p=m-v,(u+p<=0||v<=this.minHeight)&&(C=!0,p=0)):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&mthis.element.parentElement.offsetHeight&&(C=!0),C||this.setHeight(v)}this.updateDragStartPosition(e.clientX,e.clientY),((t||o)&&h||p)&&this.offsetElement(g+h,u+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(){let 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;let{x:t,y:o}=this.position,i;this.config.calculateTopBuffer&&(i=this.config.calculateTopBuffer());let{movementX:r,movementY:a}=this.calculateMouseMovement({e,isTop:!0,anywhereWithin:!0,topBuffer:i});this.offsetElement(t+r,o+a),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(window.getComputedStyle(e).position!=="static")return e;e=e.parentElement}return this.element}clearResizeListeners(){var e;for(;this.resizeListeners.length;){let t=this.resizeListeners.pop();(e=this.dragSvc)==null||e.removeDragSource(t)}}destroy(){var e;super.destroy(),this.moveElementDragListener&&((e=this.dragSvc)==null||e.removeDragSource(this.moveElementDragListener)),this.constrainSizeToAvailableHeight(!1),this.clearResizeListeners(),this.removeResizers()}},Kp=class extends jp{},E=null;function Ps(e){return typeof(e==null?void 0:e.getGui)=="function"}var Zc=class{constructor(e){this.cssClassStates={},this.getGui=e}toggleCss(e,t){var i;if(!e)return;if(e.includes(" ")){let r=(e||"").split(" ");if(r.length>1){for(let a of r)this.toggleCss(a,t);return}}this.cssClassStates[e]!==t&&e.length&&((i=this.getGui())==null||i.classList.toggle(e,t),this.cssClassStates[e]=t)}},$p=0,Lo=class extends ve{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=$p++,this.cssManager=new Zc(()=>this.eGui),this.componentSelectors=new Map((t!=null?t:[]).map(o=>[o.selector,o])),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(pc):null}applyElementsToComponent(e,t,o,i=null){if(t===void 0&&(t=this.getDataRefAttribute(e)),t){let r=this[t];if(r===E)this[t]=i!=null?i:e;else{let a=o==null?void 0:o[t];if(!this.suppressDataRefValidation&&!a)throw new Error(`data-ref: ${t} on ${this.constructor.name} with ${r}`)}}}createChildComponentsFromTags(e,t){var i;let o=[];for(let r of(i=e.childNodes)!=null?i:[])o.push(r);for(let r of o){if(!(r instanceof HTMLElement))continue;let a=this.createComponentFromElement(r,n=>{var l;let s=n.getGui();if(s)for(let c of(l=r.attributes)!=null?l:[])s.setAttribute(c.name,c.value)},t);if(a){if(a.addItems&&r.children.length){this.createChildComponentsFromTags(r,t);let n=Array.prototype.slice.call(r.children);a.addItems(n)}this.swapComponentForNode(a,e,r)}else r.childNodes&&this.createChildComponentsFromTags(r,t)}}createComponentFromElement(e,t,o){let i=e.nodeName,r=this.getDataRefAttribute(e),a=i.indexOf("AG-")===0,n=a?this.componentSelectors.get(i):null,s=null;if(n){let l=o&&r?o[r]:void 0;s=new n.component(l),s.setParentComponent(this),this.createBean(s,null,t)}else if(a)throw new Error(`selector: ${i}`);return this.applyElementsToComponent(e,r,o,s),s}swapComponentForNode(e,t,o){let i=e.getGui();t.replaceChild(i,o),t.insertBefore(document.createComment(o.nodeName),i),this.addDestroyFunc(this.destroyBean.bind(this,e))}activateTabIndex(e,t){let o=t!=null?t:this.gos.get("tabIndex");e||(e=[]),e.length||e.push(this.getGui());for(let i of e)i.setAttribute("tabindex",o.toString())}setTemplate(e,t,o){let i;typeof e=="string"||e==null?i=hn(e):i=Qt(e),this.setTemplateFromElement(i,t,o)}setTemplateFromElement(e,t,o,i=!1){if(this.eGui=e,this.suppressDataRefValidation=i,t)for(let r=0;rthis.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===Is?(this.css=[e],this.addGlobalCss()):(this.css||(this.css=[]),this.css.push(e))}addGlobalCss(){var e,t,o;if(Array.isArray(this.css)){let i="component-"+((t=(e=Object.getPrototypeOf(this))==null?void 0:e.constructor)==null?void 0:t.name);for(let r of(o=this.css)!=null?o:[])this.beans.environment.addGlobalCSS(r,i)}this.css=Is}},Is=Symbol(),_=class extends Lo{},_r,Ur,jr,Kr,Ia,Ta,$r;function zt(){return _r===void 0&&(_r=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),_r}function Mo(){return Ur===void 0&&(Ur=/(firefox)/i.test(navigator.userAgent)),Ur}function Jc(){return jr===void 0&&(jr=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),jr}function jt(){return Kr===void 0&&(Kr=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),Kr}function Aa(e){if(!e)return null;let t=e.tabIndex,o=e.getAttribute("tabIndex");return t===-1&&(o===null||o===""&&!Mo())?null:t.toString()}function Yp(){if($r!==void 0)return $r;if(!document.body)return-1;let e=1e6,t=Mo()?6e6:1e9,o=document.createElement("div");for(document.body.appendChild(o);;){let i=e*2;if(o.style.height=i+"px",i>t||o.clientHeight!==i)break;e=i}return o.remove(),$r=e,e}function Rn(){return Ta==null&&Xc(),Ta}function Xc(){let 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;o===0&&t.clientWidth===0&&(o=null),t.parentNode&&t.remove(),o!=null&&(Ta=o,Ia=o===0)}function ed(){return Ia==null&&Xc(),Ia}var za=!1,nr=0;function Qp(e){nr>0||(e.addEventListener("keydown",sr),e.addEventListener("mousedown",sr))}function Zp(e){nr>0||(e.removeEventListener("keydown",sr),e.removeEventListener("mousedown",sr))}function sr(e){let t=za,o=e.type==="keydown";o&&(e.ctrlKey||e.metaKey||e.altKey)||t!==o&&(za=o)}function Jp(e){let t=te(e);return Qp(t),nr++,()=>{nr--,Zp(t)}}function td(){return za}function Kt(e,t,o=!1){let i=Hu,r=sc;t&&(r+=", "+t),o&&(r+=', [tabindex="-1"]');let a=Array.prototype.slice.apply(e.querySelectorAll(i)).filter(l=>Ie(l)),n=Array.prototype.slice.apply(e.querySelectorAll(r));return n.length?((l,c)=>l.filter(d=>c.indexOf(d)===-1))(a,n):a}function Jt(e,t=!1,o=!1,i=!1){let r=Kt(e,i?".ag-tab-guard":null,o),a=t?U(r):r[0];return a?(a.focus({preventScroll:!0}),!0):!1}function no(e,t,o,i){let r=Kt(t,o?':not([tabindex="-1"])':null),a=Y(e),n;o?n=r.findIndex(l=>l.contains(a)):n=r.indexOf(a);let s=n+(i?-1:1);return s<0||s>=r.length?null:r[s]}function od(e,t=5){let o=0;for(;e&&Aa(e)===null&&++o<=t;)e=e.parentElement;return Aa(e)===null?null:e}var Xp="ag-focus-managed",id=class extends ve{constructor(e,t={isStopPropagation:()=>!1,stopPropagation:()=>{}},o={}){super(),this.eFocusable=e,this.stopPropagationCallbacks=t,this.callbacks=o,this.callbacks={shouldStopEventPropagation:()=>!1,onTabKeyDown:i=>{if(i.defaultPrevented)return;let r=no(this.beans,this.eFocusable,!1,i.shiftKey);r&&(r.focus(),i.preventDefault())},...o}}postConstruct(){let{eFocusable:e,callbacks:{onFocusIn:t,onFocusOut:o}}=this;e.classList.add(Xp),this.addKeyDownListeners(e),t&&this.addManagedElementListeners(e,{focusin:t}),o&&this.addManagedElementListeners(e,{focusout:o})}addKeyDownListeners(e){this.addManagedElementListeners(e,{keydown:t=>{if(t.defaultPrevented||this.stopPropagationCallbacks.isStopPropagation(t))return;let{callbacks:o}=this;if(o.shouldStopEventPropagation(t)){this.stopPropagationCallbacks.stopPropagation(t);return}t.key===b.TAB?o.onTabKeyDown(t):o.handleKeyDown&&o.handleKeyDown(t)}})}},rd="__ag_Grid_Stop_Propagation";function Xt(e){e[rd]=!0}function ct(e){return e[rd]===!0}var ad={isStopPropagation:ct,stopPropagation:Xt},vi=class extends id{constructor(e,t){super(e,ad,t)}},ef={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 He(e,t,o){return Zu(e,ef,t,o)}function En(e,t){let{debounceMs:o}=e;return Rr(e)?(o!=null&&k(71),0):o!=null?o:t}function Rr(e){var t,o;return((o=(t=e.buttons)==null?void 0:t.indexOf("apply"))!=null?o:-1)>=0}function nd(e,t,o,i){let r=He(e,o);if(typeof t=="function"){let a=He(e,i);r=t({filterOptionKey:i,filterOption:a,placeholder:r})}else typeof t=="string"&&(r=t);return r}var tf=class extends _{constructor(e,t){super(),this.filterNameKey=e,this.cssIdentifier=t,this.applyActive=!1,this.debouncePending=!1,this.defaultDebounceMs=0}postConstruct(){let e={tag:"div",cls:`ag-filter-body-wrapper ag-${this.cssIdentifier}-body-wrapper`,children:[this.createBodyTemplate()]};this.setTemplate(e,this.getAgComponents()),this.createManagedBean(new vi(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=this.createBean(new Kp(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}))}handleKeyDown(e){}init(e){let t=e;this.setParams(t),this.setModelIntoUi(t.state.model,!0).then(()=>this.updateUiVisibility())}areStatesEqual(e,t){return e===t}refresh(e){let t=e,o=this.params;this.params=t;let{source:i,state:r,additionalEventAttributes:a}=t;i==="colDef"&&this.updateParams(t,o);let n=this.state;this.state=r;let s=a==null?void 0:a.fromAction;return(s&&s!=="apply"||r.model!==n.model||!this.areStatesEqual(r.state,n.state))&&this.setModelIntoUi(r.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=Rr(e),this.setupApplyDebounced()}doesFilterPass(e){k(283);let{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 k(284),this.params.model!=null}setupApplyDebounced(){let e=En(this.params,this.defaultDebounceMs),t=re(this,this.checkApplyDebounce.bind(this),e);this.applyDebounced=()=>{this.debouncePending=!0,t()}}checkApplyDebounce(){this.debouncePending&&(this.debouncePending=!1,this.doApplyModel())}getModel(){return k(285),this.params.model}setModel(e){k(286);let{beans:t,params:o}=this;return t.colFilter.setModelForColumnLegacy(o.column,e)}applyModel(e="api"){return this.doApplyModel()}canApply(e){return!0}doApplyModel(e){let{params:t,state:{valid:o=!0,model:i}}=this;if(!o)return!1;let r=!this.areModelsEqual(t.model,i);return r&&t.onAction("apply",e),r}onNewRowsLoaded(){}onUiChanged(e,t=!1){this.updateUiVisibility();let o=this.getModelFromUi(),i={model:o,state:this.getState(),valid:this.canApply(o)};this.state=i;let{params:r,gos:a,eventSvc:n,applyActive:s}=this;r.onStateChange(i),r.onUiChange(this.getUiChangeEventParams()),a.get("enableFilterHandlers")||n.dispatchEvent({type:"filterModified",column:r.column,filterInstance:this}),i.valid&&(e!=null||(e=s?void 0:"debounce"),e==="immediately"?this.doApplyModel({afterFloatingFilter:t,afterDataChange:!1}):e==="debounce"&&this.applyDebounced())}getState(){}getUiChangeEventParams(){}afterGuiAttached(e){this.lastContainerType=e==null?void 0:e.container,this.refreshFilterResizer(e==null?void 0:e.container)}refreshFilterResizer(e){let{positionableFeature:t,gos:o}=this;if(!t)return;let i=e==="floatingFilter"||e==="columnFilter";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(){var e;this.checkApplyDebounce(),(e=this.positionableFeature)==null||e.constrainSizeToAvailableHeight(!1)}destroy(){this.positionableFeature=this.destroyBean(this.positionableFeature),super.destroy()}translate(e,t){return He(this,e,t)}getPositionableElement(){return this.getGui()}areModelsEqual(e,t){return e===t||e==null&&t==null?!0:e==null||t==null?!1:this.areNonNullModelsEqual(e,t)}};var Fn=class extends Lo{isPopup(){return!0}setParentComponent(e){e.addCss("ag-has-popup"),super.setParentComponent(e)}destroy(){let e=this.parentComponent;(e==null?void 0:e.isAlive())&&e.getGui().classList.remove("ag-has-popup"),super.destroy()}},Er=class extends Fn{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()}};function ot(e){let t=e.rowModel;return t.getType()==="clientSide"?t:void 0}function Fr(e){let t=e.rowModel;return t.getType()==="infinite"?t:void 0}function of(e){let t=e.rowModel;return t.getType()==="serverSide"?t:void 0}var Ts="row-group-",Dn="t-",Mn="b-",rf=0,Mt=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.childrenAfterGroup=null,this.childrenAfterFilter=null,this.childrenAfterAggFilter=null,this.childrenAfterSort=null,this.allChildrenCount=null,this.childrenMapped=null,this.treeParent=null,this.treeNodeFlags=0,this._expanded=void 0,this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=rf++,this.alreadyRendered=!1,this.formulaRowIndex=null,this.hovered=!1,this.__selected=!1,this.beans=e}get groupData(){var t,o,i;let e=this._groupData;return e!==void 0?e:this.footer?(t=this.sibling)==null?void 0:t.groupData:(i=(o=this.beans.groupStage)==null?void 0:o.loadGroupData(this))!=null?i:null}set groupData(e){this._groupData=e}get primaryRow(){let e=this.footer&&this.sibling?this.sibling:this,{pinnedSibling:t}=e;return t&&e.rowPinned&&(e=t,e.footer&&e.sibling&&(e=e.sibling)),e}get allLeafChildren(){var t,o,i;let e=this._leafs;return e===void 0?(i=(o=(t=this.beans.groupStage)==null?void 0:t.loadLeafs)==null?void 0:o.call(t,this))!=null?i:null:e}set allLeafChildren(e){this._leafs=e}get expanded(){let e=this.beans.expansionSvc;return e?e.isExpanded(this):this.level===-1?!0:!!this._expanded}set expanded(e){this._expanded=e}setData(e){this.setDataCommon(e,!1)}updateData(e){this.setDataCommon(e,!0)}setDataCommon(e,t){var s,l,c;let{valueCache:o,eventSvc:i}=this.beans,r=this.data;this.data=e,o==null||o.onDataChanged(),this.updateDataOnDetailNode(),this.resetQuickFilterAggregateText();let a=this.createDataChangedEvent(e,r,t);if((s=this.__localEventService)==null||s.dispatchEvent(a),this.sibling){this.sibling.data=e;let d=this.sibling.createDataChangedEvent(e,r,t);(l=this.sibling.__localEventService)==null||l.dispatchEvent(d)}i.dispatchEvent({type:"rowNodeDataChanged",node:this});let n=this.pinnedSibling;n&&(n.data=e,(c=n.__localEventService)==null||c.dispatchEvent(n.createDataChangedEvent(e,r,t)),i.dispatchEvent({type:"rowNodeDataChanged",node:n}))}updateDataOnDetailNode(){let 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 this.rowIndex==null?(W(13),null):this.rowPinned==="top"?Dn+this.rowIndex:this.rowPinned==="bottom"?Mn+this.rowIndex:this.rowIndex.toString()}setDataAndId(e,t){var n,s;let{selectionSvc:o}=this.beans,i=(n=o==null?void 0:o.createDaemonNode)==null?void 0:n.call(o,this),r=this.data;this.data=e,this.updateDataOnDetailNode(),this.setId(t),o&&(o.updateRowSelectable(this),o.syncInRowNode(this,i));let a=this.createDataChangedEvent(e,r,!1);(s=this.__localEventService)==null||s.dispatchEvent(a)}setId(e){var o,i;let t=Do(this.beans.gos);if(t)if(this.data){let r=(i=(o=this.parent)==null?void 0:o.getRoute())!=null?i:[];this.id=t({data:this.data,parentKeys:r.length>0?r:void 0,level:this.level,rowPinned:this.rowPinned}),this.id.startsWith(Ts)&&W(14,{groupPrefix:Ts})}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");let t=e!==null;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){var i;(i=this.beans.expansionSvc)==null||i.setExpanded(this,e,t,o)}setDataValue(e,t,o){var d,g;let{colModel:i,valueSvc:r,gos:a,editSvc:n}=this.beans;if(e==null)return!1;let s=(d=i.getCol(e))!=null?d:i.getColDefCol(e);if(!s)return!1;if(!this.group){let u=s.getColDef();u.pivotValueColumn&&(s=u.pivotValueColumn)}let l=r.getValueForDisplay({column:s,node:this,from:"data"}).value;if(a.get("readOnlyEdit")){let{beans:{eventSvc:u},data:h,rowIndex:p,rowPinned:f}=this;return u.dispatchEvent({type:"cellEditRequest",event:null,rowIndex:p,rowPinned:f,column:s,colDef:s.colDef,data:h,node:this,oldValue:l,newValue:t,value:t,source:o}),!1}if(o!=="data"&&n&&!n.committing){let u=n.setDataValue({rowNode:this,column:s},t,o);if(u!=null)return u}let c=r.setValue(this,s,t,o);return this.dispatchCellChangedEvent(s,t,l),c&&((g=this.pinnedSibling)==null||g.dispatchCellChangedEvent(s,t,l)),c}getDataValue(e,t="data"){var c;let{colModel:o,valueSvc:i,formula:r}=this.beans;if(e==null)return;let a=(c=o.getCol(e))!=null?c:o.getColDefCol(e);if(!a)return;let n=t==="data-raw",s=n||t==="value"?"data":t,l=i.getValue(a,this,s,n);if(!n&&(r&&a.isAllowFormula()&&r.isFormula(l)&&(l=r.resolveValue(a,this)),t!=="data"&&a.getAggFunc()&&typeof l=="object"&&l!=null)){if(typeof l.toNumber=="function")return l.toNumber();if("value"in l)return l.value}return l}updateHasChildren(){var o;let e=this.group&&!this.footer||!!((o=this.childrenAfterGroup)!=null&&o.length),{rowChildrenSvc:t}=this.beans;t&&(e=t.getHasChildrenValue(this)),e!==this.__hasChildren&&(this.__hasChildren=!!e,this.dispatchRowEvent("hasChildrenChanged"))}hasChildren(){return this.__hasChildren==null&&this.updateHasChildren(),this.__hasChildren}dispatchCellChangedEvent(e,t,o){var r;let i={type:"cellChanged",node:this,column:e,newValue:t,oldValue:o};(r=this.__localEventService)==null||r.dispatchEvent(i)}resetQuickFilterAggregateText(){this.quickFilterAggregateText=null}isExpandable(){var e,t;return(t=(e=this.beans.expansionSvc)==null?void 0:e.isExpandable(this))!=null?t:!1}isSelected(){if(this.footer)return this.sibling.isSelected();let e=this.rowPinned&&this.pinnedSibling;return e?e.isSelected():this.__selected}depthFirstSearch(e){let t=this.childrenAfterGroup;if(t)for(let o=0,i=t.length;o{let o=new Mt(t);for(let i of Object.keys(e))nf.has(i)||(o[i]=e[i]);return o.oldRowTop=null,o},La=(e,t,o)=>{if(!o)return;let i=o.rowIndex;if(i==null)return;i+=t;let r=e.getRowCount();for(;i>=0&&i{var d,g,u,h;return(t==null?void 0:t.compareRowNodes(i,l,c))||((g=(d=l.pinnedSibling)==null?void 0:d.rowIndex)!=null?g:0)-((h=(u=c.pinnedSibling)==null?void 0:u.rowIndex)!=null?h:0)}),!a)return;let n=Ic(o);n==="bottom"||n==="pinnedBottom"?this.order.push(a):this.order.unshift(a)}hide(e){let{all:t,visible:o}=this,i=o.size;return t.forEach(r=>e(r)?o.delete(r):o.add(r)),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 sd(e){var o;if(e.level===-1)return!0;let t=e.parent;return(o=t==null?void 0:t.childrenAfterSort)!=null&&o.some(i=>i==e)?sd(t):!1}function Yr(e,t){let{gos:o,rowModel:i,filterManager:r}=e;return mi(o,i)?!i.getRowNode(t.id):r!=null&&r.isAnyFilterPresent()?!sd(t):o.get("pivotMode")?!t.group:!1}function lf(e){return!!e.footer&&e.level===-1}function cf(e){return!!e.pinnedSibling&&lf(e.pinnedSibling)}function df(e){var o;let t=e.findIndex(cf);if(t>-1)return(o=e.splice(t,1))==null?void 0:o[0]}var zs=class extends S{constructor(){super(...arguments),this.csrm=null}postConstruct(){var r;let{gos:e,beans:t}=this;this.top=new As(t,"top"),this.bottom=new As(t,"bottom"),this.csrm=(r=ot(t))!=null?r:null;let o=a=>Yr(t,a.pinnedSibling),i=()=>{let a=e.get("isRowPinned");a&&e.get("enableRowPinning")&&t.rowModel.forEachNode(n=>this.pinRow(n,a(n)),!0),this.refreshRowPositions(),this.dispatchRowPinnedEvents()};this.addManagedEventListeners({stylesChanged:this.onGridStylesChanges.bind(this),modelUpdated:({keepRenderedRows:a})=>{this.tryToEmptyQueues(),this.pinGrandTotalRow();let n=!1;this.forContainers(l=>{n||(n=l.hide(o))});let s=this.refreshRowPositions();(!a||s||n)&&this.dispatchRowPinnedEvents()},columnRowGroupChanged:()=>{this.forContainers(uf),this.refreshRowPositions()},rowNodeDataChanged:({node:a})=>{var l;let n=e.get("isRowPinnable");((l=n==null?void 0:n(a))!=null?l:!0)||this.pinRow(a,null)},firstDataRendered:i}),this.addManagedPropertyListener("pivotMode",()=>{this.forContainers(a=>a.hide(o)),this.dispatchRowPinnedEvents()}),this.addManagedPropertyListener("grandTotalRow",({currentValue:a})=>{this._grandTotalPinned=a==="pinnedBottom"?"bottom":a==="pinnedTop"?"top":null}),this.addManagedPropertyListener("isRowPinned",i)}destroy(){this.reset(!1),super.destroy()}reset(e=!0){this.forContainers(t=>{let o=[];t.forEach(i=>o.push(i)),o.forEach(i=>this.pinRow(i,null)),t.clear()}),e&&this.dispatchRowPinnedEvents()}pinRow(e,t,o){var n,s,l;if(t!=null&&e.destroyed)return;if(e.footer){let c=e.level;if(c>-1)return;if(c===-1){this._grandTotalPinned=t,(n=this.csrm)==null||n.reMapRows();return}}let i=(l=e.rowPinned)!=null?l:(s=e.pinnedSibling)==null?void 0:s.rowPinned;if(i!=null&&t!=null&&t!=i){let c=e.rowPinned?e:e.pinnedSibling,d=e.rowPinned?e.pinnedSibling:e;this.pinRow(c,null,o),this.pinRow(d,t,o);return}let a=o&&hf(this.beans,e,o);if(a){a.forEach(c=>this.pinRow(c,t));return}if(t==null){let c=e.rowPinned?e:e.pinnedSibling,d=this.findPinnedRowNode(c);if(!d)return;d.delete(c);let g=c.pinnedSibling;Qr(c),this.refreshRowPositions(t),this.dispatchRowPinnedEvents(g)}else{let c=Ls(this.beans,e,t),d=this.getContainer(t);d.add(c),Yr(this.beans,e)&&d.hide(g=>Yr(this.beans,g.pinnedSibling)),this.refreshRowPositions(t),this.dispatchRowPinnedEvents(e)}}isManual(){return!0}isEmpty(e){return this.getContainer(e).size()===0}isRowsToRender(e){return!this.isEmpty(e)}ensureRowHeightsValid(){let e=!1,t=0,o=i=>{if(i.rowHeightEstimated){let r=Ft(this.beans,i);i.setRowTop(t),i.setRowHeight(r.height),t+=r.height,e=!0}};return this.bottom.forEach(o),t=0,this.top.forEach(o),this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),e}getPinnedTopTotalHeight(){return Os(this.top)}getPinnedBottomTotalHeight(){return Os(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(){let e=t=>{let o=[];return this.forEachPinnedRow(t,i=>{var a;let r=(a=i.pinnedSibling)==null?void 0:a.id;r!=null&&o.push(r)}),o};return{top:e("top"),bottom:e("bottom")}}setPinnedState(e){this.forContainers((t,o)=>{for(let i of e[o]){let r=this.beans.rowModel.getRowNode(i);r?this.pinRow(r,o):t.queue(i)}})}getGrandTotalPinned(){return this._grandTotalPinned}setGrandTotalPinned(e){this._grandTotalPinned=e}tryToEmptyQueues(){this.forContainers((e,t)=>{let o=new Set;e.forEachQueued(i=>{let r=this.beans.rowModel.getRowNode(i);r&&o.add(r)});for(let i of o)e.unqueue(i.id),this.pinRow(i,t)})}pinGrandTotalRow(){var n;let{csrm:e,beans:t,_grandTotalPinned:o}=this;if(!e)return;let i=(n=e.rootNode)==null?void 0:n.sibling;if(!i)return;let r=i.pinnedSibling,a=r&&this.findPinnedRowNode(r);if(o){if(a&&a.floating!==o&&(Qr(r),a.delete(r)),!a||a.floating!==o){let s=Ls(t,i,o);this.getContainer(o).add(s)}}else{if(!a)return;Qr(r),a.delete(r)}}onGridStylesChanges(e){e.rowHeightChanged&&this.forContainers(t=>t.forEach(o=>o.setRowHeight(o.rowHeight,!0)))}getContainer(e){return e==="top"?this.top:this.bottom}findPinnedRowNode(e){if(this.top.has(e))return this.top;if(this.bottom.has(e))return this.bottom}refreshRowPositions(e){let t=i=>gf(this.beans,i);if(e)return t(this.getContainer(e));let o=!1;return this.forContainers(i=>{let r=t(i);o||(o=r)}),o}forContainers(e){e(this.top,"top"),e(this.bottom,"bottom")}dispatchRowPinnedEvents(e){this.eventSvc.dispatchEvent({type:"pinnedRowsChanged"}),e==null||e.dispatchRowEvent("rowPinned")}};function gf(e,t){let o=0,i=!1;return t.forEach((r,a)=>{if(i||(i=r.rowTop!==o),r.setRowTop(o),r.rowHeightEstimated||r.rowHeight==null){let n=Ft(e,r).height;i||(i=r.rowHeight!==n),r.setRowHeight(n)}r.setRowIndex(a),o+=r.rowHeight}),i}function Ls(e,t,o){if(t.pinnedSibling)return t.pinnedSibling;let i=sf(t,e);i.setRowTop(null),i.setRowIndex(null),i.rowPinned=o;let r=o==="top"?Dn:Mn;return i.id=`${r}${o}-${t.id}`,i.pinnedSibling=t,t.pinnedSibling=i,i}function Qr(e){if(!e.pinnedSibling)return;e.rowPinned=null,e._destroy(!1);let t=e.pinnedSibling;e.pinnedSibling=void 0,t&&(t.pinnedSibling=void 0,t.rowPinned=null)}function uf(e){let t=new Set;e.forEach(o=>{o.group&&t.add(o)}),t.forEach(o=>e.delete(o))}function hf(e,t,o){var a,n;let{rowSpanSvc:i}=e,r=(a=o&&(i==null?void 0:i.isCellSpanning(o,t)))!=null?a:!1;if(o&&r)return(n=i==null?void 0:i.getCellSpan(o,t))==null?void 0:n.spannedNodes}function Os(e){let t=e.size();if(t===0)return 0;let o=e.getByIndex(t-1);return o===void 0?0:o.rowTop+o.rowHeight}var Hs=class extends S{constructor(){super(...arguments),this.nextId=0,this.pinnedTopRows={cache:{},order:[]},this.pinnedBottomRows={cache:{},order:[]}}postConstruct(){let e=this.gos;this.setPinnedRowData(e.get("pinnedTopRowData"),"top"),this.setPinnedRowData(e.get("pinnedBottomRowData"),"bottom"),this.addManagedPropertyListener("pinnedTopRowData",t=>this.setPinnedRowData(t.currentValue,"top")),this.addManagedPropertyListener("pinnedBottomRowData",t=>this.setPinnedRowData(t.currentValue,"bottom")),this.addManagedEventListeners({stylesChanged:this.onGridStylesChanges.bind(this)})}reset(){}isEmpty(e){return this.getCache(e).order.length===0}isRowsToRender(e){return!this.isEmpty(e)}isManual(){return!1}pinRow(e,t){}onGridStylesChanges(e){if(e.rowHeightChanged){let t=o=>{o.setRowHeight(o.rowHeight,!0)};No(this.pinnedBottomRows,t),No(this.pinnedTopRows,t)}}ensureRowHeightsValid(){let e=!1,t=0,o=i=>{if(i.rowHeightEstimated){let r=Ft(this.beans,i);i.setRowTop(t),i.setRowHeight(r.height),t+=r.height,e=!0}};return No(this.pinnedBottomRows,o),t=0,No(this.pinnedTopRows,o),this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),e}setPinnedRowData(e,t){this.updateNodesFromRowData(e,t),this.eventSvc.dispatchEvent({type:"pinnedRowDataChanged"})}updateNodesFromRowData(e,t){var d,g;let o=this.getCache(t);if(e===void 0){o.order.length=0,o.cache={};return}let i=Do(this.gos),r=t==="top"?Dn:Mn,a=new Set(o.order),n=[],s=new Set,l=0,c=-1;for(let u of e){let h=(d=i==null?void 0:i({data:u,level:0,rowPinned:t}))!=null?d:r+this.nextId++;if(s.has(h)){k(96,{id:h,data:u});continue}c++,s.add(h),n.push(h);let p=Jo(o,h);if(p!==void 0)p.data!==u&&p.updateData(u),l+=this.setRowTopAndRowIndex(p,l,c),a.delete(h);else{let f=new Mt(this.beans);f.id=h,f.data=u,f.rowPinned=t,l+=this.setRowTopAndRowIndex(f,l,c),o.cache[h]=f,o.order.push(h)}}for(let u of a)(g=Jo(o,u))==null||g.clearRowTopAndRowIndex(),delete o.cache[u];o.order=n}setRowTopAndRowIndex(e,t,o){return e.setRowTop(t),e.setRowHeight(Ft(this.beans,e).height),e.setRowIndex(o),e.rowHeight}getPinnedTopTotalHeight(){return Bs(this.pinnedTopRows)}getPinnedBottomTotalHeight(){return Bs(this.pinnedBottomRows)}getPinnedTopRowCount(){return Ha(this.pinnedTopRows)}getPinnedBottomRowCount(){return Ha(this.pinnedBottomRows)}getPinnedTopRow(e){return Oa(this.pinnedTopRows,e)}getPinnedBottomRow(e){return Oa(this.pinnedBottomRows,e)}getPinnedRowById(e,t){return Jo(this.getCache(t),e)}forEachPinnedRow(e,t){return No(this.getCache(e),t)}getCache(e){return e==="top"?this.pinnedTopRows:this.pinnedBottomRows}getPinnedState(){return{top:[],bottom:[]}}setPinnedState(){}getGrandTotalPinned(){}setGrandTotalPinned(){}};function Bs(e){let t=Ha(e);if(t===0)return 0;let o=Oa(e,t-1);return o===void 0?0:o.rowTop+o.rowHeight}function Jo(e,t){return e.cache[t]}function Oa(e,t){return Jo(e,e.order[t])}function No(e,t){e.order.forEach((o,i)=>{let r=Jo(e,o);r&&t(r,i)})}function Ha(e){return e.order.length}var pf=class extends S{constructor(){super(...arguments),this.beanName="pinnedRowModel"}postConstruct(){let{gos:e}=this,t=()=>{let o=e.get("enableRowPinning"),i=Ic(e),a=!!o||(i==="pinnedBottom"||i==="pinnedTop"),n=a?this.inner instanceof Hs:this.inner instanceof zs;this.inner&&n&&this.destroyBean(this.inner),(n||!this.inner)&&(this.inner=this.createManagedBean(a?new zs:new Hs))};this.addManagedPropertyListeners(["enableRowPinning","grandTotalRow"],t),t()}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()}};var ff=500,mf=550,ki,vf=e=>{if(!ki)ki=new WeakSet;else if(ki.has(e))return!1;return ki.add(e),!0},Vt=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(o===null)return;this.eventSvc=o=new Yt;let i=this.onTouchStart.bind(this);this.startListener=i,this.eElement.addEventListener("touchstart",i,{passive:!0})}o.addEventListener(e,t)}removeEventListener(e,t){var o;(o=this.eventSvc)==null||o.removeEventListener(e,t)}onTouchStart(e){if(this.touchStart||!vf(e))return;let t=e.touches[0];this.touchStart=t;let o=this.handlers;if(!o.length){let i=this.eElement,r=i.ownerDocument,a=this.onTouchMove.bind(this),n=this.onTouchEnd.bind(this),s=this.onTouchCancel.bind(this),l={passive:!0},c={passive:!1};Oi(o,[i,"touchmove",a,l],[r,"touchcancel",s,l],[r,"touchend",n,c],[r,"contextmenu",yt,c])}this.clearLongPress(),this.longPressTimer=window.setTimeout(()=>{var i;this.longPressTimer=0,this.touchStart===t&&!this.moved&&(this.moved=!0,(i=this.eventSvc)==null||i.dispatchEvent({type:"longTap",touchStart:t,touchEvent:e}))},mf)}onTouchMove(e){let{moved:t,touchStart:o}=this;if(!t&&o){let i=mo(o,e.touches);i&&!fc(i,o,4)&&(this.clearLongPress(),this.moved=!0)}}onTouchEnd(e){var o;let t=this.touchStart;!t||!mo(t,e.changedTouches)||(this.moved||((o=this.eventSvc)==null||o.dispatchEvent({type:"tap",touchStart:t}),this.checkDoubleTap(t)),this.preventClick&&yt(e),this.cancel())}onTouchCancel(e){let t=this.touchStart;!t||!mo(t,e.changedTouches)||(this.lastTapTime=null,this.cancel())}checkDoubleTap(e){var i;let t=Date.now(),o=this.lastTapTime;o&&t-o>ff&&((i=this.eventSvc)==null||i.dispatchEvent({type:"doubleTap",touchStart:e}),t=null),this.lastTapTime=t}cancel(){this.clearLongPress(),mn(this.handlers),this.touchStart=null}clearLongPress(){window.clearTimeout(this.longPressTimer),this.longPressTimer=0,this.moved=!1}destroy(){let e=this.startListener;e&&(this.startListener=null,this.eElement.removeEventListener("touchstart",e)),this.cancel(),this.eElement=null,this.eventSvc=null}};var Cf=1,wf=class{constructor(e){this.beans={},this.createdBeans=[],this.destroyed=!1,this.instanceId=Cf++,e!=null&&e.beanClasses&&(this.beanDestroyComparator=e.beanDestroyComparator,this.init(e))}init(e){var t;this.id=e.id,this.beans.context=this,this.destroyCallback=e.destroyCallback;for(let o of Object.keys(e.providedBeanInstances))this.beans[o]=e.providedBeanInstances[o];for(let o of e.beanClasses){let i=new o;i.beanName?this.beans[i.beanName]=i:console.error(`Bean ${o.name} is missing beanName`),this.createdBeans.push(i)}for(let o of(t=e.derivedBeans)!=null?t:[]){let{beanName:i,bean:r}=o(this);this.beans[i]=r,this.createdBeans.push(r)}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){var i,r,a,n;let o=this.beans;for(let s of e)(i=s.preWireBeans)==null||i.call(s,o),(r=s.wireBeans)==null||r.call(s,o);for(let s of e)(a=s.preConstruct)==null||a.call(s);t&&e.forEach(t);for(let s of e)(n=s.postConstruct)==null||n.call(s)}getBeans(){return this.beans}getBean(e){return this.beans[e]}getId(){return this.id}destroy(){var t;if(this.destroyed)return;this.destroyed=!0;let e=this.getBeanInstances();this.beanDestroyComparator&&e.sort(this.beanDestroyComparator),this.destroyBeans(e),this.beans={},this.createdBeans=[],(t=this.destroyCallback)==null||t.call(this)}destroyBean(e){var t;(t=e==null?void 0:e.destroy)==null||t.call(e)}destroyBeans(e){if(e)for(let t=0;t[e,t]));function Sf(e,t){var r,a;let o=(r=e.beanName?Vs[e.beanName]:void 0)!=null?r:Number.MAX_SAFE_INTEGER,i=(a=t.beanName?Vs[t.beanName]:void 0)!=null?a:Number.MAX_SAFE_INTEGER;return o-i}function xf(e,t){return(e==null?void 0:e.beanName)==="gridDestroySvc"?-1:(t==null?void 0:t.beanName)==="gridDestroySvc"?1:0}function kf(e){let{rowIndex:t,rowPinned:o,column:i}=e;return`${t}.${o==null?"null":o}.${i.getId()}`}function Pn(e,t){let o=e.column===t.column,i=e.rowPinned===t.rowPinned,r=e.rowIndex===t.rowIndex;return o&&i&&r}function Rf(e,t){switch(e.rowPinned){case"top":if(t.rowPinned!=="top")return!0;break;case"bottom":if(t.rowPinned!=="bottom")return!1;break;default:if(M(t.rowPinned))return t.rowPinned!=="top";break}return e.rowIndexg.rowNode.rowIndex===t.rowIndex),l=s?a:n,c=(o?-1:1)*(s?-1:1),d;for(let g=0;g{if(!i.defaultPrevented&&!zf(i)&&i.key===b.TAB){let r=i.shiftKey;no(e,o,!1,r)||Po(e,r)&&i.preventDefault()}}})}function Pf(e,t){return e.ctrlsSvc.get("gridCtrl").focusInnerElement(t)}function Le(e){var t;return e.gos.get("suppressHeaderFocus")||!!((t=e.overlays)!=null&&t.exclusive)}function hi(e){var t;return e.gos.get("suppressCellFocus")||!!((t=e.overlays)!=null&&t.exclusive)}function Po(e,t,o=!1){let i=e.ctrlsSvc.get("gridCtrl"),r=i.focusNextInnerContainer(t);return r===!0?!0:r===!1?r:((o||!t&&!i.isDetailGrid()&&i.isFocusInsideGridBody())&&i.forceFocusOutOfContainer(t),!1)}function If(e,t){let o=e.focusSvc,i=o.getFocusedCell();if(i&&t&&Pn(i,t)){let{rowIndex:r,rowPinned:a,column:n}=t;ln(e)&&o.setFocusedCell({rowIndex:r,column:n,rowPinned:a,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!td()})}}function Tf(e,t){let o=e.getFocusableContainerName();return o==="gridBody"?t():cd(e,()=>Kt(e.getGui(),".ag-tab-guard").length>0)?o:null}function cd(e,t){var o,i;(o=e.setAllowFocus)==null||o.call(e,!0);try{return t()}finally{(i=e.setAllowFocus)==null||i.call(e,!1)}}var Af="__ag_Grid_Skip_Focusable_Container";function zf(e){return e[Af]===!0}function Fe(e){var t,o;return(o=(t=e.ctrlsSvc.getHeaderRowContainerCtrl())==null?void 0:t.getRowCount())!=null?o:0}function In(e){let t=[],o=e.ctrlsSvc.getHeaderRowContainerCtrls();for(let i of o){if(!i)continue;let r=i.getGroupRowCount()||0;for(let a=0;as)&&(t[a]=l)}}}return t}function Lf(e,t){let i=e.colModel.isPivotMode()?Hf(e):gd(e),r=t.getHeaderCellCtrls();for(let a of r){let{column:n}=a,s=n.getAutoHeaderHeight();s!=null&&s>i&&n.isAutoHeaderHeight()&&(i=s)}return i}function Tn(e){let o=e.colModel.isPivotMode()?Of(e):Ci(e);return e.colModel.forAllCols(i=>{let r=i.getAutoHeaderHeight();r!=null&&r>o&&i.isAutoHeaderHeight()&&(o=r)}),o}function Ci(e){var t;return(t=e.gos.get("headerHeight"))!=null?t:e.environment.getDefaultHeaderHeight()}function dd(e){var t;return(t=e.gos.get("floatingFiltersHeight"))!=null?t:Ci(e)}function gd(e){var t;return(t=e.gos.get("groupHeaderHeight"))!=null?t:Ci(e)}function Of(e){var t;return(t=e.gos.get("pivotHeaderHeight"))!=null?t:Ci(e)}function Hf(e){var t;return(t=e.gos.get("pivotGroupHeaderHeight"))!=null?t:gd(e)}function Bf(e,t){return e.headerRowIndex===t.headerRowIndex&&e.column===t.column}function Vf(e){return(e==null?void 0:e.headerRowIndex)!=null}var Nf=class extends S{setComp(e,t,o){this.comp=e,this.eGui=t;let{beans:i}=this,{headerNavigation:r,touchSvc:a,ctrlsSvc:n}=i;r&&this.createManagedBean(new vi(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();let s=this.onHeaderContextMenu.bind(this);this.addManagedElementListeners(this.eGui,{contextmenu:s}),a==null||a.mockHeaderContextMenu(this,s),n.register("gridHeaderCtrl",this)}setupHeaderHeight(){let e=this.setHeaderHeight.bind(this);e(),this.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],e),this.addManagedEventListeners({headerRowsChanged:e,columnHeaderHeightChanged:e,columnGroupHeaderHeightChanged:()=>ht(this.beans,()=>e()),stylesChanged:e,advancedFilterEnabledChanged:e})}setHeaderHeight(){var n;let{beans:e}=this,t=0,o=In(e).reduce((s,l)=>s+l,0),i=Tn(e);(n=e.filterManager)!=null&&n.hasFloatingFilters()&&(t+=dd(e)),t+=o,t+=i;let r=e.environment.getHeaderRowBorderWidth(),a=t+r;if(this.headerHeightWithBorder!==a){this.headerHeightWithBorder=a;let s=`${a}px`;this.comp.setHeightAndMinHeight(s)}this.headerHeight!==t&&(this.headerHeight=t,this.eventSvc.dispatchEvent({type:"headerHeightChanged"}))}onPivotModeChanged(e){let t=e.colModel.isPivotMode();this.comp.toggleCss("ag-pivot-on",t),this.comp.toggleCss("ag-pivot-off",!t)}onDisplayedColumnsChanged(e){let o=e.visibleCols.allCols.some(i=>i.isSpanHeaderHeight());this.comp.toggleCss("ag-header-allow-overflow",o)}onTabKeyDown(e){let t=this.gos.get("enableRtl"),o=e.shiftKey,i=o!==t?"LEFT":"RIGHT",{beans:r}=this,{headerNavigation:a,focusSvc:n}=r;(a.navigateHorizontally(i,!0,e)||!o&&n.focusOverlay(!1)||Po(r,o,!0))&&e.preventDefault()}handleKeyDown(e){let t=null,{headerNavigation:o}=this.beans;switch(e.key){case b.LEFT:t="LEFT";case b.RIGHT:{M(t)||(t="RIGHT"),o.navigateHorizontally(t,!1,e)&&e.preventDefault();break}case b.UP:t="UP";case b.DOWN:{M(t)||(t="DOWN"),o.navigateVertically(t,e)&&e.preventDefault();break}default:return}}onFocusOut(e){let{relatedTarget:t}=e,{eGui:o,beans:i}=this;!t&&o.contains(Y(i))||o.contains(t)||(i.focusSvc.focusedHeader=null)}onHeaderContextMenu(e,t,o){var n;let{menuSvc:i,ctrlsSvc:r}=this.beans;if(!e&&!o||!(i!=null&&i.isHeaderContextMenuEnabled()))return;let{target:a}=e!=null?e:t;(a===this.eGui||a===((n=r.getHeaderRowContainerCtrl())==null?void 0:n.eViewport))&&i.showHeaderContextMenu(void 0,e,o)}},An=class extends _{constructor(e,t){super(e),this.ctrl=t}getCtrl(){return this.ctrl}},Gf={tag:"div",cls:"ag-header-cell",role:"columnheader",children:[{tag:"div",ref:"eResize",cls:"ag-header-cell-resize",role:"presentation"},{tag:"div",ref:"eHeaderCompWrapper",cls:"ag-header-cell-comp-wrapper",role:"presentation"}]},Wf=class extends An{constructor(e){super(Gf,e),this.eResize=E,this.eHeaderCompWrapper=E,this.headerCompVersion=0}postConstruct(){let e=this.getGui(),t=()=>{let i=this.ctrl.getSelectAllGui();i&&(this.eResize.insertAdjacentElement("afterend",i),this.addDestroyFunc(()=>i.remove()))},o={setWidth:i=>e.style.width=i,toggleCss:(i,r)=>this.toggleCss(i,r),setUserStyles:i=>fi(e,i),setAriaSort:i=>i?Au(e,i):zu(e),setUserCompDetails:i=>this.setUserCompDetails(i),getUserCompInstance:()=>this.headerComp,refreshSelectAllGui:t,removeSelectAllGui:()=>{var i;return(i=this.ctrl.getSelectAllGui())==null?void 0:i.remove()}};this.ctrl.setComp(o,this.getGui(),this.eResize,this.eHeaderCompWrapper,void 0),t()}destroy(){this.destroyHeaderComp(),super.destroy()}destroyHeaderComp(){var e;this.headerComp&&((e=this.headerCompGui)==null||e.remove(),this.headerComp=this.destroyBean(this.headerComp),this.headerCompGui=void 0)}setUserCompDetails(e){this.headerCompVersion++;let t=this.headerCompVersion;e.newAgStackInstance().then(o=>this.afterCompCreated(t,o))}afterCompCreated(e,t){if(e!=this.headerCompVersion||!this.isAlive()){this.destroyBean(t);return}this.destroyHeaderComp(),this.headerComp=t,this.headerCompGui=t.getGui(),this.eHeaderCompWrapper.appendChild(this.headerCompGui),this.ctrl.setDragSource(this.getGui())}},qf={tag:"div",cls:"ag-header-group-cell",role:"columnheader",children:[{tag:"div",ref:"eHeaderCompWrapper",cls:"ag-header-cell-comp-wrapper",role:"presentation"},{tag:"div",ref:"eResize",cls:"ag-header-cell-resize",role:"presentation"}]},_f=class extends An{constructor(e){super(qf,e),this.eResize=E,this.eHeaderCompWrapper=E}postConstruct(){let e=this.getGui(),t=(i,r)=>r!=null?e.setAttribute(i,r):e.removeAttribute(i),o={toggleCss:(i,r)=>this.toggleCss(i,r),setUserStyles:i=>fi(e,i),setHeaderWrapperHidden:i=>{i?this.eHeaderCompWrapper.style.setProperty("display","none"):this.eHeaderCompWrapper.style.removeProperty("display")},setHeaderWrapperMaxHeight:i=>{i!=null?this.eHeaderCompWrapper.style.setProperty("max-height",`${i}px`):this.eHeaderCompWrapper.style.removeProperty("max-height"),this.eHeaderCompWrapper.classList.toggle("ag-header-cell-comp-wrapper-limited-height",i!=null)},setResizableDisplayed:i=>q(this.eResize,i),setWidth:i=>e.style.width=i,setAriaExpanded:i=>t("aria-expanded",i),setUserCompDetails:i=>this.setUserCompDetails(i),getUserCompInstance:()=>this.headerGroupComp};this.ctrl.setComp(o,e,this.eResize,this.eHeaderCompWrapper,void 0)}setUserCompDetails(e){e.newAgStackInstance().then(t=>this.afterHeaderCompCreated(t))}afterHeaderCompCreated(e){let t=()=>this.destroyBean(e);if(!this.isAlive()){t();return}let o=this.getGui(),i=e.getGui();this.eHeaderCompWrapper.appendChild(i),this.addDestroyFunc(t),this.headerGroupComp=e,this.ctrl.setDragSource(o)}},Uf={tag:"div",cls:"ag-header-cell ag-floating-filter",role:"gridcell",children:[{tag:"div",ref:"eFloatingFilterBody",role:"presentation"},{tag:"div",ref:"eButtonWrapper",cls:"ag-floating-filter-button ag-hidden",role:"presentation",children:[{tag:"button",ref:"eButtonShowMainFilter",cls:"ag-button ag-floating-filter-button-button",attrs:{type:"button",tabindex:"-1"}}]}]},jf=class extends An{constructor(e){super(Uf,e),this.eFloatingFilterBody=E,this.eButtonWrapper=E,this.eButtonShowMainFilter=E}postConstruct(){let e=this.getGui(),t={toggleCss:(o,i)=>this.toggleCss(o,i),setUserStyles:o=>fi(e,o),addOrRemoveBodyCssClass:(o,i)=>this.eFloatingFilterBody.classList.toggle(o,i),setButtonWrapperDisplayed:o=>q(this.eButtonWrapper,o),setCompDetails:o=>this.setCompDetails(o),getFloatingFilterComp:()=>this.compPromise,setWidth:o=>e.style.width=o,setMenuIcon:o=>this.eButtonShowMainFilter.appendChild(o)};this.ctrl.setComp(t,e,this.eButtonShowMainFilter,this.eFloatingFilterBody,void 0)}setCompDetails(e){if(!e){this.destroyFloatingFilterComp(),this.compPromise=null;return}this.compPromise=e.newAgStackInstance(),this.compPromise.then(t=>this.afterCompCreated(t))}destroy(){this.destroyFloatingFilterComp(),super.destroy()}destroyFloatingFilterComp(){var e;(e=this.floatingFilterComp)==null||e.getGui().remove(),this.floatingFilterComp=this.destroyBean(this.floatingFilterComp)}afterCompCreated(e){var t;if(e){if(!this.isAlive()){this.destroyBean(e);return}this.destroyFloatingFilterComp(),this.floatingFilterComp=e,this.eFloatingFilterBody.appendChild(e.getGui()),(t=e.afterGuiAttached)==null||t.call(e)}}},Kf=class extends _{constructor(e){super({tag:"div",cls:e.headerRowClass,role:"row"}),this.ctrl=e,this.headerComps={}}postConstruct(){this.getGui().setAttribute("tabindex",String(this.gos.get("tabIndex"))),ri(this.getGui(),this.ctrl.getAriaRowIndex());let t={setHeight:o=>this.getGui().style.height=o,setTop:o=>this.getGui().style.top=o,setHeaderCtrls:(o,i)=>this.setHeaderCtrls(o,i),setWidth:o=>this.getGui().style.width=o,setRowIndex:o=>ri(this.getGui(),o)};this.ctrl.setComp(t,void 0)}destroy(){this.setHeaderCtrls([],!1),super.destroy()}setHeaderCtrls(e,t){if(!this.isAlive())return;let o=this.headerComps;this.headerComps={};for(let i of e){let r=i.instanceId,a=o[r];delete o[r],a==null&&(a=this.createHeaderComp(i),this.getGui().appendChild(a.getGui())),this.headerComps[r]=a}if(Object.values(o).forEach(i=>{i.getGui().remove(),this.destroyBean(i)}),t){let i=Object.values(this.headerComps);i.sort((a,n)=>{let s=a.getCtrl().column.getLeft(),l=n.getCtrl().column.getLeft();return s-l});let r=i.map(a=>a.getGui());uc(this.getGui(),r)}}createHeaderComp(e){let t;switch(this.ctrl.type){case"group":t=new _f(e);break;case"filter":t=new jf(e);break;default:t=new Wf(e);break}return this.createBean(t),t.setParentComponent(this),t}},zn=class extends S{constructor(e,t=!1){super(),this.callback=e,this.addSpacer=t}postConstruct(){let 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(){let e=se(this.gos,"print"),{visibleCols:t,scrollVisibleSvc:o}=this.beans,i=t.bodyWidth,r=t.getColsLeftWidth(),a=t.getDisplayedColumnsRightWidth(),n;e?n=i+r+a:(n=i,this.addSpacer&&(this.gos.get("enableRtl")?r:a)===0&&o.verticalScrollShowing&&(n+=o.getScrollbarWidth())),this.callback(n)}};function wi(e,t,o){return o&&e.addDestroyFunc(()=>t.destroyBean(o)),o!=null?o:e}var Ln=class extends S{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(){let{beans:e,colsSpanning:t}=this;return e.gos.get("enableRtl")&&t?U(t):this.columnOrGroup}postConstruct(){let e=this.onLeftChanged.bind(this);this.addManagedListeners(this.columnOrGroup,{leftChanged:e}),this.setLeftFirstTime(),this.addManagedEventListeners({displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}setLeftFirstTime(){let{gos:e,colAnimation:t}=this.beans,o=e.get("suppressColumnMoveAnimation"),i=M(this.columnOrGroup.getOldLeft());(t==null?void 0:t.isActive())&&i&&!o?this.animateInLeft():this.onLeftChanged()}animateInLeft(){let 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(){let e=this.getColumnOrGroup(),t=e.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(e,t),this.setLeft(this.actualLeft)}modifyLeftForPrintLayout(e,t){let{gos:o,visibleCols:i}=this.beans;if(!se(o,"print")||e.getPinned()==="left")return t;let a=i.getColsLeftWidth();if(e.getPinned()==="right"){let n=i.bodyWidth;return a+n+t}return a+t}setLeft(e){if(M(e)&&(this.eCell.style.left=`${e}px`),X(this.columnOrGroup)){let t=this.columnOrGroup.getLeafColumns();if(!t.length)return;t.length>1&&Tu(this.ariaEl,t.length)}}},$f="ag-column-first",Yf="ag-column-last";function ud(e,t,o,i){return Q(e)?[]:Zf(e.headerClass,e,t,o,i)}function hd(e,t,o){e.toggleCss($f,o.isColAtEdge(t,"first")),e.toggleCss(Yf,o.isColAtEdge(t,"last"))}function Qf(e,t,o,i){return O(t,{colDef:e,column:o,columnGroup:i})}function Zf(e,t,o,i,r){if(Q(e))return[];let a;if(typeof e=="function"){let n=Qf(t,o,i,r);a=e(n)}else a=e;return typeof a=="string"?[a]:Array.isArray(a)?[...a]:[]}var Jf=0,pd="headerCtrl",On=class extends S{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()+"-"+Jf++}postConstruct(){let e=this.refreshTabIndex.bind(this);this.addManagedPropertyListeners(["suppressHeaderFocus"],e),this.addManagedEventListeners({overlayExclusiveChanged:e})}setComp(e,t,o,i,r){var a;t.setAttribute("col-id",this.column.colIdSanitised),this.wireComp(e,t,o,i,r),this.reAttemptToFocus&&(this.reAttemptToFocus=!1,this.focus((a=this.lastFocusEvent)!=null?a:void 0))}shouldStopEventPropagation(e){let{headerRowIndex:t,column:o}=this.beans.focusSvc.focusedHeader,i=o.getDefinition(),r=i==null?void 0:i.suppressHeaderKeyboardEvent;if(!M(r))return!1;let a=O(this.gos,{colDef:i,column:o,headerRowIndex:t,event:e});return!!r(a)}getWrapperHasFocus(){return Y(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(){let e=this.column.getDefinition();if(!e)return;let{headerStyle:t}=e,o;if(typeof t=="function"){let i=this.getHeaderClassParams();o=t(i)}else o=t;o&&this.comp.setUserStyles(o)}onGuiFocus(){this.eventSvc.dispatchEvent({type:"headerFocused",column:this.column})}setupAutoHeight(e){let{wrapperElement:t,checkMeasuringCallback:o,compBean:i}=e,{beans:r}=this,a=g=>{if(!this.isAlive()||!i.isAlive())return;let{paddingTop:u,paddingBottom:h,borderBottomWidth:p,borderTopWidth:f}=ro(this.eGui),m=u+h+p+f,C=t.offsetHeight+m;if(g<5){let w=te(r),y=!(w!=null&&w.contains(t)),x=C==0;if(y||x){Ra(()=>a(g+1),"raf",r);return}}this.setColHeaderHeight(this.column,C)},n=!1,s,l=()=>{let g=this.column.isAutoHeaderHeight();g&&!n&&c(),!g&&n&&d()},c=()=>{n=!0,this.comp.toggleCss("ag-header-cell-auto-height",!0),a(0),s=Tt(this.beans,t,()=>a(0))},d=()=>{n=!1,s&&s(),this.comp.toggleCss("ag-header-cell-auto-height",!1),s=void 0};l(),i.addDestroyFunc(()=>d()),i.addManagedListeners(this.column,{widthChanged:()=>n&&a(0)}),i.addManagedEventListeners({sortChanged:()=>{n&&window.setTimeout(()=>a(0))}}),o&&o(l)}onDisplayedColumnsChanged(){let{comp:e,column:t,beans:o,eGui:i}=this;!e||!t||!i||(hd(e,t,o.visibleCols),ac(i,o.visibleCols.getAriaColIndex(t)))}addResizeAndMoveKeyboardListeners(e){e.addManagedListeners(this.eGui,{keydown:this.onGuiKeyDown.bind(this),keyup:this.onGuiKeyUp.bind(this)})}refreshTabIndex(){let e=Le(this.beans);this.eGui&&we(this.eGui,"tabindex",e?null:"-1")}onGuiKeyDown(e){var n,s;let t=Y(this.beans),o=e.key===b.LEFT||e.key===b.RIGHT;if(this.isResizing&&(e.preventDefault(),e.stopImmediatePropagation()),t!==this.eGui||!e.shiftKey&&!e.altKey&&!e.ctrlKey&&!e.metaKey)return;if((this.isResizing||o)&&(e.preventDefault(),e.stopImmediatePropagation()),(e.ctrlKey||e.metaKey)&&_c(e)===b.C)return(n=this.beans.clipboardSvc)==null?void 0:n.copyToClipboard();if(!o)return;let a=e.key===b.LEFT!==this.gos.get("enableRtl")?"left":"right";if(e.altKey){this.isResizing=!0,this.resizeMultiplier+=1;let l=this.getViewportAdjustedResizeDiff(e);this.resizeHeader(l,e.shiftKey),(s=this.resizeFeature)==null||s.toggleColumnResizing(!0)}else this.moveHeader(a)}moveHeader(e){var t;(t=this.beans.colMoves)==null||t.moveHeader(e,this.eGui,this.column,this.rowCtrl.pinned,this)}getViewportAdjustedResizeDiff(e){let t=this.getResizeDiff(e),{pinnedCols:o}=this.beans;return o?o.getHeaderResizeDiff(t,this.column):t}getResizeDiff(e){let{gos:t,column:o}=this,i=e.key===b.LEFT!==t.get("enableRtl"),r=o.getPinned(),a=t.get("enableRtl");return r&&a!==(r==="right")&&(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(()=>{var e;(e=this.resizeFeature)==null||e.toggleColumnResizing(!1)},150))}handleKeyDown(e){let t=this.getWrapperHasFocus();switch(e.key){case b.PAGE_DOWN:case b.PAGE_UP:case b.PAGE_HOME:case b.PAGE_END:t&&e.preventDefault()}}addDomData(e){let t=pd,{eGui:o,gos:i}=this;Zt(i,o,t,this),e.addDestroyFunc(()=>Zt(i,o,t,null))}focus(e){if(!this.isAlive())return!1;let{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(){var e;this.dragSource&&((e=this.beans.dragAndDrop)==null||e.removeDragSource(this.dragSource),this.dragSource=null)}handleContextMenuMouseEvent(e,t,o){let i=e!=null?e:t,{menuSvc:r,gos:a}=this.beans;a.get("preventDefaultOnContextMenu")&&i.preventDefault(),r!=null&&r.isHeaderContextMenuEnabled(o)&&r.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;let{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}},Xf=class extends On{constructor(){super(...arguments),this.refreshFunctions={},this.userHeaderClasses=new Set,this.ariaDescriptionProperties=new Map}wireComp(e,t,o,i,r){this.comp=e;let{rowCtrl:a,column:n,beans:s}=this,{colResize:l,context:c,colHover:d,rangeSvc:g}=s,u=wi(this,c,r);this.setGui(t,u),this.updateState(),this.setupWidth(u),this.setupMovingCss(u),this.setupMenuClass(u),this.setupSortableClass(u),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight({wrapperElement:i,checkMeasuringCallback:p=>this.setRefreshFunction("measuring",p),compBean:u}),this.addColumnHoverListener(u),this.setupFilterClass(u),this.setupStylesFromColDef(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(u),this.setupSelectAll(u),this.setupUserComp(),this.refreshAria(),l?this.resizeFeature=u.createManagedBean(l.createResizeFeature(a.pinned,n,o,e,this)):q(o,!1),d==null||d.createHoverFeature(u,[n],t),g==null||g.createRangeHighlightFeature(u,n,e),u.createManagedBean(new Ln(n,t,s)),u.createManagedBean(new vi(t,{shouldStopEventPropagation:p=>this.shouldStopEventPropagation(p),onTabKeyDown:()=>null,handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addResizeAndMoveKeyboardListeners(u),u.addManagedPropertyListeners(["suppressMovableColumns","suppressMenuHide","suppressAggFuncInHeader","enableAdvancedFilter"],()=>this.refresh()),u.addManagedListeners(n,{colDefChanged:()=>this.refresh(),formulaRefChanged:()=>this.refresh(),headerHighlightChanged:this.onHeaderHighlightChanged.bind(this)});let h=()=>this.checkDisplayName();u.addManagedEventListeners({columnValueChanged:h,columnRowGroupChanged:h,columnPivotChanged:h,headerHeightChanged:this.onHeaderHeightChanged.bind(this)}),u.addDestroyFunc(()=>{this.refreshFunctions={},this.selectAllFeature=null,this.dragSourceElement=void 0,this.userCompDetails=null,this.userHeaderClasses.clear(),this.ariaDescriptionProperties.clear(),this.clearComponent()})}resizeHeader(e,t){var o;(o=this.beans.colResize)==null||o.resizeHeader(this.column,e,t)}getHeaderClassParams(){let{column:e,beans:t}=this,o=e.colDef;return O(t.gos,{colDef:o,column:e,floatingFilter:!1})}setupUserComp(){let e=this.lookupUserCompDetails();e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setUserCompDetails(e)}lookupUserCompDetails(){let e=this.createParams(),t=this.column.getColDef();return Tp(this.beans.userCompFactory,t,e)}createParams(){let{menuSvc:e,sortSvc:t,colFilter:o,gos:i}=this.beans;return O(i,{column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,enableFilterButton:this.openFilterEnabled&&!!(e!=null&&e.isHeaderFilterButtonEnabled(this.column)),enableFilterIcon:!!o&&(!this.openFilterEnabled||be(this.gos)),showColumnMenu:(a,n)=>{e==null||e.showColumnMenu({column:this.column,buttonElement:a,positionBy:"button",onClosedCallback:n})},showColumnMenuAfterMouseClick:(a,n)=>{e==null||e.showColumnMenu({column:this.column,mouseEvent:a,positionBy:"mouse",onClosedCallback:n})},showFilter:a=>{e==null||e.showFilterMenu({column:this.column,buttonElement:a,containerType:"columnFilter",positionBy:"button"})},progressSort:a=>{t==null||t.progressSort(this.column,!!a,"uiColumnSorted")},setSort:(a,n)=>{t==null||t.setSortForColumn(this.column,Me(a),!!n,"uiColumnSorted")},eGridHeader:this.eGui,setTooltip:(a,n)=>{i.assertModuleRegistered("Tooltip",3),this.setupTooltip(a,n)}})}setupSelectAll(e){var o;let{selectionSvc:t}=this.beans;t&&(this.selectAllFeature=e.createOptionalManagedBean(t.createSelectAllFeature(this.column)),(o=this.selectAllFeature)==null||o.setComp(this),e.addManagedPropertyListener("rowSelection",()=>{var r;let i=t.createSelectAllFeature(this.column);i&&!this.selectAllFeature?(this.selectAllFeature=e.createManagedBean(i),(r=this.selectAllFeature)==null||r.setComp(this),this.comp.refreshSelectAllGui()):this.selectAllFeature&&!i&&(this.comp.removeSelectAllGui(),this.selectAllFeature=this.destroyBean(this.selectAllFeature))}))}getSelectAllGui(){var e;return(e=this.selectAllFeature)==null?void 0:e.getCheckboxGui()}handleKeyDown(e){var t;super.handleKeyDown(e),e.key===b.SPACE?(t=this.selectAllFeature)==null||t.onSpaceKeyDown(e):e.key===b.ENTER?this.onEnterKeyDown(e):e.key===b.DOWN&&e.altKey&&this.showMenuOnKeyPress(e,!1)}onEnterKeyDown(e){var n,s;let{column:t,gos:o,sortable:i,beans:r}=this,a=!1;(e.ctrlKey||e.metaKey)&&(a=this.showMenuOnKeyPress(e,!0)),a||(!e.altKey&&So(o)?(n=r.rangeSvc)==null||n.handleColumnSelection(t,e):i&&((s=r.sortSvc)==null||s.progressSort(t,e.shiftKey,"uiColumnSorted")))}showMenuOnKeyPress(e,t){let o=this.comp.getUserCompInstance();return qs(o)&&o.onMenuKeyboardShortcut(t)?(e.preventDefault(),!0):!1}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription()),td()&&this.setActiveHeader(!0)}onFocusOut(e){this.eGui.contains(e.relatedTarget)||this.setActiveHeader(!1)}setupTooltip(e,t){var o;this.tooltipFeature=(o=this.beans.tooltipSvc)==null?void 0:o.setupHeaderTooltip(this.tooltipFeature,this,e,t)}setupStylesFromColDef(){this.setRefreshFunction("headerStyles",this.refreshHeaderStyles.bind(this)),this.refreshHeaderStyles()}setupClassesFromColDef(){let e=()=>{let t=this.column.getColDef(),o=ud(t,this.gos,this.column,null),i=this.userHeaderClasses;this.userHeaderClasses=new Set(o);for(let r of o)i.has(r)?i.delete(r):this.comp.toggleCss(r,!0);for(let r of i)this.comp.toggleCss(r,!1)};this.setRefreshFunction("headerClasses",e),e()}setDragSource(e){var t,o;this.dragSourceElement=e,this.removeDragSource(),!(!e||!this.draggable)&&(this.dragSource=(o=(t=this.beans.colMoves)==null?void 0:t.setDragSourceForHeader(e,this.column,this.displayName))!=null?o:null)}updateState(){let{menuSvc:e}=this.beans;this.menuEnabled=!!(e!=null&&e.isColumnMenuInHeaderEnabled(this.column)),this.openFilterEnabled=!!(e!=null&&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(let e of Object.values(this.refreshFunctions))e()}refreshHeaderComp(){let e=this.lookupUserCompDetails();if(!e)return;(this.comp.getUserCompInstance()!=null&&this.userCompDetails.componentClass==e.componentClass?this.attemptHeaderCompRefresh(e.params):!1)?this.setDragSource(this.dragSourceElement):this.setCompDetails(e)}attemptHeaderCompRefresh(e){let t=this.comp.getUserCompInstance();return!t||!t.refresh?!1:t.refresh(e)}calculateDisplayName(){return this.beans.colNames.getDisplayNameForColumn(this.column,"header",!0)}checkDisplayName(){this.displayName!==this.calculateDisplayName()&&this.refresh()}workOutDraggable(){let e=this.column.getColDef();return!!(!this.gos.get("suppressMovableColumns")&&!e.suppressMovable&&!e.lockPosition)||!!e.enableRowGroup||!!e.enablePivot}setupWidth(e){let t=()=>{let o=this.column.getActualWidth();this.comp.setWidth(`${o}px`)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupMovingCss(e){let t=()=>{this.comp.toggleCss("ag-header-cell-moving",this.column.isMoving())};e.addManagedListeners(this.column,{movingChanged:t}),t()}setupMenuClass(e){let t=()=>{var o;(o=this.comp)==null||o.toggleCss("ag-column-menu-visible",this.column.isMenuVisible())};e.addManagedListeners(this.column,{menuVisibleChanged:t}),t()}setupSortableClass(e){let t=()=>{this.comp.toggleCss("ag-header-cell-sortable",!!this.sortable)};t(),this.setRefreshFunction("updateSortable",t),e.addManagedEventListeners({sortChanged:this.refreshAriaSort.bind(this)})}setupFilterClass(e){let t=()=>{let o=this.column.isFilterActive();this.comp.toggleCss("ag-header-cell-filtered",o),this.refreshAria()};e.addManagedListeners(this.column,{filterActiveChanged:t}),t()}setupWrapTextClass(){let e=()=>{let t=!!this.column.getColDef().wrapHeaderText;this.comp.toggleCss("ag-header-cell-wrap-text",t)};e(),this.setRefreshFunction("wrapText",e)}onHeaderHighlightChanged(){let e=this.column.getHighlighted(),t=e===0,o=e===1;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(){var u,h;let{eGui:e,column:t,comp:o,beans:i}=this,r=In(this.beans),a=r.reduce((p,f)=>p+f,0)===0;if(o.toggleCss("ag-header-parent-hidden",a),!t.isSpanHeaderHeight()){e.style.removeProperty("top"),e.style.removeProperty("height"),o.toggleCss("ag-header-span-height",!1),o.toggleCss("ag-header-span-total",!1);return}let{numberOfParents:n,isSpanningTotal:s}=this.column.getColumnGroupPaddingInfo();o.toggleCss("ag-header-span-height",n>0);let l=Tn(i);if(n===0){o.toggleCss("ag-header-span-total",!1),e.style.setProperty("top","0px"),e.style.setProperty("height",`${l}px`);return}o.toggleCss("ag-header-span-total",s);let c=((h=(u=this.column.getFirstRealParent())==null?void 0:u.getLevel())!=null?h:-1)+1,d=r.length-c,g=0;for(let p=0;pa==="filter"?-1:n.charCodeAt(0)-a.charCodeAt(0)).map(a=>o.get(a)).join(". ");(r=e.ariaAnnounce)==null||r.announceValue(i,"columnHeader")}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered(),this.refreshAriaCellSelection()}addColumnHoverListener(e){var t;(t=this.beans.colHover)==null||t.addHeaderColumnHoverListener(e,this.comp,this.column)}addActiveHeaderMouseListeners(e){let t=r=>this.handleMouseOverChange(r.type==="mouseenter"),o=()=>{this.setActiveHeader(!0),this.dispatchColumnMouseEvent("columnHeaderClicked",this.column)},i=r=>this.handleContextMenuMouseEvent(r,void 0,this.column);e.addManagedListeners(this.eGui,{mouseenter:t,mouseleave:t,click:o,contextmenu:i})}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){let t=this.comp.getUserCompInstance();return qs(t)?t.getAnchorElementForMenu(e):this.eGui}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function qs(e){return typeof(e==null?void 0:e.getAnchorElementForMenu)=="function"&&typeof e.onMenuKeyboardShortcut=="function"}var em=0,Zr=class extends S{constructor(e,t,o){super(),this.rowIndex=e,this.pinned=t,this.type=o,this.instanceId=em++,this.comp=null,this.allCtrls=[];let i="ag-header-row-column";o==="group"?i="ag-header-row-group":o==="filter"&&(i="ag-header-row-filter"),this.headerRowClass=`ag-header-row ${i}`}setRowIndex(e){var t;this.rowIndex=e,(t=this.comp)==null||t.setRowIndex(this.getAriaRowIndex()),this.onRowHeightChanged()}postConstruct(){this.isPrintLayout=se(this.gos,"print"),this.isEnsureDomOrder=this.gos.get("ensureDomOrder")}areCellsRendered(){return this.comp?this.allCtrls.every(e=>e.eGui!=null):!1}setComp(e,t,o=!0){this.comp=e,t=wi(this,this.beans.context,t),o&&(this.setRowIndex(this.rowIndex),this.onVirtualColumnsChanged()),this.setWidth(),this.addEventListeners(t)}getAriaRowIndex(){return this.rowIndex+1}addEventListeners(e){let t=this.onRowHeightChanged.bind(this),o=this.onDisplayedColumnsChanged.bind(this);e.addManagedEventListeners({columnResized:this.setWidth.bind(this),displayedColumnsChanged:o,virtualColumnsChanged:i=>this.onVirtualColumnsChanged(i.afterScroll),columnGroupHeaderHeightChanged:t,columnHeaderHeightChanged:t,stylesChanged:t,advancedFilterEnabledChanged:t}),e.addManagedPropertyListener("domLayout",o),e.addManagedPropertyListener("ensureDomOrder",i=>this.isEnsureDomOrder=i.currentValue),e.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],t)}onDisplayedColumnsChanged(){this.isPrintLayout=se(this.gos,"print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()}setWidth(){if(!this.comp)return;let e=this.getWidthForRow();this.comp.setWidth(`${e}px`)}getWidthForRow(){let{visibleCols:e}=this.beans;return this.isPrintLayout?this.pinned!=null?0:e.getContainerWidth("right")+e.getContainerWidth("left")+e.getContainerWidth(null):e.getContainerWidth(this.pinned)}onRowHeightChanged(){if(!this.comp)return;let{topOffset:e,rowHeight:t}=this.getTopAndHeight();this.comp.setTop(e+"px"),this.comp.setHeight(t+"px")}getTopAndHeight(){let e=0,t=In(this.beans);for(let r=0;r{let{focusSvc:r,visibleCols:a}=this.beans;return r.isHeaderWrapperFocused(i)?a.isVisible(i.column):!1};if(e)for(let[i,r]of e)o(r)?this.ctrlsById.set(i,r):this.destroyBean(r);return this.allCtrls=Array.from(this.ctrlsById.values()),this.allCtrls}getHeaderCellCtrls(){return this.allCtrls}recycleAndCreateHeaderCtrls(e,t,o){if(e.isEmptyGroup())return;let i=e.getUniqueId(),r;if(o&&(r=o.get(i),o.delete(i)),r&&r.column!=e&&(this.destroyBean(r),r=void 0),r==null)switch(this.type){case"filter":{r=this.createBean(this.beans.registry.createDynamicBean("headerFilterCellCtrl",!0,e,this));break}case"group":r=this.createBean(this.beans.registry.createDynamicBean("headerGroupCellCtrl",!0,e,this));break;default:r=this.createBean(new Xf(e,this));break}t.set(i,r)}getColumnsInViewport(){if(!this.isPrintLayout)return this.getComponentsToRender();if(this.pinned)return[];let e=[];for(let t of["left",null,"right"])e.push(...this.getComponentsToRender(t));return e}getComponentsToRender(e=this.pinned){return this.type==="group"?this.beans.colViewport.getHeadersToRender(e,this.rowIndex):this.beans.colViewport.getColumnHeadersToRender(e)}focusHeader(e,t){let o=this.allCtrls.find(r=>r.column==e);return o?o.focus(t):!1}destroy(){this.allCtrls=this.destroyBeans(this.allCtrls),this.ctrlsById=void 0,this.comp=null,super.destroy()}},tm=class extends S{constructor(e){super(),this.pinned=e,this.hidden=!1,this.includeFloatingFilter=!1,this.groupsRowCtrls=[]}setComp(e,t){this.comp=e,this.eViewport=t;let{pinnedCols:o,ctrlsSvc:i,colModel:r,colMoves:a}=this.beans;this.setupCenterWidth(),o==null||o.setupHeaderPinnedWidth(this),this.setupDragAndDrop(a,this.eViewport);let n=this.refresh.bind(this,!0);this.addManagedEventListeners({displayedColumnsChanged:n,advancedFilterEnabledChanged:n});let s=`${typeof this.pinned=="string"?this.pinned:"center"}Header`;i.register(s,this),r.ready&&this.refresh()}getAllCtrls(){let e=[...this.groupsRowCtrls];return this.columnsRowCtrl&&e.push(this.columnsRowCtrl),this.filtersRowCtrl&&e.push(this.filtersRowCtrl),e}refresh(e=!1){let{focusSvc:t,filterManager:o,visibleCols:i}=this.beans,r=0,a=t.getFocusHeaderToUseAfterRefresh(),n=()=>{let g=i.headerGroupRowCount;r=g,e||(this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls));let u=this.groupsRowCtrls.length;if(u!==g){if(u>g){for(let h=g;h{let g=r++;if(this.hidden){this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl);return}this.columnsRowCtrl==null||!e?(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl),this.columnsRowCtrl=this.createBean(new Zr(g,this.pinned,"column"))):this.columnsRowCtrl.rowIndex!==g&&this.columnsRowCtrl.setRowIndex(g)},l=()=>{this.includeFloatingFilter=!!(o!=null&&o.hasFloatingFilters())&&!this.hidden;let g=()=>{this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)};if(!this.includeFloatingFilter){g();return}e||g();let u=r++;this.filtersRowCtrl?this.filtersRowCtrl.rowIndex!==u&&this.filtersRowCtrl.setRowIndex(u):this.filtersRowCtrl=this.createBean(new Zr(u,this.pinned,"filter"))},c=this.getAllCtrls();n(),s(),l();let d=this.getAllCtrls();this.comp.setCtrls(d),this.restoreFocusOnHeader(t,a),c.length!==d.length&&this.beans.eventSvc.dispatchEvent({type:"headerRowsChanged"})}getHeaderCtrlForColumn(e){let t=o=>o==null?void 0:o.getHeaderCellCtrls().find(i=>i.column===e);if(Dt(e))return t(this.columnsRowCtrl);if(this.groupsRowCtrls.length!==0)for(let o=0;othis.comp.setCenterWidth(`${e}px`),!0))}},om={tag:"div",cls:"ag-pinned-left-header",role:"rowgroup"},im={tag:"div",cls:"ag-pinned-right-header",role:"rowgroup"},rm={tag:"div",cls:"ag-header-viewport",role:"rowgroup",attrs:{tabindex:"-1"},children:[{tag:"div",ref:"eCenterContainer",cls:"ag-header-container",role:"presentation"}]},Jr=class extends _{constructor(e){super(),this.eCenterContainer=E,this.headerRowComps={},this.rowCompsList=[],this.pinned=e}postConstruct(){this.selectAndSetTemplate();let e={setDisplayed:o=>this.setDisplayed(o),setCtrls:o=>this.setCtrls(o),setCenterWidth:o=>this.eCenterContainer.style.width=o,setViewportScrollLeft:o=>this.getGui().scrollLeft=o,setPinnedContainerWidth:o=>{let i=this.getGui();i.style.width=o,i.style.maxWidth=o,i.style.minWidth=o}};this.createManagedBean(new tm(this.pinned)).setComp(e,this.getGui())}selectAndSetTemplate(){let e=this.pinned=="left",t=this.pinned=="right",o=e?om:t?im:rm;this.setTemplate(o),this.eRowContainer=this.eCenterContainer!==E?this.eCenterContainer:this.getGui()}destroy(){this.setCtrls([]),super.destroy()}destroyRowComp(e){this.destroyBean(e),e.getGui().remove()}setCtrls(e){let t=this.headerRowComps;this.headerRowComps={},this.rowCompsList=[];let o,i=r=>{let a=r.getGui();a.parentElement!=this.eRowContainer&&this.eRowContainer.appendChild(a),o&&gc(this.eRowContainer,a,o),o=a};for(let r of e){let a=r.instanceId,n=t[a];delete t[a];let s=n||this.createBean(new Kf(r));this.headerRowComps[a]=s,this.rowCompsList.push(s),i(s)}for(let r of Object.values(t))this.destroyRowComp(r)}},am={tag:"div",cls:"ag-header",role:"presentation"},nm=class extends _{constructor(){super(am)}postConstruct(){let e={toggleCss:(i,r)=>this.toggleCss(i,r),setHeightAndMinHeight:i=>{this.getGui().style.height=i,this.getGui().style.minHeight=i}};this.createManagedBean(new Nf).setComp(e,this.getGui(),this.getFocusableElement());let o=i=>{this.createManagedBean(i),this.appendChild(i)};o(new Jr("left")),o(new Jr(null)),o(new Jr("right"))}},sm={selector:"AG-HEADER-ROOT",component:nm},Oe={AUTO_HEIGHT:"ag-layout-auto-height",NORMAL:"ag-layout-normal",PRINT:"ag-layout-print"},Hn=class extends S{constructor(e){super(),this.view=e}postConstruct(){this.addManagedPropertyListener("domLayout",this.updateLayoutClasses.bind(this)),this.updateLayoutClasses()}updateLayoutClasses(){let e=this.gos.get("domLayout"),t={autoHeight:e==="autoHeight",normal:e==="normal",print:e==="print"},o=t.autoHeight?Oe.AUTO_HEIGHT:t.print?Oe.PRINT:Oe.NORMAL;this.view.updateLayoutClasses(o,t)}},fd=class extends _{constructor(e,t){super(),this.direction=t,this.eViewport=E,this.eContainer=E,this.hideTimeout=0,this.setTemplate(e)}postConstruct(){this.addManagedEventListeners({scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this)}),this.onScrollVisibilityChanged(),this.toggleCss("ag-apple-scrollbar",Jc()||jt())}destroy(){super.destroy(),window.clearTimeout(this.hideTimeout)}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.invisibleScrollbar=ed(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles()))}addActiveListenerToggles(){let e=this.getGui(),t=()=>this.toggleCss("ag-scrollbar-active",!0),o=()=>this.toggleCss("ag-scrollbar-active",!1);this.addManagedListeners(e,{mouseenter:t,mousedown:t,touchstart:t,mouseleave:o,touchend:o})}onScrollVisibilityChanged(){this.invisibleScrollbar===void 0&&this.initialiseInvisibleScrollbar(),ht(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){let t=this.eViewport;rh(this,()=>Ie(t),()=>this.setScrollPosition(e),100)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}},lm={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"}]},cm=class extends fd{constructor(){super(lm,"horizontal"),this.eLeftSpacer=E,this.eRightSpacer=E,this.setScrollVisibleDebounce=0}wireBeans(e){this.visibleCols=e.visibleCols,this.scrollVisibleSvc=e.scrollVisibleSvc}postConstruct(){super.postConstruct();let 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 zn(t=>this.eContainer.style.width=`${t}px`)),this.addManagedPropertyListeners(["suppressHorizontalScroll"],this.onScrollVisibilityChanged.bind(this))}destroy(){window.clearTimeout(this.setScrollVisibleDebounce),super.destroy()}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.enableRtl=this.gos.get("enableRtl"),super.initialiseInvisibleScrollbar(),this.invisibleScrollbar&&this.refreshCompBottom())}refreshCompBottom(){var t,o;if(!this.invisibleScrollbar)return;let e=(o=(t=this.beans.pinnedRowModel)==null?void 0:t.getPinnedBottomTotalHeight())!=null?o:0;this.getGui().style.bottom=`${e}px`}onScrollVisibilityChanged(){super.onScrollVisibilityChanged(),this.setFakeHScrollSpacerWidths()}setFakeHScrollSpacerWidths(){let e=this.scrollVisibleSvc.verticalScrollShowing,t=this.visibleCols.getDisplayedColumnsRightWidth(),o=!this.enableRtl&&e,i=this.scrollVisibleSvc.getScrollbarWidth();o&&(t+=i),Ze(this.eRightSpacer,t),this.eRightSpacer.classList.toggle("ag-scroller-corner",t<=i);let r=this.visibleCols.getColsLeftWidth();this.enableRtl&&e&&(r+=i),Ze(this.eLeftSpacer,r),this.eLeftSpacer.classList.toggle("ag-scroller-corner",r<=i)}setScrollVisible(){let e=this.scrollVisibleSvc.horizontalScrollShowing,t=this.invisibleScrollbar,o=this.gos.get("suppressHorizontalScroll"),i=e&&this.scrollVisibleSvc.getScrollbarWidth()||0,a=o?0:i===0&&t?16:i,n=()=>{this.setScrollVisibleDebounce=0,this.toggleCss("ag-scrollbar-invisible",t),Yo(this.getGui(),a),Yo(this.eViewport,a),Yo(this.eContainer,a),a||this.eContainer.style.setProperty("min-height","1px"),this.setVisible(e,{skipAriaHidden:!0})};window.clearTimeout(this.setScrollVisibleDebounce),e?this.setScrollVisibleDebounce=window.setTimeout(n,100):n()}getScrollPosition(){return Yi(this.eViewport,this.enableRtl)}setScrollPosition(e){Ie(this.eViewport)||this.attemptSettingScrollPosition(e),Qi(this.eViewport,e,this.enableRtl)}},dm={selector:"AG-FAKE-HORIZONTAL-SCROLL",component:cm},md=class extends S{constructor(e,t){super(),this.eContainer=e,this.eViewport=t}postConstruct(){this.addManagedEventListeners({rowContainerHeightChanged:this.onHeightChanged.bind(this,this.beans.rowContainerHeight)})}onHeightChanged(e){let t=e.uiContainerHeight,o=t!=null?`${t}px`:"";this.eContainer.style.height=o,this.eViewport&&(this.eViewport.style.height=o)}},gm={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"}]}]},um=class extends fd{constructor(){super(gm,"vertical")}postConstruct(){super.postConstruct(),this.createManagedBean(new md(this.eContainer));let{ctrlsSvc:e}=this.beans;e.register("fakeVScrollComp",this),this.addManagedEventListeners({rowContainerHeightChanged:this.onRowContainerHeightChanged.bind(this,e)})}setScrollVisible(){let{scrollVisibleSvc:e}=this.beans,t=e.verticalScrollShowing,o=this.invisibleScrollbar,i=t&&e.getScrollbarWidth()||0,r=i===0&&o?16:i;this.toggleCss("ag-scrollbar-invisible",o),Ze(this.getGui(),r),Ze(this.eViewport,r),Ze(this.eContainer,r),this.setDisplayed(t,{skipAriaHidden:!0})}onRowContainerHeightChanged(e){let o=e.getGridBodyCtrl().eBodyViewport,i=this.getScrollPosition(),r=o.scrollTop;i!=r&&this.setScrollPosition(r,!0)}getScrollPosition(){return this.eViewport.scrollTop}setScrollPosition(e,t){!t&&!Ie(this.eViewport)&&this.attemptSettingScrollPosition(e),this.eViewport.scrollTop=e}},hm={selector:"AG-FAKE-VERTICAL-SCROLL",component:um};var ft="Viewport",_s="fakeVScrollComp",Xr=["fakeHScrollComp","centerHeader","topCenter","bottomCenter","stickyTopCenter","stickyBottomCenter"],Us=100,ea=150,pm=class extends S{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=re(this,()=>this.lastScrollSource[1]=null,ea),this.resetLastVScrollDebounced=re(this,()=>this.lastScrollSource[0]=null,ea)}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");let 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,o=>{this.centerRowsCtrl=o.center,this.fakeVScrollComp=o.fakeVScrollComp,this.fakeHScrollComp=o.fakeHScrollComp,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,ft)});for(let e of Xr){let t=this.ctrlsSvc.get(e);this.registerScrollPartner(t,this.onHScroll.bind(this,e))}}addVerticalScrollListeners(){let e=this.gos.get("debounceVerticalScrollbar"),t=e?re(this,this.onVScroll.bind(this,ft),Us):this.onVScroll.bind(this,ft),o=e?re(this,this.onVScroll.bind(this,_s),Us):this.onVScroll.bind(this,_s);this.addManagedElementListeners(this.eBodyViewport,{scroll:t}),this.registerScrollPartner(this.fakeVScrollComp,o)}registerScrollPartner(e,t){e.onScrollCallback(t)}onDisplayedColumnsWidthChanged(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()}horizontallyScrollHeaderCenterAndFloatingCenter(e){this.centerRowsCtrl!=null&&(e===void 0&&(e=this.centerRowsCtrl.getCenterViewportScrollLeft()),this.setScrollLeftForAllContainersExceptCurrent(Math.abs(e)))}setScrollLeftForAllContainersExceptCurrent(e){for(let t of[...Xr,ft]){if(this.lastScrollSource[1]===t)continue;let o=this.getViewportForSource(t);Qi(o,e,this.enableRtl)}}getViewportForSource(e){return e===ft?this.centerRowsCtrl.eViewport:this.ctrlsSvc.get(e).eViewport}isControllingScroll(e,t){return this.lastScrollSource[t]==null?(t===0?this.lastScrollSource[0]=e:this.lastScrollSource[1]=e,!0):this.lastScrollSource[t]===e}onHScroll(e){if(!this.isControllingScroll(e,1))return;let t=this.centerRowsCtrl.eViewport,{scrollLeft:o}=t;if(this.shouldBlockScrollUpdate(1,o,!0))return;let i=Yi(this.getViewportForSource(e),this.enableRtl);this.doHorizontalScroll(i),this.resetLastHScrollDebounced()}onVScroll(e){if(!this.isControllingScroll(e,0))return;let t=e===ft?this.eBodyViewport.scrollTop:this.fakeVScrollComp.getScrollPosition(),o=t;if(this.shouldBlockScrollUpdate(0,o,!0))return;e===ft?this.fakeVScrollComp.setScrollPosition(o):(this.eBodyViewport.scrollTop=t,o=this.eBodyViewport.scrollTop,this.invalidateVerticalScroll(),o!==t&&this.fakeVScrollComp.setScrollPosition(o,!0));let{animationFrameSvc:i}=this;i==null||i.setScrollTop(o),this.nextScrollTop=o,i!=null&&i.active?i.schedule():this.scrollGridIfNeeded(!0),this.resetLastVScrollDebounced()}doHorizontalScroll(e){let t=this.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){let t={type:"bodyScroll",direction:e===1?"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"})},ea)}shouldBlockScrollUpdate(e,t,o=!1){return o&&!jt()?!1:e===0?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t)}shouldBlockVerticalScroll(e){let t=un(this.eBodyViewport),{scrollHeight:o}=this.eBodyViewport;return e<0||e+t>o}shouldBlockHorizontalScroll(e){let 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(){let e=this.scrollLeft,t=!1;for(let o of Xr)if(this.getViewportForSource(o).scrollLeft!==e){t=!0;break}t&&this.onHScroll(ft)}scrollGridIfNeeded(e=!1){let t=this.scrollTop!=this.nextScrollTop;return t&&(this.scrollTop=this.nextScrollTop,e&&this.invalidateVerticalScroll(),this.redrawRowsAfterScroll()),t}setHorizontalScrollPosition(e,t=!1){let i=this.centerRowsCtrl.eViewport.scrollWidth-this.centerRowsCtrl.getCenterWidth();!t&&this.shouldBlockScrollUpdate(1,e)&&(this.enableRtl?e=e>0?0:i:e=Math.min(Math.max(e,0),i)),Qi(this.centerRowsCtrl.eViewport,Math.abs(e),this.enableRtl),this.doHorizontalScroll(e)}setVerticalScrollPosition(e){this.invalidateVerticalScroll(),this.eBodyViewport.scrollTop=e}getVScrollPosition(){if(!this.isVerticalPositionInvalidated){let{lastOffsetHeight:o,lastScrollTop:i}=this;return{top:i,bottom:i+o}}this.isVerticalPositionInvalidated=!1;let{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){let t=this.centerRowsCtrl.eViewport.scrollLeft;return this.setHorizontalScrollPosition(t+e),this.centerRowsCtrl.eViewport.scrollLeft-t}scrollToTop(){this.setVerticalScrollPosition(0)}ensureNodeVisible(e,t=null){let{rowModel:o}=this.beans,i=o.getRowCount(),r=-1;for(let a=0;a=0&&this.ensureIndexVisible(r,t)}ensureIndexVisible(e,t,o=0){if(se(this.gos,"print"))return;let{rowModel:i}=this.beans,r=i.getRowCount();if(typeof e!="number"||e<0||e>=r){k(88,{index:e});return}this.clearRetryListeners();let{frameworkOverrides:a,pageBounds:n,rowContainerHeight:s,rowRenderer:l}=this.beans;a.wrapIncoming(()=>{var p,f;let c=this.ctrlsSvc.getGridBodyCtrl(),d=i.getRow(e),g,u,h=0;this.invalidateVerticalScroll();do{let{stickyTopHeight:m,stickyBottomHeight:v}=c,C=d.rowTop,w=d.rowHeight,y=n.getPixelOffset(),x=d.rowTop-y,R=x+d.rowHeight,F=this.getVScrollPosition(),P=s.divStretchOffset,T=F.top+P,I=F.bottom+P,z=I-T,L=s.getScrollPositionForPixel(x),N=s.getScrollPositionForPixel(R-z),j=Math.min((L+N)/2,x),A=T+m>x,H=I-vz?V=L-m:V=N+v),V!==null&&(this.setVerticalScrollPosition(V),l.redraw({afterScroll:!0})),g=C!==d.rowTop||w!==d.rowHeight,u=m!==c.stickyTopHeight||v!==c.stickyBottomHeight,h++}while((g||u)&&h<10);if((p=this.animationFrameSvc)==null||p.flushAllFrames(),o<10&&(d!=null&&d.stub||!((f=this.beans.rowAutoHeight)!=null&&f.areRowsMeasured()))){let m=this.getVScrollPosition().top;this.clearRetryListenerFncs=this.addManagedEventListeners({bodyScroll:()=>{let v=this.getVScrollPosition().top;m!==v&&this.clearRetryListeners()},modelUpdated:()=>{this.clearRetryListeners(),!(e>=i.getRowCount())&&this.ensureIndexVisible(e,t,o+1)}})}})}clearRetryListeners(){for(let e of this.clearRetryListenerFncs)e();this.clearRetryListenerFncs=[]}ensureColumnVisible(e,t="auto"){let{colModel:o,frameworkOverrides:i}=this.beans,r=o.getCol(e);if(!r||r.isPinned()||!this.visibleCols.isColDisplayed(r))return;let a=this.getPositionedHorizontalScroll(r,t);i.wrapIncoming(()=>{var n;a!==null&&this.centerRowsCtrl.setCenterViewportScrollLeft(a),this.centerRowsCtrl.onHorizontalViewportChanged(),(n=this.animationFrameSvc)==null||n.flushAllFrames()})}getPositionedHorizontalScroll(e,t){let{columnBeforeStart:o,columnAfterEnd:i}=this.isColumnOutsideViewport(e),r=this.centerRowsCtrl.getCenterWidth()r:oi;return{columnBeforeStart:n,columnAfterEnd:s}}getColumnBounds(e){let t=this.enableRtl,o=this.visibleCols.bodyWidth,i=e.getActualWidth(),r=e.getLeft(),a=t?-1:1,n=t?o-r:r,s=n+i*a,l=n+i/2*a;return{colLeft:n,colMiddle:l,colRight:s}}getViewportBounds(){let e=this.centerRowsCtrl.getCenterWidth(),t=this.centerRowsCtrl.getCenterViewportScrollLeft(),o=t,i=e+t;return{start:o,end:i,width:e}}},js={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 fm(e,t,o=Rn()||0,i,r){return vd(e,t,"horizontal",o,i,r)}function mm(e,t,o=Rn()||0,i,r){return vd(e,t,"vertical",o,i,r)}function vd(e,t,o,i,r,a){let n=js[o],s=js[n.opposite],l=r?Ie(r):!0,c=a?Ie(a):!0,d=n.overflow(e);if(d<=0)return!1;if(!t||i===0)return!0;let g=s.overflow(t);if(g<=0)return!0;if(d<=i){if(l&&c&&vm({candidateOverflow:g,candidateScrollSize:s.scrollSize(t),candidateClientSize:s.clientSize(t),scrollbarWidth:i}))return!1;let u=n.clientSize(e)+i;return n.scrollSize(e)<=u}return!0}function vm({candidateOverflow:e,candidateScrollSize:t,candidateClientSize:o,scrollbarWidth:i}){if(e<=0||e>i)return!1;let r=o+i;return t>o&&t<=r}var Cm=class extends S{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(){let{beans:e,centerContainerCtrl:t,gridBodyCtrl:o}=this,i=()=>{ht(e,()=>{this.onCenterViewportResized()})};t.registerViewportResizeListener(i),o.registerBodyViewportResizeListener(i)}onScrollbarWidthChanged(){this.checkViewportAndScrolls()}onCenterViewportResized(){if(this.scrollVisibleSvc.updateScrollGap(),this.centerContainerCtrl.isViewportInTheDOMTree()){let{pinnedCols:e,colFlex:t}=this.beans;e==null||e.keepPinnedColumnsNarrowerThanViewport(),this.checkViewportAndScrolls();let o=this.centerContainerCtrl.getCenterWidth();o!==this.centerWidth&&(this.centerWidth=o,t==null||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(){let e=this.gridBodyCtrl.eBodyViewport,t=un(e);this.bodyHeight!==t&&(this.bodyHeight=t,this.eventSvc.dispatchEvent({type:"bodyHeightChanged"}))}updateScrollVisibleService(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)}updateScrollVisibleServiceImpl(){if(!this.isAlive())return;let e={horizontalScrollShowing:this.centerContainerCtrl.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleSvc.setScrollsVisible(e)}onHorizontalViewportChanged(){let{centerContainerCtrl:e,beans:t}=this,o=e.getCenterWidth(),i=e.getViewportScrollLeft();t.colViewport.setScrollPosition(o,i)}};function Cd(e){var o;return e.altKey||e.ctrlKey||e.metaKey?!1:((o=e.key)==null?void 0:o.length)===1}function qi(e,t,o,i){var a;let r=(a=t.getColDef().cellRendererParams)==null?void 0:a.suppressMouseEventHandling;return wd(e,t,o,i,r)}function wm(e,t,o,i){let r=t==null?void 0:t.suppressMouseEventHandling;return wd(e,void 0,o,i,r)}function wd(e,t,o,i,r){return r?r(O(e,{column:t,node:o,event:i})):!1}function bd(e,t,o){let i=t;for(;i;){let r=Mc(e,i,o);if(r)return r;i=i.parentElement}return null}var cr="cellCtrl";function Bn(e,t){return bd(e,t,cr)}var dr="renderedRow";function bm(e,t){return bd(e,t,dr)}function Ba(e,t,o,i,r){let a=i?i.getColDef().suppressKeyboardEvent:void 0;if(!a)return!1;let n=O(e,{event:t,editing:r,column:i,node:o,data:o.data,colDef:i.getColDef()});return!!(a&&a(n))}function ym(e){var d,g,u;let{pinnedRowModel:t,rowModel:o,rangeSvc:i,visibleCols:r}=e;if(!i||r.allCols.length===0)return;let a=(d=t==null?void 0:t.isEmpty("top"))!=null?d:!0,n=(g=t==null?void 0:t.isEmpty("bottom"))!=null?g:!0,s=a?null:"top",l,c;n?(l=null,c=o.getRowCount()-1):(l="bottom",c=(u=t==null?void 0:t.getPinnedBottomRowCount())!=null?u:-1),i.setCellRange({rowStartIndex:0,rowStartPinned:s,rowEndIndex:c,rowEndPinned:l})}var Sm=class extends S{constructor(e){super(),this.element=e}postConstruct(){var e;this.addKeyboardListeners(),this.addMouseListeners(),(e=this.beans.touchSvc)==null||e.mockRowContextMenu(this),this.editSvc=this.beans.editSvc}addKeyboardListeners(){let e="keydown",t=this.processKeyboardEvent.bind(this,e);this.addManagedElementListeners(this.element,{[e]:t})}addMouseListeners(){let e="mousedown";Ji("pointerdown")?e="pointerdown":Ji("touchstart")&&(e="touchstart");let t=["dblclick","contextmenu","mouseover","mouseout","click",e];for(let o of t){let i=this.processMouseEvent.bind(this,o);this.addManagedElementListeners(this.element,{[o]:i})}}processMouseEvent(e,t){var r;if(!li(this.beans,t)||ct(t))return;let{cellCtrl:o,rowCtrl:i}=this.getControlsForEventTarget(t.target);e==="contextmenu"?(o!=null&&o.column&&o.dispatchCellContextMenuEvent(t),(r=this.beans.contextMenuSvc)==null||r.handleContextMenuMouseEvent(t,void 0,i,o)):(o&&o.onMouseEvent(e,t),i&&i.onMouseEvent(e,t))}getControlsForEventTarget(e){let{gos:t}=this;return{cellCtrl:Bn(t,e),rowCtrl:bm(t,e)}}processKeyboardEvent(e,t){let{cellCtrl:o,rowCtrl:i}=this.getControlsForEventTarget(t.target);t.defaultPrevented||(o?this.processCellKeyboardEvent(o,e,t):i!=null&&i.isFullWidth()&&this.processFullWidthRowKeyboardEvent(i,e,t))}processCellKeyboardEvent(e,t,o){var a,n,s;let i=(n=(a=this.editSvc)==null?void 0:a.isEditing(e,{withOpenEditor:!0}))!=null?n:!1;!Ba(this.gos,o,e.rowNode,e.column,i)&&t==="keydown"&&(!i&&((s=this.beans.navigation)!=null&&s.handlePageScrollingKey(o))||e.onKeyDown(o),this.doGridOperations(o,i),Cd(o)&&e.processCharacter(o)),t==="keydown"&&this.eventSvc.dispatchEvent(e.createEvent(o,"cellKeyDown"))}processFullWidthRowKeyboardEvent(e,t,o){let{rowNode:i}=e,{focusSvc:r,navigation:a}=this.beans,n=r.getFocusedCell(),s=n==null?void 0:n.column;if(!Ba(this.gos,o,i,s,!1)){let c=o.key;if(t==="keydown")switch(c){case b.PAGE_HOME:case b.PAGE_END:case b.PAGE_UP:case b.PAGE_DOWN:a==null||a.handlePageScrollingKey(o,!0);break;case b.LEFT:case b.RIGHT:if(!this.gos.get("embedFullWidthRows"))break;case b.UP:case b.DOWN:e.onKeyboardNavigate(o);break;case b.TAB:e.onTabKeyDown(o);break;default:}}t==="keydown"&&this.eventSvc.dispatchEvent(e.createRowEvent("cellKeyDown",o))}doGridOperations(e,t){if(!e.ctrlKey&&!e.metaKey||t||!li(this.beans,e))return;let o=_c(e),{clipboardSvc:i,undoRedo:r}=this.beans;if(o===b.A)return this.onCtrlAndA(e);if(o===b.C)return this.onCtrlAndC(i,e);if(o===b.D)return this.onCtrlAndD(i,e);if(o===b.V)return this.onCtrlAndV(i,e);if(o===b.X)return this.onCtrlAndX(i,e);if(o===b.Y)return this.onCtrlAndY(r);if(o===b.Z)return this.onCtrlAndZ(r,e)}onCtrlAndA(e){let{beans:{rowModel:t,rangeSvc:o,selectionSvc:i},gos:r}=this;o&&dt(r)&&!zh(r)&&t.isRowsToRender()?ym(this.beans):i&&i.selectAllRowNodes({source:"keyboardSelectAll",selectAll:Lc(r)}),e.preventDefault()}onCtrlAndC(e,t){var i;if(!e||this.gos.get("enableCellTextSelection"))return;let{cellCtrl:o}=this.getControlsForEventTarget(t.target);(i=this.editSvc)!=null&&i.isEditing(o,{withOpenEditor:!0})||(t.preventDefault(),e.copyToClipboard())}onCtrlAndX(e,t){var i;if(!e||this.gos.get("enableCellTextSelection")||this.gos.get("suppressCutToClipboard"))return;let{cellCtrl:o}=this.getControlsForEventTarget(t.target);(i=this.editSvc)!=null&&i.isEditing(o,{withOpenEditor:!0})||(t.preventDefault(),e.cutToClipboard(void 0,"ui"))}onCtrlAndV(e,t){var i;let{cellCtrl:o}=this.getControlsForEventTarget(t.target);(i=this.editSvc)!=null&&i.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==null||e.redo("ui")}},Ri=e=>e.topRowCtrls,Ei=e=>e.getStickyTopRowCtrls(),Fi=e=>e.getStickyBottomRowCtrls(),Di=e=>e.bottomRowCtrls,Mi=e=>e.allRowCtrls,ta=e=>e.getCtrls("top"),oa=e=>e.getCtrls("center"),ia=e=>e.getCtrls("bottom"),xm={center:{type:"center",name:"center-cols",getRowCtrls:Mi,getSpannedRowCtrls:oa},left:{type:"left",name:"pinned-left-cols",pinnedType:"left",getRowCtrls:Mi,getSpannedRowCtrls:oa},right:{type:"right",name:"pinned-right-cols",pinnedType:"right",getRowCtrls:Mi,getSpannedRowCtrls:oa},fullWidth:{type:"fullWidth",name:"full-width",fullWidth:!0,getRowCtrls:Mi},topCenter:{type:"center",name:"floating-top",getRowCtrls:Ri,getSpannedRowCtrls:ta},topLeft:{type:"left",name:"pinned-left-floating",container:"ag-pinned-left-floating-top",pinnedType:"left",getRowCtrls:Ri,getSpannedRowCtrls:ta},topRight:{type:"right",name:"pinned-right-floating",container:"ag-pinned-right-floating-top",pinnedType:"right",getRowCtrls:Ri,getSpannedRowCtrls:ta},topFullWidth:{type:"fullWidth",name:"floating-top-full-width",fullWidth:!0,getRowCtrls:Ri},stickyTopCenter:{type:"center",name:"sticky-top",getRowCtrls:Ei},stickyTopLeft:{type:"left",name:"pinned-left-sticky-top",container:"ag-pinned-left-sticky-top",pinnedType:"left",getRowCtrls:Ei},stickyTopRight:{type:"right",name:"pinned-right-sticky-top",container:"ag-pinned-right-sticky-top",pinnedType:"right",getRowCtrls:Ei},stickyTopFullWidth:{type:"fullWidth",name:"sticky-top-full-width",fullWidth:!0,getRowCtrls:Ei},stickyBottomCenter:{type:"center",name:"sticky-bottom",getRowCtrls:Fi},stickyBottomLeft:{type:"left",name:"pinned-left-sticky-bottom",container:"ag-pinned-left-sticky-bottom",pinnedType:"left",getRowCtrls:Fi},stickyBottomRight:{type:"right",name:"pinned-right-sticky-bottom",container:"ag-pinned-right-sticky-bottom",pinnedType:"right",getRowCtrls:Fi},stickyBottomFullWidth:{type:"fullWidth",name:"sticky-bottom-full-width",fullWidth:!0,getRowCtrls:Fi},bottomCenter:{type:"center",name:"floating-bottom",getRowCtrls:Di,getSpannedRowCtrls:ia},bottomLeft:{type:"left",name:"pinned-left-floating-bottom",container:"ag-pinned-left-floating-bottom",pinnedType:"left",getRowCtrls:Di,getSpannedRowCtrls:ia},bottomRight:{type:"right",name:"pinned-right-floating-bottom",container:"ag-pinned-right-floating-bottom",pinnedType:"right",getRowCtrls:Di,getSpannedRowCtrls:ia},bottomFullWidth:{type:"fullWidth",name:"floating-bottom-full-width",fullWidth:!0,getRowCtrls:Di}};function yd(e){return`ag-${bi(e).name}-viewport`}function Sd(e){var o;let t=bi(e);return(o=t.container)!=null?o:`ag-${t.name}-container`}function km(e){return`ag-${bi(e).name}-spanned-cells-container`}function bi(e){return xm[e]}var Rm=["topCenter","topLeft","topRight"],Em=["bottomCenter","bottomLeft","bottomRight"],Fm=["center","left","right"],Dm=["center","left","right","fullWidth"],Mm=["stickyTopCenter","stickyBottomCenter","center","topCenter","bottomCenter"],Pm=["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],Im=["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"],xd=["stickyTopCenter","stickyTopLeft","stickyTopRight"],kd=["stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],Tm=[...xd,"stickyTopFullWidth",...kd,"stickyBottomFullWidth"],Am=[...Rm,...Em,...Fm,...xd,...kd],zm=class extends S{constructor(e){super(),this.name=e,this.visible=!0,this.EMPTY_CTRLS=[],this.options=bi(e)}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],()=>{this.viewportSizeFeature=this.createManagedBean(new Cm(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){var s;this.comp=e,this.eContainer=t,this.eSpannedContainer=o,this.eViewport=i,this.createManagedBean(new Sm((s=this.eViewport)!=null?s:this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder();let{pinnedCols:r,rangeSvc:a}=this.beans,n=()=>this.onPinnedWidthChanged();this.forContainers(Pm,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(r==null?void 0:r.createPinnedWidthFeature(!0,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({leftPinnedWidthChanged:n})}),this.forContainers(Im,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(r==null?void 0:r.createPinnedWidthFeature(!1,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({rightPinnedWidthChanged:n})}),this.forContainers(Dm,()=>this.createManagedBean(new md(this.eContainer,this.name==="center"?i:void 0))),a&&this.forContainers(Am,()=>this.createManagedBean(a.createDragListenerFeature(this.eContainer))),this.forContainers(Mm,()=>this.createManagedBean(new zn(l=>this.comp.setContainerWidth(`${l}px`)))),this.visible=this.isContainerVisible(),this.addListeners(),this.registerWithCtrlsService()}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}addListeners(){let{spannedRowRenderer:e,gos:t}=this.beans,o=this.onDisplayedColumnsChanged.bind(this);this.addManagedEventListeners({displayedColumnsChanged:o,displayedColumnsWidthChanged:o,displayedRowsChanged:i=>this.onDisplayedRowsChanged(i.afterScroll)}),o(),this.onDisplayedRowsChanged(),e&&this.options.getSpannedRowCtrls&&t.get("enableCellSpan")&&this.addManagedListeners(e,{spannedRowsUpdated:()=>{let i=this.options.getSpannedRowCtrls(e);i&&this.comp.setSpannedRowCtrls(i,!1)}})}listenOnDomOrder(){if(Tm.indexOf(this.name)>=0){this.comp.setDomOrder(!0);return}let t=()=>{let o=this.gos.get("ensureDomOrder"),i=se(this.gos,"print");this.comp.setDomOrder(o||i)};this.addManagedPropertyListener("domLayout",t),t()}onDisplayedColumnsChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged())}addPreventScrollWhileDragging(){let{dragSvc:e}=this.beans;if(!e)return;let t=o=>{e.dragging&&o.cancelable&&o.preventDefault()};this.eContainer.addEventListener("touchmove",t,{passive:!1}),this.addDestroyFunc(()=>this.eContainer.removeEventListener("touchmove",t))}onHorizontalViewportChanged(e=!1){let 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 ni(this.eViewport)}getCenterViewportScrollLeft(){return Yi(this.eViewport,this.enableRtl)}registerViewportResizeListener(e){let t=Tt(this.beans,this.eViewport,e);this.addDestroyFunc(()=>t())}isViewportInTheDOMTree(){return dc(this.eViewport)}getViewportScrollLeft(){return Yi(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){var l,c,d;let{beans:e,gos:t,eViewport:o}=this,i=t.get("alwaysShowHorizontalScroll"),{ctrlsSvc:r}=e,a=(l=r.getGridBodyCtrl())==null?void 0:l.eBodyViewport,n=(c=r.get("fakeHScrollComp"))==null?void 0:c.getGui(),s=(d=r.get("fakeVScrollComp"))==null?void 0:d.getGui();return i||fm(o,a,void 0,n,s)}setHorizontalScroll(e){this.comp.setHorizontalScroll(e)}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(e){Qi(this.eViewport,e,this.enableRtl)}isContainerVisible(){return!(this.options.pinnedType!=null)||!!this.pinnedWidthFeature&&this.pinnedWidthFeature.getWidth()>0}onPinnedWidthChanged(){let e=this.isContainerVisible();this.visible!=e&&(this.visible=e,this.onDisplayedRowsChanged())}onDisplayedRowsChanged(e=!1){let t=this.options.getRowCtrls(this.beans.rowRenderer);if(!this.visible||t.length===0){this.comp.setRowCtrls({rowCtrls:this.EMPTY_CTRLS});return}let o=se(this.gos,"print"),r=this.gos.get("embedFullWidthRows")||o,a=t.filter(n=>{let s=n.isFullWidth();return this.options.fullWidth?!r&&s:r||!s});this.comp.setRowCtrls({rowCtrls:a,useFlushSync:e})}},Rd="ag-force-vertical-scroll",Lm="ag-selectable",Om="ag-column-moving",Hm=class extends S{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,r,a,n){var s,l;this.comp=e,this.eGridBody=t,this.eBodyViewport=o,this.eTop=i,this.eBottom=r,this.eStickyTop=a,this.eStickyBottom=n,this.eCenterColsViewport=o.querySelector(`.${yd("center")}`),this.eFullWidthContainer=o.querySelector(`.${Sd("fullWidth")}`),this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",c=>this.setCellTextSelection(c.currentValue)),this.createManagedBean(new Hn(this.comp)),this.scrollFeature=this.createManagedBean(new pm(o)),(s=this.beans.rowDragSvc)==null||s.setupRowDrag(o,this),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([i,o,r,a,n]),this.setGridRootRole(),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.updateScrollingClasses(),(l=this.filterManager)==null||l.setupAdvFilterHeaderComp(i),this.ctrlsSvc.register("gridBodyCtrl",this)}addEventListeners(){let 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){let t=e.type==="rowResizeStarted";this.eBodyViewport.classList.toggle("ag-prevent-animation",t)}onGridColumnsChanged(){let e=this.beans.colModel.getCols();this.comp.setColumnCount(e.length)}onScrollVisibilityChanged(){let{scrollVisibleSvc:e}=this,t=e.verticalScrollShowing;this.setVerticalScrollPaddingVisible(t),this.setStickyWidth(t),this.setStickyBottomOffsetBottom();let o=t&&e.getScrollbarWidth()||0,i=ed()?16:0,r=`calc(100% + ${o+i}px)`;ht(this.beans,()=>this.comp.setBodyViewportWidth(r)),this.updateScrollingClasses()}setGridRootRole(){let{rowGroupColsSvc:e,colModel:t,gos:o}=this,i=o.get("treeData");if(!i){let r=t.isPivotMode();i=(e?e.columns.length:0)>=(r?2:1)}this.comp.setGridRootRole(i?"treegrid":"grid")}addFocusListeners(e){for(let t of e)this.addManagedElementListeners(t,{focusin:o=>{let{target:i}=o,r=qt(i,"ag-root",t);t.classList.toggle("ag-has-focus",!r)},focusout:o=>{let{target:i,relatedTarget:r}=o,a=t.contains(r),n=qt(r,"ag-root",t);qt(i,"ag-root",t)||(!a||n)&&t.classList.remove("ag-has-focus")}})}setColumnMovingCss(e){this.comp.setColumnMovingCss(Om,e)}setCellTextSelection(e=!1){this.comp.setCellSelectableCss(Lm,e)}updateScrollingClasses(){let{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(){var e;(e=this.beans.editSvc)==null||e.addStopEditingWhenGridLosesFocus([this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop,this.eStickyBottom])}updateRowCount(){var r,a,n,s;let e=((a=(r=this.ctrlsSvc.getHeaderRowContainerCtrl())==null?void 0:r.getRowCount())!=null?a:0)+((s=(n=this.filterManager)==null?void 0:n.getHeaderRowCount())!=null?s:0),{rowModel:t}=this.beans,o=t.isLastRowIndexKnown()?t.getRowCount():-1,i=o===-1?-1:e+o;this.comp.setRowCount(i)}registerBodyViewportResizeListener(e){this.comp.registerBodyViewportResizeListener(e)}setVerticalScrollPaddingVisible(e){let t=e?"scroll":"hidden";this.comp.setPinnedTopBottomOverflowY(t)}isVerticalScrollShowing(){var c,d,g;let{gos:e,comp:t,ctrlsSvc:o}=this,i=e.get("alwaysShowVerticalScroll"),r=i?Rd:null,a=se(e,"normal");t.setAlwaysVerticalScrollClass(r,i);let n=(c=o.get("center"))==null?void 0:c.eViewport,s=(d=o.get("fakeHScrollComp"))==null?void 0:d.getGui(),l=(g=o.get("fakeVScrollComp"))==null?void 0:g.getGui();return i||a&&mm(this.eBodyViewport,n,void 0,l,s)}setupRowAnimationCssClass(){let{rowContainerHeight:e,environment:t}=this.beans,o=t.sizesMeasured,i=()=>{let r=o&&bo(this.gos)&&!e.stretching,a=r?"ag-row-animation":"ag-row-no-animation";this.comp.setRowAnimationCssOnBodyViewport(a,r)};i(),this.addManagedEventListeners({heightScaleChanged:i}),this.addManagedPropertyListener("animateRows",i),this.addManagedEventListeners({stylesChanged:()=>{!o&&t.sizesMeasured&&(o=!0,i())}})}addBodyViewportListener(){let{eBodyViewport:e,eStickyTop:t,eStickyBottom:o,eTop:i,eBottom:r,beans:{popupSvc:a,touchSvc:n}}=this,s=this.onBodyViewportContextMenu.bind(this);this.addManagedElementListeners(e,{contextmenu:s}),n==null||n.mockBodyContextMenu(this,s),this.addManagedElementListeners(e,{wheel:this.onBodyViewportWheel.bind(this,a)});let l=this.onStickyWheel.bind(this);for(let d of[t,o,i,r])this.addManagedElementListeners(d,{wheel:l});let c=this.onHorizontalWheel.bind(this);for(let d of["left","right","topLeft","topRight","bottomLeft","bottomRight"])this.addManagedElementListeners(this.ctrlsSvc.get(d).eContainer,{wheel:c});this.addFullWidthContainerWheelListener()}addFullWidthContainerWheelListener(){this.addManagedElementListeners(this.eFullWidthContainer,{wheel:e=>this.onFullWidthContainerWheel(e)})}onFullWidthContainerWheel(e){let{deltaX:t,deltaY:o,shiftKey:i}=e;(i||Math.abs(t)>Math.abs(o))&&li(this.beans,e)&&this.scrollGridBodyToMatchEvent(e)}onStickyWheel(e){let{deltaY:t}=e;this.scrollVertically(t)>0&&e.preventDefault()}onHorizontalWheel(e){let{deltaX:t,deltaY:o,shiftKey:i}=e;(i||Math.abs(t)>Math.abs(o))&&this.scrollGridBodyToMatchEvent(e)}scrollGridBodyToMatchEvent(e){let{deltaX:t,deltaY:o}=e;e.preventDefault(),this.eCenterColsViewport.scrollBy({left:t||o})}onBodyViewportContextMenu(e,t,o){var r;if(!e&&!o)return;this.gos.get("preventDefaultOnContextMenu")&&(e||o).preventDefault();let{target:i}=e||t;(i===this.eBodyViewport||i===this.ctrlsSvc.get("center").eViewport)&&((r=this.beans.contextMenuSvc)==null||r.showContextMenu({mouseEvent:e,touchEvent:o,value:null,anchorToElement:this.eGridBody,source:"ui"}))}onBodyViewportWheel(e,t){this.gos.get("suppressScrollWhenPopupsAreOpen")&&e!=null&&e.hasAnchoredPopup()&&t.preventDefault()}scrollVertically(e){let t=this.eBodyViewport.scrollTop;return this.scrollFeature.setVerticalScrollPosition(t+e),this.eBodyViewport.scrollTop-t}setFloatingHeights(){let{pinnedRowModel:e,beans:{environment:t}}=this,o=e==null?void 0:e.getPinnedTopTotalHeight(),i=e==null?void 0:e.getPinnedBottomTotalHeight(),r=t.getPinnedRowBorderWidth(),a=t.getRowBorderWidth(),n=r-a,s=o?n+o:0,l=i?n+i:0;this.comp.setTopHeight(s),this.comp.setBottomHeight(l),this.comp.setTopInvisible(s<=0),this.comp.setBottomInvisible(l<=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)this.comp.setStickyTopWidth("100%"),this.comp.setStickyBottomWidth("100%");else{let t=this.scrollVisibleSvc.getScrollbarWidth();this.comp.setStickyTopWidth(`calc(100% - ${t}px)`),this.comp.setStickyBottomWidth(`calc(100% - ${t}px)`)}}setStickyTopOffsetTop(){var r,a,n,s;let t=this.ctrlsSvc.get("gridHeaderCtrl").headerHeight+((a=(r=this.filterManager)==null?void 0:r.getHeaderHeight())!=null?a:0),o=(s=(n=this.pinnedRowModel)==null?void 0:n.getPinnedTopTotalHeight())!=null?s:0,i=0;t>0&&(i+=t),o>0&&(i+=o),i>0&&(i+=1),this.comp.setStickyTopTop(`${i}px`)}setStickyBottomOffsetBottom(){var s;let{pinnedRowModel:e,scrollVisibleSvc:t,comp:o}=this,i=(s=e==null?void 0:e.getPinnedBottomTotalHeight())!=null?s:0,a=t.horizontalScrollShowing&&t.getScrollbarWidth()||0,n=i+a;o.setStickyBottomBottom(`${n}px`)}};function oe(e){return Qt(e)}var Bm=class extends _{constructor(e,t,o,i,r){super(),this.cellCtrl=t,this.rowResizerElement=null,this.rendererVersion=0,this.editorVersion=0,this.beans=e,this.gos=e.gos,this.column=t.column,this.rowNode=t.rowNode,this.eRow=i;let a=oe({tag:"div",role:t.getCellAriaRole(),attrs:{"comp-id":`${this.getCompId()}`,"col-id":t.column.colIdSanitised}});this.eCell=a;let n;t.isCellSpanning()?(n=oe({tag:"div",cls:"ag-spanned-cell-wrapper",role:"presentation"}),n.appendChild(a),this.setTemplateFromElement(n)):this.setTemplateFromElement(a),this.cellCssManager=new Zc(()=>a),this.forceWrapper=t.isForceWrapper(),this.refreshWrapper(!1);let s={toggleCss:(l,c)=>this.cellCssManager.toggleCss(l,c),setUserStyles:l=>fi(a,l),getFocusableElement:()=>a,setIncludeSelection:l=>this.includeSelection=l,setIncludeRowDrag:l=>this.includeRowDrag=l,setIncludeDndSource:l=>this.includeDndSource=l,setRowResizerElement:l=>this.setRowResizerElement(l),setRenderDetails:(l,c,d)=>this.setRenderDetails(l,c,d),setEditDetails:(l,c,d)=>this.setEditDetails(l,c,d),getCellEditor:()=>this.cellEditor||null,getCellRenderer:()=>this.cellRenderer||null,getParentOfValue:()=>this.getParentOfValue(),refreshEditStyles:(l,c)=>this.refreshEditStyles(l,c)};t.setComp(s,a,n,this.eCellWrapper,o,r,void 0)}getParentOfValue(){var e,t;return(t=(e=this.eCellValue)!=null?e:this.eCellWrapper)!=null?t:this.eCell}setRowResizerElement(e){this.rowResizerElement&&De(this.rowResizerElement),this.rowResizerElement=e,e&&this.eCell.appendChild(e)}setRenderDetails(e,t,o){var a;if(this.cellEditor&&!this.cellEditorPopupWrapper)return;this.firstRender=this.firstRender==null;let r=this.refreshWrapper(!1);this.refreshEditStyles(!1),e?!(o||r)&&this.refreshCellRenderer(e)||(this.destroyRenderer(),this.createCellRendererInstance(e)):(this.destroyRenderer(),this.insertValueWithoutCellRenderer(t)),(a=this.rowDraggingComp)==null||a.refreshVisibility(),this.rowResizerElement&&!this.rowResizerElement.parentElement&&this.eCell.appendChild(this.rowResizerElement)}setEditDetails(e,t,o){e?this.createCellEditorInstance(e,t,o):this.destroyEditor()}removeControls(){let e=this.beans.context;this.checkboxSelectionComp=e.destroyBean(this.checkboxSelectionComp),this.dndSourceComp=e.destroyBean(this.dndSourceComp),this.rowDraggingComp=e.destroyBean(this.rowDraggingComp)}refreshWrapper(e){let t=this.includeRowDrag||this.includeDndSource||this.includeSelection,o=t||this.forceWrapper,i=o&&this.eCellWrapper==null;i&&(this.eCellWrapper=oe({tag:"div",cls:"ag-cell-wrapper",role:"presentation"}),this.eCell.appendChild(this.eCellWrapper));let r=!o&&this.eCellWrapper!=null;r&&(De(this.eCellWrapper),this.eCellWrapper=void 0),this.cellCssManager.toggleCss("ag-cell-value",!o);let a=!e&&o,n=a&&this.eCellValue==null;if(n){let c=this.cellCtrl.getCellValueClass();this.eCellValue=oe({tag:"span",cls:c,role:"presentation"}),this.eCellWrapper.appendChild(this.eCellValue)}let s=!a&&this.eCellValue!=null;s&&(De(this.eCellValue),this.eCellValue=void 0);let l=i||r||n||s;return l&&this.removeControls(),!e&&t&&this.addControls(),l}addControls(){let{cellCtrl:e,eCellWrapper:t,eCellValue:o,includeRowDrag:i,includeDndSource:r,includeSelection:a}=this,n=s=>{s&&t.insertBefore(s.getGui(),o)};i&&this.rowDraggingComp==null&&(this.rowDraggingComp=e.createRowDragComp(),n(this.rowDraggingComp)),r&&this.dndSourceComp==null&&(this.dndSourceComp=e.createDndSource(),n(this.dndSourceComp)),a&&this.checkboxSelectionComp==null&&(this.checkboxSelectionComp=e.createSelectionCheckbox(),n(this.checkboxSelectionComp))}createCellEditorInstance(e,t,o){let i=this.editorVersion,r=e.newAgStackInstance(),{params:a}=e;r.then(s=>this.afterCellEditorCreated(i,s,a,t,o)),Q(this.cellEditor)&&a.cellStartedEdit&&this.cellCtrl.focusCell(!0)}insertValueWithoutCellRenderer(e){let t=this.getParentOfValue();ne(t);let o=zo(e);o!=null&&(t.textContent=o)}destroyRenderer(){let{context:e}=this.beans;this.cellRenderer=e.destroyBean(this.cellRenderer),De(this.cellRendererGui),this.cellRendererGui=null,this.rendererVersion++}destroyEditor(){var o,i;let{context:e}=this.beans;(((o=this.cellEditorPopupWrapper)==null?void 0:o.getGui().contains(Y(this.beans)))||this.cellCtrl.hasBrowserFocus())&&this.eCell.focus({preventScroll:!0}),(i=this.hideEditorPopup)==null||i.call(this),this.hideEditorPopup=void 0,this.cellEditor=e.destroyBean(this.cellEditor),this.cellEditorPopupWrapper=e.destroyBean(this.cellEditorPopupWrapper),De(this.cellEditorGui),this.cellCtrl.disableEditorTooltipFeature(),this.cellEditorGui=null,this.editorVersion++}refreshCellRenderer(e){var o;if(((o=this.cellRenderer)==null?void 0:o.refresh)==null||this.cellRendererClass!==e.componentClass)return!1;let t=this.cellRenderer.refresh(e.params);return t===!0||t===void 0}createCellRendererInstance(e){var a;let t=this.rendererVersion,o=n=>s=>{if(this.rendererVersion!==t||!this.isAlive())return;let c=n.newAgStackInstance(),d=this.afterCellRendererCreated.bind(this,t,n.componentClass);c==null||c.then(d)},{animationFrameSvc:i}=this.beans,r;if(i!=null&&i.active&&this.firstRender?r=(n,s=!1)=>{i.createTask(o(n),this.rowNode.rowIndex,"p2",n.componentFromFramework,s)}:r=n=>o(n)(),(a=e.params)!=null&&a.deferRender&&!this.cellCtrl.rowNode.group){let{loadingComp:n,onReady:s}=this.cellCtrl.getDeferLoadingCellRenderer();n&&(r(n),s.then(()=>r(e,!0)))}else r(e)}afterCellRendererCreated(e,t,o){if(!this.isAlive()||e!==this.rendererVersion){this.beans.context.destroyBean(o);return}this.cellRenderer=o,this.cellRendererClass=t;let r=o.getGui();if(this.cellRendererGui=r,r!=null){let a=this.getParentOfValue();ne(a),a.appendChild(r)}}afterCellEditorCreated(e,t,o,i,r){var c,d,g;let a=e!==this.editorVersion,{context:n}=this.beans;if(a){n.destroyBean(t);return}if((c=t.isCancelBeforeStart)==null?void 0:c.call(t)){n.destroyBean(t),this.cellCtrl.stopEditing(!0);return}if(!t.getGui){k(97,{colId:this.column.getId()}),n.destroyBean(t);return}this.cellEditor=t,this.cellEditorGui=t.getGui();let l=i||((d=t.isPopup)==null?void 0:d.call(t));l?this.addPopupCellEditor(o,r):this.addInCellEditor(),this.refreshEditStyles(!0,l),(g=t.afterGuiAttached)==null||g.call(t),this.cellCtrl.enableEditorTooltipFeature(t),this.cellCtrl.cellEditorAttached()}refreshEditStyles(e,t){let{cellCssManager:o}=this;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)}addInCellEditor(){let{eCell:e}=this;e.contains(Y(this.beans))&&e.focus(),this.destroyRenderer(),this.refreshWrapper(!0),ne(this.getParentOfValue()),this.cellEditorGui&&this.getParentOfValue().appendChild(this.cellEditorGui)}addPopupCellEditor(e,t){var y,x;let{gos:o,context:i,popupSvc:r,editSvc:a}=this.beans;o.get("editType")==="fullRow"&&k(98);let n=this.cellEditorPopupWrapper=i.createBean(a.createPopupEditorWrapper(e)),{cellEditor:s,cellEditorGui:l,eCell:c,rowNode:d,column:g,cellCtrl:u}=this,h=n.getGui();l&&h.appendChild(l);let p=o.get("stopEditingWhenCellsLoseFocus"),f=t!=null?t:(x=(y=s.getPopupPosition)==null?void 0:y.call(s))!=null?x:"over",m=o.get("enableRtl"),v={ePopup:h,additionalParams:{column:g,rowNode:d},type:"popupCellEditor",eventSource:c,position:f,alignSide:m?"right":"left",keepWithinBounds:!0},C=r.positionPopupByComponent.bind(r,v),w=r.addPopup({modal:p,eChild:h,closeOnEsc:!0,closedCallback:R=>{u.onPopupEditorClosed(R)},anchorToElement:c,positionCallback:C,ariaOwns:c});w&&(this.hideEditorPopup=w.hideFunc)}detach(){this.getGui().remove()}destroy(){this.destroyRenderer(),this.destroyEditor(),this.removeControls(),super.destroy()}},Vm=class extends _{constructor(e,t,o){super(),this.cellComps=new Map,this.beans=t,this.rowCtrl=e;let i=oe({tag:"div",role:"row",attrs:{"comp-id":`${this.getCompId()}`}});this.setInitialStyle(i,o),this.setTemplateFromElement(i);let r=i.style;this.domOrder=this.rowCtrl.getDomOrder();let a={setDomOrder:n=>this.domOrder=n,setCellCtrls:n=>this.setCellCtrls(n),showFullWidth:n=>this.showFullWidth(n),getFullWidthCellRenderer:()=>this.fullWidthCellRenderer,getFullWidthCellRendererParams:()=>this.fullWidthCellRendererParams,toggleCss:(n,s)=>this.toggleCss(n,s),setUserStyles:n=>fi(i,n),setTop:n=>r.top=n,setTransform:n=>r.transform=n,setRowIndex:n=>i.setAttribute("row-index",n),setRowId:n=>i.setAttribute("row-id",n),setRowBusinessKey:n=>i.setAttribute("row-business-key",n),refreshFullWidth:n=>{var l,c,d;let s=n();return this.fullWidthCellRendererParams=s,(d=(c=(l=this.fullWidthCellRenderer)==null?void 0:l.refresh)==null?void 0:c.call(l,s))!=null?d:!1}};e.setComp(a,this.getGui(),o,void 0),this.addDestroyFunc(()=>{e.unsetComp(o)})}setInitialStyle(e,t){let o=this.rowCtrl.getInitialTransform(t);if(o)e.style.setProperty("transform",o);else{let i=this.rowCtrl.getInitialRowTop(t);i&&e.style.setProperty("top",i)}}showFullWidth(e){let t=i=>{if(this.isAlive()){let r=i.getGui();this.getGui().appendChild(r),this.rowCtrl.setupDetailRowAutoHeight(r),this.setFullWidthRowComp(i,e.params)}else this.beans.context.destroyBean(i)};e.newAgStackInstance().then(t)}setCellCtrls(e){let t=new Map(this.cellComps);for(let o of e){let i=o.instanceId;this.cellComps.has(i)?t.delete(i):this.newCellComp(o)}this.destroyCells(t),this.ensureDomOrder(e)}ensureDomOrder(e){if(!this.domOrder)return;let t=[];for(let o of e){let i=this.cellComps.get(o.instanceId);i&&t.push(i.getGui())}uc(this.getGui(),t)}newCellComp(e){var i,r;let t=(r=(i=this.beans.editSvc)==null?void 0:i.isEditing(e,{withOpenEditor:!0}))!=null?r:!1,o=new Bm(this.beans,e,this.rowCtrl.printLayout,this.getGui(),t);this.cellComps.set(e.instanceId,o),this.getGui().appendChild(o.getGui())}destroy(){super.destroy(),this.destroyCells(this.cellComps)}setFullWidthRowComp(e,t){this.fullWidthCellRenderer=e,this.fullWidthCellRendererParams=t,this.addDestroyFunc(()=>{this.fullWidthCellRenderer=this.beans.context.destroyBean(this.fullWidthCellRenderer),this.fullWidthCellRendererParams=void 0})}destroyCells(e){for(let t of e.values()){if(!t)continue;let o=t.cellCtrl.instanceId;this.cellComps.get(o)===t&&(t.detach(),t.destroy(),this.cellComps.delete(o))}}};function Nm(e,t,o){let i=!!o.gos.get("enableCellSpan")&&!!t.getSpannedRowCtrls,r={tag:"div",ref:"eContainer",cls:Sd(e),role:"rowgroup"};if(t.type==="center"||i){let a={tag:"div",ref:"eSpannedContainer",cls:`ag-spanning-container ${km(e)}`,role:"presentation"};return r.role="presentation",{tag:"div",ref:"eViewport",cls:`ag-viewport ${yd(e)}`,role:"rowgroup",children:[r,i?a:null]}}return r}var Gm=class extends _{constructor(e){super(),this.eViewport=E,this.eContainer=E,this.eSpannedContainer=E,this.rowCompsNoSpan={},this.rowCompsWithSpan={},this.name=e==null?void 0:e.name,this.options=bi(this.name)}postConstruct(){this.setTemplate(Nm(this.name,this.options,this.beans));let e={setHorizontalScroll:o=>this.eViewport.scrollLeft=o,setViewportHeight:o=>this.eViewport.style.height=o,setRowCtrls:({rowCtrls:o})=>this.setRowCtrls(o),setSpannedRowCtrls:o=>this.setRowCtrls(o,!0),setDomOrder:o=>{this.domOrder=o},setContainerWidth:o=>{this.eContainer.style.width=o,this.eSpannedContainer&&(this.eSpannedContainer.style.width=o)},setOffsetTop:o=>{let i=`translateY(${o})`;this.eContainer.style.transform=i,this.eSpannedContainer&&(this.eSpannedContainer.style.transform=i)}};this.createManagedBean(new zm(this.name)).setComp(e,this.eContainer,this.eSpannedContainer,this.eViewport)}destroy(){this.setRowCtrls([]),this.setRowCtrls([],!0),super.destroy(),this.lastPlacedElement=null}setRowCtrls(e,t){let{beans:o,options:i}=this,r=t?this.eSpannedContainer:this.eContainer,a=t?{...this.rowCompsWithSpan}:{...this.rowCompsNoSpan},n={};t?this.rowCompsWithSpan=n:this.rowCompsNoSpan=n,this.lastPlacedElement=null;let s=[];for(let l of e){let c=l.instanceId,d=a[c],g;if(d)g=d,delete a[c];else{if(!l.rowNode.displayed)continue;g=new Vm(l,o,i.type)}n[c]=g,s.push([g,!d])}this.removeOldRows(Object.values(a)),this.addRowNodes(s,r)}addRowNodes(e,t){let{domOrder:o}=this;for(let[i,r]of e){let a=i.getGui();o?this.ensureDomOrder(a,t):r&&t.appendChild(a)}}removeOldRows(e){for(let t of e)t.getGui().remove(),t.destroy()}ensureDomOrder(e,t){gc(t,e,this.lastPlacedElement),this.lastPlacedElement=e}},Wm={selector:"AG-ROW-CONTAINER",component:Gm};function Go(e,t){return t.map(o=>{let i=`e${o[0].toUpperCase()+o.substring(1)}RowContainer`;return e[i]={name:o},{tag:"ag-row-container",ref:i,attrs:{name:o}}})}function qm(e){let t={},o={tag:"div",ref:"eGridRoot",cls:"ag-root ag-unselectable",children:[{tag:"ag-header-root"},{tag:"div",ref:"eTop",cls:"ag-floating-top",role:"presentation",children:Go(t,["topLeft","topCenter","topRight","topFullWidth"])},{tag:"div",ref:"eBody",cls:"ag-body",role:"presentation",children:[{tag:"div",ref:"eBodyViewport",cls:"ag-body-viewport",role:"presentation",children:Go(t,["left","center","right","fullWidth"])},{tag:"ag-fake-vertical-scroll"}]},{tag:"div",ref:"eStickyTop",cls:"ag-sticky-top",role:"presentation",children:Go(t,["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"])},{tag:"div",ref:"eStickyBottom",cls:"ag-sticky-bottom",role:"presentation",children:Go(t,["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"])},{tag:"div",ref:"eBottom",cls:"ag-floating-bottom",role:"presentation",children:Go(t,["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"])},{tag:"ag-fake-horizontal-scroll"},e?{tag:"ag-overlay-wrapper"}:null]};return{paramsMap:t,elementParams:o}}var _m=class extends _{constructor(){super(...arguments),this.eGridRoot=E,this.eBodyViewport=E,this.eStickyTop=E,this.eStickyBottom=E,this.eTop=E,this.eBottom=E,this.eBody=E}postConstruct(){let{overlays:e,rangeSvc:t}=this.beans,o=e==null?void 0:e.getOverlayWrapperSelector(),{paramsMap:i,elementParams:r}=qm(!!o);this.setTemplate(r,[...o?[o]:[],dm,hm,sm,Wm],i);let a=(s,l)=>{let c=`${s}px`;l.style.minHeight=c,l.style.height=c},n={setRowAnimationCssOnBodyViewport:(s,l)=>this.setRowAnimationCssOnBodyViewport(s,l),setColumnCount:s=>Iu(this.getGui(),s),setRowCount:s=>Mu(this.getGui(),s),setTopHeight:s=>a(s,this.eTop),setBottomHeight:s=>a(s,this.eBottom),setTopInvisible:s=>this.eTop.classList.toggle("ag-invisible",s),setBottomInvisible:s=>this.eBottom.classList.toggle("ag-invisible",s),setStickyTopHeight:s=>this.eStickyTop.style.height=s,setStickyTopTop:s=>this.eStickyTop.style.top=s,setStickyTopWidth:s=>this.eStickyTop.style.width=s,setStickyBottomHeight:s=>{this.eStickyBottom.style.height=s,this.eStickyBottom.classList.toggle("ag-invisible",s==="0px")},setStickyBottomBottom:s=>this.eStickyBottom.style.bottom=s,setStickyBottomWidth:s=>this.eStickyBottom.style.width=s,setColumnMovingCss:(s,l)=>this.toggleCss(s,l),updateLayoutClasses:(s,l)=>{let c=[this.eBodyViewport.classList,this.eBody.classList];for(let d of c)d.toggle(Oe.AUTO_HEIGHT,l.autoHeight),d.toggle(Oe.NORMAL,l.normal),d.toggle(Oe.PRINT,l.print);this.toggleCss(Oe.AUTO_HEIGHT,l.autoHeight),this.toggleCss(Oe.NORMAL,l.normal),this.toggleCss(Oe.PRINT,l.print)},setAlwaysVerticalScrollClass:(s,l)=>this.eBodyViewport.classList.toggle(Rd,l),registerBodyViewportResizeListener:s=>{let l=Tt(this.beans,this.eBodyViewport,s);this.addDestroyFunc(()=>l())},setPinnedTopBottomOverflowY:s=>this.eTop.style.overflowY=this.eBottom.style.overflowY=s,setCellSelectableCss:(s,l)=>{for(let c of[this.eTop,this.eBodyViewport,this.eBottom])c.classList.toggle(s,l)},setBodyViewportWidth:s=>this.eBodyViewport.style.width=s,setGridRootRole:s=>Rt(this.eGridRoot,s)};this.ctrl=this.createManagedBean(new Hm),this.ctrl.setComp(n,this.getGui(),this.eBodyViewport,this.eTop,this.eBottom,this.eStickyTop,this.eStickyBottom),(t&&dt(this.gos)||di(this.gos))&&Du(this.getGui(),!0)}setRowAnimationCssOnBodyViewport(e,t){let o=this.eBodyViewport.classList;o.toggle("ag-row-animation",t),o.toggle("ag-row-no-animation",!t)}getFocusableContainerName(){return"gridBody"}},Um={selector:"AG-GRID-BODY",component:_m},ra={TAB_GUARD:"ag-tab-guard",TAB_GUARD_TOP:"ag-tab-guard-top",TAB_GUARD_BOTTOM:"ag-tab-guard-bottom"},jm=class extends ve{constructor(e,t){super(),this.stopPropagationCallbacks=t,this.skipTabGuardFocus=!1,this.forcingFocusOut=!1,this.allowFocus=!1;let{comp:o,eTopGuard:i,eBottomGuard:r,focusTrapActive:a,forceFocusOutWhenTabGuardsAreEmpty:n,isFocusableContainer:s,focusInnerElement:l,onFocusIn:c,onFocusOut:d,shouldStopEventPropagation:g,onTabKeyDown:u,handleKeyDown:h,isEmpty:p,eFocusableElement:f}=e;this.comp=o,this.eTopGuard=i,this.eBottomGuard=r,this.providedFocusInnerElement=l,this.eFocusableElement=f,this.focusTrapActive=!!a,this.forceFocusOutWhenTabGuardsAreEmpty=!!n,this.isFocusableContainer=!!s,this.providedFocusIn=c,this.providedFocusOut=d,this.providedShouldStopEventPropagation=g,this.providedOnTabKeyDown=u,this.providedHandleKeyDown=h,this.providedIsEmpty=p}postConstruct(){this.createManagedBean(new id(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(let 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():!1}activateTabGuards(){if(this.forcingFocusOut)return;let 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){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.skipTabGuardFocus){this.skipTabGuardFocus=!1;return}if(this.forceFocusOutWhenTabGuardsAreEmpty&&(this.providedIsEmpty?this.providedIsEmpty():Kt(this.eFocusableElement,".ag-tab-guard").length===0)){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.isFocusableContainer&&this.eFocusableElement.contains(e.relatedTarget))return;let t=e.target===this.eBottomGuard;!(this.providedFocusInnerElement?this.providedFocusInnerElement(t):this.focusInnerElement(t))&&this.forceFocusOutWhenTabGuardsAreEmpty&&this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard)}findNextElementOutsideAndFocus(e){var l;let t=te(this.beans),o=Kt(t.body,null,!0),i=o.indexOf(e?this.eTopGuard:this.eBottomGuard);if(i===-1)return;let r,a;e?(r=0,a=i):(r=i+1,a=o.length);let n=o.slice(r,a),s=this.gos.get("tabIndex");n.sort((c,d)=>{let g=Number.parseInt(c.getAttribute("tabindex")||"0"),u=Number.parseInt(d.getAttribute("tabindex")||"0");return u===s?1:g===s?-1:g===0?1:u===0?-1:g-u}),(l=n[e?n.length-1:0])==null||l.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){this.providedOnTabKeyDown(e);return}if(this.focusTrapActive||e.defaultPrevented)return;let t=this.tabGuardsAreActive();t&&this.deactivateTabGuards();let o=this.getNextFocusableElement(e.shiftKey);t&&setTimeout(()=>this.activateTabGuards(),0),o&&(o.focus(),e.preventDefault())}focusInnerElement(e=!1){let t=Kt(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):!1}getNextFocusableElement(e){return no(this.beans,this.eFocusableElement,!1,e)}forceFocusOutOfContainer(e=!1){if(this.forcingFocusOut)return;let 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!=null?t:!0)}setAllowFocus(e){this.allowFocus=e}},Km=class extends ve{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();let{eTopGuard:t,eBottomGuard:o,eFocusableElement:i,stopPropagationCallbacks:r}=this,a=[t,o],n={setTabIndex:v=>{for(let C of a)v==null?C.removeAttribute("tabindex"):C.setAttribute("tabindex",v)}};this.addTabGuards(t,o);let{focusTrapActive:s=!1,onFocusIn:l,onFocusOut:c,focusInnerElement:d,handleKeyDown:g,onTabKeyDown:u,shouldStopEventPropagation:h,isEmpty:p,forceFocusOutWhenTabGuardsAreEmpty:f,isFocusableContainer:m}=e;this.tabGuardCtrl=this.createManagedBean(new jm({comp:n,focusTrapActive:s,eTopGuard:t,eBottomGuard:o,eFocusableElement:i,onFocusIn:l,onFocusOut:c,focusInnerElement:d,handleKeyDown:g,onTabKeyDown:u,shouldStopEventPropagation:h,isEmpty:p,forceFocusOutWhenTabGuardsAreEmpty:f,isFocusableContainer:m},r))}getTabGuardCtrl(){return this.tabGuardCtrl}createTabGuard(e){let t=te(this.beans).createElement("div"),o=e==="top"?ra.TAB_GUARD_TOP:ra.TAB_GUARD_BOTTOM;return t.classList.add(ra.TAB_GUARD,o),Rt(t,"presentation"),t}addTabGuards(e,t){let o=this.eFocusableElement;o.prepend(e),o.append(t)}removeAllChildrenExceptTabGuards(){let e=[this.eTopGuard,this.eBottomGuard];ne(this.comp.getFocusableElement()),this.addTabGuards(...e)}forceFocusOutOfContainer(e=!1){this.tabGuardCtrl.forceFocusOutOfContainer(e)}appendChild(e,t,o){fn(t)||(t=t.getGui());let{eBottomGuard:i}=this;i?i.before(t):e(t,o)}destroy(){let{eTopGuard:e,eBottomGuard:t}=this;De(e),De(t),super.destroy()}},$m=class extends Lo{initialiseTabGuard(e,t){this.tabGuardFeature=this.createManagedBean(new Km(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)}},Ed=class extends $m{initialiseTabGuard(e){super.initialiseTabGuard(e,ad)}},Ks=(e,t)=>cd(e,()=>Jt(e.getGui(),t,!1,!0)),$s=e=>{var t;return(t=e==null?void 0:e.getFocusableContainerName())!=null?t:"external"},Ym=e=>e==null?"external":typeof e=="string"?e:"gridBody",Qm=class extends S{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());let{dragAndDrop:i,ctrlsSvc:r}=this.beans;i==null||i.registerGridDropTarget(()=>this.eGui,this),this.createManagedBean(new Hn(this.view)),this.view.setRtlClass(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr");let a=Tt(this.beans,this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc(()=>a()),r.register("gridCtrl",this)}isDetailGrid(){var t;let e=od(this.getGui());return((t=e==null?void 0:e.getAttribute("row-id"))==null?void 0:t.startsWith("detail"))||!1}getOptionalSelectors(){var t,o,i,r,a;let e=this.beans;return{paginationSelector:(t=e.pagination)==null?void 0:t.getPaginationSelector(),gridHeaderDropZonesSelector:(o=e.registry)==null?void 0:o.getSelector("AG-GRID-HEADER-DROP-ZONES"),sideBarSelector:(i=e.sideBar)==null?void 0:i.getSelector(),statusBarSelector:(r=e.registry)==null?void 0:r.getSelector("AG-STATUS-BAR"),watermarkSelector:(a=e.licenseManager)==null?void 0:a.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){let{view:t}=this;e===!1?t.setCursor(null):t.setCursor(e===1?"ew-resize":"ns-resize")}disableUserSelect(e){this.view.setUserSelect(e?"none":null)}focusNextInnerContainer(e){let t=this.getFocusableContainers(),{indexWithFocus:o,nextIndex:i}=this.getNextFocusableIndex(t,e),r=o===-1?e?t.length-1:0:i,{gos:a,beans:{focusSvc:n,navigation:s}}=this,l=a.getCallback("tabToNextGridContainer");if(l){let c=n.getDefaultTabToNextGridContainerTarget({backwards:e,focusableContainers:t,nextIndex:r}),d=$s(t[r]),g=c==null&&d==="gridBody"?"gridBody":Ym(c),u=l({backwards:e,previousContainer:$s(t[o]),nextContainer:g,defaultTarget:c});if(u!==void 0){if(typeof u=="boolean")return u;if(typeof u=="string"){if(u==="gridBody")return this.focusGridBodyDefault(e)||void 0;let h=t.find(p=>p.getFocusableContainerName()===u);if(!h){wc(`tabToNextGridContainer - ${u} container not found`);return}return Ks(h,e)?!0:void 0}return Vf(u)?n.focusHeaderPosition({headerPosition:u})||void 0:(s==null||s.ensureCellVisible(u),n.setFocusedCell({...u,forceBrowserFocus:!0}),n.isCellFocused(u)||void 0)}}return this.focusNextInnerContainerDefault({backwards:e,focusableContainers:t,indexWithFocus:o,nextIndex:r})||void 0}focusInnerElement(e){let{gos:t,beans:o,beans:{focusSvc:i,visibleCols:r}}=this,a=t.getCallback("focusGridInnerElement");if(a!=null&&a({fromBottom:!!e}))return!0;let n=this.getFocusableContainers();if(e)return this.focusNextInnerContainerDefault({backwards:!0,focusableContainers:n,indexWithFocus:n.length,nextIndex:n.length-1})?!0:i.focusGridView({column:U(r.allCols),backwards:!0});let s=r.allCols;if(t.get("headerHeight")===0||Le(o)){if(i.focusGridView({column:s[0],backwards:e}))return!0;for(let l=1;lr.getGui().contains(o));return{indexWithFocus:i,nextIndex:i+(t?-1:1)}}focusGridBodyDefault(e){let{gos:t,beans:o,beans:{focusSvc:i,visibleCols:{allCols:r}}}=this;return e?i.focusGridView({column:U(r),backwards:!0}):t.get("headerHeight")===0||Le(o)?i.focusGridView({column:r[0]}):i.focusFirstHeader()}focusNextInnerContainerDefault(e){let{backwards:t,focusableContainers:o,indexWithFocus:i}=e,r=t?-1:1;for(let a=e.nextIndex;a>=0&&aa:ithis.destroyBean(this),setRtlClass:a=>this.addCss(a),forceFocusOutOfContainer:this.forceFocusOutOfContainer.bind(this),updateLayoutClasses:this.updateLayoutClasses.bind(this),getFocusableContainers:this.getFocusableContainers.bind(this),setUserSelect:a=>{this.getGui().style.userSelect=a!=null?a:"",this.getGui().style.webkitUserSelect=a!=null?a:""},setCursor:a=>{this.getGui().style.cursor=a!=null?a:""}},t=this.createManagedBean(new Qm),o=t.getOptionalSelectors(),i=this.createTemplate(o),r=[Um,...Object.values(o).filter(a=>!!a)];this.setTemplate(i,r),t.setComp(e,this.eGridDiv,this.getGui()),this.insertGridIntoDom(),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:a=>t.focusInnerElement(a),forceFocusOutWhenTabGuardsAreEmpty:!0,isEmpty:()=>!t.isFocusable()})}insertGridIntoDom(){let e=this.getGui();this.eGridDiv.appendChild(e),this.addDestroyFunc(()=>{e.remove(),Et(this.gos,"Grid removed from DOM")})}updateLayoutClasses(e,t){let o=this.rootWrapperBody.classList,{AUTO_HEIGHT:i,NORMAL:r,PRINT:a}=Oe,{autoHeight:n,normal:s,print:l}=t;o.toggle(i,n),o.toggle(r,s),o.toggle(a,l),this.toggleCss(i,n),this.toggleCss(r,s),this.toggleCss(a,l)}createTemplate(e){let t=e.gridHeaderDropZonesSelector?{tag:"ag-grid-header-drop-zones",ref:"gridHeaderDropZones"}:null,o=e.sideBarSelector?{tag:"ag-side-bar",ref:"sideBar"}:null,i=e.statusBarSelector?{tag:"ag-status-bar",ref:"statusBar"}:null,r=e.watermarkSelector?{tag:"ag-watermark"}:null,a=e.paginationSelector?{tag:"ag-pagination",ref:"pagination"}:null;return{tag:"div",cls:"ag-root-wrapper",role:"presentation",children:[t,{tag:"div",ref:"rootWrapperBody",cls:"ag-root-wrapper-body",role:"presentation",children:[{tag:"ag-grid-body",ref:"gridBody"},o]},i,a,r]}}getFocusableElement(){return this.rootWrapperBody}forceFocusOutOfContainer(e=!1){var t;if(!e&&((t=this.pagination)!=null&&t.isDisplayed())){this.pagination.forceFocusOutOfContainer(e);return}super.forceFocusOutOfContainer(e)}getFocusableContainers(){var t,o,i;let e=[...(i=(o=(t=this.gridHeaderDropZones)==null?void 0:t.getFocusableContainers)==null?void 0:o.call(t))!=null?i:[],this.gridBody];for(let r of[this.sideBar,this.statusBar,this.pagination])r&&e.push(r);return e.filter(r=>Ie(r.getGui()))}},B=(e,t)=>{for(let o of Object.keys(t))t[o]=e;return t},Ys={dispatchEvent:"CommunityCore",...B("CommunityCore",{destroy:0,getGridId:0,getGridOption:0,isDestroyed:0,setGridOption:0,updateGridOptions:0,isModuleRegistered:0}),...B("GridState",{getState:0,setState:0}),...B("SharedRowSelection",{setNodesSelected:0,selectAll:0,deselectAll:0,selectAllFiltered:0,deselectAllFiltered:0,selectAllOnCurrentPage:0,deselectAllOnCurrentPage:0,getSelectedNodes:0,getSelectedRows:0}),...B("RowApi",{redrawRows:0,setRowNodeExpanded:0,getRowNode:0,addRenderedRowListener:0,getRenderedNodes:0,forEachNode:0,getFirstDisplayedRowIndex:0,getLastDisplayedRowIndex:0,getDisplayedRowAtIndex:0,getDisplayedRowCount:0}),...B("ScrollApi",{getVerticalPixelRange:0,getHorizontalPixelRange:0,ensureColumnVisible:0,ensureIndexVisible:0,ensureNodeVisible:0}),...B("KeyboardNavigation",{getFocusedCell:0,clearFocusedCell:0,setFocusedCell:0,tabToNextCell:0,tabToPreviousCell:0,setFocusedHeader:0}),...B("EventApi",{addEventListener:0,addGlobalListener:0,removeEventListener:0,removeGlobalListener:0}),...B("ValueCache",{expireValueCache:0}),...B("CellApi",{getCellValue:0}),...B("SharedMenu",{showColumnMenu:0,hidePopupMenu:0}),...B("Sort",{onSortChanged:0}),...B("PinnedRow",{getPinnedTopRowCount:0,getPinnedBottomRowCount:0,getPinnedTopRow:0,getPinnedBottomRow:0,forEachPinnedRow:0}),...B("Overlay",{showLoadingOverlay:0,showNoRowsOverlay:0,hideOverlay:0}),...B("RenderApi",{setGridAriaProperty:0,refreshCells:0,refreshHeader:0,isAnimationFrameQueueEmpty:0,flushAllAnimationFrames:0,getSizesForCurrentTheme:0,getCellRendererInstances:0}),...B("HighlightChanges",{flashCells:0}),...B("RowDrag",{addRowDropZone:0,removeRowDropZone:0,getRowDropZoneParams:0,getRowDropPositionIndicator:0,setRowDropPositionIndicator:0}),...B("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}),...B("ColumnAutoSize",{sizeColumnsToFit:0,autoSizeColumns:0,autoSizeAllColumns:0}),...B("ColumnGroup",{setColumnGroupOpened:0,getColumnGroup:0,getProvidedColumnGroup:0,getDisplayNameForColumnGroup:0,getColumnGroupState:0,setColumnGroupState:0,resetColumnGroupState:0,getLeftDisplayedColumnGroups:0,getCenterDisplayedColumnGroups:0,getRightDisplayedColumnGroups:0,getAllDisplayedColumnGroups:0}),...B("ColumnMove",{moveColumnByIndex:0,moveColumns:0}),...B("ColumnResize",{setColumnWidths:0}),...B("ColumnHover",{isColumnHovered:0}),...B("EditCore",{getCellEditorInstances:0,getEditingCells:0,getEditRowValues:0,stopEditing:0,startEditingCell:0,isEditing:0,validateEdit:0}),...B("BatchEdit",{startBatchEdit:0,cancelBatchEdit:0,commitBatchEdit:0,isBatchEditing:0}),...B("UndoRedoEdit",{undoCellEditing:0,redoCellEditing:0,getCurrentUndoSize:0,getCurrentRedoSize:0}),...B("FilterCore",{isAnyFilterPresent:0,onFilterChanged:0}),...B("ColumnFilter",{isColumnFilterPresent:0,getColumnFilterInstance:0,destroyFilter:0,setFilterModel:0,getFilterModel:0,getColumnFilterModel:0,setColumnFilterModel:0,showColumnFilter:0,hideColumnFilter:0,getColumnFilterHandler:0,doFilterAction:0}),...B("QuickFilter",{isQuickFilterPresent:0,getQuickFilter:0,resetQuickFilter:0}),...B("Find",{findGetActiveMatch:0,findGetTotalMatches:0,findGoTo:0,findNext:0,findPrevious:0,findGetNumMatches:0,findGetParts:0,findClearActive:0,findRefresh:0}),...B("Pagination",{paginationIsLastPageFound:0,paginationGetPageSize:0,paginationGetCurrentPage:0,paginationGetTotalPages:0,paginationGetRowCount:0,paginationGoToNextPage:0,paginationGoToPreviousPage:0,paginationGoToFirstPage:0,paginationGoToLastPage:0,paginationGoToPage:0}),...B("CsrmSsrmSharedApi",{expandAll:0,collapseAll:0,resetRowGroupExpansion:0}),...B("SsrmInfiniteSharedApi",{setRowCount:0,getCacheBlockState:0,isLastRowIndexKnown:0}),...B("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}),...B("CsvExport",{getDataAsCsv:0,exportDataAsCsv:0}),...B("InfiniteRowModel",{refreshInfiniteCache:0,purgeInfiniteCache:0,getInfiniteRowCount:0}),...B("AdvancedFilter",{getAdvancedFilterModel:0,setAdvancedFilterModel:0,showAdvancedFilterBuilder:0,hideAdvancedFilterBuilder:0}),...B("IntegratedCharts",{getChartModels:0,getChartRef:0,getChartImageDataURL:0,downloadChart:0,openChartToolPanel:0,closeChartToolPanel:0,createRangeChart:0,createPivotChart:0,createCrossFilterChart:0,updateChart:0,restoreChart:0}),...B("Clipboard",{copyToClipboard:0,cutToClipboard:0,copySelectedRowsToClipboard:0,copySelectedRangeToClipboard:0,copySelectedRangeDown:0,pasteFromClipboard:0}),...B("ExcelExport",{getDataAsExcel:0,exportDataAsExcel:0,getSheetDataForExcel:0,getMultipleSheetsAsExcel:0,exportMultipleSheetsAsExcel:0}),...B("SharedMasterDetail",{addDetailGridInfo:0,removeDetailGridInfo:0,getDetailGridInfo:0,forEachDetailGridInfo:0}),...B("ContextMenu",{showContextMenu:0}),...B("ColumnMenu",{showColumnChooser:0,hideColumnChooser:0}),...B("CellSelection",{getCellRanges:0,addCellRange:0,clearRangeSelection:0,clearCellSelection:0}),...B("SharedRowGrouping",{setRowGroupColumns:0,removeRowGroupColumns:0,addRowGroupColumns:0,getRowGroupColumns:0,moveRowGroupColumn:0}),...B("SharedAggregation",{addAggFuncs:0,clearAggFuncs:0,setColumnAggFunc:0}),...B("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}),...B("ServerSideRowModelApi",{getServerSideSelectionState:0,setServerSideSelectionState:0,applyServerSideTransaction:0,applyServerSideTransactionAsync:0,applyServerSideRowData:0,retryServerSideLoads:0,flushServerSideAsyncTransactions:0,refreshServerSide:0,getServerSideGroupLevelState:0,onRowHeightChanged:0,resetRowHeights:0}),...B("SideBar",{isSideBarVisible:0,setSideBarVisible:0,setSideBarPosition:0,openToolPanel:0,closeToolPanel:0,getOpenedToolPanel:0,refreshToolPanel:0,isToolPanelShowing:0,getToolPanelInstance:0,getSideBar:0}),...B("StatusBar",{getStatusPanel:0}),...B("AiToolkit",{getStructuredSchema:0})},aa={isDestroyed:()=>!0,destroy(){},preConstruct(){},postConstruct(){},preWireBeans(){},wireBeans(){}},Jm=(e,t)=>e.eventSvc.dispatchEvent(t),Fd=class{};Reflect.defineProperty(Fd,"name",{value:"GridApi"});var Xm=class extends S{constructor(){super(),this.beanName="apiFunctionSvc",this.api=new Fd,this.fns={...aa,dispatchEvent:Jm},this.preDestroyLink="";let{api:e}=this;for(let t of Object.keys(Ys))e[t]=this.makeApi(t)[t]}postConstruct(){this.preDestroyLink=this.beans.frameworkOverrides.getDocLink("grid-lifecycle/#grid-pre-destroyed")}addFunction(e,t){var r,a;let{fns:o,beans:i}=this;o!==aa&&(o[e]=(a=(r=i==null?void 0:i.validation)==null?void 0:r.validateApiFunction(e,t))!=null?a:t)}makeApi(e){return{[e]:(...t)=>{let{beans:o,fns:{[e]:i}}=this;return i?i(o,...t):this.apiNotFound(e)}}}apiNotFound(e){let{beans:t,gos:o,preDestroyLink:i}=this;if(!t)k(26,{fnName:e,preDestroyLink:i});else{let r=Ys[e];o.assertModuleRegistered(r,`api.${e}`)&&k(27,{fnName:e,module:r})}}destroy(){super.destroy(),this.fns=aa,this.beans=null}};function ev(e){return e.context.getId()}function tv(e){e.gridDestroySvc.destroy()}function ov(e){return e.gridDestroySvc.destroyCalled}function iv(e,t){return e.gos.get(t)}function rv(e,t,o){Dd(e,{[t]:o})}function Dd(e,t){e.gos.updateGridOptions({options:t})}function av(e,t){let o=t.replace(/Module$/,"");return e.gos.isModuleRegistered(o)}function nv(e,t,o){let i=ye(e,t,o);if(i){let{className:a}=i;if(typeof a=="string"&&a.includes("ag-icon")||typeof a=="object"&&a["ag-icon"])return i}let r=oe({tag:"span"});return r.appendChild(i),r}function ye(e,t,o){var a;let i=null;e==="smallDown"?k(262):e==="smallLeft"?k(263):e==="smallRight"&&k(264);let r=o==null?void 0:o.getColDef().icons;if(r&&(i=r[e]),t.gos&&!i){let n=t.gos.get("icons");n&&(i=n[e])}if(i){let n;if(typeof i=="function")n=i();else if(typeof i=="string")n=i;else{k(38,{iconName:e});return}if(typeof n=="string")return hn(n);if(fn(n))return n;k(133,{iconName:e});return}else{let n=t.registry.getIcon(e);return n||(a=t.validation)==null||a.validateIcon(e),oe({tag:"span",cls:`ag-icon ag-icon-${n!=null?n:e}`,role:"presentation",attrs:{unselectable:"on"}})}}var sv={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{draggable:"true"}},lv=class extends _{constructor(e,t,o){super(sv),this.rowNode=e,this.column=t,this.eCell=o}postConstruct(){this.getGui().appendChild(ye("rowDrag",this.beans,null)),this.addGuiEventListener("mousedown",t=>{t.stopPropagation()}),this.addDragSource(),this.checkVisibility()}addDragSource(){this.addGuiEventListener("dragstart",this.onDragStart.bind(this))}onDragStart(e){let{rowNode:t,column:o,eCell:i,gos:r}=this,a=o.getColDef().dndSourceOnRowDrag,n=e.dataTransfer;if(n.setDragImage(i,0,0),a){let s=O(r,{rowNode:t,dragEvent:e});a(s)}else try{let s=JSON.stringify(t.data);n.setData("application/json",s),n.setData("text/plain",s)}catch{}}checkVisibility(){let e=this.column.isDndSource(this.rowNode);this.setDisplayed(e)}},cv=".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)}",dv={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"}]}]},gv=class extends _{constructor(){super(),this.dragSource=null,this.eIcon=E,this.eLabel=E,this.eGhost=E,this.registerCSS(cv)}postConstruct(){let e=t=>nv(t,this.beans,null);this.dropIconMap={pinned:e("columnMovePin"),hide:e("columnMoveHide"),move:e("columnMoveMove"),left:e("columnMoveLeft"),right:e("columnMoveRight"),group:e("columnMoveGroup"),aggregate:e("columnMoveValue"),pivot:e("columnMovePivot"),notAllowed:e("dropNotAllowed")}}init(e){this.dragSource=e.dragSource,this.setTemplate(dv),this.beans.environment.applyThemeClasses(this.eGhost)}destroy(){this.dragSource=null,super.destroy()}setIcon(e,t){let{eGhost:o,eIcon:i,dragSource:r,dropIconMap:a,gos:n}=this;ne(i);let s=null;e||(e=r!=null&&r.getDefaultIconName?r.getDefaultIconName():"notAllowed"),s=a[e],o.classList.toggle("ag-dnd-ghost-not-allowed",e==="notAllowed"),i.classList.toggle("ag-shake-left-to-right",t),!(s===a.hide&&n.get("suppressDragLeaveHidesColumns"))&&s&&i.appendChild(s)}setLabel(e){this.eLabel.textContent=e}};function uv(e,t){var o,i;(i=(o=e.rowDragSvc)==null?void 0:o.rowDragFeature)==null||i.addRowDropZone(t)}function hv(e,t){var i,r;let o=(i=e.dragAndDrop)==null?void 0:i.findExternalZone(t.getContainer());o&&((r=e.dragAndDrop)==null||r.removeDropTarget(o))}function pv(e,t){var o,i;return(i=(o=e.rowDragSvc)==null?void 0:o.rowDragFeature)==null?void 0:i.getRowDropZone(t)}function fv(e){let t=e.rowDropHighlightSvc;return t?{row:t.row,dropIndicatorPosition:t.position}:{row:null,dropIndicatorPosition:"none"}}function mv(e,t){let o=e.rowDropHighlightSvc;if(!o)return;let i=t==null?void 0:t.row,r=t==null?void 0:t.dropIndicatorPosition;r!=="above"&&r!=="below"&&r!=="inside"&&(r="none");let a=i==null?void 0:i.rowIndex;a==null||r==="none"?o.clear():o.set(i,r)}var Md=(e,t)=>{if(t!=null&&(e!=null&&e.setPointerCapture))try{return e.setPointerCapture(t),e.hasPointerCapture(t)}catch{}return!1},vv=(e,t)=>{if(typeof PointerEvent=="undefined"||!(t instanceof PointerEvent))return null;let o=t.pointerId;if(!Md(e,o))return null;let i={eElement:e,pointerId:o,onLost(r){wv(i,r)}};return e.addEventListener("lostpointercapture",i.onLost),i},Cv=e=>{if(!e)return;Pd(e);let{eElement:t,pointerId:o}=e;if(t){try{t.releasePointerCapture(o)}catch{}e.eElement=null}},Pd=e=>{let{eElement:t,onLost:o}=e;t&&o&&(t.removeEventListener("lostpointercapture",o),e.onLost=null)},wv=(e,t)=>{Pd(e);let{eElement:o,pointerId:i}=e;o&&t.pointerId===i&&Md(o,i)},ke,Ke,na={passive:!0},mt={passive:!1},qe=e=>{if(!Ke)Ke=new WeakSet;else if(Ke.has(e))return!1;return Ke.add(e),!0},bv=class extends ve{constructor(){super(...arguments),this.beanName="dragSvc",this.dragging=!1,this.drag=null,this.dragSources=[]}get startTarget(){var e,t;return(t=(e=this.drag)==null?void 0:e.start.target)!=null?t:null}isPointer(){return!!(ke!=null&&ke.has(Ue(this.beans)))}hasPointerCapture(){var t,o,i;let e=(t=this.drag)==null?void 0:t.pointerCapture;return!!(e&&((i=(o=this.beans.eRootDiv).hasPointerCapture)!=null&&i.call(o,e.pointerId)))}destroy(){this.drag&&this.cancelDrag();let e=this.dragSources;for(let t of e)Qs(t);e.length=0,super.destroy()}removeDragSource(e){let t=this.dragSources;for(let o=0,i=t.length;othis.onPointerDown(e,c),mt],[t,"mousedown",c=>this.onMouseDown(e,c)]);let l=this.gos.get("suppressTouch");o&&!l&&Oi(i,[t,"touchstart",d=>this.onTouchStart(e,d),mt])}cancelDrag(e){var o,i;let t=this.drag;e!=null||(e=t==null?void 0:t.eElement),e&&this.eventSvc.dispatchEvent({type:"dragCancelled",target:e}),(i=t==null?void 0:(o=t.params).onDragCancel)==null||i.call(o),this.destroyDrag()}shouldPreventMouseEvent(e){let t=e.type;return(t==="mousemove"||t==="pointermove")&&e.cancelable&&li(this.beans,e)&&!$o(la(e))}initDrag(e,...t){this.drag=e;let o=this.beans,i=s=>this.onScroll(s),r=s=>this.onKeyDown(s),a=Ue(o),n=te(o);Oi(e.handlers,[a,"contextmenu",yt],[a,"keydown",r],[n,"scroll",i,{capture:!0}],[n.defaultView||window,"scroll",i],...t)}destroyDrag(){this.dragging=!1;let e=this.drag;if(e){let t=e.rootEl;(ke==null?void 0:ke.get(t))===e&&ke.delete(t),this.drag=null,Cv(e.pointerCapture),mn(e.handlers)}}onPointerDown(e,t){if(this.isPointer())return;let o=this.beans;if(Ke!=null&&Ke.has(t))return;let i=t.pointerType;if(i==="touch"&&(o.gos.get("suppressTouch")||!e.includeTouch||(e.stopPropagationForTouch&&t.stopPropagation(),$o(la(t))))||!t.isPrimary||i==="mouse"&&t.button!==0)return;this.destroyDrag();let r=Ue(o),a=e.eElement,n=t.pointerId,s=new sa(r,e,t,n);ke!=null||(ke=new WeakMap),ke.set(r,s);let l=u=>{u.pointerId===n&&this.onMouseOrPointerMove(u)},c=u=>{u.pointerId===n&&this.onMouseOrPointerUp(u)},d=u=>{u.pointerId===n&&qe(u)&&this.cancelDrag()},g=u=>this.draggingPreventDefault(u);this.initDrag(s,[r,"pointerup",c],[r,"pointercancel",d],[r,"pointermove",l,mt],[r,"touchmove",g,mt],[a,"mousemove",g,mt]),e.dragStartPixels===0?this.onMouseOrPointerMove(t):qe(t)}onTouchStart(e,t){var u;if(this.gos.get("suppressTouch")||!e.includeTouch||!qe(t)||$o(la(t)))return;if(e.stopPropagationForTouch&&t.stopPropagation(),this.isPointer()){this.dragging&&yt(t);return}this.destroyDrag();let i=this.beans,r=Ue(i),a=new sa(r,e,t.touches[0]),n=h=>this.onTouchMove(h),s=h=>this.onTouchUp(h),l=h=>this.onTouchCancel(h),c=h=>this.draggingPreventDefault(h),d=Ue(i),g=(u=t.target)!=null?u:e.eElement;this.initDrag(a,[g,"touchmove",n,na],[g,"touchend",s,na],[g,"touchcancel",l,na],[d,"touchmove",c,mt],[d,"touchend",s,mt],[d,"touchcancel",l,mt]),e.dragStartPixels===0&&this.onMove(a.start)}draggingPreventDefault(e){this.dragging&&yt(e)}onMouseDown(e,t){if(t.button!==0||Ke!=null&&Ke.has(t)||this.isPointer())return;let o=this.beans;this.destroyDrag();let i=new sa(Ue(o),e,t),r=s=>this.onMouseOrPointerMove(s),a=s=>this.onMouseOrPointerUp(s),n=Ue(o);this.initDrag(i,[n,"mousemove",r],[n,"mouseup",a]),e.dragStartPixels===0?this.onMouseOrPointerMove(t):qe(t)}onScroll(e){var i,r;if(!qe(e))return;let t=this.drag,o=t==null?void 0:t.lastDrag;o&&this.dragging&&((r=(i=t.params)==null?void 0:i.onDragging)==null||r.call(i,o))}onMouseOrPointerMove(e){var t;qe(e)&&(zt()&&((t=te(this.beans).getSelection())==null||t.removeAllRanges()),this.shouldPreventMouseEvent(e)&&yt(e),this.onMove(e))}onTouchCancel(e){let t=this.drag;!t||!qe(e)||mo(t.start,e.changedTouches)&&this.cancelDrag()}onTouchMove(e){let t=this.drag;if(!t||!qe(e))return;let o=mo(t.start,e.touches);o&&(this.onMove(o),this.draggingPreventDefault(e))}onMove(e){var i,r,a;let t=this.drag;if(!t)return;t.lastDrag=e;let o=t.params;if(!this.dragging){let n=t.start,s=o.dragStartPixels,l=s!=null?s:4;if(fc(e,n,l)||(this.dragging=!0,o.capturePointer&&(t.pointerCapture=vv(this.beans.eRootDiv,e)),this.eventSvc.dispatchEvent({type:"dragStarted",target:o.eElement}),(i=o.onDragStart)==null||i.call(o,n),this.drag!==t)||((r=o.onDragging)==null||r.call(o,n),this.drag!==t))return}(a=o.onDragging)==null||a.call(o,e)}onTouchUp(e){let t=this.drag;t&&qe(e)&&this.onUp(mo(t.start,e.changedTouches))}onMouseOrPointerUp(e){qe(e)&&this.onUp(e)}onUp(e){var o,i;let t=this.drag;t&&(e||(e=t.lastDrag),e&&this.dragging&&(this.dragging=!1,(i=(o=t.params).onDragStop)==null||i.call(o,e),this.eventSvc.dispatchEvent({type:"dragStopped",target:t.params.eElement})),this.destroyDrag())}onKeyDown(e){e.key===b.ESCAPE&&this.cancelDrag()}},Qs=e=>{mn(e.handlers);let t=e.oldTouchAction;if(t!=null){let o=e.params.eElement.style;o&&(o.touchAction=t)}},sa=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}},la=e=>{let t=e.target;return t instanceof Element?t:null},yv=class extends bv{shouldPreventMouseEvent(e){return this.gos.get("enableCellTextSelection")&&super.shouldPreventMouseEvent(e)}},Sv=class extends S{constructor(){super(...arguments),this.beanName="horizontalResizeSvc"}addResizeBar(e){let 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;return o.addDragSource(t),()=>o.removeDragSource(t)}onDragStart(e,t){this.dragStartX=t.clientX,this.setResizeIcons();let o=t instanceof MouseEvent&&t.shiftKey===!0;e.onResizeStart(o)}setResizeIcons(){let e=this.beans.ctrlsSvc.get("gridCtrl");e.setResizeCursor(1),e.disableUserSelect(!0)}onDragStop(e){e.onResizeEnd(this.resizeAmount),this.resetIcons()}resetIcons(){let 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)}},xv={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{"aria-hidden":"true"}},Pi={skipAriaHidden:!0},kv=class extends _{constructor(e,t,o,i,r,a=!1){super(),this.cellValueFn=e,this.rowNode=t,this.column=o,this.customGui=i,this.dragStartPixels=r,this.alwaysVisible=a,this.dragSource=null,this.disabled=!1}isCustomGui(){return this.customGui!=null}postConstruct(){let{beans:e,customGui:t}=this;t?this.setDragElement(t,this.dragStartPixels):(this.setTemplate(xv),this.getGui().appendChild(ye("rowDrag",e,null)),this.addDragSource()),this.alwaysVisible||this.initCellDrag()}initCellDrag(){let{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;let{beans:e,column:t,rowNode:o}=this,{gos:i,dragAndDrop:r,rowDragSvc:a}=e,n=a==null?void 0:a.visibility,l=!(n==="suppress"||n==="hidden"&&!(r!=null&&r.hasExternalDropZones())),c=l;if(l&&!this.isCustomGui()&&t){let d=t.getColDef().rowDrag;if(d===!1)l=!1;else{let g=typeof d=="function";c=t.isRowDrag(o),l=g||c}}l&&c&&o.footer&&i.get("rowDragManaged")&&(c=!1,l=!0),c&&(c=l),l||this.setDisplayed(l,Pi),c||this.setVisible(c,Pi),this.setDisabled(!c||n==="disabled"&&!(r!=null&&r.hasExternalDropZones())),l&&this.setDisplayed(l,Pi),c&&this.setVisible(c,Pi)}setDisabled(e){var t,o;e!==this.disabled&&(this.disabled=e,(o=(t=this.getGui())==null?void 0:t.classList)==null||o.toggle("ag-drag-handle-disabled",e))}getSelectedNodes(){var i,r;let e=this.rowNode;if(!this.gos.get("rowDragMultiRow"))return[e];let o=(r=(i=this.beans.selectionSvc)==null?void 0:i.getSelectedNodes())!=null?r:[];return o.indexOf(e)!==-1?o:[e]}getDragItem(){let{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;let t=this.getGui();if(this.gos.get("enableCellTextSelection")){this.removeMouseDownListener();let i=Ji("pointerdown")?{pointerdown:yt}:{mousedown:yt};this.mouseDownListener=this.addManagedElementListeners(t,i)[0]}let o=this.getLocaleTextFunc();this.dragSource={type:2,eElement:t,dragItemName:i=>this.getDragItemName(i,o),getDragItem:()=>this.getDragItem(),dragStartPixels:e,dragSourceDomDataKey:this.gos.getDomDataKey()},this.beans.dragAndDrop.addDragSource(this.dragSource,!0)}getDragItemName(e,t){var n,s,l,c,d,g;let o=(e==null?void 0:e.dragItem)||this.getDragItem(),i=((l=(n=e==null?void 0:e.dropTarget)==null?void 0:n.rows.length)!=null?l:(s=o.rowNodes)==null?void 0:s.length)||1,r=(g=(d=(c=this.column)==null?void 0:c.getColDef())==null?void 0:d.rowDragText)!=null?g:this.gos.get("rowDragText");if(r)return r(o,i);if(i!==1)return`${i} ${t("rowDragRows","rows")}`;let a=this.cellValueFn();return a||`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)}},Rv=class{constructor(e){var t;this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=e.scrollContainer,this.scrollHorizontally=e.scrollAxis.includes("x"),this.scrollVertically=e.scrollAxis.includes("y"),this.scrollByTick=(t=e.scrollByTick)!=null?t: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 this.tickingInterval!==null}check(e,t=!1){let o=!this.scrollVertically||t||this.shouldSkipVerticalScroll(),i=!this.scrollHorizontally||this.shouldSkipHorizontalScroll();if(o&&i)return;let r=this.scrollContainer.getBoundingClientRect(),a=this.scrollByTick;this.tickLeft=!i&&e.clientXr.right-a,this.tickUp=!o&&e.clientYr.bottom-a,this.tickLeft||this.tickRight||this.tickUp||this.tickDown?this.ensureTickingStarted():this.ensureCleared()}ensureTickingStarted(){this.tickingInterval===null&&(this.tickingInterval=window.setInterval(this.doTick.bind(this),100),this.tickCount=0)}doTick(){this.tickCount++;let e=this.tickCount>20?200:this.tickCount>10?80:40;if(this.scrollVertically){let t=this.getVerticalPosition();this.tickUp&&this.setVerticalPosition(t-e),this.tickDown&&this.setVerticalPosition(t+e)}if(this.scrollHorizontally){let 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)}},_i=class{constructor(){this.reordered=!1,this.removals=[],this.updates=new Set,this.adds=new Set}},gr=e=>{let t=e.childrenAfterGroup;for(;t!=null&&t.length;){let o=t[0];if(o.sourceRowIndex>=0)return o;t=o.childrenAfterGroup}},Ev=(e,t,o,i)=>{var g;if(!t.size||!e)return!1;let r=!1,a=(g=e.length)!=null?g:0,n=-1;o&&(n=o.sourceRowIndex,o=n<0?gr(o):null,o&&(n=o.sourceRowIndex)),n<0||n>=a?n=a:i||++n;let s=n,l=Math.min(n,a-1);for(let u of t){let h=u.sourceRowIndex;hl&&(l=h)}let c=s;for(let u=s;u=n;--u){let h=e[u];t.has(h)||(h.sourceRowIndex!==d&&(h.sourceRowIndex=d,e[d]=h,r=!0),--d)}for(let u of t)u.sourceRowIndex!==c&&(u.sourceRowIndex=c,e[c]=u,r=!0),++c;return r};function Fv(e,t){var o,i;return(i=(o=Bn(e,t.target))==null?void 0:o.getFocusedCellPosition())!=null?i:null}function Zs(e,t){let o=se(e.gos,"normal"),i=t,r,a;i.clientX!=null||i.clientY!=null?(r=i.clientX,a=i.clientY):(r=i.x,a=i.y);let{pageFirstPixel:n}=e.pageBounds.getCurrentPagePixelRange();if(a+=n,o){let s=e.ctrlsSvc.getScrollFeature(),l=s.getVScrollPosition(),c=s.getHScrollPosition();r+=c.left,a+=l.top}return{x:r,y:a}}var Dv=.25,Mv=class extends S{constructor(e){super(),this.eContainer=e,this.lastDraggingEvent=null,this.autoScroll=null,this.autoScrollChanged=!1,this.autoScrollChanging=!1,this.autoScrollOldV=null}postConstruct(){let e=this.beans;e.ctrlsSvc.whenReady(this,t=>{let o=()=>t.gridBodyCtrl.scrollFeature.getVScrollPosition().top,i=new Rv({scrollContainer:t.gridBodyCtrl.eBodyViewport,scrollAxis:"y",getVerticalPosition:o,setVerticalPosition:r=>t.gridBodyCtrl.scrollFeature.setVerticalScrollPosition(r),onScrollCallback:()=>{var n;let r=o();if(this.autoScrollOldV!==r){this.autoScrollOldV=r,this.autoScrollChanging=!0;return}let a=this.autoScrollChanging;this.autoScrollChanged=a,this.autoScrollChanging=!1,a&&((n=e.dragAndDrop)==null||n.nudge(),this.autoScrollChanged=!1)}});this.autoScroll=i,this.clearAutoScroll()})}destroy(){super.destroy(),this.clearAutoScroll(),this.autoScroll=null,this.lastDraggingEvent=null,this.eContainer=null}getContainer(){return this.eContainer}isInterestedIn(e){return e===2}getIconName(e){var t;return((t=e==null?void 0:e.dropTarget)==null?void 0:t.allowed)===!1||this.beans.rowDragSvc.visibility!=="visible"?"notAllowed":"move"}getRowNodes(e){var o;if(!this.isFromThisGrid(e))return e.dragItem.rowNodes||[];let t=e.dragItem.rowNode;if(this.gos.get("rowDragMultiRow")){let i=(o=this.beans.selectionSvc)==null?void 0:o.getSelectedNodes();if(i&&i.indexOf(t)>=0)return i.slice().sort(Pv)}return[t]}onDragEnter(e){this.dragging(e,!0)}onDragging(e){this.dragging(e,!1)}dragging(e,t){var s;let{lastDraggingEvent:o,beans:i}=this;if(t){let l=this.getRowNodes(e);e.dragItem.rowNodes=l,Xs(l,!0)}this.lastDraggingEvent=e;let r=e.fromNudge,a=this.makeRowsDrop(o,e,r,!1);(s=i.rowDropHighlightSvc)==null||s.fromDrag(e),t&&this.dispatchGridEvent("rowDragEnter",e),this.dispatchGridEvent("rowDragMove",e);let n=this.autoScroll;a!=null&&a.rowDragManaged&&a.moved&&a.allowed&&a.sameGrid&&!a.suppressMoveWhenRowDragging&&(!r&&!(n!=null&&n.scrolling)||this.autoScrollChanged)&&this.dropRows(a),n==null||n.check(e.event)}isFromThisGrid(e){return e.dragSource.dragSourceDomDataKey===this.gos.getDomDataKey()}makeRowsDrop(e,t,o,i){var m,v,C;let{beans:r,gos:a}=this,n=this.newRowsDrop(t,i),s=r.rowModel;if(t.dropTarget=n,t.changed=!1,!n)return null;let{sameGrid:l,rootNode:c,source:d,target:g}=n;g!=null||(g=(m=s.getRow(s.getRowCount()-1))!=null?m:null);let u=this.beans.groupEditSvc,h=!!(u!=null&&u.canSetParent(n)),p=null;if(g!=null&&g.footer){let w=(v=La(s,-1,g))!=null?v:La(s,1,g);h&&(p=(C=g.sibling)!=null?C:c),g=w!=null?w:null}g!=null&&g.detail&&(g=g.parent),n.moved&&(n.moved=d!==g);let f=.5;if(g&&(l&&n.moved&&(p||!h)?f=d.rowIndex>g.rowIndex?-.5:.5:f=(n.y-g.rowTop-g.rowHeight/2)/g.rowHeight||0),!h&&l&&g&&n.moved&&ee(a)){let w=Iv(s,n);w&&(f=d.rowIndex>w.rowIndex?-.5:.5,g=w,n.moved&&(n.moved=d!==g))}return n.target=g,n.newParent=p,n.pointerPos=Tv(g,n.y),n.yDelta=f,u==null||u.fixRowsDrop(n,h,o,f),this.validateRowsDrop(n,h,i),t.changed||(t.changed=Js(e==null?void 0:e.dropTarget,n)),n}newRowsDrop(e,t){var p;let{beans:o,gos:i}=this,r=o.rowModel.rootNode,a=ee(i)?i.get("rowDragManaged"):!1,n=i.get("suppressMoveWhenRowDragging"),s=this.isFromThisGrid(e),{rowNode:l,rowNodes:c}=e.dragItem;if(c||(c=l?[l]:[]),l||(l=c[0]),!l||!r)return null;let d=this.beans.dragAndDrop.isDropZoneWithinThisGrid(e),g=!0;a&&(!c.length||o.rowDragSvc.visibility!=="visible"||(n||!s)&&!d)&&(g=!1);let u=Zs(o,e).y,h=this.getOverNode(u);return{api:o.gridApi,context:o.gridOptions.context,draggingEvent:e,rowDragManaged:a,suppressMoveWhenRowDragging:n,sameGrid:s,withinGrid:d,treeData:!1,rootNode:r,moved:l!==h,y:u,overNode:h,overIndex:(p=h==null?void 0:h.rowIndex)!=null?p:-1,pointerPos:"none",position:"none",source:l,target:h!=null?h:null,newParent:null,rows:c,allowed:g,highlight:!t&&a&&n&&(d||!s),yDelta:0,inside:!1,droppedManaged:!1}}validateRowsDrop(e,t,o){var h;let{source:i,target:r,yDelta:a,inside:n,moved:s,rowDragManaged:l,suppressMoveWhenRowDragging:c}=e;e.moved&&(e.moved=i!==r);let{position:d,fallbackPosition:g}=this.computeDropPosition(s,n,a);e.position=d,t||(e.newParent=null),this.enforceSuppressMoveWhenRowDragging(e,c,"initial");let u=(!l||e.allowed)&&this.gos.get("isRowValidDropPosition");u&&this.applyDropValidator(e,t,o,l,u),l&&(e.rows=this.filterRows(e)),(h=this.beans.groupEditSvc)==null||h.clearNewSameParent(e,t),this.enforceSuppressMoveWhenRowDragging(e,c,"final"),e.position==="inside"&&(!e.allowed||!e.newParent)&&(e.position=g)}computeDropPosition(e,t,o){let i=o<0?"above":"below";return e?{position:t?"inside":i,fallbackPosition:i}:{position:"none",fallbackPosition:i}}enforceSuppressMoveWhenRowDragging(e,t,o){if(t){if(o==="initial"){e.moved||(e.allowed=!1);return}(!e.rows.length||e.position==="none")&&(e.allowed=!1)}}applyDropValidator(e,t,o,i,r){var s,l;(s=this.beans.groupEditSvc)==null||s.clearNewSameParent(e,t);let a=r(e);if(!a){e.allowed=!1;return}if(typeof a!="object")return;a.rows!==void 0&&(e.rows=(l=a.rows)!=null?l:[]),t&&a.newParent!==void 0&&(e.newParent=a.newParent),a.target!==void 0&&(e.target=a.target),a.position&&(e.position=a.position),a.allowed!==void 0?e.allowed=a.allowed:i||(e.allowed=!0);let n=e.draggingEvent;a.changed&&n&&(n.changed=!0),!o&&a.highlight!==void 0&&(e.highlight=a.highlight)}addRowDropZone(e){if(!e.getContainer()){k(55);return}let t=this.beans.dragAndDrop;if(t.findExternalZone(e.getContainer())){k(56);return}let o=e.fromGrid?e:{getContainer:e.getContainer,onDragEnter:e.onDragEnter&&(r=>e.onDragEnter(this.rowDragEvent("rowDragEnter",r))),onDragLeave:e.onDragLeave&&(r=>e.onDragLeave(this.rowDragEvent("rowDragLeave",r))),onDragging:e.onDragging&&(r=>e.onDragging(this.rowDragEvent("rowDragMove",r))),onDragStop:e.onDragStop&&(r=>e.onDragStop(this.rowDragEvent("rowDragEnd",r))),onDragCancel:e.onDragCancel&&(r=>e.onDragCancel(this.rowDragEvent("rowDragCancel",r)))},i={isInterestedIn:r=>r===2,getIconName:()=>"move",external:!0,...o};t.addDropTarget(i),this.addDestroyFunc(()=>t.removeDropTarget(i))}getRowDropZone(e){return{getContainer:this.getContainer.bind(this),onDragEnter:o=>{var i;this.onDragEnter(o),(i=e==null?void 0:e.onDragEnter)==null||i.call(e,this.rowDragEvent("rowDragEnter",o))},onDragLeave:o=>{var i;this.onDragLeave(o),(i=e==null?void 0:e.onDragLeave)==null||i.call(e,this.rowDragEvent("rowDragLeave",o))},onDragging:o=>{var i;this.onDragging(o),(i=e==null?void 0:e.onDragging)==null||i.call(e,this.rowDragEvent("rowDragMove",o))},onDragStop:o=>{var i;this.onDragStop(o),(i=e==null?void 0:e.onDragStop)==null||i.call(e,this.rowDragEvent("rowDragEnd",o))},onDragCancel:o=>{var i;this.onDragCancel(o),(i=e==null?void 0:e.onDragCancel)==null||i.call(e,this.rowDragEvent("rowDragCancel",o))},fromGrid:!0}}getOverNode(e){let{pageBounds:t,rowModel:o}=this.beans,r=e>t.getCurrentPagePixelRange().pageLastPixel?-1:o.getRowIndexAtPixel(e);return r>=0?o.getRow(r):void 0}rowDragEvent(e,t){var g;let o=this.beans,{dragItem:i,dropTarget:r,event:a,vDirection:n}=t,s=(r==null?void 0:r.rootNode)===o.rowModel.rootNode,l=s?r.y:Zs(o,t).y,c=s?r.overNode:this.getOverNode(l),d=s?r.overIndex:(g=c==null?void 0:c.rowIndex)!=null?g:-1;return{api:o.gridApi,context:o.gridOptions.context,type:e,event:a,node:i.rowNode,nodes:i.rowNodes,overIndex:d,overNode:c,y:l,vDirection:n,rowsDrop:r}}dispatchGridEvent(e,t){let o=this.rowDragEvent(e,t);this.eventSvc.dispatchEvent(o)}onDragLeave(e){this.dispatchGridEvent("rowDragLeave",e),this.stopDragging(e,!1)}onDragStop(e){var i,r;let t=(r=(i=this.lastDraggingEvent)==null?void 0:i.dropTarget)!=null?r:null,o=this.makeRowsDrop(this.lastDraggingEvent,e,!1,!0);this.dispatchGridEvent("rowDragEnd",e),o!=null&&o.allowed&&o.rowDragManaged&&(!(t!=null&&t.droppedManaged)||Js(t,o))&&this.dropRows(o),this.stopDragging(e,!0)}onDragCancel(e){this.dispatchGridEvent("rowDragCancel",e),this.stopDragging(e,!0)}stopDragging(e,t){var o,i;this.clearAutoScroll(),(o=this.beans.groupEditSvc)==null||o.stopDragging(t),(i=this.beans.rowDropHighlightSvc)==null||i.fromDrag(null),Xs(e.dragItem.rowNodes,!1),this.lastDraggingEvent=null}clearAutoScroll(){var e;(e=this.autoScroll)==null||e.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}){let i=Do(this.gos),r=this.beans.rowModel,a=o.filter(({data:s,rowPinned:l})=>{var c;return!r.getRowNode((c=i==null?void 0:i({data:s,level:0,rowPinned:l}))!=null?c:s.id)}).map(({data:s})=>s);if(a.length===0)return!1;let n;if(t){let s=t.sourceRowIndex>=0?t:gr(t);s&&(n=s.sourceRowIndex+(e==="above"?0:1))}return r.updateRowData({add:a,addIndex:n}),!0}filterRows(e){let{groupEditSvc:t}=this.beans,{rows:o,sameGrid:i}=e,r;for(let a=0,n=o.length;a=0)return e.destroyed?void 0:e;let t=this.beans.groupEditSvc;return t?t.csrmFirstLeaf(e):gr(e)}},Js=(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||!It(e.rows,t.rows)),Pv=({rowIndex:e},{rowIndex:t})=>e!==null&&t!==null?e-t:0,Xs=(e,t)=>{for(let o=0,i=(e==null?void 0:e.length)||0;o{let o=null,i=t.target;if(i&&t.rows.indexOf(i)<0)return null;let r=t.source;if(!i||!r)return null;let a=i.rowIndex-r.rowIndex,n=a<0?-1:1;a=t.suppressMoveWhenRowDragging?Math.abs(a):1;let s=new Set(t.rows);do{let l=La(e,n,i);if(!l)break;s.has(l)||(o=l,--a),i=l}while(a>0);return o},Tv=(e,t)=>{var n;let o=e==null?void 0:e.rowTop,i=(n=e==null?void 0:e.rowHeight)!=null?n:0;if(o==null||!i||i<=0)return"none";let r=t-o,a=i*Dv;return r<=a?"above":r>=i-a?"below":"inside"},Av=class extends S{constructor(){super(...arguments),this.beanName="rowDragSvc",this.rowDragFeature=null,this.visibility="suppress"}setupRowDrag(e,t){let o=t.createManagedBean(new Mv(e)),i=this.beans.dragAndDrop;i.addDropTarget(o),t.addDestroyFunc(()=>i.removeDropTarget(o)),this.rowDragFeature=o;let r=()=>this.refreshVisibility();this.addManagedPropertyListeners(["rowDragManaged","suppressRowDrag","refreshAfterGroupEdit"],r),this.addManagedEventListeners({newColumnsLoaded:r,columnRowGroupChanged:r,columnPivotModeChanged:r,sortChanged:r,filterChanged:r}),this.visibility=this.computeVisibility()}createRowDragComp(e,t,o,i,r,a){return new kv(e,t,o,i,r,a)}createRowDragCompForRow(e,t){if(dt(this.gos))return;let o=this.getLocaleTextFunc();return this.createRowDragComp(()=>`1 ${o("rowDragRow","row")}`,e,void 0,t,void 0,!0)}createRowDragCompForCell(e,t,o,i,r,a){let n=this.gos;return n.get("rowDragManaged")&&(!ee(n)||n.get("pagination"))?void 0:this.createRowDragComp(o,e,t,i,r,a)}cancelRowDrag(){var e,t;(e=this.rowDragFeature)!=null&&e.lastDraggingEvent&&((t=this.beans.dragSvc)==null||t.cancelDrag())}computeVisibility(){var r,a,n,s;let e=this.beans,t=e.gos;if(t.get("suppressRowDrag"))return"suppress";if(!t.get("rowDragManaged"))return"visible";let i=e.colModel.isPivotMode();return(i||(a=(r=e.rowGroupColsSvc)==null?void 0:r.columns)!=null&&a.length)&&!t.get("refreshAfterGroupEdit")?"hidden":i||(n=e.filterManager)!=null&&n.isAnyFilterPresent()||(s=e.sortSvc)!=null&&s.isSortActive()?"disabled":"visible"}refreshVisibility(){var o;let e=this.visibility,t=this.computeVisibility();e!==t&&(this.visibility=t,(o=this.eventSvc)==null||o.dispatchEvent({type:"rowDragVisibilityChanged"}))}},zv=class extends S{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(){let e=this.row,t=this.dragging;!e||(e==null?void 0:e.rowIndex)===null||this.position==="none"?this.clear():this.set(e,this.position),this.dragging=t}destroy(){this.clear(),super.destroy()}clear(){let e=this.row;this.dragging=!1,e&&(this.uiLevel=0,this.position="none",this.row=null,e.dispatchRowEvent("rowHighlightChanged"))}set(e,t){let o=e!==this.row,i=e.uiLevel,r=t!==this.position,a=i!==this.uiLevel;this.dragging=!1,(o||r||a)&&(o&&this.clear(),this.uiLevel=i,this.position=t,this.row=e,e.dispatchRowEvent("rowHighlightChanged"))}fromDrag(e){let t=e==null?void 0:e.dropTarget;if(t){let{highlight:o,target:i,position:r}=t;if(o&&i&&r!=="none"){this.set(i,r),this.dragging=!0;return}}this.dragging&&this.clear()}},Id={moduleName:"Drag",version:D,beans:[yv]},Lv={moduleName:"DragAndDrop",version:D,dynamicBeans:{dndSourceComp:lv},icons:{rowDrag:"grip"}},Td={moduleName:"SharedDragAndDrop",version:D,beans:[_p],dependsOn:[Id],userComponents:{agDragAndDropImage:gv},icons:{columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",rowDrag:"grip"}},Ov={moduleName:"RowDrag",version:D,beans:[zv,Av],apiFunctions:{addRowDropZone:uv,removeRowDropZone:hv,getRowDropZoneParams:pv,getRowDropPositionIndicator:fv,setRowDropPositionIndicator:mv},dependsOn:[Td]},Hv={moduleName:"HorizontalResize",version:D,beans:[Sv],dependsOn:[Id]},Bv=":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}}",Vv=class extends S{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;let{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++;let e=this.animationThreadCount,{gridBodyCtrl:t}=this;t.setColumnMovingCss(!0),this.executeLaterFuncs.push(()=>{this.animationThreadCount===e&&t.setColumnMovingCss(!1)})}flush(e,t){let{executeNextFuncs:o,executeLaterFuncs:i}=this;if(o.length===0&&i.length===0){e(),t();return}let r=a=>{for(;a.length;){let n=a.pop();n&&n()}};this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e(),r(o)},0),window.setTimeout(()=>{t(),r(i)},200)})}};function Nv(e,t,o){var i;(i=e.colMoves)==null||i.moveColumnByIndex(t,o,"api")}function Gv(e,t,o){var i;(i=e.colMoves)==null||i.moveColumns(t,o,"api")}var Wv=class extends S{constructor(e){super(),this.pinned=e,this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[]}onDragEnter(e){if(this.clearColumnsList(),this.gos.get("functionsReadOnly"))return;let t=e.dragItem.columns;if(t)for(let o of t)o.isPrimary()&&(o.isAnyFunctionActive()||(o.isAllowValue()?this.columnsToAggregate.push(o):o.isAllowRowGroup()?this.columnsToGroup.push(o):o.isAllowPivot()&&this.columnsToPivot.push(o)))}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){let{valueColsSvc:t,rowGroupColsSvc:o,pivotColsSvc:i}=this.beans;this.columnsToAggregate.length>0&&(t==null||t.addColumns(this.columnsToAggregate,"toolPanelDragAndDrop")),this.columnsToGroup.length>0&&(o==null||o.addColumns(this.columnsToGroup,"toolPanelDragAndDrop")),this.columnsToPivot.length>0&&(i==null||i.addColumns(this.columnsToPivot,"toolPanelDragAndDrop"))}onDragCancel(){this.clearColumnsList()}};function qv(e,t){!t||t.length<=1||t.filter(i=>e.indexOf(i)<0).length>0||t.sort((i,r)=>{let a=e.indexOf(i),n=e.indexOf(r);return a-n})}function _v(e){var o;let t=[...e];for(let i of e){let r=null,a=i.getParent();for(;a!=null&&a.getDisplayedLeafColumns().length===1;)r=a,a=a.getParent();if(r!=null){let s=!!((o=r.getColGroupDef())!=null&&o.marryChildren)?r.getProvidedColumnGroup().getLeafColumns():r.getLeafColumns();for(let l of s)t.includes(l)||t.push(l)}}return t}function Uv(e,t,o,i){let r=i.allCols,a=null,n=null;for(let s=0;sr.includes(u));if(n===null)n=d;else if(!It(d,n))break;let g=Kv(c);(a===null||g=p||o&&f<=p))return;let v=Uv(h,u,c,d);if(!v)return;let C=v.move;if(!(C>l.getCols().length-u.length))return{columns:u,toIndex:C}}function zd(e){let{columns:t,toIndex:o}=Ad(e)||{},{finished:i,colMoves:r}=e;return!t||o==null?null:(r.moveColumns(t,o,"uiColumnMoved",i),i?null:{columns:t,toIndex:o})}function jv(e,t){let o=t.getCols(),i=e.map(l=>o.indexOf(l)).sort((l,c)=>l-c),r=i[0];return U(i)-r!==i.length-1?null:r}function Kv(e){function t(i){let r=[],a=i.getOriginalParent();for(;a!=null;)r.push(a),a=a.getOriginalParent();return r}let o=0;for(let i=0;ia.length?[r,a]:[a,r];for(let n of r)a.indexOf(n)===-1&&o++}return o}function $v(e,t){switch(t){case"left":return e.leftCols;case"right":return e.rightCols;default:return e.centerCols}}function Yv(e){let{movingCols:t,draggingRight:o,xPosition:i,pinned:r,gos:a,colModel:n,visibleCols:s}=e;if(a.get("suppressMovableColumns")||t.some(w=>w.getColDef().suppressMovable))return[];let c=$v(s,r),d=n.getCols(),g=c.filter(w=>t.includes(w)),u=c.filter(w=>!t.includes(w)),h=d.filter(w=>!t.includes(w)),p=0,f=i;if(o){let w=0;for(let y of g)w+=y.getActualWidth();f-=w}if(f>0){for(let w=0;w0){let w=u[p-1];m=h.indexOf(w)+1}else m=h.indexOf(u[0]),m===-1&&(m=0);let v=[m],C=(w,y)=>w-y;if(o){let w=m+1,y=d.length-1;for(;w<=y;)v.push(w),w++;v.sort(C)}else{let w=m,y=d.length-1,x=d[w];for(;w<=y&&c.indexOf(x)<0;)w++,v.push(w),x=d[w];w=m-1;let R=0;for(;w>=R;)v.push(w),w--;v.sort(C).reverse()}return v}function Va(e){var c;let{pinned:t,fromKeyboard:o,gos:i,ctrlsSvc:r,useHeaderRow:a,skipScrollPadding:n}=e,s=(c=r.getHeaderRowContainerCtrl(t))==null?void 0:c.eViewport,{x:l}=e;return s?(o&&(l-=s.getBoundingClientRect().left),i.get("enableRtl")&&(a&&(s=s.querySelector(".ag-header-row")),l=s.clientWidth-l),t==null&&!n&&(l+=r.get("center").getCenterViewportScrollLeft()),l):0}function ca(e,t){for(let o of e)o.moving=t,o.dispatchColEvent("movingChanged","uiColumnMoved")}var el=7,Na=100,Ii=Na/2,Qv=5,Zv=100,Jv=class extends S{constructor(e){super(),this.pinned=e,this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.isCenterContainer=!M(e)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}getIconName(){var r;let{pinned:e,lastDraggingEvent:t}=this,{dragItem:o}=t||{},i=(r=o==null?void 0:o.columns)!=null?r:[];for(let a of i){let n=a.getPinned();if(a.getColDef().lockPinned){if(n==e)return"move";continue}let s=o==null?void 0:o.containerType;if(s===e||!e)return"move";if(e&&(!n||s!==e))return"pinned"}return"notAllowed"}onDragEnter(e){let t=e.dragItem,o=t.columns;if(e.dragSource.type===0)this.setColumnsVisible(o,!0,"uiColumnDragged");else{let r=t.visibleState,a=(o||[]).filter(n=>r[n.getId()]&&!n.isVisible());this.setColumnsVisible(a,!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){let{gos:r,ctrlsSvc:a}=this.beans,n=r.get("suppressMoveWhenColumnDragging");if(i&&!n){this.finishColumnMoving();return}if(this.lastDraggingEvent=e,!e||!i&&Q(e.hDirection))return;let s=Va({x:e.x,pinned:this.pinned,gos:r,ctrlsSvc:a});t||this.checkCenterForScrolling(s),n?this.handleColumnDragWhileSuppressingMovement(e,t,o,s,i):this.handleColumnDragWhileAllowingMovement(e,t,o,s,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!=null&&e.length))return;let i=e.filter(r=>!r.getColDef().lockVisible);i.length&&this.beans.colModel.setColsVisible(i,t,o)}finishColumnMoving(){this.clearHighlighted();let e=this.lastMovedInfo;if(!e)return;let{columns:t,toIndex:o}=e;this.beans.colMoves.moveColumns(t,o,"uiColumnMoved",!0)}updateDragItemContainerType(){let{lastDraggingEvent:e}=this;if(this.gos.get("suppressMoveWhenColumnDragging")||!e)return;let t=e.dragItem;t&&(t.containerType=this.pinned)}handleColumnDragWhileSuppressingMovement(e,t,o,i,r){let a=this.getAllMovingColumns(e,!0);if(r){let n=this.isAttemptingToPin(a);n&&this.attemptToPinColumns(a,void 0,!0);let{fromLeft:s,xPosition:l}=this.getNormalisedXPositionInfo(a,n)||{};if(s==null||l==null){this.finishColumnMoving();return}this.moveColumnsAfterHighlight({allMovingColumns:a,xPosition:l,fromEnter:t,fakeEvent:o,fromLeft:s})}else{if(!this.beans.dragAndDrop.isDropZoneWithinThisGrid(e))return;this.highlightHoveredColumn(a,i)}}handleColumnDragWhileAllowingMovement(e,t,o,i,r){let a=this.getAllMovingColumns(e),n=this.normaliseDirection(e.hDirection)==="right",s=e.dragSource.type===1,l=this.getMoveColumnParams({allMovingColumns:a,isFromHeader:s,xPosition:i,fromLeft:n,fromEnter:t,fakeEvent:o}),c=zd({...l,finished:r});c&&(this.lastMovedInfo=c)}getAllMovingColumns(e,t=!1){let o=e.dragSource.getDragItem(),i=null;t?(i=o.columnsInSplit,i||(i=o.columns)):i=o.columns;let r=a=>a.getColDef().lockPinned?a.getPinned()==this.pinned:!0;return i?i.filter(r):[]}getMoveColumnParams(e){let{allMovingColumns:t,isFromHeader:o,xPosition:i,fromLeft:r,fromEnter:a,fakeEvent:n}=e,{gos:s,colModel:l,colMoves:c,visibleCols:d}=this.beans;return{allMovingColumns:t,isFromHeader:o,fromLeft:r,xPosition:i,pinned:this.pinned,fromEnter:a,fakeEvent:n,gos:s,colModel:l,colMoves:c,visibleCols:d}}highlightHoveredColumn(e,t){var d,g,u;let{gos:o,colModel:i}=this.beans,r=o.get("enableRtl"),a=i.getCols().filter(h=>h.isVisible()&&h.getPinned()===this.pinned),n=null,s=null,l=null;for(let h of a){if(s=h.getActualWidth(),n=this.getNormalisedColumnLeft(h,0,r),n!=null){let p=n+s;if(n<=t&&p>=t){l=h;break}}n=null,s=null}if(l)e.indexOf(l)!==-1&&(l=null);else{for(let h=a.length-1;h>=0;h--){let p=a[h],f=a[h].getParent();if(!f){l=p;break}let m=f==null?void 0:f.getDisplayedLeafColumns();if(m.length){l=U(m);break}}if(!l)return;n=this.getNormalisedColumnLeft(l,0,r),s=l.getActualWidth()}if(l==null||n==null||s==null){((d=this.lastHighlightedColumn)==null?void 0:d.column)!==l&&this.clearHighlighted();return}let c;if(t-nel;return t&&o||e.some(i=>i.getPinned()!==this.pinned)}moveColumnsAfterHighlight(e){let{allMovingColumns:t,xPosition:o,fromEnter:i,fakeEvent:r,fromLeft:a}=e,n=this.getMoveColumnParams({allMovingColumns:t,isFromHeader:!0,xPosition:o,fromLeft:a,fromEnter:i,fakeEvent:r}),{columns:s,toIndex:l}=Ad(n)||{};s&&l!=null&&(this.lastMovedInfo={columns:s,toIndex:l}),this.finishColumnMoving()}clearHighlighted(){let{lastHighlightedColumn:e}=this;e&&(tl(e.column,null),this.lastHighlightedColumn=null)}checkCenterForScrolling(e){if(!this.isCenterContainer)return;let t=this.beans.ctrlsSvc.get("center"),o=t.getCenterViewportScrollLeft(),i=o+t.getCenterWidth(),r,a;this.gos.get("enableRtl")?(r=ei-Ii):(a=ei-Ii),this.needToMoveRight=r,this.needToMoveLeft=a,a||r?this.ensureIntervalStarted():this.ensureIntervalCleared()}ensureIntervalStarted(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),Zv),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(){var i;let e;this.intervalCount++,e=10+this.intervalCount*Qv,e>Na&&(e=Na);let t=null,o=this.gridBodyCon.scrollFeature;if(this.needToMoveLeft?t=o.scrollHorizontally(-e):this.needToMoveRight&&(t=o.scrollHorizontally(e)),t!==0)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{this.failedMoveAttempts++;let{pinnedCols:r,dragAndDrop:a,gos:n}=this.beans;if(this.failedMoveAttempts<=el+1||!r)return;if(a.setDragImageCompIcon("pinned"),!n.get("suppressMoveWhenColumnDragging")){let s=(i=this.lastDraggingEvent)==null?void 0:i.dragItem.columns;this.attemptToPinColumns(s,void 0,!0)}}}getPinDirection(){if(this.needToMoveLeft||this.pinned==="left")return"left";if(this.needToMoveRight||this.pinned==="right")return"right"}attemptToPinColumns(e,t,o=!1){let i=(e||[]).filter(n=>!n.getColDef().lockPinned);if(!i.length)return 0;o&&(t=this.getPinDirection());let{pinnedCols:r,dragAndDrop:a}=this.beans;return r==null||r.setColsPinned(i,t,"uiColumnDragged"),o&&a.nudge(),i.length}destroy(){super.destroy(),this.lastDraggingEvent=null,this.clearHighlighted(),this.lastMovedInfo=null}};function tl(e,t){e.highlighted!==t&&(e.highlighted=t,e.dispatchColEvent("headerHighlightChanged","uiColumnMoved"))}function Xv(e){let t=e.length,o,i;for(let r=0;r{let r,a=i.gridBodyCtrl.eBodyViewport;switch(o){case"left":r=[[a,i.left.eContainer],[i.bottomLeft.eContainer],[i.topLeft.eContainer]];break;case"right":r=[[a,i.right.eContainer],[i.bottomRight.eContainer],[i.topRight.eContainer]];break;default:r=[[a,i.center.eViewport],[i.bottomCenter.eViewport],[i.topCenter.eViewport]];break}this.eSecondaryContainers=r}),this.moveColumnFeature=this.createManagedBean(new Jv(o)),this.bodyDropPivotTarget=this.createManagedBean(new Wv(o)),t.addDropTarget(this),this.addDestroyFunc(()=>t.removeDropTarget(this))}isInterestedIn(e){return e===1||e===0&&this.gos.get("allowDragFromColumnsToolPanel")}getSecondaryContainers(){return this.eSecondaryContainers}getContainer(){return this.eContainer}getIconName(){return this.currentDropListener.getIconName()}isDropColumnInPivotMode(e){return this.beans.colModel.isPivotMode()&&e.dragSource.type===0}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()}};function Ld(e,t){let o=[],i=[],r=[];return e.forEach(n=>{let s=n.getColDef().lockPosition;s==="right"?r.push(n):s==="left"||s===!0?o.push(n):i.push(n)}),t.get("enableRtl")?[...r,...i,...o]:[...o,...i,...r]}function Od(e,t){let o=!0;return lt(null,t,i=>{if(!de(i))return;let r=i,a=r.getColGroupDef();if(!(a==null?void 0:a.marryChildren))return;let s=[];for(let u of r.getLeafColumns()){let h=e.indexOf(u);s.push(h)}let l=Math.max.apply(Math,s),c=Math.min.apply(Math,s),d=l-c,g=r.getLeafColumns().length-1;d>g&&(o=!1)}),o}var tC=class extends S{constructor(){super(...arguments),this.beanName="colMoves"}moveColumnByIndex(e,t,o){let i=this.beans.colModel.getCols();if(!i)return;let r=i[e];this.moveColumns([r],t,o)}moveColumns(e,t,o,i=!0){let{colModel:r,colAnimation:a,visibleCols:n,eventSvc:s}=this.beans,l=r.getCols();if(!l)return;if(t>l.length-e.length){k(30,{toIndex:t});return}a==null||a.start();let c=r.getColsForKeys(e);this.doesMovePassRules(c,t)&&(Cs(r.getCols(),c,t),n.refresh(o),s.dispatchEvent({type:"columnMoved",columns:c,column:c.length===1?c[0]:null,toIndex:t,finished:i,source:o})),a==null||a.finish()}doesMovePassRules(e,t){let o=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(o)}doesOrderPassRules(e){let{colModel:t,gos:o}=this.beans;return!(!Od(e,t.getColTree())||!(r=>{let a=c=>c?c==="left"||c===!0?-1:1:0,n=o.get("enableRtl"),s=n?1:-1,l=!0;for(let c of r){let d=a(c.getColDef().lockPosition);n?d>s&&(l=!1):ds?"hide":"notAllowed",getDragItem:l?()=>rC(t,n.allCols):()=>iC(t),dragItemName:o,onDragStarted:()=>{s=!i.get("suppressDragLeaveHidesColumns"),ca(c,!0)},onDragStopped:()=>ca(c,!1),onDragCancelled:()=>ca(c,!1),onGridEnter:u=>{if(s){let{columns:h=[],visibleState:p}=u!=null?u:{},f=l?v=>!p||p[v.getColId()]:()=>!0,m=h.filter(v=>!v.getColDef().lockVisible&&f(v));r.setColsVisible(m,!0,"uiColumnMoved")}},onGridExit:u=>{var h;if(s){let p=((h=u==null?void 0:u.columns)==null?void 0:h.filter(f=>!f.getColDef().lockVisible))||[];r.setColsVisible(p,!1,"uiColumnMoved")}}};return a.addDragSource(g,!0),g}};function oC(e,t){for(;e;){if(e.getGroupId()===t)return e;e=e.getParent()}}function iC(e){let t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t,containerType:e.pinned}}function rC(e,t){var s;let o=e.getProvidedColumnGroup().getLeafColumns(),i={};for(let l of o)i[l.getId()]=l.isVisible();let r=[];for(let l of t)o.indexOf(l)>=0&&(r.push(l),Xe(o,l));for(let l of o)r.push(l);let a=[],n=e.getLeafColumns();for(let l of r)n.indexOf(l)!==-1&&a.push(l);return{columns:r,columnsInSplit:a,visibleState:i,containerType:(s=a[0])==null?void 0:s.pinned}}var aC={moduleName:"ColumnMove",version:D,beans:[tC,Vv],apiFunctions:{moveColumnByIndex:Nv,moveColumns:Gv},dependsOn:[Td],css:[Bv]},nC=class extends S{constructor(){super(...arguments),this.beanName="autoWidthCalc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowContainerCtrl=e.center})}getPreferredWidthForColumn(e,t){let o=this.getHeaderCellForColumn(e);if(!o)return-1;let i=this.beans.rowRenderer.getAllCellsNotSpanningForColumn(e);return t||i.push(o),this.getPreferredWidthForElements(i)}getPreferredWidthForColumnGroup(e){let t=this.getHeaderCellForColumn(e);return t?this.getPreferredWidthForElements([t]):-1}getPreferredWidthForElements(e,t){let o=document.createElement("form");o.style.position="fixed";let i=this.centerRowContainerCtrl.eContainer;for(let a of e)this.cloneItemIntoDummy(a,o);i.appendChild(o);let r=Math.ceil(o.getBoundingClientRect().width);return o.remove(),t=t!=null?t:this.gos.get("autoSizePadding"),r+t}getHeaderCellForColumn(e){let t=null;for(let o of this.beans.ctrlsSvc.getHeaderRowContainerCtrls()){let i=o.getHtmlElementForColumnHeader(e);i!=null&&(t=i)}return t}cloneItemIntoDummy(e,t){let o=e.cloneNode(!0);o.style.width="",o.style.position="static",o.style.left="";let i=document.createElement("div"),r=i.classList;["ag-header-cell","ag-header-group-cell"].some(s=>o.classList.contains(s))?(r.add("ag-header","ag-header-row"),i.style.position="static"):r.add("ag-row");let n=e.parentElement;for(;n;){if(["ag-header-row","ag-row"].some(l=>n.classList.contains(l))){for(let l=0;la.getPinned());e.dispatchEvent({type:"columnPinned",pinned:r!=null?r:null,columns:t,column:i,source:o})}function lC(e,t,o){if(!t.length)return;let i=t.length===1?t[0]:null,r=Bd(t,a=>a.isVisible());e.dispatchEvent({type:"columnVisible",visible:r,columns:t,column:i,source:o})}function cC(e,t,o,i){e.dispatchEvent({type:t,columns:o,column:o&&o.length==1?o[0]:null,source:i})}function Io(e,t,o,i,r=null){t!=null&&t.length&&e.dispatchEvent({type:"columnResized",columns:t,column:t.length===1?t[0]:null,flexColumns:r,finished:o,source:i})}var dC=class extends S{constructor(e,t,o,i){super(),this.comp=e,this.eResize=t,this.pinned=o,this.columnGroup=i}postConstruct(){if(!this.columnGroup.isResizable()){this.comp.setResizableDisplayed(!1);return}let{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){let{columnsToResize:t,resizeStartWidth:o,resizeRatios:i,groupAfterColumns:r,groupAfterStartWidth:a,groupAfterRatios:n}=this.getInitialValues(e);this.resizeCols=t,this.resizeStartWidth=o,this.resizeRatios=i,this.resizeTakeFromCols=r,this.resizeTakeFromStartWidth=a,this.resizeTakeFromRatios=n,this.toggleColumnResizing(!0)}onResizing(e,t,o="uiColumnResized"){let i=this.normaliseDragChange(t),r=this.resizeStartWidth+i;this.resizeColumnsFromLocalValues(r,o,e)}getInitialValues(e){var l,c;let t=d=>d.reduce((g,u)=>g+u.getActualWidth(),0),o=(d,g)=>d.map(u=>u.getActualWidth()/g),i=this.getColumnsToResize(),r=t(i),a=o(i,r),n={columnsToResize:i,resizeStartWidth:r,resizeRatios:a},s=null;if(e&&(s=(c=(l=this.beans.colGroupSvc)==null?void 0:l.getGroupAtDirection(this.columnGroup,"After"))!=null?c:null),s){let d=s.getDisplayedLeafColumns(),g=n.groupAfterColumns=d.filter(h=>h.isResizable()),u=n.groupAfterStartWidth=t(g);n.groupAfterRatios=o(g,u)}else n.groupAfterColumns=void 0,n.groupAfterStartWidth=void 0,n.groupAfterRatios=void 0;return n}resizeLeafColumnsToFit(e){let 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;let 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){var g;let{columnsToResize:r,resizeStartWidth:a,resizeRatios:n,groupAfterColumns:s,groupAfterStartWidth:l,groupAfterRatios:c}=e,d=[];if(d.push({columns:r,ratios:n,width:t}),s){let u=t-a;d.push({columns:s,ratios:c,width:l-u})}(g=this.beans.colResize)==null||g.resizeColumnSets({resizeSets:d,finished:i,source:o}),i&&this.toggleColumnResizing(!1)}toggleColumnResizing(e){this.comp.toggleCss("ag-column-resizing",e)}getColumnsToResize(){return this.columnGroup.getDisplayedLeafColumns().filter(t=>t.isResizable())}normaliseDragChange(e){let t=e;return this.gos.get("enableRtl")?this.pinned!=="left"&&(t*=-1):this.pinned==="right"&&(t*=-1),t}destroy(){super.destroy(),this.resizeCols=void 0,this.resizeRatios=void 0,this.resizeTakeFromCols=void 0,this.resizeTakeFromRatios=void 0}},gC=class extends S{constructor(e,t,o,i,r){super(),this.pinned=e,this.column=t,this.eResize=o,this.comp=i,this.ctrl=r}postConstruct(){let e=[],t,o,i=()=>{if(q(this.eResize,t),!t)return;let{horizontalResizeSvc:n,colAutosize:s}=this.beans,l=n.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});e.push(l),o&&s&&e.push(s.addColumnAutosizeListeners(this.eResize,this.column))},r=()=>{for(let n of e)n();e.length=0},a=()=>{let n=this.column.isResizable(),s=!this.gos.get("suppressAutoSize")&&!this.column.getColDef().suppressAutoSize;(n!==t||s!==o)&&(t=n,o=s,r(),i())};a(),this.addDestroyFunc(r),this.ctrl.setRefreshFunction("resize",a)}onResizing(e,t){var u,h;let{column:o,lastResizeAmount:i,resizeStartWidth:r,beans:a}=this,n=this.normaliseResizeAmount(t),s=r+n,l=[{key:o,newWidth:s}],{pinnedCols:c,ctrlsSvc:d,colResize:g}=a;if(this.column.getPinned()){let p=(u=c==null?void 0:c.leftWidth)!=null?u:0,f=(h=c==null?void 0:c.rightWidth)!=null?h:0,m=ni(d.getGridBodyCtrl().eBodyViewport)-50;if(p+f+(n-i)>m)return}this.lastResizeAmount=n,g==null||g.setColumnWidths(l,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,o=this.pinned!=="left",i=this.pinned==="right";return this.gos.get("enableRtl")?o&&(t*=-1):i&&(t*=-1),t}},uC=class extends S{constructor(){super(...arguments),this.beanName="colResize"}setColumnWidths(e,t,o,i){let r=[],{colModel:a,gos:n,visibleCols:s}=this.beans;for(let l of e){let c=a.getColDefCol(l.key)||a.getCol(l.key);if(!c)continue;if(r.push({width:l.newWidth,ratios:[1],columns:[c]}),n.get("colResizeDefault")==="shift"&&(t=!t),t){let g=s.getColAfter(c);if(!g)continue;let u=c.getActualWidth()-l.newWidth,h=g.getActualWidth()+u;r.push({width:h,ratios:[1],columns:[g]})}}r.length!==0&&this.resizeColumnSets({resizeSets:r,finished:o,source:i})}resizeColumnSets(e){var d;let{resizeSets:t,finished:o,source:i}=e;if(!(!t||t.every(g=>hC(g)))){if(o){let g=t&&t.length>0?t[0].columns:null;Io(this.eventSvc,g,o,i)}return}let a=[],n=[];for(let g of t){let{width:u,columns:h,ratios:p}=g,f={},m={};for(let w of h)n.push(w);let v=!0,C=0;for(;v;){if(C++,C>1e3){W(31);break}v=!1;let w=[],y=0,x=u;h.forEach((F,P)=>{if(m[F.getId()])x-=f[F.getId()];else{w.push(F);let I=p[P];y+=I}});let R=1/y;w.forEach((F,P)=>{let T=P===w.length-1,I;T?I=x:(I=Math.round(p[P]*u*R),x-=I);let z=F.getMinWidth(),L=F.getMaxWidth();I0&&I>L&&(I=L,m[F.getId()]=!0,v=!0),f[F.getId()]=I})}for(let w of h){let y=f[w.getId()];w.getActualWidth()!==y&&(w.setActualWidth(y,i),a.push(w))}}let s=a.length>0,l=[];if(s){let{colFlex:g,visibleCols:u,colViewport:h}=this.beans;l=(d=g==null?void 0:g.refreshFlexedColumns({resizingCols:n,skipSetLeft:!0}))!=null?d:[],u.setLeftValues(i),u.updateBodyWidths(),h.checkViewportColumns()}let c=n.concat(l);(s||o)&&Io(this.eventSvc,c,o,i,l)}resizeHeader(e,t,o){if(!e.isResizable())return;let i=e.getActualWidth(),r=e.getMinWidth(),a=e.getMaxWidth(),n=Math.min(Math.max(i+t,r),a);this.setColumnWidths([{key:e,newWidth:n}],o,!0,"uiColumnResized")}createResizeFeature(e,t,o,i,r){return new gC(e,t,o,i,r)}createGroupResizeFeature(e,t,o,i){return new dC(e,t,o,i)}};function hC(e){let{columns:t,width:o}=e,i=0,r=0,a=!0;for(let l of t){let c=l.getMinWidth();i+=c||0;let d=l.getMaxWidth();d>0?r+=d:a=!1}let n=o>=i,s=!a||o<=r;return n&&s}var pC={moduleName:"ColumnResize",version:D,beans:[uC],apiFunctions:{setColumnWidths:sC},dependsOn:[Hv,Hd]},fC=class extends S{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();let e=this.onWidthChanged.bind(this);for(let 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(let e of this.removeChildListenersFuncs)e();this.removeChildListenersFuncs=[]}onDisplayedChildrenChanged(){this.addListenersToChildrenColumns(),this.onWidthChanged()}onWidthChanged(){let e=this.columnGroup.getActualWidth();this.comp.setWidth(`${e}px`),this.comp.toggleCss("ag-hidden",e===0)}},mC=class extends On{constructor(){super(...arguments),this.onSuppressColMoveChange=()=>{!this.isAlive()||this.isSuppressMoving()?this.removeDragSource():this.dragSource||this.setDragSource(this.eGui)}}wireComp(e,t,o,i,r){let{column:a,beans:n}=this,{context:s,colNames:l,colHover:c,rangeSvc:d,colResize:g}=n;this.comp=e,r=wi(this,s,r),this.setGui(t,r),this.displayName=l.getDisplayNameForColumnGroup(a,"header"),this.refreshHeaderStyles(),this.addClasses(),this.setupMovingCss(r),this.setupExpandable(r),this.setupTooltip(),this.refreshAnnouncement(),this.setupAutoHeight({wrapperElement:i,compBean:r}),this.setupUserComp(),this.addHeaderMouseListeners(r,i),this.addManagedPropertyListener("groupHeaderHeight",this.refreshMaxHeaderHeight.bind(this)),this.refreshMaxHeaderHeight();let u=this.rowCtrl.pinned,h=a.getProvidedColumnGroup().getLeafColumns();c==null||c.createHoverFeature(r,h,t),d==null||d.createRangeHighlightFeature(r,a,e),r.createManagedBean(new Ln(a,t,n)),r.createManagedBean(new fC(e,a)),g?this.resizeFeature=r.createManagedBean(g.createGroupResizeFeature(e,o,u,a)):e.setResizableDisplayed(!1),r.createManagedBean(new vi(t,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:()=>{},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addHighlightListeners(r,h),this.addManagedEventListeners({cellSelectionChanged:()=>this.refreshAnnouncement()}),r.addManagedPropertyListener("suppressMovableColumns",this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners(r),r.addDestroyFunc(()=>this.clearComponent())}getHeaderClassParams(){let{column:e,beans:t}=this,o=e.getDefinition();return O(t.gos,{colDef:o,columnGroup:e,floatingFilter:!1})}refreshMaxHeaderHeight(){let{gos:e,comp:t}=this,o=e.get("groupHeaderHeight");o!=null?o===0?t.setHeaderWrapperHidden(!0):t.setHeaderWrapperMaxHeight(o):(t.setHeaderWrapperHidden(!1),t.setHeaderWrapperMaxHeight(null))}addHighlightListeners(e,t){if(this.beans.gos.get("suppressMoveWhenColumnDragging"))for(let o of t)e.addManagedListeners(o,{headerHighlightChanged:this.onLeafColumnHighlightChanged.bind(this,o)})}onLeafColumnHighlightChanged(e){let t=this.column.getDisplayedLeafColumns(),o=t[0]===e,i=U(t)===e;if(!o&&!i)return;let r=e.getHighlighted(),a=!!this.rowCtrl.getHeaderCellCtrls().find(l=>l.column.isMoving()),n=!1,s=!1;if(a){let l=this.beans.gos.get("enableRtl"),c=r===1,d=r===0;o&&(l?s=c:n=d),i&&(l?n=d:s=c)}this.comp.toggleCss("ag-header-highlight-before",n),this.comp.toggleCss("ag-header-highlight-after",s)}resizeHeader(e,t){let{resizeFeature:o}=this;if(!o)return;let i=o.getInitialValues(t);o.resizeColumns(i,i.resizeStartWidth+e,"uiColumnResized",!0)}resizeLeafColumnsToFit(e){var t;(t=this.resizeFeature)==null||t.resizeLeafColumnsToFit(e)}setupUserComp(){let{colGroupSvc:e,userCompFactory:t,gos:o,enterpriseMenuFactory:i}=this.beans,r=this.column,a=r.getProvidedColumnGroup(),n=O(o,{displayName:this.displayName,columnGroup:r,setExpanded:l=>{e.setColumnGroupOpened(a,l,"gridInitializing")},setTooltip:(l,c)=>{o.assertModuleRegistered("Tooltip",3),this.setupTooltip(l,c)},showColumnMenu:(l,c)=>i==null?void 0:i.showMenuAfterButtonClick(a,l,"columnMenu",c),showColumnMenuAfterMouseClick:(l,c)=>i==null?void 0:i.showMenuAfterMouseEvent(a,l,"columnMenu",c),eGridHeader:this.eGui}),s=zp(t,n);s&&this.comp.setUserCompDetails(s)}addHeaderMouseListeners(e,t){let{column:o,comp:i,beans:{rangeSvc:r},gos:a}=this,n=d=>this.handleMouseOverChange(d.type==="mouseenter"),s=()=>this.dispatchColumnMouseEvent("columnHeaderClicked",o.getProvidedColumnGroup()),l=d=>this.handleContextMenuMouseEvent(d,void 0,o.getProvidedColumnGroup());e.addManagedListeners(this.eGui,{mouseenter:n,mouseleave:n,click:s,contextmenu:l}),i.toggleCss("ag-header-group-cell-selectable",So(a));let c=r==null?void 0:r.createHeaderGroupCellMouseListenerFeature(this.column,t);c&&this.createManagedBean(c)}handleMouseOverChange(e){this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column.getProvidedColumnGroup()})}setupTooltip(e,t){var o;this.tooltipFeature=(o=this.beans.tooltipSvc)==null?void 0:o.setupHeaderGroupTooltip(this.tooltipFeature,this,e,t)}setupExpandable(e){let t=this.column.getProvidedColumnGroup();this.refreshExpanded();let o=this.refreshExpanded.bind(this);e.addManagedListeners(t,{expandedChanged:o,expandableChanged:o})}refreshExpanded(){let{column:e}=this;this.expandable=e.isExpandable();let t=e.isExpanded();this.expandable?this.comp.setAriaExpanded(t?"true":"false"):this.comp.setAriaExpanded(void 0),this.refreshHeaderStyles()}addClasses(){let{column:e}=this,t=e.getColGroupDef(),o=ud(t,this.gos,null,e);e.isPadding()?(o.push("ag-header-group-cell-no-group"),e.getLeafColumns().every(r=>r.isSpanHeaderHeight())&&o.push("ag-header-span-height")):(o.push("ag-header-group-cell-with-group"),t!=null&&t.wrapHeaderText&&o.push("ag-header-cell-wrap-text"));for(let i of o)this.comp.toggleCss(i,!0)}setupMovingCss(e){let{column:t}=this,i=t.getProvidedColumnGroup().getLeafColumns(),r=()=>this.comp.toggleCss("ag-header-cell-moving",t.isMoving());for(let a of i)e.addManagedListeners(a,{movingChanged:r});r()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription())}handleKeyDown(e){var s;if(super.handleKeyDown(e),!this.getWrapperHasFocus())return;let{column:o,expandable:i,gos:r,beans:a}=this,n=So(r);if(e.key==b.ENTER){if(n&&!e.altKey)(s=a.rangeSvc)==null||s.handleColumnSelection(o,e);else if(i){let l=!o.isExpanded();a.colGroupSvc.setColumnGroupOpened(o.getProvidedColumnGroup(),l,"uiColumnExpanded")}}}refreshAnnouncement(){let e,{gos:t}=this;So(t)&&(e=this.getLocaleTextFunc()("ariaColumnGroupCellSelection","Press Enter to toggle selection for all visible cells in this column group")),this.ariaAnnouncement=e}announceAriaDescription(){var i;let{beans:e,eGui:t,ariaAnnouncement:o}=this;!o||!t.contains(Y(e))||(i=e.ariaAnnounce)==null||i.announceValue(o,"columnHeader")}setDragSource(e){var t,o;!this.isAlive()||this.isSuppressMoving()||(this.removeDragSource(),e&&(this.dragSource=(o=(t=this.beans.colMoves)==null?void 0:t.setDragSourceForHeader(e,this.column,this.displayName))!=null?o: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()}};function vC(e,t,o){var i;(i=e.colGroupSvc)==null||i.setColumnGroupOpened(t,o,"api")}function CC(e,t,o){var i,r;return(r=(i=e.colGroupSvc)==null?void 0:i.getColumnGroup(t,o))!=null?r:null}function wC(e,t){var o,i;return(i=(o=e.colGroupSvc)==null?void 0:o.getProvidedColGroup(t))!=null?i:null}function bC(e,t,o){return e.colNames.getDisplayNameForColumnGroup(t,o)||""}function yC(e){var t,o;return(o=(t=e.colGroupSvc)==null?void 0:t.getColumnGroupState())!=null?o:[]}function SC(e,t){var o;(o=e.colGroupSvc)==null||o.setColumnGroupState(t,"api")}function xC(e){var t;(t=e.colGroupSvc)==null||t.resetColumnGroupState("api")}function kC(e){return e.visibleCols.treeLeft}function RC(e){return e.visibleCols.treeCenter}function EC(e){return e.visibleCols.treeRight}function FC(e){return e.visibleCols.getAllTrees()}var Nd=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){let t=this.existingIds[e],o;return typeof t!="number"?o=0:o=t+1,this.existingIds[e]=o,o}};function DC(e,t){for(let o=0;o=0&&(e[i]=e[e.length-1],e.pop())}}var MC=class extends S{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){let{colFlex:o,colModel:i,colGroupSvc:r,colViewport:a,selectionColSvc:n}=this.beans;t||this.buildTrees(i,r),r==null||r.updateOpenClosedVisibility(),this.leftCols=da(this.treeLeft),this.centerCols=da(this.treeCenter),this.rightCols=da(this.treeRight),n==null||n.refreshVisibility(this.leftCols,this.centerCols,this.rightCols),this.joinColsAriaOrder(i),this.joinCols(),this.headerGroupRowCount=this.getHeaderRowCount(),this.setLeftValues(e),this.autoHeightCols=this.allCols.filter(s=>s.isAutoHeight()),o==null||o.refreshFlexedColumns(),this.updateBodyWidths(),this.setFirstRightAndLastLeftPinned(i,this.leftCols,this.rightCols,e),a.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(let t of this.allCols){let o=t.getParent();for(;o;){if(!o.isPadding()){let i=o.getProvidedColumnGroup().getLevel()+1;i>e&&(e=i);break}o=o.getParent()}}return e}updateBodyWidths(){let e=at(this.centerCols),t=at(this.leftCols),o=at(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 r,a;this.gos.get("enableRtl")?(r=t?t[0]:null,a=o?U(o):null):(r=t?U(t):null,a=o?o[0]:null);for(let n of e.getCols())n.setLastLeftPinned(n===r,i),n.setFirstRightPinned(n===a,i)}buildTrees(e,t){let o=e.getColsToShow(),i=o.filter(l=>l.getPinned()=="left"),r=o.filter(l=>l.getPinned()=="right"),a=o.filter(l=>l.getPinned()!="left"&&l.getPinned()!="right"),n=new Nd,s=l=>t?t.createColumnGroups(l):l.columns;this.treeLeft=s({columns:i,idCreator:n,pinned:"left",oldDisplayedGroups:this.treeLeft}),this.treeRight=s({columns:r,idCreator:n,pinned:"right",oldDisplayedGroups:this.treeRight}),this.treeCenter=s({columns:a,idCreator:n,pinned:null,oldDisplayedGroups:this.treeCenter}),this.updateColsAndGroupsMap()}clear(){this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.ariaOrderColumns=[]}joinColsAriaOrder(e){let t=e.getCols(),o=[],i=[],r=[];for(let a of t){let n=a.getPinned();n?n===!0||n==="left"?o.push(a):r.push(a):i.push(a)}this.ariaOrderColumns=o.concat(i).concat(r)}getAriaColIndex(e){let t;return X(e)?t=e.getLeafColumns()[0]:t=e,this.ariaOrderColumns.indexOf(t)+1}setLeftValuesOfGroups(){for(let e of[this.treeLeft,this.treeRight,this.treeCenter])for(let t of e)X(t)&&t.checkLeft()}setLeftValuesOfCols(e){let{colModel:t}=this.beans;if(!t.getColDefCols())return;let i=t.getCols().slice(0),r=this.gos.get("enableRtl");for(let a of[this.leftCols,this.rightCols,this.centerCols]){if(r){let n=at(a);for(let s of a)n-=s.getActualWidth(),s.setLeft(n,e)}else{let n=0;for(let s of a)s.setLeft(n,e),n+=s.getActualWidth()}DC(i,a)}for(let a of i)a.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){let{leftCols:t,beans:{colModel:o}}=this;return o.colSpanActive?this.getColsForRow(e,t):t}getRightColsForRow(e){let{rightCols:t,beans:{colModel:o}}=this;return o.colSpanActive?this.getColsForRow(e,t):t}getColsForRow(e,t,o,i){let r=[],a=null;for(let n=0;n1){let u=c-1;for(let h=1;h<=u;h++)d.push(t[n+h]);n+=u}let g;if(o){g=!1;for(let u of d)o(u)&&(g=!0)}else g=!0;g&&(r.length===0&&a&&(i&&i(s))&&r.push(a),r.push(s)),a=s}return r}getContainerWidth(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}}getColBefore(e){let 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={};let e=t=>{this.colsAndGroupsMap[t.getUniqueId()]=t};$t(this.treeCenter,!1,e),$t(this.treeLeft,!1,e),$t(this.treeRight,!1,e)}isVisible(e){return this.colsAndGroupsMap[e.getUniqueId()]===e}getFirstColumn(){let e=this.gos.get("enableRtl"),t=["leftCols","centerCols","rightCols"];e&&t.reverse();for(let o=0;o{Dt(o)&&t.push(o)}),t}var PC=class extends S{constructor(){super(...arguments),this.beanName="colGroupSvc"}getColumnGroupState(){let e=[],t=this.beans.colModel.getColTree();return lt(null,t,o=>{de(o)&&e.push({groupId:o.getGroupId(),open:o.isExpanded()})}),e}resetColumnGroupState(e){let t=this.beans.colModel.getColDefColTree();if(!t)return;let o=[];lt(null,t,i=>{if(de(i)){let r=i.getColGroupDef(),a={groupId:i.getGroupId(),open:r?r.openByDefault:void 0};o.push(a)}}),this.setColumnGroupState(o,e)}setColumnGroupState(e,t){let{colModel:o,colAnimation:i,visibleCols:r,eventSvc:a}=this.beans;if(!o.getColTree().length)return;i==null||i.start();let s=[];for(let l of e){let c=l.groupId,d=l.open,g=this.getProvidedColGroup(c);g&&g.isExpanded()!==d&&(g.setExpanded(d),s.push(g))}r.refresh(t,!0),s.length&&a.dispatchEvent({type:"columnGroupOpened",columnGroup:s.length===1?s[0]:void 0,columnGroups:s}),i==null||i.finish()}setColumnGroupOpened(e,t,o){let i;de(e)?i=e.getId():i=e||"",this.setColumnGroupState([{groupId:i,open:t}],o)}getProvidedColGroup(e){let t=null;return lt(null,this.beans.colModel.getColTree(),o=>{de(o)&&o.getId()===e&&(t=o)}),t}getGroupAtDirection(e,t){let o=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),i=e.getDisplayedLeafColumns(),r=t==="After"?U(i):i[0],a=`getCol${t}`;for(;;){let n=this.beans.visibleCols[a](r);if(!n)return null;let s=this.getColGroupAtLevel(n,o);if(s!==e)return s}}getColGroupAtLevel(e,t){let o=e.getParent(),i,r;for(;i=o.getProvidedColumnGroup().getLevel(),r=o.getPaddingLevel(),!(i+r<=t);)o=o.getParent();return o}updateOpenClosedVisibility(){let e=this.beans.visibleCols.getAllTrees();$t(e,!1,t=>{X(t)&&t.calculateDisplayedColumns()})}getColumnGroup(e,t){if(!e)return null;if(X(e))return e;let o=this.beans.visibleCols.getAllTrees(),i=typeof t=="number",r=null;return $t(o,!1,a=>{if(X(a)){let n=a,s;i?s=e===n.getGroupId()&&t===n.getPartId():s=e===n.getGroupId(),s&&(r=n)}}),r}createColumnGroups(e){let{columns:t,idCreator:o,pinned:i,oldDisplayedGroups:r,isStandaloneStructure:a}=e,n=this.mapOldGroupsById(r),s=[],l=t;for(;l.length;){let c=l;l=[];let d=0,g=u=>{let h=d;d=u;let p=c[h],m=(X(p)?p.getProvidedColumnGroup():p).getOriginalParent();if(m==null){for(let C=h;Cde(d))){l.setChildren([n]);continue}else{l.setChildren(e);break}r.push(n)}}return r}findDepth(e){let t=0,o=e;for(;o!=null&&o[0]&&de(o[0]);)t++,o=o[0].getChildren();return t}findMaxDepth(e,t){let o=t;for(let i=0;i=0;a--){let n=new Wi(null,`FAKE_PATH_${i.getId()}_${a}`,!0,a);this.createBean(n),n.setChildren([r]),r.originalParent=n,r=n}t===0&&(i.originalParent=null),o.push(r)}return o}findExistingGroup(e,t){if(e.groupId!=null)for(let i=0;i{for(let r of i)if(X(r)){let a=r;t[r.getUniqueId()]=a,o(a.getChildren())}};return e&&o(e),t}setupParentsIntoCols(e,t){for(let o of e!=null?e:[])if(o.parent!==t&&(this.beans.colViewport.colsWithinViewportHash=""),o.parent=t,X(o)){let i=o;this.setupParentsIntoCols(i.getChildren(),i)}}},IC={moduleName:"ColumnGroup",version:D,dynamicBeans:{headerGroupCellCtrl:mC},beans:[PC],apiFunctions:{getAllDisplayedColumnGroups:FC,getCenterDisplayedColumnGroups:RC,getColumnGroup:CC,getColumnGroupState:yC,getDisplayNameForColumnGroup:bC,getLeftDisplayedColumnGroups:kC,getProvidedColumnGroup:wC,getRightDisplayedColumnGroups:EC,resetColumnGroupState:xC,setColumnGroupOpened:vC,setColumnGroupState:SC}};function Ve(e,t,o){var x,R,F;let{colModel:i,rowGroupColsSvc:r,pivotColsSvc:a,autoColSvc:n,selectionColSvc:s,colAnimation:l,visibleCols:c,pivotResultCols:d,environment:g,valueColsSvc:u,eventSvc:h,gos:p}=e,f=(x=i.getColDefCols())!=null?x:[],m=s==null?void 0:s.getColumns();if(!f.length&&!(m!=null&&m.length))return!1;if(t!=null&&t.state&&!t.state.forEach)return k(32),!1;let v=(P,T,I,z,L)=>{var We;if(!P)return;let N=rp(T,t.defaultState),j=N("flex").value1,A=N("sort").value1,H=N("sortType").value1,V=xt(A)||Sn(H),Z=gt(H),K=xr(A),ge=V?{type:Z,direction:K}:void 0;if(Bc(e,P,N("hide").value1,ge,N("sortIndex").value1,N("pinned").value1,j,o),j==null){let le=N("width").value1;if(le!=null){let it=(We=P.getColDef().minWidth)!=null?We:g.getDefaultColumnMinWidth();it!=null&&le>=it&&P.setActualWidth(le,o)}}L||!P.isPrimary()||(u==null||u.syncColumnWithState(P,o,N),r==null||r.syncColumnWithState(P,o,N,I),a==null||a.syncColumnWithState(P,o,N,z))},C=(P,T,I)=>{var it,so,Oo,Ho;let z=Gd(e,o),L=T.slice(),N={},j={},A=[],H=[],V=[],Z=0,K=(it=r==null?void 0:r.columns.slice())!=null?it:[],ge=(so=a==null?void 0:a.columns.slice())!=null?so:[];for(let J of P){let ze=J.colId;if(ze.startsWith(kr)){A.push(J),V.push(J);continue}if(At(ze)){H.push(J),V.push(J);continue}let lo=I(ze);lo?(v(lo,J,N,j,!1),Xe(L,lo)):(V.push(J),Z+=1)}let We=J=>v(J,null,N,j,!1);L.forEach(We),r==null||r.sortColumns(ol.bind(r,N,K)),a==null||a.sortColumns(ol.bind(a,j,ge)),i.refreshCols(!1,o);let le=(J,ze,Vr=[])=>{for(let lo of ze){let vs=J(lo.colId);Xe(Vr,vs),v(vs,lo,null,null,!0)}Vr.forEach(We)};return le(J=>{var ze;return(ze=n==null?void 0:n.getColumn(J))!=null?ze:null},A,(Oo=n==null?void 0:n.getColumns())==null?void 0:Oo.slice()),le(J=>{var ze;return(ze=s==null?void 0:s.getColumn(J))!=null?ze:null},H,(Ho=s==null?void 0:s.getColumns())==null?void 0:Ho.slice()),AC(t,i,p),c.refresh(o),h.dispatchEvent({type:"columnEverythingChanged",source:o}),z(),{unmatchedAndAutoStates:V,unmatchedCount:Z}};l==null||l.start();let{unmatchedAndAutoStates:w,unmatchedCount:y}=C(t.state||[],f,P=>i.getColDefCol(P));if(w.length>0||M(t.defaultState)){let P=(F=(R=d==null?void 0:d.getPivotResultCols())==null?void 0:R.list)!=null?F:[];y=C(w,P,T=>{var I;return(I=d==null?void 0:d.getPivotResultCol(T))!=null?I:null}).unmatchedCount}return l==null||l.finish(),y===0}function TC(e,t){var C,w,y,x;let{colModel:o,autoColSvc:i,selectionColSvc:r,eventSvc:a,gos:n}=e,s=o.getColDefCols();if(!(s!=null&&s.length))return;let l=o.getColDefColTree(),c=Gc(l),d=[],g=1e3,u=1e3,h=R=>{let F=Wd(R);Q(F.rowGroupIndex)&&F.rowGroup&&(F.rowGroupIndex=g++),Q(F.pivotIndex)&&F.pivot&&(F.pivotIndex=u++),d.push(F)};(C=i==null?void 0:i.getColumns())==null||C.forEach(h),(w=r==null?void 0:r.getColumns())==null||w.forEach(h),c==null||c.forEach(h),Ve(e,{state:d},t);let p=(y=i==null?void 0:i.getColumns())!=null?y:[],v=[...(x=r==null?void 0:r.getColumns())!=null?x:[],...p,...s].map(R=>({colId:R.colId}));Ve(e,{state:v,applyOrder:!0},t),a.dispatchEvent(O(n,{type:"columnsReset",source:t}))}function Gd(e,t){var g,u,h;let{rowGroupColsSvc:o,pivotColsSvc:i,valueColsSvc:r,colModel:a,sortSvc:n,eventSvc:s}=e,l={rowGroupColumns:(g=o==null?void 0:o.columns.slice())!=null?g:[],pivotColumns:(u=i==null?void 0:i.columns.slice())!=null?u:[],valueColumns:(h=r==null?void 0:r.columns.slice())!=null?h:[]},c=ur(e),d={};for(let p of c)d[p.colId]=p;return()=>{var T,I;let p=(z,L,N,j)=>{let A=L.map(j),H=N.map(j);if(It(A,H))return;let Z=new Set(L);for(let ge of N)Z.delete(ge)||Z.add(ge);let K=[...Z];s.dispatchEvent({type:z,columns:K,column:K.length===1?K[0]:null,source:t})},f=z=>{let L=[];return a.forAllCols(N=>{let j=d[N.getColId()];j&&z(j,N)&&L.push(N)}),L},m=z=>z.getColId();p("columnRowGroupChanged",l.rowGroupColumns,(T=o==null?void 0:o.columns)!=null?T:[],m),p("columnPivotChanged",l.pivotColumns,(I=i==null?void 0:i.columns)!=null?I:[],m);let C=f((z,L)=>{let N=z.aggFunc!=null,j=N!=L.isValueActive(),A=N&&z.aggFunc!=L.getAggFunc();return j||A});C.length>0&&cC(s,"columnValueChanged",C,t),Io(s,f((z,L)=>z.width!=L.getActualWidth()),!0,t),Vd(s,f((z,L)=>z.pinned!=L.getPinned()),t),lC(s,f((z,L)=>z.hide==L.isVisible()),t);let F=f((z,L)=>!Gi(L.getSortDef(),{type:gt(z.sortType),direction:xr(z.sort)})||z.sortIndex!=L.getSortIndex());F.length>0&&(n==null||n.dispatchSortChangedEvents(t,F));let P=ur(e);LC(c,P,t,a,s)}}function ur(e){let{colModel:t,rowGroupColsSvc:o,pivotColsSvc:i}=e,r=t.getColDefCols();if(Q(r)||!t.isAlive())return[];let a=o==null?void 0:o.columns,n=i==null?void 0:i.columns,s=[],l=d=>{var f,m;let g=d.isRowGroupActive()&&a?a.indexOf(d):null,u=d.isPivotActive()&&n?n.indexOf(d):null,h=d.isValueActive()?d.getAggFunc():null,p=d.getSortIndex()!=null?d.getSortIndex():null;s.push({colId:d.getColId(),width:d.getActualWidth(),hide:!d.isVisible(),pinned:d.getPinned(),sort:d.getSort(),sortType:(f=d.getSortDef())==null?void 0:f.type,sortIndex:p,aggFunc:h,rowGroup:d.isRowGroupActive(),rowGroupIndex:g,pivot:d.isPivotActive(),pivotIndex:u,flex:(m=d.getFlex())!=null?m:null})};t.forAllCols(d=>l(d));let c=new Map(t.getCols().map((d,g)=>[d.getColId(),g]));return s.sort((d,g)=>{let u=c.has(d.colId)?c.get(d.colId):-1,h=c.has(g.colId)?c.get(g.colId):-1;return u-h}),s}function Wd(e){let t=(m,v)=>m!=null?m:v!=null?v:null,o=e.getColDef(),i=Me(t(o.sort,o.initialSort)),r=i.direction,a=i.type,n=t(o.sortIndex,o.initialSortIndex),s=t(o.hide,o.initialHide),l=t(o.pinned,o.initialPinned),c=t(o.width,o.initialWidth),d=t(o.flex,o.initialFlex),g=t(o.rowGroupIndex,o.initialRowGroupIndex),u=t(o.rowGroup,o.initialRowGroup);g==null&&!u&&(g=null,u=null);let h=t(o.pivotIndex,o.initialPivotIndex),p=t(o.pivot,o.initialPivot);h==null&&!p&&(h=null,p=null);let f=t(o.aggFunc,o.initialAggFunc);return{colId:e.getColId(),sort:r,sortType:a,sortIndex:n,hide:s,pinned:l,width:c,flex:d,rowGroup:u,rowGroupIndex:g,pivot:p,pivotIndex:h,aggFunc:f}}function AC(e,t,o){if(!e.applyOrder||!e.state)return;let i=[];for(let r of e.state)r.colId!=null&&i.push(r.colId);zC(t.cols,i,t,o)}function zC(e,t,o,i){if(e==null)return;let r=[],a={};for(let s of t){if(a[s])continue;let l=e.map[s];l&&(r.push(l),a[s]=!0)}let n=0;for(let s of e.list){let l=s.getColId();if(a[l]!=null)continue;l.startsWith(kr)?r.splice(n++,0,s):r.push(s)}if(r=Ld(r,i),!Od(r,o.getColTree())){k(39);return}e.list=r}function LC(e,t,o,i,r){let a={};for(let d of t)a[d.colId]=d;let n={};for(let d of e)a[d.colId]&&(n[d.colId]=!0);let s=e.filter(d=>n[d.colId]),l=t.filter(d=>n[d.colId]),c=[];l.forEach((d,g)=>{let u=s==null?void 0:s[g];if(u&&u.colId!==d.colId){let h=i.getCol(u.colId);h&&c.push(h)}}),c.length&&r.dispatchEvent({type:"columnMoved",columns:c,column:c.length===1?c[0]:null,finished:!0,source:o})}var ol=(e,t,o,i)=>{let r=e[o.getId()],a=e[i.getId()],n=r!=null,s=a!=null;if(n&&s)return r-a;if(n)return-1;if(s)return 1;let l=t.indexOf(o),c=t.indexOf(i),d=l>=0,g=c>=0;return d&&g?l-c:d?-1:1},OC=class extends S{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","groupHideColumnsUntilExpanded","rowNumbers","hidePaddedHeaderRows"],e=>this.refreshAll(ko(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),ko(e.source)))}createColsFromColDefs(e){var C,w,y;let{beans:t}=this,{valueCache:o,colAutosize:i,rowGroupColsSvc:r,pivotColsSvc:a,valueColsSvc:n,visibleCols:s,eventSvc:l,groupHierarchyColSvc:c}=t,d=this.colDefs?Gd(t,e):void 0;o==null||o.expire();let g=(C=this.colDefCols)==null?void 0:C.list,u=(w=this.colDefCols)==null?void 0:w.tree,h=Kh(t,this.colDefs,!0,u,e);rr(t,(y=this.colDefCols)==null?void 0:y.tree,h.columnTree);let p=h.columnTree,f=h.treeDepth,m=Gc(p),v={};for(let x of m)v[x.getId()]=x;this.colDefCols={tree:p,treeDepth:f,list:m,map:v},this.createColumnsForService([c],this.colDefCols,e),r==null||r.extractCols(e,g),a==null||a.extractCols(e,g),n==null||n.extractCols(e,g),this.ready=!0,this.changeEventsDispatching=!0,this.refreshCols(!0,e),this.changeEventsDispatching=!1,s.refresh(e),l.dispatchEvent({type:"columnEverythingChanged",source:e}),d&&(this.changeEventsDispatching=!0,d(),this.changeEventsDispatching=!1),l.dispatchEvent({type:"newColumnsLoaded",source:e}),e==="gridInitializing"&&(i==null||i.applyAutosizeStrategy())}refreshCols(e,t){var m;if(!this.colDefCols)return;let o=(m=this.cols)==null?void 0:m.tree;this.saveColOrder();let{autoColSvc:i,selectionColSvc:r,rowNumbersSvc:a,quickFilter:n,pivotResultCols:s,showRowGroupCols:l,rowAutoHeight:c,visibleCols:d,colViewport:g,eventSvc:u,formula:h}=this.beans,p=this.selectCols(s,this.colDefCols);h==null||h.setFormulasActive(p),this.createColumnsForService([i,r,a],p,t);let f=xh(this.gos,this.showingPivotResult);(!e||f)&&this.restoreColOrder(p),this.positionLockedCols(p),l==null||l.refresh(),n==null||n.refreshCols(),this.setColSpanActive(),c==null||c.setAutoHeightActive(p),d.clear(),g.clear(),It(o,this.cols.tree)||u.dispatchEvent({type:"gridColumnsChanged"})}createColumnsForService(e,t,o){for(let i of e)i&&(i.createColumns(t,r=>{this.lastOrder=r(this.lastOrder),this.lastPivotOrder=r(this.lastPivotOrder)},o),i.addColumns(t))}selectCols(e,t){var s;let o=(s=e==null?void 0:e.getPivotResultCols())!=null?s:null;this.showingPivotResult=o!=null;let{map:i,list:r,tree:a,treeDepth:n}=o!=null?o:t;return this.cols={list:r.slice(),map:{...i},tree:a.slice(),treeDepth:n},o&&(o.list.some(c=>{var d;return((d=this.cols)==null?void 0:d.map[c.getColId()])!==void 0})||(this.lastPivotOrder=null)),this.cols}getColsToShow(){if(!this.cols)return[];let{beans:e,showingPivotResult:t,cols:o}=this,{valueColsSvc:i,selectionColSvc:r,gos:a}=e,n=this.isPivotMode()&&!t,s=r==null?void 0:r.isSelectionColumnEnabled(),l=kh(e),c=i==null?void 0:i.columns,d=Fh(a);return o.list.filter(u=>{let h=xn(u);return n?(c==null?void 0:c.includes(u))||h&&(!d||u.isVisible())||s&&At(u)||l&&pe(u):h&&!d||u.isVisible()})}refreshAll(e){this.ready&&(this.refreshCols(!1,e),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,o){Ve(this.beans,{state:e.map(i=>({colId:typeof i=="string"?i:i.getColId(),hide:!t}))},o)}restoreColOrder(e){let t=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!t)return;let o=t.filter(g=>e.map[g.getId()]!=null);if(o.length===0)return;if(o.length===e.list.length){e.list=o;return}let i=g=>{let u=g.getOriginalParent();return u?u.getChildren().length>1?!0:i(u):!1};if(!o.some(g=>i(g))){let g=new Set(o);for(let u of e.list)g.has(u)||o.push(u);e.list=o;return}let r=new Map;for(let g=0;g!r.has(g));if(a.length===0){e.list=o;return}let n=(g,u)=>{let h=u?u.getOriginalParent():g.getOriginalParent();if(!h)return null;let p=null,f=null;for(let m of h.getChildren())if(!(m===u||m===g)){if(m instanceof ao){let v=r.get(m);if(v==null)continue;(p==null||p{let C=r.get(v);C!=null&&(p==null||p=0;g--)c[d--]=s[g];for(let g=o.length-1;g>=0;g--){let u=o[g],h=l.get(u);if(h)if(Array.isArray(h))for(let p=h.length-1;p>=0;p--){let f=h[p];c[d--]=f}else c[d--]=h;c[d--]=u}e.list=c}positionLockedCols(e){e.list=Ld(e.list,this.gos)}saveColOrder(){var e,t,o,i;this.showingPivotResult?this.lastPivotOrder=(t=(e=this.cols)==null?void 0:e.list)!=null?t:null:this.lastOrder=(i=(o=this.cols)==null?void 0:o.list)!=null?i:null}getColumnDefs(e){var t,o,i;return this.colDefCols&&((i=this.beans.colDefFactory)==null?void 0:i.getColumnDefs(this.colDefCols.list,this.showingPivotResult,this.lastOrder,(o=(t=this.cols)==null?void 0:t.list)!=null?o:[],e))}setColSpanActive(){var e;this.colSpanActive=!!((e=this.cols)!=null&&e.list.some(t=>t.getColDef().colSpan!=null))}isPivotMode(){return this.pivotMode}setPivotMode(e,t){if(e===this.pivotMode||(this.pivotMode=e,!this.ready))return;this.refreshCols(!1,t);let{visibleCols:o,eventSvc:i}=this.beans;o.refresh(t),i.dispatchEvent({type:"columnPivotModeChanged"})}isPivotActive(){var t;let e=(t=this.beans.pivotColsSvc)==null?void 0:t.columns;return this.pivotMode&&!!(e!=null&&e.length)}recreateColumnDefs(e){var o;if(!this.cols)return;(o=this.beans.autoColSvc)==null||o.updateColumns(e);let t=ko(e.source);this.createColsFromColDefs(t)}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){var e;rr(this.beans,(e=this.colDefCols)==null?void 0:e.tree),super.destroy()}getColTree(){var e,t;return(t=(e=this.cols)==null?void 0:e.tree)!=null?t:[]}getColDefColTree(){var e,t;return(t=(e=this.colDefCols)==null?void 0:e.tree)!=null?t:[]}getColDefCols(){var e,t;return(t=(e=this.colDefCols)==null?void 0:e.list)!=null?t:null}getCols(){var e,t;return(t=(e=this.cols)==null?void 0:e.list)!=null?t:[]}forAllCols(e){var a,n,s,l,c;let{pivotResultCols:t,autoColSvc:o,selectionColSvc:i,groupHierarchyColSvc:r}=this.beans;Bo((a=this.colDefCols)==null?void 0:a.list,e)||Bo((n=o==null?void 0:o.columns)==null?void 0:n.list,e)||Bo((s=i==null?void 0:i.columns)==null?void 0:s.list,e)||Bo((l=r==null?void 0:r.columns)==null?void 0:l.list,e)||Bo((c=t==null?void 0:t.getPivotResultCols())==null?void 0:c.list,e)}getColsForKeys(e){return e?e.map(t=>this.getCol(t)).filter(t=>t!=null):[]}getColDefCol(e){var t;return(t=this.colDefCols)!=null&&t.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return e==null?null:this.getColFromCollection(e,this.cols)}getColById(e){var t,o;return(o=(t=this.cols)==null?void 0:t.map[e])!=null?o:null}getColFromCollection(e,t){var s,l,c;if(t==null)return null;let{map:o,list:i}=t;if(typeof e=="string"&&o[e])return o[e];for(let d=0;de(this.getValue())}),this}getWidth(){return this.getGui().clientWidth}setWidth(e){return Ze(this.getGui(),e),this}getPreviousValue(){return this.previousValue}getValue(){return this.value}setValue(e,t){return this.value===e?this:(this.previousValue=this.value,this.value=e,t||this.dispatchLocalEvent({type:"fieldValueChanged"}),this)}};function VC(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"}]}]}}var Gt=class extends qd{constructor(e,t,o="text",i="input"){var r;super(e,(r=e==null?void 0:e.template)!=null?r:VC(i),[],t),this.inputType=o,this.displayFieldTag=i,this.eLabel=E,this.eWrapper=E,this.eInput=E}postConstruct(){super.postConstruct(),this.setInputType(this.inputType);let{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`;let{inputName:r,inputWidth:a,inputPlaceholder:n,autoComplete:s,tabIndex:l}=this.config;r!=null&&this.setInputName(r),a!=null&&this.setInputWidth(a),n!=null&&this.setInputPlaceholder(n),s!=null&&this.setAutoComplete(s),this.addInputListeners(),this.activateTabIndex([o],l)}addInputListeners(){this.addManagedElementListeners(this.eInput,{input:e=>this.setValue(e.target.value)})}setInputType(e){this.displayFieldTag==="input"&&(this.inputType=e,we(this.eInput,"type",e))}getInputElement(){return this.eInput}getWrapperElement(){return this.eWrapper}setInputWidth(e){return Zi(this.eWrapper,e),this}setInputName(e){return this.getInputElement().setAttribute("name",e),this}getFocusableElement(){return this.eInput}setMaxLength(e){let t=this.eInput;return t.maxLength=e,this}setInputPlaceholder(e){return we(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return Fo(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return ai(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(e===!0)we(this.eInput,"autocomplete",null);else{let t=typeof e=="string"?e:"off";we(this.eInput,"autocomplete",t)}return this}},Vn=class extends Gt{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();let{readOnly:e,passive:t,name:o}=this.config;typeof e=="boolean"&&this.setReadOnly(e),typeof t=="boolean"&&this.setPassive(t),o!=null&&this.setName(o)}addInputListeners(){this.addManagedElementListeners(this.eInput,{click:this.onCheckboxClick.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.toggle.bind(this)})}getNextValue(){return this.selected===void 0?!0:!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;let 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){let t=this.getInputElement();return t.name=e,this}isSelected(){return this.selected}setSelected(e,t){if(this.isSelected()===e)return;this.previousValue=this.isSelected(),e=this.selected=typeof e=="boolean"?e:void 0;let o=this.eInput;o.checked=e,o.indeterminate=e===void 0,t||this.dispatchChange(this.selected,this.previousValue)}dispatchChange(e,t,o){this.dispatchLocalEvent({type:"fieldValueChanged",selected:e,previousValue:t,event:o});let 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;let t=this.isSelected(),o=this.selected=e.target.checked;this.refreshSelectedClass(o),this.dispatchChange(o,t,e)}refreshSelectedClass(e){let t=this.eWrapper.classList;t.toggle("ag-checked",e===!0),t.toggle("ag-indeterminate",e==null)}},Nn={selector:"AG-CHECKBOX",component:Vn},NC=".ag-checkbox-cell{height:100%}",GC={tag:"div",cls:"ag-cell-wrapper ag-checkbox-cell",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},WC=class extends _{constructor(){super(GC,[Nn]),this.eCheckbox=E,this.registerCSS(NC)}init(e){this.refresh(e);let{eCheckbox:t,beans:o}=this,i=t.getInputElement();i.setAttribute("tabindex","-1"),ic(i,"polite"),this.addManagedListeners(i,{click:r=>{if(Xt(r),t.isDisabled())return;let a=t.getValue();this.onCheckboxChanged(a)},dblclick:r=>{Xt(r)}}),this.addManagedElementListeners(e.eGridCell,{keydown:r=>{if(r.key===b.SPACE&&!t.isDisabled()){e.eGridCell===Y(o)&&t.toggle();let a=t.getValue();this.onCheckboxChanged(a),r.preventDefault()}}})}refresh(e){return this.params=e,this.updateCheckbox(e),!0}updateCheckbox(e){var g;let t,o=!0,{value:i,column:r,node:a}=e;if(a.group&&r)if(typeof i=="boolean")t=i;else{let u=r.getColId();u.startsWith(kr)?t=i==null||i===""?void 0:i==="true":a.aggData&&a.aggData[u]!==void 0||a.sourceRowIndex>=0?t=i!=null?i:void 0:o=!1}else t=i!=null?i:void 0;let{eCheckbox:n}=this;if(!o){n.setDisplayed(!1);return}n.setValue(t);let s=(g=e.disabled)!=null?g:!(r!=null&&r.isCellEditable(a));n.setDisabled(s);let l=this.getLocaleTextFunc(),c=yr(l,t),d=s?c:`${l("ariaToggleCellValue","Press SPACE to toggle cell value")} (${c})`;n.setInputAriaLabel(d)}onCheckboxChanged(e){let{params:t}=this,{column:o,node:i,value:r}=t,{editSvc:a}=this.beans;if(!o)return;let n={rowNode:i,column:o};a==null||a.dispatchCellEvent(n,null,"cellEditingStarted",{value:r});let s=i.setDataValue(o,e,"ui");a==null||a.dispatchCellEvent(n,null,"cellEditingStopped",{oldValue:r,newValue:e,valueChanged:s}),s||this.updateCheckbox(t)}},qC={tag:"div",cls:"ag-skeleton-container"},_C=class extends _{constructor(){super(qC)}init(e){let t=`ag-cell-skeleton-renderer-${this.getCompId()}`;this.getGui().setAttribute("id",t),this.addDestroyFunc(()=>ii(e.eParentOfValue)),ii(e.eParentOfValue,t),e.deferRender?this.setupLoading(e):e.node.failedLoad?this.setupFailed():this.setupLoading(e)}setupFailed(){let e=this.getLocaleTextFunc();this.getGui().textContent=e("loadingError","ERR");let t=e("ariaSkeletonCellLoadingFailed","Row failed to load");Fo(this.getGui(),t)}setupLoading(e){let t=oe({tag:"div",cls:"ag-skeleton-effect"}),o=e.node.rowIndex;if(o!=null){let a=75+25*(o%2===0?Math.sin(o):Math.cos(o));t.style.width=`${a}%`}this.getGui().appendChild(t);let i=this.getLocaleTextFunc(),r=e.deferRender?i("ariaDeferSkeletonCellLoading","Cell is loading"):i("ariaSkeletonCellLoading","Row data is loading");Fo(this.getGui(),r)}refresh(e){return!1}},UC={moduleName:"CheckboxCellRenderer",version:D,userComponents:{agCheckboxCellRenderer:WC}},jC={moduleName:"SkeletonCellRenderer",version:D,userComponents:{agSkeletonCellRenderer:_C}};function KC(e,t){let o=e.colModel.getColDefCol(t);return o?o.getColDef():null}function $C(e){return e.colModel.getColumnDefs(!0)}function YC(e,t,o){return e.colNames.getDisplayNameForColumn(t,o)||""}function QC(e,t){return e.colModel.getColDefCol(t)}function ZC(e){return e.colModel.getColDefCols()}function JC(e,t){return Ve(e,t,"api")}function XC(e){return ur(e)}function ew(e){TC(e,"api")}function tw(e){return e.visibleCols.isPinningLeft()||e.visibleCols.isPinningRight()}function ow(e){return e.visibleCols.isPinningLeft()}function iw(e){return e.visibleCols.isPinningRight()}function rw(e,t){return e.visibleCols.getColAfter(t)}function aw(e,t){return e.visibleCols.getColBefore(t)}function nw(e,t,o){e.colModel.setColsVisible(t,o,"api")}function sw(e,t,o){var i;(i=e.pinnedCols)==null||i.setColsPinned(t,o,"api")}function lw(e){return e.colModel.getCols()}function cw(e){return e.visibleCols.leftCols}function dw(e){return e.visibleCols.centerCols}function gw(e){return e.visibleCols.rightCols}function uw(e){return e.visibleCols.allCols}function hw(e){return e.colViewport.getViewportColumns()}function Ga(e,t){if(!e)return;let o=e,i={};for(let r of Object.keys(o)){if(t&&t.indexOf(r)>=0||vc.has(r))continue;let a=o[r];typeof a=="object"&&a!==null&&a.constructor===Object?i[r]=Ga(a):i[r]=a}return i}var pw=class extends S{constructor(){super(...arguments),this.beanName="colDefFactory"}wireBeans(e){this.rowGroupColsSvc=e.rowGroupColsSvc,this.pivotColsSvc=e.pivotColsSvc}getColumnDefs(e,t,o,i,r=!1){var l,c;let a=e.slice();t?a.sort((d,g)=>o.indexOf(d)-o.indexOf(g)):(o||r)&&a.sort((d,g)=>i.indexOf(d)-i.indexOf(g));let n=(l=this.rowGroupColsSvc)==null?void 0:l.columns,s=(c=this.pivotColsSvc)==null?void 0:c.columns;return this.buildColumnDefs(a,n,s)}buildColumnDefs(e,t=[],o=[]){let i=[],r={};for(let a of e){let n=this.createDefFromColumn(a,t,o),s=!0,l=n,c=a.getOriginalParent(),d=null;for(;c;){let g=null;if(c.isPadding()){c=c.getOriginalParent();continue}let u=r[c.getGroupId()];if(u){u.children.push(l),s=!1;break}if(g=this.createDefFromGroup(c),g&&(g.children=[l],r[g.groupId]=g,l=g,c=c.getOriginalParent()),c!=null&&d===c){s=!1;break}d=c}s&&i.push(l)}return i}createDefFromGroup(e){let t=Ga(e.getColGroupDef(),["children"]);return t&&(t.groupId=e.getGroupId()),t}createDefFromColumn(e,t,o){let i=Ga(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:!0,i.pinned=e.isPinned()?e.getPinned():null,i.sort=e.getSortDef(),i.sortIndex=e.getSortIndex()!=null?e.getSortIndex():null,i}},fw=class extends S{constructor(){super(...arguments),this.beanName="colFlex",this.columnsHidden=!1}refreshFlexedColumns(e={}){var f;let t=(f=e.source)!=null?f:"flex";e.viewportWidth!=null&&(this.flexViewportWidth=e.viewportWidth);let o=this.flexViewportWidth,{visibleCols:i,colDelayRenderSvc:r}=this.beans,a=i.centerCols,n=-1;if(e.resizingCols){let m=new Set(e.resizingCols);for(let v=a.length-1;v>=0;v--)if(m.has(a[v])){n=v;break}}let s=!1,l=a.map((m,v)=>{let C=m.getFlex(),w=C!=null&&C>0&&v>n;return s||(s=w),{col:m,isFlex:w,flex:Math.max(0,C!=null?C:0),initialSize:m.getActualWidth(),min:m.getMinWidth(),max:m.getMaxWidth(),targetSize:0}});if(s?(r==null||r.hideColumns("colFlex"),this.columnsHidden=!0):this.columnsHidden&&this.revealColumns(r),!o||!s)return[];let c=l.length,d=l.reduce((m,v)=>m+v.flex,0),g=o,u=(m,v)=>{m.frozenSize=v,m.col.setActualWidth(v,t),g-=v,d-=m.flex,c-=1},h=m=>m.frozenSize!=null;for(let m of l)m.isFlex||u(m,m.initialSize);for(;c>0;){let m=Math.round(d<1?g*d:g),v,C=0,w=0;for(let R of l){if(h(R))continue;v=R,w+=m*(R.flex/d);let F=w-C,P=Math.round(F);R.targetSize=P,C+=P}v&&(v.targetSize+=m-C);let y=0;for(let R of l){if(h(R))continue;let F=R.targetSize,P=Math.min(Math.max(F,R.min),R.max);y+=P-F,R.violationType=P===F?void 0:P0?"min":"max";for(let R of l)h(R)||(x==="all"||R.violationType===x)&&u(R,R.targetSize)}e.skipSetLeft||i.setLeftValues(t),e.updateBodyWidths&&i.updateBodyWidths();let p=l.filter(m=>m.isFlex&&!m.violationType).map(m=>m.col);if(e.fireResizedEvent){let m=l.filter(C=>C.initialSize!==C.frozenSize).map(C=>C.col),v=l.filter(C=>C.flex).map(C=>C.col);Io(this.eventSvc,m,!0,t,v)}return this.revealColumns(r),p}revealColumns(e){this.columnsHidden&&(e==null||e.revealColumns("colFlex"),this.columnsHidden=!1)}initCol(e){let{flex:t,initialFlex:o}=e.colDef;t!==void 0?e.flex=t:o!==void 0&&(e.flex=o)}setColFlex(e,t){e.flex=t!=null?t:null,e.dispatchStateUpdatedEvent("flex")}},Se=e=>{if(typeof e=="bigint")return e;let t;if(typeof e=="number")t=e;else if(typeof e=="string"&&(t=e.trim(),t===""||(t.endsWith("n")&&(t=t.slice(0,-1)),!/^[+-]?\d+$/.test(t))))return null;if(t==null)return null;try{return BigInt(t)}catch{return null}},Gn="T",mw=new RegExp(`[${Gn} ]`),vw=new RegExp(`^\\d{4}-\\d{2}-\\d{2}(${Gn}\\d{2}:\\d{2}:\\d{2}\\D?)?`);function Ye(e,t){return e.toString().padStart(t,"0")}function fe(e,t=!0,o=Gn){if(!e)return null;let i=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(r=>Ye(r,2)).join("-");return t&&(i+=o+[e.getHours(),e.getMinutes(),e.getSeconds()].map(r=>Ye(r,2)).join(":")),i}function Ti(e,t=!0){return e?t?[String(e.getFullYear()),String(e.getMonth()+1),Ye(e.getDate(),2),Ye(e.getHours(),2),`:${Ye(e.getMinutes(),2)}`,`:${Ye(e.getSeconds(),2)}`]:[e.getFullYear(),e.getMonth()+1,Ye(e.getDate(),2)].map(String):null}var ga=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"},il=["January","February","March","April","May","June","July","August","September","October","November","December"],ua=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Cw(e,t){if(t==null)return fe(e,!1);let o=Ye(e.getFullYear(),4),i={YYYY:()=>o.slice(o.length-4,o.length),YY:()=>o.slice(o.length-2,o.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>il[e.getMonth()],MMM:()=>il[e.getMonth()].slice(0,3),MM:()=>Ye(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${ga(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${ga(e.getDate())}`,DD:()=>Ye(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>ua[e.getDay()],ddd:()=>ua[e.getDay()].slice(0,3),dd:()=>ua[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${ga(e.getDay())}`,d:()=>`${e.getDay()}`},r=new RegExp(Object.keys(i).join("|"),"g");return t.replace(r,a=>a in i?i[a]():a)}function Ui(e,t=!1){return!!me(e,t)}function ww(e){return Ui(e,!0)}function me(e,t=!1,o){if(!e||!o&&!vw.test(e))return null;let[i,r]=e.split(mw);if(!i)return null;let a=i.split("-").map(h=>Number.parseInt(h,10));if(a.filter(h=>!isNaN(h)).length!==3)return null;let[n,s,l]=a,c=new Date(n,s-1,l);if(c.getFullYear()!==n||c.getMonth()!==s-1||c.getDate()!==l||!r&&t)return null;if(!r||r==="00:00:00")return c;let[d,g,u]=r.split(":").map(h=>Number.parseInt(h,10));if(d>=0&&d<24)c.setHours(d);else if(t)return null;if(g>=0&&g<60)c.setMinutes(g);else if(t)return null;if(u>=0&&u<60)c.setSeconds(u);else if(t)return null;return c}function Xo(e,t,o){if(!t||!e)return;if(!o)return e[t];let i=t.split("."),r=e;for(let a=0;anull,suppressKeyboardEvent:({node:e,event:t,column:o})=>t.key===b.SPACE&&o.isCellEditable(e)}},date({formatValue:e}){return{cellEditor:"agDateCellEditor",keyCreator:e}},dateString({formatValue:e}){return{cellEditor:"agDateStringCellEditor",keyCreator:e}},dateTime(e){return this.date(e)},dateTimeString(e){return this.dateString(e)},object({formatValue:e,colModel:t,colId:o}){return{cellEditorParams:{useFormatter:!0},comparator:(i,r)=>{let a=t.getColDefCol(o),n=a==null?void 0:a.getColDef();if(!a||!n)return 0;let s=i==null?"":e({column:a,node:null,value:i}),l=r==null?"":e({column:a,node:null,value:r});return s===l?0:s>l?1:-1},keyCreator:e}},text(){return{}}}}wireBeans(e){this.colModel=e.colModel}postConstruct(){this.processDataTypeDefinitions(),this.addManagedPropertyListener("dataTypeDefinitions",e=>{this.processDataTypeDefinitions(),this.colModel.recreateColumnDefs(e)})}processDataTypeDefinitions(){var d;let e=this.getDefaultDataTypes(),t={},o={},i=g=>u=>{let{column:h,node:p,value:f}=u,m=h.getColDef().valueFormatter;return m===g.groupSafeValueFormatter&&(m=g.valueFormatter),this.beans.valueSvc.formatValue(h,p,f,m)};for(let g of Object.keys(e)){let u=e[g],h={...u,groupSafeValueFormatter:nl(u,this.gos)};t[g]=h,o[g]=i(h)}let r=(d=this.gos.get("dataTypeDefinitions"))!=null?d:{},a={};for(let g of Object.keys(r)){let u=r[g],h=this.processDataTypeDefinition(u,r,[g],e);h&&(t[g]=h,u.dataTypeMatcher&&(a[g]=u.dataTypeMatcher),o[g]=i(h))}let{valueParser:n,valueFormatter:s}=e.object,{valueParser:l,valueFormatter:c}=t.object;this.hasObjectValueParser=l!==n,this.hasObjectValueFormatter=c!==s,this.formatValueFuncs=o,this.dataTypeDefinitions=t,this.dataTypeMatchers=this.sortKeysInMatchers(a,e)}sortKeysInMatchers(e,t){var i;let o={...e};for(let r of bw)delete o[r],o[r]=(i=e[r])!=null?i:t[r].dataTypeMatcher;return o}processDataTypeDefinition(e,t,o,i){let r,a=e.extendsDataType;if(e.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),e.extendsDataType===e.baseDataType){let n=i[a],s=t[a];if(n&&s&&(n=s),!al(e,n,a))return;r=rl(n,e)}else{if(o.includes(a)){k(44);return}let n=t[a];if(!al(e,n,a))return;let s=this.processDataTypeDefinition(n,t,[...o,a],i);if(!s)return;r=rl(s,e)}return{...r,groupSafeValueFormatter:nl(r,this.gos)}}updateColDefAndGetColumnType(e,t,o){let{cellDataType:i}=t;i===void 0&&(i=e.cellDataType);let{field:r}=t;if((i==null||i===!0)&&(i=this.canInferCellDataType(e,t)?this.inferCellDataType(r,o):!1),this.addFormulaCellEditorToColDef(e,t),!i){e.cellDataType=!1;return}let a=this.dataTypeDefinitions[i];if(!a){k(47,{cellDataType:i});return}return e.cellDataType=i,a.groupSafeValueFormatter&&(e.valueFormatter=a.groupSafeValueFormatter),a.valueParser&&(e.valueParser=a.valueParser),a.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(e,i,a,o),a.columnTypes}addFormulaCellEditorToColDef(e,t){var i;!((i=t.allowFormula)!=null?i:e.allowFormula)||t.cellEditor||(e.cellEditor="agFormulaCellEditor")}addColumnListeners(e){if(!this.isPendingInference)return;let t=this.columnStateUpdatesPendingInference[e.getColId()];if(!t)return;let o=i=>{t.add(i.key)};e.__addEventListener("columnStateUpdated",o),this.columnStateUpdateListenerDestroyFuncs.push(()=>e.__removeEventListener("columnStateUpdated",o))}canInferCellDataType(e,t){var a;let{gos:o}=this;if(!ee(o))return!1;let i={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if(ha(t,i))return!1;let r=t.type===null?e.type:t.type;if(r){let n=(a=o.get("columnTypes"))!=null?a:{};if(ar(r).some(l=>{let c=n[l.trim()];return c&&ha(c,i)}))return!1}return!ha(e,i)}inferCellDataType(e,t){if(!e)return;let o,i=this.getInitialData();if(i){let a=e.includes(".")&&!this.gos.get("suppressFieldDotNotation");o=Xo(i,e,a)}else this.initWaitForRowData(t);if(o==null)return;let r=Object.keys(this.dataTypeMatchers).find(a=>this.dataTypeMatchers[a](o));return r!=null?r:"object"}getInitialData(){var t;let e=this.gos.get("rowData");if(e!=null&&e.length)return e[0];if(this.initialData)return this.initialData;{let o=(t=this.beans.rowModel.rootNode)==null?void 0:t._leafs;if(o!=null&&o.length)return o[0].data}return null}initWaitForRowData(e){if(this.columnStateUpdatesPendingInference[e]=new Set,this.isPendingInference)return;this.isPendingInference=!0;let t=this.isColumnTypeOverrideInDataTypeDefinitions,{colAutosize:o,eventSvc:i}=this.beans;t&&o&&(o.shouldQueueResizeOperations=!0);let[r]=this.addManagedEventListeners({rowDataUpdateStarted:a=>{let{firstRowData:n}=a;n&&(r==null||r(),this.isPendingInference=!1,this.processColumnsPendingInference(n,t),this.columnStateUpdatesPendingInference={},t&&(o==null||o.processResizeOperations()),i.dispatchEvent({type:"dataTypesInferred"}))}})}processColumnsPendingInference(e,t){this.initialData=e;let o=[];this.destroyColumnStateUpdateListeners();let i={},r={};for(let a of Object.keys(this.columnStateUpdatesPendingInference)){let n=this.columnStateUpdatesPendingInference[a],s=this.colModel.getCol(a);if(!s)continue;let l=s.getColDef();if(!this.resetColDefIntoCol(s,"cellDataTypeInferred"))continue;let c=s.getColDef();if(t&&c.type&&c.type!==l.type){let d=Fw(s,n);d.rowGroup&&d.rowGroupIndex==null&&(i[a]=d),d.pivot&&d.pivotIndex==null&&(r[a]=d),o.push(d)}}t&&o.push(...this.generateColumnStateForRowGroupAndPivotIndexes(i,r)),o.length&&Ve(this.beans,{state:o},"cellDataTypeInferred"),this.initialData=null}generateColumnStateForRowGroupAndPivotIndexes(e,t){let o={},{rowGroupColsSvc:i,pivotColsSvc:r}=this.beans;return i==null||i.restoreColumnOrder(o,e),r==null||r.restoreColumnOrder(o,t),Object.values(o)}resetColDefIntoCol(e,t){let o=e.getUserProvidedColDef();if(!o)return!1;let i=Pa(this.beans,o,e.getColId());return e.setColDef(i,o,t),!0}getDateStringTypeDefinition(e){var o;let{dateString:t}=this.dataTypeDefinitions;return e&&(o=this.getDataTypeDefinition(e))!=null?o:t}getDateParserFunction(e){return this.getDateStringTypeDefinition(e).dateParser}getDateFormatterFunction(e){return this.getDateStringTypeDefinition(e).dateFormatter}getDateIncludesTimeFlag(e){return e==="dateTime"||e==="dateTimeString"}getDataTypeDefinition(e){let t=e.getColDef();if(t.cellDataType)return this.dataTypeDefinitions[t.cellDataType]}getBaseDataType(e){var t;return(t=this.getDataTypeDefinition(e))==null?void 0:t.baseDataType}checkType(e,t){var i,r;if(t==null)return!0;let o=(i=this.getDataTypeDefinition(e))==null?void 0:i.dataTypeMatcher;return!o||e.getColDef().allowFormula&&((r=this.beans.formula)!=null&&r.isFormula(t))?!0:o(t)}validateColDef(e,t,o,i){if(e.cellDataType==="object"){let r=l=>(l==null?void 0:l.cellDataType)==null||(l==null?void 0:l.cellDataType)===!0,a=r(t)&&r(o),n=l=>k(48,{property:l,inferred:a,colId:i}),{object:s}=this.dataTypeDefinitions;e.valueFormatter===s.groupSafeValueFormatter&&!this.hasObjectValueFormatter&&n("Formatter"),e.editable&&e.valueParser===s.valueParser&&!this.hasObjectValueParser&&n("Parser")}}postProcess(e){var n;let t=e.cellDataType;if(!t||typeof t!="string")return;let{dataTypeDefinitions:o,beans:i,formatValueFuncs:r}=this,a=o[t];a&&((n=i.colFilter)==null||n.setColDefPropsForDataType(e,a,r[t]))}getFormatValue(e){return this.formatValueFuncs[e]}isColPendingInference(e){return this.isPendingInference&&!!this.columnStateUpdatesPendingInference[e]}setColDefPropertiesForBaseDataType(e,t,o,i){let r=this.formatValueFuncs[t],a=this.columnDefinitionPropsPerDataType[o.baseDataType]({colDef:e,cellDataType:t,colModel:this.colModel,dataTypeDefinition:o,colId:i,formatValue:r,filterModuleBean:this.beans.filterManager});e.cellEditor==="agFormulaCellEditor"&&a.cellEditor!==e.cellEditor&&(a.cellEditor=e.cellEditor),Object.assign(e,a)}getDateObjectTypeDef(e){let t=this.getLocaleTextFunc(),o=this.getDateIncludesTimeFlag(e);return{baseDataType:e,valueParser:i=>me(i.newValue&&String(i.newValue)),valueFormatter:i=>{var r;return i.value==null?"":!(i.value instanceof Date)||isNaN(i.value.getTime())?t("invalidDate","Invalid Date"):(r=fe(i.value,o))!=null?r:""},dataTypeMatcher:i=>i instanceof Date}}getDateStringTypeDef(e){let t=this.getDateIncludesTimeFlag(e);return{baseDataType:e,dateParser:o=>{var i;return(i=me(o))!=null?i:void 0},dateFormatter:o=>{var i;return(i=fe(o!=null?o:null,t))!=null?i:void 0},valueParser:o=>Ui(String(o.newValue))?o.newValue:null,valueFormatter:o=>Ui(String(o.value))?String(o.value):"",dataTypeMatcher:o=>typeof o=="string"&&Ui(o)}}getDefaultDataTypes(){let e=this.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:t=>{var o,i;return((i=(o=t.newValue)==null?void 0:o.trim)==null?void 0:i.call(o))===""?null:Number(t.newValue)},valueFormatter:t=>t.value==null?"":typeof t.value!="number"||isNaN(t.value)?e("invalidNumber","Invalid Number"):String(t.value),dataTypeMatcher:t=>typeof t=="number"},bigint:{baseDataType:"bigint",valueParser:t=>{let{newValue:o}=t;return o==null||typeof o=="string"&&o.trim()===""?null:Se(o)},valueFormatter:t=>t.value==null?"":typeof t.value!="bigint"?e("invalidBigInt","Invalid BigInt"):String(t.value),dataTypeMatcher:t=>typeof t=="bigint"},text:{baseDataType:"text",valueParser:t=>t.newValue===""?null:Sa(t.newValue),dataTypeMatcher:t=>typeof t=="string"},boolean:{baseDataType:"boolean",valueParser:t=>{var o,i;return t.newValue==null?t.newValue:((i=(o=t.newValue)==null?void 0:o.trim)==null?void 0:i.call(o))===""?null:String(t.newValue).toLowerCase()==="true"},valueFormatter:t=>t.value==null?"":String(t.value),dataTypeMatcher:t=>typeof t=="boolean"},date:this.getDateObjectTypeDef("date"),dateString:this.getDateStringTypeDef("dateString"),dateTime:this.getDateObjectTypeDef("dateTime"),dateTimeString:{...this.getDateStringTypeDef("dateTimeString"),dataTypeMatcher:t=>typeof t=="string"&&ww(t)},object:{baseDataType:"object",valueParser:()=>null,valueFormatter:t=>{var o;return(o=Sa(t.value))!=null?o:""}}}}destroyColumnStateUpdateListeners(){for(let e of this.columnStateUpdateListenerDestroyFuncs)e();this.columnStateUpdateListenerDestroyFuncs=[]}destroy(){this.dataTypeDefinitions={},this.dataTypeMatchers={},this.formatValueFuncs={},this.columnStateUpdatesPendingInference={},this.destroyColumnStateUpdateListeners(),super.destroy()}};function rl(e,t){let o={...e,...t};return e.columnTypes&&t.columnTypes&&t.appendColumnTypes&&(o.columnTypes=[...ar(e.columnTypes),...ar(t.columnTypes)]),o}function al(e,t,o){return t?t.baseDataType!==e.baseDataType?(k(46),!1):!0:(k(45,{parentCellDataType:o}),!1)}var Sw=e=>typeof e=="bigint"||typeof e=="number",xw=e=>e==="number"||e==="bigint";function nl(e,t){if(e.valueFormatter)return o=>{var s,l;let{node:i,colDef:r,column:a,value:n}=o;if(i!=null&&i.group){let c=((s=r.pivotValueColumn)!=null?s:a).getAggFunc();if(c){if(c==="first"||c==="last")return e.valueFormatter(o);let{baseDataType:d}=e;if(xw(d)&&c!=="count"){if(Sw(n))return e.valueFormatter(o);if(n==null)return;if(typeof n=="object"){if(typeof n.toNumber=="function")return e.valueFormatter({...o,value:n.toNumber()});if("value"in n)return e.valueFormatter({...o,value:n.value})}}return}}else if(t.get("groupHideOpenParents")&&o.column.isRowGroupActive()&&typeof o.value=="string"&&!((l=e.dataTypeMatcher)!=null&&l.call(e,o.value)))return;return e.valueFormatter(o)}}function kw(e,t,o,i){if(!t[o])return!1;let r=e[o];return r===null?(t[o]=!1,!1):i===void 0?!!r:r===i}function Rw(e,t){if(e==null)return t==null?0:-1;if(t==null)return 1;let o=Se(e),i=Se(t);return o!=null&&i!=null?o===i?0:o>i?1:-1:0}function Ew(e,t){if(e==null)return t==null?0:-1;if(t==null)return 1;let o=sl(e),i=sl(t);return o!=null&&i!=null?o===i?0:o>i?1:-1:0}function sl(e){let t=Se(e);return t==null?null:tkw(e,t,o,i))}function Fw(e,t){let o=Wd(e);for(let i of t)delete o[i],i==="rowGroup"?delete o.rowGroupIndex:i==="pivot"&&delete o.pivotIndex;return o}var Dw={moduleName:"DataType",version:D,beans:[yw],dependsOn:[UC]},Mw={moduleName:"ColumnFlex",version:D,beans:[fw]},_d={moduleName:"ColumnApi",version:D,beans:[pw],apiFunctions:{getColumnDef:KC,getDisplayNameForColumn:YC,getColumn:QC,getColumns:ZC,applyColumnState:JC,getColumnState:XC,resetColumnState:ew,isPinning:tw,isPinningLeft:ow,isPinningRight:iw,getDisplayedColAfter:rw,getDisplayedColBefore:aw,setColumnsVisible:nw,setColumnsPinned:sw,getAllGridColumns:lw,getDisplayedLeftColumns:cw,getDisplayedCenterColumns:dw,getDisplayedRightColumns:gw,getAllDisplayedColumns:uw,getAllDisplayedVirtualColumns:hw,getColumnDefs:$C}},Pw=class extends S{constructor(){super(...arguments),this.beanName="colNames"}getDisplayNameForColumn(e,t,o=!1){if(!e)return null;let i=this.getHeaderName(e.getColDef(),e,null,null,t),{aggColNameSvc:r}=this.beans;return o&&r?r.getHeaderName(e,i):i}getDisplayNameForProvidedColumnGroup(e,t,o){let i=t==null?void 0: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,r){var n,s;let a=e.headerValueGetter;if(a){let l=O(this.gos,{colDef:e,column:t,columnGroup:o,providedColumnGroup:i,location:r});return typeof a=="function"?a(l):typeof a=="string"?(s=(n=this.beans.expressionSvc)==null?void 0:n.evaluate(a,l))!=null?s:null:""}else{if(e.headerName!=null)return e.headerName;if(e.field)return Cu(e.field)}return""}},Iw=class extends S{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){let{visibleCols:i}=this,r=i.isBodyWidthDirty;if(!(e===this.scrollWidth&&t===this.scrollPosition&&!r)){if(this.scrollWidth=e,this.scrollPosition=t,i.isBodyWidthDirty=!0,this.gos.get("enableRtl")){let n=i.bodyWidth;this.viewportLeft=n-t-e,this.viewportRight=n-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];break}return o!=null?o:[]}extractViewportColumns(){let 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||this.viewportRight===0}clear(){this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},this.colsWithinViewportHash=""}isColumnInHeaderViewport(e){return e.isAutoHeaderHeight()||Tw(e)?!0:this.isColumnInRowViewport(e)}isColumnInRowViewport(e){if(e.isAutoHeight())return!0;let t=e.getLeft()||0,o=t+e.getActualWidth(),i=this.viewportLeft-200,r=this.viewportRight+200,a=tr&&o>r;return!a&&!n}getViewportColumns(){let{leftCols:e,rightCols:t}=this.visibleCols;return this.colsWithinViewport.concat(e).concat(t)}getColsWithinViewport(e){if(!this.colModel.colSpanActive)return this.colsWithinViewport;let t=a=>{let n=a.getLeft();return M(n)&&n>this.viewportLeft},o=this.isColumnVirtualisationSuppressed()?void 0:this.isColumnInRowViewport.bind(this),{visibleCols:i}=this,r=i.centerCols;return i.getColsForRow(e,r,o,t)}checkViewportColumns(e=!1){this.extractViewport()&&this.eventSvc.dispatchEvent({type:"virtualColumnsChanged",afterScroll:e})}calculateHeaderRows(){let{leftCols:e,rightCols:t}=this.visibleCols;this.columnsToRenderLeft=e,this.columnsToRenderRight=t,this.columnsToRenderCenter=this.colsWithinViewport;let o=i=>{var n;let r=new Set,a={};for(let s of i){let l=s.getParent(),c=s.isSpanHeaderHeight();for(;l&&!r.has(l);){if(c&&l.isPadding()){l=l.getParent();continue}let g=l.getProvidedColumnGroup().getLevel();(n=a[g])!=null||(a[g]=[]),a[g].push(l),r.add(l),l=l.getParent()}}return a};this.rowsOfHeadersToRenderLeft=o(e),this.rowsOfHeadersToRenderRight=o(t),this.rowsOfHeadersToRenderCenter=o(this.headerColsWithinViewport)}extractViewport(){let e=i=>`${i.getId()}-${i.getPinned()||"normal"}`;this.extractViewportColumns();let t=this.getViewportColumns().map(e).join("#"),o=this.colsWithinViewportHash!==t;return o&&(this.colsWithinViewportHash=t,this.calculateHeaderRows()),o}};function Tw(e){for(;e;){if(e.isAutoHeaderHeight())return!0;e=e.getParent()}return!1}var Aw=class extends S{constructor(){super(...arguments),this.beanName="agCompUtils"}adaptFunction(e,t){if(!e.cellRenderer)return null;class o{refresh(){return!1}getGui(){return this.eGui}init(r){let a=t(r),n=typeof a;if(n==="string"||n==="number"||n==="boolean"){this.eGui=hn(""+a+"");return}if(a==null){this.eGui=oe({tag:"span"});return}this.eGui=a}}return o}},zw={moduleName:"CellRendererFunction",version:D,beans:[Aw]},Lw=class extends ve{constructor(){super(...arguments),this.beanName="registry"}registerDynamicBeans(e){var t;if(e){(t=this.dynamicBeans)!=null||(this.dynamicBeans={});for(let o of Object.keys(e))this.dynamicBeans[o]=e[o]}}createDynamicBean(e,t,...o){if(!this.dynamicBeans)throw new Error(this.getDynamicError(e,!0));let i=this.dynamicBeans[e];if(i==null){if(t)throw new Error(this.getDynamicError(e,!1));return}return new i(...o)}};function Ow(e){return typeof e=="object"&&!!e.getComp}var Hw=class extends Lw{constructor(){super(...arguments),this.agGridDefaults={},this.agGridDefaultOverrides={},this.jsComps={},this.selectors={},this.icons={}}postConstruct(){let e=this.gos.get("components");if(e!=null)for(let t of Object.keys(e))this.jsComps[t]=e[t]}registerModule(e){let{icons:t,userComponents:o,dynamicBeans:i,selectors:r}=e;if(o){let a=(n,s,l,c)=>{this.agGridDefaults[n]=s,(l||c)&&(this.agGridDefaultOverrides[n]={params:l,processParams:c})};for(let n of Object.keys(o)){let s=o[n];if(Ow(s)&&(s=s.getComp(this.beans)),typeof s=="object"){let{classImp:l,params:c,processParams:d}=s;a(n,l,c,d)}else a(n,s)}}this.registerDynamicBeans(i);for(let a of r!=null?r:[])this.selectors[a.selector]=a;if(t)for(let a of Object.keys(t))this.icons[a]=t[a]}getUserComponent(e,t){var s;let o=(l,c,d,g)=>({componentFromFramework:c,component:l,params:d,processParams:g}),{frameworkOverrides:i}=this.beans,r=i.frameworkComponent(t,this.gos.get("components"));if(r!=null)return o(r,!0);let a=this.jsComps[t];if(a){let l=i.isFrameworkComponent(a);return o(a,l)}let n=this.agGridDefaults[t];if(n){let l=this.agGridDefaultOverrides[t];return o(n,!1,l==null?void 0:l.params,l==null?void 0:l.processParams)}return(s=this.beans.validation)==null||s.missingUserComponent(e,t,this.agGridDefaults,this.jsComps),null}getSelector(e){return this.selectors[e]}getIcon(e){return this.icons[e]}getDynamicError(e,t){var o,i;return t?Je(279,{name:e}):(i=(o=this.beans.validation)==null?void 0:o.missingDynamicBean(e))!=null?i:Je(256)}},Bw=23,Vw=class extends S{constructor(){super(...arguments),this.beanName="ctrlsSvc",this.params={},this.ready=!1,this.readyCallbacks=[]}postConstruct(){var e,t,o;this.addEventListener("ready",()=>{if(this.updateReady(),this.ready){for(let i of this.readyCallbacks)i(this.params);this.readyCallbacks.length=0}},(o=(t=(e=this.beans.frameworkOverrides).runWhenReadyAsync)==null?void 0:t.call(e))!=null?o:!1)}updateReady(){let e=Object.values(this.params);this.ready=e.length===Bw&&e.every(t=>{var o;return(o=t==null?void 0:t.isAlive())!=null?o:!1})}whenReady(e,t){this.ready?t(this.params):this.readyCallbacks.push(t),e.addDestroyFunc(()=>{let o=this.readyCallbacks.indexOf(t);o>=0&&this.readyCallbacks.splice(o,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(){let{leftHeader:e,centerHeader:t,rightHeader:o}=this.params;return[e,o,t]}getHeaderRowContainerCtrl(e){let t=this.params;switch(e){case"left":return t.leftHeader;case"right":return t.rightHeader;default:return t.centerHeader}}getScrollFeature(){return this.getGridBodyCtrl().scrollFeature}},Nw=':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);font-weight:var(--ag-font-weight);--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-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-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}',Xl,ec,Wn=typeof window!="object"||!((ec=(Xl=window==null?void 0:window.document)==null?void 0:Xl.fonts)!=null&&ec.forEach),hr=!1,eo=(e,t,o,i,r,a,n=!1)=>{if(Wn||hr)return;let s=e;i&&(s=`@layer ${CSS.escape(i).replaceAll("\\.",".")} { ${e} }`);let l=Qe.map.get(t);if(l||(l=[],Qe.map.set(t,l)),l.some(u=>u.injectedCss===s))return;let c=document.createElement("style");a&&c.setAttribute("nonce",a),c.dataset.agCss=o,c.dataset.agCssVersion=D,c.textContent=s;let d={rawCss:e,injectedCss:s,el:c,priority:r,isParams:n},g;for(let u of l){if(u.priority>r)break;g=u}if(g){g.el.after(c);let u=l.indexOf(g);l.splice(u+1,0,d)}else t.nodeName==="STYLE"?t.after(c):t.insertBefore(c,t.querySelector(":not(title, meta)")),l.push(d)},Ud=(e,t,o,i)=>{eo(Nw,e,"shared",t,0,o),i==null||i.forEach((r,a)=>r.forEach(n=>eo(n,e,a,t,0,o)))},Gw=(e,t,o,i,r,a)=>{if(Wn||hr)return;let n=Qe.grids.get(e);n?n.paramsCss=t:Qe.grids.set(e,{styleContainer:i,paramsCss:t}),Wa(i),t&&o&&eo(t,i,o,r,2,a,!0)},Ww=e=>{var i;let t=(i=Qe.grids.get(e))==null?void 0:i.styleContainer;if(!t)return;Qe.grids.delete(e),Array.from(Qe.grids.values()).some(r=>r.styleContainer===t)?Wa(t):(Wa(t,!0),Qe.map.delete(t))},Wa=(e,t=!1)=>{var r;let o=new Set;for(let a of Qe.grids.values())a.styleContainer===e&&o.add(a.paramsCss);let i=(r=Qe.map.get(e))!=null?r:[];for(let a=i.length-1;a>=0;a--)(t||i[a].isParams&&!o.has(i[a].rawCss))&&(i[a].el.remove(),i.splice(a,1))},jd=()=>{var o;let e=(o=globalThis.agStyleInjectionVersions)!=null?o:globalThis.agStyleInjectionVersions=new Map,t=e.get(D);return t||(t={map:new WeakMap,grids:new Map,paramsId:0},e.set(D,t)),t},Qe=jd(),Ne=e=>new Kd(e),wt="$default",qw=0,Kd=class{constructor({feature:e,params:t,modeParams:o={},css:i,cssImports:r}){var a;this.feature=e,this.css=i,this.cssImports=r,this.modeParams={[wt]:{...(a=o[wt])!=null?a:{},...t!=null?t:{}},...o}}use(e,t,o){var r,a;let i=this._inject;if(i==null){let{css:n}=this;if(n){let s=`ag-theme-${(r=this.feature)!=null?r:"part"}-${++qw}`;typeof n=="function"&&(n=n()),n=`:where(.${s}) { +${n} +} +`;for(let l of(a=this.cssImports)!=null?a:[])n=`@import url(${JSON.stringify(l)}); +${n}`;i={css:n,class:s}}else i=!1;this._inject=i}return i&&e&&eo(i.css,e,i.class,t,1,o),i?i.class:!1}},_w=e=>e.replace(/[A-Z]|\d+/g,t=>`-${t}`).toLowerCase(),qn=e=>`--ag-${_w(e)}`,tt=e=>`var(${qn(e)})`,Uw=(e,t,o)=>Math.max(t,Math.min(o,e)),jw=e=>{let t=new Map;return o=>{let i=o;return t.has(i)||t.set(i,e(o)),t.get(i)}},je=e=>({ref:"accentColor",mix:e}),Ee=e=>({ref:"foregroundColor",mix:e}),Pe=e=>({ref:"foregroundColor",mix:e,onto:"backgroundColor"}),Kw=e=>({ref:"foregroundColor",mix:e,onto:"headerBackgroundColor"}),ue={ref:"backgroundColor"},Wt={ref:"foregroundColor"},$e={ref:"accentColor"},pr={backgroundColor:"#fff",foregroundColor:"#181d1f",borderColor:Ee(.15),chromeBackgroundColor:Pe(.02),browserColorScheme:"light"},$w={...pr,textColor:Wt,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,fontWeight:"inherit",focusShadow:{spread:3,color:je(.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:ue,dragAndDropImageBorder:!0,dragAndDropImageNotAllowedBorder:{color:{ref:"invalidColor",onto:"dragAndDropImageBackgroundColor",mix:.5}},dragAndDropImageShadow:{ref:"popupShadow"},iconSize:16,iconColor:"inherit",toggleButtonWidth:28,toggleButtonHeight:18,toggleButtonOnBackgroundColor:$e,toggleButtonOffBackgroundColor:Pe(.3),toggleButtonSwitchBackgroundColor:ue,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:ue,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:Ee(.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:Ee(.2)},menuBackgroundColor:Pe(.03),menuTextColor:Pe(.95),menuShadow:{ref:"popupShadow"},menuSeparatorColor:{ref:"borderColor"}},Yw=["colorScheme","color","length","scale","borderStyle","border","shadow","image","fontFamily","fontWeight","duration"],Qw=jw(e=>{var t;return e=e.toLowerCase(),(t=Yw.find(o=>e.endsWith(o.toLowerCase())))!=null?t:"length"}),Dr=e=>typeof e=="object"&&(e!=null&&e.ref)?tt(e.ref):typeof e=="string"?e:typeof e=="number"?String(e):!1,_n=e=>{if(typeof e=="string")return e;if(typeof e=="object"&&e&&"ref"in e){let t=tt(e.ref);return e.mix==null?t:`color-mix(in srgb, ${e.onto?tt(e.onto):"transparent"}, ${t} ${Uw(e.mix*100,0,100)}%)`}return!1},Zw=Dr,po=e=>typeof e=="string"?e:typeof e=="number"?`${e}px`:typeof e=="object"&&e&&"calc"in e?`calc(${e.calc.replace(/ ?[*/+] ?/g," $& ").replace(/-?\b[a-z][a-z0-9]*\b(?![-(])/gi,o=>o[0]==="-"?o:" "+tt(o)+" ")})`:typeof e=="object"&&e&&"ref"in e?tt(e.ref):!1,Jw=Dr,qa=(e,t)=>{var o,i,r;return typeof e=="string"?e:e===!0?qa({},t):e===!1?t==="columnBorder"?qa({color:"transparent"},t):"none":typeof e=="object"&&e&&"ref"in e?tt(e.ref):$d((o=e.style)!=null?o:"solid")+" "+po((i=e.width)!=null?i:{ref:"borderWidth"})+" "+_n((r=e.color)!=null?r:{ref:"borderColor"})},ll=e=>{var t,o,i,r,a;return[po((t=e.offsetX)!=null?t:0),po((o=e.offsetY)!=null?o:0),po((i=e.radius)!=null?i:0),po((r=e.spread)!=null?r:0),_n((a=e.color)!=null?a:{ref:"foregroundColor"}),...e.inset?["inset"]:[]].join(" ")},Xw=e=>typeof e=="string"?e:e===!1?"none":typeof e=="object"&&e&&"ref"in e?tt(e.ref):Array.isArray(e)?e.map(ll).join(", "):ll(e),$d=Dr,Yd=e=>typeof e=="string"?e.includes(",")?e:cl(e):typeof e=="object"&&e&&"googleFont"in e?Yd(e.googleFont):typeof e=="object"&&e&&"ref"in e?tt(e.ref):Array.isArray(e)?e.map(t=>(typeof t=="object"&&"googleFont"in t&&(t=t.googleFont),cl(t))).join(", "):!1,cl=e=>/^[\w-]+$|\w\(/.test(e)?e:JSON.stringify(e),e0=Dr,Qd=e=>typeof e=="string"?e:typeof e=="object"&&e&&"url"in e?`url(${JSON.stringify(e.url)})`:typeof e=="object"&&e&&"svg"in e?Qd({url:`data:image/svg+xml,${encodeURIComponent(e.svg)}`}):typeof e=="object"&&e&&"ref"in e?tt(e.ref):!1,t0=(e,t,o)=>typeof e=="string"?e:typeof e=="number"?(e>=10&&(o==null||o.warn(104,{value:e,param:t})),`${e}s`):typeof e=="object"&&e&&"ref"in e?tt(e.ref):!1,o0={color:_n,colorScheme:Zw,length:po,scale:Jw,border:qa,borderStyle:$d,shadow:Xw,image:Qd,fontFamily:Yd,fontWeight:e0,duration:t0},i0=(e,t,o)=>{let i=Qw(e);return o0[i](t,e,o)};var r0=(e,t)=>new Zd({themeLogger:e,overridePrefix:t}),Zd=class Jd{constructor(t,o=[]){this.params=t,this.parts=o}withPart(t){return typeof t=="function"&&(t=t()),t instanceof Kd?new Jd(this.params,[...this.parts,t]):(this.params.themeLogger.preInitErr(259,"Invalid part",{part:t}),this)}withoutPart(t){return this.withPart(Ne({feature:t}))}withParams(t,o=wt){return this.withPart(Ne({modeParams:{[o]:t}}))}_startUse({styleContainer:t,cssLayer:o,nonce:i,loadThemeGoogleFonts:r,moduleCss:a}){if(Wn||hr)return;n0(),Ud(t,o,i,a);let n=a0(this);if(n.length>0)for(let s of n)r&&s0(s,i);for(let s of this.parts)s.use(t,o,i)}_getCssClass(){var t;return hr?"ag-theme-quartz":(t=this._cssClassCache)!=null?t:this._cssClassCache=dl(this.parts).map(o=>o.use(void 0,void 0,void 0)).filter(Boolean).concat(this._getParamsClassName()).join(" ")}_getParamsClassName(){var t;return(t=this._paramsClassName)!=null?t:this._paramsClassName=`ag-theme-params-${++jd().paramsId}`}_getModeParams(){var o;let t=this._paramsCache;if(!t){let i={[wt]:{...$w}};for(let r of dl(this.parts))for(let a of Object.keys(r.modeParams)){let n=r.modeParams[a];if(n){let s=(o=i[a])!=null?o:i[a]={},l=new Set;for(let c of Object.keys(n)){let d=n[c];d!==void 0&&(s[c]=d,l.add(c))}if(a===wt)for(let c of Object.keys(i)){let d=i[c];if(c!==wt)for(let g of l)delete d[g]}}}this._paramsCache=t=i}return t}_getParamsCss(){if(!this._paramsCssCache){let t="",o="",i=this._getModeParams(),{overridePrefix:r,themeLogger:a}=this.params,n=r?`--ag-${r}-`:void 0;for(let c of Object.keys(i)){let d=i[c];if(c!==wt){let u=`:where([data-ag-theme-mode="${typeof CSS=="object"?CSS.escape(c):c}"]) & { +`;t+=u,o+=u}for(let g of Object.keys(d).sort()){let u=d[g],h=i0(g,u,a);if(h===!1)a.error(107,{key:g,value:u});else{let p=qn(g),f=n?p.replace("--ag-",n):p,m=p.replace("--ag-","--ag-inherited-");t+=` ${p}: var(${m}, ${h}); +`,o+=` ${m}: var(${f}); +`}}c!==wt&&(t+=`} +`,o+=`} +`)}let s=`:where(.${this._getParamsClassName()})`,l=`${s} { +${t}} +`;l+=`:has(> ${s}):not(${s}) { +${o}} +`,this._paramsCssCache=l}return this._paramsCssCache}},dl=e=>{let t=new Map;for(let i of e)t.set(i.feature,i);let o=[];for(let i of e)(!i.feature||t.get(i.feature)===i)&&o.push(i);return o},a0=e=>{let t=new Set,o=a=>{if(Array.isArray(a))a.forEach(o);else{let n=a==null?void 0:a.googleFont;typeof n=="string"&&t.add(n)}};return Object.values(e._getModeParams()).flatMap(a=>Object.values(a)).forEach(o),Array.from(t).sort()},gl=!1,n0=()=>{if(!gl){gl=!0;for(let e of Array.from(document.head.querySelectorAll('style[data-ag-scope="legacy"]')))e.remove()}},s0=async(e,t)=>{let o=`@import url('https://${l0}/css2?family=${encodeURIComponent(e)}:wght@100;200;300;400;500;600;700;800;900&display=swap'); +`;eo(o,document.head,`googleFont:${e}`,void 0,0,t)},l0="fonts.googleapis.com",ul={changeKey:"listItemHeight",type:"length",defaultValue:24},c0=class extends ve{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(){var a;let{gos:e,eRootDiv:t}=this;e.setInstanceDomData(t);let o=e.get("themeStyleContainer"),i=typeof ShadowRoot!="undefined",r=i&&t.getRootNode()instanceof ShadowRoot;this.eStyleContainer=(a=typeof o=="function"?o():o)!=null?a:r?t:document.head,!o&&!r&&i&&d0(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(ul),this.initVariables(),this.addDestroyFunc(()=>Ww(this)),this.mutationObserver=new MutationObserver(()=>{this.fireStylesChangedEvent("theme")}),this.addDestroyFunc(()=>this.mutationObserver.disconnect())}applyThemeClasses(e,t=[]){let{theme:o}=this,i=o?o._getCssClass():this.applyLegacyThemeClasses();for(let r of Array.from(e.classList))r.startsWith("ag-theme-")&&e.classList.remove(r);if(i){let r=e.className;e.className=`${r}${r?" ":""}${i}${t!=null&&t.length?" "+t.join(" "):""}`}}applyLegacyThemeClasses(){let e="";this.mutationObserver.disconnect();let t=this.eRootDiv;for(;t;){let o=!1;for(let 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?eo(e,this.eStyleContainer,t,this.cssLayer,0,this.styleNonce):this.globalCSS.push([e,t])}getDefaultListItemHeight(){return this.getCSSVariablePixelValue(ul)}getCSSVariablePixelValue(e){let t=this.lastKnownValues.get(e);if(t!=null)return t;let o=this.measureSizeEl(e);return o==="detached"||o==="no-styles"?(e.cacheDefault&&this.lastKnownValues.set(e,e.defaultValue),e.defaultValue):(this.lastKnownValues.set(e,o),o)}measureSizeEl(e){let t=this.getSizeEl(e);if(t.offsetParent==null)return"detached";let o=t.offsetWidth;return o===pa?"no-styles":(this.sizesMeasured=!0,o)}getMeasurementContainer(){let e=this.eMeasurementContainer;return e||(e=this.eMeasurementContainer=Qt({tag:"div",cls:"ag-measurement-container"}),this.eRootDiv.appendChild(e)),e}getSizeEl(e){let t=this.sizeEls.get(e);if(t)return t;let o=this.getMeasurementContainer();t=Qt({tag:"div"});let i=this.setSizeElStyles(t,e);o.appendChild(t),this.sizeEls.set(e,t);let{type:r,noWarn:a}=e;if(r!=="length"&&r!=="border")return t;let n=this.measureSizeEl(e);n==="no-styles"&&!a&&this.varError(i,e.defaultValue);let s=Tt(this.beans,t,()=>{let l=this.measureSizeEl(e);l==="detached"||l==="no-styles"||(this.lastKnownValues.set(e,l),l!==n&&(n=l,this.fireStylesChangedEvent(e.changeKey)))});return this.addDestroyFunc(()=>s()),t}setSizeElStyles(e,t){let{changeKey:o,type:i}=t,r=qn(o);return i==="border"?(r.endsWith("-width")&&(r=r.slice(0,-6)),e.className="ag-measurement-element-border",e.style.setProperty("--ag-internal-measurement-border",`var(${r}, solid ${pa}px)`)):e.style.width=`var(${r}, ${pa}px)`,r}handleThemeChange(){let{gos:e,theme:t}=this,o=e.get("theme"),i;if(o==="legacy")i=void 0;else{let r=o!=null?o:this.getDefaultTheme();r instanceof Zd?i=r:this.themeError(r)}i!==t&&this.handleNewTheme(i),this.postProcessThemeChange(i,o)}handleNewTheme(e){var a,n;let{gos:t,eRootDiv:o,globalCSS:i}=this,r=this.getAdditionalCss();if(e){Ud(this.eStyleContainer,this.cssLayer,this.styleNonce,r);for(let[s,l]of i)eo(s,this.eStyleContainer,l,this.cssLayer,0,this.styleNonce);i.length=0}this.theme=e,e==null||e._startUse({loadThemeGoogleFonts:t.get("loadThemeGoogleFonts"),styleContainer:this.eStyleContainer,cssLayer:this.cssLayer,nonce:this.styleNonce,moduleCss:r}),Gw(this,(a=e==null?void 0:e._getParamsCss())!=null?a:null,(n=e==null?void 0:e._getParamsClassName())!=null?n:null,this.eStyleContainer,this.cssLayer,this.styleNonce),this.applyThemeClasses(o),this.fireStylesChangedEvent("theme")}fireStylesChangedEvent(e){this.eventSvc.dispatchEvent({type:"stylesChanged",[`${e}Changed`]:!0})}},pa=15538,d0=(e,t,o)=>{let i=60,r=setInterval(()=>{typeof ShadowRoot!="undefined"&&e.getRootNode()instanceof ShadowRoot&&(t(),clearInterval(r)),(e.isConnected||--i<0)&&clearInterval(r)},1e3);o(()=>clearInterval(r))},g0='.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-cell-font-size);font-weight:var(--ag-cell-font-weight);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-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:"";inherits:false;initial-value:transparent}@property --ag-internal-hover-color{syntax:"";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)}}',u0={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,sideBarPanelAnimationDuration:0,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:ue,sideButtonSelectedTextColor:{ref:"sideButtonTextColor"},sideButtonBorder:"solid 1px transparent",sideButtonSelectedBorder:!0,sideButtonLeftPadding:{ref:"spacing"},sideButtonRightPadding:{ref:"spacing"},sideButtonVerticalPadding:{calc:"spacing * 3"},cellFontFamily:{ref:"fontFamily"},cellFontSize:{ref:"dataFontSize"},cellFontWeight:{ref:"fontWeight"},headerCellHoverBackgroundColor:"transparent",headerCellMovingBackgroundColor:{ref:"headerCellHoverBackgroundColor"},headerCellBackgroundTransitionDuration:"0.2s",cellTextColor:{ref:"textColor"},rangeSelectionBorderStyle:"solid",rangeSelectionBorderColor:$e,rangeSelectionBackgroundColor:je(.2),rangeSelectionChartBackgroundColor:"#0058FF1A",rangeSelectionChartCategoryBackgroundColor:"#00FF841A",rangeSelectionHighlightColor:je(.5),rangeHeaderHighlightColor:Kw(.08),rowNumbersSelectedColor:je(.5),rowHoverColor:je(.08),columnHoverColor:je(.05),selectedRowBackgroundColor:je(.12),modalOverlayBackgroundColor:{ref:"backgroundColor",mix:.66},dataBackgroundColor:ue,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, cellFontSize) + spacing * 3.25 * rowVerticalPaddingScale"},rowVerticalPaddingScale:1,paginationPanelHeight:{ref:"rowHeight",calc:"max(rowHeight, 22px)"},dragHandleColor:Ee(.7),headerColumnResizeHandleHeight:"30%",headerColumnResizeHandleWidth:2,headerColumnResizeHandleColor:{ref:"borderColor"},iconButtonColor:{ref:"iconColor"},iconButtonBackgroundColor:"transparent",iconButtonBackgroundSpread:4,iconButtonBorderRadius:1,iconButtonHoverColor:{ref:"iconButtonColor"},iconButtonHoverBackgroundColor:Ee(.1),iconButtonActiveColor:$e,iconButtonActiveBackgroundColor:je(.28),iconButtonActiveIndicatorColor:$e,setFilterIndentSize:{ref:"iconSize"},chartMenuPanelWidth:260,chartMenuLabelColor:Ee(.8),cellEditingBorder:{color:$e},cellEditingShadow:{ref:"cardShadow"},fullRowEditInvalidBackgroundColor:{ref:"invalidColor",onto:"backgroundColor",mix:.25},columnSelectIndentSize:{ref:"iconSize"},toolPanelSeparatorBorder:!0,columnDropCellBackgroundColor:Ee(.07),columnDropCellTextColor:{ref:"textColor"},columnDropCellDragHandleColor:{ref:"textColor"},columnDropCellBorder:{color:Ee(.13)},selectCellBackgroundColor:Ee(.07),selectCellBorder:{color:Ee(.13)},advancedFilterBuilderButtonBarBorder:!0,advancedFilterBuilderIndentSize:{calc:"spacing * 2 + iconSize"},advancedFilterBuilderJoinPillColor:"#f08e8d",advancedFilterBuilderColumnPillColor:"#a6e194",advancedFilterBuilderOptionPillColor:"#f3c08b",advancedFilterBuilderValuePillColor:"#85c0e4",filterPanelApplyButtonColor:ue,filterPanelApplyButtonBackgroundColor:$e,columnPanelApplyButtonColor:ue,columnPanelApplyButtonBackgroundColor:$e,filterPanelCardSubtleColor:{ref:"textColor",mix:.7},filterPanelCardSubtleHoverColor:{ref:"textColor"},findMatchColor:Wt,findMatchBackgroundColor:"#ffff00",findActiveMatchColor:Wt,findActiveMatchBackgroundColor:"#ffa500",filterToolPanelGroupIndent:{ref:"spacing"},rowLoadingSkeletonEffectColor:Ee(.15),statusBarLabelColor:Wt,statusBarLabelFontWeight:500,statusBarValueColor:Wt,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},h0=".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)}",Xd={cellBatchEditBackgroundColor:"rgba(220 181 139 / 16%)",cellBatchEditTextColor:"#422f00",rowBatchEditBackgroundColor:{ref:"cellBatchEditBackgroundColor"},rowBatchEditTextColor:{ref:"cellBatchEditTextColor"}},p0={...Xd,cellBatchEditTextColor:"#f3d0b3"},f0=()=>Ne({feature:"batchEditStyle",params:Xd,css:h0}),m0=f0(),v0=":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)}",C0={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"}};var w0=()=>Ne({feature:"buttonStyle",params:{...C0,buttonBackgroundColor:ue,buttonBorder:!0,buttonHoverBackgroundColor:{ref:"rowHoverColor"},buttonActiveBorder:{color:$e}},css:v0}),b0=w0();var y0=".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}";var S0=()=>Ne({feature:"columnDropStyle",css:y0}),eg=S0();var x0={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"}}},k0=()=>Ne({feature:"formulaStyle",params:x0}),R0=k0(),E0={warn:(...e)=>{k(e[0],e[1])},error:(...e)=>{W(e[0],e[1])},preInitErr:(...e)=>{_o(e[0],e[2],e[1])}},F0=()=>r0(E0).withParams(u0).withPart(b0).withPart(eg).withPart(m0).withPart(R0),D0='.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)}}',M0=()=>Ne({feature:"checkboxStyle",params:{checkboxBorderWidth:1,checkboxBorderRadius:{ref:"borderRadius"},checkboxUncheckedBackgroundColor:ue,checkboxUncheckedBorderColor:Pe(.3),checkboxCheckedBackgroundColor:$e,checkboxCheckedBorderColor:{ref:"checkboxCheckedBackgroundColor"},checkboxCheckedShapeImage:{svg:''},checkboxCheckedShapeColor:ue,checkboxIndeterminateBackgroundColor:Pe(.3),checkboxIndeterminateBorderColor:{ref:"checkboxIndeterminateBackgroundColor"},checkboxIndeterminateShapeImage:{svg:''},checkboxIndeterminateShapeColor:ue,radioCheckedShapeImage:{svg:''}},css:D0}),P0=M0();var tg=()=>({...pr,...p0,backgroundColor:"hsl(217, 0%, 17%)",foregroundColor:"#FFF",chromeBackgroundColor:Pe(.05),rowHoverColor:je(.15),selectedRowBackgroundColor:je(.2),menuBackgroundColor:Pe(.1),browserColorScheme:"dark",popupShadow:"0 0px 20px #000A",cardShadow:"0 1px 4px 1px #000A",advancedFilterBuilderJoinPillColor:"#7a3a37",advancedFilterBuilderColumnPillColor:"#355f2d",advancedFilterBuilderOptionPillColor:"#5a3168",advancedFilterBuilderValuePillColor:"#374c86",filterPanelApplyButtonColor:Wt,columnPanelApplyButtonColor:Wt,findMatchColor:ue,findActiveMatchColor:ue,checkboxUncheckedBorderColor:Pe(.4),toggleButtonOffBackgroundColor:Pe(.4),rowBatchEditBackgroundColor:Pe(.1),formulaToken1Color:"#4da3e5",formulaToken2Color:"#f55864",formulaToken3Color:"#b688f2",formulaToken4Color:"#24bb4a",formulaToken5Color:"#e772ba",formulaToken6Color:"#f69b5f",formulaToken7Color:"#a3e6ff"});var I0=()=>({...tg(),backgroundColor:"#1f2836"});var T0=()=>Ne({feature:"colorScheme",params:pr,modeParams:{light:pr,dark:tg(),"dark-blue":I0()}}),A0=T0();var og={aggregation:'',arrows:'',asc:'',cancel:'',chart:'',"color-picker":'',columns:'',contracted:'',copy:'',cross:'',csv:'',cut:'',desc:'',down:'',excel:'',expanded:'',eye:'',"eye-slash":'',filter:'',first:'',grip:'',group:'',last:'',left:'',linked:'',loading:'',maximize:'',menu:'',"menu-alt":'',minimize:'',minus:'',next:'',none:'',"not-allowed":'',paste:'',pin:'',pivot:'',plus:'',previous:'',right:'',save:'',settings:'',"small-left":'',"small-right":'',tick:'',"tree-closed":'',"tree-indeterminate":'',"tree-open":'',unlinked:'',up:''},ig={aasc:'',adesc:'',"chevron-down":'',"chevron-left":'',"chevron-right":'',"chevron-up":'',"column-arrow":'',edit:'',"filter-add":'',"pinned-bottom":'',"pinned-top":'',"small-down":'',"small-up":'',"un-pin":''},z0=(e={})=>{let t="";for(let o of[...Object.keys(og),...Object.keys(ig)]){let i=L0(o,e.strokeWidth);t+=`.ag-icon-${o}::before { mask-image: url('data:image/svg+xml,${encodeURIComponent(i)}'); } +`}return t},L0=(e,t=1.5)=>{let o=ig[e];if(o)return o;let i=og[e];if(!i)throw new Error(`Missing icon data for ${e}`);return``+i+""},O0=(e={})=>Ne({feature:"iconSet",css:()=>z0(e)});var H0=O0();var B0=':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)}}',V0=".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)}}}";var N0={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};var G0=()=>Ne({feature:"inputStyle",params:{...N0,inputBackgroundColor:ue,inputBorder:!0,inputBorderRadius:{ref:"borderRadius"},inputPaddingStart:{ref:"spacing"},inputFocusBorder:{color:$e},inputFocusShadow:{ref:"focusShadow"},inputDisabledBackgroundColor:Pe(.06),inputDisabledTextColor:{ref:"textColor",mix:.5},inputInvalidBorder:{color:{ref:"invalidColor"}},pickerButtonBorder:!0,pickerListBorder:!0},css:()=>B0+V0}),W0=G0();var q0='.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}';var _0={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};var U0=()=>Ne({feature:"tabStyle",params:{..._0,tabBarBorder:!0,tabBarBackgroundColor:Ee(.05),tabTextColor:{ref:"textColor",mix:.7},tabSelectedTextColor:{ref:"textColor"},tabHoverTextColor:{ref:"textColor"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:ue},css:q0}),j0=U0();var K0=()=>({fontFamily:[{googleFont:"IBM Plex Sans"},"-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu"]}),$0=()=>F0().withPart(P0).withPart(A0).withPart(H0).withPart(j0).withPart(W0).withPart(eg).withParams(K0()),Y0=$0();var Lt=(e,t,o,i,r)=>({changeKey:e,type:t,defaultValue:o,noWarn:i,cacheDefault:r}),Q0=Lt("cellHorizontalPadding","length",16),Z0=Lt("indentationLevel","length",0,!0,!0),J0=Lt("rowGroupIndentSize","length",0),hl=Lt("rowHeight","length",42),pl=Lt("headerHeight","length",48),fa=Lt("rowBorderWidth","border",1),fl=Lt("pinnedRowBorderWidth","border",1),X0=Lt("headerRowBorderWidth","border",1);function eb(e,t){for(let o of t.sort((i,r)=>i.moduleName.localeCompare(r.moduleName))){let i=o.css;i&&e.set(`module-${o.moduleName}`,i)}}var tb=class extends c0{initVariables(){this.addManagedPropertyListener("rowHeight",()=>this.refreshRowHeightVariable()),this.getSizeEl(hl),this.getSizeEl(pl),this.getSizeEl(fa),this.getSizeEl(fl),this.refreshRowBorderWidthVariable()}getPinnedRowBorderWidth(){return this.getCSSVariablePixelValue(fl)}getRowBorderWidth(){return this.getCSSVariablePixelValue(fa)}getHeaderRowBorderWidth(){return this.getCSSVariablePixelValue(X0)}getDefaultRowHeight(){return this.getCSSVariablePixelValue(hl)}getDefaultHeaderHeight(){return this.getCSSVariablePixelValue(pl)}getDefaultCellHorizontalPadding(){return this.getCSSVariablePixelValue(Q0)}getCellPaddingLeft(){let e=this.getDefaultCellHorizontalPadding(),t=this.getCSSVariablePixelValue(Z0),o=this.getCSSVariablePixelValue(J0);return e-1+o*t}getCellPadding(){let e=this.getDefaultCellHorizontalPadding()-1;return this.getCellPaddingLeft()+e}getDefaultColumnMinWidth(){return Math.min(36,this.getDefaultRowHeight())}refreshRowHeightVariable(){let{eRootDiv:e}=this,t=e.style.getPropertyValue("--ag-line-height").trim(),o=this.gos.get("rowHeight");if(o==null||isNaN(o)||!isFinite(o))return t!==null&&e.style.setProperty("--ag-line-height",null),-1;let i=`${o}px`;return t!=i?(e.style.setProperty("--ag-line-height",i),o):t!=""?Number.parseFloat(t):-1}fireStylesChangedEvent(e){e==="rowBorderWidth"&&this.refreshRowBorderWidthVariable(),super.fireStylesChangedEvent(e)}refreshRowBorderWidthVariable(){let e=this.getCSSVariablePixelValue(fa);this.eRootDiv.style.setProperty("--ag-internal-row-border-width",`${e}px`)}postProcessThemeChange(e,t){e&&getComputedStyle(this.getMeasurementContainer()).getPropertyValue("--ag-legacy-styles-loaded")&&W(t?106:239)}getAdditionalCss(){let e=new Map;return e.set("core",[g0]),eb(e,Array.from(ph())),e}getDefaultTheme(){return Y0}varError(e,t){k(9,{variable:{cssName:e,defaultValue:t}})}themeError(e){W(240,{theme:e})}shadowRootError(){W(293)}},ob=class extends ve{constructor(){super(...arguments),this.beanName="eventSvc",this.eventServiceType="global",this.globalSvc=new Yt}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))}},ib=class extends ob{postConstruct(){let{globalListener:e,globalSyncListener:t}=this.beans;e&&this.addGlobalListener(e,!0),t&&this.addGlobalListener(t,!1)}};function _a(e,t,o){let i=e.visibleCols.headerGroupRowCount;if(o>=i)return{column:t,headerRowIndex:o};let r=t.getParent();for(;r&&r.getProvidedColumnGroup().getLevel()>o;)r=r.getParent();let a=t.isSpanHeaderHeight();return!r||a&&r.isPadding()?{column:t,headerRowIndex:i}:{column:r,headerRowIndex:r.getProvidedColumnGroup().getLevel()}}var rb=class extends S{constructor(){super(...arguments),this.beanName="headerNavigation",this.currentHeaderRowWithoutSpan=-1}postConstruct(){let e=this.beans;e.ctrlsSvc.whenReady(this,o=>{this.gridBodyCon=o.gridBodyCtrl});let t=te(e);this.addManagedElementListeners(t,{mousedown:()=>{this.currentHeaderRowWithoutSpan=-1}})}getHeaderPositionForColumn(e,t){var h;let o,{colModel:i,colGroupSvc:r,ctrlsSvc:a}=this.beans;if(typeof e=="string"?(o=i.getCol(e),o||(o=(h=r==null?void 0:r.getColumnGroup(e))!=null?h:null)):o=e,!o)return null;let n=a.getHeaderRowContainerCtrl(),s=n==null?void 0:n.getAllCtrls(),l=U(s||[]).type==="filter",c=Fe(this.beans)-1,d=-1,g=o;for(;g;)d++,g=g.getParent();let u=d;return t&&l&&u===c-1&&u++,u===-1?null:{headerRowIndex:u,column:o}}navigateVertically(e,t){let{focusSvc:o,visibleCols:i}=this.beans,{focusedHeader:r}=o;if(!r)return!1;let{headerRowIndex:a}=r,n=r.column,s=Fe(this.beans),l=this.getHeaderRowType(a),c=i.headerGroupRowCount,{headerRowIndex:d,column:g,headerRowIndexWithoutSpan:u}=e==="UP"?ab(l,n,a):nb(n,a,c),h=!1;return d<0&&(d=0,g=n,h=!0),d>=s?(d=-1,this.currentHeaderRowWithoutSpan=-1):u!==void 0&&(this.currentHeaderRowWithoutSpan=u),!h&&!g?!1:o.focusHeaderPosition({headerPosition:{headerRowIndex:d,column:g},allowUserOverride:!0,event:t})}navigateHorizontally(e,t=!1,o){let{focusSvc:i,gos:r}=this.beans,a={...i.focusedHeader},n,s;this.currentHeaderRowWithoutSpan!==-1?a.headerRowIndex=this.currentHeaderRowWithoutSpan:this.currentHeaderRowWithoutSpan=a.headerRowIndex,e==="LEFT"!==r.get("enableRtl")?(s="Before",n=this.findHeader(a,s)):(s="After",n=this.findHeader(a,s));let l=r.getCallback("tabToNextHeader");if(t&&l){let c=i.focusHeaderPositionFromUserFunc({userFunc:l,headerPosition:n,direction:s});if(c){let{headerRowIndex:d}=i.focusedHeader||{};d!=null&&d!=a.headerRowIndex&&(this.currentHeaderRowWithoutSpan=d)}return c}return n||!t?i.focusHeaderPosition({headerPosition:n,direction:s,fromTab:t,allowUserOverride:!0,event:o}):this.focusNextHeaderRow(a,s,o)}focusNextHeaderRow(e,t,o){let i=this.beans,r=e.headerRowIndex,a=null,n,s=Fe(i),l=this.beans.visibleCols.allCols;if(t==="Before"){if(r<=0)return!1;a=U(l),n=r-1,this.currentHeaderRowWithoutSpan-=1}else a=l[0],n=r+1,this.currentHeaderRowWithoutSpan=s&&(d=-1),i.focusSvc.focusHeaderPosition({headerPosition:{column:c,headerRowIndex:d},direction:t,fromTab:!0,allowUserOverride:!0,event:o})}scrollToColumn(e,t="After"){if(e.getPinned())return;let o;if(X(e)){let i=e.getDisplayedLeafColumns();o=t==="Before"?U(i):i[0]}else o=e;this.gridBodyCon.scrollFeature.ensureColumnVisible(o)}findHeader(e,t){let{colGroupSvc:o,visibleCols:i}=this.beans,r=e.column;if(r instanceof ui){let l=r.getDisplayedLeafColumns();r=t==="Before"?l[0]:l[l.length-1]}let a=t==="Before"?i.getColBefore(r):i.getColAfter(r);if(!a)return;let n=i.headerGroupRowCount;if(e.headerRowIndex>=n)return{headerRowIndex:e.headerRowIndex,column:a};let s=o==null?void 0:o.getColGroupAtLevel(a,e.headerRowIndex);return s?s.isPadding()&&a.isSpanHeaderHeight()?{headerRowIndex:i.headerGroupRowCount,column:a}:{headerRowIndex:e.headerRowIndex,column:s!=null?s:a}:{headerRowIndex:a instanceof ao&&a.isSpanHeaderHeight()?i.headerGroupRowCount:e.headerRowIndex,column:a}}getHeaderRowType(e){let t=this.beans.ctrlsSvc.getHeaderRowContainerCtrl();if(t)return t.getRowType(e)}};function ab(e,t,o){let i=o-1;if(e!=="filter"){let r=t instanceof ao&&t.isSpanHeaderHeight(),a=t.getParent();for(;a&&(a.getProvidedColumnGroup().getLevel()>i||r&&a.isPadding());)a=a.getParent();if(a)return r?{column:a,headerRowIndex:a.getProvidedColumnGroup().getLevel(),headerRowIndexWithoutSpan:i}:{column:a,headerRowIndex:i,headerRowIndexWithoutSpan:i}}return{column:t,headerRowIndex:i,headerRowIndexWithoutSpan:i}}function nb(e,t,o){let i=t+1,r={column:e,headerRowIndex:i,headerRowIndexWithoutSpan:i};if(e instanceof ui){if(i>=o)return{column:e.getDisplayedLeafColumns()[0],headerRowIndex:o,headerRowIndexWithoutSpan:i};let n=e.getDisplayedChildren()[0];if(n instanceof ui&&n.isPadding()){let l=n.getDisplayedLeafColumns()[0];l.isSpanHeaderHeight()&&(n=l)}r.column=n,n instanceof ao&&n.isSpanHeaderHeight()&&(r.headerRowIndex=o,r.headerRowIndexWithoutSpan=i)}return r}var sb=class extends S{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(){let e=this.clearFocusedCell.bind(this);this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:this.onColumnEverythingChanged.bind(this),columnGroupOpened:e,columnRowGroupChanged:e}),this.addDestroyFunc(Jp(this.beans))}attemptToRecoverFocus(){this.needsFocusRestored=!0,this.focusFallbackTimeout!=null&&clearTimeout(this.focusFallbackTimeout),this.focusFallbackTimeout=window.setTimeout(this.setFocusRecovered.bind(this),100)}setFocusRecovered(){this.needsFocusRestored=!1,this.focusFallbackTimeout!=null&&(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;let e=this.focusedCell.column,t=this.colModel.getCol(e.getId());e!==t&&this.clearFocusedCell()}getFocusCellToUseAfterRefresh(){let{gos:e,focusedCell:t}=this;return e.get("suppressFocusAfterRefresh")||e.get("suppressCellFocus")||!t||!this.doesRowOrCellHaveBrowserFocus()?null:t}getFocusHeaderToUseAfterRefresh(){return this.gos.get("suppressFocusAfterRefresh")||!this.focusedHeader||!this.isDomDataPresentInHierarchy(Y(this.beans),pd)?null:this.focusedHeader}doesRowOrCellHaveBrowserFocus(){let e=Y(this.beans);return this.isDomDataPresentInHierarchy(e,cr,!0)?!0:this.isDomDataPresentInHierarchy(e,dr,!0)}isDomDataPresentInHierarchy(e,t,o){let i=e;for(;i;){let r=Mc(this.gos,i,t);if(r)return r.destroyed&&o?(this.attemptToRecoverFocus(),!1):!0;i=i.parentNode}return!1}getFocusedCell(){return this.focusedCell}getFocusEventParams(e){let{rowIndex:t,rowPinned:o,column:i}=e,r={rowIndex:t,rowPinned:o,column:i,isFullWidthCell:!1},a=this.rowRenderer.getRowByPosition({rowIndex:t,rowPinned:o});return a&&(r.isFullWidthCell=a.isFullWidth()),r}clearFocusedCell(){if(this.focusedCell==null)return;let e=this.getFocusEventParams(this.focusedCell);this.focusedCell=null,this.eventSvc.dispatchEvent({type:"cellFocusCleared",...e})}setFocusedCell(e){this.setFocusRecovered();let{column:t,rowIndex:o,rowPinned:i,forceBrowserFocus:r=!1,preventScrollOnBrowserFocus:a=!1,sourceEvent:n}=e,s=this.colModel.getCol(t);if(!s){this.focusedCell=null;return}this.focusedCell={rowIndex:o,rowPinned:st(i),column:s};let l=this.getFocusEventParams(this.focusedCell);this.eventSvc.dispatchEvent({type:"cellFocused",...l,...this.previousCellFocusParams&&{previousParams:this.previousCellFocusParams},forceBrowserFocus:r,preventScrollOnBrowserFocus:a,sourceEvent:n}),this.previousCellFocusParams=l}isCellFocused(e){return this.focusedCell==null?!1:Pn(e,this.focusedCell)}isHeaderWrapperFocused(e){if(this.focusedHeader==null)return!1;let{column:t,rowCtrl:{rowIndex:o,pinned:i}}=e,{column:r,headerRowIndex:a}=this.focusedHeader;return t===r&&o===a&&i==r.getPinned()}focusHeaderPosition(e){var c;if(this.setFocusRecovered(),Le(this.beans))return!1;let{direction:t,fromTab:o,allowUserOverride:i,event:r,fromCell:a,rowWithoutSpanValue:n,scroll:s=!0}=e,{headerPosition:l}=e;if(a&&((c=this.filterManager)!=null&&c.isAdvFilterHeaderActive()))return this.focusAdvancedFilter(l);if(i){let d=this.focusedHeader,g=Fe(this.beans);if(o){let u=this.gos.getCallback("tabToNextHeader");u&&(l=this.getHeaderPositionFromUserFunc({userFunc:u,direction:t,currentPosition:d,headerPosition:l,headerRowCount:g}))}else{let u=this.gos.getCallback("navigateToNextHeader");if(u&&r){let h={key:r.key,previousHeaderPosition:d,nextHeaderPosition:l,headerRowCount:g,event:r},p=u(h);l=p===null?d:p}}}return l?this.focusProvidedHeaderPosition({headerPosition:l,direction:t,event:r,fromCell:a,rowWithoutSpanValue:n,scroll:s}):!1}focusHeaderPositionFromUserFunc(e){if(Le(this.beans))return!1;let{userFunc:t,headerPosition:o,direction:i,event:r}=e,a=this.focusedHeader,n=Fe(this.beans),s=this.getHeaderPositionFromUserFunc({userFunc:t,direction:i,currentPosition:a,headerPosition:o,headerRowCount:n});return!!s&&this.focusProvidedHeaderPosition({headerPosition:s,direction:i,event:r})}getHeaderPositionFromUserFunc(e){let{userFunc:t,direction:o,currentPosition:i,headerPosition:r,headerRowCount:a}=e,s=t({backwards:o==="Before",previousHeaderPosition:i,nextHeaderPosition:r,headerRowCount:a});return s===!0?i:s===!1?null:s}focusProvidedHeaderPosition(e){let{headerPosition:t,direction:o,fromCell:i,rowWithoutSpanValue:r,event:a,scroll:n=!0}=e,{column:s,headerRowIndex:l}=t,{filterManager:c,ctrlsSvc:d,headerNavigation:g}=this.beans;if(this.focusedHeader&&Bf(e.headerPosition,this.focusedHeader))return!1;if(l===-1)return c!=null&&c.isAdvFilterHeaderActive()?this.focusAdvancedFilter(t):this.focusGridView({column:s,event:a});n&&(g==null||g.scrollToColumn(s,o));let u=d.getHeaderRowContainerCtrl(s.getPinned()),h=(u==null?void 0:u.focusHeader(t.headerRowIndex,s,a))||!1;return g&&h&&(r!=null||i)&&(g.currentHeaderRowWithoutSpan=r!=null?r:-1),h}focusFirstHeader(){var o;if((o=this.overlays)!=null&&o.exclusive&&this.focusOverlay())return!0;let e=this.visibleCols.allCols[0];if(!e)return!1;let t=_a(this.beans,e,0);return this.focusHeaderPosition({headerPosition:t,rowWithoutSpanValue:0})}focusLastHeader(e){var i;if((i=this.overlays)!=null&&i.exclusive&&this.focusOverlay(!0))return!0;let t=Fe(this.beans)-1,o=U(this.visibleCols.allCols);return this.focusHeaderPosition({headerPosition:{headerRowIndex:t,column:o},rowWithoutSpanValue:-1,event:e})}focusPreviousFromFirstCell(e){var t;return(t=this.filterManager)!=null&&t.isAdvFilterHeaderActive()?this.focusAdvancedFilter(null):this.focusLastHeader(e)}isAnyCellFocused(){return!!this.focusedCell}isRowFocused(e,t){return this.focusedCell==null?!1:this.focusedCell.rowIndex===e&&this.focusedCell.rowPinned===st(t)}focusOverlay(e){var o,i;let t=((o=this.overlays)==null?void 0:o.isVisible())&&((i=this.overlays.eWrapper)==null?void 0:i.getGui());return!!t&&Jt(t,e)}getDefaultTabToNextGridContainerTarget(e){let{backwards:t,focusableContainers:o}=e,i=t?-1:1,r,a=()=>(r===void 0&&(r=this.getGridBodyTabTarget(t)),r);for(let n=e.nextIndex;n>=0&&n{e.executeLaterVMTurn(()=>this.updateScrollVisibleImpl())}):this.updateScrollVisibleImpl()}updateScrollVisibleImpl(){var o;let e=this.ctrlsSvc.get("center");if(!e||(o=this.colAnimation)!=null&&o.isActive())return;let t={horizontalScrollShowing:e.isHorizontalScrollShowing(),verticalScrollShowing:this.verticalScrollShowing};this.setScrollsVisible(t),this.updateScrollGap()}updateScrollGap(){let 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(this.scrollbarWidth==null){let e=this.gos.get("scrollbarWidth"),o=typeof e=="number"&&e>=0?e:Rn();o!=null&&(this.scrollbarWidth=o,this.eventSvc.dispatchEvent({type:"scrollbarWidthChanged"}))}return this.scrollbarWidth}},cb=class extends S{constructor(){super(...arguments),this.beanName="gridDestroySvc",this.destroyCalled=!1}destroy(){var i,r;if(this.destroyCalled)return;let{stateSvc:e,ctrlsSvc:t,context:o}=this.beans;this.eventSvc.dispatchEvent({type:"gridPreDestroyed",state:(i=e==null?void 0:e.getState())!=null?i:{}}),this.destroyCalled=!0,(r=t.get("gridCtrl"))==null||r.destroyGridUi(),o.destroy(),super.destroy()}},db=["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"];var ji=new Set(["gridPreDestroyed","fillStart","pasteStart"]),Un=db.reduce((e,t)=>(e[t]=Hh(t),e),{}),Ro={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 ml(e){return`"${e}"`}var gb=()=>({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."}}),ub={allowFormula:"Formula",aggFunc:"SharedAggregation",autoHeight:"RowAutoHeight",cellClass:"CellStyle",cellClassRules:"CellStyle",cellEditor:({cellEditor:e,editable:t,groupRowEditable:o})=>{var r;return!!t||!!o?typeof e=="string"&&(r=Ro[e])!=null?r:"CustomEditor":null},cellRenderer:({cellRenderer:e})=>typeof e!="string"?null:Ro[e],cellStyle:"CellStyle",columnChooserParams:"ColumnMenu",contextMenuItems:"ContextMenu",dndSource:"DragAndDrop",dndSourceOnRowDrag:"DragAndDrop",editable:({editable:e,cellEditor:t})=>e&&!t?"TextEditor":null,groupRowEditable:({groupRowEditable:e,cellEditor:t})=>e?t?"RowGroupingEdit":["RowGroupingEdit","TextEditor"]:null,groupRowValueSetter:({groupRowValueSetter:e})=>e?"RowGroupingEdit":null,enableCellChangeFlash:"HighlightChanges",enablePivot:"SharedPivot",enableRowGroup:"SharedRowGrouping",enableValue:"SharedAggregation",filter:({filter:e})=>{var t;return e&&typeof e!="string"&&typeof e!="boolean"?"CustomFilter":typeof e=="string"&&(t=Ro[e])!=null?t:"ColumnFilter"},floatingFilter:"ColumnFilter",getQuickFilterText:"QuickFilter",headerTooltip:"Tooltip",headerTooltipValueGetter:"Tooltip",mainMenuItems:"ColumnMenu",menuTabs:e=>{var o;let t=["columnsMenuTab","generalMenuTab"];return(o=e.menuTabs)!=null&&o.some(i=>t.includes(i))?"ColumnMenu":null},pivot:"SharedPivot",pivotIndex:"SharedPivot",rowDrag:"RowDrag",rowGroup:"SharedRowGrouping",rowGroupIndex:"SharedRowGrouping",tooltipField:"Tooltip",tooltipValueGetter:"Tooltip",tooltipComponentSelector:"Tooltip",spanRows:"CellSpan",groupHierarchy:"SharedRowGrouping"},hb=()=>({autoHeight:{supportedRowModels:["clientSide","serverSide"],validate:(t,{paginationAutoPageSize:o})=>o?"colDef.autoHeight is not supported with paginationAutoPageSize.":null},allowFormula:{supportedRowModels:["clientSide"]},cellRendererParams:{validate:t=>(t.rowGroup!=null||t.rowGroupIndex!=null||t.cellRenderer==="agGroupCellRenderer")&&"checkbox"in t.cellRendererParams?'Since v33.0, `cellRendererParams.checkbox` has been deprecated. Use `rowSelection.checkboxLocation = "autoGroupColumn"` instead.':null},flex:{validate:(t,o)=>o.autoSizeStrategy?"colDef.flex is not supported with gridOptions.autoSizeStrategy":null},headerCheckboxSelection:{supportedRowModels:["clientSide","serverSide"],validate:(t,{rowSelection:o})=>o==="multiple"?null:"headerCheckboxSelection is only supported with rowSelection=multiple"},headerCheckboxSelectionCurrentPageOnly:{supportedRowModels:["clientSide"],validate:(t,{rowSelection:o})=>o==="multiple"?null:"headerCheckboxSelectionCurrentPageOnly is only supported with rowSelection=multiple"},headerCheckboxSelectionFilteredOnly:{supportedRowModels:["clientSide"],validate:(t,{rowSelection:o})=>o==="multiple"?null:"headerCheckboxSelectionFilteredOnly is only supported with rowSelection=multiple"},headerValueGetter:{validate:t=>{let o=t.headerValueGetter;return typeof o=="function"||typeof o=="string"?null:"headerValueGetter must be a function or a valid string expression"}},icons:{validate:({icons:t})=>{if(t){if(t.smallDown)return Je(262);if(t.smallLeft)return Je(263);if(t.smallRight)return Je(264)}return null}},sort:{validate:t=>xo(t.sort)||xt(t.sort)?null:`sort must be of type (SortDirection | SortDef), currently it is ${typeof t.sort=="object"?JSON.stringify(t.sort):Vi(t.sort)}`},initialSort:{validate:t=>xo(t.initialSort)||xt(t.initialSort)?null:`initialSort must be of non-null type (SortDirection | SortDef), currently it is ${typeof t.initialSort=="object"?JSON.stringify(t.initialSort):Vi(t.initialSort)}`},sortingOrder:{validate:t=>{let o=t.sortingOrder;if(Array.isArray(o)&&o.length>0){let i=o.filter(r=>!(xo(r)||xt(r)));if(i.length>0)return`sortingOrder must be an array of type non-null (SortDirection | SortDef)[], incorrect items are: [${i.map(r=>typeof r=="string"||r==null?Vi(r):JSON.stringify(r)).join(", ")}]`}else if(!Array.isArray(o)||!o.length)return`sortingOrder must be an array with at least one element, currently it is [${o}]`;return null}},type:{validate:t=>{let o=t.type;return o instanceof Array?o.some(r=>typeof r!="string")?"if colDef.type is supplied an array it should be of type 'string[]'":null:typeof o=="string"?null:"colDef.type should be of type 'string' | 'string[]'"}},rowSpan:{validate:(t,{suppressRowTransform:o})=>o?null:"colDef.rowSpan requires suppressRowTransform to be enabled."},spanRows:{dependencies:{editable:{required:[!1,void 0]},groupRowEditable:{required:[!1,void 0]},rowDrag:{required:[!1,void 0]},colSpan:{required:[void 0]},rowSpan:{required:[void 0]}},validate:(t,{rowSelection:o,cellSelection:i,suppressRowTransform:r,enableCellSpan:a,rowDragEntireRow:n,enableCellTextSelection:s})=>typeof o=="object"&&(o==null?void 0:o.mode)==="singleRow"&&o!=null&&o.enableClickSelection?"colDef.spanRows is not supported with rowSelection.clickSelection":i?"colDef.spanRows is not supported with cellSelection.":r?"colDef.spanRows is not supported with suppressRowTransform.":a?n?"colDef.spanRows is not supported with rowDragEntireRow.":s?"colDef.spanRows is not supported with enableCellTextSelection.":null:"colDef.spanRows requires enableCellSpan to be enabled."},groupHierarchy:{validate(t,{groupHierarchyConfig:o={}},i){var n,s;let r=new Set(["year","quarter","month","formattedMonth","day","hour","minute","second"]),a=[];for(let l of(n=t.groupHierarchy)!=null?n:[]){if(typeof l=="object"){(s=i.validation)==null||s.validateColDef(l);continue}!r.has(l)&&!(l in o)&&a.push(ml(l))}if(a.length>0){let l=`The following parts of colDef.groupHierarchy are not recognised: ${a.join(", ")}.`,c=`Choose one of ${[...r].map(ml).join(", ")}, or define your own parts in gridOptions.groupHierarchyConfig.`;return`${l} +${c}`}return null}}}),pb={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},fb=()=>Object.keys(pb),mb=()=>({objectName:"colDef",allProperties:fb(),docsUrl:"column-properties/",deprecations:gb(),validations:hb()}),vb=["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"],Cb=["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"],wb=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector","suppressOverlays"],rg=["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"],bb=["theme","rowSelection"],yb=["cellSelection","sideBar","rowNumbers","suppressGroupChangesColumnVisibility","groupAggFiltering","suppressStickyTotalRow","groupHideParentOfSingleChild","enableRowPinning"],ag=["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","groupHideColumnsUntilExpanded","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"],Sb=["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","tabToNextGridContainer","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"],xb=()=>[...wb,...Cb,...vb,...rg,...Sb,...ag,...yb,...bb];var kb=()=>({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."}});function _e(e,t,o){return typeof t=="number"||t==null?t==null||t>=o?null:`${e}: value should be greater than or equal to ${o}`:`${e}: value should be a number`}var Rb={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"},Eb=()=>{let e={autoSizePadding:{validate({autoSizePadding:o}){return _e("autoSizePadding",o,0)}},cacheBlockSize:{supportedRowModels:["serverSide","infinite"],validate({cacheBlockSize:o}){return _e("cacheBlockSize",o,1)}},cacheOverflowSize:{validate({cacheOverflowSize:o}){return _e("cacheOverflowSize",o,1)}},datasource:{supportedRowModels:["infinite"]},domLayout:{validate:o=>{let i=o.domLayout,r=["autoHeight","normal","print"];return i&&!r.includes(i)?`domLayout must be one of [${r.join()}], currently it's ${i}`:null}},enableFillHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableRangeHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableCellSpan:{supportedRowModels:["clientSide","serverSide"]},enableRangeSelection:{dependencies:{rowDragEntireRow:{required:[!1,void 0]}}},enableRowPinning:{supportedRowModels:["clientSide"],validate({enableRowPinning:o,pinnedTopRowData:i,pinnedBottomRowData:r}){return o&&(i||r)?"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:o,isRowPinnable:i,pinnedTopRowData:r,pinnedBottomRowData:a}){return i&&(r||a)?"Manual row pinning cannot be used together with pinned row data. Either remove `isRowPinnable`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":!o&&i?"`isRowPinnable` requires `enableRowPinning` to be set.":null}},isRowPinned:{supportedRowModels:["clientSide"],validate({enableRowPinning:o,isRowPinned:i,pinnedTopRowData:r,pinnedBottomRowData:a}){return i&&(r||a)?"Manual row pinning cannot be used together with pinned row data. Either remove `isRowPinned`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":!o&&i?"`isRowPinned` requires `enableRowPinning` to be set.":null}},groupDefaultExpanded:{supportedRowModels:["clientSide"]},groupHideColumnsUntilExpanded:{supportedRowModels:["clientSide"],validate({groupHideColumnsUntilExpanded:o,groupHideOpenParents:i,groupDisplayType:r}){return o&&!i&&r!=="multipleColumns"?"`groupHideColumnsUntilExpanded = true` requires either `groupDisplayType = 'multipleColumns'` or `groupHideOpenParents = true`":null}},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:o={}},i,r){var a;for(let n of Object.keys(o))(a=r.validation)==null||a.validateColDef(o[n]);return null}},icons:{validate:({icons:o})=>{if(o){if(o.smallDown)return Je(262);if(o.smallLeft)return Je(263);if(o.smallRight)return Je(264)}return null}},infiniteInitialRowCount:{validate({infiniteInitialRowCount:o}){return _e("infiniteInitialRowCount",o,1)}},initialGroupOrderComparator:{supportedRowModels:["clientSide"]},ssrmExpandAllAffectsAllRows:{validate:o=>{if(typeof o.ssrmExpandAllAffectsAllRows=="boolean"){if(o.rowModelType!=="serverSide")return"'ssrmExpandAllAffectsAllRows' is only supported with the Server Side Row Model.";if(o.ssrmExpandAllAffectsAllRows&&typeof o.getRowId!="function")return"'getRowId' callback must be provided for Server Side Row Model grouping to work correctly."}return null}},keepDetailRowsCount:{validate({keepDetailRowsCount:o}){return _e("keepDetailRowsCount",o,1)}},paginationPageSize:{validate({paginationPageSize:o}){return _e("paginationPageSize",o,1)}},paginationPageSizeSelector:{validate:o=>{let i=o.paginationPageSizeSelector;return typeof i=="boolean"||i==null||i.length?null:`'paginationPageSizeSelector' cannot be an empty array. + 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:o}){return _e("rowBuffer",o,0)}},rowClass:{validate:o=>typeof o.rowClass=="function"?"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:o}){return o&&typeof o=="string"?'As of version 32.2.1, using `rowSelection` with the values "single" or "multiple" has been deprecated. Use the object value instead.':o&&typeof o!="object"?"Expected `RowSelectionOptions` object for the `rowSelection` property.":o&&o.mode!=="multiRow"&&o.mode!=="singleRow"?`Selection mode "${o.mode}" is invalid. Use one of 'singleRow' or 'multiRow'.`:null}},rowStyle:{validate:o=>{let i=o.rowStyle;return i&&typeof i=="function"?"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:o}){return _e("serverSideInitialRowCount",o,1)}},serverSideOnlyRefreshFilteredGroups:{supportedRowModels:["serverSide"]},serverSideSortAllLevels:{supportedRowModels:["serverSide"]},sortingOrder:{validate:o=>{let i=o.sortingOrder;if(Array.isArray(i)&&i.length>0){let r=i.filter(a=>!Me(a));if(r.length>0)return`sortingOrder must be an array of type (SortDirection | SortDef)[], incorrect items are: ${r.map(a=>typeof a=="string"||a==null?Vi(a):JSON.stringify(a))}]`}else if(!Array.isArray(i)||!i.length)return`sortingOrder must be an array with at least one element, currently it's ${i}`;return null}},tooltipHideDelay:{validate:o=>o.tooltipHideDelay&&o.tooltipHideDelay<0?"tooltipHideDelay should not be lower than 0":null},tooltipShowDelay:{validate:o=>o.tooltipShowDelay&&o.tooltipShowDelay<0?"tooltipShowDelay should not be lower than 0":null},tooltipSwitchShowDelay:{validate:o=>o.tooltipSwitchShowDelay&&o.tooltipSwitchShowDelay<0?"tooltipSwitchShowDelay should not be lower than 0":null},treeData:{supportedRowModels:["clientSide","serverSide"],validate:o=>{var r;let i=(r=o.rowModelType)!=null?r:"clientSide";switch(i){case"clientSide":{let{treeDataChildrenField:a,treeDataParentIdField:n,getDataPath:s,getRowId:l}=o;if(!a&&!n&&!s)return"treeData requires either 'treeDataChildrenField' or 'treeDataParentIdField' or 'getDataPath' in the clientSide row model.";if(a){if(s)return"Cannot use both 'treeDataChildrenField' and 'getDataPath' at the same time.";if(n)return"Cannot use both 'treeDataChildrenField' and 'treeDataParentIdField' at the same time."}if(n){if(!l)return"getRowId callback not provided, tree data with parent id cannot be built.";if(s)return"Cannot use both 'treeDataParentIdField' and 'getDataPath' at the same time."}return null}case"serverSide":{let a=`treeData requires 'isServerSideGroup' and 'getServerSideGroupKey' in the ${i} row model.`;return o.isServerSideGroup&&o.getServerSideGroupKey?null:a}}return null}},viewportDatasource:{supportedRowModels:["viewport"]},viewportRowModelBufferSize:{validate({viewportRowModelBufferSize:o}){return _e("viewportRowModelBufferSize",o,0)}},viewportRowModelPageSize:{validate({viewportRowModelPageSize:o}){return _e("viewportRowModelPageSize",o,1)}},rowDragEntireRow:{dependencies:{cellSelection:{required:[void 0]}}},autoGroupColumnDef:{validate({autoGroupColumnDef:o,showOpenedGroup:i}){return o!=null&&o.field&&i?"autoGroupColumnDef.field and showOpenedGroup are not supported when used together.":o!=null&&o.valueGetter&&i?"autoGroupColumnDef.valueGetter and showOpenedGroup are not supported when used together.":null}},renderingMode:{validate:o=>{let i=o.renderingMode,r=["default","legacy"];return i&&!r.includes(i)?`renderingMode must be one of [${r.join()}], currently it's ${i}`:null}},autoSizeStrategy:{validate:({autoSizeStrategy:o})=>{if(!o)return null;let i=["fitCellContents","fitGridWidth","fitProvidedWidth"],r=o.type;return r!=="fitCellContents"&&r!=="fitGridWidth"&&r!=="fitProvidedWidth"?`Invalid Auto-size strategy. \`autoSizeStrategy\` must be one of ${i.map(a=>'"'+a+'"').join(", ")}, currently it's ${r}`:r==="fitProvidedWidth"&&typeof o.width!="number"?`When using the 'fitProvidedWidth' auto-size strategy, must provide a numeric \`width\`. You provided ${o.width}`:null}}},t={};for(let o of ag)t[o]={expectedType:"boolean"};for(let o of rg)t[o]={expectedType:"number"};return he(t,e),t},Fb=()=>({objectName:"gridOptions",allProperties:[...xb(),...Object.values(Un)],propertyExceptions:["api"],docsUrl:"grid-options/",deprecations:kb(),validations:Eb()}),Db=0,Mb=0,vl="__ag_grid_instance",Pb=class extends S{constructor(){super(...arguments),this.beanName="gos",this.domDataKey="__AG_"+Math.random().toString(),this.instanceId=Mb++,this.gridReadyFired=!1,this.queueEvents=[],this.propEventSvc=new Yt,this.globalEventHandlerFactory=e=>(t,o)=>{if(!this.isAlive())return;let i=ji.has(t);if(i&&!e||!i&&e||!Ib(t))return;let r=(a,n)=>{let s=Un[a],l=this.gridOptions[s];typeof l=="function"&&this.beans.frameworkOverrides.wrapOutgoing(()=>l(n))};if(this.gridReadyFired)r(t,o);else if(t==="gridReady"){r(t,o),this.gridReadyFired=!0;for(let a of this.queueEvents)r(a.eventName,a.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){var t;return(t=this.gridOptions[e])!=null?t:sh[e]}getCallback(e){return this.mergeGridCommonParams(this.gridOptions[e])}exists(e){return M(this.gridOptions[e])}mergeGridCommonParams(e){return e&&(o=>e(this.addCommon(o)))}updateGridOptions({options:e,force:t,source:o="api"}){let i={id:Db++,properties:[]},r=[],{gridOptions:a,validation:n}=this;for(let s of Object.keys(e)){let l=Cn.applyGlobalGridOption(s,e[s]);n==null||n.warnOnInitialPropertyUpdate(o,s);let c=t||typeof l=="object"&&o==="api",d=a[s];if(c||d!==l){a[s]=l;let g={type:s,currentValue:l,previousValue:d,changeSet:i,source:o};r.push(g)}}this.validateGridOptions(this.gridOptions),i.properties=r.map(s=>s.type);for(let s of r)Et(this,`Updated property ${s.type} from`,s.previousValue," to ",s.currentValue),this.propEventSvc.dispatchEvent(s)}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(let o of Object.keys(e)){let i=e[o];if(i==null||i===!1)continue;let r=t[o];typeof r=="function"&&(r=r(e,this.gridOptions,this.beans)),r&&this.assertModuleRegistered(r,o)}}validateGridOptions(e){var t;this.validateOptions(e,Rb),(t=this.validation)==null||t.processGridOptions(e)}validateColDef(e,t,o){var i,r;(o||!((i=this.beans.dataTypeSvc)!=null&&i.isColPendingInference(t)))&&(this.validateOptions(e,ub),(r=this.validation)==null||r.validateColDef(e))}assertModuleRegistered(e,t){let o=Array.isArray(e)?e.some(i=>this.isModuleRegistered(i)):this.isModuleRegistered(e);return o||W(200,{...this.getModuleErrorParams(),moduleName:e,reasonOrId:t}),o}getModuleErrorParams(){return{gridId:this.gridId,gridScoped:wn(),rowModelType:this.get("rowModelType"),isUmd:bn()}}isModuleRegistered(e){return Ea(e,this.gridId,this.get("rowModelType"))}setInstanceDomData(e){e[vl]=this.instanceId}isElementInThisInstance(e){let t=e;for(;t;){let o=t[vl];if(M(o))return o===this.instanceId;t=t.parentElement}return!1}};function Ib(e){return!!Un[e]}var Tb=class extends S{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){let{sortSvc:t,rangeSvc:o,gos:i}=this.beans;if(!(So(i)?e.altKey:!0))o==null||o.handleColumnSelection(this.column,e);else if(this.column.isSortable()){let a=this.column.isMoving(),s=Date.now()-this.lastMovingChanged<50;a||s||t==null||t.progressSortFromEvent(this.column,e)}}};function Ab(e,t){let 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]}]}}var zb=class extends _{constructor(){super(...arguments),this.eFilter=E,this.eFilterButton=E,this.eSortIndicator=E,this.eMenu=E,this.eLabel=E,this.eText=E,this.eColRef=E,this.eSortOrder=E,this.eSortAsc=E,this.eSortDesc=E,this.eSortMixed=E,this.eSortNone=E,this.eSortAbsoluteAsc=E,this.eSortAbsoluteDesc=E,this.isLoadingInnerComponent=!1}refresh(e){var o,i,r;let t=this.params;if(this.params=e,this.workOutTemplate(e,!!((o=this.beans)!=null&&o.sortSvc))!=this.currentTemplate||this.workOutShowMenu()!=this.currentShowMenu||e.enableSorting!=this.currentSort||e.column.formulaRef!=this.currentRef||this.currentSuppressMenuHide!=null&&this.shouldSuppressMenuHide()!=this.currentSuppressMenuHide||t.enableFilterButton!=e.enableFilterButton||t.enableFilterIcon!=e.enableFilterIcon)return!1;if(this.innerHeaderComponent){let a={...e};he(a,e.innerHeaderComponentParams),(r=(i=this.innerHeaderComponent).refresh)==null||r.call(i,a)}else this.setDisplayName(e);return!0}workOutTemplate(e,t){let{formula:o}=this.beans,i=e.template;return i?i!=null&&i.trim?i.trim():i:Ab(!!(o!=null&&o.active),t)}init(e){var n;this.params=e;let{sortSvc:t,touchSvc:o,rowNumbersSvc:i,userCompFactory:r}=this.beans,a=t==null?void 0:t.getSortIndicatorSelector();this.currentTemplate=this.workOutTemplate(e,!!a),this.setTemplate(this.currentTemplate,a?[a]:void 0),this.eLabel&&((n=this.mouseListener)!=null||(this.mouseListener=this.createManagedBean(new Tb(e.column,this.eLabel)))),o==null||o.setupForHeader(this),this.setMenu(),this.setupSort(),this.setupColumnRefIndicator(),i==null||i.setupForHeader(this),this.setupFilterIcon(),this.setupFilterButton(),this.workOutInnerHeaderComponent(r,e),this.setDisplayName(e)}workOutInnerHeaderComponent(e,t){let o=Ap(e,t,t);o&&(this.isLoadingInnerComponent=!0,o.newAgStackInstance().then(i=>{this.isLoadingInnerComponent=!1,i&&(this.isAlive()?(this.innerHeaderComponent=i,this.eText&&this.eText.appendChild(i.getGui())):this.destroyBean(i))}))}setDisplayName(e){let{displayName:t}=e,o=this.currentDisplayName;this.currentDisplayName=t,!(!this.eText||o===t||this.innerHeaderComponent||this.isLoadingInnerComponent)&&(this.eText.textContent=zo(t))}addInIcon(e,t,o){let i=ye(e,this.beans,o);i&&t.appendChild(i)}workOutShowMenu(){var e;return this.params.enableMenu&&!!((e=this.beans.menuSvc)!=null&&e.isHeaderMenuButtonEnabled())}shouldSuppressMenuHide(){var e;return!!((e=this.beans.menuSvc)!=null&&e.isHeaderMenuButtonAlwaysShowEnabled())}setMenu(){if(!this.eMenu)return;if(this.currentShowMenu=this.workOutShowMenu(),!this.currentShowMenu){De(this.eMenu),this.eMenu=void 0;return}let{gos:e,eMenu:t,params:o}=this,i=be(e);this.addInIcon(i?"menu":"menuAlt",t,o.column),t.classList.toggle("ag-header-menu-icon",!i);let r=this.shouldSuppressMenuHide();this.currentSuppressMenuHide=r,this.addManagedElementListeners(t,{click:()=>this.showColumnMenu(this.eMenu)}),this.toggleMenuAlwaysShow(r)}toggleMenuAlwaysShow(e){var t;(t=this.eMenu)==null||t.classList.toggle("ag-header-menu-always-show",e)}showColumnMenu(e){let{currentSuppressMenuHide:t,params:o}=this;t||this.toggleMenuAlwaysShow(!0),o.showColumnMenu(e,()=>{t||this.toggleMenuAlwaysShow(!1)})}onMenuKeyboardShortcut(e){var l,c,d;let{params:t,gos:o,beans:i,eMenu:r,eFilterButton:a}=this,n=t.column,s=be(o);if(e&&!s){if((l=i.menuSvc)!=null&&l.isFilterMenuInHeaderEnabled(n))return t.showFilter((c=a!=null?a:r)!=null?c:this.getGui()),!0}else if(t.enableMenu)return this.showColumnMenu((d=r!=null?r:a)!=null?d:this.getGui()),!0;return!1}setupSort(){let{sortSvc:e}=this.beans;if(!e)return;let{enableSorting:t,column:o}=this.params;if(this.currentSort=t,!this.eSortIndicator){this.eSortIndicator=this.createBean(e.createSortIndicator(!0));let{eSortIndicator:i,eSortOrder:r,eSortAsc:a,eSortDesc:n,eSortMixed:s,eSortNone:l,eSortAbsoluteAsc:c,eSortAbsoluteDesc:d}=this;i.attachCustomElements(r,a,n,s,l,c,d)}this.eSortIndicator.setupSort(o),this.currentSort&&e.setupHeader(this,o)}setupColumnRefIndicator(){let{eColRef:e,beans:{editModelSvc:t},params:o}=this;e&&(this.currentRef=o.column.formulaRef,e.textContent=this.currentRef,q(e,!1),this.addManagedEventListeners({cellEditingStarted:()=>{let i=t==null?void 0:t.getEditPositions(),r=!!this.currentRef&&!!(i!=null&&i.some(a=>a.column.isAllowFormula()));q(e,r)},cellEditingStopped:()=>{q(e,!1)}}))}setupFilterIcon(){let{eFilter:e,params:t}=this;if(!e)return;let o=()=>{let i=t.column.isFilterActive();q(e,i,{skipAriaHidden:!0})};this.configureFilter(t.enableFilterIcon,e,o,"filterActive")}setupFilterButton(){let{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 De(t),!1;let r=this.params.column;return this.addInIcon(i,t,r),this.addManagedListeners(r,{filterChanged:o}),o(),!0}onFilterChangedButton(){let e=this.params.column.isFilterActive();this.eFilterButton.classList.toggle("ag-filter-active",e)}getAnchorElementForMenu(e){var i,r;let{eFilterButton:t,eMenu:o}=this;return e?(i=t!=null?t:o)!=null?i:this.getGui():(r=o!=null?o:t)!=null?r:this.getGui()}destroy(){super.destroy(),this.innerHeaderComponent=this.destroyBean(this.innerHeaderComponent),this.mouseListener=this.destroyBean(this.mouseListener)}},Lb=class extends S{constructor(e,t){super(),this.eLabel=e,this.columnGroup=t,this.isSticky=!1,this.left=null,this.right=null}postConstruct(){let{columnGroup:e,beans:t}=this,{ctrlsSvc:o}=t;o.whenReady(this,()=>{let i=this.refreshPosition.bind(this);e.getPinned()==null&&this.addManagedEventListeners({bodyScroll:r=>{r.direction==="horizontal"&&this.updateSticky(r.left)}}),this.addManagedListeners(e,{leftChanged:i,displayedChildrenChanged:i}),this.addManagedEventListeners({columnResized:i}),this.refreshPosition()})}refreshPosition(){let{columnGroup:e,beans:t}=this,o=e.getLeft(),i=e.getActualWidth();if(o==null||i===0){this.left=null,this.right=null,this.setSticky(!1);return}this.left=o,this.right=o+i;let r=t.colViewport.getScrollPosition();r!=null&&this.updateSticky(r)}updateSticky(e){let{beans:t,left:o,right:i}=this;if(o==null||i==null){this.setSticky(!1);return}let{gos:r,visibleCols:a}=t,s=r.get("enableRtl")?a.bodyWidth-e:e;this.setSticky(os)}setSticky(e){let{isSticky:t,eLabel:o}=this;t!==e&&(this.isSticky=e,o.classList.toggle("ag-sticky-label",e))}},Ob={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"}]},Hb=class extends _{constructor(){super(Ob),this.agOpened=E,this.agClosed=E,this.agLabel=E,this.isLoadingInnerComponent=!1}init(e){let{userCompFactory:t,touchSvc:o}=this.beans;this.params=e,this.checkWarnings(),this.workOutInnerHeaderGroupComponent(t,e),this.setupLabel(e),this.addGroupExpandIcon(e),this.setupExpandIcons(),o==null||o.setupForHeaderGroup(this)}checkWarnings(){this.params.template&&k(89)}workOutInnerHeaderGroupComponent(e,t){let o=Lp(e,t,t);o&&(this.isLoadingInnerComponent=!0,o.newAgStackInstance().then(i=>{this.isLoadingInnerComponent=!1,i&&(this.isAlive()?(this.innerHeaderGroupComponent=i,this.agLabel.appendChild(i.getGui())):this.destroyBean(i))}))}setupExpandIcons(){let{agOpened:e,agClosed:t,params:{columnGroup:o},beans:{colGroupSvc:i}}=this;this.addInIcon("columnGroupOpened",e),this.addInIcon("columnGroupClosed",t);let r=l=>{if(ct(l))return;let c=!o.isExpanded();i.setColumnGroupOpened(o.getProvidedColumnGroup(),c,"uiColumnExpanded")};this.addTouchAndClickListeners(t,r),this.addTouchAndClickListeners(e,r);let a=l=>{Xt(l)};this.addManagedElementListeners(t,{dblclick:a}),this.addManagedElementListeners(e,{dblclick:a}),this.addManagedElementListeners(this.getGui(),{dblclick:r}),this.updateIconVisibility();let n=o.getProvidedColumnGroup(),s=this.updateIconVisibility.bind(this);this.addManagedListeners(n,{expandedChanged:s,expandableChanged:s})}addTouchAndClickListeners(e,t){var o;(o=this.beans.touchSvc)==null||o.setupForHeaderGroupElement(this,e,t),this.addManagedElementListeners(e,{click:t})}updateIconVisibility(){let{agOpened:e,agClosed:t,params:{columnGroup:o}}=this;if(o.isExpandable()){let i=o.isExpanded();q(e,i),q(t,!i)}else q(e,!1),q(t,!1)}addInIcon(e,t){let o=ye(e,this.beans,null);o&&t.appendChild(o)}addGroupExpandIcon(e){if(!e.columnGroup.isExpandable()){let{agOpened:t,agClosed:o}=this;q(t,!1),q(o,!1)}}setupLabel(e){var n;let{displayName:t,columnGroup:o}=e,{innerHeaderGroupComponent:i,isLoadingInnerComponent:r}=this,a=i||r;M(t)&&!a&&(this.agLabel.textContent=zo(t)),(n=o.getColGroupDef())!=null&&n.suppressStickyLabel||this.createManagedBean(new Lb(this.getGui(),o))}destroy(){super.destroy(),this.innerHeaderGroupComponent&&(this.destroyBean(this.innerHeaderGroupComponent),this.innerHeaderGroupComponent=void 0)}},Bb={moduleName:"ColumnHeaderComp",version:D,userComponents:{agColumnHeader:zb},icons:{menu:"menu",menuAlt:"menu-alt"}},Vb={moduleName:"ColumnGroupHeaderComp",version:D,userComponents:{agColumnGroupHeader:Hb},icons:{columnGroupOpened:"expanded",columnGroupClosed:"contracted"}},Nb=class extends S{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,e===0&&(this.scrollGoingDown=!0),this.lastScrollTop=e}postConstruct(){this.active=!this.gos.get("suppressAnimationFrame"),this.batchFrameworkComps=this.beans.frameworkOverrides.batchFrameworkComps}verify(){this.active===!1&&k(92)}createTask(e,t,o,i,r=!1){this.verify();let a=o;i&&this.batchFrameworkComps&&(a="f1");let n={task:e,index:t,createOrder:++this.taskCount,deferred:r};this.addTaskToList(this[a],n),this.schedule()}addTaskToList(e,t){e.list.push(t),e.sorted=!1}sortTaskList(e){if(e.sorted)return;let t=this.scrollGoingDown?1:-1;e.list.sort((o,i)=>o.deferred!==i.deferred?o.deferred?-1:1:o.index!==i.index?t*(i.index-o.index):i.createOrder-o.createOrder),e.sorted=!0}addDestroyTask(e){this.verify(),this.destroyTasks.push(e),this.schedule()}executeFrame(e){let{p1:t,p2:o,f1:i,destroyTasks:r,beans:a}=this,{ctrlsSvc:n,frameworkOverrides:s}=a,l=t.list,c=o.list,d=i.list,g=Date.now(),u=0,h=e<=0,p=n.getScrollFeature();for(;h||u{for(;(h||u{};else if(r.length)m=r.pop();else break;m()}u=Date.now()-g}l.length||c.length||d.length||r.length?this.requestFrame():this.ticking=!1}flushAllFrames(){this.active&&this.executeFrame(-1)}schedule(){this.active&&(this.ticking||(this.ticking=!0,this.requestFrame()))}requestFrame(){let e=this.executeFrame.bind(this,60);ht(this.beans,e)}isQueueEmpty(){return!this.ticking}},Gb={moduleName:"AnimationFrame",version:D,beans:[Nb]},Wb=class extends S{constructor(){super(...arguments),this.beanName="iconSvc"}createIconNoSpan(e,t){return ye(e,this.beans,t==null?void 0:t.column)}},qb=(e,t,o)=>t||e&&o,_b=class extends S{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(!jt())return;let t=(o,i,r)=>{var s,l;let{rowCtrl:a,cellCtrl:n}=e.getControlsForEventTarget((s=r==null?void 0:r.target)!=null?s:null);n!=null&&n.column&&n.dispatchCellContextMenuEvent(r!=null?r:null),(l=this.beans.contextMenuSvc)==null||l.handleContextMenuMouseEvent(void 0,r,a,n)};this.mockContextMenu(e,e.element,t)}handleCellDoubleClick(e,t){return(()=>{if(!jt()||Ji("dblclick"))return!1;let i=Date.now(),r=i-e.lastIPadMouseClickEvent<200;return e.lastIPadMouseClickEvent=i,r})()?(e.onCellDoubleClicked(t),t.preventDefault(),!0):!1}setupForHeader(e){let{gos:t,sortSvc:o,menuSvc:i}=this.beans;if(t.get("suppressTouch"))return;let{params:r,eMenu:a,eFilterButton:n}=e,s=new Vt(e.getGui(),!0);e.addDestroyFunc(()=>s.destroy());let l=e.shouldSuppressMenuHide(),c=l&&M(a)&&r.enableMenu,d=!!(i!=null&&i.isHeaderContextMenuEnabled(r.column)),g=qb(r.enableMenu,d,be(t)),u=s;c&&(u=new Vt(a,!0),e.addDestroyFunc(()=>u.destroy()));let h=p=>r.showColumnMenuAfterMouseClick(p.touchStart);if(c&&r.enableMenu&&e.addManagedListeners(u,{tap:h}),g&&e.addManagedListeners(s,{longTap:h}),r.enableSorting){let p=f=>{let m=f.touchStart.target;l&&(a!=null&&a.contains(m)||n!=null&&n.contains(m))||o==null||o.progressSort(r.column,!1,"uiColumnSorted")};e.addManagedListeners(s,{tap:p})}if(r.enableFilterButton&&n){let p=new Vt(n,!0);e.addManagedListeners(p,{tap:()=>r.showFilter(n)}),e.addDestroyFunc(()=>p.destroy())}}setupForHeaderGroup(e){var o;let t=e.params;if((o=this.beans.menuSvc)!=null&&o.isHeaderContextMenuEnabled(t.columnGroup.getProvidedColumnGroup())){let i=new Vt(t.eGridHeader,!0),r=a=>t.showColumnMenuAfterMouseClick(a.touchStart);e.addManagedListeners(i,{longTap:r}),e.addDestroyFunc(()=>i.destroy())}}setupForHeaderGroupElement(e,t,o){let i=new Vt(t,!0);e.addManagedListeners(i,{tap:o}),e.addDestroyFunc(()=>i.destroy())}mockContextMenu(e,t,o){if(!jt())return;let i=new Vt(t),r=a=>{li(this.beans,a.touchEvent)&&o(void 0,a.touchStart,a.touchEvent)};e.addManagedListeners(i,{longTap:r}),e.addDestroyFunc(()=>i.destroy())}},Ub={moduleName:"Touch",version:D,beans:[_b]},jb=class extends S{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){let o=e===b.UP,i=e===b.DOWN,r=e===b.LEFT,a,n,{pageBounds:s,gos:l,visibleCols:c,pinnedRowModel:d}=this.beans,{rowPinned:g}=t;if(o||i)g&&d?o?n=0:n=g==="top"?d.getPinnedTopRowCount()-1:d.getPinnedBottomRowCount()-1:n=o?s.getFirstRow():s.getLastRow(),a=t.column;else{let u=l.get("enableRtl");n=t.rowIndex,a=(r!==u?c.allCols:[...c.allCols].reverse()).find(p=>!pe(p)&&this.isCellGoodToFocusOn({rowIndex:n,rowPinned:null,column:p}))}return a?{rowIndex:n,rowPinned:g,column:a}:null}getNextCellToFocusWithoutCtrlPressed(e,t){let o=t,i=!1;for(;!i;){switch(e){case b.UP:o=this.getCellAbove(o);break;case b.DOWN:o=this.getCellBelow(o);break;case b.RIGHT:o=this.gos.get("enableRtl")?this.getCellToLeft(o):this.getCellToRight(o);break;case b.LEFT:o=this.gos.get("enableRtl")?this.getCellToRight(o):this.getCellToLeft(o);break;default:o=null,k(8,{key:e});break}o?i=this.isCellGoodToFocusOn(o):i=!0}return o}isCellGoodToFocusOn(e){let t=e.column,o,{pinnedRowModel:i,rowModel:r}=this.beans;switch(e.rowPinned){case"top":o=i==null?void 0:i.getPinnedTopRow(e.rowIndex);break;case"bottom":o=i==null?void 0:i.getPinnedBottomRow(e.rowIndex);break;default:o=r.getRow(e.rowIndex);break}return o?!this.isSuppressNavigable(t,o):!1}getCellToLeft(e){if(!e)return null;let t=this.beans.visibleCols.getColBefore(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellToRight(e){if(!e)return null;let t=this.beans.visibleCols.getColAfter(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellBelow(e){var i,r;if(!e)return null;let t=(r=(i=this.rowSpanSvc)==null?void 0:i.getCellEnd(e))!=null?r:e,o=Ws(this.beans,t,!0);return o?{rowIndex:o.rowIndex,column:e.column,rowPinned:o.rowPinned}:null}getCellAbove(e){var i,r;if(!e)return null;let t=(r=(i=this.rowSpanSvc)==null?void 0:i.getCellStart(e))!=null?r:e,o=lr(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){var s;let{visibleCols:t,pagination:o}=this.beans,i=t.allCols,r=e.rowIndex,a=e.rowPinned,n=t.getColAfter(e.column);if(!n){n=i[0];let l=Ws(this.beans,e,!0);if(Q(l)||!l.rowPinned&&!((s=o==null?void 0:o.isRowInPage(l.rowIndex))==null||s))return null;r=l?l.rowIndex:null,a=l?l.rowPinned:null}return{rowIndex:r,column:n,rowPinned:a}}getNextTabbedCellBackwards(e){var l;let{beans:t}=this,{visibleCols:o,pagination:i}=t,r=o.allCols,a=e.rowIndex,n=e.rowPinned,s=o.getColBefore(e.column);if(!s){s=U(r);let c=lr(t,{rowIndex:e.rowIndex,rowPinned:e.rowPinned},!0);if(Q(c)||!c.rowPinned&&!((l=i==null?void 0:i.isRowInPage(c.rowIndex))==null||l))return null;a=c?c.rowIndex:null,n=c?c.rowPinned:null}return{rowIndex:a,column:s,rowPinned:n}}isSuppressNavigable(e,t){let{suppressNavigable:o}=e.colDef;if(typeof o=="boolean")return o;if(typeof o=="function"){let i=e.createColumnFunctionCallbackParams(t);return o(i)}return!1}};function Kb(e){return e.focusSvc.getFocusedCell()}function $b(e){return e.focusSvc.clearFocusedCell()}function Yb(e,t,o,i){e.focusSvc.setFocusedCell({rowIndex:t,column:o,rowPinned:i,forceBrowserFocus:!0})}function Qb(e,t){var o,i;return(i=(o=e.navigation)==null?void 0:o.tabToNextCell(!1,t))!=null?i:!1}function Zb(e,t){var o,i;return(i=(o=e.navigation)==null?void 0:o.tabToNextCell(!0,t))!=null?i:!1}function Jb(e,t,o=!1){var r;let i=(r=e.headerNavigation)==null?void 0:r.getHeaderPositionForColumn(t,o);i&&e.focusSvc.focusHeaderPosition({headerPosition:i})}function to(e){let t=e;return(t==null?void 0:t.getFrameworkComponentInstance)!=null?t.getFrameworkComponentInstance():e}var Xb=class extends S{constructor(){super(...arguments),this.beanName="editModelSvc",this.edits=new Map,this.cellValidations=new ng,this.rowValidations=new sg,this.suspendEdits=!1}suspend(e){this.suspendEdits=e}removeEdits({rowNode:e,column:t}){if(!this.hasEdits({rowNode:e})||!e)return;let o=this.getEditRow(e);t?o.delete(t):o.clear(),o.size===0&&this.edits.delete(e)}getEditRow(e,t={}){if(this.suspendEdits||this.edits.size===0)return;let o=e&&this.edits.get(e);if(o)return o;if(t.checkSiblings){let i=e.pinnedSibling;if(i)return this.getEditRow(i)}}getEditRowDataValue(e,{checkSiblings:t}={}){if(!e||this.edits.size===0)return;let o=this.getEditRow(e),i=e.pinnedSibling,r=t&&i&&this.getEditRow(i);if(!o&&!r)return;let a={...e.data},n=(s,l)=>s.forEach(({editorValue:c,pendingValue:d},g)=>{let u=c===void 0?d:c;u!==ae&&(l[g.getColId()]=u)});return o&&n(o,a),r&&n(r,a),a}getEdit(e={},t){var n,s;let{rowNode:o,column:i}=e,r=this.edits;if(this.suspendEdits||r.size===0||!o||!i)return;let a=(n=r.get(o))==null?void 0:n.get(i);if(a)return a;if(t!=null&&t.checkSiblings){let l=o.pinnedSibling;if(l)return(s=r.get(l))==null?void 0:s.get(i)}}getEditMap(e=!0){if(this.suspendEdits||this.edits.size===0)return new Map;if(!e)return this.edits;let t=new Map;return this.edits.forEach((o,i)=>{let r=new Map;o.forEach(({editorState:a,...n},s)=>r.set(s,{...n})),t.set(i,r)}),t}setEditMap(e){this.edits.clear(),e.forEach((t,o)=>{let i=new Map;t.forEach((r,a)=>i.set(a,{...r})),this.edits.set(o,i)})}setEdit(e,t){let o=this.edits;(o.size===0||!o.has(e.rowNode))&&o.set(e.rowNode,new Map);let i=this.getEdit(e),r={editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0},...i,...t};return this.getEditRow(e.rowNode).set(e.column,r),r}clearEditValue(e){var a;let{rowNode:t,column:o}=e;if(!t)return;let i=n=>{n.editorValue=void 0,n.pendingValue=n.sourceValue,n.state="changed"};if(!o){(a=this.getEditRow(t))==null||a.forEach(i);return}let r=this.getEdit(e);r&&i(r)}getState(e){var t;if(!this.suspendEdits)return(t=this.getEdit(e))==null?void 0:t.state}getEditPositions(e){if(this.suspendEdits||(e!=null?e:this.edits).size===0)return[];let t=[];return(e!=null?e:this.edits).forEach((o,i)=>{for(let r of o.keys()){let{editorState:a,...n}=o.get(r);t.push({rowNode:i,column:r,...n})}}),t}hasRowEdits(e,t){return this.suspendEdits||this.edits.size===0?!1:!!this.getEditRow(e,t)}hasEdits(e={},t={}){var a;if(this.suspendEdits||this.edits.size===0)return!1;let{rowNode:o,column:i}=e,{withOpenEditor:r}=t;if(o){let n=this.getEditRow(o,t);return n?i?r?((a=this.getEdit(e))==null?void 0:a.state)==="editing":n.has(i):n.size!==0?r?Array.from(n.values()).some(({state:s})=>s==="editing"):!0:!1:!1}return r?this.getEditPositions().some(({state:n})=>n==="editing"):this.edits.size>0}start(e){var r;let t=(r=this.getEditRow(e.rowNode))!=null?r:new Map,{rowNode:o,column:i}=e;i&&!t.has(i)&&t.set(i,{editorValue:void 0,pendingValue:ae,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){var i;if(this.hasEdits(e))if(t){let r=(i=this.getEditRow(e.rowNode))==null?void 0:i.get(e.column);r&&(r.pendingValue===ae||r.pendingValue===r.sourceValue)?this.removeEdits(e):r&&o&&(r.editorValue=void 0)}else this.removeEdits(e)}clear(){for(let 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()}},ng=class{constructor(){this.cellValidations=new Map}getCellValidation(e){var i,r;let{rowNode:t,column:o}=e||{};return(r=(i=this.cellValidations)==null?void 0:i.get(t))==null?void 0:r.get(o)}hasCellValidation(e){return!(e!=null&&e.rowNode)||!e.column?this.cellValidations.size>0:!!this.getCellValidation(e)}setCellValidation(e,t){let{rowNode:o,column:i}=e;this.cellValidations.has(o)||this.cellValidations.set(o,new Map),this.cellValidations.get(o).set(i,t)}clearCellValidation(e){var i;let{rowNode:t,column:o}=e;(i=this.cellValidations.get(t))==null||i.delete(o)}setCellValidationMap(e){this.cellValidations=e}getCellValidationMap(){return this.cellValidations}clearCellValidationMap(){this.cellValidations.clear()}},sg=class{constructor(){this.rowValidations=new Map}getRowValidation(e){let{rowNode:t}=e||{};return this.rowValidations.get(t)}hasRowValidation(e){return e!=null&&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 fr(e,t={}){let{rowIndex:o,rowId:i,rowCtrl:r,rowPinned:a}=t;if(r)return r;let{rowModel:n,rowRenderer:s}=e,{rowNode:l}=t;return l||(i?l=Ff(e,i,a):o!=null&&(l=n.getRow(o))),l?s.getRowCtrlByNode(l):void 0}function G(e,t={}){var d,g,u,h,p;let{cellCtrl:o,colId:i,columnId:r,column:a}=t;if(o)return o;let n=e.colModel.getCol((d=i!=null?i:r)!=null?d:Ua(a)),s=(g=t.rowCtrl)!=null?g:fr(e,t),l=(u=s==null?void 0:s.getCellCtrl(n))!=null?u:void 0;if(l)return l;let c=(h=t.rowNode)!=null?h:s==null?void 0:s.rowNode;if(c)return(p=e.rowRenderer.getCellCtrls([c],[n]))==null?void 0:p[0]}function Cl(e){let{editSvc:t}=e;t!=null&&t.isBatchEditing()?(St(e,{persist:!0}),bt(e)):t==null||t.stopEditing(void 0,{source:"api"})}function e1(e,t,o){let{gos:i,popupSvc:r}=t;if(!i.get("stopEditingWhenCellsLoseFocus"))return;let a=n=>{let s=n.relatedTarget;if(Aa(s)===null){Cl(t);return}let l=o.some(c=>c.contains(s))&&i.isElementInThisInstance(s);l||(l=!!r&&(r.getActivePopups().some(c=>c.contains(s))||r.isElementWithinCustomPopup(s))),l||Cl(t)};for(let n of o)e.addManagedElementListeners(n,{focusout:a})}function Ua(e){if(e)return typeof e=="string"?e:e.getColId()}var ae=Symbol("unedited"),t1=(e,t={})=>{var a;let o=e.rowRenderer.getCellCtrls(t.rowNodes,t.columns),i=new Array(o.length),r=0;for(let n=0,s=o.length;n0&&t.set(o,r)}return t}function oo(e,t,o){var T,I,z;let{key:i,event:r,cellStartedEdit:a,silent:n}=o!=null?o:{},{editModelSvc:s,gos:l,userCompFactory:c}=e,d=G(e,t),g=(T=d==null?void 0:d.comp)==null?void 0:T.getCellEditor(),u=cg(e,t,i,a&&!n),h=s==null?void 0:s.getEdit(t),p=(I=u.value)!=null?I:h==null?void 0:h.sourceValue;if(g){s==null||s.setEdit(t,{editorValue:To(e,p,!0,t.column),state:"editing"}),(z=g.refresh)==null||z.call(g,u);return}let f=t.column.getColDef(),m=Kc(c,f,u);if(!m)return;let{popupFromSelector:v,popupPositionFromSelector:C}=m,w=v!=null?v:!!f.cellEditorPopup,y=C!=null?C:f.cellEditorPopupPosition;if(dg(m.params,r),!d)return;let{rangeFeature:x,rowCtrl:R,comp:F,onEditorAttachedFuncs:P}=d;s==null||s.setEdit(t,{editorValue:To(e,p,!0,t.column),state:"editing",editorState:{cellStartedEditing:void 0,cellStoppedEditing:void 0}}),d.editCompDetails=m,P.push(()=>x==null?void 0:x.unsetComp()),F==null||F.setEditDetails(m,w,y,l.get("reactiveCustomComponents")),R==null||R.refreshRow({suppressFlash:!0}),r1(e,t,r,p,n)}function r1(e,t,o,i,r){var l;let{editSvc:a,editModelSvc:n}=e,s=n==null?void 0:n.getEdit(t);!r&&(s==null?void 0:s.state)==="editing"&&!((l=s==null?void 0:s.editorState)!=null&&l.cellStartedEditing)&&(a==null||a.dispatchCellEvent(t,o,"cellEditingStarted",{value:i}),n==null||n.setEdit(t,{editorState:{cellStartedEditing:!0}}))}function lg(e,t,o){var a,n,s;let i={editorValueExists:!1};if(jn(e)){let l=(a=t.getValidationErrors)==null?void 0:a.call(t);if(((n=l==null?void 0:l.length)!=null?n:0)>0)return i}if(o!=null&&o.isCancelling)return i;if(o!=null&&o.isStopping){let l=(s=t==null?void 0:t.isCancelAfterEnd)==null?void 0:s.call(t);if(l)return{...i,isCancelAfterEnd:l}}return{editorValue:t.getValue(),editorValueExists:!0}}function cg(e,t,o,i){var w,y,x,R,F,P,T,I;let{valueSvc:r,gos:a,editSvc:n}=e,s=e.gos.get("enableGroupEdit"),l=G(e,t),c=(y=(w=t.rowNode)==null?void 0:w.rowIndex)!=null?y:void 0,d=n==null?void 0:n.isBatchEditing(),g=e.colModel.getCol(t.column.getId()),{rowNode:u,column:h}=t,p=(x=l.comp)==null?void 0:x.getCellEditor(),f=n==null?void 0:n.getCellDataValue(t),m=f===void 0?p?(R=lg(e,p))==null?void 0:R.editorValue:void 0:f,v=m===ae?(F=r.getValueForDisplay({column:g,node:u,from:"edit"}))==null?void 0:F.value:m,C=s?m:v;return h.isAllowFormula()&&((P=e.formula)!=null&&P.isFormula(C))&&(C=(I=(T=e.formula)==null?void 0:T.normaliseFormula(C,!0))!=null?I:C),O(a,{value:C,eventKey:o!=null?o:null,column:h,colDef:h.getColDef(),rowIndex:c,node:u,data:u.data,cellStartedEdit:!!i,onKeyDown:l==null?void 0:l.onKeyDown.bind(l),stopEditing:z=>{n.stopEditing(t,{source:d?"ui":"api",suppressNavigateAfterEdit:z}),pi(e,t,{})},eGridCell:l==null?void 0:l.eGui,parseValue:z=>r.parseValue(g,u,z,l==null?void 0:l.value),formatValue:l==null?void 0:l.formatValue.bind(l),validate:()=>{n==null||n.validateEdit()}})}function jo(e,t){let{editModelSvc:o}=e;o==null||o.getEditMap().forEach((i,r)=>{i.forEach((a,n)=>{!t&&(a.state==="editing"||a.pendingValue===ae)||!Be(a)&&(a.state!=="editing"||t)&&(o==null||o.removeEdits({rowNode:r,column:n}))})})}function a1(e,t){var c;let o=(c=t.comp)==null?void 0:c.getCellEditor();if(!(o!=null&&o.refresh))return;let{eventKey:i,cellStartedEdit:r}=t.editCompDetails.params,{column:a}=t,n=cg(e,t,i,r),s=a.getColDef(),l=Kc(e.userCompFactory,s,n);o.refresh(dg(l.params,i))}function dg(e,t){var o,i;return t instanceof KeyboardEvent&&e.column.getColDef().cellEditor==="agNumberCellEditor"?e.suppressPreventDefault=["-","+",".","e"].includes((o=t==null?void 0:t.key)!=null?o:"")||e.suppressPreventDefault:(i=t==null?void 0:t.preventDefault)==null||i.call(t),e}function St(e,t){var o,i,r,a,n,s;for(let l of(i=(o=e.editModelSvc)==null?void 0:o.getEditPositions())!=null?i:[]){let c=G(e,l);if(!c)continue;let d=(r=c.comp)==null?void 0:r.getCellEditor();if(!d)continue;let{editorValue:g,editorValueExists:u,isCancelAfterEnd:h}=lg(e,d,t);if(h){let{cellStartedEditing:p,cellStoppedEditing:f}=((n=(a=e.editModelSvc)==null?void 0:a.getEdit(l))==null?void 0:n.editorState)||{};(s=e.editModelSvc)==null||s.setEdit(l,{editorState:{isCancelAfterEnd:h,cellStartedEditing:p,cellStoppedEditing:f}})}go(e,l,g,void 0,!u,t)}}function go(e,t,o,i,r,a){let{editModelSvc:n,valueSvc:s}=e;if(!n)return;let{rowNode:l,column:c}=t;if(!(l&&c))return;let d=n.getEdit(t);if((d==null?void 0:d.sourceValue)===void 0){let g=d?To(e,d.editorValue,!1,c):ae,u={sourceValue:s.getValue(c,l,"data"),pendingValue:g};a!=null&&a.persist&&(u.state="changed"),d=n.setEdit(t,u)}n.setEdit(t,{editorValue:r?To(e,d.sourceValue,!0,c):o}),a!=null&&a.persist&&n1(e,t)}function To(e,t,o,i){var a;let{formula:r}=e;return i.isAllowFormula()&&(r!=null&&r.isFormula(t))&&(a=r==null?void 0:r.normaliseFormula(t,o))!=null?a:t}function n1(e,t){var n;let{editModelSvc:o}=e,i=o==null?void 0:o.getEdit(t),a={pendingValue:To(e,i==null?void 0:i.editorValue,!1,t.column)};!((n=i==null?void 0:i.editorState)!=null&&n.cellStoppedEditing)&&(i==null?void 0:i.state)!=="editing"&&(a.state="changed"),o==null||o.setEdit(t,a)}function bt(e,t,o={}){var i;if(t||(t=(i=e.editModelSvc)==null?void 0:i.getEditPositions()),t)for(let r of t)pi(e,r,o)}function pi(e,t,o,i=G(e,t)){var d,g;let r=e.editModelSvc,a=r==null?void 0:r.getEdit(t),n;if(a&&a.state!=="editing"&&((d=a.editorState)!=null&&d.cellStoppedEditing)?n=a.state:n="changed",!i){a&&(r==null||r.setEdit(t,{state:n}));return}let s=i.comp,l=s==null?void 0:s.getCellEditor();if(s&&!l){if(i==null||i.refreshCell(),a){r==null||r.setEdit(t,{state:n});let u=e.gos.get("enableGroupEdit")?wl(a,o==null?void 0:o.cancel):{valueChanged:!1,newValue:void 0,oldValue:a.sourceValue};bl(e,t,u,o)}return}if(jn(e)){let u=a&&((g=l==null?void 0:l.getValidationErrors)==null?void 0:g.call(l)),h=r==null?void 0:r.getCellValidationModel();u!=null&&u.length?h==null||h.setCellValidation(t,{errorMessages:u}):h==null||h.clearCellValidation(t)}a&&(r==null||r.setEdit(t,{state:n})),s==null||s.setEditDetails(),s==null||s.refreshEditStyles(!1,!1),i==null||i.refreshCell({force:!0,suppressFlash:!0});let c=r==null?void 0:r.getEdit(t);if(c&&c.state!=="editing"){let u=o==null?void 0:o.cancel,h=e.gos.get("enableGroupEdit")?wl(c,u):s1(c,a,u);bl(e,t,h,o)}}function wl(e,t){let{sourceValue:o,pendingValue:i}=e,r;return!t&&i!==ae&&(r=i),{valueChanged:!t&&Be(e),newValue:r,oldValue:o,value:o}}function s1(e,t,o){if(o||e.editorState.isCancelAfterEnd)return{valueChanged:!1,newValue:void 0,oldValue:e.sourceValue};let i=e.editorValue;return(i==null||i===ae)&&(i=t==null?void 0:t.pendingValue),i===ae&&(i=void 0),{valueChanged:Be(e),newValue:i,oldValue:e.sourceValue}}function bl(e,t,o,{silent:i,event:r}={}){let{editSvc:a,editModelSvc:n}=e,s=n==null?void 0:n.getEdit(t),{editorState:l}=s||{},{isCancelBeforeStart:c,cellStartedEditing:d,cellStoppedEditing:g}=l||{};!i&&!c&&d&&!g&&(a==null||a.dispatchCellEvent(t,r,"cellEditingStopped",o),n==null||n.setEdit(t,{editorState:{cellStoppedEditing:!0}}))}function l1(e){if(!e)return!1;for(let t=0,o=e.length;t0,N=L?I.join(". "):"";gn(z,L),L&&i.announceValue(`${c} ${I}`,"editorValidation"),z instanceof HTMLInputElement?z.setCustomValidity(N):z.classList.toggle("invalid",L)}(I==null?void 0:I.length)>0&&o.setCellValidation({rowNode:P,column:T},{errorMessages:I}),d.add(x.rowCtrl)}if(St(e,{persist:!1}),a==null||a.setCellValidationModel(o),s){let x=d1(e);a==null||a.setRowValidationModel(x)}for(let x of d.values()){(m=x.rowEditStyleFeature)==null||m.applyRowStyles();for(let R of x.getAllCellCtrls())(v=R.tooltipFeature)==null||v.refreshTooltip(!0),(C=R.editorTooltipFeature)==null||C.refreshTooltip(!0),(y=(w=R.editStyleFeature)==null?void 0:w.applyCellStyles)==null||y.call(w)}}var d1=e=>{var r,a,n;let t=new sg,o=e.gos.get("getFullRowEditValidationErrors"),i=(r=e.editModelSvc)==null?void 0:r.getEditMap();if(!i)return t;for(let s of i.keys()){let l=i.get(s);if(!l)continue;let c=[],{rowIndex:d,rowPinned:g}=s;for(let h of l.keys()){let p=l.get(h);if(!p)continue;let{editorValue:f,pendingValue:m,sourceValue:v}=p,C=(a=f!=null?f:m===ae?void 0:m)!=null?a:v;c.push({column:h,colId:h.getColId(),rowIndex:d,rowPinned:g,oldValue:v,newValue:C})}let u=(n=o==null?void 0:o({editorsState:c}))!=null?n:[];u.length>0&&t.setRowValidation({rowNode:s},{errorMessages:u})}return t};function g1(e){var i;kt(e,!0);let t=(i=e.editModelSvc)==null?void 0:i.getCellValidationModel().getCellValidationMap();if(!t)return null;let o=[];return t.forEach((r,a)=>{r.forEach(({errorMessages:n},s)=>{o.push({column:s,rowIndex:a.rowIndex,rowPinned:a.rowPinned,messages:n!=null?n:null})})}),o}function Mr(e){return!!(e.rowPinned&&e.pinnedSibling)}function Re(e,t,o,i){let r=t==="top";if(!o)return Re(e,t,r?e.getPinnedTopRow(0):e.getPinnedBottomRow(0),i);if(!i){let l=r?e.getPinnedTopRowCount():e.getPinnedBottomRowCount();return Re(e,t,o,r?e.getPinnedTopRow(l-1):e.getPinnedBottomRow(l-1))}let a=!1,n=!1,s=[];return e.forEachPinnedRow(t,l=>{if(l===o&&!a){a=!0,s.push(l);return}if(a&&l===i){n=!0,s.push(l);return}a&&!n&&s.push(l)}),s}function u1(e,t,o,{rowNode:i,column:r},a){return O(e.gos,{type:o,node:i,data:i.data,value:a,column:r,colDef:r.getColDef(),rowPinned:i.rowPinned,event:t,rowIndex:i.rowIndex})}function h1(e,t=!1){return e===b.DELETE?!0:!t&&e===b.BACKSPACE?Jc():!1}var p1=class extends S{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){var o;let t=e.key;if(!(t===b.ENTER&&pe(this.cellCtrl.column)&&((o=this.beans.rowNumbersSvc)!=null&&o.handleKeyDownOnCell(this.cellCtrl.cellPosition,e))))switch(t){case b.ENTER:this.onEnterKeyDown(e);break;case b.F2:this.onF2KeyDown(e);break;case b.ESCAPE:this.onEscapeKeyDown(e);break;case b.TAB:this.onTabKeyDown(e);break;case b.BACKSPACE:case b.DELETE:this.onBackspaceOrDeleteKeyDown(t,e);break;case b.DOWN:case b.UP:case b.RIGHT:case b.LEFT:this.onNavigationKeyDown(e,t);break}}onNavigationKeyDown(e,t){var r,a;let{cellCtrl:o,beans:i}=this;if(!((r=i.editSvc)!=null&&r.isEditing(o,{withOpenEditor:!0}))){if(e.shiftKey&&o.isRangeSelectionEnabled())this.onShiftRangeSelect(e);else{let n=o.getFocusedCellPosition();(a=i.navigation)==null||a.navigateToNextCell(e,t,n,!0)}e.preventDefault()}}onShiftRangeSelect(e){let{rangeSvc:t,navigation:o}=this.beans;if(!t)return;let i=t.extendLatestRangeInDirection(e);i&&(e.key===b.LEFT||e.key===b.RIGHT?o==null||o.ensureColumnVisible(i.column):o==null||o.ensureRowVisible(i.rowIndex))}onTabKeyDown(e){var t;(t=this.beans.navigation)==null||t.onTabKeyDown(this.cellCtrl,e)}onBackspaceOrDeleteKeyDown(e,t){var c;let{cellCtrl:o,beans:i,rowNode:r}=this,{gos:a,rangeSvc:n,eventSvc:s,editSvc:l}=i;if(s.dispatchEvent({type:"keyShortcutChangedCellStart"}),h1(e,a.get("enableCellEditingOnBackspace"))&&!(l!=null&&l.isEditing(o,{withOpenEditor:!0}))){if(n&&dt(a))n.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(o.isCellEditable()){let d=i.valueSvc.getDeleteValue(o.column,r);r.setDataValue(o.column,d,"cellClear")}}else l!=null&&l.isEditing(o,{withOpenEditor:!0})||(c=i.editSvc)==null||c.startEditing(o,{startedEdit:!0,event:t});s.dispatchEvent({type:"keyShortcutChangedCellEnd"})}onEnterKeyDown(e){var c;let{cellCtrl:t,beans:o}=this,{editSvc:i,navigation:r}=o,a=i==null?void 0:i.isEditing(t,{withOpenEditor:!0}),n=t.rowNode,s=i==null?void 0:i.isRowEditing(n,{withOpenEditor:!0}),l=d=>{(i==null?void 0:i.startEditing(d,{startedEdit:!0,event:e,source:"edit"}))&&e.preventDefault()};if(a||s){if(this.isCtrlEnter(e)){i==null||i.applyBulkEdit(t,((c=o==null?void 0:o.rangeSvc)==null?void 0:c.getCellRanges())||[]);return}if(kt(o),(i==null?void 0:i.checkNavWithValidation(void 0,e))==="block-stop")return;i!=null&&i.isEditing(t,{withOpenEditor:!0})?i==null||i.stopEditing(t,{event:e,source:"edit"}):s&&!t.isCellEditable()?i==null||i.stopEditing({rowNode:n},{event:e,source:"edit"}):l(t)}else if(o.gos.get("enterNavigatesVertically")){let d=e.shiftKey?b.UP:b.DOWN;r==null||r.navigateToNextCell(null,d,t.cellPosition,!1)}else{if(i!=null&&i.hasValidationErrors())return;i!=null&&i.hasValidationErrors(t)&&i.revertSingleCellEdit(t,!0),l(t)}}isCtrlEnter(e){return(e.ctrlKey||e.metaKey)&&e.key===b.ENTER}onF2KeyDown(e){let{cellCtrl:t,beans:{editSvc:o}}=this;o!=null&&o.isEditing()&&(kt(this.beans),(o==null?void 0:o.checkNavWithValidation(void 0,e))==="block-stop")||o==null||o.startEditing(t,{startedEdit:!0,event:e})}onEscapeKeyDown(e){let{cellCtrl:t,beans:{editSvc:o}}=this;(o==null?void 0:o.checkNavWithValidation(t,e))==="block-stop"&&o.revertSingleCellEdit(t),setTimeout(()=>{o==null||o.stopEditing(t,{event:e,cancel:!0})})}processCharacter(e){var n;let o=e.target!==this.eGui,{beans:{editSvc:i},cellCtrl:r}=this;if(o||i!=null&&i.isEditing(r,{withOpenEditor:!0}))return;if(e.key===b.SPACE)this.onSpaceKeyDown(e);else if(i!=null&&i.isCellEditable(r,"ui")){if(i!=null&&i.hasValidationErrors()&&!(i!=null&&i.hasValidationErrors(r)))return;i==null||i.startEditing(r,{startedEdit:!0,event:e,source:"api",editable:!0});let s=r.editCompDetails;!((n=s==null?void 0:s.params)!=null&&n.suppressPreventDefault)&&e.preventDefault()}}onSpaceKeyDown(e){var r;let{gos:t,editSvc:o}=this.beans,{rowNode:i}=this.cellCtrl;!(o!=null&&o.isEditing(this.cellCtrl,{withOpenEditor:!0}))&&_t(t)&&((r=this.beans.selectionSvc)==null||r.handleSelectionEvent(e,i,"spaceKey")),e.preventDefault()}},f1=class extends S{constructor(e,t,o){super(),this.cellCtrl=e,this.column=o,this.beans=t}onMouseEvent(e,t){if(!ct(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);break}}onCellClicked(e){var f,m,v;if((f=this.beans.touchSvc)!=null&&f.handleCellDoubleClick(this,e))return;let{eventSvc:t,rangeSvc:o,editSvc:i,editModelSvc:r,frameworkOverrides:a,gos:n}=this.beans,s=e.ctrlKey||e.metaKey,{cellCtrl:l}=this,{column:c,cellPosition:d,rowNode:g}=l,u=qi(n,c,g,e);o&&s&&!u&&o.getCellRangeCount(d)>1&&o.intersectLastRange(!0);let h=l.createEvent(e,"cellClicked");h.isEventHandlingSuppressed=u,t.dispatchEvent(h);let p=c.getColDef();if(p.onCellClicked&&window.setTimeout(()=>{a.wrapOutgoing(()=>{p.onCellClicked(h)})},0),!u&&(r==null?void 0:r.getState(l))!=="editing"){let C=i==null?void 0:i.isEditing(),w=i==null?void 0:i.isRangeSelectionEnabledWhileEditing(),y=(m=r==null?void 0:r.getCellValidationModel().getCellValidationMap().size)!=null?m:0,x=(v=r==null?void 0:r.getRowValidationModel().getRowValidationMap().size)!=null?v:0;if(C&&(w||y>0||x>0))return;i!=null&&i.shouldStartEditing(l,e)?i==null||i.startEditing(l,{event:e}):i!=null&&i.shouldStopEditing(l,e)&&(this.beans.gos.get("editType")==="fullRow"?i==null||i.stopEditing(l,{event:e,source:"edit"}):i==null||i.stopEditing(void 0,{event:e,source:"edit"}))}}onCellDoubleClicked(e){var u,h;let{column:t,beans:o,cellCtrl:i}=this,{eventSvc:r,frameworkOverrides:a,editSvc:n,editModelSvc:s,gos:l}=o,c=qi(l,i.column,i.rowNode,e),d=t.getColDef(),g=i.createEvent(e,"cellDoubleClicked");if(g.isEventHandlingSuppressed=c,r.dispatchEvent(g),typeof d.onCellDoubleClicked=="function"&&window.setTimeout(()=>{a.wrapOutgoing(()=>{d.onCellDoubleClicked(g)})},0),!c&&n!=null&&n.shouldStartEditing(i,e)&&(s==null?void 0:s.getState(i))!=="editing"){let p=n==null?void 0:n.isEditing(),f=n==null?void 0:n.isRangeSelectionEnabledWhileEditing(),m=(u=s==null?void 0:s.getCellValidationModel().getCellValidationMap().size)!=null?u:0,v=(h=s==null?void 0:s.getRowValidationModel().getRowValidationMap().size)!=null?h:0;if(p&&(f||m>0||v>0))return;n==null||n.startEditing(i,{event:e})}}onMouseDown(e){var w;let{shiftKey:t}=e,o=e.target,{cellCtrl:i,beans:r}=this,{eventSvc:a,rangeSvc:n,rowNumbersSvc:s,focusSvc:l,gos:c,editSvc:d}=r,{column:g,rowNode:u,cellPosition:h}=i,p=qi(c,g,u,e),f=()=>{let y=i.createEvent(e,"cellMouseDown");y.isEventHandlingSuppressed=p,a.dispatchEvent(y)};if(p){f();return}if(this.isRightClickInExistingRange(e))return;let m=n&&!n.isEmpty(),v=this.containsWidget(o),C=pe(g);if(!(s&&C&&!s.handleMouseDownOnCell(h,e))){if(!t||!m){let y=d==null?void 0:d.isEditing(i),R=c.get("enableCellTextSelection")&&e.defaultPrevented,F=(zt()||R)&&!y&&!$o(o)&&!v;i.focusCell(F,e)}if(t&&m&&!l.isCellFocused(h)){e.preventDefault();let y=l.getFocusedCell();if(y){let{column:x,rowIndex:R,rowPinned:F}=y,P=!!((w=d==null?void 0:d.isRangeSelectionEnabledWhileEditing)!=null&&w.call(d));d!=null&&d.isEditing(y)&&!P&&(d==null||d.stopEditing(y)),P||l.setFocusedCell({column:x,rowIndex:R,rowPinned:F,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,sourceEvent:e})}}v||(n==null||n.handleCellMouseDown(e,h),f())}}isRightClickInExistingRange(e){let{rangeSvc:t}=this.beans;if(t){let o=t.isCellInAnyRange(this.cellCtrl.cellPosition),i=Bh(this.beans,e);if(o&&i)return!0}return!1}containsWidget(e){return qt(e,"ag-selection-checkbox",3)||qt(e,"ag-drag-handle",3)}onMouseOut(e){if(this.mouseStayingInsideCell(e))return;let{eventSvc:t,colHover:o}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOut")),o==null||o.clearMouseOver()}onMouseOver(e){if(this.mouseStayingInsideCell(e))return;let{eventSvc:t,colHover:o}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOver")),o==null||o.setMouseOver([this.column])}mouseStayingInsideCell(e){if(!e.target||!e.relatedTarget)return!1;let t=this.cellCtrl.eGui,o=t.contains(e.target),i=t.contains(e.relatedTarget);return o&&i}},m1=class extends S{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;let e=this.cellCtrl.getCellSpan();if(e||(this.setupColSpan(),this.setupRowSpan()),this.onLeftChanged(),this.onWidthChanged(),e||this._legacyApplyRowSpan(),e){let t=this.refreshSpanHeight.bind(this,e);t(),this.addManagedListeners(this.beans.eventSvc,{paginationChanged:t,recalculateRowBounds:t,pinnedHeightChanged:t})}}refreshSpanHeight(e){let t=e.getCellHeight();t!=null&&(this.eContent.style.height=`${t}px`)}onNewColumnsLoaded(){let e=this.column.getRowSpan(this.rowNode);this.rowSpan!==e&&(this.rowSpan=e,this._legacyApplyRowSpan(!0))}onDisplayColumnsChanged(){let e=this.getColSpanningList();It(this.colsSpanning,e)||(this.colsSpanning=e,this.onWidthChanged(),this.onLeftChanged())}setupColSpan(){this.column.getColDef().colSpan!=null&&(this.colsSpanning=this.getColSpanningList(),this.addManagedListeners(this.beans.eventSvc,{displayedColumnsChanged:this.onDisplayColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onWidthChanged.bind(this)}))}onWidthChanged(){if(!this.eContent)return;let 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(){let{column:e,rowNode:t}=this,o=e.getColSpan(t),i=[];if(o===1)i.push(e);else{let r=e,a=e.getPinned();for(let n=0;r&&nthis.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,n),this.refreshFirstAndLastStyles(),this.checkFormulaError(),this.refreshAriaRowIndex(),this.refreshAriaColIndex(),(c=this.positionFeature)==null||c.init(),(d=this.customStyleFeature)==null||d.setComp(e),(g=this.editStyleFeature)==null||g.setComp(e),(u=this.tooltipFeature)==null||u.refreshTooltip(),(h=this.keyboardListener)==null||h.init(),(p=this.rangeFeature)==null||p.setComp(e),(f=this.rowResizeFeature)==null||f.refreshRowResizer();let s=a?this.isCellEditable():void 0,l=!s&&this.hasEdit&&((m=this.editSvc)==null?void 0:m.isEditing(this,{withOpenEditor:!0}));if(s||l?(v=this.editSvc)==null||v.startEditing(this,{startedEdit:!1,source:"api",silent:!0,continueEditing:!0,editable:s}):this.showValue(!1,!0),this.onCompAttachedFuncs.length){for(let C of this.onCompAttachedFuncs)C();this.onCompAttachedFuncs=[]}}checkFormulaError(){var t;let e=!!((t=this.beans.formula)!=null&&t.getFormulaError(this.column,this.rowNode));this.eGui.classList.toggle("formula-error",e)}setupAutoHeight(e,t){var o,i;this.isAutoHeight=(i=(o=this.beans.rowAutoHeight)==null?void 0:o.setupCellAutoHeight(this,e,t))!=null?i:!1}getCellAriaRole(){var e;return(e=this.column.getColDef().cellAriaRole)!=null?e:"gridcell"}isCellRenderer(){let e=this.column.getColDef();return e.cellRenderer!=null||e.cellRendererSelector!=null}getValueToDisplay(){var e;return(e=this.valueFormatted)!=null?e:this.value}getDeferLoadingCellRenderer(){var l,c;let{beans:e,column:t}=this,{userCompFactory:o,ctrlsSvc:i,eventSvc:r}=e,a=t.getColDef(),n=this.createCellRendererParams();n.deferRender=!0;let s=Ms(o,a,n);if((c=(l=i.getGridBodyCtrl())==null?void 0:l.scrollFeature)!=null&&c.isScrolling()){let d,g=new $(h=>{d=h}),[u]=this.addManagedListeners(r,{bodyScrollEnd:()=>{d(),u()}});return{loadingComp:s,onReady:g}}return{loadingComp:s,onReady:$.resolve()}}showValue(e,t){var g,u,h,p;let{beans:o,column:i,rowNode:r,rangeFeature:a}=this,{userCompFactory:n}=o,s=this.getValueToDisplay(),l,c=r.stub&&((g=r.groupData)==null?void 0:g[i.getId()])==null,d=i.getColDef();if(c||this.isCellRenderer()){let f=this.createCellRendererParams();!c||pe(i)?l=Ds(n,d,f):l=Ms(n,d,f)}if(!l&&!c&&((u=o.findSvc)!=null&&u.isMatch(r,i))){let f=this.createCellRendererParams();l=Ds(n,{...i.getColDef(),cellRenderer:"agFindCellRenderer"},f)}if(this.hasEdit&&this.editSvc.isBatchEditing()&&this.editSvc.isRowEditing(r,{checkSiblings:!0})){let f=this.editSvc.prepDetailsDuringBatch(this,{compDetails:l,valueToDisplay:s});f&&(f.compDetails?l=f.compDetails:f.valueToDisplay&&(s=f.valueToDisplay))}this.comp.setRenderDetails(l,s,e),(h=this.customRowDragComp)==null||h.refreshVisibility(),!t&&a&&ht(o,()=>a==null?void 0:a.refreshRangeStyleAndHandle()),(p=this.rowResizeFeature)==null||p.refreshRowResizer()}setupControlComps(){let 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="ag-cell-value",t=this.column.getColDef().cellRenderer==="agCheckboxCellRenderer",o="";return t&&(o=" ag-allow-overflow"),`${e}${o}`}isIncludeControl(e,t=!1){return(this.rowNode.rowPinned==null||t&&Mr(this.rowNode))&&!!e}isCheckboxSelection(e){let{rowSelection:t,groupDisplayType:o}=this.beans.gridOptions,i=tr(t),r=At(this.column);return o==="custom"&&i!=="selectionColumn"&&r?!1:e.checkboxSelection||r&&typeof t=="object"&&yo(t)}refreshShouldDestroy(){let 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),r=this.isAutoHeight!=this.column.isAutoHeight();return t||o||i||r}onPopupEditorClosed(e){let{editSvc:t}=this.beans;if(!(t!=null&&t.isEditing(this,{withOpenEditor:!0})))return;let o=e instanceof KeyboardEvent,i=e instanceof MouseEvent,r=o&&e.key===b.ESCAPE;t.stopEditing(this,{source:t.isBatchEditing()?"ui":"api",cancel:r,event:o||i?e:void 0}),r&&this.focusCell(!0,e)}stopEditing(e=!1){var o;let{editSvc:t}=this.beans;return(o=t==null?void 0:t.stopEditing(this,{cancel:e,source:t!=null&&t.isBatchEditing()?"ui":"api"}))!=null?o:!1}createCellRendererParams(){let{value:e,valueFormatted:t,column:o,rowNode:i,comp:r,eGui:a,beans:{valueSvc:n,gos:s,editSvc:l}}=this;return O(s,{value:e,valueFormatted:t,getValue:()=>n.getValueForDisplay({column:o,node:i,from:"edit"}).value,setValue:d=>(l==null?void 0:l.setDataValue({rowNode:i,column:o},d))||i.setDataValue(o,d),formatValue:this.formatValue.bind(this),data:i.data,node:i,pinned:o.getPinned(),colDef:o.getColDef(),column:o,refreshCell:this.refreshCell.bind(this),eGridCell:a,eParentOfValue:r.getParentOfValue(),registerRowDragger:(d,g,u,h)=>this.registerRowDragger(d,g,h),setTooltip:(d,g)=>{var u;s.assertModuleRegistered("Tooltip",3),this.tooltipFeature&&this.disableTooltipFeature(),this.enableTooltipFeature(d,g),(u=this.tooltipFeature)==null||u.refreshTooltip()}})}onCellChanged(e){e.column===this.column&&this.refreshCell()}refreshOrDestroyCell(e){var t;if(this.refreshShouldDestroy()?(t=this.rowCtrl)==null||t.recreateCell(this):this.refreshCell(e),this.hasEdit&&this.editCompDetails){let{editSvc:o,comp:i}=this;!(i!=null&&i.getCellEditor())&&o.isEditing(this,{withOpenEditor:!0})&&o.startEditing(this,{startedEdit:!1,source:"api",silent:!0})}}refreshCell(e){var y,x;let{editStyleFeature:t,customStyleFeature:o,rowCtrl:{rowEditStyleFeature:i},beans:{cellFlashSvc:r,filterManager:a},column:n,comp:s,suppressRefreshCell:l,tooltipFeature:c}=this;if(l)return;let{field:d,valueGetter:g,showRowGroup:u,enableCellChangeFlash:h}=n.getColDef(),p=d==null&&g==null&&u==null,f=(y=e==null?void 0:e.newData)!=null?y:!1,m=p||e&&(e.force||f),v=!!s,C=this.updateAndFormatValue(v),w=m||C;if(v){if(w){this.showValue(!!f,!1);let R=a==null?void 0:a.isSuppressFlashingCellsBecauseFiltering();!(e!=null&&e.suppressFlash)&&!R&&h&&(r==null||r.flashCell(this)),(x=t==null?void 0:t.applyCellStyles)==null||x.call(t),o==null||o.applyUserStyles(),o==null||o.applyClassesFromColDef(),i==null||i.applyRowStyles(),this.checkFormulaError()}c==null||c.refreshTooltip(),o==null||o.applyCellClassRules()}}isCellEditable(){return this.column.isCellEditable(this.rowNode)}formatValue(e){var t;return(t=this.callValueFormatter(e))!=null?t:e}callValueFormatter(e){return this.beans.valueSvc.formatValue(this.column,this.rowNode,e)}updateAndFormatValue(e){let t=this.value,o=this.valueFormatted,{value:i,valueFormatted:r}=this.beans.valueSvc.getValueForDisplay({column:this.column,node:this.rowNode,includeValueFormatted:!0,from:"edit"});return this.value=i,this.valueFormatted=r,e?!this.valuesAreEqual(t,this.value)||this.valueFormatted!=o:!0}valuesAreEqual(e,t){let o=this.column.getColDef();return o.equals?o.equals(e,t):e===t}addDomData(e){let t=this.eGui;Zt(this.beans.gos,t,cr,this),e.addDestroyFunc(()=>Zt(this.beans.gos,t,cr,null))}createEvent(e,t){let{rowNode:o,column:i,value:r,beans:a}=this;return u1(a,e,t,{rowNode:o,column:i},r)}processCharacter(e){var t;(t=this.keyboardListener)==null||t.processCharacter(e)}onKeyDown(e){var t;(t=this.keyboardListener)==null||t.onKeyDown(e)}onMouseEvent(e,t){var o;(o=this.mouseListener)==null||o.onMouseEvent(e,t)}getColSpanningList(){var e,t;return(t=(e=this.positionFeature)==null?void 0:e.getColSpanningList())!=null?t:[]}onLeftChanged(){var e;this.comp&&((e=this.positionFeature)==null||e.onLeftChanged())}onDisplayedColumnsChanged(){this.eGui&&(this.refreshAriaColIndex(),this.refreshFirstAndLastStyles())}refreshFirstAndLastStyles(){let{comp:e,column:t,beans:o}=this;hd(e,t,o.visibleCols)}refreshAriaColIndex(){let e=this.beans.visibleCols.getAriaColIndex(this.column);ac(this.eGui,e)}onWidthChanged(){var e;return(e=this.positionFeature)==null?void 0:e.onWidthChanged()}getRowPosition(){let{rowIndex:e,rowPinned:t}=this.cellPosition;return{rowIndex:e,rowPinned:t}}updateRangeBordersIfRangeCount(){var e;this.comp&&((e=this.rangeFeature)==null||e.updateRangeBordersIfRangeCount())}onCellSelectionChanged(){var e;this.comp&&((e=this.rangeFeature)==null||e.onCellSelectionChanged())}isRangeSelectionEnabled(){return this.rangeFeature!=null}focusCell(e=!1,t){var i;let o=(i=this.editSvc)==null?void 0:i.allowedFocusTargetOnValidation(this);o&&o!==this||this.beans.focusSvc.setFocusedCell({...this.getFocusedCellPosition(),forceBrowserFocus:e,sourceEvent:t})}restoreFocus(e=!1){let{beans:{editSvc:t,focusSvc:o},comp:i}=this;if(!i||t!=null&&t.isEditing(this)||!this.isCellFocused()||!o.shouldTakeFocus())return;let r=()=>{if(!this.isAlive())return;let a=i.getFocusableElement();this.isCellFocused()&&a.focus({preventScroll:!0})};if(e){setTimeout(r,0);return}r()}onRowIndexChanged(){var e,t;this.createCellPosition(),this.refreshAriaRowIndex(),this.onCellFocused(),this.restoreFocus(),(e=this.rangeFeature)==null||e.onCellSelectionChanged(),(t=this.rowResizeFeature)==null||t.refreshRowResizer()}onSuppressCellFocusChanged(e){let t=this.eGui;t&&we(t,"tabindex",e?void 0:-1)}onFirstRightPinnedChanged(){if(!this.comp)return;let e=this.column.isFirstRightPinned();this.comp.toggleCss(y1,e)}onLastLeftPinnedChanged(){if(!this.comp)return;let e=this.column.isLastLeftPinned();this.comp.toggleCss(S1,e)}checkCellFocused(){return this.beans.focusSvc.isCellFocused(this.cellPosition)}isCellFocused(){let e=this.checkCellFocused();return this.hasBeenFocused||(this.hasBeenFocused=e),e}setupFocus(){var e;this.restoreFocus(!0),this.onCellFocused((e=this.focusEventWhileNotReady)!=null?e:void 0)}onCellFocused(e){var r,a;let{beans:t}=this;if(hi(t))return;if(!this.comp){e&&(this.focusEventWhileNotReady=e);return}let o=this.isCellFocused(),i=(a=(r=t.editSvc)==null?void 0:r.isEditing(this))!=null?a:!1;if(this.comp.toggleCss(b1,o),o&&(e!=null&&e.forceBrowserFocus||!this.hasBrowserFocus()&&this.beans.focusSvc.shouldTakeFocus())){let n=this.comp.getFocusableElement();if(i){let l=Kt(n,null,!0);l.length&&(n=l[0])}let s=e?e.preventScrollOnBrowserFocus:!0;n.focus({preventScroll:s}),Gu(t,n)}o&&this.focusEventWhileNotReady&&(this.focusEventWhileNotReady=null),o&&e&&this.rowCtrl.announceDescription()}createCellPosition(){let{rowIndex:e,rowPinned:t}=this.rowNode;this.cellPosition={rowIndex:e,rowPinned:st(t),column:this.column}}applyStaticCssClasses(){let{comp:e}=this;e.toggleCss(v1,!0),e.toggleCss(x1,!0);let t=this.column.isAutoHeight()==!0;e.toggleCss(C1,t),e.toggleCss(w1,!t)}onColumnHover(){var e;(e=this.beans.colHover)==null||e.onCellColumnHover(this.column,this.comp)}onColDefChanged(){var e,t;this.comp&&(this.column.isTooltipEnabled()?(this.disableTooltipFeature(),this.enableTooltipFeature()):this.disableTooltipFeature(),this.setWrapText(),(e=this.editSvc)!=null&&e.isEditing(this)?(t=this.editSvc)==null||t.handleColDefChanged(this):this.refreshOrDestroyCell({force:!0,suppressFlash:!0}))}setWrapText(){let e=this.column.getColDef().wrapText==!0;this.comp.toggleCss(k1,e)}dispatchCellContextMenuEvent(e){let 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(){var e,t;return(t=(e=this.comp)==null?void 0:e.getCellRenderer())!=null?t:null}destroy(){this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.isCellFocused()&&this.hasBrowserFocus()&&this.beans.focusSvc.attemptToRecoverFocus(),super.destroy()}hasBrowserFocus(){var e,t;return(t=(e=this.eGui)==null?void 0:e.contains(Y(this.beans)))!=null?t:!1}createSelectionCheckbox(){var t;let e=(t=this.beans.selectionSvc)==null?void 0:t.createCheckboxSelectionComponent();if(e)return this.beans.context.createBean(e),e.init({rowNode:this.rowNode,column:this.column}),e}createDndSource(){let 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){this.customRowDragComp.setDragElement(e,t);return}let 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){var r;let i=(r=this.beans.rowDragSvc)==null?void 0:r.createRowDragCompForCell(this.rowNode,this.column,()=>this.value,e,t,o);if(i)return this.beans.context.createBean(i),i}cellEditorAttached(){for(let e of this.onEditorAttachedFuncs)e();this.onEditorAttachedFuncs=[]}setFocusedCellPosition(e){}getFocusedCellPosition(){return this.cellPosition}refreshAriaRowIndex(){if(!pe(this.column)||!this.eGui)return;let{ariaRowIndex:e}=this.rowCtrl;e!=null&&ri(this.eGui,e)}getRootElement(){return this.eGui}};function Kn(e,t,o,i,r,a){if(o==null&&t==null)return;let n={},s={},l=(c,d)=>{for(let g of c.split(" "))g.trim()!=""&&d(g)};if(o){let c=Object.keys(o);for(let d=0;d{h?n[p]=!0:s[p]=!0})}}if(t&&a)for(let c of Object.keys(t))l(c,d=>{n[d]||(s[d]=!0)});a&&Object.keys(s).forEach(a),Object.keys(n).forEach(r)}function yl(e){if(e.group)return e.level;let t=e.parent;return t?t.level+1:0}var E1=class extends S{constructor(){super(...arguments),this.beanName="rowStyleSvc"}processClassesFromGridOptions(e,t){let o=this.gos,i=n=>{if(typeof n=="string")e.push(n);else if(Array.isArray(n))for(let s of n)e.push(s)},r=o.get("rowClass");r&&i(r);let a=o.getCallback("getRowClass");if(a){let n={data:t.data,node:t,rowIndex:t.rowIndex},s=a(n);i(s)}}preProcessRowClassRules(e,t){this.processRowClassRules(t,o=>{e.push(o)},()=>{})}processRowClassRules(e,t,o){let{gos:i,expressionSvc:r}=this.beans,a=O(i,{data:e.data,node:e,rowIndex:e.rowIndex});Kn(r,void 0,i.get("rowClassRules"),a,t,o)}processStylesFromGridOptions(e){let t=this.gos,o=t.get("rowStyle"),i=t.getCallback("getRowStyle"),r;if(i){let a={data:e.data,node:e,rowIndex:e.rowIndex};r=i(a)}if(r||o)return Object.assign({},o,r)}},F1=0,mr=class extends S{constructor(e,t,o,i,r){var a,n,s;super(),this.rowNode=e,this.useAnimationFrameForCreate=i,this.printLayout=r,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.ariaRowIndex=null,this.businessKey=null,this.beans=t,this.gos=t.gos,this.paginationPage=(n=(a=t.pagination)==null?void 0:a.getCurrentPage())!=null?n:0,this.suppressRowTransform=this.gos.get("suppressRowTransform"),this.instanceId=e.id+"-"+F1++,this.rowId=Ko(e.id),this.initRowBusinessKey(),this.rowFocused=t.focusSvc.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=yl(this.rowNode),this.setRowType(),this.setAnimateFlags(o),this.rowStyles=this.processStylesFromGridOptions(),this.rowEditStyleFeature=(s=t.editSvc)==null?void 0:s.createRowStyleFeature(this),this.addListeners()}initRowBusinessKey(){this.businessKeyForNodeFunc=this.gos.get("getBusinessKeyForNode"),this.updateRowBusinessKey()}updateRowBusinessKey(){if(typeof this.businessKeyForNodeFunc!="function")return;let e=this.businessKeyForNodeFunc(this.rowNode);this.businessKey=Ko(e)}updateGui(e,t){e==="left"?this.leftGui=t:e==="right"?this.rightGui=t:e==="fullWidth"?this.fullWidthGui=t:this.centerGui=t}setComp(e,t,o,i){let{context:r,rowRenderer:a}=this.beans;i=wi(this,r,i);let n={rowComp:e,element:t,containerType:o,compBean:i};this.allRowGuis.push(n),this.updateGui(o,n),this.initialiseRowComp(n);let s=this.rowNode,l=this.rowType==="FullWidthLoading"||s.stub,c=!s.data&&this.beans.rowModel.getType()==="infinite";!l&&!c&&!s.rowPinned&&a.dispatchFirstDataRenderedEvent(),this.setupFocus()}unsetComp(e){this.allRowGuis=this.allRowGuis.filter(t=>t.containerType!==e),this.updateGui(e,void 0)}isCacheable(){return this.rowType==="FullWidthDetail"&&this.gos.get("keepDetailRows")}setCached(e){let t=e?"none":"";for(let o of this.allRowGuis)o.element.style.display=t}initialiseRowComp(e){let 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),_t(t)&&this.rowNode.selectable&&this.onRowSelected(e),this.updateColumnLists(!this.useAnimationFrameForCreate);let o=e.rowComp,i=this.getInitialRowClasses(e.containerType);for(let r of i)o.toggleCss(r,!0);this.executeSlideAndFadeAnimations(e),this.rowNode.group&&xa(e.element,!!this.rowNode.expanded),this.setRowCompRowId(o),this.setRowCompRowBusinessKey(o),Zt(t,e.element,dr,this),e.compBean.addDestroyFunc(()=>Zt(t,e.element,dr,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){this.businessKey!=null&&e.setRowBusinessKey(this.businessKey)}setRowCompRowId(e){let t=Ko(this.rowNode.id);this.rowId=t,t!=null&&e.setRowId(t)}executeSlideAndFadeAnimations(e){let{containerType:t}=e;this.slideInAnimation[t]&&(Ra(()=>{this.onTopChanged()}),this.slideInAnimation[t]=!1),this.fadeInAnimation[t]&&(Ra(()=>{e.rowComp.toggleCss("ag-opacity-zero",!1)}),this.fadeInAnimation[t]=!1)}addRowDraggerToRow(e){var i;let t=(i=this.beans.rowDragSvc)==null?void 0:i.createRowDragCompForRow(this.rowNode,e.element);if(!t)return;let o=this.createBean(t,this.beans.context);this.rowDragComps.push(o),e.compBean.addDestroyFunc(()=>{this.rowDragComps=this.rowDragComps.filter(r=>r!==o),this.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,this.beans.context),this.destroyBean(o,this.beans.context)})}setupFullWidth(e){let t=this.getPinnedForContainer(e.containerType),o=this.createFullWidthCompDetails(e.element,t);e.rowComp.showFullWidth(o)}getFullWidthCellRenderers(){var e,t;return this.gos.get("embedFullWidthRows")?this.allRowGuis.map(o=>{var i;return(i=o==null?void 0:o.rowComp)==null?void 0:i.getFullWidthCellRenderer()}):[(t=(e=this.fullWidthGui)==null?void 0:e.rowComp)==null?void 0:t.getFullWidthCellRenderer()]}executeProcessRowPostCreateFunc(){let e=this.gos.getCallback("processRowPostCreate");if(!e||!this.areAllContainersReady())return;let t={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)};e(t)}areAllContainersReady(){let{leftGui:e,centerGui:t,rightGui:o,beans:{visibleCols:i}}=this,r=!!e||!i.isPinningLeft(),a=!!t,n=!!o||!i.isPinningRight();return r&&a&&n}isNodeFullWidthCell(){if(this.rowNode.detail)return!0;let e=this.beans.gos.getCallback("isFullWidthRow");return e?e({rowNode:this.rowNode}):!1}setRowType(){let{rowNode:e,gos:t,beans:{colModel:o}}=this,i=e.stub&&!t.get("suppressServerSideFullWidthLoadingRow")&&!t.get("groupHideOpenParents"),r=this.isNodeFullWidthCell(),a=t.get("masterDetail")&&e.detail,n=o.isPivotMode(),s=Ac(t,e,n);i?this.rowType="FullWidthLoading":a?this.rowType="FullWidthDetail":r?this.rowType="FullWidth":s?this.rowType="FullWidthGroup":this.rowType="Normal"}updateColumnLists(e=!1,t=!1){if(this.isFullWidth())return;let{animationFrameSvc:o}=this.beans;if(!(o!=null&&o.active)||e||this.printLayout){this.updateColumnListsImpl(t);return}this.updateColumnListsPending||(o.createTask(()=>{this.active&&this.updateColumnListsImpl(!0)},this.rowNode.rowIndex,"p1",!1),this.updateColumnListsPending=!0)}getNewCellCtrl(e){var o;if(!((o=this.beans.rowSpanSvc)!=null&&o.isCellSpanning(e,this.rowNode)))return new Eo(e,this.rowNode,this.beans,this)}isCorrectCtrlForSpan(e){var t;return!((t=this.beans.rowSpanSvc)!=null&&t.isCellSpanning(e.column,this.rowNode))}createCellCtrls(e,t,o=null){let i={list:[],map:{}},r=(c,d,g)=>{g!=null?i.list.splice(g,0,d):i.list.push(d),i.map[c]=d},a=[];for(let c of t){let d=c.getInstanceId(),g=e.map[d];g&&!this.isCorrectCtrlForSpan(g)&&(g.destroy(),g=void 0),g||(g=this.getNewCellCtrl(c)),g&&r(d,g)}for(let c of e.list){let d=c.column.getInstanceId();if(i.map[d]!=null)continue;!this.isCellEligibleToBeRemoved(c,o)?a.push([d,c]):c.destroy()}if(a.length)for(let[c,d]of a){let g=i.list.findIndex(h=>h.column.getLeft()>d.column.getLeft()),u=g===-1?void 0:Math.max(g-1,0);r(c,d,u)}let{focusSvc:n,visibleCols:s}=this.beans,l=n.getFocusedCell();if(l&&l.column.getPinned()==o){let c=l.column.getInstanceId();if(!i.map[c]&&s.allCols.includes(l.column)){let g=this.createFocusedCellCtrl();if(g){let u=i.list.findIndex(p=>p.column.getLeft()>g.column.getLeft()),h=u===-1?void 0:Math.max(u-1,0);r(c,g,h)}}}return i}createFocusedCellCtrl(){let{focusSvc:e,rowSpanSvc:t}=this.beans,o=e.getFocusedCell();if(!o)return;let i=t==null?void 0: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(let t of this.allRowGuis){let 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(){let 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{let o=e.getColsWithinViewport(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,o);let i=t.getLeftColsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,i,"left");let r=t.getRightColsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,r,"right")}}isCellEligibleToBeRemoved(e,t){let{column:r}=e;if(r.getPinned()!=t||!this.isCorrectCtrlForSpan(e))return!0;let{visibleCols:a,editSvc:n}=this.beans,s=n==null?void 0:n.isEditing(e),l=e.isCellFocused();return s||l?!(a.allCols.indexOf(r)>=0):!0}getDomOrder(){return this.gos.get("ensureDomOrder")||se(this.gos,"print")}listenOnDomOrder(e){let t=()=>{e.rowComp.setDomOrder(this.getDomOrder())};e.compBean.addManagedPropertyListeners(["domLayout","ensureDomOrder"],t)}setAnimateFlags(e){if(this.rowNode.sticky||!e)return;let t=M(this.rowNode.oldRowTop),{visibleCols:o}=this.beans,i=o.isPinningLeft(),r=o.isPinningRight();if(t){let{slideInAnimation:a}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){a.fullWidth=!0;return}a.center=!0,a.left=i,a.right=r}else{let{fadeInAnimation:a}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){a.fullWidth=!0;return}a.center=!0,a.left=i,a.right=r}}isFullWidth(){return this.rowType!=="Normal"}refreshFullWidth(){let e=(n,s)=>n?n.rowComp.refreshFullWidth(()=>this.createFullWidthCompDetails(n.element,s).params):!0,t=e(this.fullWidthGui,null),o=e(this.centerGui,null),i=e(this.leftGui,"left"),r=e(this.rightGui,"right");return t&&o&&i&&r}addListeners(){var s;let{beans:e,gos:t,rowNode:o}=this,{expansionSvc:i,eventSvc:r,context:a,rowSpanSvc:n}=e;this.addManagedListeners(this.rowNode,{heightChanged:()=>this.onRowHeightChanged(),rowSelected:()=>this.onRowSelected(),rowIndexChanged:this.onRowIndexChanged.bind(this),topChanged:this.onTopChanged.bind(this),...(s=i==null?void 0:i.getRowExpandedListeners(this))!=null?s:{}}),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(r,{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()}),n&&this.addManagedListeners(n,{spannedCellsUpdated:({pinned:l})=>{l&&!o.rowPinned||this.updateColumnLists()}}),this.addDestroyFunc(()=>{this.rowDragComps=this.destroyBeans(this.rowDragComps,a),this.tooltipFeature=this.destroyBean(this.tooltipFeature,a),this.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,a)}),this.addManagedPropertyListeners(["rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules"],this.postProcessCss.bind(this)),this.addManagedPropertyListener("rowDragEntireRow",()=>{if(t.get("rowDragEntireRow")){for(let c of this.allRowGuis)this.addRowDraggerToRow(c);return}this.rowDragComps=this.destroyBeans(this.rowDragComps,a)}),this.addListenersForCellComps()}addListenersForCellComps(){this.addManagedListeners(this.rowNode,{rowIndexChanged:()=>{for(let e of this.getAllCellCtrls())e.onRowIndexChanged()},cellChanged:e=>{for(let t of this.getAllCellCtrls())t.onCellChanged(e)}})}onRowPinned(){for(let 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);return}if(this.isFullWidth()){this.refreshFullWidth()||this.beans.rowRenderer.redrawRow(this.rowNode);return}for(let o of this.getAllCellCtrls())o.refreshCell(e);for(let o of this.allRowGuis)this.setRowCompRowId(o.rowComp),this.updateRowBusinessKey(),this.setRowCompRowBusinessKey(o.rowComp);this.onRowSelected(),this.postProcessCss()}postProcessCss(){var e;this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),(e=this.rowEditStyleFeature)==null||e.applyRowStyles(),this.postProcessRowDragging()}onRowNodeHighlightChanged(){let e=this.beans.rowDropHighlightSvc,t=(e==null?void 0:e.row)===this.rowNode?e.position:"none",o=t==="above",i=t==="inside",r=t==="below",a=t!=="none",n=o||r,s=this.rowNode.uiLevel,l=n&&s>0,c=l?s.toString():"0";for(let d of this.allRowGuis){let g=d.rowComp;g.toggleCss("ag-row-highlight-above",o),g.toggleCss("ag-row-highlight-inside",i),g.toggleCss("ag-row-highlight-below",r),g.toggleCss("ag-row-highlight-indent",l),a?d.element.style.setProperty("--ag-row-highlight-level",c):d.element.style.removeProperty("--ag-row-highlight-level")}}postProcessRowDragging(){let e=this.rowNode.dragging;for(let t of this.allRowGuis)t.rowComp.toggleCss("ag-row-dragging",e)}onDisplayedColumnsChanged(){var e;this.updateColumnLists(!0),(e=this.beans.rowAutoHeight)==null||e.requestCheckAutoHeight()}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0)}getRowPosition(){return{rowPinned:st(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}}onKeyboardNavigate(e){var g;let t=this.findFullWidthInfoForEvent(e);if(!t)return;let{rowGui:o,column:i}=t;if(!(o.element===e.target))return;let n=this.rowNode,{focusSvc:s,navigation:l}=this.beans,c=s.getFocusedCell(),d={rowIndex:n.rowIndex,rowPinned:n.rowPinned,column:(g=c==null?void 0:c.column)!=null?g:i};l==null||l.navigateToNextCell(e,e.key,d,!0),e.preventDefault()}onTabKeyDown(e){var s;if(e.defaultPrevented||ct(e))return;let t=this.allRowGuis.find(l=>l.element.contains(e.target)),o=t?t.element:null,i=o===e.target,r=Y(this.beans),a=!1;o&&r&&(a=o.contains(r)&&r.classList.contains("ag-cell"));let n=null;!i&&!a&&(n=no(this.beans,o,!1,e.shiftKey)),(this.isFullWidth()&&i||!n)&&((s=this.beans.navigation)==null||s.onTabKeyDown(this,e))}getFullWidthElement(){return this.fullWidthGui?this.fullWidthGui.element:null}getRowYPosition(){var t;let e=(t=this.allRowGuis.find(o=>Ie(o.element)))==null?void 0:t.element;return e?e.getBoundingClientRect().top:0}onSuppressCellFocusChanged(e){let t=this.isFullWidth()&&e?void 0:this.gos.get("tabIndex");for(let o of this.allRowGuis)we(o.element,"tabindex",t)}setupFocus(){var e;this.isFullWidth()&&(this.restoreFullWidthFocus(!0),this.onFullWidthRowFocused((e=this.focusEventWhileNotReady)!=null?e:void 0))}restoreFullWidthFocus(e=!1){let{focusSvc:t,editSvc:o}=this.beans;if(o!=null&&o.isEditing(this)||!t.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned)||!t.shouldTakeFocus())return;let i=this.getFullWidthRowGuiForFocus();if(!i)return;let r=()=>{this.isAlive()&&t.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned)&&i.element.focus({preventScroll:!0})};if(e){setTimeout(r,0);return}r()}getFullWidthRowGuiForFocus(e){var r;if(this.fullWidthGui)return this.fullWidthGui;let t=this.beans.focusSvc.getFocusedCell(),o=this.beans.colModel.getCol((r=e==null?void 0:e.column)!=null?r:t==null?void 0:t.column);if(!o)return;let i=o==null?void 0:o.pinned;return i==="right"?this.rightGui:i==="left"?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){let{focusSvc:t}=this.beans;if(!(this.isFullWidth()&&t.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned))){this.setFullWidthRowFocusedClass(void 0,!1);return}let i=this.getFullWidthRowGuiForFocus(e);if(!i){e&&(this.focusEventWhileNotReady=e),this.setFullWidthRowFocusedClass(void 0,!1);return}this.setFullWidthRowFocusedClass(i,!0),this.focusEventWhileNotReady=null,e!=null&&e.forceBrowserFocus&&i.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){let o={list:[],map:{}};for(let 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);break}}createRowEvent(e,t){let{rowNode:o}=this;return O(this.gos,{type:e,node:o,data:o.data,rowIndex:o.rowIndex,rowPinned:o.rowPinned,event:t})}createRowEventWithSource(e,t){let o=this.createRowEvent(e,t);return o.source=this,o}onRowDblClick(e){if(ct(e))return;let t=this.createRowEventWithSource("rowDoubleClicked",e);t.isEventHandlingSuppressed=this.isSuppressMouseEvent(e),this.beans.eventSvc.dispatchEvent(t)}findFullWidthInfoForEvent(e){if(!e)return;let t=this.findFullWidthRowGui(e.target),o=this.getColumnForFullWidth(t);if(!(!t||!o))return{rowGui:t,column:o}}findFullWidthRowGui(e){return this.allRowGuis.find(t=>t.element.contains(e))}getColumnForFullWidth(e){let{visibleCols:t}=this.beans;switch(e==null?void 0: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=qt(e.target,"ag-row-drag",3),!this.isFullWidth()||this.isSuppressMouseEvent(e))return;let{rangeSvc:t,focusSvc:o}=this.beans;t==null||t.removeAllCellRanges();let i=this.findFullWidthInfoForEvent(e);if(!i)return;let{rowGui:r,column:a}=i,n=r.element,s=e.target,l=this.rowNode,c=e.defaultPrevented||zt();n&&n.contains(s)&&$o(s)&&(c=!1),o.setFocusedCell({rowIndex:l.rowIndex,column:a,rowPinned:l.rowPinned,forceBrowserFocus:c})}isSuppressMouseEvent(e){let{gos:t,rowNode:o}=this;if(this.isFullWidth()){let r=this.findFullWidthRowGui(e.target);return wm(t,r==null?void 0:r.rowComp.getFullWidthCellRendererParams(),o,e)}let i=Bn(t,e.target);return i!=null&&qi(t,i.column,o,e)}onRowClick(e){if(ct(e)||this.lastMouseDownOnDragger)return;let o=this.isSuppressMouseEvent(e),{eventSvc:i,selectionSvc:r}=this.beans,a=this.createRowEventWithSource("rowClicked",e);a.isEventHandlingSuppressed=o,i.dispatchEvent(a),!o&&(r==null||r.handleSelectionEvent(e,this.rowNode,"rowClicked"))}setupDetailRowAutoHeight(e){var t;this.rowType==="FullWidthDetail"&&((t=this.beans.masterDetailSvc)==null||t.setupDetailRowAutoHeight(this,e))}createFullWidthCompDetails(e,t){let{gos:o,rowNode:i}=this,r=O(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:(n,s,l,c)=>this.addFullWidthRowDragging(n,s,l,c),setTooltip:(n,s)=>{o.assertModuleRegistered("Tooltip",3),this.setupFullWidthRowTooltip(n,s)}}),a=this.beans.userCompFactory;switch(this.rowType){case"FullWidthDetail":return Vp(a,r);case"FullWidthGroup":{let{value:n,valueFormatted:s}=this.beans.valueSvc.getValueForDisplay({node:this.rowNode,includeValueFormatted:!0,from:"edit"});return r.value=n,r.valueFormatted=s,Bp(a,r)}case"FullWidthLoading":return Hp(a,r);default:return Op(a,r)}}setupFullWidthRowTooltip(e,t){var o;this.fullWidthGui&&(this.tooltipFeature=(o=this.beans.tooltipSvc)==null?void 0:o.setupFullWidthRowTooltip(this.tooltipFeature,this,e,t))}addFullWidthRowDragging(e,t,o="",i){let{rowDragSvc:r,context:a}=this.beans;if(!r||!this.isFullWidth())return;let n=r.createRowDragComp(()=>o,this.rowNode,void 0,e,t,i);this.createBean(n,a),this.addDestroyFunc(()=>{this.destroyBean(n,a)})}onUiLevelChanged(){let e=yl(this.rowNode);if(this.rowLevel!=e){let t="ag-row-level-"+e,o="ag-row-level-"+this.rowLevel;for(let i of this.allRowGuis)i.rowComp.toggleCss(t,!0),i.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(){let e=this.isFirstRowOnPage(),t=this.isLastRowOnPage();if(this.firstRowOnPage!==e){this.firstRowOnPage=e;for(let o of this.allRowGuis)o.rowComp.toggleCss("ag-row-first",e)}if(this.lastRowOnPage!==t){this.lastRowOnPage=t;for(let o of this.allRowGuis)o.rowComp.toggleCss("ag-row-last",t)}}getAllCellCtrls(){return this.leftCellCtrls.list.length===0&&this.rightCellCtrls.list.length===0?this.centerCellCtrls.list:[...this.centerCellCtrls.list,...this.leftCellCtrls.list,...this.rightCellCtrls.list]}postProcessClassesFromGridOptions(){var t;let e=[];if((t=this.beans.rowStyleSvc)==null||t.processClassesFromGridOptions(e,this.rowNode),!!e.length)for(let o of e)for(let i of this.allRowGuis)i.rowComp.toggleCss(o,!0)}postProcessRowClassRules(){var e;(e=this.beans.rowStyleSvc)==null||e.processRowClassRules(this.rowNode,t=>{for(let o of this.allRowGuis)o.rowComp.toggleCss(t,!0)},t=>{for(let o of this.allRowGuis)o.rowComp.toggleCss(t,!1)})}setStylesFromGridOptions(e,t){e&&(this.rowStyles=this.processStylesFromGridOptions()),this.forEachGui(t,o=>o.rowComp.setUserStyles(this.rowStyles))}getPinnedForContainer(e){return e==="left"||e==="right"?e:null}getInitialRowClasses(e){var s,l;let t=this.getPinnedForContainer(e),o=this.isFullWidth(),{rowNode:i,beans:r}=this,a=[];a.push("ag-row"),a.push(this.rowFocused?"ag-row-focus":"ag-row-no-focus"),this.fadeInAnimation[e]&&a.push("ag-opacity-zero"),a.push(i.rowIndex%2===0?"ag-row-even":"ag-row-odd"),i.isRowPinned()&&(a.push("ag-row-pinned"),(s=r.pinnedRowModel)!=null&&s.isManual()&&a.push("ag-row-pinned-manual")),!i.isRowPinned()&&i.pinnedSibling&&a.push("ag-row-pinned-source"),i.isSelected()&&a.push("ag-row-selected"),i.footer&&a.push("ag-row-footer"),a.push("ag-row-level-"+this.rowLevel),i.stub&&a.push("ag-row-loading"),o&&a.push("ag-full-width-row"),(l=r.expansionSvc)==null||l.addExpandedCss(a,i),i.dragging&&a.push("ag-row-dragging");let{rowStyleSvc:n}=r;return n&&(n.processClassesFromGridOptions(a,i),n.preProcessRowClassRules(a,i)),a.push(this.printLayout?"ag-row-position-relative":"ag-row-position-absolute"),this.isFirstRowOnPage()&&a.push("ag-row-first"),this.isLastRowOnPage()&&a.push("ag-row-last"),o&&(t==="left"&&a.push("ag-cell-last-left-pinned"),t==="right"&&a.push("ag-cell-first-right-pinned")),a}processStylesFromGridOptions(){var e,t;return(t=(e=this.beans.rowStyleSvc)==null?void 0:e.processStylesFromGridOptions(this.rowNode))!=null?t:this.emptyStyle}onRowSelected(e){var t;(t=this.beans.selectionSvc)==null||t.onRowCtrlSelected(this,o=>{(o===this.centerGui||o===this.fullWidthGui)&&this.announceDescription()},e)}announceDescription(){var e;(e=this.beans.selectionSvc)==null||e.announceAriaRowSelection(this.rowNode)}addHoverFunctionality(e){if(!this.active)return;let{element:t,compBean:o}=e,{rowNode:i,beans:r,gos:a}=this;o.addManagedListeners(t,{pointerenter:n=>{n.pointerType==="mouse"&&i.dispatchRowEvent("mouseEnter")},pointerleave:n=>{n.pointerType==="mouse"&&i.dispatchRowEvent("mouseLeave")}}),o.addManagedListeners(i,{mouseEnter:()=>{var n;!((n=r.dragSvc)!=null&&n.dragging)&&!a.get("suppressRowHoverHighlight")&&(t.classList.add("ag-row-hover"),i.setHovered(!0))},mouseLeave:()=>{this.resetHoveredStatus(t)}})}resetHoveredStatus(e){let t=e?[e]:this.allRowGuis.map(o=>o.element);for(let o of t)o.classList.remove("ag-row-hover");this.rowNode.setHovered(!1)}roundRowTopToBounds(e){let 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(let o of this.allRowGuis)t(o)}isRowRendered(){return this.allRowGuis.length>0}onRowHeightChanged(e){if(this.rowNode.rowHeight==null)return;let t=this.rowNode.rowHeight,o=this.beans.environment.getDefaultRowHeight(),r=Dc(this.gos)?Ft(this.beans,this.rowNode).height:void 0,a=r?`${Math.min(o,r)-2}px`:void 0;this.forEachGui(e,n=>{n.element.style.height=`${t}px`,a&&n.element.style.setProperty("--ag-line-height",a)})}destroyFirstPass(e=!1){var i;this.active=!1;let{rowNode:t}=this;if(!e&&bo(this.gos)&&!t.sticky)if(t.rowTop!=null){let a=this.roundRowTopToBounds(t.rowTop);this.setRowTop(a)}else for(let a of this.allRowGuis)a.rowComp.toggleCss("ag-opacity-zero",!0);(i=this.fullWidthGui)!=null&&i.element.contains(Y(this.beans))&&this.beans.focusSvc.attemptToRecoverFocus(),t.setHovered(!1);let o=this.createRowEvent("virtualRowRemoved");this.dispatchLocalEvent(o),this.beans.eventSvc.dispatchEvent(o),super.destroy()}destroySecondPass(){this.allRowGuis.length=0;let e=t=>{for(let o of t.list)o.destroy();return{list:[],map:{}}};this.centerCellCtrls=e(this.centerCellCtrls),this.leftCellCtrls=e(this.leftCellCtrls),this.rightCellCtrls=e(this.rightCellCtrls)}setFocusedClasses(e){this.forEachGui(e,t=>{t.rowComp.toggleCss("ag-row-focus",this.rowFocused),t.rowComp.toggleCss("ag-row-no-focus",!this.rowFocused)})}onCellFocusChanged(){let{focusSvc:e}=this.beans,t=e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);t!==this.rowFocused&&(this.rowFocused=t,this.setFocusedClasses())}onPaginationChanged(){var t,o;let e=(o=(t=this.beans.pagination)==null?void 0:t.getCurrentPage())!=null?o: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;let o=this.beans.pageBounds.getPixelOffset();return e+o*(t?1:-1)}setRowTop(e){if(!this.printLayout&&M(e)){let t=this.applyPaginationOffset(e),r=`${this.rowNode.isRowPinned()||this.rowNode.sticky?t:this.beans.rowContainerHeight.getRealPixelPosition(t)}px`;this.setRowTopStyle(r)}}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"";let t=this.rowNode,o;if(t.sticky)o=t.stickyRowTop;else{let i=this.slideInAnimation[e]?this.roundRowTopToBounds(t.oldRowTop):t.rowTop,r=this.applyPaginationOffset(i);o=t.isRowPinned()?r:this.beans.rowContainerHeight.getRealPixelPosition(r)}return o+"px"}setRowTopStyle(e){for(let t of this.allRowGuis)this.suppressRowTransform?t.rowComp.setTop(e):t.rowComp.setTransform(`translateY(${e})`)}getCellCtrl(e,t=!1){let o=null;for(let i of this.getAllCellCtrls())i.column==e&&(o=i);if(o!=null||t)return o;for(let i of this.getAllCellCtrls())(i==null?void 0:i.getColSpanningList().indexOf(e))>=0&&(o=i);return o}onRowIndexChanged(){this.rowNode.rowIndex!=null&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())}updateRowIndexes(e){var a,n,s,l;let t=this.rowNode.getRowIndexString();if(t===null)return;let o=((n=(a=this.beans.ctrlsSvc.getHeaderRowContainerCtrl())==null?void 0:a.getRowCount())!=null?n:0)+((l=(s=this.beans.filterManager)==null?void 0:s.getHeaderRowCount())!=null?l:0),i=this.rowNode.rowIndex%2===0,r=this.ariaRowIndex=o+this.rowNode.rowIndex+1;this.forEachGui(e,c=>{c.rowComp.setRowIndex(t),c.rowComp.toggleCss("ag-row-even",i),c.rowComp.toggleCss("ag-row-odd",!i),ri(c.element,r)})}},D1=class extends S{constructor(){super(),this.beanName="navigation",this.onPageDown=Ss(this.onPageDown,100),this.onPageUp=Ss(this.onPageUp,100)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}handlePageScrollingKey(e,t=!1){let o=e.key,i=e.altKey,r=e.ctrlKey||e.metaKey,a=!!this.beans.rangeSvc&&e.shiftKey,n=Fv(this.gos,e),s=!1;switch(o){case b.PAGE_HOME:case b.PAGE_END:!r&&!i&&(this.onHomeOrEndKey(o),s=!0);break;case b.LEFT:case b.RIGHT:case b.UP:case b.DOWN:if(!n)return!1;r&&!i&&!a&&(this.onCtrlUpDownLeftRight(o,n),s=!0);break;case b.PAGE_DOWN:case b.PAGE_UP:!r&&!i&&(s=this.handlePageUpDown(o,n,t));break}return s&&e.preventDefault(),s}handlePageUpDown(e,t,o){return o&&(t=this.beans.focusSvc.getFocusedCell()),t?(e===b.PAGE_UP?this.onPageUp(t):this.onPageDown(t),!0):!1}navigateTo({scrollIndex:e,scrollType:t,scrollColumn:o,focusIndex:i,focusColumn:r,isAsync:a,rowPinned:n}){let{scrollFeature:s}=this.gridBodyCon;M(o)&&!o.isPinned()&&s.ensureColumnVisible(o),M(e)&&s.ensureIndexVisible(e,t),a||s.ensureIndexVisible(i);let{focusSvc:l}=this.beans;l.setFocusedCell({rowIndex:i,column:r,rowPinned:n,forceBrowserFocus:!0}),this.setRangeToCellIfSupported({rowIndex:i,rowPinned:n,column:r})}onPageDown(e){let t=this.beans,o=ma(t),i=this.getViewportHeight(),{pageBounds:r,rowModel:a,rowAutoHeight:n}=t,s=r.getPixelOffset(),l=o.top+i,c=a.getRowIndexAtPixel(l+s);n!=null&&n.active?this.navigateToNextPageWithAutoHeight(e,c):this.navigateToNextPage(e,c)}onPageUp(e){let t=this.beans,o=ma(t),{pageBounds:i,rowModel:r,rowAutoHeight:a}=t,n=i.getPixelOffset(),s=o.top,l=r.getRowIndexAtPixel(s+n);a!=null&&a.active?this.navigateToNextPageWithAutoHeight(e,l,!0):this.navigateToNextPage(e,l,!0)}navigateToNextPage(e,t,o=!1){let{pageBounds:i,rowModel:r}=this.beans,a=this.getViewportHeight(),n=i.getFirstRow(),s=i.getLastRow(),l=i.getPixelOffset(),c=r.getRow(e.rowIndex),d=o?(c==null?void 0:c.rowHeight)-a-l:a-l,g=(c==null?void 0:c.rowTop)+d,u=r.getRowIndexAtPixel(g+l);if(u===e.rowIndex){let p=o?-1:1;t=u=e.rowIndex+p}let h;o?(h="bottom",us&&(u=s),t>s&&(t=s)),this.isRowTallerThanView(r.getRow(u))&&(t=u,h="top"),this.navigateTo({scrollIndex:t,scrollType:h,scrollColumn:null,focusIndex:u,focusColumn:e.column})}navigateToNextPageWithAutoHeight(e,t,o=!1){this.navigateTo({scrollIndex:t,scrollType:o?"bottom":"top",scrollColumn:null,focusIndex:t,focusColumn:e.column}),setTimeout(()=>{let 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){var c;let o=t?-1:1,i=this.getViewportHeight(),{pageBounds:r,rowModel:a}=this.beans,n=r.getLastRow(),s=0,l=e.rowIndex;for(;l>=0&&l<=n;){let d=a.getRow(l);if(d){let g=(c=d.rowHeight)!=null?c:0;if(s+g>i)break;s+=g}l+=o}return Math.max(0,Math.min(l,n))}getViewportHeight(){let e=this.beans,t=ma(e),o=this.beans.scrollVisibleSvc.getScrollbarWidth(),i=t.bottom-t.top;return e.ctrlsSvc.get("center").isHorizontalScrollShowing()&&(i-=o),i}isRowTallerThanView(e){if(!e)return!1;let t=e.rowHeight;return typeof t!="number"?!1:t>this.getViewportHeight()}onCtrlUpDownLeftRight(e,t){let o=this.beans.cellNavigation.getNextCellToFocus(e,t,!0);if(!o)return;let i=this.getNormalisedPosition(o),{rowIndex:r,rowPinned:a,column:n}=i!=null?i:o,s=n;this.navigateTo({scrollIndex:r,scrollType:null,scrollColumn:s,focusIndex:r,focusColumn:s,rowPinned:a})}onHomeOrEndKey(e){let t=e===b.PAGE_HOME,{visibleCols:o,pageBounds:i,rowModel:r}=this.beans,a=o.allCols,n=t?i.getFirstRow():i.getLastRow(),s=r.getRow(n);if(!s)return;let l=(t?a:[...a].reverse()).find(c=>!c.isSuppressNavigable(s)&&!pe(c));l&&this.navigateTo({scrollIndex:n,scrollType:null,scrollColumn:l,focusIndex:n,focusColumn:l})}onTabKeyDown(e,t){let o=t.shiftKey,i=this.tabToNextCellCommon(e,o,t),r=this.beans,{ctrlsSvc:a,pageBounds:n,focusSvc:s,gos:l}=r;if(i!==!1){i?t.preventDefault():i===null&&a.get("gridCtrl").allowFocusForNextCoreContainer(o);return}if(o){let{rowIndex:c,rowPinned:d}=e.getRowPosition();(d?c===0:c===n.getFirstRow())&&(l.get("headerHeight")===0||Le(r)?Po(r,!0,!0):(t.preventDefault(),s.focusPreviousFromFirstCell(t)))}else e instanceof Eo&&e.focusCell(!0),(s.focusOverlay(!1)||Po(r,o))&&t.preventDefault()}tabToNextCell(e,t){let o=this.beans,{focusSvc:i,rowRenderer:r}=o,a=i.getFocusedCell();if(!a)return!1;let n=ho(o,a);return!n&&(n=r.getRowByPosition(a),!(n!=null&&n.isFullWidth()))?!1:!!this.tabToNextCellCommon(n,e,t,"api")}tabToNextCellCommon(e,t,o,i="ui"){var l;let{editSvc:r,focusSvc:a}=this.beans,n,s=e instanceof Eo?e:(l=e.getAllCellCtrls())==null?void 0:l[0];return r!=null&&r.isEditing()?n=r==null?void 0:r.moveToNextCell(s,t,o,i):n=this.moveToNextCellNotEditing(e,t,o),n===null?n:n||!!a.focusedHeader}moveToNextCellNotEditing(e,t,o){let i=this.beans.visibleCols.allCols,r;if(e instanceof mr){if(r={...e.getRowPosition(),column:t?i[0]:U(i)},this.gos.get("embedFullWidthRows")&&o){let n=e.findFullWidthInfoForEvent(o);n&&(r.column=n.column)}}else r=e.getFocusedCellPosition();let a=this.findNextCellToFocusOn(r,{backwards:t,startEditing:!1});if(a===!1)return null;if(a instanceof Eo)a.focusCell(!0);else if(a)return this.tryToFocusFullWidthRow(a,t);return M(a)}findNextCellToFocusOn(e,{backwards:t,startEditing:o,skipToNextEditableCell:i}){let r=e,a=this.beans,{cellNavigation:n,gos:s,focusSvc:l,rowRenderer:c}=a;for(;;){e!==r&&(e=r),t||(r=this.getLastCellOfColSpan(r)),r=n.getNextTabbedCell(r,t);let d=s.getCallback("tabToNextCell");if(M(d)){let p=d({backwards:t,editing:o,previousCellPosition:e,nextCellPosition:r||null});if(p===!0)r=e;else{if(p===!1)return!1;r={rowIndex:p.rowIndex,column:p.column,rowPinned:p.rowPinned}}}if(!r)return null;if(r.rowIndex<0){let h=Fe(a);return l.focusHeaderPosition({headerPosition:{headerRowIndex:h+r.rowIndex,column:r.column},fromCell:!0}),null}let g=s.get("editType")==="fullRow";if(o&&(!g||i)&&!this.isCellEditable(r))continue;this.ensureCellVisible(r);let u=ho(a,r);if(!u){let h=c.getRowByPosition(r);if(!h||!h.isFullWidth()||o)continue;return{...h.getRowPosition(),column:r==null?void 0:r.column}}if(!n.isSuppressNavigable(u.column,u.rowNode))return u.setFocusedCellPosition(r),this.setRangeToCellIfSupported(r),u}}isCellEditable(e){let t=this.lookupRowNodeForCell(e);return t?e.column.isCellEditable(t):!1}lookupRowNodeForCell({rowIndex:e,rowPinned:t}){let{pinnedRowModel:o,rowModel:i}=this.beans;return t==="top"?o==null?void 0:o.getPinnedTopRow(e):t==="bottom"?o==null?void 0:o.getPinnedBottomRow(e):i.getRow(e)}navigateToNextCell(e,t,o,i){var g;let r=o,a=!1,n=this.beans,{cellNavigation:s,focusSvc:l,gos:c}=n;for(;r&&(r===o||!this.isValidNavigateCell(r));)c.get("enableRtl")?t===b.LEFT&&(r=this.getLastCellOfColSpan(r)):t===b.RIGHT&&(r=this.getLastCellOfColSpan(r)),r=s.getNextCellToFocus(t,r),a=Q(r);if(a&&e&&e.key===b.UP&&(r={rowIndex:-1,rowPinned:null,column:o.column}),i){let u=c.getCallback("navigateToNextCell");if(M(u)){let p=u({key:t,previousCellPosition:o,nextCellPosition:r||null,event:e});M(p)?r={rowPinned:p.rowPinned,rowIndex:p.rowIndex,column:p.column}:r=null}}if(!r)return;if(r.rowIndex<0){let u=Fe(n);l.focusHeaderPosition({headerPosition:{headerRowIndex:u+r.rowIndex,column:(g=r.column)!=null?g:o.column},event:e||void 0,fromCell:!0});return}let d=this.getNormalisedPosition(r);d?this.focusPosition(d):this.tryToFocusFullWidthRow(r)}getNormalisedPosition(e){var i;if(!!((i=this.beans.spannedRowRenderer)!=null&&i.getCellByPosition(e)))return e;this.ensureCellVisible(e);let o=ho(this.beans,e);return o?(e=o.getFocusedCellPosition(),this.ensureCellVisible(e),e):null}tryToFocusFullWidthRow(e,t){let{visibleCols:o,rowRenderer:i,focusSvc:r,eventSvc:a}=this.beans,n=o.allCols,s=i.getRowByPosition(e);if(!(s!=null&&s.isFullWidth()))return!1;let l=r.getFocusedCell(),c={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(t?U(n):n[0])};this.focusPosition(c);let d=t==null?l!=null&&Rf(c,l):t;return a.dispatchEvent({type:"fullWidthRowFocused",rowIndex:c.rowIndex,rowPinned:c.rowPinned,column:c.column,isFullWidthCell:!0,fromBelow:d}),!0}focusPosition(e){let{focusSvc:t}=this.beans;t.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0}),this.setRangeToCellIfSupported(e)}setRangeToCellIfSupported(e){var t;pe(e.column)||(t=this.beans.rangeSvc)==null||t.setRangeToCell(e)}isValidNavigateCell(e){return!!et(this.beans,e)}getLastCellOfColSpan(e){let t=ho(this.beans,e);if(!t)return e;let o=t.getColSpanningList();return o.length===1?e:{rowIndex:e.rowIndex,column:U(o),rowPinned:e.rowPinned}}ensureCellVisible(e){let t=Pc(this.gos),o=this.beans.rowModel.getRow(e.rowIndex),i=t&&(o==null?void 0:o.sticky),{scrollFeature:r}=this.gridBodyCon;!i&&Q(e.rowPinned)&&r.ensureIndexVisible(e.rowIndex),e.column.isPinned()||r.ensureColumnVisible(e.column)}ensureColumnVisible(e){let t=this.gridBodyCon.scrollFeature;e.isPinned()||t.ensureColumnVisible(e)}ensureRowVisible(e){this.gridBodyCon.scrollFeature.ensureIndexVisible(e)}};function ma(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}var M1={moduleName:"KeyboardNavigation",version:D,beans:[D1,jb,rb],apiFunctions:{getFocusedCell:Kb,clearFocusedCell:$b,setFocusedCell:Yb,setFocusedHeader:Jb,tabToNextCell:Qb,tabToPreviousCell:Zb}},P1=class extends S{constructor(){super(...arguments),this.beanName="pageBoundsListener"}postConstruct(){this.addManagedEventListeners({modelUpdated:this.onModelUpdated.bind(this),recalculateRowBounds:this.calculatePages.bind(this)}),this.onModelUpdated()}onModelUpdated(e){var t,o,i,r,a;this.calculatePages(),this.eventSvc.dispatchEvent({type:"paginationChanged",animate:(t=e==null?void 0:e.animate)!=null?t:!1,newData:(o=e==null?void 0:e.newData)!=null?o:!1,newPage:(i=e==null?void 0:e.newPage)!=null?i:!1,newPageSize:(r=e==null?void 0:e.newPageSize)!=null?r:!1,keepRenderedRows:(a=e==null?void 0:e.keepRenderedRows)!=null?a:!1})}calculatePages(){let{pageBounds:e,pagination:t,rowModel:o}=this.beans;t?t.calculatePages():e.calculateBounds(0,o.getRowCount()-1)}},I1=class extends S{constructor(){super(...arguments),this.beanName="pageBounds",this.pixelOffset=0}getFirstRow(){var e,t;return(t=(e=this.topRowBounds)==null?void 0:e.rowIndex)!=null?t:-1}getLastRow(){var e,t;return(t=(e=this.bottomRowBounds)==null?void 0:e.rowIndex)!=null?t:-1}getCurrentPageHeight(){let{topRowBounds:e,bottomRowBounds:t}=this;return!e||!t?0:Math.max(t.rowTop+t.rowHeight-e.rowTop,0)}getCurrentPagePixelRange(){var r;let{topRowBounds:e,bottomRowBounds:t}=this,o=(r=e==null?void 0:e.rowTop)!=null?r:0,i=t?t.rowTop+t.rowHeight:0;return{pageFirstPixel:o,pageLastPixel:i}}calculateBounds(e,t){let{rowModel:o}=this.beans,i=o.getRowBounds(e);i&&(i.rowIndex=e),this.topRowBounds=i;let r=o.getRowBounds(t);r&&(r.rowIndex=t),this.bottomRowBounds=r,this.calculatePixelOffset()}getPixelOffset(){return this.pixelOffset}calculatePixelOffset(){var t,o;let e=(o=(t=this.topRowBounds)==null?void 0:t.rowTop)!=null?o:0;this.pixelOffset!==e&&(this.pixelOffset=e,this.eventSvc.dispatchEvent({type:"paginationPixelOffsetChanged"}))}},T1=".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}",A1=class extends S{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(){let e=this.getWidth(),t=e>0;for(let o of this.elements)o&&(q(o,t),Ze(o,e))}},z1=class extends S{constructor(){super(...arguments),this.beanName="pinnedCols"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,t=>{this.gridBodyCtrl=t.gridBodyCtrl});let e=this.checkContainerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}checkContainerWidths(){let{gos:e,visibleCols:t,eventSvc:o}=this.beans,i=se(e,"print"),r=i?0:t.getColsLeftWidth(),a=i?0:t.getDisplayedColumnsRightWidth();r!=this.leftWidth&&(this.leftWidth=r,o.dispatchEvent({type:"leftPinnedWidthChanged"})),a!=this.rightWidth&&(this.rightWidth=a,o.dispatchEvent({type:"rightPinnedWidthChanged"}))}keepPinnedColumnsNarrowerThanViewport(){let e=this.gridBodyCtrl.eBodyViewport,t=ni(e);if(t<=50)return;let o=this.getPinnedColumnsOverflowingViewport(t-50),i=this.gos.getCallback("processUnpinnedColumns"),{columns:r,hasLockedPinned:a}=o,n=r;!n.length&&!a||(i&&(n=i({columns:n,viewportWidth:t})),n!=null&&n.length&&(n=n.filter(s=>!pe(s)),this.setColsPinned(n,null,"viewportSizeFeature")))}createPinnedWidthFeature(e,...t){return new A1(e,t)}setColsPinned(e,t,o){let{colModel:i,colAnimation:r,visibleCols:a,gos:n}=this.beans;if(!i.cols||!(e!=null&&e.length))return;if(se(n,"print")){k(37);return}r==null||r.start();let s;t===!0||t==="left"?s="left":t==="right"?s="right":s=null;let l=[];for(let c of e){if(!c)continue;let d=i.getCol(c);d&&d.getPinned()!==s&&(this.setColPinned(d,s),l.push(d))}l.length&&(a.refresh(o),Vd(this.eventSvc,l,o)),r==null||r.finish()}initCol(e){let{pinned:t,initialPinned:o}=e.colDef;t!==void 0?this.setColPinned(e,t):this.setColPinned(e,o)}setColPinned(e,t){t===!0||t==="left"?e.pinned="left":t==="right"?e.pinned="right":e.pinned=null,e.dispatchStateUpdatedEvent("pinned")}setupHeaderPinnedWidth(e){let{scrollVisibleSvc:t}=this.beans;if(e.pinned==null)return;let o=e.pinned==="left",i=e.pinned==="right";e.hidden=!0;let r=()=>{let a=o?this.leftWidth:this.rightWidth;if(a==null)return;let n=a==0,s=e.hidden!==n,l=this.gos.get("enableRtl"),c=t.getScrollbarWidth(),g=t.verticalScrollShowing&&(l&&o||!l&&i)?a+c:a;e.comp.setPinnedContainerWidth(`${g}px`),e.comp.setDisplayed(!n),s&&(e.hidden=n,e.refresh())};e.addManagedEventListeners({leftPinnedWidthChanged:r,rightPinnedWidthChanged:r,scrollVisibilityChanged:r,scrollbarWidthChanged:r})}getHeaderResizeDiff(e,t){if(t.getPinned()){let{leftWidth:i,rightWidth:r}=this,a=ni(this.beans.ctrlsSvc.getGridBodyCtrl().eBodyViewport)-50;if(i+r+e>a)if(a>i+r)e=a-i-r;else return 0}return e}getPinnedColumnsOverflowingViewport(e){var h,p;let t=(h=this.rightWidth)!=null?h:0,o=(p=this.leftWidth)!=null?p:0,i=t+o,r=!1;if(i0;){if(l0){let f=n[c++];if(f.colDef.lockPinned){r=!0;continue}u-=f.getActualWidth(),g.push(f)}}return{columns:g,hasLockedPinned:r}}},L1={moduleName:"PinnedColumn",version:D,beans:[z1],css:[T1]},O1=class extends ve{constructor(){super(),this.beanName="ariaAnnounce",this.descriptionContainer=null,this.pendingAnnouncements=new Map,this.lastAnnouncement="",this.updateAnnouncement=re(this,this.updateAnnouncement.bind(this),200)}postConstruct(){let e=this.beans,t=te(e),o=this.descriptionContainer=t.createElement("div");o.classList.add("ag-aria-description-container"),ic(o,"polite"),ku(o,"additions text"),xu(o,!0),e.eRootDiv.appendChild(o)}announceValue(e,t){this.pendingAnnouncements.set(t,e),this.updateAnnouncement()}updateAnnouncement(){if(!this.descriptionContainer)return;let 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;if(t==null||t.replace(/[ .]/g,"")==""){this.lastAnnouncement="";return}this.lastAnnouncement===t&&(t=`${t}\u200B`),this.lastAnnouncement=t,this.descriptionContainer.textContent=t}destroy(){super.destroy();let{descriptionContainer:e}=this;e&&(ne(e),e.remove()),this.descriptionContainer=null,this.pendingAnnouncements.clear()}},H1=class extends O1{},B1={moduleName:"Aria",version:D,beans:[H1]},V1=":where(.ag-delay-render){.ag-cell,.ag-header-cell,.ag-header-group-cell,.ag-row,.ag-spanned-cell-wrapper{visibility:hidden}}",Sl="ag-delay-render",N1=class extends S{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,t=>{t.gridBodyCtrl.eGridBody.classList.add(Sl)}),this.hideRequested=!0))}revealColumns(e){if(this.alreadyRevealed||!this.isAlive()||(this.requesters.delete(e),this.requesters.size>0))return;let{renderStatus:t,ctrlsSvc:o}=this.beans;if(t){if(!t.areHeaderCellsRendered()&&this.timesRetried<5){this.timesRetried++,setTimeout(()=>this.revealColumns(e));return}this.timesRetried=0}o.getGridBodyCtrl().eGridBody.classList.remove(Sl),this.alreadyRevealed=!0}},G1={moduleName:"ColumnDelayRender",version:D,beans:[N1],css:[V1]},Pr=class extends _{constructor(){super()}},W1={tag:"div",cls:"ag-overlay-exporting-center",children:[{tag:"span",ref:"eExportingIcon",cls:"ag-loading-icon"},{tag:"span",ref:"eExportingText",cls:"ag-exporting-text"}]},q1=class extends Pr{constructor(){super(...arguments),this.eExportingIcon=E,this.eExportingText=E}init(e){var r,a;let{beans:t}=this;this.setTemplate(W1);let o=ye("overlayExporting",t,null);o&&this.eExportingIcon.appendChild(o);let i=(a=(r=e.exporting)==null?void 0:r.overlayText)!=null?a:this.getLocaleTextFunc()("exportingOoo","Exporting...");this.eExportingText.textContent=i,t.ariaAnnounce.announceValue(i,"overlay")}},_1={tag:"div",cls:"ag-overlay-loading-center",children:[{tag:"span",ref:"eLoadingIcon",cls:"ag-loading-icon"},{tag:"span",ref:"eLoadingText",cls:"ag-loading-text"}]},U1=class extends Pr{constructor(){super(...arguments),this.eLoadingIcon=E,this.eLoadingText=E}init(e){var r,a,n;let{beans:t,gos:o}=this,i=st((r=o.get("overlayLoadingTemplate"))==null?void 0:r.trim());if(this.setTemplate(i!=null?i:_1),!i){let s=ye("overlayLoading",t,null);s&&this.eLoadingIcon.appendChild(s);let l=(n=(a=e.loading)==null?void 0:a.overlayText)!=null?n:this.getLocaleTextFunc()("loadingOoo","Loading...");this.eLoadingText.textContent=l,t.ariaAnnounce.announceValue(l,"overlay")}}},j1={tag:"span",cls:"ag-overlay-no-matching-rows-center"},K1=class extends Pr{init(e){var i,r;let{beans:t}=this;this.setTemplate(j1);let o=(r=(i=e.noMatchingRows)==null?void 0:i.overlayText)!=null?r:this.getLocaleTextFunc()("noMatchingRows","No Matching Rows");this.getGui().textContent=o,t.ariaAnnounce.announceValue(o,"overlay")}},$1={tag:"span",cls:"ag-overlay-no-rows-center"},Y1=class extends Pr{init(e){var r,a,n;let{beans:t,gos:o}=this,i=st((r=o.get("overlayNoRowsTemplate"))==null?void 0:r.trim());if(this.setTemplate(i!=null?i:$1),!i){let s=(n=(a=e.noRows)==null?void 0:a.overlayText)!=null?n:this.getLocaleTextFunc()("noRowsToShow","No Rows To Show");this.getGui().textContent=s,t.ariaAnnounce.announceValue(s,"overlay")}}};function Q1(e){var t;(t=e.overlays)==null||t.showLoadingOverlay()}function Z1(e){var t;(t=e.overlays)==null||t.showNoRowsOverlay()}function J1(e){var t;(t=e.overlays)==null||t.hideOverlay()}var X1=".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)}",ey={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"}]}]},gg=class extends _{constructor(){super(ey),this.eOverlayWrapper=E,this.activeOverlay=null,this.activePromise=null,this.activeCssClass=null,this.elToFocusAfter=null,this.overlayExclusive=!1,this.oldWrapperPadding=null,this.registerCSS(X1)}handleKeyDown(e){if(e.key!==b.TAB||e.defaultPrevented||ct(e))return;let{beans:t,eOverlayWrapper:o}=this;if(o&&no(t,o,!1,e.shiftKey))return;let r=!1;e.shiftKey?r=t.focusSvc.focusGridView({column:U(t.visibleCols.allCols),backwards:!0,canFocusOverlay:!1}):r=Po(t,!1),r&&e.preventDefault()}updateLayoutClasses(e,t){let o=this.eOverlayWrapper;if(!o)return;let i=o.classList,{AUTO_HEIGHT:r,NORMAL:a,PRINT:n}=Oe;i.toggle(r,t.autoHeight),i.toggle(a,t.normal),i.toggle(n,t.print)}postConstruct(){this.createManagedBean(new Hn(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){var o;let t=(o=this.eOverlayWrapper)==null?void 0:o.classList;if(!t){this.activeCssClass=null;return}this.activeCssClass&&t.toggle(this.activeCssClass,!1),this.activeCssClass=e,t.toggle(e,!0)}showOverlay(e,t,o){if(this.destroyActiveOverlay(),this.elToFocusAfter=null,this.activePromise=e,this.overlayExclusive=o,!e)return this.refreshWrapperPadding(),$.resolve();if(this.setWrapperTypeClass(t),this.setDisplayed(!0,{skipAriaHidden:!0}),this.refreshWrapperPadding(),o&&this.isGridFocused()){let i=Y(this.beans);i&&!ln(this.beans)&&(this.elToFocusAfter=i)}return e.then(i=>{let r=this.eOverlayWrapper;if(!r){this.destroyBean(i);return}if(this.activePromise!==e){this.activeOverlay!==i&&(this.destroyBean(i),i=null);return}this.activePromise=null,i&&(this.activeOverlay!==i&&(r.appendChild(i.getGui()),this.activeOverlay=i),o&&this.isGridFocused()&&Jt(r))}),e}refreshWrapperPadding(){var o;if(!this.eOverlayWrapper){this.oldWrapperPadding=null;return}let e=!!this.activeOverlay||!!this.activePromise,t=0;e&&!this.overlayExclusive&&(t=((o=this.beans.ctrlsSvc.get("gridHeaderCtrl"))==null?void 0:o.headerHeight)||0),t!==this.oldWrapperPadding&&(this.oldWrapperPadding=t,this.eOverlayWrapper.style.setProperty("padding-top",`${t}px`))}destroyActiveOverlay(){var i;this.activePromise=null;let e=this.activeOverlay;if(!e){this.overlayExclusive=!1,this.elToFocusAfter=null,this.refreshWrapperPadding();return}let t=this.elToFocusAfter;this.elToFocusAfter=null,this.activeOverlay=null,this.overlayExclusive=!1,t&&!this.isGridFocused()&&(t=null),this.destroyBean(e);let o=this.eOverlayWrapper;o&&ne(o),(i=t==null?void 0:t.focus)==null||i.call(t,{preventScroll:!0}),this.refreshWrapperPadding()}hideOverlay(){this.destroyActiveOverlay(),this.setDisplayed(!1,{skipAriaHidden:!0})}isGridFocused(){let e=Y(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}},ty={selector:"AG-OVERLAY-WRAPPER",component:gg},oy=["refresh"],yi=e=>({name:e,optionalMethods:oy}),Nt={id:"agLoadingOverlay",overlayType:"loading",comp:yi("loadingOverlayComponent"),wrapperCls:"ag-overlay-loading-wrapper",exclusive:!0,compKey:"loadingOverlayComponent",paramsKey:"loadingOverlayComponentParams",isSuppressed:e=>{let t=e.get("loading");return t===!1||e.get("suppressLoadingOverlay")===!0&&t!==!0}},fo={id:"agNoRowsOverlay",overlayType:"noRows",comp:yi("noRowsOverlayComponent"),wrapperCls:"ag-overlay-no-rows-wrapper",compKey:"noRowsOverlayComponent",paramsKey:"noRowsOverlayComponentParams",isSuppressed:e=>e.get("suppressNoRowsOverlay")},$n={id:"agNoMatchingRowsOverlay",overlayType:"noMatchingRows",comp:yi("noMatchingRowsOverlayComponent"),wrapperCls:"ag-overlay-no-matching-rows-wrapper"},vr={id:"agExportingOverlay",overlayType:"exporting",comp:yi("exportingOverlayComponent"),wrapperCls:"ag-overlay-exporting-wrapper",exclusive:!0},Ki={id:"activeOverlay",comp:yi("activeOverlay"),wrapperCls:"ag-overlay-modal-wrapper",exclusive:!0},iy=e=>{var t;return e?(t={agLoadingOverlay:Nt,agNoRowsOverlay:fo,agNoMatchingRowsOverlay:$n,agExportingOverlay:vr}[e])!=null?t:Ki:null},ry=e=>e?{loading:Nt,noRows:fo,noMatchingRows:$n,exporting:vr}[e]:null,ay=class extends S{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(){let e=this.gos;this.showInitialOverlay=ee(e);let t=()=>{this.userForcedNoRows||this.updateOverlay(!1)},[o,i,r,a]=this.addManagedEventListeners({newColumnsLoaded:t,rowCountReady:()=>{this.disableInitialOverlay(),t(),i()},rowDataUpdated:t,modelUpdated:t});this.newColumnsLoadedCleanup=o,this.addManagedPropertyListeners(["loading","activeOverlay","activeOverlayParams","overlayComponentParams","loadingOverlayComponentParams","noRowsOverlayComponentParams"],n=>{var s;return this.onPropChange(new Set((s=n.changeSet)==null?void 0:s.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;let e=this.gos;if(!this.eWrapper||e.get("activeOverlay")||this.isDisabled(Nt))return;let t=e.get("loading");!t&&t!==void 0||this.doShowOverlay(Nt)}showNoRowsOverlay(){this.showInitialOverlay=!1;let e=this.gos;!this.eWrapper||e.get("activeOverlay")||e.get("loading")||this.isDisabled(fo)||(this.userForcedNoRows=!0,this.doShowOverlay(fo))}async showExportOverlay(e){let{gos:t,beans:o}=this;if(!this.eWrapper||t.get("activeOverlay")||t.get("loading")||this.isDisabled(vr)||this.userForcedNoRows&&this.currentDef===fo){e();return}let i=this.getDesiredDefWithOverride(vr);if(!i){e();return}this.exportsInProgress++,this.focusedCell=o.focusSvc.getFocusedCell(),await this.doShowOverlay(i),await new Promise(a=>setTimeout(()=>a()));let r=Date.now();try{e()}finally{let a=Date.now()-r,n=Math.max(0,300-a),s=()=>{this.exportsInProgress--,this.exportsInProgress===0&&(this.updateOverlay(!1),If(o,this.focusedCell),this.focusedCell=null)};n>0?setTimeout(()=>s(),n):s()}}hideOverlay(){let e=this.gos;this.showInitialOverlay=!1;let t=this.userForcedNoRows;if(this.userForcedNoRows=!1,e.get("loading")){k(99);return}if(e.get("activeOverlay")){k(296);return}if(this.currentDef===$n){k(297);return}this.doHideOverlay(),t&&this.getOverlayDef()!==fo&&this.updateOverlay(!1)}getOverlayWrapperSelector(){return ty}getOverlayWrapperCompClass(){return gg}onPropChange(e){var r,a,n;let t=e.has("activeOverlay");if((t||e.has("loading"))&&this.updateOverlay(t))return;let o=this.currentDef,i=(r=this.eWrapper)==null?void 0:r.activeOverlay;if(i&&o){let s=e.has("activeOverlayParams");if(o===Ki)s&&((a=i.refresh)==null||a.call(i,this.makeCompParams(!0)));else{let l=o.paramsKey;(e.has("overlayComponentParams")||l&&e.has(l))&&((n=i.refresh)==null||n.call(i,this.makeCompParams(!1,l,o.overlayType)))}}}updateOverlay(e){let t=this.eWrapper;if(!t)return this.currentDef=null,!1;let o=this.getDesiredDefWithOverride(),i=this.currentDef,r=o===Ki&&e;return o!==i?o?(this.doShowOverlay(o),!0):(this.disableInitialOverlay(),this.doHideOverlay()):r&&o?(t.hideOverlay(),this.doShowOverlay(o),!0):(o||this.disableInitialOverlay(),!1)}getDesiredDefWithOverride(e){let{gos:t}=this,o=iy(t.get("activeOverlay"));return o||(o=e!=null?e:this.getOverlayDef(),o&&this.isDisabled(o)&&(o=null)),o}getOverlayDef(){let{gos:e,beans:t}=this,{rowModel:o}=t,i=e.get("loading");if(i!==void 0){if(this.disableInitialOverlay(),i)return Nt}else if(this.showInitialOverlay){if(!this.isDisabled(Nt)&&(!e.get("columnDefs")||!e.get("rowData")))return Nt;this.disableInitialOverlay()}else this.disableInitialOverlay();let a=o.getOverlayType();return ry(a)}disableInitialOverlay(){var e;this.showInitialOverlay=!1,(e=this.newColumnsLoadedCleanup)==null||e.call(this),this.newColumnsLoadedCleanup=null}doShowOverlay(e){var d,g;let{gos:t,beans:o}=this,{userCompFactory:i}=o;this.currentDef=e;let r=e!==Ki,a=!!e.exclusive;this.exclusive=a;let n;(e.paramsKey&&t.get(e.paramsKey)||e.compKey&&t.get(e.compKey))&&(n=e.paramsKey);let s;r&&(t.get("overlayComponent")||t.get("overlayComponentSelector"))&&(s=i.getCompDetailsFromGridOptions({name:"overlayComponent",optionalMethods:["refresh"]},void 0,this.makeCompParams(!1,e.paramsKey,e.overlayType))),s!=null||(s=i.getCompDetailsFromGridOptions(e.comp,r?e.id:void 0,this.makeCompParams(!r,n,e.overlayType),!1));let l=(d=s==null?void 0:s.newAgStackInstance())!=null?d:null,c=this.eWrapper?this.eWrapper.showOverlay(l,e.wrapperCls,a):$.resolve();return(g=this.eWrapper)==null||g.refreshWrapperPadding(),this.setExclusive(a),c}makeCompParams(e,t,o){let{gos:i}=this,r=e?i.get("activeOverlayParams"):{...i.get("overlayComponentParams"),...t&&i.get(t)||null,overlayType:o};return O(i,r!=null?r:{})}doHideOverlay(){let e=!1;this.currentDef&&(this.currentDef=null,e=!0),this.exclusive=!1;let 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){var o,i;let{gos:t}=this;return e.overlayType&&((o=t.get("suppressOverlays"))==null?void 0:o.includes(e.overlayType))||((i=e.isSuppressed)==null?void 0:i.call(e,t))===!0}},ny={moduleName:"Overlay",version:D,userComponents:{agLoadingOverlay:U1,agNoRowsOverlay:Y1,agNoMatchingRowsOverlay:K1,agExportingOverlay:q1},apiFunctions:{showLoadingOverlay:Q1,showNoRowsOverlay:Z1,hideOverlay:J1},icons:{overlayLoading:"loading",overlayExporting:"loading"},beans:[ay]},sy=class extends S{constructor(){super(...arguments),this.beanName="rowContainerHeight",this.scrollY=0,this.uiBodyHeight=0}postConstruct(){this.addManagedEventListeners({bodyHeightChanged:this.updateOffset.bind(this)}),this.maxDivHeight=Yp(),Et(this.gos,"RowContainerHeightService - maxDivHeight = "+this.maxDivHeight)}updateOffset(){if(!this.stretching)return;let 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;let e=this.scrollY/this.maxScrollY,t=e*this.pixelsToShave;Et(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){let t=typeof e=="number"?Math.floor(e):null;this.divStretchOffset!==t&&(this.divStretchOffset=t,this.eventSvc.dispatchEvent({type:"heightScaleChanged"}))}setModelHeight(e){this.modelHeight=e,this.stretching=e!=null&&this.maxDivHeight>0&&e>this.maxDivHeight,this.stretching?this.calculateOffset():this.clearOffset()}getRealPixelPosition(e){return e-this.divStretchOffset}getUiBodyHeight(){let e=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition();return e.bottom-e.top}getScrollPositionForPixel(e){if(this.pixelsToShave<=0)return e;let t=this.modelHeight-this.getUiBodyHeight(),o=e/t;return this.maxScrollY*o}},ly=400,cy=class extends S{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=()=>{let e=()=>{for(let a of this.getAllCellCtrls())a.onCellSelectionChanged()},t=()=>{for(let a of this.getAllCellCtrls())a.updateRangeBordersIfRangeCount()},o=()=>{this.eventSvc.addListener("cellSelectionChanged",e),this.eventSvc.addListener("columnMoved",t),this.eventSvc.addListener("columnPinned",t),this.eventSvc.addListener("columnVisible",t)},i=()=>{this.eventSvc.removeListener("cellSelectionChanged",e),this.eventSvc.removeListener("columnMoved",t),this.eventSvc.removeListener("columnPinned",t),this.eventSvc.removeListener("columnVisible",t)};this.addDestroyFunc(()=>i()),this.addManagedPropertyListeners(["enableRangeSelection","cellSelection"],()=>{dt(this.gos)?o():i()}),dt(this.gos)&&o()}}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",i=>this.onSuppressCellFocusChanged(i.currentValue)),this.addManagedPropertyListeners(["groupSuppressBlankHeader","getBusinessKeyForNode","fullWidthCellRenderer","fullWidthCellRendererParams","suppressStickyTotalRow","groupRowRenderer","groupRowRendererParams","loadingCellRenderer","loadingCellRendererParams","detailCellRenderer","detailCellRendererParams","enableRangeSelection","enableCellTextSelection"],()=>this.redrawRows()),this.addManagedPropertyListener("cellSelection",({currentValue:i,previousValue:r})=>{(!r&&i||r&&!i)&&this.redrawRows()});let{stickyRowSvc:e,gos:t,showRowGroupCols:o}=this.beans;if(o&&this.addManagedPropertyListener("showOpenedGroup",()=>{let i=o.columns;i.length&&this.refreshCells({columns:i,force:!0})}),e)this.stickyRowFeature=e.createStickyRowFeature(this,this.createRowCon.bind(this),this.destroyRowCtrls.bind(this));else{let i=this.gridBodyCtrl;i.setStickyTopHeight(0),i.setStickyBottomHeight(0)}this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=se(t,"print"),this.embedFullWidthRows=this.printLayout||t.get("embedFullWidthRows"),this.redrawAfterModelUpdate()}initialiseCache(){if(this.gos.get("keepDetailRows")){let e=this.getKeepDetailRowsCount(),t=e!=null?e:3;this.cachedRowCtrls=new dy(t)}}getKeepDetailRowsCount(){return this.gos.get("keepDetailRowsCount")}getStickyTopRowCtrls(){var e,t;return(t=(e=this.stickyRowFeature)==null?void 0:e.stickyTopRowCtrls)!=null?t:[]}getStickyBottomRowCtrls(){var e,t;return(t=(e=this.stickyRowFeature)==null?void 0:e.stickyBottomRowCtrls)!=null?t:[]}updateAllRowCtrls(){var i,r;let e=Object.values(this.rowCtrlsByRowIndex),t=Object.values(this.zombieRowCtrls),o=(r=(i=this.cachedRowCtrls)==null?void 0:i.getEntries())!=null?r:[];t.length>0||o.length>0?this.allRowCtrls=[...e,...t,...o]:this.allRowCtrls=e}isCellBeingRendered(e,t){var r;let o=this.rowCtrlsByRowIndex[e];return!t||!o?!!o:o.isFullWidth()?!0:!!((r=this.beans.spannedRowRenderer)==null?void 0:r.getCellByPosition({rowIndex:e,column:t,rowPinned:null}))||!!o.getCellCtrl(t)||!o.isRowRendered()}updateCellFocus(e){for(let t of this.getAllCellCtrls())t.onCellFocused(e);for(let t of this.getFullWidthRowCtrls())t.onFullWidthRowFocused(e)}onCellFocusChanged(e){var t;if((e==null?void 0:e.rowIndex)!=null&&!e.rowPinned){let o=(t=this.beans.colModel.getCol(e.column))!=null?t:void 0;this.isCellBeingRendered(e.rowIndex,o)||this.redraw()}this.updateCellFocus(e)}onSuppressCellFocusChanged(e){for(let t of this.getAllCellCtrls())t.onSuppressCellFocusChanged(e);for(let t of this.getFullWidthRowCtrls())t.onSuppressCellFocusChanged(e)}registerCellEventListeners(){this.addManagedEventListeners({cellFocused:e=>this.onCellFocusChanged(e),cellFocusCleared:()=>this.updateCellFocus(),flashCells:e=>{let{cellFlashSvc:t}=this.beans;if(t)for(let o of this.getAllCellCtrls())t.onFlashCells(o,e)},columnHoverChanged:()=>{for(let e of this.getAllCellCtrls())e.onColumnHover()},displayedColumnsChanged:()=>{for(let e of this.getAllCellCtrls())e.onDisplayedColumnsChanged()},displayedColumnsWidthChanged:()=>{if(this.printLayout)for(let 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(let e of this.destroyFuncsForColumnListeners)e();this.destroyFuncsForColumnListeners.length=0}refreshListenersToColumnsForCellComps(){this.removeGridColumnListeners();let e=this.colModel.getCols();for(let t of e){let o=l=>{for(let c of this.getAllCellCtrls())c.column===t&&l(c)},i=()=>{o(l=>l.onLeftChanged())},r=()=>{o(l=>l.onWidthChanged())},a=()=>{o(l=>l.onFirstRightPinnedChanged())},n=()=>{o(l=>l.onLastLeftPinnedChanged())},s=()=>{o(l=>l.onColDefChanged())};t.__addEventListener("leftChanged",i),t.__addEventListener("widthChanged",r),t.__addEventListener("firstRightPinnedChanged",a),t.__addEventListener("lastLeftPinnedChanged",n),t.__addEventListener("colDefChanged",s),this.destroyFuncsForColumnListeners.push(()=>{t.__removeEventListener("leftChanged",i),t.__removeEventListener("widthChanged",r),t.__removeEventListener("firstRightPinnedChanged",a),t.__removeEventListener("lastLeftPinnedChanged",n),t.__removeEventListener("colDefChanged",s)})}}onDomLayoutChanged(){let e=se(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;let e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e)}onPageLoaded(e){let t={recycleRows:e.keepRenderedRows,animate:e.animate,newData:e.newData,newPage:e.newPage,onlyBody:!0};this.redrawAfterModelUpdate(t)}getAllCellsNotSpanningForColumn(e){var o;let t=[];for(let i of this.getAllRowCtrls()){let r=(o=i.getCellCtrl(e,!0))==null?void 0:o.eGui;r&&t.push(r)}return t}refreshFloatingRowComps(e=!0){this.refreshFloatingRows(this.topRowCtrls,"top",e),this.refreshFloatingRows(this.bottomRowCtrls,"bottom",e)}refreshFloatingRows(e,t,o){var l;let{pinnedRowModel:i,beans:r,printLayout:a}=this,n=Object.fromEntries(e.map(c=>[c.rowNode.id,c]));i==null||i.forEachPinnedRow(t,(c,d)=>{let g=e[d];g&&i.getPinnedRowById(g.rowNode.id,t)===void 0&&(g.destroyFirstPass(),g.destroySecondPass()),c.id in n&&o?(e[d]=n[c.id],delete n[c.id]):e[d]=new mr(c,r,!1,!1,a)});let s=(l=t==="top"?i==null?void 0:i.getPinnedTopRowCount():i==null?void 0:i.getPinnedBottomRowCount())!=null?l:0;e.length=s}onPinnedRowDataChanged(){let e={recycleRows:!0};this.redrawAfterModelUpdate(e)}onPinnedRowsChanged(){this.redrawAfterModelUpdate({recycleRows:!0})}redrawRow(e,t=!1){var o,i;if(e.sticky)(o=this.stickyRowFeature)==null||o.refreshStickyNode(e);else if((i=this.cachedRowCtrls)!=null&&i.has(e)){this.cachedRowCtrls.removeRow(e);return}else{let r=a=>{let n=a[e.rowIndex];n&&n.rowNode===e&&(n.destroyFirstPass(),n.destroySecondPass(),a[e.rowIndex]=this.createRowCon(e,!1,!1))};switch(e.rowPinned){case"top":r(this.topRowCtrls);break;case"bottom":r(this.bottomRowCtrls);break;default:r(this.rowCtrlsByRowIndex),this.updateAllRowCtrls()}}t||this.dispatchDisplayedRowsChanged(!1)}redrawRows(e){let{editSvc:t}=this.beans;if(t!=null&&t.isEditing()&&(t.isBatchEditing()?t.cleanupEditors():t.stopEditing(void 0,{source:"api"})),e!=null){for(let i of e!=null?e:[])this.redrawRow(i,!0);this.dispatchDisplayedRowsChanged(!1);return}this.redrawAfterModelUpdate()}redrawAfterModelUpdate(e={}){var s;this.getLockOnRefresh();let t=(s=this.beans.focusSvc)==null?void 0:s.getFocusCellToUseAfterRefresh();this.updateContainerHeights(),this.scrollToTopIfNewData(e);let o=!e.domLayoutChanged&&!!e.recycleRows,i=e.animate&&bo(this.gos),r=o?this.getRowsToRecycle():null;o||this.removeAllRowComps(),this.workOutFirstAndLastRowsToRender();let{stickyRowFeature:a,gos:n}=this;if(a){a.checkStickyRows();let l=a.extraTopHeight+a.extraBottomHeight;l&&this.updateContainerHeights(l)}this.recycleRows(r,i),this.gridBodyCtrl.updateRowCount(),e.onlyBody||this.refreshFloatingRowComps(n.get("enableRowPinning")?o:void 0),this.dispatchDisplayedRowsChanged(),t!=null&&this.restoreFocusedCell(t),this.releaseLockOnRefresh()}scrollToTopIfNewData(e){var i;let t=e.newData||e.newPage,o=this.gos.get("suppressScrollOnNewData");t&&!o&&(this.gridBodyCtrl.scrollFeature.scrollToTop(),(i=this.stickyRowFeature)==null||i.resetOffsets())}updateContainerHeights(e=0){let{rowContainerHeight:t}=this;if(this.printLayout){t.setModelHeight(null);return}let o=this.pageBounds.getCurrentPageHeight();o===0&&(o=1),t.setModelHeight(o+e)}getLockOnRefresh(){var e,t;if(this.refreshInProgress)throw new Error(Je(252));this.refreshInProgress=!0,(t=(e=this.beans.frameworkOverrides).getLockOnRefresh)==null||t.call(e)}releaseLockOnRefresh(){var e,t;this.refreshInProgress=!1,(t=(e=this.beans.frameworkOverrides).releaseLockOnRefresh)==null||t.call(e)}isRefreshInProgress(){return this.refreshInProgress}restoreFocusedCell(e){if(!e)return;let t=this.beans.focusSvc,o=this.findPositionToFocus(e);if(!o){t.focusHeaderPosition({headerPosition:{headerRowIndex:Fe(this.beans)-1,column:e.column}});return}if(e.rowIndex!==o.rowIndex||e.rowPinned!=o.rowPinned){t.setFocusedCell({...o,preventScrollOnBrowserFocus:!0,forceBrowserFocus:!0});return}t.doesRowOrCellHaveBrowserFocus()||this.updateCellFocus(O(this.gos,{...o,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,type:"cellFocused"}))}findPositionToFocus(e){let{pagination:t,pageBounds:o}=this.beans,i=e;for(i.rowPinned==null&&t&&o&&!t.isRowInPage(i.rowIndex)&&(i={rowPinned:null,rowIndex:o.getFirstRow()});i;){if(i.rowPinned==null&&o)if(i.rowIndexo.getLastRow()&&(i={rowPinned:null,rowIndex:o.getLastRow()});let r=this.getRowByPosition(i);if(r!=null&&r.isAlive())return{...r.getRowPosition(),column:e.column};i=lr(this.beans,i)}return null}getAllCellCtrls(){let e=[],t=this.getAllRowCtrls(),o=t.length;for(let i=0;i{let r=i.rowNode;return Ka(r,t)})}getCellCtrls(e,t){let o;M(t)&&(o={},t.forEach(r=>{let a=this.colModel.getCol(r);M(a)&&(o[a.getId()]=!0)}));let i=[];for(let r of this.getRowCtrls(e))for(let a of r.getAllCellCtrls()){let n=a.column.getId();o&&!o[n]||i.push(a)}return i}destroy(){this.removeAllRowComps(!0),super.destroy()}removeAllRowComps(e=!1){var o;let t=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(t,e),(o=this.stickyRowFeature)==null||o.destroyStickyCtrls()}getRowsToRecycle(){let e=[];for(let o of Object.keys(this.rowCtrlsByRowIndex))this.rowCtrlsByRowIndex[o].rowNode.id==null&&e.push(o);this.removeRowCtrls(e);let t={};for(let o of Object.values(this.rowCtrlsByRowIndex)){let i=o.rowNode;t[i.id]=o}return this.rowCtrlsByRowIndex={},t}removeRowCtrls(e,t=!1){for(let o of e){let i=this.rowCtrlsByRowIndex[o];i&&(i.destroyFirstPass(t),i.destroySecondPass()),delete this.rowCtrlsByRowIndex[o]}}onBodyScroll(e){e.direction==="vertical"&&this.redraw({afterScroll:!0})}redraw(e={}){let{focusSvc:t,animationFrameSvc:o}=this.beans,{afterScroll:i}=e,r,a=this.stickyRowFeature;a&&(r=(t==null?void 0:t.getFocusCellToUseAfterRefresh())||void 0);let n=this.firstRenderedRow,s=this.lastRenderedRow;this.workOutFirstAndLastRowsToRender();let l=!1;if(a){l=a.checkStickyRows();let d=a.extraTopHeight+a.extraBottomHeight;d&&this.updateContainerHeights(d)}let c=this.firstRenderedRow!==n||this.lastRenderedRow!==s;if(!(i&&!l&&!c)&&(this.getLockOnRefresh(),this.recycleRows(null,!1,i),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(i&&!l),r!=null)){let d=t==null?void 0:t.getFocusCellToUseAfterRefresh();r!=null&&d==null&&(o==null||o.flushAllFrames(),this.restoreFocusedCell(r))}}removeRowCompsNotToDraw(e,t){let o={};for(let a of e)o[a]=!0;let r=Object.keys(this.rowCtrlsByRowIndex).filter(a=>!o[a]);this.removeRowCtrls(r,t)}calculateIndexesToDraw(e){var n,s;let t=[];for(let l=this.firstRenderedRow;l<=this.lastRenderedRow;l++)t.push(l);let o=this.beans.pagination,i=(s=(n=this.beans.focusSvc)==null?void 0:n.getFocusedCell())==null?void 0:s.rowIndex;i!=null&&(ithis.lastRenderedRow)&&(!o||o.isRowInPage(i))&&i{let c=l.rowNode.rowIndex;c==null||c===i||(cthis.lastRenderedRow)&&this.doNotUnVirtualiseRow(l)&&t.push(c)};for(let l of Object.values(this.rowCtrlsByRowIndex))r(l);if(e)for(let l of Object.values(e))r(l);t.sort((l,c)=>l-c);let a=[];for(let l=0;l{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(){let{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(){let e=[];for(let t of this.getFullWidthRowCtrls()){let o=t.rowNode.rowIndex;e.push(o.toString())}this.refreshFloatingRowComps(),this.removeRowCtrls(e),this.redraw({afterScroll:!0})}getFullWidthRowCtrls(e){let t=ja(e);return this.getAllRowCtrls().filter(o=>{if(!o.isFullWidth())return!1;let i=o.rowNode;return!(t!=null&&!Ka(i,t))})}createOrUpdateRowCtrl(e,t,o,i){let r,a=this.rowCtrlsByRowIndex[e];if(a||(r=this.rowModel.getRow(e),M(r)&&M(t)&&t[r.id]&&r.alreadyRendered&&(a=t[r.id],t[r.id]=null)),!a)if(r||(r=this.rowModel.getRow(e)),M(r))a=this.createRowCon(r,o,i);else return;r&&(r.alreadyRendered=!0),this.rowCtrlsByRowIndex[e]=a}destroyRowCtrls(e,t){let o=[];if(e){for(let i of Object.values(e))if(i){if(this.cachedRowCtrls&&i.isCacheable()){this.cachedRowCtrls.addRow(i);continue}if(i.destroyFirstPass(!t),t){let r=i.instanceId;this.zombieRowCtrls[r]=i,o.push(()=>{i.destroySecondPass(),delete this.zombieRowCtrls[r]})}else i.destroySecondPass()}}t&&(o.push(()=>{this.isAlive()&&(this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged())}),window.setTimeout(()=>{for(let i of o)i()},ly))}getRowBuffer(){return this.gos.get("rowBuffer")}getRowBufferInPixels(){let e=this.getRowBuffer(),t=Ut(this.beans);return e*t}workOutFirstAndLastRowsToRender(){let{rowContainerHeight:e,pageBounds:t,rowModel:o}=this;e.updateOffset();let i,r;if(!o.isRowsToRender())i=0,r=-1;else if(this.printLayout)this.beans.environment.refreshRowHeightVariable(),i=t.getFirstRow(),r=t.getLastRow();else{let d=this.getRowBufferInPixels(),g=this.ctrlsSvc.getScrollFeature(),u=this.gos.get("suppressRowVirtualisation"),h=!1,p,f;do{let y=t.getPixelOffset(),{pageFirstPixel:x,pageLastPixel:R}=t.getCurrentPagePixelRange(),F=e.divStretchOffset,P=g.getVScrollPosition(),T=P.top,I=P.bottom;u?(p=x+F,f=R+F):(p=Math.max(T+y-d,x)+F,f=Math.min(I+y+d,R)+F),this.firstVisibleVPixel=Math.max(T+y,x)+F,this.lastVisibleVPixel=Math.min(I+y,R)+F,h=this.ensureAllRowsInRangeHaveHeightsCalculated(p,f)}while(h);let m=o.getRowIndexAtPixel(p),v=o.getRowIndexAtPixel(f),C=t.getFirstRow(),w=t.getLastRow();mw&&(v=w),i=m,r=v}let a=se(this.gos,"normal"),n=this.gos.get("suppressMaxRenderedRowRestriction"),s=Math.max(this.getRowBuffer(),500);a&&!n&&r-i>s&&(r=i+s);let l=i!==this.firstRenderedRow,c=r!==this.lastRenderedRow;(l||c)&&(this.firstRenderedRow=i,this.lastRenderedRow=r,this.eventSvc.dispatchEvent({type:"viewportChanged",firstRow:i,lastRow:r}))}dispatchFirstDataRenderedEvent(){this.dataFirstRenderedFired||(this.dataFirstRenderedFired=!0,ht(this.beans,()=>{this.beans.eventSvc.dispatchEvent({type:"firstDataRendered",firstRow:this.firstRenderedRow,lastRow:this.lastRenderedRow})}))}ensureAllRowsInRangeHaveHeightsCalculated(e,t){var s,l;let o=(s=this.pinnedRowModel)==null?void 0:s.ensureRowHeightsValid(),i=(l=this.stickyRowFeature)==null?void 0:l.ensureRowHeightsValid(),{pageBounds:r,rowModel:a}=this,n=a.ensureRowHeightsValid(e,t,r.getFirstRow(),r.getLastRow());return(n||i)&&this.eventSvc.dispatchEvent({type:"recalculateRowBounds"}),i||n||o?(this.updateContainerHeights(),!0):!1}doNotUnVirtualiseRow(e){var c;let i=e.rowNode,r=this.focusSvc.isRowFocused(i.rowIndex,i.rowPinned),a=(c=this.editSvc)==null?void 0:c.isEditing(e),n=i.detail;return r||a||n?!!this.isRowPresent(i):!1}isRowPresent(e){var t,o;return this.rowModel.isRowPresent(e)?(o=(t=this.beans.pagination)==null?void 0:t.isRowInPage(e.rowIndex))!=null?o:!0:!1}createRowCon(e,t,o){var n,s,l;let i=(s=(n=this.cachedRowCtrls)==null?void 0:n.getRow(e))!=null?s:null;if(i)return i;let r=o&&!this.printLayout&&!!((l=this.beans.animationFrameSvc)!=null&&l.active);return new mr(e,this.beans,t,r,this.printLayout)}getRenderedNodes(){let e=Object.values(this.rowCtrlsByRowIndex).map(i=>i.rowNode),t=this.getStickyTopRowCtrls().map(i=>i.rowNode),o=this.getStickyBottomRowCtrls().map(i=>i.rowNode);return[...t,...e,...o]}getRowByPosition(e){let t,{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(i=>i.rowNode.rowIndex===o)||null,t||(t=this.getStickyBottomRowCtrls().find(i=>i.rowNode.rowIndex===o)||null));break}return t}isRangeInRenderedViewport(e,t){if(e==null||t==null)return!1;let i=e>this.lastRenderedRow;return!(tthis.maxCount){let t=this.entriesList[0];t.destroyFirstPass(),t.destroySecondPass(),this.removeFromCache(t)}}getRow(e){if((e==null?void 0:e.id)==null)return null;let t=this.entriesMap[e.id];return t?(this.removeFromCache(t),t.setCached(!1),t.rowNode!=e?null:t):null}has(e){return this.entriesMap[e.id]!=null}removeRow(e){let t=e.id,o=this.entriesMap[t];delete this.entriesMap[t],Xe(this.entriesList,o)}removeFromCache(e){let t=e.rowNode.id;delete this.entriesMap[t],Xe(this.entriesList,e)}getEntries(){return this.entriesList}};function ja(e){if(!e)return;let t={top:{},bottom:{},normal:{}};for(let o of e){let i=o.id;switch(o.rowPinned){case"top":t.top[i]=o;break;case"bottom":t.bottom[i]=o;break;default:t.normal[i]=o;break}}return t}function Ka(e,t){let o=e.id;switch(e.rowPinned){case"top":return t.top[o]!=null;case"bottom":return t.bottom[o]!=null;default:return t.normal[o]!=null}}var gy=class extends S{constructor(){super(...arguments),this.beanName="rowNodeSorter",this.accentedSort=!1,this.primaryColumnsSortGroups=!1,this.pivotActive=!1}postConstruct(){this.firstLeaf=ee(this.gos)?gr:uy,this.addManagedPropertyListeners(["accentedSort","autoGroupColumnDef","treeData"],this.updateOptions.bind(this));let e=this.updatePivotModeState.bind(this);this.addManagedEventListeners({columnPivotModeChanged:e,columnPivotChanged:e}),this.updateOptions(),e()}updateOptions(){this.accentedSort=!!this.gos.get("accentedSort"),this.primaryColumnsSortGroups=nt(this.gos)}updatePivotModeState(){this.pivotActive=this.beans.colModel.isPivotActive()}doFullSortInPlace(e,t){return e.sort((o,i)=>this.compareRowNodes(t,o,i))}compareRowNodes(e,t,o){if(t===o)return 0;let i=this.accentedSort;for(let r=0,a=e.length;r{if(e.data)return e;let t=e.childrenAfterGroup;for(;t!=null&&t.length;){let o=t[0];if(o.data)return o;t=o.childrenAfterGroup}},xl=e=>{if(!e)return e;if(typeof e=="bigint")return e({tag:"span",ref:`eSort${e}`,cls:`ag-sort-indicator-icon ag-sort-${t} ag-hidden`,attrs:{"aria-hidden":"true"}}),py={tag:"span",cls:"ag-sort-indicator-container",children:[Ht("Order","order"),Ht("Asc","ascending-icon"),Ht("Desc","descending-icon"),Ht("Mixed","mixed-icon"),Ht("AbsoluteAsc","absolute-ascending-icon"),Ht("AbsoluteDesc","absolute-descending-icon"),Ht("None","none-icon")]},Yn=class extends _{constructor(e){super(),this.eSortOrder=E,this.eSortAsc=E,this.eSortDesc=E,this.eSortMixed=E,this.eSortNone=E,this.eSortAbsoluteAsc=E,this.eSortAbsoluteDesc=E,e||this.setTemplate(py)}attachCustomElements(e,t,o,i,r,a,n){this.eSortOrder=e,this.eSortAsc=t,this.eSortDesc=o,this.eSortMixed=i,this.eSortNone=r,this.eSortAbsoluteAsc=a,this.eSortAbsoluteDesc=n}setupSort(e,t=!1,o){if(this.column=e,this.suppressOrder=t,this.getSortDefOverride=o,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);let i=this.updateIcons.bind(this),r=this.onSortChanged.bind(this);this.addManagedPropertyListener("unSortIcon",i),this.addManagedEventListeners({newColumnsLoaded:i,sortChanged:r,columnRowGroupChanged:r}),this.onSortChanged()}addInIcon(e,t,o){if(t==null)return;let i=ye(e,this.beans,o);i&&t.appendChild(i)}onSortChanged(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()}updateIcons(){let{eSortAsc:e,eSortDesc:t,eSortAbsoluteAsc:o,eSortAbsoluteDesc:i,eSortNone:r,column:a,gos:n,beans:s}=this,l=qh(a,s,this.getSortDefOverride),c=l.isDefaultSortAllowed,d=l.isAbsoluteSortAllowed,{isAbsoluteSort:g,isDefaultSort:u,isAscending:h,isDescending:p,direction:f}=l;if(e&&q(e,h&&u&&c,{skipAriaHidden:!0}),t&&q(t,p&&u&&c,{skipAriaHidden:!0}),r){let m=!a.getColDef().unSortIcon&&!n.get("unSortIcon");q(r,!m&&!f,{skipAriaHidden:!0})}o&&q(o,h&&g&&d,{skipAriaHidden:!0}),i&&q(i,p&&g&&d,{skipAriaHidden:!0})}setupMultiSortIndicator(){let{eSortMixed:e,column:t,gos:o}=this;this.addInIcon("sortUnSort",e,t);let i=t.getColDef().showRowGroup;nt(o)&&i&&(this.addManagedEventListeners({sortChanged:this.updateMultiSortIndicator.bind(this),columnRowGroupChanged:this.updateMultiSortIndicator.bind(this)}),this.updateMultiSortIndicator())}updateMultiSortIndicator(){var i;let{eSortMixed:e,beans:t,column:o}=this;if(e){let r=((i=t.sortSvc.getDisplaySortForColumn(o))==null?void 0:i.direction)==="mixed";q(e,r,{skipAriaHidden:!0})}}updateSortOrder(){var s;let{eSortOrder:e,column:t,beans:{sortSvc:o}}=this;if(!e)return;let i=o.getColumnsWithSortingOrdered(),r=(s=o.getDisplaySortIndexForColumn(t))!=null?s:-1,a=i.some(l=>{var c;return(c=o.getDisplaySortIndexForColumn(l))!=null?c:!1}),n=r>=0&&a;q(e,n,{skipAriaHidden:!0}),r>=0?e.textContent=(r+1).toString():ne(e)}refresh(){this.onSortChanged()}},fy={selector:"AG-SORT-INDICATOR",component:Yn},my=class extends S{constructor(){super(...arguments),this.beanName="sortSvc"}progressSort(e,t,o){let i=this.getNextSortDirection(e);this.setSortForColumn(e,i,t,o)}progressSortFromEvent(e,t){let i=this.gos.get("multiSortKey")==="ctrl"?t.ctrlKey||t.metaKey:t.shiftKey;this.progressSort(e,i,"uiColumnSorted")}setSortForColumn(e,t,o,i){var d;let{gos:r,showRowGroupCols:a}=this.beans,n=nt(r),s=[e];if(n&&e.getColDef().showRowGroup){let g=(d=a==null?void 0:a.getSourceColumnsForGroupColumn)==null?void 0:d.call(a,e),u=g==null?void 0:g.filter(h=>h.isSortable());u&&(s=[e,...u])}for(let g of s)this.setColSort(g,t,i);let l=(o||r.get("alwaysMultiSort"))&&!r.get("suppressMultiSort"),c=[];if(!l){let g=this.clearSortBarTheseColumns(s,i);c.push(...g)}this.updateSortIndex(e),c.push(...s),this.dispatchSortChangedEvents(i,c)}updateSortIndex(e){let{gos:t,colModel:o,showRowGroupCols:i}=this.beans,r=nt(t),a=i==null?void 0:i.getShowRowGroupCol(e.getId()),n=r&&a||e,s=this.getColumnsWithSortingOrdered();o.forAllCols(d=>this.setColSortIndex(d,null));let l=s.filter(d=>r&&d.getColDef().showRowGroup?!1:d!==n);(n.getSortDef()?[...l,n]:l).forEach((d,g)=>this.setColSortIndex(d,g))}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){let o={type:"sortChanged",source:e};t&&(o.columns=t),this.eventSvc.dispatchEvent(o)}clearSortBarTheseColumns(e,t){let o=[];return this.beans.colModel.forAllCols(i=>{e.includes(i)||(i.getSortDef()&&o.push(i),this.setColSort(i,void 0,t))}),o}getNextSortDirection(e,t){let o=e.getSortingOrder(),i=t===void 0?e.getSortDef():Me(t),a=o.findIndex(n=>Gi(n,i))+1;return a>=o.length&&(a=0),Me(o[a])}getIndexedSortMap(){var c;let{gos:e,colModel:t,showRowGroupCols:o,rowGroupColsSvc:i}=this.beans,r=[];if(t.forAllCols(d=>{d.getSortDef()&&r.push(d)}),t.isPivotMode()){let d=nt(e);r=r.filter(g=>{let u=!!g.getAggFunc(),h=!g.isPrimary(),p=d?o==null?void 0:o.getShowRowGroupCol(g.getId()):g.getColDef().showRowGroup;return u||h||p})}let a=(c=i==null?void 0:i.columns.filter(d=>!!d.getSortDef()))!=null?c:[],n={};r.forEach((d,g)=>n[d.getId()]=g),r.sort((d,g)=>{let u=d.getSortIndex(),h=g.getSortIndex();if(u!=null&&h!=null)return u-h;if(u==null&&h==null){let p=n[d.getId()],f=n[g.getId()];return p>f?1:-1}else return h==null?-1:1});let s=nt(e)&&!!a.length;s&&(r=[...new Set(r.map(d=>{var g;return(g=o==null?void 0:o.getShowRowGroupCol(d.getId()))!=null?g:d}))]);let l=new Map;if(r.forEach((d,g)=>l.set(d,g)),s)for(let d of a){let g=o.getShowRowGroupCol(d.getId());l.set(d,l.get(g))}return l}getColumnsWithSortingOrdered(){return[...this.getIndexedSortMap().entries()].sort(([,e],[,t])=>e-t).map(([e])=>e)}collectSortItems(e=!1){var i,r;let t=[],o=this.getColumnsWithSortingOrdered();for(let a of o){let n=(i=a.getSortDef())==null?void 0:i.direction;if(!n)continue;let s=gt((r=a.getSortDef())==null?void 0:r.type),l={sort:n,type:s};e?l.colId=a.getId():l.column=a,t.push(l)}return t}getSortModel(){return this.collectSortItems(!0)}getSortOptions(){return this.collectSortItems()}canColumnDisplayMixedSort(e){let t=nt(this.gos),o=!!e.getColDef().showRowGroup;return t&&o}getDisplaySortForColumn(e){var n,s;let t=(n=this.beans.showRowGroupCols)==null?void 0:n.getSourceColumnsForGroupColumn(e);if(!this.canColumnDisplayMixedSort(e)||!(t!=null&&t.length))return e.getSortDef();let i=e.getColDef().field!=null||!!e.getColDef().valueGetter?[e,...t]:t,r=i[0].getSortDef();return i.every(l=>Gi(l.getSortDef(),r))?r:{type:gt((s=e.getSortDef())==null?void 0:s.type),direction:"mixed"}}getDisplaySortIndexForColumn(e){return this.getIndexedSortMap().get(e)}setupHeader(e,t){let o=()=>{var a;let{type:i,direction:r}=Me(t.getSortDef());if(e.toggleCss("ag-header-cell-sorted-asc",r==="asc"),e.toggleCss("ag-header-cell-sorted-desc",r==="desc"),e.toggleCss("ag-header-cell-sorted-abs-asc",i==="absolute"&&r==="asc"),e.toggleCss("ag-header-cell-sorted-abs-desc",i==="absolute"&&r==="desc"),e.toggleCss("ag-header-cell-sorted-none",!r),t.getColDef().showRowGroup){let n=(a=this.beans.showRowGroupCols)==null?void 0:a.getSourceColumnsForGroupColumn(t),l=!(n==null?void 0:n.every(c=>{var d;return r==((d=c.getSortDef())==null?void 0:d.direction)}));e.toggleCss("ag-header-cell-sorted-mixed",l)}};e.addManagedEventListeners({sortChanged:o,columnPinned:o,columnRowGroupChanged:o,displayedColumnsChanged:o})}initCol(e){let{sortIndex:t,initialSortIndex:o}=e.colDef,i=Wc(e.colDef);i&&e.setSortDef(i,!0),t!==void 0?t!==null&&(e.sortIndex=t):o!==null&&(e.sortIndex=o)}updateColSort(e,t,o){t!==void 0&&this.setColSort(e,Me(t),o)}setColSort(e,t,o){Gi(e.getSortDef(),t)||(e.setSortDef(Me(t),t===void 0),e.dispatchColEvent("sortChanged",o)),e.dispatchStateUpdatedEvent("sort")}setColSortIndex(e,t){e.sortIndex=t,e.dispatchStateUpdatedEvent("sortIndex")}createSortIndicator(e){return new Yn(e)}getSortIndicatorSelector(){return fy}},ug={moduleName:"Sort",version:D,beans:[my,gy],apiFunctions:{onSortChanged:hy},userComponents:{agSortIndicator:Yn},icons:{sortAscending:"asc",sortDescending:"desc",sortUnSort:"none",sortAbsoluteAscending:"aasc",sortAbsoluteDescending:"adesc"}},vy=class extends S{constructor(){super(...arguments),this.beanName="syncSvc",this.waitingForColumns=!1}postConstruct(){this.addManagedPropertyListener("columnDefs",e=>this.setColumnDefs(e))}start(){this.beans.ctrlsSvc.whenReady(this,()=>{let e=this.gos.get("columnDefs");e?this.setColumnsAndData(e):this.waitingForColumns=!0,this.gridReady()})}setColumnsAndData(e){let{colModel:t,rowModel:o}=this.beans;t.setColumnDefs(e!=null?e:[],"gridInitializing"),o.start()}gridReady(){let{eventSvc:e,gos:t}=this;e.dispatchEvent({type:"gridReady"}),Et(t,`initialised successfully, enterprise = ${t.isModuleRegistered("EnterpriseCore")}`)}setColumnDefs(e){let t=this.gos.get("columnDefs");if(t){if(this.waitingForColumns){this.waitingForColumns=!1,this.setColumnsAndData(t);return}this.beans.colModel.setColumnDefs(t,ko(e.source))}}};function Cy(e){var t;(t=e.valueCache)==null||t.expire()}function wy(e,t){var l,c;let{colKey:o,rowNode:i,useFormatter:r,from:a="edit"}=t,n=(l=e.colModel.getColDefCol(o))!=null?l:e.colModel.getCol(o);if(!n)return null;let s=e.valueSvc.getValueForDisplay({column:n,node:i,includeValueFormatted:r,from:a});return r?(c=s.valueFormatted)!=null?c:zo(s.value):s.value}var by="paste",yy=class extends S{constructor(){super(...arguments),this.beanName="changeDetectionSvc",this.deferredDepth=0,this.batchedPath=null,this.batchedNodes=null}destroy(){super.destroy(),this.batchedPath=null,this.batchedNodes=null}postConstruct(){this.csrm=ot(this.beans),this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this)})}beginDeferred(){this.deferredDepth++}endDeferred(){var i;if(this.deferredDepth===0||--this.deferredDepth>0)return;let e=this.batchedPath,t=this.batchedNodes;this.batchedPath=null,this.batchedNodes=null,e&&((i=this.csrm)==null||i.doAggregate(e));let{rowRenderer:o}=this.beans;if(t)for(let r of t)kl(o,r);if(e){let r=e.getSortedRows();for(let a=0,n=r.length;a{let{sibling:o,pinnedSibling:i}=t;e.refreshRowByNode(t),e.refreshRowByNode(o),e.refreshRowByNode(i),e.refreshRowByNode(o==null?void 0:o.pinnedSibling),e.refreshRowByNode(i==null?void 0:i.sibling)},Sy=class extends S{constructor(){super(...arguments),this.beanName="expressionSvc",this.cache={}}evaluate(e,t){if(typeof e=="string")return this.evaluateExpression(e,t);W(15,{expression:e})}evaluateExpression(e,t){try{return this.createExpressionFunction(e)(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 W(16,{expression:e,params:t,e:o}),null}}createExpressionFunction(e){let t=this.cache;if(t[e])return t[e];let 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+";"}},xy=class extends S{constructor(){super(...arguments),this.beanName="valueCache",this.cacheVersion=0}postConstruct(){let 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){let 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]}},ky={moduleName:"ValueCache",version:D,beans:[xy],apiFunctions:{expireValueCache:Cy}},Ry={moduleName:"Expression",version:D,beans:[Sy]},Ey={moduleName:"ChangeDetection",version:D,beans:[yy]},Fy={moduleName:"CellApi",version:D,apiFunctions:{getCellValue:wy}},Dy=class extends S{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,this.rowGroupColsSvc=e.rowGroupColsSvc}postConstruct(){this.initialised||this.init()}init(){let{gos:e,valueCache:t}=this;this.executeValueGetter=t?this.executeValueGetterWithValueCache.bind(this):this.executeValueGetterWithoutValueCache.bind(this),this.isSsrm=mi(e),this.cellExpressions=e.get("enableCellExpressions"),this.isTreeData=e.get("treeData"),this.initialised=!0;let o=i=>this.callColumnCellValueChangedHandler(i);this.eventSvc.addListener("cellValueChanged",o,!0),this.addDestroyFunc(()=>this.eventSvc.removeListener("cellValueChanged",o,!0)),this.addManagedPropertyListener("treeData",i=>this.isTreeData=i.currentValue)}getValueForDisplay(e){let t=this.beans,o=e.column,i=e.node,r=t.showRowGroupColValueSvc,a=!o&&i.group,n=o==null?void 0:o.colDef.showRowGroup,s=!this.isTreeData||i.footer;if(r&&s&&(a||n)){let u=r.getGroupValue(i,o,this.displayIgnoresAggData(i));return u==null?{value:null,valueFormatted:null}:{value:u.value,valueFormatted:e.includeValueFormatted?r.formatAndPrefixGroupColValue(u,o,e.exporting):null}}if(!o)return{value:i.key,valueFormatted:null};let l=this.getValue(o,i,e.from,this.displayIgnoresAggData(i)),c=l,d=t.formula;o.isAllowFormula()&&(d!=null&&d.isFormula(l))&&(e.useRawFormula?(l=d.normaliseFormula(l,!0),c=d.resolveValue(o,i)):(l=d.resolveValue(o,i),c=l));let g=e.includeValueFormatted&&!(e.exporting&&o.colDef.useValueFormatterForExport===!1);return{value:l,valueFormatted:g?this.formatValue(o,i,c):null}}getValue(e,t,o,i=!1){var l,c;if(this.initialised||this.init(),!t)return;let r=e.colDef,a=t.group;if(!a){let d=r.pivotValueColumn;d&&(e=d)}let n=(l=this.editSvc)==null?void 0:l.getPendingEditValue(t,e,o);if(n!==void 0)return n;let s=this.resolveValue(e,t,i,a);if(s===void 0){if(a){let d=r.showRowGroup;if(typeof d=="string"){let g=(c=this.rowGroupColsSvc)==null?void 0:c.getColumnIndex(d);if(g!=null&&g>t.level)return null}}return}if(this.cellExpressions&&ws(s)){let d=s.substring(1);s=this.executeValueGetter(d,t.data,e,t)}return s}displayIgnoresAggData(e){return!e.group||e.footer||e.level===-1||!e.sibling||this.gos.get("groupSuppressBlankHeader")||e.leafGroup&&this.colModel.isPivotMode()?!1:!!e.expanded}resolveValue(e,t,o,i){let r=e.colDef,a=e.colId,n=!i&&this.formulaDataSvc;if(n&&n.hasDataSource()&&r.allowFormula===!0){let C=n.getFormula({column:e,rowNode:t});if(ws(C))return C}let s=i&&!o?t.aggData:void 0,l=this.isTreeData;if(l&&(s==null?void 0:s[a])!==void 0)return s[a];let c=t.data,d=r.field,g=r.valueGetter;if(l){if(g)return this.executeValueGetter(g,c,e,t);if(d&&c)return Xo(c,d,e.isFieldContainsDots())}let u=t.groupData;if(u&&a in u)return u[a];if((s==null?void 0:s[a])!==void 0)return s[a];let h=r.showRowGroup,p=typeof h!="string"||!i,f=this.isSsrm,m=f&&o&&!!r.aggFunc;if(g&&!m)return p?this.executeValueGetter(g,c,e,t):void 0;if(f&&t.footer&&t.field&&(h===!0||h===t.field))return Xo(c,t.field,e.isFieldContainsDots());if(d&&c&&!m)return p?Xo(c,d,e.isFieldContainsDots()):void 0}parseValue(e,t,o,i){var n,s;let r=e.getColDef();if(r.allowFormula&&((n=this.beans.formula)!=null&&n.isFormula(o)))return o;let a=r.valueParser;if(M(a)){let l=O(this.gos,{node:t,data:t==null?void 0:t.data,oldValue:i,newValue:o,colDef:r,column:e});return typeof a=="function"?a(l):(s=this.expressionSvc)==null?void 0:s.evaluate(a,l)}return o}getDeleteValue(e,t){var o;return M(e.getColDef().valueParser)&&(o=this.parseValue(e,t,"",this.getValueForDisplay({column:e,node:t,from:"edit"}).value))!=null?o:null}formatValue(e,t,o,i,r=!0){let{expressionSvc:a}=this.beans,n=null,s,l=e.getColDef();if(i?s=i:r&&(s=l.valueFormatter),s){let c=t?t.data:null,d=O(this.gos,{value:o,node:t,data:c,colDef:l,column:e});typeof s=="function"?n=s(d):n=a?a.evaluate(s,d):null}else if(l.refData)return l.refData[o]||"";return n==null&&Array.isArray(o)&&(n=o.join(", ")),n}setValue(e,t,o,i){var c;let r=t.getColDef();if(!e.data&&this.canCreateRowNodeData(e,r)&&(e.data={}),!this.isSetValueSupported(t,e,o,r))return!1;let a=this.getValue(t,e,"data"),n=O(this.gos,{node:e,data:e.data,oldValue:a,newValue:o,colDef:r,column:t}),s=!1;if(e.data){let d=this.handleExternalFormulaChange({column:t,eventSource:i,newValue:o,setterParams:n,rowNode:e});if(d!==null)return d;let g=this.computeValueChange({column:t,rowNode:e,newValue:o,params:n,rowData:e.data,valueSetter:r.valueSetter,field:r.field});s=g!=null?g:!0}let l=this.beans.changeDetectionSvc;l==null||l.beginDeferred();try{if(e.group){let d=(c=this.beans.rowGroupingEditValueSvc)==null?void 0:c.setGroupDataValue(e,t,o,a,i,s||o!==a);if(d!==void 0)return!s&&!d?!1:this.finishValueChange(e,t,n,i,o)}return s?this.finishValueChange(e,t,n,i):!1}finally{l==null||l.endDeferred()}}canCreateRowNodeData(e,t){return e.group?!(t.groupRowValueSetter!=null||t.groupRowEditable!=null||t.pivotValueColumn):!0}finishValueChange(e,t,o,i,r){var n;e.resetQuickFilterAggregateText(),(n=this.valueCache)==null||n.onDataChanged();let a=r===void 0?this.getValue(t,e,"data"):r;return this.dispatchCellValueChangedEvent(e,o,a,i),e.pinnedSibling&&this.dispatchCellValueChangedEvent(e.pinnedSibling,o,a,i),!0}isSetValueSupported(e,t,o,i){var c;let{field:r,valueSetter:a}=i,n=this.beans.formula,s=e.isAllowFormula()&&(n==null?void 0:n.isFormula(o)),l=!!((c=this.formulaDataSvc)!=null&&c.hasDataSource());return Q(r)&&Q(a)&&!(l&&s)?t.group&&(i.groupRowValueSetter||i.groupRowEditable)?!0:(k(17),!1):this.dataTypeSvc&&!this.dataTypeSvc.checkType(e,o)?(k(135),!1):!0}handleExternalFormulaChange(e){let{column:t,rowNode:o,newValue:i,eventSource:r,setterParams:a}=e,n=this.beans.formula,s=this.formulaDataSvc;if(!(s!=null&&s.hasDataSource())||!t.isAllowFormula())return null;let l=n==null?void 0:n.isFormula(i),c=s.getFormula({column:t,rowNode:o});if(l){if(!(c!==i))return!1;s.setFormula({column:t,rowNode:o,formula:i});let g=n==null?void 0:n.resolveValue(t,o),u=t.getColDef();if(M(u.valueSetter)||!Q(u.field)){let h={...a,newValue:g};this.computeValueChange({column:t,rowNode:o,newValue:g,params:h,rowData:o.data,valueSetter:u.valueSetter,field:u.field})}return this.finishValueChange(o,t,a,r)}return c!==void 0&&s.setFormula({column:t,rowNode:o,formula:void 0}),null}computeValueChange(e){var s;let{valueSetter:t,params:o,rowData:i,field:r,column:a,newValue:n}=e;return M(t)?typeof t=="function"?t(o):(s=this.expressionSvc)==null?void 0:s.evaluate(t,o):!!i&&this.setValueUsingField(i,r,n,a.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,newRawValue:t.newValue,value:o,source:i})}callColumnCellValueChangedHandler(e){let t=e.colDef.onCellValueChanged;typeof t=="function"&&this.beans.frameworkOverrides.wrapOutgoing(()=>{t(e)})}setValueUsingField(e,t,o,i){if(!t)return!1;let r=!1;if(!i)r=e[t]===o,r||(e[t]=o);else{let a=t.split("."),n=e;for(;a.length>0&&n;){let s=a.shift();a.length===0?(r=n[s]===o,r||(n[s]=o)):n=n[s]}}return!r}executeValueGetterWithValueCache(e,t,o,i){let r=o.getColId(),a=this.valueCache.getValue(i,r);if(a!==void 0)return a;let n=this.executeValueGetterWithoutValueCache(e,t,o,i);return this.valueCache.setValue(i,r,n),n}executeValueGetterWithoutValueCache(e,t,o,i){var n;let r=O(this.gos,{data:t,node:i,column:o,colDef:o.getColDef(),getValue:s=>this.getValueCallback(i,s)}),a;return typeof e=="function"?a=e(r):a=(n=this.expressionSvc)==null?void 0:n.evaluate(e,r),a}getValueCallback(e,t){let o=this.colModel.getColDefCol(t);return o?this.getValue(o,e,"data"):null}getKeyForNode(e,t){let o=this.getValue(e,t,"data"),i=e.getColDef().keyCreator,r=o;if(i){let a=O(this.gos,{value:o,colDef:e.getColDef(),column:e,node:t,data:t.data});r=i(a)}return typeof r=="string"||r==null||(r=String(r),r==="[object Object]"&&k(121)),r}},My={moduleName:"CommunityCore",version:D,beans:[cb,Xm,Hw,fp,sy,MC,ib,Pb,OC,I1,P1,cy,Dy,sb,tb,lb,Vw,vy,Pw,Iw,Wb],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:ev,destroy:tv,isDestroyed:ov,getGridOption:iv,setGridOption:rv,updateGridOptions:Dd,isModuleRegistered:av},dependsOn:[Dw,aC,pC,ug,Bb,IC,Vb,ny,Ey,Gb,M1,L1,B1,Ub,zw,Mw,Ry,jC,G1]};function $a(e){let{inputValue:t,allSuggestions:o,hideIrrelevant:i,filterByPercentageOfBestMatch:r}=e,a=(o!=null?o:[]).map((l,c)=>({value:l,relevance:Py(t,l),idx:c}));if(a.sort((l,c)=>l.relevance-c.relevance),i&&(a=a.filter(l=>l.relevance0&&r&&r>0){let c=a[0].relevance*r;a=a.filter(d=>c-d.relevance<0)}let n=[],s=[];for(let l of a)n.push(l.value),s.push(l.idx);return{values:n,indices:s}}function Py(e,t){let o=e.length,i=t.length;if(i===0)return o||0;let r=e.toLocaleLowerCase(),a=t.toLocaleLowerCase(),n;e.length1&&p>1){let v=e[g-2],C=r[g-2],w=t[p-2],y=a[p-2];C===y&&(c++,v===w&&c++)}g`No AG Grid modules are registered! It is recommended to start with all Community features via the AllCommunityModule: + + import { ModuleRegistry, AllCommunityModule } from 'ag-grid-community'; + + ModuleRegistry.registerModules([ AllCommunityModule ]); + `,zy=e=>{let t=e.map(i=>`import { ${ei(i)} } from '${hg[i]?"ag-grid-enterprise":"ag-grid-community"}';`);return e.some(i=>i==="IntegratedCharts"||i==="Sparklines")&&t.push("import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';"),`import { ModuleRegistry } from 'ag-grid-community'; +${t.join(` +`)} + +ModuleRegistry.registerModules([ ${e.map(i=>ei(i,!0)).join(", ")} ]); + +For more info see: ${wo}/modules/`};function ei(e,t=!1){return t&&(e==="IntegratedCharts"||e==="Sparklines")?`${e}Module.with(AgChartsEnterpriseModule)`:`${e}Module`}function Ly(e,t){let o=t.filter(a=>a==="IntegratedCharts"||a==="Sparklines"),i="";return!(globalThis==null?void 0:globalThis.agCharts)&&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. +`:t.some(a=>hg[a])&&(i=i+`Unable to use ${e} as that requires the ag-grid-enterprise script to be included. +`),i}function fg({moduleName:e,rowModelType:t}){return`To use the ${e}Module you must set the gridOption "rowModelType='${t}'"`}var Rl=({reasonOrId:e,moduleName:t,gridScoped:o,gridId:i,rowModelType:r,additionalText:a,isUmd:n})=>{let s=Ay(t,r),l=typeof e=="string"?e:Vy[e];if(n)return Ly(l,s);let c=s.filter(u=>u==="IntegratedCharts"||u==="Sparklines"),d=c.length>0?`${c.map(u=>ei(u)).join()} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.`:"";return`${`Unable to use ${l} as ${s.length>1?"one of "+s.map(u=>ei(u)).join(", "):ei(s[0])} is not registered${o?" for gridId: "+i:""}. ${d} Check if you have registered the module: +`} +${zy(s)}`+(a?` + +${a}`:"")},El=e=>`${e} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'. + +import { AgChartsEnterpriseModule } from 'ag-charts-enterprise'; +import { ModuleRegistry } from 'ag-grid-community'; +import { ${e} } from 'ag-grid-enterprise'; + +ModuleRegistry.registerModules([${e}.with(AgChartsEnterpriseModule)]); + `,Oy=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.`,Hy={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==null?void 0:e.cssName}. This usually means that the grid has been initialised before styles have been loaded. The default value of ${e==null?void 0: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: + "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. + Either clear local references to the grid api, when it is destroyed, or check gridApi.isDestroyed() to avoid calling methods against a destroyed grid. + 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} +${Oy(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,inferred:t,colId:o})=>{let i=t?" (inferred)":"",r=o?` for column "${o}"`:"";return`Cell data type is "object"${i} but no Value ${e} has been provided${r}. Please either provide an object data type definition with a Value ${e}, or set: + - "colDef.value${e}"${t&&e==="Parser"?` + - "colDef.cellDataType = 'object'"`:""}`},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==null?void 0: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})=>{let r=[],a=[...Object.keys(o!=null?o:[]).filter(s=>!["agCellEditor","agGroupRowRenderer","agSortIndicator"].includes(s)),...Object.keys(i!=null?i:[]).filter(s=>!!i[s])],n=$a({inputValue:t,allSuggestions:a,hideIrrelevant:!0,filterByPercentageOfBestMatch:.8}).values;return r.push(`Could not find '${t}' component. It was configured as "${e}: '${t}'" but it wasn't found in the list of registered components. +`),n.length>0&&r.push(` Did you mean: [${n.slice(0,3)}]? +`),r.push("If using a custom component check it has been registered correctly."),r},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: ${wo}/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})=>{let o=$a({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(` +`)},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. + 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!=null?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==null?void 0: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:Rl,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 ${wo}/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!=null?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. +Please 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. +Your code probably called a grid API method while the grid was in the render stage. +To overcome this, put the API call into a timeout, e.g. instead of api.redrawRows(), call setTimeout(function() { api.redrawRows(); }, 0). +To 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==null?void 0:e.toString(16).toUpperCase()} is not a scalar value`,256:()=>"Unable to initialise. See validation error, or load ValidationModule if missing.",257:()=>El("IntegratedChartsModule"),258:()=>El("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:r})=>Rl({reasonOrId:`AG Grid '${e}' component: ${t}`,moduleName:Ro[t],gridId:i,gridScoped:o,rowModelType:r}),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 ${wo}/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:()=>pg(),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.";break}return t},275:fg,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.',298:()=>"Columns Tool Panel 'buttons' requires 'apply' to enable Deferred Updates."};function By(e,t){let o=Hy[e];if(!o)return[`Missing error text for error id ${e}!`];let i=o(t),a=` +See ${Ec(e,t)}`;return Array.isArray(i)?i.concat(a):[i,a]}var Vy={1:"Charting Aggregation",2:"pivotResultFields",3:"setTooltip"},Ny=class{constructor(e="javascript"){this.frameworkName=e,this.renderingEngine="vanilla",this.batchFrameworkComps=!1,this.wrapIncoming=t=>t(),this.wrapOutgoing=t=>t(),this.baseDocLink=`${Cc}/${this.frameworkName}-data-grid`,vh(this.baseDocLink)}frameworkComponent(e){return null}isFrameworkComponent(e){return!1}getDocLink(e){return this.baseDocLink+(e?"/"+e:"")}},Fl=new WeakMap,Dl=new WeakMap;function mg(e,t,o){if(!t)return W(11),{};let i=o,r;if(!(i!=null&&i.setThemeOnGridDiv)){let n=oe({tag:"div"});n.style.height="100%",e.appendChild(n),e=n,r=()=>e.remove()}return new Wy().create(e,t,n=>{let s=new Zm(e);n.createBean(s)},void 0,o,r)}var Gy=1,Wy=class{create(e,t,o,i,r,a){var f;let n=Cn.applyGlobalGridOptions(t),s=(f=n.gridId)!=null?f:String(Gy++),l=this.getRegisteredModules(r,s,n.rowModelType),c=this.createBeansList(n.rowModelType,l,s),d=this.createProvidedBeans(e,n,r);if(!c)return;let u={providedBeanInstances:d,beanClasses:c,id:s,beanInitComparator:Sf,beanDestroyComparator:xf,derivedBeans:[bf],destroyCallback:()=>{Dl.delete(p),Fl.delete(e),uh(s),a==null||a()}},h=new wf(u);this.registerModuleFeatures(h,l),o(h),h.getBean("syncSvc").start(),i==null||i(h);let p=h.getBean("gridApi");return Fl.set(e,p),Dl.set(p,e),p}getRegisteredModules(e,t,o){var i;return ci(My,void 0,!0),(i=e==null?void 0:e.modules)==null||i.forEach(r=>ci(r,t)),hh(t,Ml(o))}registerModuleFeatures(e,t){let o=e.getBean("registry"),i=e.getBean("apiFunctionSvc");for(let r of t){o.registerModule(r);let a=r.apiFunctions;if(a){let n=Object.keys(a);for(let s of n)i==null||i.addFunction(s,a[s])}}}createProvidedBeans(e,t,o){let i=o?o.frameworkOverrides:null;Q(i)&&(i=new Ny);let r={gridOptions:t,eGridDiv:e,eRootDiv:e,globalListener:o?o.globalListener:null,globalSyncListener:o?o.globalSyncListener:null,frameworkOverrides:i,withinStudio:o==null?void 0:o.withinStudio};return o!=null&&o.providedBeanInstances&&Object.assign(r,o.providedBeanInstances),r}createBeansList(e,t,o){var s;let i={clientSide:"ClientSideRowModel",infinite:"InfiniteRowModel",serverSide:"ServerSideRowModel",viewport:"ViewportRowModel"},r=Ml(e),a=i[r];if(!a){_o(201,{rowModelType:r},`Unknown rowModelType ${r}.`);return}if(!fh()){_o(272,void 0,pg());return}if(!e){let l=Object.entries(i).filter(([c,d])=>Ea(d,o,c));if(l.length==1){let[c,d]=l[0];if(c!==r){let g={moduleName:d,rowModelType:c};_o(275,g,fg(g));return}}}if(!Ea(a,o,r)){let l=bn(),c=`rowModelType = '${r}'`,d=l?`Unable to use ${c} as that requires the ag-grid-enterprise script to be included. +`:`Missing module ${a}Module for rowModelType ${r}.`;_o(200,{reasonOrId:c,moduleName:a,gridScoped:wn(),gridId:o,rowModelType:r,isUmd:l},d);return}let n=new Set;for(let l of t)for(let c of(s=l.beans)!=null?s:[])n.add(c);return Array.from(n)}};function Ml(e){return e!=null?e:"clientSide"}function qy(e,t=!1){let o=[],i=[],r=[],a=[],n=[],s=[],l=[],c=[],d=[],g=0;for(let u=0;ut!=null)}function _y(e){let t=[];for(let{groupId:o,open:i}of e)i&&t.push(o);return t.length?{openColumnGroupIds:t}:void 0}var Uy=class extends S{constructor(){super(...arguments),this.beanName="alignedGridsSvc",this.consuming=!1}getAlignedGridApis(){var i;let e=(i=this.gos.get("alignedGrids"))!=null?i:[],t=typeof e=="function";return typeof e=="function"&&(e=e()),e.map(r=>{var n;if(!r){W(18),t||W(20);return}if(this.isGridApi(r))return r;let a=r;return"current"in a?(n=a.current)==null?void 0:n.api:(a.api||W(19),a.api)}).filter(r=>!!r&&!r.isDestroyed())}isGridApi(e){return!!e&&!!e.dispatchEvent}postConstruct(){let e=this.fireColumnEvent.bind(this);this.addManagedEventListeners({columnMoved:e,columnVisible:e,columnPinned:e,columnGroupOpened:e,columnResized:e,bodyScroll:this.fireScrollEvent.bind(this),alignedGridColumn:({event:t})=>this.onColumnEvent(t),alignedGridScroll:({event:t})=>this.onScrollEvent(t)})}fireEvent(e){if(!this.consuming)for(let 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){e.direction==="horizontal"&&this.fireEvent({type:"alignedGridScroll",event:e})}onScrollEvent(e){this.onEvent(()=>{this.beans.ctrlsSvc.getScrollFeature().setHorizontalScrollPosition(e.left,!0)})}extractDataFromEvent(e,t){let o=[];return e.columns?e.columns.forEach(i=>{o.push(t(i))}):e.column&&o.push(t(e.column)),o}getMasterColumns(e){return this.extractDataFromEvent(e,t=>t)}getColumnIds(e){return this.extractDataFromEvent(e,t=>t.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":k(21);break}})}processGroupOpenedEvent(e){let{colGroupSvc:t}=this.beans;if(t)for(let o of e.columnGroups){let i=null;o&&(i=t.getProvidedColGroup(o.getGroupId())),!(o&&!i)&&t.setColumnGroupOpened(i,o.isExpanded(),"alignedGridChanged")}}processColumnEvent(e){var d;let t=e.column,o=null,i=this.beans,{colResize:r,ctrlsSvc:a,colModel:n}=i;if(t&&(o=n.getColDefCol(t.getColId())),t&&!o)return;let s=this.getMasterColumns(e);switch(e.type){case"columnMoved":{let u=e.api.getColumnState().map(h=>({colId:h.colId}));Ve(i,{state:u,applyOrder:!0},"alignedGridChanged")}break;case"columnVisible":{let u=e.api.getColumnState().map(h=>({colId:h.colId,hide:h.hide}));Ve(i,{state:u},"alignedGridChanged")}break;case"columnPinned":{let u=e.api.getColumnState().map(h=>({colId:h.colId,pinned:h.pinned}));Ve(i,{state:u},"alignedGridChanged")}break;case"columnResized":{let g=e,u={};for(let h of s)u[h.getId()]={key:h.getColId(),newWidth:h.getActualWidth()};for(let h of(d=g.flexColumns)!=null?d:[])u[h.getId()]&&delete u[h.getId()];r==null||r.setColumnWidths(Object.values(u),!1,g.finished,"alignedGridChanged");break}}let c=a.getGridBodyCtrl().isVerticalScrollShowing();for(let g of this.getAlignedGridApis())g.setGridOption("alwaysShowVerticalScroll",c)}},jy={moduleName:"AlignedGrids",version:D,beans:[Uy],dependsOn:[_d]};function Ky(e,t={}){let o=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(o))}function vg(e,t,o,i,r){t&&(i&&t.parent&&t.parent.level!==-1&&vg(e,t.parent,o,i,r),t.setExpanded(o,void 0,r))}function $y(e,t){return e.rowModel.getRowNode(t)}function Yy(e,t,o,i){e.rowRenderer.addRenderedRowListener(t,o,i)}function Qy(e){return e.rowRenderer.getRenderedNodes()}function Zy(e,t,o){e.rowModel.forEachNode(t,o)}function Jy(e){return e.rowRenderer.firstRenderedRow}function Xy(e){return e.rowRenderer.lastRenderedRow}function e3(e,t){return e.rowModel.getRow(t)}function t3(e){return e.rowModel.getRowCount()}function o3(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}function i3(e){return e.ctrlsSvc.getScrollFeature().getHScrollPosition()}function Cg(e,t,o="auto"){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureColumnVisible(t,o),"ensureVisible")}function wg(e,t,o){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureIndexVisible(t,o),"ensureVisible")}function r3(e,t,o=null){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureNodeVisible(t,o),"ensureVisible")}var a3={moduleName:"RowApi",version:D,apiFunctions:{redrawRows:Ky,setRowNodeExpanded:vg,getRowNode:$y,addRenderedRowListener:Yy,getRenderedNodes:Qy,forEachNode:Zy,getFirstDisplayedRowIndex:Jy,getLastDisplayedRowIndex:Xy,getDisplayedRowAtIndex:e3,getDisplayedRowCount:t3}},n3={moduleName:"ScrollApi",version:D,apiFunctions:{getVerticalPixelRange:o3,getHorizontalPixelRange:i3,ensureColumnVisible:Cg,ensureIndexVisible:wg,ensureNodeVisible:r3}};function s3(e){var t;(t=e.expansionSvc)==null||t.expandAll(!0)}function l3(e){var t;(t=e.expansionSvc)==null||t.expandAll(!1)}function bg(e){var t;(t=e.rowModel)==null||t.onRowHeightChanged()}function yg(e){var t,o;if((t=e.rowAutoHeight)!=null&&t.active){k(3);return}(o=e.rowModel)==null||o.resetRowHeights()}function c3(e){var t;(t=e.expansionSvc)==null||t.resetExpansion()}function d3(e,t,o){var r,a;let i=of(e);if(i){if(((r=e.rowGroupColsSvc)==null?void 0:r.columns.length)===0){if(t<0){W(238);return}i.setRowCount(t,o);return}W(28);return}(a=Fr(e))==null||a.setRowCount(t,o)}function g3(e){var t,o;return mi(e.gos)?e.rowModel.getBlockStates():(o=(t=e.rowNodeBlockLoader)==null?void 0:t.getBlockState())!=null?o:{}}function u3(e){return e.rowModel.isLastRowIndexKnown()}var h3={moduleName:"CsrmSsrmSharedApi",version:D,apiFunctions:{expandAll:s3,collapseAll:l3,resetRowGroupExpansion:c3}},p3={moduleName:"RowModelSharedApi",version:D,apiFunctions:{onRowHeightChanged:bg,resetRowHeights:yg}},f3={moduleName:"SsrmInfiniteSharedApi",version:D,apiFunctions:{setRowCount:d3,getCacheBlockState:g3,isLastRowIndexKnown:u3}},Sg=(e,t)=>{for(let o=0,i=e.length;o{if(o!=null){let a=o.getSortedRows();for(let n=0,s=a.length;n{let d=l.level+1;for(let g=0,u=c.length;g{if(!g&&g!==void 0){let x=w.sourceRowIndex;g=x<=u,u=x}w.data!==y&&(w.updateData(y),n.has(w)||s.add(w),!w.selectable&&w.isSelected()&&c.push(w))},f=(w,y,x)=>{for(let R=0,F=y.length;R0;if(m){let w=(C=o._leafs)!=null?C:o._leafs=[];g===void 0?y3(w,l,a):b3(w,l)&&(a.reordered=!0)}(m||h||s.size)&&(e.rowDataUpdated=!0,this.deselect(c))}deleteUnusedNodes(e,{removals:t},o,i){let r=this.rootNode._leafs;for(let a=0,n=r.length;a0}updateRowData(e,t,o){var l;if(this.dispatchRowDataUpdateStarted(e.add),(l=this.beans.groupStage)!=null&&l.getNestedDataGetter())return k(268),{remove:[],update:[],add:[]};let i=[],r=Do(this.gos),a=this.executeRemove(r,e,t,i,o),n=this.executeUpdate(r,e,t,i),s=this.executeAdd(e,t);return this.deselect(i),{remove:a,update:n,add:s}}executeRemove(e,{remove:t},{adds:o,updates:i,removals:r},a,n){let s=this.rootNode._leafs,l=s==null?void 0:s.length,c=t==null?void 0:t.length;if(!c||!l)return[];let d=0,g=l,u=0,h=new Array(c);for(let p=0;pu&&(u=m),h[d++]=f,this.destroyNode(f,n)&&(f.isSelected()&&a.push(f),o.delete(f)||(i.delete(f),r.push(f)))}return h.length=d,d&&w3(s,g,u),h}executeUpdate(e,{update:t},{adds:o,updates:i},r){let a=t==null?void 0:t.length;if(!a)return[];let n=new Array(a),s=0;for(let l=0;l=l;--u){let p=i[u];p.sourceRowIndex=h,i[h--]=p}t.reordered=!0}i.length=s;let c=new Array(n),d=t.adds;for(let u=0;u=o||Number.isNaN(t))return o;t=Math.ceil(t);let i=this.gos;return t>0&&i.get("treeData")&&i.get("getDataPath")&&(t=v3(e,t)),t}},v3=(e,t)=>{for(let o=0,i=e.length;o{var n;e.group=!0,e.level=-1,e._expanded=!0,e.id="ROOT_NODE_ID",((n=e._leafs)==null?void 0:n.length)!==0&&(e._leafs=[]);let t=[],o=[],i=[],r=[];e.childrenAfterGroup=t,e.childrenAfterSort=o,e.childrenAfterAggFilter=i,e.childrenAfterFilter=r;let a=e.sibling;return a&&(a.childrenAfterGroup=t,a.childrenAfterSort=o,a.childrenAfterAggFilter=i,a.childrenAfterFilter=r,a.childrenMapped=e.childrenMapped),e.updateHasChildren(),e},C3=(e,t)=>{if(e)for(let o=0,i=e.length;o{t=Math.max(0,t);for(let i=t,r=e.length;i{let o=t.size;e.length=o;let i=0,r=!1,a=!1;for(let n of t){let s=n.sourceRowIndex;s===i?a||(a=r):(s>=0?a=!0:r=!0,n.sourceRowIndex=i,e[i]=n),++i}return a},y3=(e,t,{adds:o})=>{let i=e.length,r=t.size;r>i&&(e.length=r);let a=0;for(let n=0;n{i.hasChildren()&&e&&!r?i.childrenAfterFilter=i.childrenAfterGroup.filter(a=>{let n=a.childrenAfterFilter&&a.childrenAfterFilter.length>0,s=a.data&&this.filterManager.doesRowPassFilter({rowNode:a});return n||s}):i.childrenAfterFilter=i.childrenAfterGroup,Ya(i)};if(this.doingTreeDataFiltering()){let i=(r,a)=>{if(r.childrenAfterGroup)for(let n=0;no(r,!1);io(this.beans.rowModel.rootNode,this.beans.rowModel.hierarchical,t,i)}}softFilter(e,t){let o=r=>{if(r.childrenAfterFilter=r.childrenAfterGroup,r.hasChildren())for(let a of r.childrenAfterGroup)a.softFiltered=e&&!(a.data&&this.filterManager.doesRowPassFilter({rowNode:a}));Ya(r)},i=this.beans.rowModel;io(i.rootNode,i.hierarchical,t,o)}doingTreeDataFiltering(){var t;let{gos:e}=this;return!!((t=this.beans.groupStage)!=null&&t.treeData)&&!e.get("excludeChildrenWhenTreeDataFiltering")}},x3=4,k3=(e,t,o,i,r)=>{let a=t.childrenAfterSort,n=t.childrenAfterAggFilter;if(!n)return a&&a.length>0?a:[];let s=n.length;if(s<=1)return(a==null?void 0:a.length)===s&&(s===0||a[0]===n[0])?a:n.slice();if(!a||s<=x3)return e.doFullSortInPlace(n.slice(),r);let l=new Map,{updates:c,adds:d}=o,g=[];for(let h=0;he.compareRowNodes(r,h,p)||~l.get(h)-~l.get(p)),u===s?g:R3(e,r,g,a,l,s))},R3=(e,t,o,i,r,a)=>{var f;let n=new Array(a),s=0,l=o[s],c,d=-1,g=0,u=0,h=o.length,p=i.length;for(;;){if(d<0){if(g>=p)break;if(c=i[g++],d=(f=r.get(c))!=null?f:-1,d<0)continue}if((e.compareRowNodes(t,l,c)||~r.get(l)-d)<0){if(n[u++]=l,++s>=h)break;l=o[s]}else n[u++]=c,d=-1}for(;s=0&&(n[u++]=m)}return n},E3=(e,t,o)=>{let i=0;o.length=t.size;for(let r=0,a=e.length;r{let t=e.childrenAfterSort,o=e.sibling;if(o&&(o.childrenAfterSort=t),!!t)for(let i=0,r=t.length-1;i<=r;i++){let a=t[i],n=i===0,s=i===r;a.firstChild!==n&&(a.firstChild=n,a.dispatchRowEvent("firstChildChanged")),a.lastChild!==s&&(a.lastChild=s,a.dispatchRowEvent("lastChildChanged")),a.childIndex!==i&&(a.childIndex=i,a.dispatchRowEvent("childIndexChanged"))}},F3=class extends S{constructor(){super(...arguments),this.beanName="sortStage",this.step="sort",this.refreshProps=["postSortRows","groupDisplayType","accentedSort"]}execute(e,t){let o=this.beans.sortSvc.getSortOptions(),i=o.length>0&&!!t&&this.gos.get("deltaSort"),{gos:r,colModel:a,rowGroupColsSvc:n,rowNodeSorter:s,rowRenderer:l,showRowGroupCols:c}=this.beans,d=r.get("groupMaintainOrder"),g=a.getCols().some(C=>C.isRowGroupActive()),u=n==null?void 0:n.columns,h=a.isPivotMode(),p=r.getCallback("postSortRows"),f=!1,m,v=C=>{var R,F,P;let w=h&&C.leafGroup,y=d&&g&&!C.leafGroup;y&&(m!=null||(m=this.shouldSortContainsGroupCols(o)),y&&(y=!m));let x=null;if(y){let T=!1;if(u){let I=C.level+1;I{let t=e.childrenAfterSort,o=e.childrenAfterAggFilter,i=t==null?void 0:t.length,r=o==null?void 0:o.length;if(!i||!r)return null;let a=new Array(r),n=new Set;for(let l=0;l{var i;(i=this.beans.groupStage)==null||i.invalidateGroupCols(),this.refreshModel({step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame")})};this.addManagedEventListeners({newColumnsLoaded:o,columnRowGroupChanged:o,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(){let{beans:e,stagesRefreshProps:t}=this,o=[e.groupStage,e.filterStage,e.pivotStage,e.aggStage,e.sortStage,e.filterAggStage,e.flattenStage].filter(i=>!!i);this.stages=o;for(let i=o.length-1;i>=0;--i){let r=o[i];for(let a of r.refreshProps)t.set(a,i)}this.addManagedPropertyListeners([...t.keys(),"rowData"],i=>{var a;let r=(a=i.changeSet)==null?void 0:a.properties;r&&this.onPropChange(r)}),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 r,a=!1;do{r=!1;let n=this.getRowIndexAtPixel(e),s=this.getRowIndexAtPixel(t),l=Math.max(n,o),c=Math.min(s,i);for(let d=l;d<=c;d++){let g=this.getRow(d);if(g.rowHeightEstimated){let u=Ft(this.beans,g);g.setRowHeight(u.height),r=!0,a=!0}}r&&this.setRowTopAndRowIndex()}while(r);return a}onPropChange(e){let{nodeManager:t,gos:o,beans:i}=this,r=i.groupStage;if(!t)return;let a=new Set(e),n=r==null?void 0:r.onPropChange(a),s;a.has("rowData")?s=o.get("rowData"):n&&(s=r==null?void 0:r.extractData()),s&&!Array.isArray(s)&&(s=null,k(1));let l={step:"nothing",changedProps:a};if(s){let d=!n&&!this.isEmpty()&&s.length>0&&o.exists("getRowId")&&!o.get("resetRowDataOnUpdate");this.refreshingData=!0,d?(l.keepRenderedRows=!0,l.animate=!o.get("suppressAnimationFrame"),l.changedRowNodes=new _i,t.setImmutableRowData(l,s)):(l.rowDataUpdated=!0,l.newData=!0,t.setNewRowData(s),this.rowNodesCountReady=!0)}let c=l.rowDataUpdated?"group":this.getRefreshedStage(e);c&&(l.step=c,this.refreshModel(l))}getRefreshedStage(e){var a;let{stages:t,stagesRefreshProps:o}=this;if(!t)return null;let i=t.length,r=i;for(let n=0,s=e.length;n{(a==null?void 0:a.id)!=null&&!t.has(a.id)&&a.clearRowTopAndRowIndex()},i=a=>{o(a),o(a.detailNode),o(a.sibling);let n=a.childrenAfterGroup;if(!(!a.hasChildren()||!n)&&!(e&&a.level!==-1&&!a.expanded))for(let s=0,l=n.length;s{let c=a[l];if(this.gos.get("groupHideOpenParents"))for(;c.expanded&&c.childrenAfterSort&&c.childrenAfterSort.length>0;)c=c.childrenAfterSort[0];return c.rowIndex},s=t.footerSvc;return s?s==null?void 0:s.getTopDisplayIndex(i,e,a,n):n(e)}getTopLevelIndexFromDisplayedIndex(e){var s,l;let{rootNode:t,rowsToDisplay:o}=this;if(!t||!o.length||o[0]===t)return e;let r=this.getRow(e);r.footer&&(r=r.sibling);let a=r.parent;for(;a&&a!==t;)r=a,a=r.parent;let n=(l=(s=t.childrenAfterSort)==null?void 0:s.indexOf(r))!=null?l:-1;return n>=0?n:e}getRowBounds(e){let t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null}onRowGroupOpened(){this.refreshModel({step:"map",keepRenderedRows:!0,animate:bo(this.gos)})}onFilterChanged({afterDataChange:e,columns:t}){if(!e){let i=t.length===0||t.some(r=>r.isPrimary())?"filter":"filter_aggregates";this.refreshModel({step:i,keepRenderedRows:!0,animate:bo(this.gos)})}}onSortChanged(){this.refreshModel({step:"sort",keepRenderedRows:!0,animate:bo(this.gos)})}getType(){return"clientSide"}onValueChanged(){this.refreshModel({step:this.beans.colModel.isPivotActive()?"pivot":"aggregate"})}isSuppressModelUpdateAfterUpdateTransaction(e){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction"))return!1;let{changedRowNodes:t,newData:o,rowDataUpdated:i}=e;return!(!t||o||!i||t.removals.length||t.adds.size)}reMapRows(){if(this.refreshingModel||this.refreshingData){this.noKeepRenderedRows=!0,this.noKeepUndoRedoStack=!0,this.noAnimate=!0;return}this.refreshModel({step:"map",keepRenderedRows:!1,keepUndoRedoStack:!1,animate:!1})}refreshModel(e){let{nodeManager:t,eventSvc:o,started:i}=this;if(!t)return;let r=!!e.rowDataUpdated;if(i&&r&&o.dispatchEvent({type:"rowDataUpdated"}),this.deferRefresh(e)){this.setPendingRefreshFlags(e),this.rowDataUpdatedPending||(this.rowDataUpdatedPending=r);return}this.rowDataUpdatedPending&&(this.rowDataUpdatedPending=!1,e.step="group"),this.updateRefreshParams(e);let a=!1;this.refreshingModel=!0;try{this.executeRefresh(e,r),a=!0}finally{this.refreshingData=!1,this.refreshingModel=!1,a||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){var n,s,l;let{beans:o,rootNode:i}=this;(n=o.masterDetailSvc)==null||n.refreshModel(e),t&&e.step!=="group"&&((s=o.colFilter)==null||s.refreshModel());let r=e.changedPath;switch(r==null||r.addRow(i),e.step==="group"&&(this.doGrouping(i,e),r!=null||(r=e.changedPath)),r!=null||(r=(l=o.changedPathFactory)==null?void 0:l.ensureRowsPath(e,i)),e.step){case"group":case"filter":this.doFilter(r);case"pivot":this.doPivot(r)&&(r=void 0,e.changedPath=void 0);case"aggregate":this.doAggregate(r);case"filter_aggregates":this.doFilterAggregates(r);case"sort":this.doSort(r,e.changedRowNodes);case"map":this.doRowsToDisplay()}let a=new Set;this.setRowTopAndRowIndex(a),this.clearRowTopAndRowIndex(r,a),this.updateRefreshParams(e)}deferRefresh(e){return this.refreshingModel||this.beans.colModel.changeEventsDispatching?!0: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(){var e,t,o;return!((t=(e=this.rootNode)==null?void 0:e._leafs)!=null&&t.length)||!((o=this.beans.colModel)!=null&&o.ready)}isRowsToRender(){return this.rowsToDisplay.length>0}getOverlayType(){var o,i,r,a,n;let{beans:e,gos:t}=this;if((i=(o=this.rootNode)==null?void 0:o._leafs)!=null&&i.length){if((r=e.filterManager)!=null&&r.isAnyFilterPresent()&&this.getRowCount()===0)return"noMatchingRows"}else if(this.rowCountReady||((n=(a=t.get("rowData"))==null?void 0:a.length)!=null?n:0)==0)return"noRows";return null}getNodesInRangeForSelection(e,t){let o=!1,i=!1,r=[],a=gi(this.gos);return this.forEachNodeAfterFilterAndSort(n=>{if(i)return;if(o&&(n===t||n===e)&&(i=!0,a&&n.group)){kg(r,n);return}if(!o){if(n!==t&&n!==e)return;o=!0,t===e&&(i=!0)}(!n.group||!a)&&r.push(n)}),r}getTopLevelNodes(){var e,t;return(t=(e=this.rootNode)==null?void 0:e.childrenAfterGroup)!=null?t:null}getRow(e){return this.rowsToDisplay[e]}getFormulaRow(e){return this.formulaRows[e]}isRowPresent(e){return this.rowsToDisplay.indexOf(e)>=0}getRowIndexAtPixel(e){let t=this.rowsToDisplay,o=t.length;if(this.isEmpty()||o===0)return-1;let i=0,r=o-1;if(e<=0)return 0;if(t[r].rowTop<=e)return r;let n=-1,s=-1;for(;;){let l=Math.floor((i+r)/2),c=t[l];if(this.isRowInPixel(c,e)||(c.rowTope&&(r=l-1),n===i&&s===r))return l;n=i,s=r}}isRowInPixel(e,t){let o=e.rowTop,i=o+e.rowHeight;return o<=t&&i>t}forEachLeafNode(e){var o;let t=(o=this.rootNode)==null?void 0:o._leafs;if(t)for(let i=0,r=t.length;io.childrenAfterAggFilter)}forEachNodeAfterFilterAndSort(e,t=!1){this.depthFirstSearchRowNodes(e,t,o=>o.childrenAfterSort)}forEachPivotNode(e,t,o){let{colModel:i,rowGroupColsSvc:r}=this.beans;if(!i.isPivotMode())return;if(!(r!=null&&r.columns.length)){e(this.rootNode,0);return}let a=o?"childrenAfterSort":"childrenAfterGroup";this.depthFirstSearchRowNodes(e,t,n=>n.leafGroup?null:n[a])}depthFirstSearchRowNodes(e,t=!1,o=a=>a.childrenAfterGroup,i=this.rootNode,r=0){var s,l;let a=r;if(!i)return a;let n=i===this.rootNode;if(n||e(i,a++),i.hasChildren()&&!i.footer){let c=n||this.hierarchical?o(i):null;if(c){let d=this.beans.footerSvc;a=(s=d==null?void 0:d.addTotalRows(a,i,e,t,n,"top"))!=null?s:a;for(let g of c)a=this.depthFirstSearchRowNodes(e,t,o,g,a);return(l=d==null?void 0:d.addTotalRows(a,i,e,t,n,"bottom"))!=null?l:a}}return a}doAggregate(e){var o;this.rootNode&&((o=this.beans.aggStage)==null||o.execute(e))}doFilterAggregates(e){let t=this.rootNode,o=this.beans.filterAggStage;if(o&&this.hierarchical){o.execute(e);return}t.childrenAfterAggFilter=t.childrenAfterFilter;let i=t.sibling;i&&(i.childrenAfterAggFilter=t.childrenAfterFilter)}doSort(e,t){let o=this.beans.sortStage;if(o){o.execute(e,t);return}io(this.rootNode,this.hierarchical,e,i=>{i.childrenAfterSort=i.childrenAfterAggFilter.slice(0),xg(i)})}doGrouping(e,t){var r;let o=this.beans.groupStage,i=o==null?void 0:o.execute(t);if(i===void 0){let a=e._leafs;e.childrenAfterGroup=a,e.updateHasChildren();let n=e.sibling;n&&(n.childrenAfterGroup=a)}(i||t.rowDataUpdated)&&((r=this.beans.colFilter)==null||r.refreshModel()),!this.rowCountReady&&this.rowNodesCountReady&&(this.rowCountReady=!0,this.eventSvc.dispatchEventOnce({type:"rowCountReady"}))}doFilter(e){let t=this.beans.filterStage;if(t){t.execute(e);return}io(this.rootNode,this.hierarchical,e,o=>{o.childrenAfterFilter=o.childrenAfterGroup,Ya(o)})}doPivot(e){var t,o;return(o=(t=this.beans.pivotStage)==null?void 0:t.execute(e))!=null?o:!1}getRowNode(e){var o,i;let t=(o=this.nodeManager)==null?void 0:o.getRowNode(e);return typeof t=="object"?t:(i=this.beans.groupStage)==null?void 0:i.getNonLeaf(e)}batchUpdateRowData(e,t){if(!this.asyncTransactionsTimer){this.asyncTransactions=[];let o=this.gos.get("asyncTransactionWaitMillis");this.asyncTransactionsTimer=setTimeout(()=>this.executeBatchUpdateRowData(),o)}this.asyncTransactions.push({rowDataTransaction:e,callback:t})}flushAsyncTransactions(){let e=this.asyncTransactionsTimer;e&&(clearTimeout(e),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){var l;let{nodeManager:e,beans:t,eventSvc:o,asyncTransactions:i}=this;if(!e)return;(l=t.valueCache)==null||l.onDataChanged();let r=[],a=[],n=new _i,s=!this.gos.get("suppressAnimationFrame");for(let{rowDataTransaction:c,callback:d}of i!=null?i:[]){this.rowNodesCountReady=!0,this.refreshingData=!0;let g=e.updateRowData(c,n,s);r.push(g),d&&a.push(d.bind(null,g))}this.commitTransactions(n,s),a.length>0&&setTimeout(()=>{for(let c=0,d=a.length;c0&&o.dispatchEvent({type:"asyncTransactionsFlushed",results:r}),this.asyncTransactionsTimer=0,this.asyncTransactions=null}updateRowData(e){var a;let t=this.nodeManager;if(!t)return null;(a=this.beans.valueCache)==null||a.onDataChanged(),this.rowNodesCountReady=!0;let o=new _i,i=!this.gos.get("suppressAnimationFrame");this.refreshingData=!0;let r=t.updateRowData(e,o,i);return this.commitTransactions(o,i),r}commitTransactions(e,t){this.refreshModel({step:"group",rowDataUpdated:!0,keepRenderedRows:!0,animate:t,changedRowNodes:e})}doRowsToDisplay(){var r,a,n;let{rootNode:e,beans:t}=this;if((r=t.formula)!=null&&r.active){let s=(a=e==null?void 0:e.childrenAfterSort)!=null?a:[];this.formulaRows=s,this.rowsToDisplay=s.filter(l=>!l.softFiltered);for(let l of this.rowsToDisplay)l.setUiLevel(0);return}let o=t.flattenStage;if(o){this.rowsToDisplay=o.execute();return}let i=(n=this.rootNode.childrenAfterSort)!=null?n:[];for(let s of i)s.setUiLevel(0);this.rowsToDisplay=i}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepUndoRedoStack:!0})}resetRowHeights(){let e=this.rootNode;if(!e)return;let t=this.resetRowHeightsForAllRowNodes();e.setRowHeight(e.rowHeight,!0);let o=e.sibling;o==null||o.setRowHeight(o.rowHeight,!0),t&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{t.setRowHeight(t.rowHeight,!0);let o=t.detailNode;o==null||o.setRowHeight(o.rowHeight,!0);let i=t.sibling;i==null||i.setRowHeight(i.rowHeight,!0),e=!0}),e}onGridStylesChanges(e){var t;e.rowHeightChanged&&!((t=this.beans.rowAutoHeight)!=null&&t.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()}},kg=(e,t)=>{let o=t.childrenAfterGroup;if(o)for(let i=0,r=o.length;i{var o;return(o=ot(e))==null?void 0:o.updateRowData(t)})}function H3(e,t,o){e.frameworkOverrides.wrapIncoming(()=>{var i;return(i=ot(e))==null?void 0:i.batchUpdateRowData(t,o)})}function B3(e){e.frameworkOverrides.wrapIncoming(()=>{var t;return(t=ot(e))==null?void 0:t.flushAsyncTransactions()})}function V3(e){var t;return(t=e.selectionSvc)==null?void 0:t.getBestCostNodeSelection()}var N3={moduleName:"ClientSideRowModel",version:D,rowModels:["clientSide"],beans:[M3,F3],dependsOn:[ug]},G3={moduleName:"ClientSideRowModelApi",version:D,apiFunctions:{onGroupExpandedOrCollapsed:P3,refreshClientSideRowModel:I3,isRowDataEmpty:T3,forEachLeafNode:A3,forEachNodeAfterFilter:z3,forEachNodeAfterFilterAndSort:L3,applyTransaction:O3,applyTransactionAsync:H3,flushAsyncTransactions:B3,getBestCostNodeSelection:V3,resetRowHeights:yg,onRowHeightChanged:bg},dependsOn:[h3,p3]},W3=":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}}";function q3(e,t){var o,i;typeof t=="number"?(o=e.colAutosize)==null||o.sizeColumnsToFit(t,"api"):(i=e.colAutosize)==null||i.sizeColumnsToFitGridBody(t)}function Rg({colAutosize:e,visibleCols:t},o,i){var r;Array.isArray(o)?e==null||e.autoSizeCols({colKeys:o,skipHeader:i,source:"api"}):e==null||e.autoSizeCols({...o,colKeys:(r=o.colIds)!=null?r:t.allCols,source:"api"})}function _3(e,t){var o;t&&typeof t=="object"?Rg(e,t):(o=e.colAutosize)==null||o.autoSizeAllColumns({source:"api",skipHeader:t})}var U3=class extends S{constructor(){super(...arguments),this.beanName="colAutosize",this.timesDelayed=0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}postConstruct(){var o;let{gos:e}=this,t=e.get("autoSizeStrategy");if(t){let i=!1,r=t.type;if(r==="fitGridWidth"||r==="fitProvidedWidth")i=!0;else if(r==="fitCellContents"){this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered(t)});let a=e.get("rowData");i=a!=null&&a.length>0&&ee(e)}i&&((o=this.beans.colDelayRenderSvc)==null||o.hideColumns(r))}}autoSizeCols(e){let{eventSvc:t,visibleCols:o,colModel:i}=this.beans;Wo(this.beans,!0),this.innerAutoSizeCols(e).then(r=>{var d;let a=g=>Io(t,Array.from(g),!0,"autosizeColumns");if(!e.scaleUpToFitGridWidth)return Wo(this.beans,!1),a(r);let n=Il(this.beans),s=g=>o.leftCols.some(u=>Zo(u,g)),l=g=>o.rightCols.some(u=>Zo(u,g)),c=e.colKeys.filter(g=>{var h;return!((h=i.getCol(g))!=null&&h.getColDef().suppressAutoSize)&&!pe(g)&&!s(g)&&!l(g)});this.sizeColumnsToFit(n,e.source,!0,{defaultMaxWidth:e.defaultMaxWidth,defaultMinWidth:e.defaultMinWidth,columnLimits:(d=e.columnLimits)==null?void 0:d.map(g=>({...g,key:g.colId})),colKeys:c,onlyScaleUp:!0,animate:!1}),Wo(this.beans,!1),a(r)})}innerAutoSizeCols(e){return new Promise((t,o)=>{var x,R,F;if(this.shouldQueueResizeOperations)return this.pushResizeOperation(()=>this.innerAutoSizeCols(e).then(t,o));let{colKeys:i,skipHeader:r,skipHeaderGroups:a,stopAtGroup:n,defaultMaxWidth:s,defaultMinWidth:l,columnLimits:c=[],source:d="api"}=e,{animationFrameSvc:g,renderStatus:u,colModel:h,autoWidthCalc:p,visibleCols:f}=this.beans;if(g==null||g.flushAllFrames(),this.timesDelayed<5&&u&&(!u.areHeaderCellsRendered()||!u.areCellsRendered())){this.timesDelayed++,setTimeout(()=>{this.isAlive()&&this.innerAutoSizeCols(e).then(t,o)});return}this.timesDelayed=0;let m=new Set,v=-1,C=Object.fromEntries(c.map(({colId:P,...T})=>[P,T])),w=r!=null?r:this.gos.get("skipHeaderOnAutoSize"),y=a!=null?a:w;for(;v!==0;){v=0;let P=[];for(let T of i){if(!T||tp(T))continue;let I=h.getCol(T);if(!I||m.has(I)||I.getColDef().suppressAutoSize)continue;let z=p.getPreferredWidthForColumn(I,w);if(z>0){let L=(x=C[I.colId])!=null?x:{};(R=L.minWidth)!=null||(L.minWidth=l),(F=L.maxWidth)!=null||(L.maxWidth=s);let N=j3(I,z,L);I.setActualWidth(N,d),m.add(I),v++}P.push(I)}P.length&&f.refresh(d)}y||this.autoSizeColumnGroupsByColumns(i,d,n),t(m)})}autoSizeColumn(e,t,o){this.autoSizeCols({colKeys:[e],skipHeader:o,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,o){let{colModel:i,ctrlsSvc:r}=this.beans,a=new Set,n=i.getColsForKeys(e);for(let l of n){let c=l.getParent();for(;c&&c!=o;)c.isPadding()||a.add(c),c=c.getParent()}let s;for(let l of a){for(let c of r.getHeaderRowContainerCtrls())if(s=c.getHeaderCtrlForColumn(l),s)break;s==null||s.resizeLeafColumnsToFit(t)}}autoSizeAllColumns(e){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeAllColumns(e));return}this.autoSizeCols({colKeys:this.beans.visibleCols.allCols,...e})}addColumnAutosizeListeners(e,t){let o=this.gos.get("skipHeaderOnAutoSize"),i=()=>{this.autoSizeColumn(t,"uiColumnResized",o)};e.addEventListener("dblclick",i);let r=new Vt(e);return r.addEventListener("doubleTap",i),()=>{e.removeEventListener("dblclick",i),r.destroy()}}addColumnGroupResize(e,t,o){let i=this.gos.get("skipHeaderOnAutoSize"),r=()=>{let a=[],n=t.getDisplayedLeafColumns();for(let s of n)s.getColDef().suppressAutoSize||a.push(s.getColId());a.length>0&&this.autoSizeCols({colKeys:a,skipHeader:i,stopAtGroup:t,source:"uiColumnResized"}),o()};return e.addEventListener("dblclick",r),()=>e.removeEventListener("dblclick",r)}sizeColumnsToFitGridBody(e,t){if(!this.isAlive())return;let o=Il(this.beans);if(o>0){this.sizeColumnsToFit(o,"sizeColumnsToFit",!1,e);return}t===void 0?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,100)},0):t===100?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,500)},100):t===500?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,-1)},500):k(29)}sizeColumnsToFit(e,t="sizeColumnsToFit",o,i){var v,C,w,y,x,R,F,P,T,I,z,L,N,j;if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,o,i));return}let{beans:r}=this,a=(v=i==null?void 0:i.animate)!=null?v:!0;a&&Wo(r,!0);let n={};for(let{key:A,...H}of(C=i==null?void 0:i.columnLimits)!=null?C:[])n[typeof A=="string"?A:A.getColId()]=H;let s=r.visibleCols.allCols;if(e<=0||!s.length)return;let l=at(s);if(i!=null&&i.onlyScaleUp&&l>e||e===l&&s.every(H=>{var We,le;if(H.colDef.suppressSizeToFit)return!0;let V=n==null?void 0:n[H.getId()],Z=(We=V==null?void 0:V.minWidth)!=null?We:i==null?void 0:i.defaultMinWidth,K=(le=V==null?void 0:V.maxWidth)!=null?le:i==null?void 0:i.defaultMaxWidth,ge=H.getActualWidth();return(Z==null||ge>=Z)&&(K==null||ge<=K)}))return;let d=[],g=[];for(let A of s){let H=(y=(w=i==null?void 0:i.colKeys)==null?void 0:w.some(V=>Zo(A,V)))!=null?y:!0;A.getColDef().suppressSizeToFit||!H?g.push(A):d.push(A)}let u=d.slice(0),h=!1,p=A=>{Xe(d,A),g.push(A)},f={};for(let A of d){i!=null&&i.onlyScaleUp&&(f[A.getColId()]=A.getActualWidth()),A.resetActualWidth(t);let H=n==null?void 0:n[A.getId()],V=(R=(x=H==null?void 0:H.minWidth)!=null?x:i==null?void 0:i.defaultMinWidth)!=null?R:-1/0,Z=(P=(F=H==null?void 0:H.maxWidth)!=null?F:i==null?void 0:i.defaultMaxWidth)!=null?P:1/0,K=A.getActualWidth(),ge=Math.max(Math.min(K,Z),V);ge!=K&&A.setActualWidth(ge,t,!0)}for(;!h;){h=!0;let A=e-at(g);if(A<=0)for(let H of d){let V=(z=(I=(T=n==null?void 0:n[H.getId()])==null?void 0:T.minWidth)!=null?I:i==null?void 0:i.defaultMinWidth)!=null?z:H.minWidth;H.setActualWidth(V,t,!0)}else{let H=A/at(d),V=A;for(let Z=d.length-1;Z>=0;Z--){let K=d[Z],ge=K.getColId(),We=f[ge],le=n==null?void 0:n[ge],it=(N=(L=le==null?void 0:le.minWidth)!=null?L:i==null?void 0:i.defaultMinWidth)!=null?N:We,so=(j=le==null?void 0:le.maxWidth)!=null?j:i==null?void 0:i.defaultMaxWidth,Oo=Math.max(it!=null?it:-1/0,K.getMinWidth()),Ho=Math.min(so!=null?so:1/0,K.getMaxWidth()),J=Math.round(K.getActualWidth()*H);JHo?(J=Ho,p(K),h=!1):Z===0&&(J=V),K.setActualWidth(J,t,!0),V-=J}}}for(let A of u)A.fireColumnWidthChangedEvent(t);let m=r.visibleCols;m.setLeftValues(t),m.updateBodyWidths(),!o&&(Io(this.eventSvc,u,!0,t),a&&Wo(r,!1))}applyAutosizeStrategy(){let{gos:e,colDelayRenderSvc:t}=this.beans,o=e.get("autoSizeStrategy");(o==null?void 0:o.type)!=="fitGridWidth"&&(o==null?void 0:o.type)!=="fitProvidedWidth"||setTimeout(()=>{if(!this.isAlive())return;let i=o.type;if(i==="fitGridWidth"){let{columnLimits:r,defaultMinWidth:a,defaultMaxWidth:n}=o,s=r==null?void 0:r.map(({colId:l,minWidth:c,maxWidth:d})=>({key:l,minWidth:c,maxWidth:d}));this.sizeColumnsToFitGridBody({defaultMinWidth:a,defaultMaxWidth:n,columnLimits:s})}else i==="fitProvidedWidth"&&this.sizeColumnsToFit(o.width,"sizeColumnsToFit");t==null||t.revealColumns(i)})}onFirstDataRendered({colIds:e,...t}){setTimeout(()=>{var i;if(!this.isAlive())return;let o="autosizeColumns";e?this.autoSizeCols({...t,source:o,colKeys:e}):this.autoSizeAllColumns({...t,source:o}),(i=this.beans.colDelayRenderSvc)==null||i.revealColumns(t.type)})}processResizeOperations(){this.shouldQueueResizeOperations=!1;for(let e of this.resizeOperationQueue)e();this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}destroy(){this.resizeOperationQueue.length=0,super.destroy()}};function j3(e,t,o={}){var a,n;let i=(a=o.minWidth)!=null?a:e.getMinWidth();tr&&(t=r),t}function Il({ctrlsSvc:e,scrollVisibleSvc:t}){let o=e.getGridBodyCtrl(),r=o.isVerticalScrollShowing()?t.getScrollbarWidth():0;return ni(o.eGridBody)-r}var Tl="ag-animate-autosize";function Wo({ctrlsSvc:e,gos:t},o){if(!t.get("animateColumnResizing")||t.get("enableRtl")||!e.isAlive())return;let i=e.getGridBodyCtrl().eGridBody.classList;o?i.add(Tl):i.remove(Tl)}var K3={moduleName:"ColumnAutoSize",version:D,beans:[U3],apiFunctions:{sizeColumnsToFit:q3,autoSizeColumns:Rg,autoSizeAllColumns:_3},dependsOn:[Hd],css:[W3]};function $3(e,t){var o;return!!((o=e.colHover)!=null&&o.isHovered(t))}var Y3=class extends S{constructor(e,t){super(),this.columns=e,this.element=t,this.destroyManagedListeners=[],this.enableFeature=o=>{let{beans:i,gos:r,element:a,columns:n}=this,s=i.colHover;if(o!=null?o:!!r.get("columnHoverHighlight"))this.destroyManagedListeners=this.addManagedElementListeners(a,{mouseover:s.setMouseOver.bind(s,n),mouseout:s.clearMouseOver.bind(s)});else{for(let c of this.destroyManagedListeners)c();this.destroyManagedListeners=[]}}}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{this.enableFeature(e)}),this.enableFeature()}destroy(){super.destroy(),this.destroyManagedListeners=null}},Q3="ag-column-hover",Z3=class extends S{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;let t=this.selectedColumns;return!!t&&t.indexOf(e)>=0}addHeaderColumnHoverListener(e,t,o){let i=()=>{let r=this.isHovered(o);t.toggleCss("ag-column-hover",r)};e.addManagedEventListeners({columnHoverChanged:i}),i()}onCellColumnHover(e,t){if(!t)return;let o=this.isHovered(e);t.toggleCss(Q3,o)}addHeaderFilterColumnHoverListener(e,t,o,i){this.createHoverFeature(e,[o],i);let r=()=>{let a=this.isHovered(o);t.toggleCss("ag-column-hover",a)};e.addManagedEventListeners({columnHoverChanged:r}),r()}createHoverFeature(e,t,o){e.createManagedBean(new Y3(t,o))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:"columnHoverChanged"})}},J3={moduleName:"ColumnHover",version:D,beans:[Z3],apiFunctions:{isColumnHovered:$3}},X3=class extends S{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={}){let{allColumns:o,columnKeys:i,skipRowGroups:r,exportRowNumbers:a}=t,n=this.getColumnsToExport({allColumns:o,skipRowGroups:r,columnKeys:i,exportRowNumbers:a});return[this.prepareSession(n),this.prependContent(t),this.exportColumnGroups(t,n),this.exportHeaders(t,n),this.processPinnedTopRows(t,n),this.processRows(t,n),this.processPinnedBottomRows(t,n),this.appendContent(t)].reduce((s,l)=>l(s),e).parse()}processRow(e,t,o,i){var p;let r=t.shouldRowBeSkipped||(()=>!1),n=t.rowPositions!=null||!!t.onlySelected,s=this.gos.get("groupHideOpenParents")&&!n,l=this.colModel.isPivotMode()?i.leafGroup:!i.group,c=!!i.footer,d=i.allChildrenCount===1&&((p=i.childrenAfterGroup)==null?void 0:p.length)===1&&Dh(this.gos,i);if(!l&&!c&&(t.skipRowGroups||d||s)||t.onlySelected&&!i.isSelected()||t.skipPinnedTop&&i.rowPinned==="top"||t.skipPinnedBottom&&i.rowPinned==="bottom"||i.stub||i.level===-1&&!l&&!c||r(O(this.gos,{node:i})))return;let h=e.onNewBodyRow(i);if(o.forEach((f,m)=>{h.onColumn(f,m,i)}),t.getCustomContentBelowRow){let f=t.getCustomContentBelowRow(O(this.gos,{node:i}));f&&e.addCustomContent(f)}}appendContent(e){return t=>{let o=e.appendContent;return o&&t.addCustomContent(o),t}}prependContent(e){return t=>{let 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){let i=new Nd,{colGroupSvc:r}=this.beans,a=r?r.createColumnGroups({columns:t,idCreator:i,pinned:null,isStandaloneStructure:!0}):t;this.recursivelyAddHeaderGroups(a,o,e.processGroupHeaderCallback)}return o}}exportHeaders(e,t){return o=>{if(!e.skipColumnHeaders){let i=o.onNewHeaderRow();t.forEach((r,a)=>{i.onColumn(r,a,void 0)})}return o}}processPinnedTopRows(e,t){return o=>{var r,a;let i=this.processRow.bind(this,o,e,t);return e.rowPositions?e.rowPositions.filter(n=>n.rowPinned==="top").sort((n,s)=>n.rowIndex-s.rowIndex).map(n=>{var s;return(s=this.pinnedRowModel)==null?void 0:s.getPinnedTopRow(n.rowIndex)}).forEach(i):(r=this.pinnedRowModel)!=null&&r.isManual()||(a=this.pinnedRowModel)==null||a.forEachPinnedRow("top",i),o}}processRows(e,t){return o=>{var c,d;let i=this.rowModel,r=ee(this.gos,i),a=mi(this.gos,i),n=!r&&e.onlySelected,s=this.processRow.bind(this,o,e,t),{exportedRows:l="filteredAndSorted"}=e;if(e.rowPositions)e.rowPositions.filter(g=>g.rowPinned==null).sort((g,u)=>g.rowIndex-u.rowIndex).map(g=>i.getRow(g.rowIndex)).forEach(s);else if(this.colModel.isPivotMode())r?i.forEachPivotNode(s,!0,l==="filteredAndSorted"):a?i.forEachNodeAfterFilterAndSort(s,!0):i.forEachNode(s);else if(e.onlySelectedAllPages||n){let g=(d=(c=this.beans.selectionSvc)==null?void 0:c.getSelectedNodes())!=null?d:[];this.replicateSortedOrder(g),g.forEach(s)}else l==="all"?i.forEachNode(s):r||a?i.forEachNodeAfterFilterAndSort(s,!0):i.forEachNode(s);return o}}replicateSortedOrder(e){let{sortSvc:t,rowNodeSorter:o}=this.beans;if(!t||!o)return;let i=t.getSortOptions(),r=(a,n)=>{var s,l,c,d;return a.rowIndex!=null&&n.rowIndex!=null?a.rowIndex-n.rowIndex:a.level===n.level?((s=a.parent)==null?void 0:s.id)===((l=n.parent)==null?void 0:l.id)?o.compareRowNodes(i,a,n)||((c=a.rowIndex)!=null?c:-1)-((d=n.rowIndex)!=null?d:-1):r(a.parent,n.parent):a.level>n.level?r(a.parent,n):r(a,n.parent)};e.sort(r)}processPinnedBottomRows(e,t){return o=>{var r,a;let i=this.processRow.bind(this,o,e,t);return e.rowPositions?e.rowPositions.filter(n=>n.rowPinned==="bottom").sort((n,s)=>n.rowIndex-s.rowIndex).map(n=>{var s;return(s=this.pinnedRowModel)==null?void 0:s.getPinnedBottomRow(n.rowIndex)}).forEach(i):(r=this.pinnedRowModel)!=null&&r.isManual()||(a=this.pinnedRowModel)==null||a.forEachPinnedRow("bottom",i),o}}getColumnsToExport(e){let{allColumns:t=!1,skipRowGroups:o=!1,exportRowNumbers:i=!1,columnKeys:r}=e,{colModel:a,gos:n,visibleCols:s}=this,l=a.isPivotMode(),c=u=>At(u)?!1:!pe(u)||i;if(r!=null&&r.length)return a.getColsForKeys(r).filter(c);let d=n.get("treeData"),g=[];return t&&!l?g=a.getCols():g=s.allCols,g=g.filter(u=>c(u)&&(o&&!d?!xn(u):!0)),g}recursivelyAddHeaderGroups(e,t,o){var r;let i=[];for(let a of e){let n=a;if(n.getChildren)for(let s of(r=n.getChildren())!=null?r:[])i.push(s)}e.length>0&&X(e[0])&&this.doAddHeaderHeader(t,e,o),i&&i.length>0&&this.recursivelyAddHeaderGroups(i,t,o)}doAddHeaderHeader(e,t,o){let i=e.onNewHeaderGroupingRow(),r=0;for(let a of t){let n=a,s;o?s=o(O(this.gos,{columnGroup:n})):s=this.beans.colNames.getDisplayNameForColumnGroup(n,"header");let c=(n.isExpandable()?n.getLeafColumns():[]).reduce((d,g,u,h)=>{let p=U(d);return g.getColumnGroupShow()==="open"?(!p||p[1]!=null)&&(p=[u],d.push(p)):p&&p[1]==null&&(p[1]=u-1),u===h.length-1&&p&&p[1]==null&&(p[1]=u),d},[]);i.onColumn(n,s||"",r++,n.getLeafColumns().length-1,c)}}},eS={moduleName:"SharedExport",version:D,beans:[X3]},tS=class extends S{getFileName(e){let t=this.getDefaultFileExtension();return e!=null&&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()}`}};function oS(e,t){let o=document.defaultView||window;if(!o){k(52);return}let i=document.createElement("a"),r=o.URL.createObjectURL(t);i.setAttribute("href",r),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(r)},0)}var iS=class{constructor(e){this.valueFrom="data";let{colModel:t,rowGroupColsSvc:o,colNames:i,valueSvc:r,gos:a,processCellCallback:n,processHeaderCallback:s,processGroupHeaderCallback:l,processRowGroupCallback:c,valueFrom:d}=e;this.colModel=t,this.rowGroupColsSvc=o,this.colNames=i,this.valueSvc=r,this.gos=a,this.processCellCallback=n,this.processHeaderCallback=s,this.processGroupHeaderCallback=l,this.processRowGroupCallback=c,d&&(this.valueFrom=d)}prepare(e){}extractHeaderValue(e){let t=this.getHeaderName(this.processHeaderCallback,e);return t!=null?t:""}extractRowCellValue(e){var p,f,m,v,C;let{column:t,node:o,currentColumnIndex:i,accumulatedRowIndex:r,type:a,useRawFormula:n}=e,s=i===0&&Ac(this.gos,o,this.colModel.isPivotMode());if(this.processRowGroupCallback&&(this.gos.get("treeData")||o.group)&&(t.isRowGroupDisplayed((f=(p=o.rowGroupColumn)==null?void 0:p.getColId())!=null?f:"")||s))return{value:(m=this.processRowGroupCallback(O(this.gos,{column:t,node:o})))!=null?m:""};if(this.processCellCallback)return{value:(v=this.processCellCallback(O(this.gos,{accumulatedRowIndex:r,column:t,node:o,value:this.valueSvc.getValueForDisplay({column:t,node:o,from:this.valueFrom}).value,type:a,parseValue:w=>this.valueSvc.parseValue(t,o,w,this.valueSvc.getValue(t,o,this.valueFrom)),formatValue:w=>{var y;return(y=this.valueSvc.formatValue(t,o,w))!=null?y:w}})))!=null?v:""};let l=this.gos.get("treeData"),c=this.valueSvc,d=o.level===-1&&o.footer,g=t.colDef.showRowGroup===!0&&(o.group||l);if(!d&&(s||g)){let w="",y=o;for(;y&&y.level!==-1;){let{value:x,valueFormatted:R}=c.getValueForDisplay({column:s?void 0:t,node:y,includeValueFormatted:!0,exporting:!0,from:this.valueFrom});w=` -> ${(C=R!=null?R:x)!=null?C:""}${w}`,y=y.parent}return{value:w,valueFormatted:w}}let{value:u,valueFormatted:h}=c.getValueForDisplay({column:t,node:o,includeValueFormatted:!0,exporting:!0,useRawFormula:n,from:this.valueFrom});return{value:u!=null?u:"",valueFormatted:h}}getHeaderName(e,t){return e?e(O(this.gos,{column:t})):this.colNames.getDisplayNameForColumn(t,"csv",!0)}},Al=`\r +`,rS=class extends iS{constructor(e){super(e),this.config=e,this.isFirstLine=!0,this.result="";let{suppressQuotes:t,columnSeparator:o}=e;this.suppressQuotes=t,this.columnSeparator=o}addCustomContent(e){e&&(typeof e=="string"?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,Al),this.result+=e):e.forEach(t=>{this.beginNewLine(),t.forEach((o,i)=>{i!==0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(o.data.value||""),o.mergeAcross&&this.appendEmptyCells(o.mergeAcross)})}))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,t,o,i){o!=0&&(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){t!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(e,t,o){var r;t!=0&&(this.result+=this.columnSeparator);let i=this.extractRowCellValue({column:e,node:o,currentColumnIndex:t,accumulatedRowIndex:t,type:"csv",useRawFormula:!1});this.result+=this.putInQuotes((r=i.valueFormatted)!=null?r:i.value)}putInQuotes(e){if(this.suppressQuotes)return e;if(e==null)return'""';let t;return typeof e=="string"?t=e:typeof e.toString=="function"?t=e.toString():(k(53),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=Al),this.isFirstLine=!1}},aS=class extends tS{constructor(){super(...arguments),this.beanName="csvCreator"}getMergedParams(e){let t=this.gos.get("defaultCsvExportParams");return Object.assign({},t,e)}export(e){if(this.isExportSuppressed()){k(51);return}let t=()=>{let i=this.getMergedParams(e),r=this.getData(i),a=new Blob(["\uFEFF",r],{type:"text/plain"}),n=i.fileName,s=typeof n=="function"?n(O(this.gos,{})):n;oS(this.getFileName(s),a)},{overlays:o}=this.beans;o?o.showExportOverlay(t):t()}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e,t=!1){let o=t?Object.assign({},e):this.getMergedParams(e);return this.getData(o)}getDefaultFileExtension(){return"csv"}createSerializingSession(e){let{colModel:t,colNames:o,rowGroupColsSvc:i,valueSvc:r,gos:a}=this.beans,{processCellCallback:n,processHeaderCallback:s,processGroupHeaderCallback:l,processRowGroupCallback:c,suppressQuotes:d,columnSeparator:g,valueFrom:u}=e;return new rS({colModel:t,colNames:o,valueSvc:r,gos:a,processCellCallback:n||void 0,processHeaderCallback:s||void 0,processGroupHeaderCallback:l||void 0,processRowGroupCallback:c||void 0,suppressQuotes:d||!1,columnSeparator:g||",",rowGroupColsSvc:i,valueFrom:u})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}};function nS(e,t){var o;return(o=e.csvCreator)==null?void 0:o.getDataAsCsv(t)}function sS(e,t){var o;(o=e.csvCreator)==null||o.exportDataAsCsv(t)}var lS={moduleName:"CsvExport",version:D,beans:[aS],apiFunctions:{getDataAsCsv:nS,exportDataAsCsv:sS},dependsOn:[eS]},Eg=class extends ve{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}postConstruct(){this.refreshTooltip()}setBrowserTooltip(e,t){let o="title",i=this.ctrl.getGui();i&&(e!=null&&(e!=""||t)?i.setAttribute(o,e):i.removeAttribute(o))}updateTooltipText(){let{getTooltipValue:e}=this.ctrl;e&&(this.tooltip=e())}createTooltipFeatureIfNeeded(){if(this.tooltipManager==null){let e=this.beans.registry.createDynamicBean("tooltipStateManager",!0,this.ctrl,()=>this.tooltip);e&&(this.tooltipManager=this.createBean(e,this.beans.context))}}attemptToShowTooltip(){var e;(e=this.tooltipManager)==null||e.prepareToShowTooltip()}attemptToHideTooltip(){var e;(e=this.tooltipManager)==null||e.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()}},cS=1e3,dS=1e3,zl=100,Ll,Ai=!1,gS=class extends ve{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");let e=this.tooltipCtrl.getGui();this.tooltipTrigger===0&&this.addManagedListeners(e,{mouseenter:this.onMouseEnter.bind(this),mouseleave:this.onMouseLeave.bind(this)}),this.tooltipTrigger===1&&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){let t=this.gos.get(e);return Math.max(200,t)}getTooltipDelay(e){var t,o,i;return(i=(o=(t=this.tooltipCtrl)[`getTooltip${e}DelayOverride`])==null?void 0:o.call(t))!=null?i:this.getGridOptionsTooltipDelay(`tooltip${e}Delay`)}destroy(){this.setToDoNothing(),super.destroy()}getTooltipTrigger(){let e=this.gos.get("tooltipTrigger");return!e||e==="hover"?0:1}onMouseEnter(e){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),!jt()&&(Ai?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(e)},zl):this.prepareToShowTooltip(e))}onMouseMove(e){this.lastMouseEvent&&(this.lastMouseEvent=e),this.tooltipMouseTrack&&this.state===2&&this.tooltipComp&&this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){this.interactionEnabled?this.lockService():this.setToDoNothing()}onFocusIn(){this.prepareToShowTooltip()}onFocusOut(e){var r;let t=e.relatedTarget,o=this.tooltipCtrl.getGui(),i=(r=this.tooltipComp)==null?void 0:r.getGui();this.isInteractingWithTooltip||o.contains(t)||this.interactionEnabled&&(i!=null&&i.contains(t))||this.setToDoNothing()}onKeyDown(){this.isInteractingWithTooltip&&(this.isInteractingWithTooltip=!1),this.setToDoNothing()}prepareToShowTooltip(e){if(this.state!=0||Ai)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()-Llthis.hideTooltip(!0),...(n=t.getAdditionalParams)==null?void 0:n.call(t)});this.state=2,this.tooltipInstanceCount++;let i=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);this.createTooltipComp(o,i)}hideTooltip(e){!e&&this.isInteractingWithTooltip||(this.tooltipComp&&(this.destroyTooltipComp(),Ll=Date.now()),this.eventSvc.dispatchEvent({type:"tooltipHide",parentGui:this.tooltipCtrl.getGui()}),e&&(this.isInteractingWithTooltip=!1),this.setToDoNothing(!0))}newTooltipComponentCallback(e,t){var n;if(this.state!==2||this.tooltipInstanceCount!==e){this.destroyBean(t);return}let i=t.getGui();this.tooltipComp=t,i.classList.contains("ag-tooltip")||i.classList.add("ag-tooltip-custom"),this.tooltipTrigger===0&&i.classList.add("ag-tooltip-animate"),this.interactionEnabled&&i.classList.add("ag-tooltip-interactive");let r=this.getLocaleTextFunc(),a=(n=this.popupSvc)==null?void 0:n.addPopup({eChild:i,ariaLabel:r("ariaLabelTooltip","Tooltip")});if(a&&(this.tooltipPopupDestroyFunc=a.hideFunc),this.positionTooltip(),this.tooltipTrigger===1){let s=()=>this.setToDoNothing();[this.onBodyScrollEventCallback]=this.addManagedEventListeners({bodyScroll:s}),this.setEventHandlers(s)}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(i,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners(te(this.beans),{keydown:s=>{i.contains(s==null?void 0:s.target)||this.onKeyDown()}}),this.tooltipTrigger===1&&([this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(i,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)}))),this.eventSvc.dispatchEvent({type:"tooltipShow",tooltipGui:i,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(){var o;let e=(o=this.tooltipComp)==null?void 0:o.getGui(),t=Y(this.beans);return!!e&&e.contains(t)}onTooltipFocusOut(e){let t=this.tooltipCtrl.getGui();this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,t.contains(e.relatedTarget)?this.startHideTimeout():this.hideTooltip())}positionTooltip(){var t,o;let e={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?(t=this.popupSvc)==null||t.positionPopupUnderMouseEvent({...e,mouseEvent:this.lastMouseEvent}):(o=this.popupSvc)==null||o.positionPopupByComponent({...e,eventSource:this.tooltipCtrl.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5})}destroyTooltipComp(){this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");let e=this.tooltipPopupDestroyFunc,t=this.tooltipComp,o=this.tooltipTrigger===0?dS:0;window.setTimeout(()=>{e(),this.destroyBean(t)},o),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){for(let e of[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener])e&&e();this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){Ai=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},zl)}unlockService(){Ai=!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()}},uS=class extends Eg{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){this.tooltipMode===1&&(e.highlighted?this.attemptToShowTooltip():this.attemptToHideTooltip())}setTooltipMode(e="focus"){this.tooltipMode=e==="focus"?1:0}destroy(){this.highlightTracker.removeEventListener("itemHighlighted",this.onHighlight),super.destroy()}},hS=class extends Fn{constructor(){super({tag:"div",cls:"ag-tooltip"})}init(e){let{value:t}=e,o=this.getGui();o.textContent=zo(t);let i=e.location.replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase();o.classList.add(`ag-${i}-tooltip`)}},pS=".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}}",zi=0,fS=200,mS=class extends ve{constructor(){super(...arguments),this.beanName="popupSvc",this.popupList=[]}postConstruct(){this.addManagedEventListeners({stylesChanged:this.handleThemeChange.bind(this)})}getPopupParent(){let e=this.gos.get("popupParent");return e||this.getDefaultPopupParent()}positionPopupUnderMouseEvent(e){let{ePopup:t,nudgeX:o,nudgeY:i,skipObserver:r}=e;this.positionPopup({ePopup:t,nudgeX:o,nudgeY:i,keepWithinBounds:!0,skipObserver:r,updatePosition:()=>this.calculatePointerAlign(e.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,e.type,e.ePopup,null,e.mouseEvent)})}calculatePointerAlign(e){let t=this.getParentRect();return{x:e.clientX-t.left,y:e.clientY-t.top}}positionPopupByComponent(e){let{ePopup:t,nudgeX:o,nudgeY:i,keepWithinBounds:r,eventSource:a,alignSide:n="left",position:s="over",type:l}=e,c=a.getBoundingClientRect(),d=this.getParentRect();this.setAlignedTo(a,t);let g=()=>{let u=c.left-d.left;n==="right"&&(u-=t.offsetWidth-c.width);let h;return s==="over"?(h=c.top-d.top,this.setAlignedStyles(t,"over")):(this.setAlignedStyles(t,"under"),this.shouldRenderUnderOrAbove(t,c,d,e.nudgeY||0)==="under"?h=c.top-d.top+c.height:h=c.top-t.offsetHeight-(i||0)*2-d.top),{x:u,y:h}};this.positionPopup({ePopup:t,nudgeX:o,nudgeY:i,keepWithinBounds:r,updatePosition:g,postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,l,t,a,null)})}positionPopupForMenu(e){let{eventSource:t,ePopup:o,event:i}=e,r=t.getBoundingClientRect(),a=this.getParentRect();this.setAlignedTo(t,o);let n=!1,s=()=>{let l=this.keepXYWithinBounds(o,r.top-a.top,0),c=o.clientWidth>0?o.clientWidth:200;n||(o.style.minWidth=`${c}px`,n=!0);let g=a.right-a.left-c,u;return this.gos.get("enableRtl")?(u=p(),u<0&&(u=h(),this.setAlignedStyles(o,"left")),u>g&&(u=0,this.setAlignedStyles(o,"right"))):(u=h(),u>g&&(u=p(),this.setAlignedStyles(o,"right")),u<0&&(u=0,this.setAlignedStyles(o,"left"))),{x:u,y:l};function h(){return r.right-a.left-2}function p(){return r.left-a.left-c}};this.positionPopup({ePopup:o,keepWithinBounds:!0,updatePosition:s,postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,"subMenu",o,t,i instanceof MouseEvent?i:void 0)})}shouldRenderUnderOrAbove(e,t,o,i){let r=o.bottom-t.bottom,a=t.top-o.top,n=e.offsetHeight+i;return r>n?"under":a>n||a>r?"above":"under"}setAlignedStyles(e,t){let o=this.getPopupIndex(e);if(o===-1)return;let i=this.popupList[o],{alignedToElement:r}=i;if(!r)return;let a=["right","left","over","above","under"];for(let n of a)r.classList.remove(`ag-has-popup-positioned-${n}`),e.classList.remove(`ag-popup-positioned-${n}`);t&&(r.classList.add(`ag-has-popup-positioned-${t}`),e.classList.add(`ag-popup-positioned-${t}`))}setAlignedTo(e,t){let o=this.getPopupIndex(t);if(o!==-1){let i=this.popupList[o];i.alignedToElement=e}}positionPopup(e){let{ePopup:t,keepWithinBounds:o,nudgeX:i,nudgeY:r,skipObserver:a,updatePosition:n}=e,s={width:0,height:0},l=(c=!1)=>{let{x:d,y:g}=n();c&&t.clientWidth===s.width&&t.clientHeight===s.height||(s.width=t.clientWidth,s.height=t.clientHeight,i&&(d+=i),r&&(g+=r),o&&(d=this.keepXYWithinBounds(t,d,1),g=this.keepXYWithinBounds(t,g,0)),t.style.left=`${d}px`,t.style.top=`${g}px`,e.postProcessCallback&&e.postProcessCallback())};if(l(),!a){let c=Tt(this.beans,t,()=>l(!0));setTimeout(()=>c(),fS)}}getParentRect(){let e=te(this.beans),t=this.getPopupParent();return t===e.body?t=e.documentElement:getComputedStyle(t).position==="static"&&(t=t.offsetParent),cc(t)}keepXYWithinBounds(e,t,o){let i=o===0,r=i?"clientHeight":"clientWidth",a=i?"top":"left",n=i?"height":"width",s=i?"scrollTop":"scrollLeft",l=te(this.beans),c=l.documentElement,d=this.getPopupParent(),g=e.getBoundingClientRect(),u=d.getBoundingClientRect(),h=l.documentElement.getBoundingClientRect(),p=d===l.body,f=Math.ceil(g[n]),v=p?(i?lc:$i)(c)+c[s]:d[r];p&&(v-=Math.abs(h[a]-u[a]));let C=v-f;return Math.min(Math.max(t,0),Math.max(C,0))}addPopup(e){let{eChild:t,ariaLabel:o,ariaOwns:i,alwaysOnTop:r,positionCallback:a,anchorToElement:n}=e,s=this.getPopupIndex(t);if(s!==-1)return{hideFunc:this.popupList[s].hideFunc};this.initialisePopupPosition(t);let l=this.createPopupWrapper(t,!!r,o,i),c=this.addEventListenersToPopup({...e,wrapperEl:l});return a&&a(),this.addPopupToPopupList(t,l,c,n),{hideFunc:c}}initialisePopupPosition(e){let o=this.getPopupParent().getBoundingClientRect();M(e.style.top)||(e.style.top=`${o.top*-1}px`),M(e.style.left)||(e.style.left=`${o.left*-1}px`)}createPopupWrapper(e,t,o,i){let r=this.getPopupParent(),{environment:a,gos:n}=this.beans,s=Qt({tag:"div"});return a.applyThemeClasses(s),s.classList.add("ag-popup"),e.classList.add(n.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||Rt(e,"dialog"),o?Fo(e,o):i&&(e.id||(e.id=`popup-component-${zi}`),bs(i,e.id)),s.appendChild(e),r.appendChild(s),t?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),s}addEventListenersToPopup(e){let t=this.beans,o=te(t),{wrapperEl:i,eChild:r,closedCallback:a,afterGuiAttached:n,closeOnEsc:s,modal:l,ariaOwns:c}=e,d=!1,g=f=>{if(!i.contains(Y(t)))return;f.key===b.ESCAPE&&!this.isStopPropagation(f)&&p({keyboardEvent:f})},u=f=>p({mouseEvent:f}),h=f=>p({touchEvent:f}),p=(f={})=>{let{mouseEvent:m,touchEvent:v,keyboardEvent:C,forceHide:w}=f;!w&&(this.isEventFromCurrentPopup({mouseEvent:m,touchEvent:v},r)||d)||(d=!0,i.remove(),o.removeEventListener("keydown",g),o.removeEventListener("mousedown",u),o.removeEventListener("touchstart",h),o.removeEventListener("contextmenu",u),this.eventSvc.removeListener("dragStarted",u),a&&a(m||v||C),this.removePopupFromPopupList(r,c))};return n&&n({hidePopup:p}),window.setTimeout(()=>{s&&o.addEventListener("keydown",g),l&&(o.addEventListener("mousedown",u),this.eventSvc.addListener("dragStarted",u),o.addEventListener("touchstart",h),o.addEventListener("contextmenu",u))},0),p}addPopupToPopupList(e,t,o,i){this.popupList.push({element:e,wrapper:t,hideFunc:o,instanceId:zi,isAnchored:!!i}),i&&this.setPopupPositionRelatedToElement(e,i),zi=zi+1}getPopupIndex(e){return this.popupList.findIndex(t=>t.element===e)}setPopupPositionRelatedToElement(e,t){let o=this.getPopupIndex(e);if(o===-1)return;let i=this.popupList[o];if(i.stopAnchoringPromise&&i.stopAnchoringPromise.then(a=>a&&a()),i.stopAnchoringPromise=void 0,i.isAnchored=!1,!t)return;let r=this.keepPopupPositionedRelativeTo({element:t,ePopup:e,hidePopup:i.hideFunc});return i.stopAnchoringPromise=r,i.isAnchored=!0,r}removePopupFromPopupList(e,t){this.setAlignedStyles(e,null),this.setPopupPositionRelatedToElement(e,null),t&&bs(t,null),this.popupList=this.popupList.filter(o=>o.element!==e)}keepPopupPositionedRelativeTo(e){let t=this.getPopupParent(),o=t.getBoundingClientRect(),{element:i,ePopup:r}=e,a=i.getBoundingClientRect(),n=g=>Number.parseInt(g.substring(0,g.length-1),10),s=(g,u)=>{let h=o[g]-a[g],p=n(r.style[g]);return{initialDiff:h,lastDiff:h,initial:p,last:p,direction:u}},l=s("top",0),c=s("left",1),d=this.beans.frameworkOverrides;return new $(g=>{d.wrapIncoming(()=>{up(()=>{let u=t.getBoundingClientRect(),h=i.getBoundingClientRect();if(h.top==0&&h.left==0&&h.height==0&&h.width==0){e.hidePopup();return}let f=(m,v)=>{let C=n(r.style[v]);m.last!==C&&(m.initial=C,m.last=C);let w=u[v]-h[v];if(w!=m.lastDiff){let y=this.keepXYWithinBounds(r,m.initial+m.initialDiff-w,m.direction);r.style[v]=`${y}px`,m.last=y}m.lastDiff=w};f(l,"top"),f(c,"left")},200).then(u=>{g(()=>{u!=null&&window.clearInterval(u)})})},"popupPositioning")})}isEventFromCurrentPopup(e,t){let{mouseEvent:o,touchEvent:i}=e,r=o||i;if(!r)return!1;let a=this.getPopupIndex(t);if(a===-1)return!1;for(let n=a;ne.element)}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isStopPropagation(e){return ct(e)}},Ir={moduleName:"Popup",version:D,beans:[vS]};function Qa(e){return e.get("tooltipShowMode")==="whenTruncated"}var CS=(e,t)=>{let o=e;return typeof o.getTranslatedMessage=="function"?o.getTranslatedMessage(t):e.message},Za=(e,t,o)=>{var s,l,c;let{editModelSvc:i}=e,r=(l=(s=i==null?void 0:i.getCellValidationModel())==null?void 0:s.getCellValidation(t))==null?void 0:l.errorMessages,a=(c=i==null?void 0:i.getRowValidationModel().getRowValidation(t))==null?void 0:c.errorMessages,n=r||a;return n!=null&&n.length?n.join(o("tooltipValidationErrorSeparator",". ")):void 0},wS=(e,t)=>{if(Qa(e.gos)){if(t.isCellRenderer()){let i=t.column.getColDef();return!!i.showRowGroup||i.cellRenderer==="agGroupCellRenderer"?si(()=>{let a=t.eGui;return a.querySelector(".ag-group-value")||a.querySelector(".ag-cell-value")||a}):void 0}return si(()=>{let i=t.eGui;return i.children.length===0?i:i.querySelector(".ag-cell-value")})}},bS=(e,t,o)=>{let{editSvc:i}=e,{column:r}=t,a=wS(e,t),n=()=>i!=null&&i.isEditing(t)?!1:a?r.isTooltipEnabled()?a():!1:!0;return{shouldDisplayDefault:n,shouldDisplayColumnTooltip:n,shouldDisplayCustomTooltip:o!=null?o:n}},yS=({beans:e,ctrl:t,value:o,displayFunctions:i,translate:r})=>{let{editSvc:a,formula:n,gos:s}=e,{column:l,rowNode:c}=t;if(n!=null&&n.active&&l.isAllowFormula()){let m=n.getFormulaError(l,c);if(m)return{value:CS(m,r),location:"cellFormula",shouldDisplay:()=>!!(n!=null&&n.getFormulaError(l,c))}}if(!!!(a!=null&&a.isEditing(t))){let m=Za(e,t,r);if(m)return{value:m,location:"cellEditor",shouldDisplay:()=>!(a!=null&&a.isEditing(t))&&!!Za(e,t,r)}}let{shouldDisplayCustomTooltip:g,shouldDisplayColumnTooltip:u}=i;if(o!=null)return{value:o,location:"cell",shouldDisplay:g};let h=l.getColDef(),p=c.data;if(h.tooltipField&&M(p))return{value:Xo(p,h.tooltipField,l.isTooltipFieldContainsDots()),location:"cell",shouldDisplay:u};let f=h.tooltipValueGetter;return f?{value:f(O(s,{location:"cell",colDef:l.getColDef(),column:l,rowIndex:t.cellPosition.rowIndex,node:c,data:c.data,value:t.value,valueFormatted:t.valueFormatted})),location:"cell",shouldDisplay:u}:null},SS=class extends S{constructor(){super(...arguments),this.beanName="tooltipSvc"}setupHeaderTooltip(e,t,o,i){e&&t.destroyBean(e);let r=this.gos,a=Qa(r),{column:n,eGui:s}=t,l=n.getColDef();!i&&a&&!l.headerComponent&&(i=si(()=>s.querySelector(".ag-header-cell-text")));let c="header",g=this.beans.colNames.getDisplayNameForColumn(n,"header",!0),u=o!=null?o:g,h={getGui:()=>s,getLocation:()=>c,getTooltipValue:()=>{var f,m;return(m=o!=null?o:(f=l==null?void 0:l.headerTooltipValueGetter)==null?void 0:f.call(l,O(r,{location:c,colDef:l,column:n,value:u,valueFormatted:g})))!=null?m:l==null?void 0:l.headerTooltip},shouldDisplayTooltip:i,getAdditionalParams:()=>({column:n,colDef:n.getColDef()})},p=this.createTooltipFeature(h);return p&&(p=t.createBean(p),t.setRefreshFunction("tooltip",()=>p.refreshTooltip())),p}setupHeaderGroupTooltip(e,t,o,i){e&&t.destroyBean(e);let r=this.gos,a=Qa(r),{column:n,eGui:s}=t,l=n.getColGroupDef();!i&&a&&!(l!=null&&l.headerGroupComponent)&&(i=si(()=>s.querySelector(".ag-header-group-text")));let c="headerGroup",g=this.beans.colNames.getDisplayNameForColumnGroup(n,"header"),u=o!=null?o:g,h={getGui:()=>s,getLocation:()=>c,getTooltipValue:()=>{var f,m;return(m=o!=null?o:(f=l==null?void 0:l.headerTooltipValueGetter)==null?void 0:f.call(l,O(r,{location:c,colDef:l,column:n,value:u,valueFormatted:g})))!=null?m:l==null?void 0:l.headerTooltip},shouldDisplayTooltip:i,getAdditionalParams:()=>{let f={column:n};return l&&(f.colDef=l),f}},p=this.createTooltipFeature(h);return p&&t.createBean(p)}enableCellTooltipFeature(e,t,o){let{beans:i}=this,{column:r,rowNode:a}=e,n=bS(i,e,o),s=this.getLocaleTextFunc(),l=null,c=()=>(l=yS({beans:i,ctrl:e,value:t,displayFunctions:n,translate:s}),l),g={getGui:()=>e.eGui,getLocation:()=>{var u;return(u=l==null?void 0:l.location)!=null?u:"cell"},getTooltipValue:()=>{var u;return(u=c())==null?void 0:u.value},shouldDisplayTooltip:()=>{let u=l!=null?l:c();return u?u.shouldDisplay?u.shouldDisplay():!0:!1},getAdditionalParams:()=>({column:r,colDef:r.getColDef(),rowIndex:e.cellPosition.rowIndex,node:a,data:a.data,valueFormatted:e.valueFormatted})};return this.createTooltipFeature(g,i)}setupFullWidthRowTooltip(e,t,o,i){let r={getGui:()=>t.getFullWidthElement(),getTooltipValue:()=>o,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:i},a=this.beans,n=a.context;e&&t.destroyBean(e,n);let s=this.createTooltipFeature(r,a);if(s)return t.createBean(s,n)}setupCellEditorTooltip(e,t){var s,l;let{beans:o}=this,{context:i}=o,r=((s=t.getValidationElement)==null?void 0:s.call(t,!0))||!((l=t.isPopup)!=null&&l.call(t))&&e.eGui;if(!r)return;let a={getGui:()=>r,getTooltipValue:()=>Za(o,e,this.getLocaleTextFunc()),getLocation:()=>"cellEditor",shouldDisplayTooltip:()=>{var p,f;let{editModelSvc:c}=o,d=(p=c==null?void 0:c.getRowValidationModel())==null?void 0:p.getRowValidationMap(),g=(f=c==null?void 0:c.getCellValidationModel())==null?void 0:f.getCellValidationMap(),u=!!d&&d.size>0,h=!!g&&g.size>0;return u||h}},n=this.createTooltipFeature(a,o);if(n)return e.createBean(n,i)}initCol(e){let{colDef:t}=e;e.tooltipEnabled=M(t.tooltipField)||M(t.tooltipValueGetter)||M(t.tooltipComponent)}createTooltipFeature(e,t){return this.beans.registry.createDynamicBean("tooltipFeature",!1,e,t)}},xS=class extends gS{createTooltipComp(e,t){let o=Wp(this.beans.userCompFactory,e);o==null||o.newAgStackInstance().then(t)}setEventHandlers(e){[this.onColumnMovedEventCallback]=this.addManagedEventListeners({columnMoved:e})}clearEventHandlers(){var e;(e=this.onColumnMovedEventCallback)==null||e.call(this),this.onColumnMovedEventCallback=void 0}},Fg={moduleName:"Tooltip",version:D,beans:[SS],dynamicBeans:{tooltipFeature:Eg,highlightTooltipFeature:uS,tooltipStateManager:xS},userComponents:{agTooltipComponent:hS},dependsOn:[Ir],css:[pS]},uo=class{constructor(e){this.cellValueChanges=e}},wa=class extends uo{constructor(e,t,o,i){super(e),this.initialRange=t,this.finalRange=o,this.ranges=i}},kS=10,Ol=class{constructor(e){this.actionStack=[],this.maxStackSize=e||kS,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}},RS=class extends S{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=>{let t={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned},o=this.activeCellEdit!==null&&Pn(this.activeCellEdit,t),i=this.activeRowEdit!==null&&Ef(this.activeRowEdit,t);if(!(o||i||this.isPasting||this.isRangeInAction))return;let{rowPinned:a,rowIndex:n,column:s,oldValue:l,value:c}=e,d={rowPinned:a,rowIndex:n,columnId:s.getColId(),newValue:c,oldValue:l};this.cellValueChanges.push(d)},this.clearStacks=()=>{this.undoStack.clear(),this.redoStack.clear()}}postConstruct(){let{gos:e,ctrlsSvc:t}=this.beans;if(!e.get("undoRedoCellEditing"))return;let o=e.get("undoRedoCellEditingLimit");if(o<=0)return;this.undoStack=new Ol(o),this.redoStack=new Ol(o),this.addListeners();let i=this.clearStacks.bind(this);this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this),modelUpdated:r=>{r.keepUndoRedoStack||this.clearStacks()},columnPivotModeChanged:i,newColumnsLoaded:i,columnGroupOpened:i,columnRowGroupChanged:i,columnMoved:i,columnPinned:i,columnVisible:i,rowDragEnd:i}),t.whenReady(this,r=>{this.gridBodyCtrl=r.gridBodyCtrl})}getCurrentUndoStackSize(){var e,t;return(t=(e=this.undoStack)==null?void 0:e.getCurrentStackSize())!=null?t:0}getCurrentRedoStackSize(){var e,t;return(t=(e=this.redoStack)==null?void 0:e.getCurrentStackSize())!=null?t:0}undo(e){let{eventSvc:t,undoStack:o,redoStack:i}=this;t.dispatchEvent({type:"undoStarted",source:e});let r=this.undoRedo(o,i,"initialRange","oldValue","undo");t.dispatchEvent({type:"undoEnded",source:e,operationPerformed:r})}redo(e){let{eventSvc:t,undoStack:o,redoStack:i}=this;t.dispatchEvent({type:"redoStarted",source:e});let r=this.undoRedo(i,o,"finalRange","newValue","redo");t.dispatchEvent({type:"redoEnded",source:e,operationPerformed:r})}undoRedo(e,t,o,i,r){if(!e)return!1;let a=e.pop();return a!=null&&a.cellValueChanges?(this.processAction(a,n=>n[i],r),a instanceof wa?this.processRange(a.ranges||[a[o]]):this.processCell(a.cellValueChanges),t.push(a),!0):!1}processAction(e,t,o){let{changeDetectionSvc:i}=this.beans;i==null||i.beginDeferred();try{for(let r of e.cellValueChanges){let{rowIndex:a,rowPinned:n,columnId:s}=r,l={rowIndex:a,rowPinned:n},c=et(this.beans,l);c!=null&&c.displayed&&c.setDataValue(s,t(r),o)}}finally{i==null||i.endDeferred()}}processRange(e){let t,o=this.beans.rangeSvc;o.removeAllCellRanges(!0),e.forEach((i,r)=>{if(!i)return;let a=i.startRow,n=i.endRow;r===e.length-1&&(t={rowPinned:a.rowPinned,rowIndex:a.rowIndex,columnId:i.startColumn.getColId()},this.setLastFocusedCell(t));let s={rowStartIndex:a.rowIndex,rowStartPinned:a.rowPinned,rowEndIndex:n.rowIndex,rowEndPinned:n.rowPinned,columnStart:i.startColumn,columns:i.columns};o.addCellRange(s)})}processCell(e){let t=e[0],{rowIndex:o,rowPinned:i}=t,r={rowIndex:o,rowPinned:i},a=et(this.beans,r),n={rowPinned:t.rowPinned,rowIndex:a.rowIndex,columnId:t.columnId};this.setLastFocusedCell(n)}setLastFocusedCell(e){let{rowIndex:t,columnId:o,rowPinned:i}=e,{colModel:r,focusSvc:a,rangeSvc:n}=this.beans,s=r.getCol(o);if(!s)return;let{scrollFeature:l}=this.gridBodyCtrl;l.ensureIndexVisible(t),l.ensureColumnVisible(s);let c={rowIndex:t,column:s,rowPinned:i};a.setFocusedCell({...c,forceBrowserFocus:!0}),n==null||n.setRangeToCell(c)}addListeners(){this.addManagedEventListeners({rowEditingStarted:e=>{this.activeRowEdit={rowIndex:e.rowIndex,rowPinned:e.rowPinned}},rowEditingStopped:()=>{let e=new uo(this.cellValueChanges);this.pushActionsToUndoStack(e),this.activeRowEdit=null},cellEditingStarted:e=>{this.activeCellEdit={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned}},cellEditingStopped:e=>{if(this.activeCellEdit=null,e.valueChanged&&!this.activeRowEdit&&!this.isPasting&&!this.isRangeInAction){let o=new uo(this.cellValueChanges);this.pushActionsToUndoStack(o)}},pasteStart:()=>{this.isPasting=!0},pasteEnd:()=>{let e=new uo(this.cellValueChanges);this.pushActionsToUndoStack(e),this.isPasting=!1},fillStart:()=>{this.isRangeInAction=!0},fillEnd:e=>{let t=new wa(this.cellValueChanges,e.initialRange,e.finalRange);this.pushActionsToUndoStack(t),this.isRangeInAction=!1},keyShortcutChangedCellStart:()=>{this.isRangeInAction=!0},keyShortcutChangedCellEnd:()=>{let e,{rangeSvc:t,gos:o}=this.beans;t&&dt(o)?e=new wa(this.cellValueChanges,void 0,void 0,[...t.getCellRanges()]):e=new uo(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){e==="bulkEditing"?this.bulkEditing=t:this.batchEditing=t}stopBigChange(e,t){if(e==="bulkEditing"&&!this.bulkEditing||e==="batchEditing"&&!this.batchEditing||(this.updateBigChange(e,!1),(t==null?void 0:t.length)===0))return;let o=new uo(t!=null?t:[]);this.pushActionsToUndoStack(o),this.cellValueChanges=[]}pushActionsToUndoStack(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear()}},ES=".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}",FS={tag:"div",cls:"ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit",children:[{tag:"ag-checkbox",ref:"eEditor",role:"presentation"}]},DS=class extends Er{constructor(){super(FS,[Nn]),this.eEditor=E}initialiseEditor(e){this.agSetEditValue(e.value),this.eEditor.getInputElement().setAttribute("tabindex","-1"),this.addManagedListeners(this.eEditor,{fieldValueChanged:o=>this.setAriaLabel(o.selected)})}agSetEditValue(e){this.params.value=e;let t=e!=null?e:void 0;this.eEditor.setValue(t,!0),this.setAriaLabel(t)}getValue(){return this.eEditor.getValue()}focusIn(){this.eEditor.getFocusableElement().focus()}afterGuiAttached(){this.params.cellStartedEdit&&this.focusIn()}isPopup(){return!1}setAriaLabel(e){let t=this.getLocaleTextFunc(),o=yr(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(){let{params:e}=this,{getValidationErrors:t}=e,o=this.getValue();return t?t({value:o,internalErrors:null,cellEditorParams:e}):null}},ut=class extends Gt{constructor(e,t="ag-text-field",o="text"){super(e,t,o)}postConstruct(){super.postConstruct(),this.config.allowedCharPattern&&this.preventDisallowedCharacters()}setValue(e,t){let o=this.eInput;return o.value!==e&&(o.value=M(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}setCustomValidity(e){let t=this.eInput,o=e.length>0;t.setCustomValidity(e),o&&t.reportValidity(),gn(t,o)}preventDisallowedCharacters(){let e=new RegExp(`[${this.config.allowedCharPattern}]`),t=o=>{Cd(o)&&o.key&&!e.test(o.key)&&o.preventDefault()};this.addManagedListeners(this.eInput,{keydown:t,paste:o=>{var r;let i=(r=o.clipboardData)==null?void 0:r.getData("text");i!=null&&i.split("").some(a=>!e.test(a))&&o.preventDefault()}})}},Tr={selector:"AG-INPUT-TEXT-FIELD",component:ut},MS=class extends ut{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct();let e=zt();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step="any"}onWheel(e){Y(this.beans)===this.eInput&&e.preventDefault()}setMin(e){var o;let t=e instanceof Date?(o=fe(e!=null?e:null,!!this.includeTime))!=null?o:void 0:e;return this.min===t?this:(this.min=t,we(this.eInput,"min",t),this)}setMax(e){var o;let t=e instanceof Date?(o=fe(e!=null?e:null,!!this.includeTime))!=null?o:void 0:e;return this.max===t?this:(this.max=t,we(this.eInput,"max",t),this)}setStep(e){return this.step===e?this:(this.step=e,we(this.eInput,"step",e),this)}setIncludeTime(e){return this.includeTime===e?this:(this.includeTime=e,super.setInputType(e?"datetime-local":"date"),e&&this.setStep(1),this)}getDate(){var e;if(this.eInput.validity.valid)return(e=me(this.getValue()))!=null?e:void 0}setDate(e,t){this.setValue(fe(e!=null?e:null,this.includeTime),t)}},Dg={selector:"AG-INPUT-DATE-FIELD",component:MS},Ar=class extends Er{constructor(e){super(),this.cellEditorInput=e,this.eEditor=E}initialiseEditor(e){let{cellEditorInput:t}=this;this.setTemplate({tag:"div",cls:"ag-cell-edit-wrapper",children:[t.getTemplate()]},t.getAgComponents());let{eEditor:o}=this,{cellStartedEdit:i,eventKey:r,suppressPreventDefault:a}=e;o.getInputElement().setAttribute("title",""),t.init(o,e);let n,s=!0;i?(this.focusAfterAttached=!0,r===b.BACKSPACE||r===b.DELETE?n="":r&&r.length===1?a?s=!1:n=r:(n=t.getStartValue(),r!==b.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,n=t.getStartValue()),s&&n!=null&&o.setStartValue(n),this.addGuiEventListener("keydown",l=>{let{key:c}=l;(c===b.PAGE_UP||c===b.PAGE_DOWN)&&l.preventDefault()})}afterGuiAttached(){var i,r;let e=this.getLocaleTextFunc(),t=this.eEditor;if(t.setInputAriaLabel(e("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;zt()||t.getFocusableElement().focus();let o=t.getInputElement();this.highlightAllOnFocus?o.select():(r=(i=this.cellEditorInput).setCaret)==null||r.call(i)}focusIn(){let{eEditor:e}=this,t=e.getFocusableElement(),o=e.getInputElement();t.focus(),o.select()}getValue(){return this.cellEditorInput.getValue()}agSetEditValue(e){this.params.value=e;let t=this.cellEditorInput.getStartValue();this.eEditor.setStartValue(t!=null?t:null)}isPopup(){return!1}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){return this.cellEditorInput.getValidationErrors()}},PS={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},IS=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return PS}getAgComponents(){return[Dg]}init(e,t){var n,s,l;this.eEditor=e,this.params=t;let{min:o,max:i,step:r,colDef:a}=t;o!=null&&e.setMin(o),i!=null&&e.setMax(i),r!=null&&e.setStep(r),this.includeTime=(l=t.includeTime)!=null?l:(s=(n=this.getDataTypeService())==null?void 0:n.getDateIncludesTimeFlag)==null?void 0:s.call(n,a.cellDataType),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){let t=this.eEditor.getInputElement().valueAsDate,{params:o}=this,{min:i,max:r,getValidationErrors:a}=o,n=[],s=this.getLocaleTextFunc();if(t instanceof Date&&!isNaN(t.getTime())){if(i){let l=i instanceof Date?i:new Date(i);if(tl){let c=l.toLocaleDateString();n.push(s("maxDateValidation",`Date must be before ${c}`,[c]))}}}return n.length||(n=null),a?a({value:t,cellEditorParams:o,internalErrors:n}):n}getValue(){let{eEditor:e,params:t}=this,o=e.getDate();return!M(o)&&!M(t.value)?t.value:o!=null?o:null}getStartValue(){var t;let{value:e}=this.params;if(e instanceof Date)return fe(e,(t=this.includeTime)!=null?t:!1)}},TS=class extends Ar{constructor(){super(new IS(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},AS={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},zS=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return AS}getAgComponents(){return[Dg]}init(e,t){var n,s,l;this.eEditor=e,this.params=t;let{min:o,max:i,step:r,colDef:a}=t;o!=null&&e.setMin(o),i!=null&&e.setMax(i),r!=null&&e.setStep(r),this.includeTime=(l=t.includeTime)!=null?l:(s=(n=this.getDataTypeService())==null?void 0:n.getDateIncludesTimeFlag)==null?void 0:s.call(n,a.cellDataType),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){let{eEditor:e,params:t}=this,o=e.getInputElement().value,i=this.formatDate(this.parseDate(o!=null?o:void 0)),{min:r,max:a,getValidationErrors:n}=t,s=[];if(i){let l=new Date(i),c=this.getLocaleTextFunc();if(r){let d=new Date(r);if(ld){let g=d.toLocaleDateString();s.push(c("maxDateValidation",`Date must be before ${g}`,[g]))}}}return s.length||(s=null),n?n({value:this.getValue(),cellEditorParams:t,internalErrors:s}):s}getValue(){let{params:e,eEditor:t}=this,o=this.formatDate(t.getDate());return!M(o)&&!M(e.value)?e.value:e.parseValue(o!=null?o:"")}getStartValue(){var e,t,o;return fe((t=this.parseDate((e=this.params.value)!=null?e:void 0))!=null?t:null,(o=this.includeTime)!=null?o:!1)}parseDate(e){var o;let t=this.getDataTypeService();return t?t.getDateParserFunction(this.params.column)(e):(o=me(e))!=null?o:void 0}formatDate(e){var o,i;let t=this.getDataTypeService();return t?t.getDateFormatterFunction(this.params.column)(e):(i=fe(e!=null?e:null,(o=this.includeTime)!=null?o:!1))!=null?i:void 0}},LS=class extends Ar{constructor(){super(new zS(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},OS=class extends Gt{constructor(e){super(e,"ag-text-area",null,"textarea")}setValue(e,t){let 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}},HS={selector:"AG-INPUT-TEXT-AREA",component:OS},BS={tag:"div",cls:"ag-large-text",children:[{tag:"ag-input-text-area",ref:"eEditor",cls:"ag-large-text-input"}]},VS=class extends Er{constructor(){super(BS,[HS]),this.eEditor=E}initialiseEditor(e){let{eEditor:t}=this,{cellStartedEdit:o,eventKey:i,maxLength:r,cols:a,rows:n}=e;this.focusAfterAttached=o,t.getInputElement().setAttribute("title",""),t.setMaxLength(r||200).setCols(a||60).setRows(n||10);let s;o?(this.focusAfterAttached=!0,i===b.BACKSPACE||i===b.DELETE?s="":i&&i.length===1?s=i:(s=this.getStartValue(e),i!==b.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,s=this.getStartValue(e)),s!=null&&t.setValue(s,!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}getStartValue(e){var o;let{value:t}=e;return(o=t==null?void 0:t.toString())!=null?o:t}agSetEditValue(e){this.params.value=e;let t=this.getStartValue(this.params);this.eEditor.setValue(t!=null?t:"",!0)}onKeyDown(e){let t=e.key;(t===b.LEFT||t===b.UP||t===b.RIGHT||t===b.DOWN||e.shiftKey&&t===b.ENTER)&&e.stopPropagation()}afterGuiAttached(){let{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(){let{eEditor:e,params:t}=this,{value:o}=t,i=e.getValue();return!M(i)&&!M(o)?o:t.parseValue(i)}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){let{params:e}=this,{maxLength:t,getValidationErrors:o}=e,i=this.getLocaleTextFunc(),r=this.getValue(),a=[];return typeof r=="string"&&t!=null&&r.length>t&&a.push(i("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),a.length||(a=null),o?o({value:r,internalErrors:a,cellEditorParams:e}):a}},Qn=class extends ut{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct();let e=this.eInput;this.addManagedListeners(e,{blur:()=>{let a=Number.parseFloat(e.value),n=isNaN(a)?"":this.normalizeValue(a.toString());this.value!==n&&this.setValue(n)},wheel:this.onWheel.bind(this)}),e.step="any";let{precision:t,min:o,max:i,step:r}=this.config;typeof t=="number"&&this.setPrecision(t),typeof o=="number"&&this.setMin(o),typeof i=="number"&&this.setMax(i),typeof r=="number"&&this.setStep(r)}onWheel(e){Y(this.beans)===this.eInput&&e.preventDefault()}normalizeValue(e){return e===""?"":(this.precision!=null&&(e=this.adjustPrecision(e)),e)}adjustPrecision(e,t){let o=this.precision;if(o==null)return e;if(t){let r=Number.parseFloat(e).toFixed(o);return Number.parseFloat(r).toString()}let 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:(this.min=e,we(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,we(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,we(this.eInput,"step",e),this)}setValue(e,t){return this.setValueOrInputValue(o=>super.setValue(o,t),()=>this,e)}setStartValue(e){return this.setValueOrInputValue(t=>super.setValue(t,!0),t=>{this.eInput.value=t},e)}setValueOrInputValue(e,t,o){if(M(o)){let i=this.isScientificNotation(o);if(i&&this.eInput.validity.valid)return e(o);if(!i){o=this.adjustPrecision(o);let r=this.normalizeValue(o);i=o!=r}if(i)return t(o)}return e(o)}getValue(e=!1){let t=this.eInput;if(!t.validity.valid&&!e)return;let o=t.value;return this.isScientificNotation(o)?this.adjustPrecision(o,!0):super.getValue()}isScientificNotation(e){return typeof e=="string"&&e.includes("e")}},NS={selector:"AG-INPUT-NUMBER-FIELD",component:Qn},GS={tag:"ag-input-number-field",ref:"eEditor",cls:"ag-cell-editor"},WS=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return GS}getAgComponents(){return[NS]}init(e,t){this.eEditor=e,this.params=t;let{max:o,min:i,precision:r,step:a}=t;o!=null&&e.setMax(o),i!=null&&e.setMin(i),r!=null&&e.setPrecision(r),a!=null&&e.setStep(a);let n=e.getInputElement();t.preventStepping?e.addManagedElementListeners(n,{keydown:this.preventStepping}):t.showStepperButtons&&n.classList.add("ag-number-field-input-stepper")}getValidationErrors(){let{params:e}=this,{min:t,max:o,getValidationErrors:i}=e,a=this.eEditor.getInputElement().valueAsNumber,n=this.getLocaleTextFunc(),s=[];return typeof a=="number"&&(t!=null&&ao&&s.push(n("maxValueValidation",`Must be less than or equal to ${o}.`,[String(o)]))),s.length||(s=null),i?i({value:a,cellEditorParams:e,internalErrors:s}):s}preventStepping(e){(e.key===b.UP||e.key===b.DOWN)&&e.preventDefault()}getValue(){let{eEditor:e,params:t}=this,o=e.getValue();if(!M(o)&&!M(t.value))return t.value;let i=t.parseValue(o);if(i==null)return i;if(typeof i=="string"){if(i==="")return null;i=Number(i)}return isNaN(i)?null:i}getStartValue(){return this.params.value}setCaret(){zt()&&this.eEditor.getInputElement().focus({preventScroll:!0})}},qS=class extends Ar{constructor(){super(new WS(()=>this.getLocaleTextFunc()))}},_S=".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)}}",US="ag-active-item",jS=(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}]}),KS=class extends Lo{constructor(e,t,o){super(jS(e,t)),this.label=t,this.value=o,this.eText=E}postConstruct(){this.createTooltip(),this.addEventListeners()}setHighlighted(e){let t=this.getGui();t.classList.toggle(US,e),nc(t,e),this.dispatchLocalEvent({type:"itemHighlighted",highlighted:e})}getHeight(){return this.getGui().clientHeight}setIndex(e,t){let o=this.getGui();Fu(o,e),Eu(o,t)}createTooltip(){let e={getTooltipValue:()=>this.label,getGui:()=>this.getGui(),getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>hc(this.eText)},t=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("highlightTooltipFeature",!1,e,this));t&&(this.tooltipFeature=t)}addEventListeners(){let e=this.getParentComponent();e&&(this.addGuiEventListener("mouseover",()=>{e.highlightItem(this)}),this.addGuiEventListener("mousedown",t=>{t.preventDefault(),t.stopPropagation(),e.setValue(this.value)}))}},$S=class extends Lo{constructor(e="default"){super({tag:"div",cls:`ag-list ag-${e}-list`}),this.cssIdentifier=e,this.options=[],this.listItems=[],this.highlightedItem=null,this.registerCSS(_S)}postConstruct(){let e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()})}handleKeyDown(e){let t=e.key;switch(t){case b.ENTER:if(!this.highlightedItem)this.setValue(this.getValue());else{let o=this.listItems.indexOf(this.highlightedItem);this.setValueByIndex(o)}break;case b.DOWN:case b.UP:e.preventDefault(),this.navigate(t);break;case b.PAGE_DOWN:case b.PAGE_UP:case b.PAGE_HOME:case b.PAGE_END:e.preventDefault(),this.navigateToPage(t);break}}addOptions(e){for(let t of e)this.addOption(t);return this}addOption(e){let{value:t,text:o}=e,i=o!=null?o:t;return this.options.push({value:t,text:i}),this.renderOption(t,i),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0);for(let e of this.listItems)e.destroy();ne(this.getGui()),this.listItems=[],this.refreshAriaRole()}updateOptions(e){let t=this.options!==e;return t&&(this.clearOptions(),this.addOptions(e)),t}setValue(e,t){if(this.value===e)return this.fireItemSelected(),this;if(e==null)return this.reset(t),this;let o=this.options.findIndex(i=>i.value===e);if(o!==-1){let i=this.options[o];this.value=i.value,this.displayValue=i.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();let e=this.options.findIndex(t=>t.value===this.value);e!==-1&&this.highlightItem(this.listItems[e])}highlightItem(e){let t=e.getGui();if(!Ie(t))return;this.clearHighlighted(),e.setHighlighted(!0),this.highlightedItem=e;let o=this.getGui(),{scrollTop:i,clientHeight:r}=o,{offsetTop:a,offsetHeight:n}=t;(a+n>i+r||a{o.setIndex(i+1,t)})}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},YS=".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}",QS={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"}}]}]},ZS=class extends qd{constructor(e){if(super(e,(e==null?void 0:e.template)||QS,(e==null?void 0:e.agComponents)||[],e==null?void 0:e.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=E,this.eWrapper=E,this.eDisplayField=E,this.eIcon=E,this.registerCSS(YS),this.ariaRole=e==null?void 0:e.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;let{pickerGap:t,maxPickerHeight:o,variableWidth:i,minPickerWidth:r,maxPickerWidth:a}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!i,o!=null&&this.setPickerMaxHeight(o),r!=null&&this.setPickerMinWidth(r),a!=null&&this.setPickerMaxWidth(a)}postConstruct(){super.postConstruct(),this.setupAria();let e=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",e);let 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)});let{pickerIcon:o,inputWidth:i}=this.config;if(o){let r=this.beans.iconSvc.createIconNoSpan(o);r&&this.eIcon.appendChild(r)}i!=null&&this.setInputWidth(i)}setupAria(){let e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),xa(e,!1),this.ariaRole&&Rt(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){let t=this.getFocusableElement();if(t!==this.eWrapper&&(e==null?void 0:e.target)===t)return;e.preventDefault(),this.getFocusableElement().focus()}if(this.skipClick){this.skipClick=!1;return}this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())}onKeyDown(e){switch(e.key){case b.UP:case b.DOWN:case b.ENTER:case b.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case b.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker());break}}showPicker(){this.isPickerDisplayed=!0,this.pickerComponent||(this.pickerComponent=this.createPickerComponent());let e=this.pickerComponent.getGui();e.addEventListener("focusin",this.onPickerFocusIn),e.addEventListener("focusout",this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)}renderAndPositionPicker(){let e=this.pickerComponent.getGui();this.gos.get("suppressScrollWhenPopupsAreOpen")||([this.destroyMouseWheelFunc]=this.addManagedEventListeners({bodyScroll:()=>{this.hidePicker()}}));let t=this.getLocaleTextFunc(),{config:{pickerAriaLabelKey:o,pickerAriaLabelValue:i,modalPicker:r=!0},maxPickerHeight:a,minPickerWidth:n,maxPickerWidth:s,variableWidth:l,beans:c,eWrapper:d}=this,g={modal:r,eChild:e,closeOnEsc:!0,closedCallback:()=>{let f=ln(c);this.beforeHidePicker(),f&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(o,i),anchorToElement:d};e.style.position="absolute";let u=c.popupSvc,h=u.addPopup(g);l?(n&&(e.style.minWidth=n),e.style.width=pn($i(d)),s&&(e.style.maxWidth=s)):Zi(e,s!=null?s:$i(d));let p=a!=null?a:`${un(u.getPopupParent())}px`;return e.style.setProperty("max-height",p),this.alignPickerToComponent(),h.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;let{pickerGap:e,config:{pickerType:t},beans:{popupSvc:o,gos:i},eWrapper:r,pickerComponent:a}=this,n=i.get("enableRtl")?"right":"left";o.positionPopupByComponent({type:t,eventSource:r,ePopup:a.getGui(),position:"under",alignSide:n,keepWithinBounds:!0,nudgeY:e})}beforeHidePicker(){this.destroyMouseWheelFunc&&(this.destroyMouseWheelFunc(),this.destroyMouseWheelFunc=void 0),this.toggleExpandedStyles(!1);let 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;let t=this.getAriaElement();xa(t,e);let o=this.eWrapper.classList;o.toggle("ag-picker-expanded",e),o.toggle("ag-picker-collapsed",!e)}onPickerFocusIn(){this.togglePickerHasFocus(!0)}onPickerFocusOut(e){var t;(t=this.pickerComponent)!=null&&t.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 Zi(this.eWrapper,e),this}getFocusableElement(){return this.eWrapper}setPickerGap(e){return this.pickerGap=e,this}setPickerMinWidth(e){return typeof e=="number"&&(e=`${e}px`),this.minPickerWidth=e==null?void 0:e,this}setPickerMaxWidth(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerWidth=e==null?void 0:e,this}setPickerMaxHeight(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerHeight=e==null?void 0:e,this}destroy(){this.hidePicker(),super.destroy()}},JS=".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}",Zn=class extends ZS{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(JS)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:si(()=>this.eDisplayField),getGui:()=>this.getGui()})),super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");let{options:e,value:t,placeholder:o}=this.config;e!=null&&this.addOptions(e),t!=null&&this.setValue(t,!0),o&&t==null&&(this.eDisplayField.textContent=o),this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)})}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}createListComponent(){let e=this.createBean(new $S("select"));this.listComponent=e,e.setParentComponent(this);let t=e.getAriaElement(),o=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",o),Ou(this.getAriaElement(),t),e.addManagedElementListeners(e.getGui(),{mousedown:i=>{i==null||i.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(){var e;(e=this.listComponent)==null||e.hideItemTooltip(),super.beforeHidePicker()}onKeyDown(e){var o;let{key:t}=e;switch(t===b.TAB&&this.hidePicker(),t){case b.ENTER:case b.UP:case b.DOWN:case b.PAGE_UP:case b.PAGE_DOWN:case b.PAGE_HOME:case b.PAGE_END:e.preventDefault(),this.isPickerDisplayed?(o=this.listComponent)==null||o.handleKeyDown(e):super.onKeyDown(e);break;case b.ESCAPE:super.onKeyDown(e);break;case b.SPACE:this.isPickerDisplayed?e.preventDefault():super.onKeyDown(e);break}}showPicker(){let e=this.listComponent;e&&(super.showPicker(),e.refreshHighlighted())}addOptions(e){for(let t of e)this.addOption(t);return this}addOption(e){return this.listComponent.addOption(e),this}clearOptions(){var e;return(e=this.listComponent)==null||e.clearOptions(),this.setValue(void 0,!0),this}updateOptions(e){var t;return(t=this.listComponent)!=null&&t.updateOptions(e)&&this.setValue(void 0,!0),this}setValue(e,t,o){let{listComponent:i,config:{placeholder:r},eDisplayField:a,tooltipFeature:n}=this;if(this.value===e||!i)return this;if(o||i.setValue(e,!0),i.getValue()===this.getValue())return this;let l=i.getDisplayValue();return l==null&&r&&(l=r),a.textContent=l,n==null||n.setTooltipAndRefresh(l!=null?l:null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},XS={selector:"AG-SELECT",component:Zn},e2={tag:"div",cls:"ag-cell-edit-wrapper",children:[{tag:"ag-select",ref:"eEditor",cls:"ag-cell-editor"}]},t2=class extends Er{constructor(){super(e2,[XS]),this.eEditor=E,this.startedByEnter=!1}wireBeans(e){this.valueSvc=e.valueSvc}initialiseEditor(e){var g;this.focusAfterAttached=e.cellStartedEdit;let{eEditor:t,valueSvc:o,gos:i}=this,{values:r,value:a,eventKey:n}=e;if(Q(r)){k(58);return}this.startedByEnter=n!=null?n===b.ENTER:!1;let s=!1;r.forEach(u=>{let h={value:u},p=o.formatValue(e.column,null,u),f=p!=null;h.text=f?p:u,t.addOption(h),s=s||a===u}),s?t.setValue((g=e.value)!=null?g:void 0,!0):e.values.length&&t.setValue(e.values[0],!0);let{valueListGap:l,valueListMaxWidth:c,valueListMaxHeight:d}=e;l!=null&&t.setPickerGap(l),d!=null&&t.setPickerMaxHeight(d),c!=null&&t.setPickerMaxWidth(c),i.get("editType")!=="fullRow"&&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()}agSetEditValue(e){this.params.value=e,this.eEditor.setValue(e!=null?e:void 0,!0)}getValue(){return this.eEditor.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getAriaElement()}getValidationErrors(){let{params:e}=this,{values:t,getValidationErrors:o}=e,i=this.getValue(),r=[];if(t&&i!=null&&!t.includes(i)){let a=this.getLocaleTextFunc();r.push(a("invalidSelectionValidation","Invalid selection."))}else r=null;return o?o({value:i,internalErrors:r,cellEditorParams:e}):r}},o2={tag:"ag-input-text-field",ref:"eEditor",cls:"ag-cell-editor"},i2=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return o2}getAgComponents(){return[Tr]}init(e,t){this.eEditor=e,this.params=t;let o=t.maxLength;o!=null&&e.setMaxLength(o)}getValidationErrors(){let{params:e}=this,{maxLength:t,getValidationErrors:o}=e,i=this.getValue(),r=this.getLocaleTextFunc(),a=[];return t!=null&&typeof i=="string"&&i.length>t&&a.push(r("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),a.length||(a=null),o?o({value:i,cellEditorParams:e,internalErrors:a}):a}getValue(){let{eEditor:e,params:t}=this,o=e.getValue();return!M(o)&&!M(t.value)?t.value:t.parseValue(o)}getStartValue(){let e=this.params;return e.useFormatter||e.column.getColDef().refData?e.formatValue(e.value):e.value}setCaret(){zt()&&this.eEditor.getInputElement().focus({preventScroll:!0});let e=this.eEditor,t=e.getValue(),o=M(t)&&t.length||0;o&&e.getInputElement().setSelectionRange(o,o)}},Hl=class extends Ar{constructor(){super(new i2(()=>this.getLocaleTextFunc()))}};function r2(e){var t;(t=e.undoRedo)==null||t.undo("api")}function a2(e){var t;(t=e.undoRedo)==null||t.redo("api")}function n2(e,t){var o;return(o=e.editModelSvc)==null?void 0:o.getEditRowDataValue(t,{checkSiblings:!0})}function s2(e){var i;let t=(i=e.editModelSvc)==null?void 0:i.getEditMap(),o=[];return t==null||t.forEach((r,a)=>{let{rowIndex:n,rowPinned:s}=a;r.forEach((l,c)=>{let{editorValue:d,pendingValue:g,sourceValue:u,state:h}=l,p=Be(l),f=d!=null?d:g;f===ae&&(f=void 0);let m={newValue:f,oldValue:u,state:h,column:c,colId:c.getColId(),colKey:c.getColId(),rowIndex:n,rowPinned:s},v=h==="editing";(v||!v&&p)&&o.push(m)})}),o}function l2(e,t=!1){var i,r;let{editSvc:o}=e;if(o!=null&&o.isBatchEditing()){if(t)for(let a of(r=(i=e.editModelSvc)==null?void 0:i.getEditPositions())!=null?r:[])a.state==="editing"&&o.revertSingleCellEdit(a);else St(e,{persist:!0});bt(e,void 0,{cancel:t})}else o==null||o.stopEditing(void 0,{cancel:t,source:"edit",forceStop:!t,forceCancel:t})}function c2(e,t){var i;let o=G(e,t);return!!((i=e.editSvc)!=null&&i.isEditing(o))}function d2(e,t){let{key:o,colKey:i,rowIndex:r,rowPinned:a}=t,{editSvc:n,colModel:s}=e,l=s.getCol(i);if(!l){k(12,{colKey:i});return}let d=et(e,{rowIndex:r,rowPinned:a||null,column:l});if(!d){k(290,{rowIndex:r,rowPinned:a});return}if(!(n!=null&&n.isCellEditable({rowNode:d,column:l},"api")))return;a==null&&wg(e,r),Cg(e,i),n==null||n.startEditing({rowNode:d,column:l},{event:o?new KeyboardEvent("keydown",{key:o}):void 0,source:"api",editable:!0})}function g2(e){var t;return((t=e.editSvc)==null?void 0:t.validateEdit())||null}function u2(e){var t,o;return(o=(t=e.undoRedo)==null?void 0:t.getCurrentUndoStackSize())!=null?o:0}function h2(e){var t,o;return(o=(t=e.undoRedo)==null?void 0:t.getCurrentRedoStackSize())!=null?o:0}var p2={tag:"div",cls:"ag-popup-editor",attrs:{tabindex:"-1"}},f2=class extends Fn{constructor(e){super(p2),this.params=e}postConstruct(){Zt(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){let e=this.getGui(),t=this.params,o=i=>{Ba(this.gos,i,t.node,t.column,!0)||t.onKeyDown(i)};this.addManagedElementListeners(e,{keydown:o})}};function m2(e,{column:t},o,i,r="ui"){var c;if(o instanceof KeyboardEvent&&(o.key===b.TAB||o.key===b.ENTER||o.key===b.F2||o.key===b.BACKSPACE&&i))return!0;if((o==null?void 0:o.shiftKey)&&((c=e.rangeSvc)==null?void 0:c.getCellRanges().length)!=0)return!1;let n=t==null?void 0:t.getColDef(),s=v2(e.gos,n),l=o==null?void 0:o.type;return l==="click"&&(o==null?void 0:o.detail)===1&&s===1||l==="dblclick"&&(o==null?void 0:o.detail)===2&&s===2?!0:r==="api"?!!i:!1}function v2(e,t){return e.get("suppressClickEdit")===!0?0:e.get("singleClickEdit")===!0||t!=null&&t.singleClickEdit?1:2}function ba(e,t){var o,i;return(i=(o=e.editModelSvc)==null?void 0:o.hasEdits(t,{withOpenEditor:!0}))!=null?i:!1}function Ja(e,t){var n;let o=t.column,i=t.rowNode,r=o.getColDef();if(!i)return ba(e,t);let a=r.editable;return i.group&&r.groupRowEditable!=null?(n=e.rowGroupingEditValueSvc)!=null&&n.isGroupCellEditable(i,o)?!0:ba(e,t):o.isColumnFunc(i,a)?!0:ba(e,t)}function C2(e,t,o="ui"){let i=Ja(e,t);if(i||o==="ui")return i;let{rowNode:r,column:a}=t;for(let n of e.colModel.getCols())if(n!==a&&Ja(e,{rowNode:r,column:n}))return!0;return!1}var Cr=(e,t=!1)=>{if(e!==void 0)return Be(e)||t&&e.state==="editing"};function Mg(e,t,o=!1){var i;return Cr((i=e.editModelSvc)==null?void 0:i.getEdit(t),o)}var Pg=(e,t,o)=>{if(e)for(let i=0,r=e.length;i{let c={rowNode:i,column:l};return Mg(o,c,!0)||Ig(o,c)||Tg(o,c)});this.applyStyle(a,s);return}this.applyStyle(a)}applyStyle(e=!1,t=!1){var r,a;let o=!!((r=this.editSvc)!=null&&r.isBatchEditing()),i=this.gos.get("editType")==="fullRow";(a=this.rowCtrl)==null||a.forEachGui(void 0,({rowComp:n})=>{n.toggleCss("ag-row-editing",i&&t),n.toggleCss("ag-row-batch-edit",i&&t&&o),n.toggleCss("ag-row-inline-editing",t),n.toggleCss("ag-row-not-inline-editing",!t),n.toggleCss("ag-row-editing-invalid",i&&t&&e)})}},y2=({rowModel:e,pinnedRowModel:t,editModelSvc:o},i)=>{let r=new Set;e.forEachNode(a=>i.has(a)&&r.add(a)),t==null||t.forEachPinnedRow("top",a=>i.has(a)&&r.add(a)),t==null||t.forEachPinnedRow("bottom",a=>i.has(a)&&r.add(a));for(let a of i)r.has(a)||o.removeEdits({rowNode:a});return r},S2=({editModelSvc:e},t,o)=>{var i;for(let r of t)(i=e==null?void 0:e.getEditRow(r))==null||i.forEach((a,n)=>!o.has(n)&&e.removeEdits({rowNode:r,column:n}))},x2=e=>()=>{let t=new Set(e.colModel.getCols()),o=e.editModelSvc.getEditMap(!0),i=new Set(o.keys());S2(e,y2(e,i),t)},k2=new Set(["undo","redo","paste","bulk","rangeSvc"]),R2=new Set(["ui","api"]),Ag={paste:"api",rangeSvc:"api",fillHandle:"api",cellClear:"api",bulk:"api"},E2=new Set(Object.keys(Ag)),F2=new Set(["paste","rangeSvc","cellClear","redo","undo"]),ya={cancel:!0,source:"api"},D2={cancel:!1,source:"api"},Bt={checkSiblings:!0},vt={force:!0,suppressFlash:!0},M2={force:!0},P2=class extends S{constructor(){super(...arguments),this.beanName="editSvc",this.committing=!1,this.batch=!1,this.batchStartDispatched=!1,this.stopping=!1,this.rangeSelectionWhileEditing=0}postConstruct(){let{beans:e}=this;this.model=e.editModelSvc,this.valueSvc=e.valueSvc,this.rangeSvc=e.rangeSvc,this.addManagedPropertyListener("editType",({currentValue:i})=>{this.stopEditing(void 0,ya),this.createStrategy(i)});let t=x2(e),o=()=>{let i=this.model.getCellValidationModel().getCellValidationMap().size>0,r=this.model.getRowValidationModel().getRowValidationMap().size>0;return i||r?this.stopEditing(void 0,ya):this.isEditing()&&(this.batch?bt(e,this.model.getEditPositions()):this.stopEditing(void 0,D2)),!1};this.addManagedEventListeners({columnPinned:t,columnVisible:t,columnRowGroupChanged:t,rowExpansionStateChanged:t,pinnedRowsChanged:t,displayedRowsChanged:t,sortChanged:o,filterChanged:o,cellFocused:this.onCellFocused.bind(this)})}isBatchEditing(){return this.batch}startBatchEditing(){this.batch||(this.batch=!0,this.batchStartDispatched=!1,this.stopEditing(void 0,ya))}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){let{beans:t,gos:o,strategy:i}=this,r=Bl(o,e);if(i){if(i.beanName===r)return i;this.destroyStrategy()}return this.strategy=this.createOptionalManagedBean(t.registry.createDynamicBean(r,!0))}destroyStrategy(){this.strategy&&(this.strategy.destroy(),this.strategy=this.destroyBean(this.strategy))}shouldStartEditing(e,t,o,i="ui"){var a;let r=m2(this.beans,e,t,o,i);return r&&((a=this.strategy)!=null||(this.strategy=this.createStrategy())),r}shouldStopEditing(e,t,o="ui"){var i,r;return(r=(i=this.strategy)==null?void 0:i.shouldStop(e,t,o))!=null?r:null}shouldCancelEditing(e,t,o="ui"){var i,r;return(r=(i=this.strategy)==null?void 0:i.shouldCancel(e,t,o))!=null?r:null}validateEdit(){return g1(this.beans)}isEditing(e,t){return this.model.hasEdits(e!=null?e:void 0,t!=null?t:Bt)}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){var d,g;let{startedEdit:o=!0,event:i=null,source:r="ui",ignoreEventKey:a=!1,silent:n}=t;if((d=this.strategy)!=null||(this.strategy=this.createStrategy()),!((g=t.editable)!=null?g:this.isCellEditable(e,"api")))return;let l=G(this.beans,e);if(l&&!l.comp){t.editable=void 0,l.onCompAttachedFuncs.push(()=>this.startEditing(e,t));return}let c=this.shouldStartEditing(e,i,o,r);if(c===!1&&r!=="api"){this.isEditing(e)&&this.stopEditing();return}!this.batch&&this.shouldStopEditing(e,void 0,r)&&!t.continueEditing&&this.stopEditing(void 0,{source:r}),c&&this.ensureBatchStarted(),this.strategy.start({position:e,event:i,source:r,ignoreEventKey:a,startedEdit:o,silent:n})}stopEditing(e,t){let o=this.prepareStopContext(e,t);if(!o)return!1;this.stopping=!0;let i=!1,{edits:r}=o;try{let a=this.processStopRequest(o);return i||(i=a.res),r=a.edits,this.finishStopEditing({...o,edits:r,params:t,position:e,res:i}),i}finally{this.rangeSelectionWhileEditing=0,this.stopping=!1}}prepareStopContext(e,t){let{event:o=null,cancel:i=!1,source:r="ui",forceCancel:a=!1,forceStop:n=!1,commit:s=!1}=t||{};if(E2.has(r)&&this.batch)return e!=null&&e.rowNode&&(e!=null&&e.column)&&this.bulkRefreshCell(e),null;let l=this.committing?Ag[r]:r;if(!(this.committing||this.isEditing(e)||this.batch&&this.model.hasEdits(e,Bt))||!this.strategy||this.stopping)return null;let d=G(this.beans,e);d&&(d.onEditorAttachedFuncs=[]);let g=!i&&(!!this.shouldStopEditing(e,o,l)||(this.committing||r==="paste")&&!this.batch)||n,u=i&&!!this.shouldCancelEditing(e,o,l)||a;return{cancel:i,cellCtrl:d,edits:this.model.getEditMap(!0),event:o!=null?o:null,forceCancel:a,forceStop:n,commit:s,position:e,source:r,treatAsSource:l,willCancel:u,willStop:g}}processStopRequest(e){var a;let{event:t,position:o,willCancel:i,willStop:r}=e;return r||i?this.handleStopOrCancel(e):this.shouldHandleMidBatchKey(t,o)?{res:!1,edits:this.handleMidBatchKey(t,o,e)}:(St(this.beans,{persist:!0}),this.batch&&((a=this.strategy)==null||a.cleanupEditors(o)),{res:!1,edits:this.model.getEditMap()})}handleStopOrCancel(e){var p,f;let{beans:t,model:o}=this,{cancel:i,commit:r,edits:a,event:n,source:s,willCancel:l,willStop:c}=e,d=!this.batch||!l;St(t,{persist:d,isCancelling:l||i,isStopping:c});let g=o.getEditMap(),h=!l&&(!this.batch||r)?this.processEdits(g,s):[];i?(p=this.strategy)==null||p.stopCancelled(e.forceCancel):(f=this.strategy)==null||f.stopCommitted(n,r),this.clearValidationIfNoOpenEditors();for(let m of h)o.clearEditValue(m);this.bulkRefreshMap(a);for(let m of o.getEditPositions(g)){let v=G(t,m),C=Be(m);v==null||v.refreshCell({force:!0,suppressFlash:!C})}return{res:c,edits:g}}shouldHandleMidBatchKey(e,t){var o;return e instanceof KeyboardEvent&&this.batch&&!!((o=this.strategy)!=null&&o.midBatchInputsAllowed(t))&&this.isEditing(t,{withOpenEditor:!0})}handleMidBatchKey(e,t,o){var g,u;let{beans:i,model:r}=this,{cellCtrl:a,edits:n}=o,{key:s}=e,l=s===b.ENTER,c=s===b.ESCAPE,d=s===b.TAB;if(l||d||c){if(l||d)St(i,{persist:!0});else if(c&&a){let{rowNode:h,column:p}=a;if(this.batch&&h&&p){let f={rowNode:h,column:p};bt(i,[f],{silent:!0}),this.model.stop(f,!0,!0),(g=G(i,f))==null||g.refreshCell(vt)}else this.revertSingleCellEdit(a)}return this.batch?(u=this.strategy)==null||u.cleanupEditors():bt(i,r.getEditPositions(),{event:e,cancel:c}),e.preventDefault(),this.bulkRefreshMap(n,{suppressFlash:!0}),r.getEditMap()}return n}finishStopEditing({cellCtrl:e,edits:t,params:o,position:i,res:r,commit:a,forceCancel:n,willCancel:s,willStop:l}){let c=this.beans;r&&i&&(!this.batch||a)&&this.model.removeEdits(i),this.navigateAfterEdit(o,e==null?void 0:e.cellPosition),jo(c),this.clearValidationIfNoOpenEditors();let{rowRenderer:d,formula:g}=c;if(s&&d.refreshRows({rowNodes:Array.from(t.keys())}),this.batch){g?g.refreshFormulas(!0):d.refreshRows({suppressFlash:!0,force:!0});let u=l&&a;(u||s&&n)&&this.dispatchBatchStopped(t,u)}}dispatchBatchStopped(e,t){let o;t&&(o=i1(e),o.size>0&&this.ensureBatchStarted()),this.batchStartDispatched&&(this.batchStartDispatched=!1,this.dispatchBatchEvent("batchEditingStopped",o!=null?o:new Map))}clearValidationIfNoOpenEditors(){this.model.hasEdits(void 0,{withOpenEditor:!0})||(this.model.getCellValidationModel().clearCellValidationMap(),this.model.getRowValidationModel().clearRowValidationMap())}navigateAfterEdit(e,t){var c;if(!e||!t)return;let{event:o,suppressNavigateAfterEdit:i}=e;if(!(o instanceof KeyboardEvent)||i)return;let{key:a,shiftKey:n}=o,s=this.gos.get("enterNavigatesVerticallyAfterEdit");if(a!==b.ENTER||!s)return;let l=n?b.UP:b.DOWN;(c=this.beans.navigation)==null||c.navigateToNextCell(null,l,t,!1)}processEdits(e,t){let o=Array.from(e.keys()),i=this.model.getCellValidationModel().getCellValidationMap().size>0||this.model.getRowValidationModel().getRowValidationMap().size>0,r=[],{changeDetectionSvc:a}=this.beans;a==null||a.beginDeferred();try{for(let n of o){let s=e.get(n);for(let l of s.keys()){let c=s.get(l),d={rowNode:n,column:l};if(Be(c)&&!i){let g=G(this.beans,d);this.setNodeDataValue(n,l,c.pendingValue,g,t)||r.push(d)}}}}finally{a==null||a.endDeferred()}return r}setNodeDataValue(e,t,o,i,r="edit"){let a=R2.has(r)?"edit":r;i&&(i.suppressRefreshCell=!0),this.committing=!0;try{return e.setDataValue(t,o,a)}finally{this.committing=!1,i&&(i.suppressRefreshCell=!1)}}syncEditAfterCommit(e,t){var i;let o=this.model.getEdit(e);o&&o.state!=="editing"&&(t?(i=this.beans.editModelSvc)==null||i.setEdit(e,{sourceValue:o.pendingValue}):this.model.clearEditValue(e))}setEditMap(e,t){var i,r;(i=this.strategy)!=null||(this.strategy=this.createStrategy()),(r=this.strategy)==null||r.setEditMap(e,t),this.bulkRefreshMap(e);let o=vt;t!=null&&t.forceRefreshOfEditCellsOnly&&(o={...I2(e),...vt}),this.beans.rowRenderer.refreshCells(o)}dispatchEditValuesChanged({rowNode:e,column:t},o={}){if(!e||!t||!o)return;let{pendingValue:i,sourceValue:r}=o,{rowIndex:a,rowPinned:n,data:s}=e;this.beans.eventSvc.dispatchEvent({type:"cellEditValuesChanged",node:e,rowIndex:a,rowPinned:n,column:t,source:"api",data:s,newValue:i,oldValue:r,value:i,colDef:t.getColDef()})}bulkRefreshCell(e,t){ee(this.gos,this.beans.rowModel)&&this.refCell(e,this.model.getEdit(e),t)}bulkRefreshMap(e,t){ee(this.gos,this.beans.rowModel)&&e.forEach((o,i)=>{for(let r of o.keys())this.refCell({rowNode:i,column:r},o.get(r),t)})}refCell({rowNode:e,column:t},o,i={}){var g,u,h,p;let{beans:r,gos:a}=this,n=new Set([e]),s=new Set,l=e.pinnedSibling;l&&n.add(l);let c=e.sibling;c&&s.add(c);let d=e.parent;for(;d;)(g=d.sibling)!=null&&g.footer&&a.get("groupTotalRow")||!d.parent&&d.sibling&&a.get("grandTotalRow")?s.add(d.sibling):s.add(d),d=d.parent;for(let f of n)this.dispatchEditValuesChanged({rowNode:f,column:t},o);for(let f of n)(u=G(r,{rowNode:f,column:t}))==null||u.refreshCell(i);for(let f of s){let m=G(r,{rowNode:f,column:t});m&&(m.refreshCell(i),!i.force&&this.batch&&((p=(h=m.editStyleFeature)==null?void 0:h.applyCellStyles)==null||p.call(h)))}}stopAllEditing(e=!1,t="ui"){this.isEditing()&&this.stopEditing(void 0,{cancel:e,source:t})}isCellEditable(e,t="ui"){var n;let{gos:o,beans:i}=this,r=e.rowNode;if(r.group&&e.column.getColDef().groupRowEditable==null){if(o.get("treeData")){if(!r.data&&!o.get("enableGroupEdit"))return!1}else if(!o.get("enableGroupEdit"))return!1}let a=Bl(o)==="fullRow"?C2(i,e,t):Ja(i,e);return a&&((n=this.strategy)!=null||(this.strategy=this.createStrategy())),a}cellEditingInvalidCommitBlocks(){return this.gos.get("invalidEditValueMode")==="block"}checkNavWithValidation(e,t,o=!0){var i,r,a,n;if(this.hasValidationErrors(e)){let s=G(this.beans,e);return this.cellEditingInvalidCommitBlocks()?((i=t==null?void 0:t.preventDefault)==null||i.call(t),o&&(s&&!s.hasBrowserFocus()&&s.focusCell(),(n=(a=(r=s==null?void 0:s.comp)==null?void 0:r.getCellEditor())==null?void 0:a.focusIn)==null||n.call(a)),"block-stop"):(s&&this.revertSingleCellEdit(s),"revert-continue")}return"continue"}revertSingleCellEdit(e,t=!1){var i,r,a,n;let o=G(this.beans,e);(i=o==null?void 0:o.comp)!=null&&i.getCellEditor()&&(bt(this.beans,[e],{silent:!0}),this.model.clearEditValue(e),oo(this.beans,e,{silent:!0}),kt(this.beans),o==null||o.refreshCell(vt),t&&(o==null||o.focusCell(),(n=(a=(r=o==null?void 0:o.comp)==null?void 0:r.getCellEditor())==null?void 0:a.focusIn)==null||n.call(a)))}hasValidationErrors(e){var i;kt(this.beans);let t=G(this.beans,e);t&&(t.refreshCell(vt),(i=t.rowCtrl.rowEditStyleFeature)==null||i.applyRowStyles());let o=!1;return e!=null&&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"){var s;let r,a=this.isEditing(),n=a&&this.checkNavWithValidation(void 0,o)==="block-stop";return e instanceof Eo&&a&&(r=(s=this.strategy)==null?void 0:s.moveToNextEditingCell(e,t,o,i,n)),r===null||(r=r||!!this.beans.focusSvc.focusedHeader,r===!1&&!n&&this.stopEditing()),r}getPendingEditValue(e,t,o){var a;if(o==="data"||o==="batch"&&!this.batch)return;let i=this.model.getEdit({rowNode:e,column:t},Bt);if(!i||this.stopping&&!this.batch&&!((a=i.editorState)!=null&&a.cellStartedEditing))return;if(o==="edit"){let n=i.editorValue;if(n!=null&&n!==ae)return n}let r=i.pendingValue;if(r!==ae)return r}getCellDataValue(e){let t=this.model.getEdit(e,Bt);if(t){let o=t.pendingValue;if(o!==ae)return o;let i=t.sourceValue;if(i!=null)return i}return this.valueSvc.getValue(e.column,e.rowNode,"data")}addStopEditingWhenGridLosesFocus(e){e1(this,this.beans,e)}createPopupEditorWrapper(e){return new f2(e)}batchResetToSourceValue(e){var a,n;if(!this.batch)return!1;let t=this.model.getEdit(e);if(!t)return!1;let{pendingValue:o,sourceValue:i,state:r}=t;return o===i||r==="editing"?!1:(this.dispatchEditValuesChanged(e,{...t,pendingValue:i}),(a=this.beans.editModelSvc)==null||a.removeEdits(e),(n=G(this.beans,e))==null||n.refreshCell(vt),!0)}setDataValue(e,t,o){var i;try{let r=this.batch,a=this.isEditing(r?void 0:e);if((!a||this.committing)&&!r&&!F2.has(o)||!a&&!r&&o==="paste"||o==="batch"&&!r)return;if(o==="edit"){if(a&&this.applyEditorValue(e,t))return!0;if(!r)return}if((i=this.strategy)!=null||(this.strategy=this.createStrategy()),o==="batch"||o==="edit")return this.applyDirectValue(e,t,o);let n=this.beans,s;if(r?s="ui":this.committing?s=o!=null?o:"api":s="api",!o||k2.has(o))return this.applyDirectValue(e,t,o);let l=this.applyExistingEdit(e,t,o,s);return l!==void 0?l:(go(n,e,t,o,void 0,{persist:!0}),this.ensureBatchStarted(),this.stopEditing(e,{source:s,suppressNavigateAfterEdit:!0}),!0)}finally{this.committing=!1}}applyExistingEdit(e,t,o,i){var a;let r=this.model.getEdit(e);if(r)return r.pendingValue===t?!1:r.sourceValue!==t?(go(this.beans,e,t,o,void 0,{persist:!0}),this.ensureBatchStarted(),this.stopEditing(e,{source:i,suppressNavigateAfterEdit:!0}),!0):((a=this.beans.editModelSvc)==null||a.removeEdits(e),this.ensureBatchStarted(),this.dispatchEditValuesChanged(e,{...r,pendingValue:t}),!0)}applyEditorValue(e,t){var n,s,l,c;let o=this.beans,i=G(o,e),r=(n=i==null?void 0:i.comp)==null?void 0:n.getCellEditor();return!i||!r?!1:(go(o,e,t,"edit",void 0,{persist:!0}),(l=(s=i.editStyleFeature)==null?void 0:s.applyCellStyles)==null||l.call(s),"agSetEditValue"in r?(r.agSetEditValue(t),!0):r.refresh&&i.editCompDetails?(r.refresh({...i.editCompDetails.params,value:t}),!0):(i.hasBrowserFocus()&&i.onEditorAttachedFuncs.push(()=>{var g,u,h;let d=G(this.beans,e);d==null||d.focusCell(!0),(h=(u=(g=d==null?void 0:d.comp)==null?void 0:g.getCellEditor())==null?void 0:u.focusIn)==null||h.call(u)}),bt(o,[e],{silent:!0,cancel:!0}),oo(o,e,{silent:!0}),kt(o),(c=G(o,e))==null||c.refreshCell(vt),!0))}applyDirectValue(e,t,o){var n,s,l;let i=this.beans;if(this.batch){if(o==="batch"&&((s=(n=G(i,e))==null?void 0:n.comp)!=null&&s.getCellEditor())){let{editModelSvc:c,valueSvc:d}=i,{rowNode:g,column:u}=e,h=c==null?void 0:c.getEdit(e);(h==null?void 0:h.sourceValue)===void 0&&(c==null||c.setEdit(e,{sourceValue:d.getValue(u,g,"data")})),c==null||c.setEdit(e,{pendingValue:t})}else go(i,e,t,o,void 0,{persist:!0}),o!=="batch"&&this.cleanupEditors();return jo(i),this.ensureBatchStarted(),this.bulkRefreshCell(e),!0}go(i,e,t,o,void 0,{persist:!0});let r=G(i,e),a=this.setNodeDataValue(e.rowNode,e.column,t,r,o);return this.syncEditAfterCommit(e,a),jo(i),(l=G(i,e))==null||l.refreshCell(a?M2:vt),a}handleColDefChanged(e){a1(this.beans,e)}destroy(){this.model.clear(),this.destroyStrategy(),super.destroy()}prepDetailsDuringBatch(e,t){let{model:o}=this;if(!this.batch||!o.hasRowEdits(e.rowNode,Bt))return;let{rowNode:r}=e,{compDetails:a,valueToDisplay:n}=t;if(a){let{params:s}=a;return s.data=o.getEditRowDataValue(r,Bt),{compDetails:a}}return{valueToDisplay:n}}cleanupEditors(){var e;(e=this.strategy)==null||e.cleanupEditors()}dispatchCellEvent(e,t,o,i){var r;(r=this.strategy)==null||r.dispatchCellEvent(e,t,o,i)}dispatchBatchEvent(e,t){this.eventSvc.dispatchEvent(this.createBatchEditEvent(e,t))}createBatchEditEvent(e,t){return O(this.gos,{type:e,...e==="batchEditingStopped"?{changes:this.toEventChangeList(t)}:{}})}toEventChangeList(e){return this.model.getEditPositions(e).map(t=>({rowIndex:t.rowNode.rowIndex,rowPinned:t.rowNode.rowPinned,columnId:t.column.getColId(),newValue:t.pendingValue,oldValue:t.sourceValue}))}applyBulkEdit({rowNode:e,column:t},o){var u,h,p;if(!o||o.length===0)return;let{beans:i,rangeSvc:r,valueSvc:a}=this,{formula:n}=i;St(i,{persist:!0});let s=this.model.getEditMap(!0),l=(h=(u=s.get(e))==null?void 0:u.get(t))==null?void 0:h.pendingValue,c=!1;this.batch||(this.eventSvc.dispatchEvent({type:"bulkEditingStarted"}),c=!0);let d=(p=n==null?void 0:n.isFormula(l))!=null?p:!1;o.forEach(f=>{let m=f.columns.some(v=>v==null?void 0:v.isAllowFormula());if(r==null||r.forEachRowInRange(f,v=>{var x;let C=et(i,v);if(C===void 0)return;let w=(x=s.get(C))!=null?x:new Map,y=l;for(let R of f.columns){if(!R)continue;let F=!!d&&R.isAllowFormula();if(this.isCellEditable({rowNode:C,column:R},"api")){let P=a.getValue(R,C,"data",!0),T=a.parseValue(R,C!=null?C:null,y,P);Number.isNaN(T)&&(T=null),w.set(R,{editorValue:void 0,pendingValue:T,sourceValue:P,state:"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}F&&(y=n==null?void 0:n.updateFormulaByOffset({value:y,columnDelta:1}))}w.size>0&&s.set(C,w),d&&m&&(l=n==null?void 0:n.updateFormulaByOffset({value:l,rowDelta:1}))}),this.setEditMap(s),this.batch){this.cleanupEditors(),jo(i),this.ensureBatchStarted();return}this.committing=!0;try{this.stopEditing(void 0,{source:"bulk"})}finally{this.committing=!1,c&&this.eventSvc.dispatchEvent({type:"bulkEditingStopped",changes:this.toEventChangeList(s)})}});let g=G(i,{rowNode:e,column:t});g&&g.focusCell(!0)}createCellStyleFeature(e){return new w2(e,this.beans)}createRowStyleFeature(e){return new b2(e,this.beans)}setEditingCells(e,t){let{beans:o}=this,{colModel:i,valueSvc:r}=o,a=new Map;for(let{colId:n,column:s,colKey:l,rowIndex:c,rowPinned:d,newValue:g,state:u}of e){let h=n?i.getCol(n):l?i.getCol(l):s;if(!h)continue;let p=et(o,{rowIndex:c,rowPinned:d});if(!p)continue;let f=r.getValue(h,p,"data",!0);if(!(t!=null&&t.forceRefreshOfEditCellsOnly)&&!Be({pendingValue:g,sourceValue:f})&&u!=="editing")continue;let m=a.get(p);m||(m=new Map,a.set(p,m)),g===void 0&&(g=ae),m.set(h,{editorValue:void 0,pendingValue:g,sourceValue:f,state:u!=null?u:"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}this.setEditMap(a,t)}onCellFocused(e){var a;let t=G(this.beans,e);if(!t||!this.isEditing(t,Bt))return;let o=this.model.getEdit(t);if(!o||!Be(o))return;let r=this.getLocaleTextFunc()("ariaPendingChange","Pending Change");(a=this.beans.ariaAnnounce)==null||a.announceValue(r,"pendingChange")}allowedFocusTargetOnValidation(e){return G(this.beans,e)}};function I2(e){return{rowNodes:e?Array.from(e.keys()):void 0,columns:e?[...new Set(Array.from(e.values()).flatMap(t=>Array.from(t.keys())))]:void 0}}function Bl(e,t){var o;return(o=t!=null?t:e.get("editType"))!=null?o:"singleCell"}var zg=class extends S{postConstruct(){var e,t;this.model=this.beans.editModelSvc,this.editSvc=this.beans.editSvc,this.addManagedEventListeners({cellFocused:(e=this.onCellFocusChanged)==null?void 0:e.bind(this),cellFocusCleared:(t=this.onCellFocusChanged)==null?void 0:t.bind(this)})}clearEdits(e){this.model.clearEditValue(e)}onCellFocusChanged(e){let t,o=e.previousParams,{editSvc:i,beans:r}=this,a=e.type==="cellFocused"?e.sourceEvent:null;o&&(t=G(r,o));let{gos:n,editModelSvc:s}=r,l=e.type==="cellFocusCleared";if(i.isEditing(void 0,{withOpenEditor:!0})){let{column:c,rowIndex:d,rowPinned:g}=e,u={column:c,rowNode:et(r,{rowIndex:d,rowPinned:g})},h=n.get("invalidEditValueMode")==="block";if(h)return;let p=!h,f=!!(s!=null&&s.getCellValidationModel().hasCellValidation(u)),m=p&&f;(o||l?i.stopEditing(void 0,{cancel:m,source:l&&p?"api":void 0,event:a}):!0)||(i.isBatchEditing()?i.cleanupEditors():i.stopEditing(void 0,{source:"api"}))}t==null||t.refreshCell({suppressFlash:!0,force:!0})}stopCancelled(e){let t=this.editSvc.isBatchEditing()&&!e;for(let o of this.model.getEditPositions())pi(this.beans,o,{cancel:!0},G(this.beans,o)),this.model.stop(o,t,!0);return!0}stopCommitted(e,t){var n,s,l;let o=this.model.getEditPositions(),i={all:[],pass:[],fail:[]};for(let c of o)i.all.push(c),((l=(s=(n=this.model.getCellValidationModel().getCellValidation(c))==null?void 0:n.errorMessages)==null?void 0:s.length)!=null?l:0)>0?i.fail.push(c):i.pass.push(c);let r=this.processValidationResults(i),a=this.editSvc.isBatchEditing()&&!t;for(let c of r.destroy)pi(this.beans,c,{event:e},G(this.beans,c)),this.model.stop(c,a,!1);for(let c of r.keep){let d=G(this.beans,c);!this.editSvc.cellEditingInvalidCommitBlocks()&&d&&this.editSvc.revertSingleCellEdit(d)}return!0}cleanupEditors({rowNode:e}={},t){St(this.beans,{persist:!1});let o=this.model.getEditPositions(),i=[];if(e)for(let r of o)r.rowNode!==e&&i.push(r);else for(let r of o)i.push(r);bt(this.beans,i),jo(this.beans,t)}setFocusOutOnEditor(e){var t,o,i;(i=(o=(t=e.comp)==null?void 0:t.getCellEditor())==null?void 0:o.focusOut)==null||i.call(o)}setFocusInOnEditor(e){let t=e.comp,o=t==null?void 0:t.getCellEditor();if(o!=null&&o.focusIn)o.focusIn();else{let i=this.beans.gos.get("editType")==="fullRow";e.focusCell(i),e.onEditorAttachedFuncs.push(()=>{var r,a;return(a=(r=t==null?void 0:t.getCellEditor())==null?void 0:r.focusIn)==null?void 0:a.call(r)})}}setupEditors(e){let{event:t,ignoreEventKey:o=!1,startedEdit:i,position:r,cells:a=this.model.getEditPositions()}=e,n=t instanceof KeyboardEvent&&!o&&t.key||void 0;o1(this.beans,a,r,n,t,i)}dispatchCellEvent(e,t,o,i){let r=G(this.beans,e);r&&this.eventSvc.dispatchEvent({...r.createEvent(t!=null?t:null,o),...i})}dispatchRowEvent(e,t,o){if(o)return;let i=fr(this.beans,e);i&&this.eventSvc.dispatchEvent(i.createRowEvent(t))}shouldStop(e,t,o="ui"){let i=this.editSvc.isBatchEditing();return i&&o==="api"?!0:i&&(o==="ui"||o==="edit")?!1:o==="api"?!0:t instanceof KeyboardEvent&&!i?t.key===b.ENTER:null}shouldCancel(e,t,o="ui"){let i=this.editSvc.isBatchEditing();return!!(t instanceof KeyboardEvent&&!i&&t.key===b.ESCAPE||i&&o==="api"||o==="api")}setEditMap(e,t){var i;t!=null&&t.update||this.editSvc.stopEditing(void 0,{cancel:!0,source:"api"});let o=[];if(e.forEach((r,a)=>{r.forEach((n,s)=>{n.state==="editing"&&o.push({...n,rowNode:a,column:s})})}),t!=null&&t.update&&(e=new Map([...this.model.getEditMap(),...e])),(i=this.model)==null||i.setEditMap(e),o.length>0){let r=o.at(-1),a=r.pendingValue===ae?void 0:r.pendingValue;this.start({position:r,event:new KeyboardEvent("keydown",{key:a}),source:"api"});let n=G(this.beans,r);n&&this.setFocusInOnEditor(n)}}destroy(){this.cleanupEditors(),super.destroy()}},T2=class extends zg{constructor(){super(...arguments),this.beanName="fullRow",this.startedRows=new Set}shouldStop(e,t,o="ui"){let{rowNode:i,beans:r}=this,{rowNode:a}=e||{};if(!fr(r,{rowNode:i}))return!0;let s=super.shouldStop({rowNode:i},t,o);return s!==null?s:i?a!==i:!1}midBatchInputsAllowed({rowNode:e}){return e?this.model.hasEdits({rowNode:e}):!1}clearEdits(e){this.model.clearEditValue(e)}start(e){let{position:t,silent:o,startedEdit:i,event:r,ignoreEventKey:a}=e,{rowNode:n}=t,{beans:s,model:l,startedRows:c}=this;this.rowNode!==n&&super.cleanupEditors(t);let d=s.visibleCols.allCols,g=[],u=[];for(let h of d)h.isCellEditable(n)&&u.push(h);if(u.length!=0){c.has(n)||(this.dispatchRowEvent({rowNode:n},"rowEditingStarted",o),c.add(n));for(let h of u){let p={rowNode:n,column:h};g.push(p),l.start(p)}this.rowNode=n,this.setupEditors({cells:g,position:t,startedEdit:i,event:r,ignoreEventKey:a})}}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stopCancelled(e){let{rowNode:t,model:o}=this;return t&&!o.hasRowEdits(t)?!1:(super.stopCancelled(e),this.cleanupEditors({rowNode:t},!0),this.rowNode=void 0,!0)}stopCommitted(e,t){let{rowNode:o,beans:i,model:r,editSvc:a}=this;if(o&&!r.hasRowEdits(o))return!1;let n=[];if(r.getEditMap().forEach((s,l)=>{if(!(!s||s.size===0)){for(let c of s.values())if(Be(c)){n.push(l);break}}}),kt(i),a.checkNavWithValidation({rowNode:o})==="block-stop")return!1;if(super.stopCommitted(e,t),t||!a.isBatchEditing())for(let s of n)this.dispatchRowEvent({rowNode:s},"rowValueChanged");return this.cleanupEditors({rowNode:o},!0),this.rowNode=void 0,!0}onCellFocusChanged(e){var l;let{rowIndex:t}=e,o=e.previousParams;if((o==null?void 0:o.rowIndex)===t||e.sourceEvent instanceof KeyboardEvent)return;let{beans:i,gos:r,model:a}=this;if((l=i.editSvc)!=null&&l.isRangeSelectionEnabledWhileEditing())return;let n=G(i,o);r.get("invalidEditValueMode")==="block"&&n&&(a.getCellValidationModel().getCellValidation(n)||a.getRowValidationModel().getRowValidation(n))||super.onCellFocusChanged(e)}cleanupEditors(e={},t){super.cleanupEditors(e,t);let{startedRows:o}=this;for(let i of o)this.dispatchRowEvent({rowNode:i},"rowEditingStopped"),this.destroyEditorsForRow(i);o.clear()}destroyEditorsForRow(e){var i;let t=fr(this.beans,{rowNode:e});if(!t)return;let o={};for(let r of t.getAllCellCtrls())(i=r.comp)!=null&&i.getCellEditor()&&pi(this.beans,r,o,r)}moveToNextEditingCell(e,t,o,i="ui",r=!1){var m,v,C;let{beans:a,model:n,gos:s,editSvc:l}=this,c=e.cellPosition,d;n.suspend(!0);try{d=(m=a.navigation)==null?void 0:m.findNextCellToFocusOn(c,{backwards:t,startEditing:!0,skipToNextEditableCell:!1})}finally{n.suspend(!1)}if(d===!1)return null;if(d==null)return!1;let g=d.cellPosition,u=e.isCellEditable(),h=d.isCellEditable(),p=g&&c.rowIndex===g.rowIndex&&c.rowPinned===g.rowPinned;u&&this.setFocusOutOnEditor(e),this.restoreEditors();let f=s.get("suppressStartEditOnTab");return h&&!r?f?d.focusCell(!0,o):((v=d.comp)!=null&&v.getCellEditor()||oo(a,d,{event:o,cellStartedEdit:!0}),this.setFocusInOnEditor(d),d.focusCell(!1,o)):(h&&r&&this.setFocusInOnEditor(d),d.focusCell(!0,o)),!p&&!r&&(l==null||l.stopEditing({rowNode:e.rowNode},{event:o,forceStop:!0}),l!=null&&l.isRowEditing(e.rowNode,{withOpenEditor:!0})&&this.cleanupEditors(d,!0),f?d.focusCell(!0,o):l.startEditing(d,{startedEdit:!0,event:o,source:i,ignoreEventKey:!0,editable:h||void 0})),(C=e.rowCtrl)==null||C.refreshRow({suppressFlash:!0,force:!0}),!0}restoreEditors(){let{beans:e,model:t}=this;t.getEditMap().forEach((o,i)=>o.forEach(({state:r},a)=>{var s;if(r!=="editing")return;let n=G(e,{rowNode:i,column:a});n&&!((s=n.comp)!=null&&s.getCellEditor())&&oo(e,n,{silent:!0})}))}destroy(){super.destroy(),this.rowNode=void 0,this.startedRows.clear()}},A2=class extends zg{constructor(){super(...arguments),this.beanName="singleCell"}shouldStop(e,t,o="ui"){let i=super.shouldStop(e,t,o);if(i!==null)return i;let r=e==null?void 0:e.rowNode,a=e==null?void 0:e.column,n=this.rowNode,s=this.column;return(!n||!s)&&r&&a?null:n!==r||s!==a?!0:!n&&!s?this.model.hasEdits(void 0,{withOpenEditor:!0}):!1}midBatchInputsAllowed(e){return this.model.hasEdits(e)}start(e){let{position:t,startedEdit:o,event:i,ignoreEventKey:r}=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:r})}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){let{colModel:t,editSvc:o}=this.beans,{rowIndex:i,column:r,rowPinned:a}=e,n=et(this.beans,{rowIndex:i,rowPinned:a}),s=Ua(r),l=t.getCol(s),c=e.previousParams;if(c){let d=Ua(c.column);if((c==null?void 0:c.rowIndex)===i&&d===s&&(c==null?void 0:c.rowPinned)===a)return}e.type=="cellFocused"&&(o!=null&&o.isRangeSelectionEnabledWhileEditing()||o!=null&&o.isEditing({rowNode:n,column:l},{withOpenEditor:!0}))||super.onCellFocusChanged(e)}moveToNextEditingCell(e,t,o,i="ui",r=!1){var f,m,v,C,w,y,x;let a=this.beans.focusSvc.getFocusedCell();a&&(e=(f=ho(this.beans,a))!=null?f:e);let n=e.cellPosition,s,l=this.beans.gos.get("editType")==="fullRow";l&&this.model.suspend(!0),r||(e.eGui.focus(),(v=this.editSvc)==null||v.stopEditing(e,{source:(m=this.editSvc)!=null&&m.isBatchEditing()?"ui":"api",event:o}));try{s=(C=this.beans.navigation)==null?void 0:C.findNextCellToFocusOn(n,{backwards:t,startEditing:!0})}finally{l&&this.model.suspend(!1)}if(s===!1)return null;if(s==null)return!1;let c=s.cellPosition,d=e.isCellEditable(),g=s.isCellEditable(),u=c&&n.rowIndex===c.rowIndex&&n.rowPinned===c.rowPinned;d&&!r&&this.setFocusOutOnEditor(e);let h=this.gos.get("suppressStartEditOnTab"),p=!1;if(!u&&!r&&(super.cleanupEditors(s,!0),h?s.focusCell(!0,o):(p=!0,this.editSvc.startEditing(s,{startedEdit:!0,event:o,source:i,ignoreEventKey:!0,editable:g}))),g&&!r){if(s.focusCell(!1,o),h)s.focusCell(!0,o);else if(!((w=s.comp)!=null&&w.getCellEditor())){if(!p){let R=(y=this.editSvc)==null?void 0:y.isEditing(s,{withOpenEditor:!0});oo(this.beans,s,{event:o,cellStartedEdit:!0,silent:R})}this.setFocusInOnEditor(s),this.cleanupEditors(s)}}else g&&r&&this.setFocusInOnEditor(s),s.focusCell(!0,o);return(x=e.rowCtrl)==null||x.refreshRow({suppressFlash:!0,force:!0}),!0}destroy(){super.destroy(),this.rowNode=void 0,this.column=void 0}},Ot={moduleName:"EditCore",version:D,beans:[Xb,P2],apiFunctions:{getEditingCells:s2,getEditRowValues:n2,getCellEditorInstances:t1,startEditingCell:d2,stopEditing:l2,isEditing:c2,validateEdit:g2},dynamicBeans:{singleCell:A2,fullRow:T2},dependsOn:[Ir,Fg],css:[ES]},z2={moduleName:"UndoRedoEdit",version:D,beans:[RS],apiFunctions:{undoCellEditing:r2,redoCellEditing:a2,getCurrentUndoSize:u2,getCurrentRedoSize:h2},dependsOn:[Ot]},L2={moduleName:"TextEditor",version:D,userComponents:{agCellEditor:Hl,agTextCellEditor:Hl},dependsOn:[Ot]},O2={moduleName:"NumberEditor",version:D,userComponents:{agNumberCellEditor:{classImp:qS}},dependsOn:[Ot]},H2={moduleName:"DateEditor",version:D,userComponents:{agDateCellEditor:TS,agDateStringCellEditor:LS},dependsOn:[Ot]},B2={moduleName:"CheckboxEditor",version:D,userComponents:{agCheckboxCellEditor:DS},dependsOn:[Ot]},V2={moduleName:"SelectEditor",version:D,userComponents:{agSelectCellEditor:t2},dependsOn:[Ot]},N2={moduleName:"LargeTextEditor",version:D,userComponents:{agLargeTextCellEditor:VS},dependsOn:[Ot]},G2={moduleName:"CustomEditor",version:D,dependsOn:[Ot]},Lg={agSetColumnFilter:"agSetColumnFilterHandler",agMultiColumnFilter:"agMultiColumnFilterHandler",agGroupColumnFilter:"agGroupColumnFilterHandler",agNumberColumnFilter:"agNumberColumnFilterHandler",agBigIntColumnFilter:"agBigIntColumnFilterHandler",agDateColumnFilter:"agDateColumnFilterHandler",agTextColumnFilter:"agTextColumnFilterHandler"},W2=new Set(Object.values(Lg));function Ct(e,t){let o=e.filterUi;if(!o)return null;if(o.created)return o.promise;if(t)return null;let i=o.create(o.refreshed),r=o;return r.created=!0,r.promise=i,i}function q2(e,t,o,i,r,a,n){var s;return(s=t.refresh)==null||s.call(t,{...o,model:i,source:a,additionalEventAttributes:n}),e().then(l=>{if(l){let{filter:c,filterParams:d}=l;Og(c,d,i,r,a,n)}})}function Og(e,t,o,i,r,a){var n;(n=e==null?void 0:e.refresh)==null||n.call(e,{...t,model:o,state:i,source:r,additionalEventAttributes:a})}function Hg(e,t,o,i){let r=e();r!=null&&r.created&&r.promise.then(a=>{var s;let n=t();Og(a,r.filterParams,n,(s=o())!=null?s:{model:n},"ui",i)})}function Vl(e){var u,h;let t,o=!1,i,{action:r,filterParams:a,getFilterUi:n,getModel:s,getState:l,updateState:c,updateModel:d,processModelToApply:g}=e;switch(r){case"apply":{let p=l();i=(u=p==null?void 0:p.model)!=null?u:null,g&&(i=g(i)),t={state:p==null?void 0:p.state,model:i},o=!0;break}case"clear":{t={model:null},(h=a==null?void 0:a.buttons)!=null&&h.includes("apply")||(o=!0,i=null);break}case"reset":{t={model:null},o=!0,i=null;break}case"cancel":{t={model:s()};break}}c(t),o?d(i):Hg(n,s,l,{fromAction:r})}function ie(e,t){var o;return(o=e[t])!=null?o:null}var _2=class extends On{constructor(){super(...arguments),this.iconCreated=!1}wireComp(e,t,o,i,r){this.comp=e;let a=wi(this,this.beans.context,r);this.eButtonShowMainFilter=o,this.eFloatingFilterBody=i,this.setGui(t,a),this.setupActive(),this.refreshHeaderStyles(),this.setupWidth(a),this.setupLeft(a),this.setupHover(a),this.setupFocus(a),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(a),this.setupUi(),a.addManagedElementListeners(this.eButtonShowMainFilter,{click:this.showParentFilter.bind(this)}),this.setupFilterChangedListener(a);let n=()=>this.onColDefChanged(a);a.addManagedListeners(this.column,{colDefChanged:n}),a.addManagedEventListeners({filterSwitched:({column:s})=>{s===this.column&&n()}}),a.addDestroyFunc(()=>{this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.clearComponent()})}resizeHeader(){}moveHeader(){}getHeaderClassParams(){let{column:e,beans:t}=this,o=e.colDef;return O(t.gos,{colDef:o,column:e,floatingFilter:!0})}setupActive(){let 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;let e=ye("filter",this.beans,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}setupFocus(e){e.createManagedBean(new vi(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))}setupAria(){let e=this.getLocaleTextFunc();Fo(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(e){var n;let{beans:t}=this;if(Y(t)===this.eGui)return;let r=no(t,this.eGui,null,e.shiftKey);if(r){(n=t.headerNavigation)==null||n.scrollToColumn(this.column),e.preventDefault(),r.focus();return}let a=this.findNextColumnWithFloatingFilter(e.shiftKey);a&&t.focusSvc.focusHeaderPosition({headerPosition:{headerRowIndex:this.rowCtrl.rowIndex,column:a},event:e})&&e.preventDefault()}findNextColumnWithFloatingFilter(e){let t=this.beans.visibleCols,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);let t=this.getWrapperHasFocus();switch(e.key){case b.UP:case b.DOWN:case b.LEFT:case b.RIGHT:if(t)return;Xt(e);case b.ENTER:t&&Jt(this.eGui)&&e.preventDefault();break;case b.ESCAPE:t||this.eGui.focus()}}onFocusIn(e){if(this.eGui.contains(e.relatedTarget))return;let o=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),i=!!e.relatedTarget&&qt(e.relatedTarget,"ag-floating-filter");if(o&&i&&e.target===this.eGui){let r=this.lastFocusEvent,a=!!(r&&r.key===b.TAB);if(r&&a){let n=r.shiftKey;Jt(this.eGui,n)}}this.focusThis()}setupHover(e){var t;(t=this.beans.colHover)==null||t.addHeaderFilterColumnHoverListener(e,this.comp,this.column,this.eGui)}setupLeft(e){let t=new Ln(this.column,this.eGui,this.beans);e.createManagedBean(t)}setupFilterButton(){var e;this.suppressFilterButton=!((e=this.beans.menuSvc)!=null&&e.isFloatingFilterButtonEnabled(this.column)),this.highlightFilterButtonWhenActive=!be(this.gos)}setupUserComp(){var t;if(!this.active)return;let e=(t=this.beans.colFilter)==null?void 0:t.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter());e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setCompDetails(e)}showParentFilter(){var t;let e=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;(t=this.beans.menuSvc)==null||t.showFilterMenu({column:this.column,buttonElement:e,containerType:"floatingFilter",positionBy:"button"})}setupSyncWithFilter(e){if(!this.active)return;let{beans:{colFilter:t},column:o,gos:i}=this,r=a=>{if((a==null?void 0:a.source)==="filterDestroyed"&&(!this.isAlive()||!(t!=null&&t.isAlive())))return;let n=this.comp.getFloatingFilterComp();n&&n.then(s=>{var l;if(s){if(i.get("enableFilterHandlers")){let g=a,u="filter";g!=null&&g.afterFloatingFilter?u="ui":g!=null&&g.afterDataChange?u="dataChanged":(a==null?void 0:a.source)==="api"&&(u="api"),this.updateFloatingFilterParams(this.userCompDetails,u);return}let c=t==null?void 0:t.getCurrentFloatingFilterParentModel(o),d=a?{...a,columns:(l=a.columns)!=null?l:[],source:a.source==="api"?"api":"columnFilter"}:null;s.onParentModelChanged(c,d)}})};[this.destroySyncListener]=e.addManagedListeners(o,{filterChanged:r}),t!=null&&t.isFilterActive(o)&&r(null)}setupWidth(e){let t=()=>{let o=`${this.column.getActualWidth()}px`;this.comp.setWidth(o)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupFilterChangedListener(e){this.active&&([this.destroyFilterChangedListener]=e.addManagedListeners(this.column,{filterChanged:this.updateFilterButton.bind(this)}),this.updateFilterButton())}updateFilterButton(){var e;if(!this.suppressFilterButton&&this.comp){let t=!!((e=this.beans.filterManager)!=null&&e.isFilterAllowed(this.column));this.comp.setButtonWrapperDisplayed(t),this.highlightFilterButtonWhenActive&&t&&this.eButtonShowMainFilter.classList.toggle("ag-filter-active",this.column.isFilterActive())}}onColDefChanged(e){let t=this.active;this.setupActive();let o=!t&&this.active;t&&!this.active&&(this.destroySyncListener(),this.destroyFilterChangedListener());let i=this.beans.colFilter,r=this.active?i==null?void 0:i.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,a=this.comp.getFloatingFilterComp();!a||!r?this.updateCompDetails(e,r,o):a.then(n=>{var s;!n||i!=null&&i.areFilterCompsDifferent((s=this.userCompDetails)!=null?s:null,r)?this.updateCompDetails(e,r,o):this.updateFloatingFilterParams(r,"colDef")})}updateCompDetails(e,t,o){this.isAlive()&&(this.setCompDetails(t),this.setupFilterButton(),this.setupUi(),o&&(this.setupSyncWithFilter(e),this.setupFilterChangedListener(e)))}updateFloatingFilterParams(e,t){var i;if(!e)return;let o=e.params;(i=this.comp.getFloatingFilterComp())==null||i.then(r=>{var a,n;typeof(r==null?void 0:r.refresh)=="function"&&(this.gos.get("enableFilterHandlers")&&(o={...o,model:ie((n=(a=this.beans.colFilter)==null?void 0:a.model)!=null?n:{},this.column.getColId()),source:t}),r.refresh(o))})}addResizeAndMoveKeyboardListeners(){}destroy(){super.destroy(),this.destroySyncListener=null,this.destroyFilterChangedListener=null}};function U2(e,t){var i;let o=e.colModel.getCol(t);if(!o){W(12,{colKey:t});return}(i=e.menuSvc)==null||i.showColumnMenu({column:o,positionBy:"auto"})}function j2(e){var t;(t=e.menuSvc)==null||t.hidePopupMenu()}var K2=class extends S{constructor(){super(...arguments),this.beanName="menuSvc"}postConstruct(){let{enterpriseMenuFactory:e,filterMenuFactory:t}=this.beans;this.activeMenuFactory=e!=null?e:t}showColumnMenu(e){this.showColumnMenuCommon(this.activeMenuFactory,e,"columnMenu")}showFilterMenu(e){this.showColumnMenuCommon(Gl(this.beans),e,e.containerType,!0)}showHeaderContextMenu(e,t,o){var i;(i=this.activeMenuFactory)==null||i.showMenuAfterContextMenuEvent(e,t,o)}hidePopupMenu(){var e,t;(e=this.beans.contextMenuSvc)==null||e.hideActiveMenu(),(t=this.activeMenuFactory)==null||t.hideActiveMenu()}hideFilterMenu(){var e;(e=Gl(this.beans))==null||e.hideActiveMenu()}isColumnMenuInHeaderEnabled(e){var o;let{suppressHeaderMenuButton:t}=e.getColDef();return!t&&!!((o=this.activeMenuFactory)!=null&&o.isMenuEnabled(e))&&(be(this.gos)||!!this.beans.enterpriseMenuFactory)}isFilterMenuInHeaderEnabled(e){var t;return!e.getColDef().suppressHeaderFilterButton&&!!((t=this.beans.filterManager)!=null&&t.isFilterAllowed(e))}isHeaderContextMenuEnabled(e){let t=e&&Dt(e)?e.getColDef():e==null?void 0:e.getColGroupDef();return!(t!=null&&t.suppressHeaderContextMenu)&&this.gos.get("columnMenu")==="new"}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide()}isHeaderMenuButtonEnabled(){let e=!this.isSuppressMenuHide();return!(jt()&&e)}isHeaderFilterButtonEnabled(e){return this.isFilterMenuInHeaderEnabled(e)&&!be(this.gos)&&!this.isFloatingFilterButtonDisplayed(e)}isFilterMenuItemEnabled(e){var t;return!!((t=this.beans.filterManager)!=null&&t.isFilterAllowed(e))&&!be(this.gos)&&!this.isFilterMenuInHeaderEnabled(e)&&!this.isFloatingFilterButtonDisplayed(e)}isFloatingFilterButtonEnabled(e){return!e.getColDef().suppressFloatingFilterButton}isFloatingFilterButtonDisplayed(e){return!!e.getColDef().floatingFilter&&this.isFloatingFilterButtonEnabled(e)}isSuppressMenuHide(){let e=this.gos,t=e.get("suppressMenuHide");return be(e)?e.exists("suppressMenuHide")?t:!1:t}showColumnMenuCommon(e,t,o,i){let{positionBy:r,onClosedCallback:a}=t,n=t.column;if(r==="button"){let{buttonElement:s}=t;e==null||e.showMenuAfterButtonClick(n,s,o,a,i)}else if(r==="mouse"){let{mouseEvent:s}=t;e==null||e.showMenuAfterMouseEvent(n,s,o,a,i)}else if(n){let s=this.beans,l=s.ctrlsSvc;l.getScrollFeature().ensureColumnVisible(n,"auto"),ht(s,()=>{var d;let c=(d=l.getHeaderRowContainerCtrl(n.getPinned()))==null?void 0:d.getHeaderCtrlForColumn(n);c&&(e==null||e.showMenuAfterButtonClick(n,c.getAnchorElementForMenu(i),o,a,i))})}}};function Nl(e,t,o){e.menuVisible!==t&&(e.menuVisible=t,e.dispatchColEvent("menuVisibleChanged",o))}function Gl(e){let{enterpriseMenuFactory:t,filterMenuFactory:o,gos:i}=e;return t&&be(i)?t:o}var $2={moduleName:"SharedMenu",version:D,beans:[K2],apiFunctions:{showColumnMenu:U2,hidePopupMenu:j2}},Y2=".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)}";function Q2(e){let t=e.filterManager;return!!(t!=null&&t.isColumnFilterPresent())||!!(t!=null&&t.isAggregateFilterPresent())}function Z2(e,t){var o,i;return(i=(o=e.filterManager)==null?void 0:o.getColumnFilterInstance(t))!=null?i:Promise.resolve(void 0)}function J2(e,t){var i;let o=e.colModel.getColDefCol(t);if(o)return(i=e.colFilter)==null?void 0:i.destroyFilter(o,"api")}function X2(e,t){e.frameworkOverrides.wrapIncoming(()=>{var o;return(o=e.filterManager)==null?void 0:o.setFilterModel(t)})}function ex(e){var t,o;return(o=(t=e.filterManager)==null?void 0:t.getFilterModel())!=null?o:{}}function tx(e,t,o){var s;let{gos:i,colModel:r,colFilter:a}=e;o&&!i.get("enableFilterHandlers")&&(k(288),o=!1);let n=r.getColDefCol(t);return n&&(s=a==null?void 0:a.getModelForColumn(n,o))!=null?s:null}function ox(e,t,o){var i,r;return(r=(i=e.filterManager)==null?void 0:i.setColumnFilterModel(t,o))!=null?r:Promise.resolve()}function ix(e,t){var i;let o=e.colModel.getCol(t);if(!o){W(12,{colKey:t});return}(i=e.menuSvc)==null||i.showFilterMenu({column:o,containerType:"columnFilter",positionBy:"auto"})}function rx(e){var t;(t=e.menuSvc)==null||t.hideFilterMenu()}function ax(e,t){var i;let o=e.colModel.getCol(t);if(!o){W(12,{colKey:t});return}return(i=e.colFilter)==null?void 0:i.getHandler(o,!0)}function nx(e,t){let{colModel:o,colFilter:i,gos:r}=e;if(!r.get("enableFilterHandlers")){k(287);return}let{colId:a,action:n}=t;if(a){let s=o.getColById(a);s&&(i==null||i.updateModel(s,n))}else i==null||i.updateAllModels(n)}var Wl={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},ql=["january","february","march","april","may","june","july","august","september","october","november","december"];function sx(e,t){return e==null?-1:t==null?1:Number.parseFloat(e)-Number.parseFloat(t)}function lx(e,t){if(e==null)return-1;if(t==null)return 1;let o=Se(e),i=Se(t);return o!=null&&i!=null?o===i?0:o>i?1:-1:String(e).localeCompare(String(t))}function _l(e){return e instanceof Date&&!isNaN(e.getTime())}var Xa={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)=>t===!1,numberOfInputs:0}]}),date:()=>({isValidDate:_l}),dateString:({dataTypeDefinition:e})=>({comparator:(t,o)=>{let i=e.dateParser(o);return o==null||it?1:0},isValidDate:t=>typeof t=="string"&&_l(e.dateParser(t))}),dateTime:e=>Xa.date(e),dateTimeString:e=>Xa.dateString(e),object:()=>{},text:()=>{}},en={number:()=>({comparator:sx}),bigint:()=>({comparator:lx}),boolean:({t:e})=>({valueFormatter:t=>M(t.value)?e(String(t.value),t.value?"True":"False"):e("blanks","(Blanks)")}),date:({formatValue:e,t})=>({valueFormatter:o=>{let i=e(o);return M(i)?i:t("blanks","(Blanks)")},treeList:!0,treeListFormatter:(o,i)=>{if(o==="NaN")return t("invalidDate","Invalid Date");if(i===1&&o!=null){let r=ql[Number(o)-1];return t(r,Wl[r])}return o!=null?o:t("blanks","(Blanks)")},treeListPathGetter:o=>Ti(o,!1)}),dateString:({formatValue:e,dataTypeDefinition:t,t:o})=>({valueFormatter:i=>{let r=e(i);return M(r)?r:o("blanks","(Blanks)")},treeList:!0,treeListPathGetter:i=>Ti(t.dateParser(i!=null?i:void 0),!1),treeListFormatter:(i,r)=>{if(r===1&&i!=null){let a=ql[Number(i)-1];return o(a,Wl[a])}return i!=null?i:o("blanks","(Blanks)")}}),dateTime:e=>{let t=en.date(e);return t.treeListPathGetter=Ti,t},dateTimeString(e){let t=e.dataTypeDefinition.dateParser,o=en.dateString(e);return o.treeListPathGetter=i=>Ti(t(i!=null?i:void 0)),o},object:({formatValue:e,t})=>({valueFormatter:o=>{let i=e(o);return M(i)?i:t("blanks","(Blanks)")}}),text:()=>{}};function cx(e,t,o,i,r,a,n){let s=t,l=o,c=e==="agSetColumnFilter";!l&&i.baseDataType==="object"&&!c&&(l=({column:h,node:p})=>r({column:h,node:p,value:a.valueSvc.getValue(h,p,"data")}));let g=(c?en:Xa)[i.baseDataType],u=g({dataTypeDefinition:i,formatValue:r,t:n});return s=typeof t=="object"?{...u,...t}:u,{filterParams:s,filterValueGetter:l}}var dx={boolean:"agTextColumnFilter",date:"agDateColumnFilter",dateString:"agDateColumnFilter",dateTime:"agDateColumnFilter",dateTimeString:"agDateColumnFilter",bigint:"agBigIntColumnFilter",number:"agNumberColumnFilter",object:"agTextColumnFilter",text:"agTextColumnFilter"},gx={boolean:"agTextColumnFloatingFilter",date:"agDateColumnFloatingFilter",dateString:"agDateColumnFloatingFilter",dateTime:"agDateColumnFloatingFilter",dateTimeString:"agDateColumnFloatingFilter",bigint:"agBigIntColumnFloatingFilter",number:"agNumberColumnFloatingFilter",object:"agTextColumnFloatingFilter",text:"agTextColumnFloatingFilter"};function ux(e,t=!1){return(t?gx:dx)[e!=null?e:"text"]}function hx(e,t,o){if(t==null)return null;let i=null,{compName:r,jsComp:a,fwComp:n}=$c(e,t);return r?i={agSetColumnFilter:"agSetColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",agBigIntColumnFilter:"agBigIntColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"}[r]:a==null&&n==null&&t.filter===!0&&(i=o()),i}var px={filterHandler:()=>({doesFilterPass:()=>!0})};function Ul(e,t,o,i){if(!e.isPrimary())return!0;let a=!o;return!e.isValueActive()||!a?!1:t?!0:i}var fx=class extends S{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={...Lg},this.isGlobalButtons=!1,this.activeFilterComps=new Set}postConstruct(){var o,i,r;this.addManagedEventListeners({gridColumnsChanged:this.onColumnsChanged.bind(this),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.addManagedPropertyListener("pivotMode",this.onPivotModeChanged.bind(this));let e=this.gos,t={...(r=(i=(o=e.get("initialState"))==null?void 0:o.filter)==null?void 0:i.filterModel)!=null?r:{}};this.initialModel=t,this.model={...t},e.get("enableFilterHandlers")||delete this.handlerMap.agMultiColumnFilter}refreshModel(){this.onNewRowsLoaded("rowDataUpdated")}setModel(e,t="api",o){let{colModel:i,dataTypeSvc:r,filterManager:a}=this.beans;if(r!=null&&r.isPendingInference){this.modelUpdates.push({model:e,source:t});return}let n=[],s=this.getModel(!0);if(e){let l=new Set(Object.keys(e));this.allColumnFilters.forEach((c,d)=>{let g=e[d];n.push(this.setModelOnFilterWrapper(c,g)),l.delete(d)}),l.forEach(c=>{let d=i.getColDefCol(c)||i.getCol(c);if(!d){k(62,{colId:c});return}if(!d.isFilterAllowed()){k(63,{colId:c});return}let g=this.getOrCreateFilterWrapper(d,!0);if(!g){k(64,{colId:c});return}n.push(this.setModelOnFilterWrapper(g,e[c],!0))})}else this.model={},this.allColumnFilters.forEach(l=>{n.push(this.setModelOnFilterWrapper(l,null))});$.all(n).then(()=>{let l=this.getModel(!0),c=[];this.allColumnFilters.forEach((d,g)=>{let u=s?s[g]:null,h=l?l[g]:null;oi(u,h)||c.push(d.column)}),c.length>0?a==null||a.onFilterChanged({columns:c,source:t}):o&&this.updateActive("filterChanged")})}getModel(e){var a;let t={},{allColumnFilters:o,initialModel:i,beans:{colModel:r}}=this;if(o.forEach((n,s)=>{let l=this.getModelFromFilterWrapper(n);M(l)&&(t[s]=l)}),!e)for(let n of Object.keys(i)){let s=i[n];M(s)&&!o.has(n)&&((a=r.getCol(n))!=null&&a.isFilterAllowed())&&(t[n]=s)}return t}setState(e,t,o="api"){if(this.state.clear(),t)for(let i of Object.keys(t)){let r=t[i];this.state.set(i,{model:ie(this.model,i),state:r})}this.setModel(e,o,!0)}getState(){let e=this.state;if(!e.size)return;let t={},o=!1;return e.forEach((i,r)=>{let a=i.state;a!=null&&(o=!0,t[r]=a)}),o?t:void 0}getModelFromFilterWrapper(e){let o=e.column.getColId();if(e.isHandler)return ie(this.model,o);let i=e.filter;return i?typeof i.getModel!="function"?(k(66),null):i.getModel():ie(this.initialModel,o)}isFilterPresent(){return this.activeColumnFilters.length>0}isAggFilterPresent(){return!!this.activeAggregateFilters.length}disableFilters(){this.initialModel={};let{allColumnFilters:e}=this;return e.size?(e.forEach(t=>this.disposeFilterWrapper(t,"advancedFilterEnabled")),!0):!1}updateActiveFilters(){let e=l=>l?l.isFilterActive?l.isFilterActive():(k(67),!1):!1,{colModel:t,gos:o}=this.beans,i=!!er(o),r=[],a=[],n=(l,c,d)=>{c&&(Ul(l,t.isPivotMode(),t.isPivotActive(),i)?r.push(d):a.push(d))},s=[];return this.allColumnFilters.forEach(l=>{let c=l.column,d=c.getColId();if(l.isHandler)s.push($.resolve().then(()=>{n(c,this.isHandlerActive(c),{colId:d,isHandler:!0,handler:l.handler,handlerParams:l.handlerParams})}));else{let g=Ct(l);g&&s.push(g.then(u=>{n(c,e(u),{colId:d,isHandler:!1,comp:u})}))}}),$.all(s).then(()=>{this.activeAggregateFilters=r,this.activeColumnFilters=a})}updateFilterFlagInColumns(e,t){var i;let o=[];return this.allColumnFilters.forEach(r=>{let a=r.column;if(r.isHandler)o.push($.resolve().then(()=>{this.setColFilterActive(a,this.isHandlerActive(a),e,t)}));else{let n=Ct(r);n&&o.push(n.then(s=>{this.setColFilterActive(a,s.isFilterActive(),e,t)}))}}),(i=this.beans.groupFilter)==null||i.updateFilterFlags(e,t),$.all(o)}doFiltersPass(e,t,o){let{data:i,aggData:r}=e,a=o?this.activeAggregateFilters:this.activeColumnFilters,n=o?r:i,s=this.model;for(let l=0;l{this.isAlive()&&(o==null||o.onFilterChanged(e))};t.isRefreshInProgress()?setTimeout(i,0):i()}updateBeforeFilterChanged(e={}){let{column:t,additionalEventAttributes:o}=e,i=t==null?void 0:t.getColId();return this.updateActiveFilters().then(()=>this.updateFilterFlagInColumns("filterChanged",o).then(()=>{this.allColumnFilters.forEach(r=>{var s,l,c;let{column:a,isHandler:n}=r;i!==a.getColId()&&(n&&((l=(s=r.handler).onAnyFilterChanged)==null||l.call(s)),(c=Ct(r,n))==null||c.then(d=>{typeof(d==null?void 0:d.onAnyFilterChanged)=="function"&&d.onAnyFilterChanged()}))}),this.processingFilterChange=!0}))}updateAfterFilterChanged(){this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){var t;return!((t=this.gos.get("allowShowChangeAfterFilter"))!=null?t:!1)&&this.processingFilterChange}onNewRowsLoaded(e){let t=[];this.allColumnFilters.forEach(o=>{var a,n;let i=o.isHandler;i&&((n=(a=o.handler).onNewRowsLoaded)==null||n.call(a));let r=Ct(o,i);r&&t.push(r.then(s=>{var l;(l=s.onNewRowsLoaded)==null||l.call(s)}))}),$.all(t).then(()=>this.updateActive(e,{afterDataChange:!0}))}updateActive(e,t){this.updateFilterFlagInColumns(e,t).then(()=>this.updateActiveFilters())}createGetValue(e,t){let{filterValueSvc:o,colModel:i}=this.beans;return(r,a)=>{let n=a?i.getCol(a):e;return n?o.getValue(n,r,t):void 0}}isFilterActive(e){let t=this.cachedFilter(e);if(t!=null&&t.isHandler)return this.isHandlerActive(e);let o=t==null?void 0:t.filter;return o?o.isFilterActive():ie(this.initialModel,e.getColId())!=null}isHandlerActive(e){let t=M(ie(this.model,e.getColId()));if(t)return t;let o=this.beans.groupFilter;return o!=null&&o.isGroupFilter(e)?o.isFilterActive(e):!1}getOrCreateFilterUi(e){let t=this.getOrCreateFilterWrapper(e,!0);return t?Ct(t):null}getFilterUiForDisplay(e){let t=this.getOrCreateFilterWrapper(e,!0);if(!t)return null;let o=Ct(t);return o?o.then(i=>({comp:i,params:t.filterUi.filterParams,isHandler:t.isHandler})):null}getHandler(e,t){let o=this.getOrCreateFilterWrapper(e,t);return o!=null&&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(()=>{var o;return(o=this.beans.dataTypeSvc)==null?void 0:o.getBaseDataType(e)},t)}getDefaultFilterFromDataType(e,t=!1){return Lh(this.gos)?t?"agSetColumnFloatingFilter":"agSetColumnFilter":ux(e(),t)}getDefaultFloatingFilter(e){return this.getDefaultFilter(e,!0)}createFilterComp(e,t,o,i,r,a){let n=()=>{let c=this.createFilterCompParams(e,r,a),d=i(c,r);return Np(this.beans.userCompFactory,t,d,o)},s=n();return s?{compDetails:s,createFilterUi:c=>(c?n():s).newAgStackInstance()}:null}createFilterInstance(e,t,o,i){var g,u,h;let r=this.beans.selectableFilter;r!=null&&r.isSelectable(t)&&(t=r.getFilterDef(e,t));let{handler:a,handlerParams:n,handlerGenerator:s}=(g=this.createHandler(e,t,o))!=null?g:{},l=this.createFilterComp(e,t,o,i,!!a,"init");if(!l)return{compDetails:null,createFilterUi:null,handler:a,handlerGenerator:s,handlerParams:n};let{compDetails:c,createFilterUi:d}=l;return this.isGlobalButtons&&((h=(u=c.params)==null?void 0:u.buttons)!=null&&h.length||k(281,{colId:e.getColId()})),{compDetails:c,handler:a,handlerGenerator:s,handlerParams:n,createFilterUi:d}}createBaseFilterParams(e,t){let{filterManager:o,rowModel:i}=this.beans;return O(this.gos,{column:e,colDef:e.getColDef(),getValue:this.createGetValue(e),doesRowPassOtherFilter:t?()=>!0:r=>{var a;return(a=o==null?void 0:o.doesRowPassOtherFilters(e.getColId(),r))!=null?a:!0},rowModel:i})}createFilterCompParams(e,t,o,i){var n;let r=this.filterChangedCallbackFactory(e),a=this.createBaseFilterParams(e,i);if(a.filterChangedCallback=r,a.filterModifiedCallback=i?()=>{}:s=>this.filterModified(e,s),t){let s=a,l=e.getColId(),c=ie(this.model,l);s.model=c,s.state=(n=this.state.get(l))!=null?n:{model:c},s.onModelChange=(d,g)=>{this.updateStoredModel(l,d),this.refreshHandlerAndUi(e,d,"ui",!1,g).then(()=>{r({...g,source:"columnFilter"})})},s.onStateChange=d=>{this.updateState(e,d),this.updateOrRefreshFilterUi(e)},s.onAction=(d,g,u)=>{this.updateModel(e,d,g),this.dispatchLocalEvent({type:"filterAction",column:e,action:d,event:u})},s.getHandler=()=>this.getHandler(e,!0),s.onUiChange=d=>this.filterUiChanged(e,d),s.source=o}return a}createFilterUiForHandler(e,t){return t?{created:!1,create:t,filterParams:e.params,compDetails:e}:null}createFilterUiLegacy(e,t,o){let i=t(),r={created:!0,create:t,filterParams:e.params,compDetails:e,promise:i};return i.then(o),r}createFilterWrapper(e){var s;let{compDetails:t,handler:o,handlerGenerator:i,handlerParams:r,createFilterUi:a}=this.createFilterInstance(e,e.getColDef(),this.getDefaultFilter(e),l=>l),n=e.getColId();if(o)return delete this.initialModel[n],(s=o.init)==null||s.call(o,{...r,source:"init",model:ie(this.model,n)}),{column:e,isHandler:!0,handler:o,handlerGenerator:i,handlerParams:r,filterUi:this.createFilterUiForHandler(t,a)};if(a){let l={column:e,filterUi:null,isHandler:!1};return l.filterUi=this.createFilterUiLegacy(t,a,c=>{l.filter=c!=null?c:void 0}),l}return{column:e,filterUi:null,isHandler:!1}}createHandlerFunc(e,t,o){var h;let{gos:i,frameworkOverrides:r,registry:a}=this.beans,n,s=p=>{let f=p.filter;if(Uc(f)){let m=f.handler;return m||(n=f.doesFilterPass,n?()=>({doesFilterPass:n}):void 0)}return typeof f=="string"?f:void 0},l=i.get("enableFilterHandlers"),c=l?s(t):void 0,d=p=>()=>this.createBean(a.createDynamicBean(p,!0)),g,u;if(typeof c=="string"){let p=(h=i.get("filterHandlers"))==null?void 0:h[c];p!=null?g=p:W2.has(c)&&(g=d(c),u=c)}else g=c;if(!g){let p,{compName:f,jsComp:m,fwComp:v}=$c(r,t);f?p=f:m==null&&v==null&&t.filter===!0&&(p=o),u=this.handlerMap[p],u&&(g=d(u))}return g?{filterHandler:g,handlerNameOrCallback:n!=null?n:u}:l?(ee(i)&&k(277,{colId:e.getColId()}),px):void 0}createHandler(e,t,o){let i=this.createHandlerFunc(e,t,o);if(!i)return;let r=qr(this.beans.userCompFactory,t,this.createFilterCompParams(e,!0,"init")),{handlerNameOrCallback:a,filterHandler:n}=i,{handler:s,handlerParams:l}=this.createHandlerFromFunc(e,n,r);return{handler:s,handlerParams:l,handlerGenerator:a!=null?a:n}}createHandlerFromFunc(e,t,o){let i=e.getColDef(),r=t(O(this.gos,{column:e,colDef:i})),a=this.createHandlerParams(e,o);return{handler:r,handlerParams:a}}createHandlerParams(e,t){let o=e.getColDef(),i=e.getColId(),r=this.filterChangedCallbackFactory(e);return O(this.gos,{colDef:o,column:e,getValue:this.createGetValue(e),doesRowPassOtherFilter:a=>{var n,s;return(s=(n=this.beans.filterManager)==null?void 0:n.doesRowPassOtherFilters(i,a))!=null?s:!0},onModelChange:(a,n)=>{this.updateStoredModel(i,a),this.refreshHandlerAndUi(e,a,"handler",!1,n).then(()=>{r({...n,source:"columnFilter"})})},onModelAsStringChange:()=>{e.dispatchColEvent("filterChanged","filterChanged"),this.dispatchLocalEvent({type:"filterModelAsStringChanged",column:e})},filterParams:t})}onColumnsChanged(){let e=[],{colModel:t,filterManager:o,groupFilter:i}=this.beans;this.allColumnFilters.forEach((a,n)=>{let s;a.column.isPrimary()?s=t.getColDefCol(n):s=t.getCol(n),!(s&&s===a.column)&&(e.push(a.column),this.disposeFilterWrapper(a,"columnChanged"),this.disposeColumnListener(n))});let r=i&&e.every(a=>i.isGroupFilter(a));e.length>0&&!r&&(o==null||o.onFilterChanged({columns:e,source:"api"}))}isFilterAllowed(e){if(!e.isFilterAllowed())return!1;let o=this.beans.groupFilter;return o!=null&&o.isGroupFilter(e)?o.isFilterAllowed(e):!0}getFloatingFilterCompDetails(e,t){var h;let{userCompFactory:o,frameworkOverrides:i,selectableFilter:r,gos:a}=this.beans,n=p=>{let f=this.getOrCreateFilterUi(e);f==null||f.then(m=>{p(to(m))})},s=e.getColDef(),l=r!=null&&r.isSelectable(s)?r.getFilterDef(e,s):s,c=(h=hx(i,l,()=>this.getDefaultFloatingFilter(e)))!=null?h:"agReadOnlyFloatingFilter",d=a.get("enableFilterHandlers"),g=qr(o,l,this.createFilterCompParams(e,d,"init",!0)),u=O(a,{column:e,filterParams:g,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:n,showParentFilter:t});if(d){let p=u,f=e.getColId(),m=this.filterChangedCallbackFactory(e);p.onUiChange=v=>this.floatingFilterUiChanged(e,v),p.model=ie(this.model,f),p.onModelChange=(v,C)=>{this.updateStoredModel(f,v),this.refreshHandlerAndUi(e,v,"floating",!0,C).then(()=>{m({...C,source:"columnFilter"})})},p.getHandler=()=>this.getHandler(e,!0),p.source="init"}return qp(o,s,u,c)}getCurrentFloatingFilterParentModel(e){var t;return this.getModelFromFilterWrapper((t=this.cachedFilter(e))!=null?t:{column:e})}destroyFilterUi(e,t,o,i){let r="paramsUpdated";if(e.isHandler){let a=t.getColId();delete this.initialModel[a],this.state.delete(a);let n=e.filterUi,s=this.createFilterUiForHandler(o,i);e.filterUi=s;let l=this.eventSvc;n!=null&&n.created?n.promise.then(c=>{this.destroyBean(c),l.dispatchEvent({type:"filterDestroyed",source:r,column:t})}):l.dispatchEvent({type:"filterHandlerDestroyed",source:r,column:t})}else this.destroyFilter(t,r)}destroyFilter(e,t="api"){let o=e.getColId(),i=this.allColumnFilters.get(o);this.disposeColumnListener(o),delete this.initialModel[o],i&&this.disposeFilterWrapper(i,t).then(r=>{var a;r&&this.isAlive()&&((a=this.beans.filterManager)==null||a.onFilterChanged({columns:[e],source:"api"}))})}disposeColumnListener(e){let t=this.allColumnListeners.get(e);t&&(this.allColumnListeners.delete(e),t())}disposeFilterWrapper(e,t){let o=!1,{column:i,isHandler:r,filterUi:a}=e,n=i.getColId();r&&(o=this.isHandlerActive(i),this.destroyBean(e.handler),delete this.model[n],this.state.delete(n));let s=()=>{this.setColFilterActive(i,!1,"filterDestroyed"),this.allColumnFilters.delete(n),this.eventSvc.dispatchEvent({type:"filterDestroyed",source:t,column:i})};if(a){if(a.created)return a.promise.then(l=>(o=r?o:!!(l!=null&&l.isFilterActive()),this.destroyBean(l),s(),o));s()}return $.resolve(o)}filterChangedCallbackFactory(e){return t=>{var o;this.callOnFilterChangedOutsideRenderCycle({additionalEventAttributes:t,columns:[e],column:e,source:(o=t==null?void 0:t.source)!=null?o:"columnFilter"})}}filterParamsChanged(e,t="api"){var m,v,C,w,y,x,R,F,P,T;let o=this.allColumnFilters.get(e);if(!o)return;let i=this.beans,r=o.column,a=r.getColDef(),n=r.isFilterAllowed(),s=this.getDefaultFilter(r),l=i.selectableFilter,c=l!=null&&l.isSelectable(a)?l.getFilterDef(r,a):a,d=n?this.createHandlerFunc(r,c,this.getDefaultFilter(r)):void 0,g=!!d,u=o.isHandler;if(u!=g){this.destroyFilter(r,"paramsUpdated");return}let{compDetails:h,createFilterUi:p}=(m=n?this.createFilterComp(r,c,s,I=>I,g,"colDef"):null)!=null?m:{compDetails:null,createFilterUi:null},f=(v=h==null?void 0:h.params)!=null?v:qr(i.userCompFactory,c,this.createFilterCompParams(r,g,"colDef"));if(u){let I=(C=d==null?void 0:d.handlerNameOrCallback)!=null?C:d==null?void 0:d.filterHandler,z=ie(this.model,e);if(o.handlerGenerator!=I){let L=o.handler,{handler:N,handlerParams:j}=this.createHandlerFromFunc(r,d.filterHandler,f);o.handler=N,o.handlerParams=j,o.handlerGenerator=I,delete this.model[e],(w=N.init)==null||w.call(N,{...j,source:"init",model:null}),this.destroyBean(L),z!=null&&((y=this.beans.filterManager)==null||y.onFilterChanged({columns:[r],source:t}))}else{let L=this.createHandlerParams(r,h==null?void 0:h.params);o.handlerParams=L,(R=(x=o.handler).refresh)==null||R.call(x,{...L,source:"colDef",model:z})}}if(this.areFilterCompsDifferent((P=(F=o.filterUi)==null?void 0:F.compDetails)!=null?P:null,h)||!o.filterUi||!h){this.destroyFilterUi(o,r,h,p);return}o.filterUi.filterParams=f,(T=Ct(o,u))==null||T.then(I=>{(I!=null&&I.refresh?I.refresh(f):!0)===!1?this.destroyFilterUi(o,r,h,p):this.dispatchLocalEvent({type:"filterParamsChanged",column:r,params:f})})}refreshHandlerAndUi(e,t,o,i,r){var c;let a=this.cachedFilter(e);if(!a)return i&&this.getOrCreateFilterWrapper(e,!0),$.resolve();if(!a.isHandler)return $.resolve();let{filterUi:n,handler:s,handlerParams:l}=a;return q2(()=>{if(n){let{created:d,filterParams:g}=n;if(d)return n.promise.then(u=>u?{filter:u,filterParams:g}:void 0);n.refreshed=!0}return $.resolve(void 0)},s,l,t,(c=this.state.get(e.getColId()))!=null?c:{model:t},o,r)}setColumnFilterWrapper(e,t){let 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;let{componentClass:o}=e,{componentClass:i}=t;return!(o===i||(o==null?void 0:o.render)&&(i==null?void 0:i.render)&&o.render===i.render)}hasFloatingFilters(){return this.beans.colModel.getCols().some(t=>t.getColDef().floatingFilter)}getFilterInstance(e){let t=this.beans.colModel.getColDefCol(e);if(!t)return Promise.resolve(void 0);let o=this.getOrCreateFilterUi(t);return o?new Promise(i=>{o.then(r=>{i(to(r))})}):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){var i;if(t){let{state:r,model:a}=this,n=e.getColId(),s=r.get(n);return s?(i=s.model)!=null?i:null:ie(a,n)}let o=this.cachedFilter(e);return o?this.getModelFromFilterWrapper(o):null}setModelForColumn(e,t){var o;if((o=this.beans.dataTypeSvc)!=null&&o.isPendingInference){let i=()=>{},r=new Promise(a=>{i=a});return this.columnModelUpdates.push({key:e,model:t,resolve:i}),r}return new Promise(i=>{this.setModelForColumnLegacy(e,t).then(r=>i(r))})}getStateForColumn(e){var t;return(t=this.state.get(e))!=null?t:{model:ie(this.model,e)}}setModelForColumnLegacy(e,t){let o=this.beans.colModel.getColDefCol(e),i=o?this.getOrCreateFilterWrapper(o,!0):null;return i?this.setModelOnFilterWrapper(i,t):$.resolve()}setColDefPropsForDataType(e,t,o){var d,g;let i=e.filter,r=i===!0?this.getDefaultFilterFromDataType(()=>t.baseDataType):i;if(typeof r!="string")return;let a,n,s=this.beans,{filterParams:l,filterValueGetter:c}=e;r==="agMultiColumnFilter"?{filterParams:a,filterValueGetter:n}=(g=(d=s.multiFilter)==null?void 0:d.getParamsForDataType(l,c,t,o))!=null?g:{}:{filterParams:a,filterValueGetter:n}=cx(r,l,c,t,o,s,this.getLocaleTextFunc()),e.filterParams=a,n&&(e.filterValueGetter=n)}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 $(i=>{if(e.isHandler){let a=e.column,n=a.getColId(),s=this.model[n];if(this.updateStoredModel(n,t),o&&t===s){i();return}this.refreshHandlerAndUi(a,t,"api").then(()=>i());return}let r=Ct(e);if(r){r.then(a=>{if(typeof(a==null?void 0:a.setModel)!="function"){k(65),i();return}(a.setModel(t)||$.resolve()).then(()=>i())});return}i()})}updateStoredModel(e,t){M(t)?this.model[e]=t:delete this.model[e];let o=this.state.get(e),i={model:t,state:o==null?void 0:o.state};this.state.set(e,i)}filterModified(e,t){var o;(o=this.getOrCreateFilterUi(e))==null||o.then(i=>{this.eventSvc.dispatchEvent({type:"filterModified",column:e,filterInstance:i,...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){var n,s;let i=e.getColId(),r=this.cachedFilter(e),a=()=>r==null?void 0:r.filterUi;Vl({action:t,filterParams:(n=r==null?void 0:r.filterUi)==null?void 0:n.filterParams,getFilterUi:a,getModel:()=>ie(this.model,i),getState:()=>this.state.get(i),updateState:l=>this.updateState(e,l),updateModel:l=>{var c,d;return(d=(c=a())==null?void 0:c.filterParams)==null?void 0:d.onModelChange(l,{...o,fromAction:t})},processModelToApply:r!=null&&r.isHandler?(s=r.handler.processModelToApply)==null?void 0:s.bind(r.handler):void 0})}updateAllModels(e,t){let o=[];this.allColumnFilters.forEach((i,r)=>{var n,s;let a=this.beans.colModel.getColDefCol(r);a&&Vl({action:e,filterParams:(n=i.filterUi)==null?void 0:n.filterParams,getFilterUi:()=>i.filterUi,getModel:()=>ie(this.model,r),getState:()=>this.state.get(r),updateState:l=>this.updateState(a,l),updateModel:l=>{this.updateStoredModel(r,l),this.dispatchLocalEvent({type:"filterAction",column:a,action:e}),o.push(this.refreshHandlerAndUi(a,l,"ui"))},processModelToApply:i!=null&&i.isHandler?(s=i.handler.processModelToApply)==null?void 0:s.bind(i.handler):void 0})}),o.length&&$.all(o).then(()=>{this.callOnFilterChangedOutsideRenderCycle({source:"columnFilter",additionalEventAttributes:t,columns:[]})})}updateOrRefreshFilterUi(e){let t=e.getColId();Hg(()=>{var o;return(o=this.cachedFilter(e))==null?void 0:o.filterUi},()=>ie(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(){var r;let{state:e,model:t,activeFilterComps:o}=this;for(let a of o)if(a.source==="COLUMN_MENU")return!1;let i=!1;for(let a of e.keys()){let n=e.get(a);if(n.valid===!1)return!1;((r=n.model)!=null?r:null)!==ie(t,a)&&(i=!0)}return i}hasUnappliedModel(e){var i,r;let{model:t,state:o}=this;return((r=(i=o.get(e))==null?void 0:i.model)!=null?r:null)!==ie(t,e)}setGlobalButtons(e){this.isGlobalButtons=e,this.dispatchLocalEvent({type:"filterGlobalButtons",isGlobal:e})}shouldKeepStateOnDetach(e,t){if(t==="newFiltersToolPanel")return!0;let o=this.beans.filterPanelSvc;return o!=null&&o.isActive?!!o.getState(e.getColId()):!1}onPivotModeChanged(e){let{colModel:t,pivotColsSvc:o}=this.beans,i=!!er(this.gos),r=e.currentValue,a=r?this.activeColumnFilters:this.activeAggregateFilters,n=r?this.activeAggregateFilters:this.activeColumnFilters,s=[];for(let l of a){let c=t.getColById(l.colId),d=r&&!!(o!=null&&o.columns.length);c&&r===Ul(c,r,d,i)&&(n.push(l),s.push(l))}pu(a,s)}destroy(){super.destroy(),this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"gridDestroyed")),this.allColumnListeners.clear(),this.state.clear(),this.activeFilterComps.clear()}};function mx(e){var t;return!!((t=e.filterManager)!=null&&t.isAnyFilterPresent())}function vx(e,t="api"){var o;(o=e.filterManager)==null||o.onFilterChanged({source:t})}var Cx=class extends S{constructor(){super(...arguments),this.beanName="filterManager",this.advFilterModelUpdateQueue=[]}wireBeans(e){this.quickFilter=e.quickFilter,this.advancedFilter=e.advancedFilter,this.colFilter=e.colFilter}postConstruct(){let e=this.refreshFiltersForAggregations.bind(this),t=this.updateAdvFilterColumns.bind(this);this.addManagedEventListeners({columnValueChanged:e,columnPivotChanged:e,columnPivotModeChanged:e,newColumnsLoaded:t,columnVisible:t,advancedFilterEnabledChanged:({enabled:i})=>this.onAdvFilterEnabledChanged(i),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"})});let{gos:o}=this;this.alwaysPassFilter=o.get("alwaysPassFilter"),this.addManagedPropertyListener("alwaysPassFilter",()=>{this.alwaysPassFilter=o.get("alwaysPassFilter"),this.onFilterChanged({source:"api"})})}isExternalFilterPresentCallback(){let e=this.gos.getCallback("isExternalFilterPresent");return typeof e=="function"&&e({})}doesExternalFilterPass(e){let t=this.gos.get("doesExternalFilterPass");return typeof t=="function"&&t(e)}setFilterState(e,t,o="api"){var i;this.isAdvFilterEnabled()||(i=this.colFilter)==null||i.setState(e,t,o)}setFilterModel(e,t="api",o){var i;if(this.isAdvFilterEnabled()){o||this.warnAdvFilters();return}(i=this.colFilter)==null||i.setModel(e,t)}getFilterModel(){var e,t;return(t=(e=this.colFilter)==null?void 0:e.getModel())!=null?t:{}}getFilterState(){var e;return(e=this.colFilter)==null?void 0:e.getState()}isColumnFilterPresent(){var e;return!!((e=this.colFilter)!=null&&e.isFilterPresent())}isAggregateFilterPresent(){var e;return!!((e=this.colFilter)!=null&&e.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){var t,o;e?(t=this.colFilter)!=null&&t.disableFilters()&&this.onFilterChanged({source:"advancedFilter"}):(o=this.advancedFilter)!=null&&o.isFilterPresent()&&(this.advancedFilter.setModel(null),this.onFilterChanged({source:"advancedFilter"}))}isAdvFilterEnabled(){var e;return!!((e=this.advancedFilter)!=null&&e.isEnabled())}isAdvFilterHeaderActive(){return this.isAdvFilterEnabled()&&this.advancedFilter.isHeaderActive()}refreshFiltersForAggregations(){er(this.gos)&&this.isAnyFilterPresent()&&this.onFilterChanged()}onFilterChanged(e={}){let{source:t,additionalEventAttributes:o,columns:i=[]}=e;this.externalFilterPresent=this.isExternalFilterPresentCallback(),(this.colFilter?this.colFilter.updateBeforeFilterChanged(e):$.resolve()).then(()=>{var a;let r={source:t,type:"filterChanged",columns:i};o&&he(r,o),this.eventSvc.dispatchEvent(r),(a=this.colFilter)==null||a.updateAfterFilterChanged()})}isSuppressFlashingCellsBecauseFiltering(){var e;return!!((e=this.colFilter)!=null&&e.isSuppressFlashingCellsBecauseFiltering())}isQuickFilterPresent(){var e;return!!((e=this.quickFilter)!=null&&e.isFilterPresent())}updateAggFiltering(){this.aggFiltering=!!er(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){var o;let{rowNode:t}=e;return(o=this.alwaysPassFilter)!=null&&o.call(this,t)?!0:!(this.isAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.isAggregateFilterPresent()&&!this.colFilter.doFiltersPass(t,e.colIdToSkip,!0))}doesRowPassFilter(e){var o;let{rowNode:t}=e;return(o=this.alwaysPassFilter)!=null&&o.call(this,t)?!0:!(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){var t;return this.isAdvFilterEnabled()?!1:!!((t=this.colFilter)!=null&&t.isFilterAllowed(e))}getAdvFilterModel(){return this.isAdvFilterEnabled()?this.advancedFilter.getModel():null}setAdvFilterModel(e,t="api"){var o;if(this.isAdvFilterEnabled()){if((o=this.beans.dataTypeSvc)!=null&&o.isPendingInference){this.advFilterModelUpdateQueue.push(e);return}this.advancedFilter.setModel(e!=null?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(){var e;return this.isAdvFilterEnabled()?!1:!!((e=this.colFilter)!=null&&e.hasFloatingFilters())}getColumnFilterInstance(e){var t,o;return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve(void 0)):(o=(t=this.colFilter)==null?void 0:t.getFilterInstance(e))!=null?o:Promise.resolve(void 0)}warnAdvFilters(){k(68)}setupAdvFilterHeaderComp(e){var t;(t=this.advancedFilter)==null||t.getCtrl().setupHeaderComp(e)}getHeaderRowCount(){return this.isAdvFilterHeaderActive()?1:0}getHeaderHeight(){return this.isAdvFilterHeaderActive()?this.advancedFilter.getCtrl().getHeaderHeight():0}processFilterModelUpdateQueue(){for(let e of this.advFilterModelUpdateQueue)this.setAdvFilterModel(e);this.advFilterModelUpdateQueue=[]}setColumnFilterModel(e,t){var o,i;return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve()):(i=(o=this.colFilter)==null?void 0:o.setModelForColumn(e,t))!=null?i:Promise.resolve()}};function wx(e){return{tag:"div",cls:e}}var bx=class extends _{constructor(e){let{className:t="ag-filter-apply-panel"}=e!=null?e:{};super(wx(t)),this.listeners=[],this.validationMessage=null,this.className=t}updateButtons(e,t){let o=this.buttons;if(this.buttons=e,o===e)return;let i=this.getGui();ne(i);let r;this.destroyListeners();let a=document.createDocumentFragment(),n=this.className,s=({type:c,label:d})=>{let g=v=>{this.dispatchLocalEvent({type:c,event:v})};["apply","clear","reset","cancel"].includes(c)||k(75);let u=c==="apply",p=oe({tag:"button",attrs:{type:u&&t?"submit":"button"},ref:`${c}FilterButton`,cls:`ag-button ag-standard-button ${n}-button${u?" "+n+"-apply-button":""}`,children:d});this.activateTabIndex([p]),u&&(r=p);let f=v=>{v.key===b.ENTER&&(v.preventDefault(),g(v))},m=this.listeners;p.addEventListener("click",g),m.push(()=>p.removeEventListener("click",g)),p.addEventListener("keydown",f),m.push(()=>p.removeEventListener("keydown",f)),a.append(p)};for(let c of e)s(c);this.eApply=r;let l=this.validationTooltipFeature;r&&!l?this.validationTooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{getGui:()=>this.eApply,getLocation:()=>"advancedFilter",getTooltipShowDelayOverride:()=>1e3})):!r&&l&&(this.validationTooltipFeature=this.destroyBean(l)),i.append(a)}getApplyButton(){return this.eApply}updateValidity(e,t=null){var i;let o=this.eApply;o&&(ai(o,!e),this.validationMessage=t,(i=this.validationTooltipFeature)==null||i.setTooltipAndRefresh(this.validationMessage))}destroyListeners(){for(let e of this.listeners)e();this.listeners=[]}destroy(){this.destroyListeners(),super.destroy()}};var yx=class extends _{constructor(e,t,o,i,r,a){super(),this.column=e,this.wrapper=t,this.eventParent=o,this.updateModel=i,this.isGlobalButtons=r,this.enableGlobalButtonCheck=a,this.hidePopup=null,this.applyActive=!1}postConstruct(){let{comp:e,params:t}=this.wrapper,o=t,i=o.useForm,r=i?"form":"div";this.setTemplate({tag:r,cls:"ag-filter-wrapper"}),i&&this.addManagedElementListeners(this.getGui(),{submit:a=>{a==null||a.preventDefault()},keydown:this.handleKeyDown.bind(this)}),this.appendChild(e.getGui()),this.params=o,this.resetButtonsPanel(o),this.addManagedListeners(this.eventParent,{filterParamsChanged:({column:a,params:n})=>{a===this.column&&this.resetButtonsPanel(n,this.params)},filterStateChanged:({column:a,state:n})=>{var s;a===this.column&&((s=this.eButtons)==null||s.updateValidity(n.valid!==!1))},filterAction:({column:a,action:n,event:s})=>{a===this.column&&this.afterAction(n,s)},...this.enableGlobalButtonCheck?{filterGlobalButtons:({isGlobal:a})=>{if(a!==this.isGlobalButtons){this.isGlobalButtons=a;let n=this.params;this.resetButtonsPanel(n,n,!0)}}}:void 0})}afterGuiAttached(e){e&&(this.hidePopup=e.hidePopup)}resetButtonsPanel(e,t,o){let{buttons:i,readOnly:r}=t!=null?t:{},{buttons:a,readOnly:n,useForm:s}=e;if(!o&&r===n&&oi(i,a))return;let l=a&&a.length>0&&!e.readOnly&&!this.isGlobalButtons,c=this.eButtons;if(l){let d=a.map(g=>{let u=`${g}Filter`;return{type:g,label:He(this,u)}});if(this.applyActive=Rr(this.params),!c){c=this.createBean(new bx),this.appendChild(c.getGui());let g=this.column,u=h=>({event:p})=>{this.updateModel(g,h,{fromButtons:!0}),this.afterAction(h,p)};c==null||c.addManagedListeners(c,{apply:u("apply"),clear:u("clear"),reset:u("reset"),cancel:u("cancel")}),this.eButtons=c}c.updateButtons(d,s)}else this.applyActive=!1,c&&(De(c.getGui()),this.eButtons=this.destroyBean(c))}close(e){let t=this.hidePopup;if(!t)return;let o=e,i=o==null?void 0:o.key,r;(i===b.ENTER||i===b.SPACE)&&(r={keyboardEvent:o}),t(r),this.hidePopup=null}afterAction(e,t){let{params:o,applyActive:i}=this,r=o==null?void 0:o.closeOnApply;switch(e){case"apply":{t==null||t.preventDefault(),r&&i&&this.close(t);break}case"reset":{r&&i&&this.close();break}case"cancel":{r&&this.close(t);break}}}handleKeyDown(e){!e.defaultPrevented&&e.key===b.ENTER&&this.applyActive&&(this.updateModel(this.column,"apply",{fromButtons:!0}),this.afterAction("apply",e))}destroy(){this.hidePopup=null,this.eButtons=this.destroyBean(this.eButtons)}},Sx=":where(.ag-menu:not(.ag-tabs) .ag-filter)>:not(.ag-filter-wrapper){min-width:180px}",xx={tag:"div",cls:"ag-filter"},kx=class extends _{constructor(e,t,o){super(xx),this.column=e,this.source=t,this.enableGlobalButtonCheck=o,this.wrapper=null}postConstruct(){var e;(e=this.beans.colFilter)==null||e.activeFilterComps.add(this),this.createFilter(!0),this.addManagedEventListeners({filterDestroyed:this.onFilterDestroyed.bind(this)})}hasFilter(){return this.wrapper!=null}getFilter(){var e,t;return(t=(e=this.wrapper)==null?void 0:e.then(o=>o.comp))!=null?t:null}afterInit(){var e,t;return(t=(e=this.wrapper)==null?void 0:e.then(()=>{}))!=null?t:$.resolve()}afterGuiAttached(e){var t;this.afterGuiAttachedParams=e,(t=this.wrapper)==null||t.then(o=>{var i,r,a;(i=this.comp)==null||i.afterGuiAttached(e),(a=(r=o==null?void 0:o.comp)==null?void 0:r.afterGuiAttached)==null||a.call(r,e)})}afterGuiDetached(){var e;(e=this.wrapper)==null||e.then(t=>{var o,i;(i=(o=t==null?void 0:t.comp)==null?void 0:o.afterGuiDetached)==null||i.call(o)})}createFilter(e){var a;let{column:t,source:o,beans:{colFilter:i}}=this,r=(a=i.getFilterUiForDisplay(t))!=null?a:null;this.wrapper=r,r==null||r.then(n=>{var d;if(!n)return;let{isHandler:s,comp:l}=n,c;if(s){let g=!!this.enableGlobalButtonCheck,u=this.createBean(new yx(t,n,i,i.updateModel.bind(i),g&&i.isGlobalButtons,g));this.comp=u,c=u.getGui()}else this.registerCSS(Sx),c=l.getGui(),M(c)||k(69,{guiFromFilter:c});this.appendChild(c),e?this.eventSvc.dispatchEvent({type:"filterOpened",column:t,source:o,eGui:this.getGui()}):(d=l.afterGuiAttached)==null||d.call(l,this.afterGuiAttachedParams)})}onFilterDestroyed(e){let{source:t,column:o}=e;(t==="api"||t==="paramsUpdated")&&o.getId()===this.column.getId()&&this.beans.colModel.getColDefCol(this.column)&&(ne(this.getGui()),this.comp=this.destroyBean(this.comp),this.createFilter())}destroy(){var e;(e=this.beans.colFilter)==null||e.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()}},Rx=class extends S{constructor(){super(...arguments),this.beanName="filterMenuFactory"}wireBeans(e){this.popupSvc=e.popupSvc}hideActiveMenu(){var e;(e=this.hidePopup)==null||e.call(this)}showMenuAfterMouseEvent(e,t,o,i){e&&!e.isColumn||this.showPopup(e,r=>{var a;(a=this.popupSvc)==null||a.positionPopupUnderMouseEvent({additionalParams:{column:e},type:o,mouseEvent:t,ePopup:r})},o,t.target,be(this.gos),i)}showMenuAfterButtonClick(e,t,o,i){if(e&&!e.isColumn)return;let r=-1,a="left",n=be(this.gos);!n&&this.gos.get("enableRtl")&&(r=1,a="right");let s=n?void 0:4*r,l=n?void 0:4;this.showPopup(e,c=>{var d;(d=this.popupSvc)==null||d.positionPopupByComponent({type:o,eventSource:t,ePopup:c,nudgeX:s,nudgeY:l,alignSide:a,keepWithinBounds:!0,position:"under",additionalParams:{column:e}})},o,t,n,i)}showPopup(e,t,o,i,r,a){var f;let n=e?this.createBean(new kx(e,"COLUMN_MENU")):void 0;if(this.activeMenu=n,!(n!=null&&n.hasFilter())||!e){W(57);return}let s=oe({tag:"div",cls:`ag-menu${r?"":" ag-filter-menu"}`,role:"presentation"});[this.tabListener]=this.addManagedElementListeners(s,{keydown:m=>this.trapFocusWithin(m,s)}),s.appendChild(n==null?void 0:n.getGui());let l,c=()=>n==null?void 0:n.afterGuiDetached(),d=Oh(this.gos)?i!=null?i:this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody:void 0,g=m=>{Nl(e,!1,"contextMenu");let v=m instanceof KeyboardEvent;if(this.tabListener&&(this.tabListener=this.tabListener()),v&&i&&Ie(i)){let C=od(i);C==null||C.focus({preventScroll:!0})}c(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,o,e),a==null||a()},u=this.getLocaleTextFunc(),h=r&&o!=="columnFilter"?u("ariaLabelColumnMenu","Column Menu"):u("ariaLabelColumnFilter","Column Filter"),p=(f=this.popupSvc)==null?void 0:f.addPopup({modal:!0,eChild:s,closeOnEsc:!0,closedCallback:g,positionCallback:()=>t(s),anchorToElement:d,ariaLabel:h});p&&(this.hidePopup=l=p.hideFunc),n.afterInit().then(()=>{t(s),n.afterGuiAttached({container:o,hidePopup:l})}),Nl(e,!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,o,e)}trapFocusWithin(e,t){e.key!==b.TAB||e.defaultPrevented||no(this.beans,t,!1,e.shiftKey)||(e.preventDefault(),Jt(t,e.shiftKey))}dispatchVisibleChangedEvent(e,t,o){this.eventSvc.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:!1,key:t,column:o!=null?o:null,columnGroup:null})}isMenuEnabled(e){var t;return e.isFilterAllowed()&&((t=e.getColDef().menuTabs)!=null?t:["filterMenuTab"]).includes("filterMenuTab")}showMenuAfterContextMenuEvent(){}destroy(){this.destroyBean(this.activeMenu),super.destroy()}},Ex=class extends S{constructor(){super(...arguments),this.beanName="filterValueSvc"}getValue(e,t,o){var c;if(!t)return;let i=e.getColDef(),{selectableFilter:r,valueSvc:a,formula:n}=this.beans,s=(c=o!=null?o:r==null?void 0:r.getFilterValueGetter(e.getColId()))!=null?c:i.filterValueGetter;if(s)return this.executeFilterValueGetter(s,t.data,e,t,i);let l=a.getValue(e,t,"data");return e.isAllowFormula()&&(n!=null&&n.isFormula(l))?n.resolveValue(e,t):l}executeFilterValueGetter(e,t,o,i,r){let{expressionSvc:a,valueSvc:n}=this.beans,s=O(this.gos,{data:t,node:i,column:o,colDef:r,getValue:n.getValueCallback.bind(n,i)});return typeof e=="function"?e(s):a==null?void 0:a.evaluate(e,s)}},Fx={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eFloatingFilterText"}]},Dx=class extends _{constructor(){super(Fx,[Tr]),this.eFloatingFilterText=E}init(e){this.params=e;let 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")){let o=e,i=o.getHandler();if(i.getModelAsString){let r=i.getModelAsString(o.model);this.eFloatingFilterText.setValue(r)}}}onParentModelChanged(e){if(e==null){this.eFloatingFilterText.setValue("");return}this.params.parentFilterInstance(t=>{if(t.getModelAsString){let o=t.getModelAsString(e);this.eFloatingFilterText.setValue(o)}})}refresh(e){this.init(e)}},Mx=class extends Vn{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){let t=this.eInput;e.selected&&e.name&&t.name&&t.name===e.name&&e.id&&t.id!==e.id&&this.setValue(!1,!0)}};var Jn=class{constructor(){this.customFilterOptions={}}init(e,t){var o;this.filterOptions=(o=e.filterOptions)!=null?o:t,this.mapCustomOptions(),this.defaultOption=this.getDefaultItem(e.defaultOption)}refresh(e,t){var i;let o=(i=e.filterOptions)!=null?i:t;this.filterOptions!==o&&(this.filterOptions=o,this.customFilterOptions={},this.mapCustomOptions()),this.defaultOption=this.getDefaultItem(e.defaultOption)}mapCustomOptions(){let{filterOptions:e}=this;if(e)for(let t of e){if(typeof t=="string")continue;let o=[["displayKey"],["displayName"],["predicate","test"]],i=r=>r.some(a=>t[a]!=null)?!0:(k(72,{keys:r}),!1);if(!o.every(i)){this.filterOptions=e.filter(r=>r===t)||[];continue}this.customFilterOptions[t.displayKey]=t}}getDefaultItem(e){let{filterOptions:t}=this;if(e)return e;if(t.length>=1){let o=t[0];if(typeof o=="string")return o;if(o.displayKey)return o.displayKey;k(73)}else k(74)}getCustomOption(e){return this.customFilterOptions[e]}};function ti(e,t,o){return o==null?e.splice(t):e.splice(t,o)}function wr(e){return e==null||typeof e=="string"&&e.trim().length===0}function Px(e){return e==="AND"||e==="OR"?e:"AND"}function Ix(e,t,o){if(e==null)return;let{predicate:i}=e;if(i!=null&&!t.some(r=>r==null))return i(t,o)}function Tx(e,t){let o=e.length;return o>t&&(e.splice(t),k(78),o=t),o}var Ax=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 Pt(e,t){let o=t.getCustomOption(e);if(o){let{numberOfInputs:i}=o;return i!=null?i:1}return e&&Ax.has(e)?0:e==="inRange"?2:1}var zr=class extends tf{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);let t=new Jn;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=Px(e.defaultJoinOperator),this.filterPlaceholder=e.filterPlaceholder,this.createFilterListOptions(),we(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)=>{let i=o===0?e:this.optionsFactory.defaultOption;t.setValue(i,!0)})}getModelFromUi(){let e=this.getUiCompleteConditions();return e.length===0?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(){let{eJoinOrs:e,defaultJoinOperator:t}=this;return e.length===0?t:e[0].getValue()===!0?"OR":"AND"}areNonNullModelsEqual(e,t){let o=!e.operator,i=!t.operator;if(!o&&i||o&&!i)return!1;let a;if(o){let n=e,s=t;a=this.areSimpleModelsEqual(n,s)}else{let n=e,s=t;a=n.operator===s.operator&&It(n.conditions,s.conditions,(l,c)=>this.areSimpleModelsEqual(l,c))}return a}setModelIntoUi(e,t){if(e==null)return this.resetUiToDefaults(t),$.resolve();if(e.operator){let i=e,r=i.conditions;r==null&&(r=[],k(77));let a=Tx(r,this.maxNumConditions),n=this.getNumConditions();if(an)for(let l=n;ll.setValue(!s,!0)),this.eJoinOrs.forEach(l=>l.setValue(s,!0)),r.forEach((l,c)=>{this.eTypes[c].setValue(l.type,!0),this.setConditionIntoUi(l,c)})}else{let i=e;this.getNumConditions()>1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(i.type,!0),this.setConditionIntoUi(i,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.updateUiVisibility(),t||this.params.onUiChange(this.getUiChangeEventParams()),$.resolve()}setNumConditions(e){var i,r;let t=(i=e.maxNumConditions)!=null?i:2;t<1&&(k(79),t=1),this.maxNumConditions=t;let o=(r=e.numAlwaysVisibleConditions)!=null?r:1;o<1&&(k(80),o=1),o>t&&(k(81),o=t),this.numAlwaysVisibleConditions=o}createOption(){let e=this.getGui(),t=this.createManagedBean(new Zn);this.eTypes.push(t),t.addCss("ag-filter-select"),e.appendChild(t.getGui());let o=this.createEValue();this.eConditionBodies.push(o),e.appendChild(o),this.putOptionsIntoDropdown(t),this.resetType(t);let i=this.getNumConditions()-1;this.forEachPositionInput(i,r=>this.resetInput(r)),this.addChangedListeners(t,i)}createJoinOperatorPanel(){let e=oe({tag:"div",cls:"ag-filter-condition"});this.eJoinPanels.push(e);let t=this.createJoinOperator(this.eJoinAnds,e,"and"),o=this.createJoinOperator(this.eJoinOrs,e,"or");this.getGui().appendChild(e);let i=this.eJoinPanels.length-1,r=this.joinOperatorId++;this.resetJoinOperatorAnd(t,i,r),this.resetJoinOperatorOr(o,i,r),this.isReadOnly()||(t.onValueChange(this.listener),o.onValueChange(this.listener))}createJoinOperator(e,t,o){let i=this.createManagedBean(new Mx);e.push(i);let r="ag-filter-condition-operator";return i.addCss(r),i.addCss(`${r}-${o}`),t.appendChild(i.getGui()),i}createFilterListOptions(){this.filterListOptions=this.optionsFactory.filterOptions.map(e=>typeof e=="string"?this.createBoilerplateListOption(e):this.createCustomListOption(e))}putOptionsIntoDropdown(e){let{filterListOptions:t}=this;for(let o of t)e.addOption(o);e.setDisabled(t.length<=1)}createBoilerplateListOption(e){return{value:e,text:this.translate(e)}}createCustomListOption(e){let{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(){let e=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,e)}updateNumConditions(){var o;let e=-1,t=!0;for(let i=0;i0&&this.removeConditionsAndOperators(r,a),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=e}updateConditionStatusesAndValues(e,t){this.eTypes.forEach((i,r)=>{let a=this.isConditionDisabled(r,e);i.setDisabled(a||this.filterListOptions.length<=1),r===1&&(ai(this.eJoinPanels[0],a),this.eJoinAnds[0].setDisabled(a),this.eJoinOrs[0].setDisabled(a))}),this.eConditionBodies.forEach((i,r)=>{q(i,this.isConditionBodyVisible(r))});let o=(t!=null?t:this.getJoinOperator())==="OR";for(let i of this.eJoinAnds)i.setValue(!o,!0);for(let i of this.eJoinOrs)i.setValue(o,!0);this.forEachInput((i,r,a,n)=>{this.setElementDisplayed(i,r=this.getNumConditions())return;let{eTypes:o,eConditionBodies:i,eJoinPanels:r,eJoinAnds:a,eJoinOrs:n}=this;this.removeComponents(o,e,t),this.removeElements(i,e,t),this.removeEValues(e,t);let s=Math.max(e-1,0);this.removeElements(r,s,t),this.removeComponents(a,s,t),this.removeComponents(n,s,t)}removeElements(e,t,o){let i=ti(e,t,o);for(let r of i)De(r)}removeComponents(e,t,o){let i=ti(e,t,o);for(let r of i)De(r.getGui()),this.destroyBean(r)}afterGuiAttached(e){var t;if(super.afterGuiAttached(e),this.resetPlaceholder(),!(e!=null&&e.suppressFocus)){let o;if(!this.isReadOnly()){let i=this.getInputs(0)[0];i instanceof Gt&&this.isConditionBodyVisible(0)?o=i.getInputElement():o=(t=this.eTypes[0])==null?void 0:t.getFocusableElement()}(o!=null?o:this.getGui()).focus({preventScroll:!0})}}shouldKeepInvalidInputState(){return!1}afterGuiDetached(){var n;super.afterGuiDetached();let e=this.params;if((n=this.beans.colFilter)!=null&&n.shouldKeepStateOnDetach(e.column)||this.shouldKeepInvalidInputState())return;e.onStateChange({model:e.model});let t=-1,o=-1,i=!1,r=this.getJoinOperator();for(let s=this.getNumConditions()-1;s>=0;s--)if(this.isConditionUiComplete(s))t===-1&&(t=s,o=s);else{let l=s>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(s-1),c=s{if(!(i instanceof Gt))return;let s=r===0&&n>1?"inRangeStart":r===0?"filterOoo":"inRangeEnd",l=r===0&&n>1?e("ariaFilterFromValue","Filter from value"):r===0?e("ariaFilterValue","Filter Value"):e("ariaFilterToValue","Filter to Value"),c=o[a].getValue(),d=nd(this,t,s,c);i.setInputPlaceholder(d),i.setInputAriaLabel(l)})}setElementValue(e,t,o){e instanceof Gt&&e.setValue(t!=null?String(t):null,!0)}setElementDisplayed(e,t){Ps(e)&&q(e.getGui(),t)}setElementDisabled(e,t){Ps(e)&&ai(e.getGui(),t)}attachElementOnChange(e,t){e instanceof Gt&&e.onValueChange(t)}forEachInput(e){this.getConditionTypes().forEach((t,o)=>{this.forEachPositionTypeInput(o,t,e)})}forEachPositionInput(e,t){let o=this.getConditionType(e);this.forEachPositionTypeInput(e,o,t)}forEachPositionTypeInput(e,t,o){let i=Pt(t,this.optionsFactory),r=this.getInputs(e);for(let a=0;at+1}isConditionBodyVisible(e){let t=this.getConditionType(e);return Pt(t,this.optionsFactory)>0}isConditionUiComplete(e){return!(e>=this.getNumConditions()||this.getConditionType(e)==="empty"||this.getValues(e).some(o=>o==null)||this.positionHasInvalidInputs(e))}getNumConditions(){return this.eTypes.length}getUiCompleteConditions(){let e=[];for(let t=0;tthis.resetType(t)),this.eJoinAnds.forEach((t,o)=>this.resetJoinOperatorAnd(t,o,this.joinOperatorId+o)),this.eJoinOrs.forEach((t,o)=>this.resetJoinOperatorOr(t,o,this.joinOperatorId+o)),this.joinOperatorId++,this.forEachInput(t=>this.resetInput(t)),this.resetPlaceholder(),this.createMissingConditionsAndOperators(),this.lastUiCompletePosition=null,this.updateUiVisibility(),e||this.params.onUiChange(this.getUiChangeEventParams())}resetType(e){let o=this.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator");e.setValue(this.optionsFactory.defaultOption,!0).setAriaLabel(o).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)}resetJoinOperatorAnd(e,t,o){this.resetJoinOperator(e,t,this.defaultJoinOperator==="AND",this.translate("andCondition"),o)}resetJoinOperatorOr(e,t,o){this.resetJoinOperator(e,t,this.defaultJoinOperator==="OR",this.translate("orCondition"),o)}resetJoinOperator(e,t,o,i,r){this.updateJoinOperatorDisabled(e.setValue(o,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${r}`).setLabel(i),t)}updateJoinOperatorsDisabled(){let e=(t,o)=>this.updateJoinOperatorDisabled(t,o);this.eJoinAnds.forEach(e),this.eJoinOrs.forEach(e)}updateJoinOperatorDisabled(e,t){e.setDisabled(this.isReadOnly()||t>0)}resetInput(e){this.setElementValue(e,null),this.setElementDisabled(e,this.isReadOnly())}setConditionIntoUi(e,t){let o=this.mapValuesFromModel(e,this.optionsFactory);this.forEachInput((i,r,a)=>{a===t&&this.setElementValue(i,o[r]!=null?o[r]:null)})}setValueFromFloatingFilter(e){this.forEachInput((t,o,i)=>{this.setElementValue(t,o===0&&i===0?e:null,!0)})}addChangedListeners(e,t){this.isReadOnly()||(e.onValueChange(this.listener),this.forEachPositionInput(t,o=>{this.attachElementOnChange(o,this.listener)}))}hasInvalidInputs(){return!1}positionHasInvalidInputs(e){return!1}isReadOnly(){return!!this.params.readOnly}},Xn=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];function tn(e){var t;return(t=e==null?void 0:e.allowedCharPattern)!=null?t:null}function Bg(e,t){let{filter:o,filterTo:i,type:r}=e||{};return[Se(o),Se(i)].slice(0,Pt(r,t))}var zx=class extends zr{constructor(){super("bigintFilter",Bg,Xn),this.eValuesFrom=[],this.eValuesTo=[],this.filterType="bigint",this.defaultDebounceMs=500}afterGuiAttached(e){super.afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!Mo()&&this.hasInvalidInputs()&&this.getConditionTypes().includes("inRange")}refreshInputValidation(){for(let e=0;e0&&this.beans.ariaAnnounce.announceValue(u,"dateFilter")}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){var o,i;return((o=e==null?void 0:e.isInvalid)!=null?o:!1)===((i=t==null?void 0:t.isInvalid)!=null?i:!1)}refresh(e){let t=super.refresh(e),{state:o,additionalEventAttributes:i}=e,r=this.state,a=i==null?void 0:i.fromAction;return(a&&a!="apply"||o.model!==r.model||!this.areStatesEqual(o.state,r.state))&&this.refreshInputValidation(),t}setElementValue(e,t,o){super.setElementValue(e,t,o),t===null&&e.setCustomValidity("")}createEValue(){let{params:e,eValuesFrom:t,eValuesTo:o}=this,i=tn(e),r=oe({tag:"div",cls:"ag-filter-body",role:"presentation"}),a=this.createFromToElement(r,t,"from",i),n=this.createFromToElement(r,o,"to",i),s=(d,g,u)=>()=>this.refreshInputPairValidation(d,g,u),l=s(a,n,!0);a.onValueChange(l),a.addGuiEventListener("focusin",l);let c=s(a,n,!1);return n.onValueChange(c),n.addGuiEventListener("focusin",c),r}createFromToElement(e,t,o,i){let r=this.createManagedBean(i?new ut({allowedCharPattern:i}):new ut);return r.addCss(`ag-filter-${o}`),r.addCss("ag-filter-filter"),t.push(r),e.appendChild(r.getGui()),r}removeEValues(e,t){let o=i=>this.removeComponents(i,e,t);o(this.eValuesFrom),o(this.eValuesTo)}getValues(e){let t=[];return this.forEachPositionInput(e,(o,i,r,a)=>{var n;i0&&(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){let{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,o=>t||(t=!o.getInputElement().validity.valid)),t}canApply(e){return!this.hasInvalidInputs()}getParsedValue(e,t){let o=e.getValue();return o==null||typeof o=="string"&&o.trim()===""?null:t?t(o):Se(o)}isInvalidValue(e,t){let o=e.getValue();return o!=null&&String(o).trim()!==""&&t===null}};function Lx(e,t,o){return e!=null&&t!=null&&e>=t?`strict${o?"Max":"Min"}ValueValidation`:null}var Vg=class extends S{constructor(e,t){super(),this.mapValuesFromModel=e,this.defaultOptions=t}init(e){let t=e.filterParams,o=new Jn;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(e.source==="colDef"){let 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){var n;let t=e.model;if(t==null)return!0;let{operator:o}=t,i=[];if(o){let s=t;i.push(...(n=s.conditions)!=null?n:[])}else i.push(t);let r=o&&o==="OR"?"some":"every",a=this.params.getValue(e.node);return i[r](s=>this.individualConditionPasses(e,s,a))}getModelAsString(e,t){var o;return(o=this.filterModelFormatter.getModelAsString(e,t))!=null?o:""}validateModel(e){var d;let{model:t,filterParams:{filterOptions:o,maxNumConditions:i}}=e;if(t==null)return;let a=Yc(t)?t.conditions:[t],n=(d=o==null?void 0:o.map(g=>typeof g=="string"?g:g.displayKey))!=null?d:this.defaultOptions;if(!(!a||a.every(g=>n.find(u=>u===g.type)!==void 0))){this.params={...e,model:null},e.onModelChange(null);return}let l=!1,c=this.filterType;if((a&&!a.every(g=>g.filterType===c)||t.filterType!==c)&&(a=a.map(g=>({...g,filterType:c})),l=!0),typeof i=="number"&&a&&a.length>i&&(a=a.slice(0,i),l=!0),l){let g=a.length>1?{...t,filterType:c,conditions:a}:{...a[0],filterType:c};this.params={...e,model:g},e.onModelChange(g)}}individualConditionPasses(e,t,o){let i=this.optionsFactory,r=this.mapValuesFromModel(t,i),a=i.getCustomOption(t.type),n=Ix(a,r,o);return n!=null?n:o==null?this.evaluateNullValue(t.type):this.evaluateNonNullValue(r,o,t,e)}},es=class extends Vg{evaluateNullValue(e){let{includeBlanksInEquals:t,includeBlanksInNotEqual:o,includeBlanksInGreaterThan:i,includeBlanksInLessThan:r,includeBlanksInRange:a}=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(r)return!0;break;case"inRange":if(a)return!0;break;case"blank":return!0;case"notBlank":return!1}return!1}evaluateNonNullValue(e,t,o){let i=o.type;if(!this.isValid(t))return i==="notEqual"||i==="notBlank";let r=this.comparator(),a=e[0]!=null?r(e[0],t):0;switch(i){case"equals":return a===0;case"notEqual":return a!==0;case"greaterThan":return a>0;case"greaterThanOrEqual":return a>=0;case"lessThan":return a<0;case"lessThanOrEqual":return a<=0;case"inRange":{let n=r(e[1],t);return this.params.filterParams.inRangeInclusive?a>=0&&n<=0:a>0&&n<0}case"blank":return wr(t);case"notBlank":return!wr(t);default:return k(76,{filterModelType:i}),!0}}},ts={equals:"Equals",notEqual:"NotEqual",greaterThan:"GreaterThan",greaterThanOrEqual:"GreaterThanOrEqual",lessThan:"LessThan",lessThanOrEqual:"LessThanOrEqual",inRange:"InRange"},Ox={contains:"Contains",notContains:"NotContains",equals:"TextEquals",notEqual:"TextNotEqual",startsWith:"StartsWith",endsWith:"EndsWith",inRange:"InRange"},Lr=class extends S{constructor(e,t,o){super(),this.optionsFactory=e,this.filterParams=t,this.valueFormatter=o}getModelAsString(e,t){var a;let o=this.getLocaleTextFunc(),i=t==="filterToolPanel";if(!e)return i?He(this,"filterSummaryInactive"):null;if(e.operator!=null){let n=e,l=((a=n.conditions)!=null?a:[]).map(d=>this.getModelAsString(d,t)),c=n.operator==="AND"?"andCondition":"orCondition";return l.join(` ${He(this,c)} `)}else{if(e.type==="blank"||e.type==="notBlank")return i?He(this,e.type==="blank"?"filterSummaryBlank":"filterSummaryNotBlank"):o(e.type,e.type);{let n=e,s=this.optionsFactory.getCustomOption(n.type),{displayKey:l,displayName:c,numberOfInputs:d}=s||{};return l&&c&&d===0?o(l,c):this.conditionToString(n,i,n.type==="inRange"||d===2,l,c)}}}updateParams(e){let{optionsFactory:t,filterParams:o}=e;this.optionsFactory=t,this.filterParams=o}conditionForToolPanel(e,t,o,i,r,a){let n,s=this.getTypeKey(e);return s&&(n=He(this,s)),r&&a&&(n=this.getLocaleTextFunc()(r,a)),n!=null?t?`${n} ${He(this,"filterSummaryInRangeValues",[o(),i()])}`:`${n} ${o()}`:null}getTypeKey(e){let t=this.filterTypeKeys[e];return t?`filterSummary${t}`:null}formatValue(e){var o;let t=this.valueFormatter;return t?(o=t(e!=null?e:null))!=null?o:"":String(e)}},Ng=class extends Lr{constructor(e,t){super(e,t,t.bigintFormatter),this.filterTypeKeys=ts}conditionToString(e,t,o,i,r){let{filter:a,filterTo:n,type:s}=e,l=this.formatValue.bind(this),c=Se(a),d=Se(n);if(t){let g=this.conditionForToolPanel(s,o,()=>l(c),()=>l(d),i,r);if(g!=null)return g}return o?`${l(c)}-${l(d)}`:a!=null?l(c):`${s}`}},Hx=class extends es{constructor(){super(Bg,Xn),this.filterType="bigint",this.FilterModelFormatterClass=Ng}comparator(){return(e,t)=>e===t?0:e{}}setupGui(e){var i;this.eInput=this.createManagedBean(new ut((i=this.params)==null?void 0:i.config));let t=this.eInput.getGui();e.appendChild(t);let o=r=>this.onValueChanged(r);this.addManagedListeners(t,{input:o,keydown:o})}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}){let{eInput:i}=this;i.setInputAriaLabel(e),t!==void 0&&i.setAutoComplete(t),i.toggleCss("ag-floating-filter-search-icon",!!o),i.setInputPlaceholder(o)}};function on(e){let t=e==null?void 0:e.trim();return t===""?e:t}function Gg(e,t){let{filter:o,filterTo:i,type:r}=e||{};return[o||null,i||null].slice(0,Pt(r,t))}var Wg=class extends _{constructor(){super(...arguments),this.defaultDebounceMs=0}setLastTypeFromModel(e){if(!e){this.lastType=this.optionsFactory.defaultOption;return}let t=e.operator,o;t?o=e.conditions[0]:o=e,this.lastType=o.type}canWeEditAfterModelFromParentFilter(e){if(!e)return this.isTypeEditable(this.lastType);if(e.operator)return!1;let o=e;return this.isTypeEditable(o.type)}init(e){this.params=e;let t=this.gos.get("enableFilterHandlers");if(this.reactive=t,this.setParams(e),t){let o=e;this.onModelUpdated(o.model)}}setParams(e){let t=new Jn;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){let o=this.optionsFactory.defaultOption;t||(this.lastType=o),this.readOnly=!!e.filterParams.readOnly;let i=this.isTypeEditable(o);this.setEditable(i)}refresh(e){this.params=e;let t=e,o=this.reactive;if((!o||t.source==="colDef")&&this.updateParams(e),o){let{source:i,model:r}=t;if(i==="dataChanged"||i==="ui")return;this.onModelUpdated(r)}}updateParams(e){let t=this.optionsFactory;t.refresh(e.filterParams,this.defaultOptions),this.setSimpleParams(e),this.filterModelFormatter.updateParams({optionsFactory:t,filterParams:e.filterParams})}onParentModelChanged(e,t){t!=null&&t.afterFloatingFilter||t!=null&&t.afterDataChange||this.onModelUpdated(e)}isTypeEditable(e){return!!e&&!this.readOnly&&Pt(e,this.optionsFactory)===1}getAriaLabel(e){return`${this.beans.colNames.getDisplayNameForColumn(e,"header",!0)} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`}},Bx={tag:"div",ref:"eFloatingFilterInputContainer",cls:"ag-floating-filter-input",role:"presentation"},is=class extends Wg{constructor(){super(...arguments),this.eFloatingFilterInputContainer=E,this.defaultDebounceMs=500}postConstruct(){this.setTemplate(Bx)}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){var g;let{inputSvc:t,defaultDebounceMs:o,readOnly:i}=this,{filterPlaceholder:r,column:a,browserAutoComplete:n,filterParams:s}=e,l=(g=this.lastType)!=null?g:this.optionsFactory.defaultOption,c=e.filterParams.filterPlaceholder,d=r===!0?nd(this,c,"filterOoo",l):r||void 0;if(t.setParams({ariaLabel:this.getAriaLabel(a),autoComplete:n!=null?n:!1,placeholder:d}),this.applyActive=Rr(s),!i){let u=En(s,o);t.setValueChangedListener(re(this,this.syncUpWithParentFilter.bind(this),u))}}updateParams(e){super.updateParams(e),this.setTextInputParams(e)}recreateFloatingFilterInputService(e){let{inputSvc:t}=this,o=t.getValue();ne(this.eFloatingFilterInputContainer),this.destroyBean(t),this.setupFloatingFilterInputService(e),t.setValue(o,!0)}syncUpWithParentFilter(e){let t=e.key===b.ENTER,o=this.reactive;if(o&&this.params.onUiChange(),this.applyActive&&!t)return;let{inputSvc:i,params:r,lastType:a}=this,n=i.getValue();if(r.filterParams.trimInput&&(n=on(n),i.setValue(n,!0)),o){let s=r,l=s.model,c=this.convertValue(n),d=c==null?null:{...l!=null?l:{filterType:this.filterType,type:a!=null?a:this.optionsFactory.defaultOption},filter:c};s.onModelChange(d,{afterFloatingFilter:!0})}else r.parentFilterInstance(s=>{s==null||s.onFloatingFilterChanged(a||null,n||null)})}convertValue(e){return e||null}setEditable(e){this.inputSvc.setEditable(e)}},Vx=class extends is{constructor(){super(...arguments),this.FilterModelFormatterClass=Ng,this.filterType="bigint",this.defaultOptions=Xn}updateParams(e){let t=e.filterParams;tn(t)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),this.bigintParser=t==null?void 0:t.bigintParser,super.updateParams(e)}createFloatingFilterInputService(e){let t=e.filterParams;this.allowedCharPattern=tn(t),this.bigintParser=t==null?void 0:t.bigintParser;let o=this.allowedCharPattern?{allowedCharPattern:this.allowedCharPattern}:void 0;return this.createManagedBean(new os({config:o}))}convertValue(e){return e==null||e===""?null:this.bigintParser?this.bigintParser(e):Se(e)}},jl=".ag-input-field-input",qg=class{constructor(e,t,o,i,r,a){this.context=e,this.eParent=r,this.alive=!0,this.debouncedReport=re({isAlive:()=>this.alive},Kl,500),this.timeoutHandle=null;let n=Gp(t,o,i);n==null||n.newAgStackInstance().then(s=>{var d,g;if(!this.alive){e.destroyBean(s);return}if(this.dateComp=s,!s)return;r.appendChild(s.getGui()),(d=s==null?void 0:s.afterGuiAttached)==null||d.call(s);let{tempValue:l,disabled:c}=this;l&&s.setDate(l),c!=null&&((g=s.setDisabled)==null||g.call(s,c)),a==null||a(this)})}destroy(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)}getDate(){return this.dateComp?this.dateComp.getDate():this.tempValue}setDate(e){let t=this.dateComp;t?t.setDate(e):this.tempValue=e}setDisabled(e){var o;let t=this.dateComp;t?(o=t.setDisabled)==null||o.call(t,e):this.disabled=e}setDisplayed(e){q(this.eParent,e)}setInputPlaceholder(e){var t,o;(o=(t=this.dateComp)==null?void 0:t.setInputPlaceholder)==null||o.call(t,e)}setInputAriaLabel(e){var t,o;(o=(t=this.dateComp)==null?void 0:t.setInputAriaLabel)==null||o.call(t,e)}afterGuiAttached(e){var t,o;(o=(t=this.dateComp)==null?void 0:t.afterGuiAttached)==null||o.call(t,e)}updateParams(e){var t,o;(o=(t=this.dateComp)==null?void 0:t.refresh)==null||o.call(t,e)}setCustomValidity(e,t=!1){var i;let o=(i=this.dateComp)==null?void 0:i.getGui().querySelector(jl);if(o&&"setCustomValidity"in o){let r=e.length>0;o.setCustomValidity(e),r?t?this.timeoutHandle=this.debouncedReport(o):Kl(o):this.timeoutHandle&&window.clearTimeout(this.timeoutHandle),gn(o,r)}}getValidity(){var e,t;return(t=(e=this.dateComp)==null?void 0:e.getGui().querySelector(jl))==null?void 0:t.validity}};function Kl(e){e.reportValidity()}var rs=["equals","notEqual","lessThan","greaterThan","inRange","blank","notBlank"];function _g(e,t){let{dateFrom:o,dateTo:i,type:r}=e||{};return[o&&me(o,void 0,!0)||null,i&&me(i,void 0,!0)||null].slice(0,Pt(r,t))}var $l=1e3,Yl=1/0,Nx=class extends zr{constructor(){super("dateFilter",_g,rs),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=$l,this.maxValidYear=Yl,this.minValidDate=null,this.maxValidDate=null,this.filterType="date"}afterGuiAttached(e){super.afterGuiAttached(e),this.dateConditionFromComps[0].afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!Mo()&&this.hasInvalidInputs()&&this.getConditionTypes().includes("inRange")}commonUpdateSimpleParams(e){super.commonUpdateSimpleParams(e);let t=(l,c)=>{let d=e[l];if(d!=null)if(isNaN(d))k(82,{param:l});else return d==null?c:Number(d);return c},o=t("minValidYear",$l),i=t("maxValidYear",Yl);this.minValidYear=o,this.maxValidYear=i,o>i&&k(83);let{minValidDate:r,maxValidDate:a}=e,n=r instanceof Date?r:me(r);this.minValidDate=n;let s=a instanceof Date?a:me(a);this.maxValidDate=s,n&&s&&n>s&&k(84)}refreshInputValidation(){for(let e=0;e=2?Gx(c,d,t):null,u=g?this.translate(g,[String(t?d:c)]):"",h=!Mo()&&!o;(t?n:s).setCustomValidity(u,h),(t?s:n).setCustomValidity("",h),u.length>0&&a.ariaAnnounce.announceValue(u,"dateFilter")}createDateCompWrapper(e,t,o){let{beans:{userCompFactory:i,context:r,gos:a},params:n}=this,s=o==="from",l=new qg(r,i,n.colDef,O(a,{onDateChanged:()=>{this.refreshInputPairValidation(t,s),this.onUiChanged()},onFocusIn:()=>this.refreshInputPairValidation(t,s),filterParams:n,location:"filter"}),e);return this.addDestroyFunc(()=>l.destroy()),l}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){var o,i;return((o=e==null?void 0:e.isInvalid)!=null?o:!1)===((i=t==null?void 0:t.isInvalid)!=null?i:!1)}setElementValue(e,t){e.setDate(t),t||e.setCustomValidity("")}setElementDisplayed(e,t){e.setDisplayed(t)}setElementDisabled(e,t){e.setDisabled(t)}createEValue(){let e=oe({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){let r=oe({tag:"div",cls:`ag-filter-${i} ag-filter-date-${i}`});t.push(r),e.appendChild(r),o.push(this.createDateCompWrapper(r,t.length-1,i))}removeEValues(e,t){this.removeDateComps(this.dateConditionFromComps,e,t),this.removeDateComps(this.dateConditionToComps,e,t),ti(this.eConditionPanelsFrom,e,t),ti(this.eConditionPanelsTo,e,t)}removeDateComps(e,t,o){let i=ti(e,t,o);for(let r of i)r.destroy()}isValidDateValue(e){if(e===null)return!1;let{minValidDate:t,maxValidDate:o,minValidYear:i,maxValidYear:r}=this;if(t){if(eo)return!1}else if(e.getUTCFullYear()>r)return!1;return!0}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>{var o,i;return e||(e=t.getDate()!=null&&!((i=(o=t.getValidity())==null?void 0:o.valid)==null||i))}),e}positionHasInvalidInputs(e){let t=!1;return this.forEachPositionInput(e,o=>{var i,r;return t||(t=!((r=(i=o.getValidity())==null?void 0:i.valid)==null||r))}),t}canApply(e){return!this.hasInvalidInputs()}isConditionUiComplete(e){if(!super.isConditionUiComplete(e))return!1;let t=!0;return this.forEachPositionInput(e,(o,i,r,a)=>{!t||i>=a||t&&(t=this.isValidDateValue(o.getDate()))}),t}areSimpleModelsEqual(e,t){return e.dateFrom===t.dateFrom&&e.dateTo===t.dateTo&&e.type===t.type}createCondition(e){let t=this.getConditionType(e),o={},{params:i,filterType:r}=this,a=this.getValues(e),n=i.useIsoSeparator?"T":" ";return a.length>0&&(o.dateFrom=fe(a[0],!0,n)),a.length>1&&(o.dateTo=fe(a[1],!0,n)),{dateFrom:null,dateTo:null,filterType:r,type:t,...o}}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}resetPlaceholder(){let e=this.getLocaleTextFunc(),t=this.translate("dateFormatOoo"),o=e("ariaFilterValue","Filter Value");this.forEachInput(i=>{i.setInputPlaceholder(t),i.setInputAriaLabel(o)})}getInputs(e){let{dateConditionFromComps:t,dateConditionToComps:o}=this;return e>=t.length?[null,null]:[t[e],o[e]]}getValues(e){let t=[];return this.forEachPositionInput(e,(o,i,r,a)=>{i=t?`${o?"max":"min"}DateValidation`:null}var Ug=class extends Lr{constructor(e,t){super(e,t,o=>{let{dataTypeSvc:i,valueSvc:r}=this.beans,a=t.column,n=i==null?void 0:i.getDateFormatterFunction(a),s=n?n(o!=null?o:void 0):o;return r.formatValue(a,null,s)}),this.filterTypeKeys=ts}conditionToString(e,t,o,i,r){let{type:a}=e,n=me(e.dateFrom),s=me(e.dateTo),l=this.filterParams.inRangeFloatingFilterDateFormat,c=t?this.formatValue.bind(this):u=>Cw(u,l),d=()=>n!==null?c(n):"null",g=()=>s!==null?c(s):"null";if(n==null&&s==null)return He(this,a);if(t){let u=this.conditionForToolPanel(a,o,d,g,i,r);if(u!=null)return u}return o?`${d()}-${g()}`:n!=null?c(n):`${a}`}};function Wx(e,t){let o=t;return oe?1:0}var qx=class extends es{constructor(){super(_g,rs),this.filterType="date",this.FilterModelFormatterClass=Ug,this.filterTypeToRangeCache=new Map}getOrRefreshRangeCacheItem(e,t){let{filterTypeToRangeCache:o}=this,i=Date.now(),r=o.get(e);if(r&&r.expires=0&&r(l,t)<0}return super.evaluateNonNullValue(e,t,o)}},_x=1,Li=null,Ux=()=>{var o,i,r,a;if(Li!=null)return Li;let e,t=typeof navigator=="undefined"?void 0:(i=(o=navigator.languages)==null?void 0:o[0])!=null?i:navigator.language;if(t&&typeof Intl!="undefined"&&typeof Intl.Locale=="function")try{let n=(a=(r=new Intl.Locale(t)).getWeekInfo)==null?void 0:a.call(r);e=n==null?void 0:n.firstDay}catch{e=void 0}return Li=e==null?_x:e%7,Li},xe=e=>(e.setHours(0,0,0,0),e),Or=e=>{let t=e.getDay(),o=Ux(),i=(t-o+7)%7;return e.setDate(e.getDate()-i),xe(e)},Hr=(e,t=1)=>(e.setDate(e.getDate()-t),e),Ae=e=>(e.setDate(e.getDate()+1),xe(e)),jg=e=>(Or(e),e.setDate(e.getDate()+6),Ae(e)),Br=e=>(e.setDate(1),xe(e)),as=e=>(e.setDate(1),e.setMonth(e.getMonth()+1),xe(e)),ns=e=>{let t=Math.floor(e.getMonth()/3);return e.setMonth(t*3),Br(e)},Kg=e=>{let t=Math.floor(e.getMonth()/3);return e.setMonth(t*3+2),as(e)},ss=e=>(e.setMonth(0,1),xe(e)),$g=e=>(e.setMonth(12,0),Ae(e)),Ao=e=>Hr(e),rn=e=>Ao(Or(e)),an=e=>Ao(Br(e)),nn=e=>Ao(ns(e)),ls=(e,t)=>[xe(e),Ae(t)],jx=(e,t)=>ls(Ao(e),Ao(t)),cs=(e,t)=>[Or(e),jg(t)],Kx=(e,t)=>cs(rn(e),rn(t)),ds=(e,t)=>[Br(e),as(t)],$x=(e,t)=>ds(an(e),an(t)),gs=(e,t)=>[ns(e),Kg(t)],Yx=(e,t)=>gs(nn(e),nn(t)),us=(e,t)=>[ss(e),$g(t)],Qx=(e,t)=>[ss(e),Ae(t)],Zx=(e,t)=>[xe(Hr(e,7)),Ae(t)],Jx=(e,t)=>[xe(Hr(e,30)),Ae(t)],Xx=(e,t)=>[xe(Hr(e,90)),Ae(t)],ek=(e,t)=>(e.setFullYear(e.getFullYear()-1),e.setMonth(e.getMonth()+6),[xe(e),Ae(t)]),tk=(e,t)=>(e.setFullYear(e.getFullYear()-1),[xe(e),Ae(t)]),ok=(e,t)=>(e.setFullYear(e.getFullYear()-2),[xe(e),Ae(t)]),ik=(e,t)=>(e.setFullYear(e.getFullYear()-1),t.setFullYear(t.getFullYear()-1),us(e,t)),rk=(e,t)=>(e.setFullYear(e.getFullYear()+1),t.setFullYear(t.getFullYear()+1),us(e,t)),ak=(e,t)=>(e.setMonth(e.getMonth()+3),t.setMonth(t.getMonth()+3),gs(e,t)),nk=(e,t)=>(e.setMonth(e.getMonth()+1),t.setMonth(t.getMonth()+1),ds(e,t)),sk=(e,t)=>(e.setDate(e.getDate()+7),t.setDate(t.getDate()+7),cs(e,t)),lk=(e,t)=>(e.setDate(e.getDate()+1),t.setDate(t.getDate()+1),ls(e,t)),ck={today:ls,yesterday:jx,tomorrow:lk,thisWeek:cs,lastWeek:Kx,nextWeek:sk,thisMonth:ds,lastMonth:$x,nextMonth:nk,thisQuarter:gs,lastQuarter:Yx,nextQuarter:ak,thisYear:us,lastYear:ik,nextYear:rk,yearToDate:Qx,last7Days:Zx,last30Days:Jx,last90Days:Xx,last6Months:ek,last12Months:tk,last24Months:ok,setStartOfDay:xe,setStartOfWeek:Or,setStartOfNextDay:Ae,setStartOfNextWeek:jg,setStartOfMonth:Br,setStartOfNextMonth:as,setStartOfQuarter:ns,setStartOfNextQuarter:Kg,setStartOfYear:ss,setStartOfNextYear:$g,setPreviousDay:Ao,setPreviousWeek:rn,setPreviousMonth:an,setPreviousQuarter:nn},dk={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"}]},gk=class extends Wg{constructor(){super(dk,[Tr]),this.eReadOnlyText=E,this.eDateWrapper=E,this.FilterModelFormatterClass=Ug,this.filterType="date",this.defaultOptions=rs}setParams(e){super.setParams(e),this.createDateComponent();let 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){let t=!this.readOnly&&this.canWeEditAfterModelFromParentFilter(e);if(this.setEditable(t),t){let o=e?me(e.dateFrom):null;this.dateComp.setDate(o),this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)}setEditable(e){q(this.eDateWrapper,e),q(this.eReadOnlyText.getGui(),!e)}onModelUpdated(e){super.setLastTypeFromModel(e),this.updateCompOnModelChange(e)}onDateChanged(){var t;let e=this.dateComp.getDate();if(this.reactive){let o=this.params;o.onUiChange();let i=o.model,r=fe(e),a=r==null?null:{...i!=null?i:{filterType:this.filterType,type:(t=this.lastType)!=null?t:this.optionsFactory.defaultOption},dateFrom:r};o.onModelChange(a,{afterFloatingFilter:!0})}else this.params.parentFilterInstance(o=>{o==null||o.onFloatingFilterChanged(this.lastType||null,e)})}getDateComponentParams(){let{filterParams:e}=this.params,t=En(e,this.defaultDebounceMs);return O(this.gos,{onDateChanged:re(this,this.onDateChanged.bind(this),t),filterParams:e,location:"floatingFilter"})}createDateComponent(){let{beans:{context:e,userCompFactory:t},eDateWrapper:o,params:{column:i}}=this;this.dateComp=new qg(e,t,i.getColDef(),this.getDateComponentParams(),o,r=>{r.setInputAriaLabel(this.getAriaLabel(i))}),this.addDestroyFunc(()=>this.dateComp.destroy())}},uk={tag:"div",cls:"ag-filter-filter",children:[{tag:"ag-input-text-field",ref:"eDateInput",cls:"ag-date-filter"}]},hk=class extends _{constructor(){super(uk,[Tr]),this.eDateInput=E,this.isApply=!1,this.applyOnFocusOut=!1}init(e){this.params=e,this.setParams(e);let 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()){if(this.isApply){this.applyOnFocusOut=!e,e&&this.params.onDateChanged();return}e||this.params.onDateChanged()}}handleFocusOut(){this.applyOnFocusOut&&(this.applyOnFocusOut=!1,this.params.onDateChanged())}handleFocusIn(){var e,t;(t=(e=this.params).onFocusIn)==null||t.call(e)}setParams(e){var p,f;let t=this.eDateInput.getInputElement(),o=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=o&&zt();let{minValidYear:i,maxValidYear:r,minValidDate:a,maxValidDate:n,buttons:s,includeTime:l,colDef:c}=e.filterParams||{},d=this.beans.dataTypeSvc,g=(f=l!=null?l:(p=d==null?void 0:d.getDateIncludesTimeFlag)==null?void 0:p.call(d,c.cellDataType))!=null?f:!1;o?g?(t.type="datetime-local",t.step="1"):t.type="date":t.type="text";let u=Ql(a,i,!0),h=Ql(n,r,!1);u&&h&&u.getTime()>h.getTime()&&k(87),u&&(t.min=fe(u,g)),h&&(t.max=fe(h,g)),this.isApply=e.location==="floatingFilter"&&!!(s!=null&&s.includes("apply"))}refresh(e){this.params=e,this.setParams(e)}getDate(){return me(this.eDateInput.getValue())}setDate(e){var i,r;let t=this.params.filterParams.colDef.cellDataType,o=(r=(i=this.beans.dataTypeSvc)==null?void 0:i.getDateIncludesTimeFlag(t))!=null?r:!1;this.eDateInput.setValue(fe(e,o))}setInputPlaceholder(e){this.eDateInput.setInputPlaceholder(e)}setInputAriaLabel(e){this.eDateInput.setAriaLabel(e)}setDisabled(e){this.eDateInput.setDisabled(e)}afterGuiAttached(e){e!=null&&e.suppressFocus||this.eDateInput.getInputElement().focus({preventScroll:!0})}shouldUseBrowserDatePicker(e){var t,o;return(o=(t=e==null?void 0:e.filterParams)==null?void 0:t.browserDatePicker)!=null?o:!0}};function Ql(e,t,o){return e&&t&&k(o?85:86),e instanceof Date?e:e?me(e):t?me(`${t}-${o?"01-01":"12-31"}`):null}var hs=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];function sn(e){var t;return(t=e==null?void 0:e.allowedCharPattern)!=null?t:null}function br(e){return e==null||isNaN(e)?null:e}function Yg(e,t){let{filter:o,filterTo:i,type:r}=e||{};return[br(o),br(i)].slice(0,Pt(r,t))}var pk=class extends zr{constructor(){super("numberFilter",Yg,hs),this.eValuesFrom=[],this.eValuesTo=[],this.filterType="number",this.defaultDebounceMs=500}afterGuiAttached(e){super.afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!Mo()&&this.hasInvalidInputs()&&this.getConditionTypes().includes("inRange")}refreshInputValidation(){for(let e=0;e0&&this.beans.ariaAnnounce.announceValue(s,"dateFilter")}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){var o,i;return((o=e==null?void 0:e.isInvalid)!=null?o:!1)===((i=t==null?void 0:t.isInvalid)!=null?i:!1)}refresh(e){let t=super.refresh(e),{state:o,additionalEventAttributes:i}=e,r=this.state,a=i==null?void 0:i.fromAction;return(a&&a!="apply"||o.model!==r.model||!this.areStatesEqual(o.state,r.state))&&this.refreshInputValidation(),t}setElementValue(e,t,o){let{numberFormatter:i}=this.params,r=!o&&i?i(t!=null?t:null):t;super.setElementValue(e,r),r===null&&e.setCustomValidity("")}createEValue(){let{params:e,eValuesFrom:t,eValuesTo:o}=this,i=sn(e),r=oe({tag:"div",cls:"ag-filter-body",role:"presentation"}),a=this.createFromToElement(r,t,"from",i),n=this.createFromToElement(r,o,"to",i),s=(d,g,u)=>()=>this.refreshInputPairValidation(d,g,u),l=s(a,n,!0);a.onValueChange(l),a.addGuiEventListener("focusin",l);let c=s(a,n,!1);return n.onValueChange(c),n.addGuiEventListener("focusin",c),r}createFromToElement(e,t,o,i){let r=this.createManagedBean(i?new ut({allowedCharPattern:i}):new Qn);return r.addCss(`ag-filter-${o}`),r.addCss("ag-filter-filter"),t.push(r),e.appendChild(r.getGui()),r}removeEValues(e,t){let o=i=>this.removeComponents(i,e,t);o(this.eValuesFrom),o(this.eValuesTo)}getValues(e){let t=[];return this.forEachPositionInput(e,(o,i,r,a)=>{i0&&(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){let{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,o=>t||(t=!o.getInputElement().validity.valid)),t}canApply(e){return!this.hasInvalidInputs()}};function Qg(e,t){if(typeof t=="number")return t;let o=st(t);return o!=null&&o.trim()===""&&(o=null),e?e(o):o==null||o.trim()==="-"?null:Number.parseFloat(o)}function Zl(e,t){return br(Qg(e,t.getValue(!0)))}function fk(e,t,o){return e!=null&&t!=null&&e>=t?`strict${o?"Max":"Min"}ValueValidation`:null}var Zg=class extends Lr{constructor(e,t){super(e,t,t.numberFormatter),this.filterTypeKeys=ts}conditionToString(e,t,o,i,r){let{filter:a,filterTo:n,type:s}=e,l=this.formatValue.bind(this);if(t){let c=this.conditionForToolPanel(s,o,()=>l(a),()=>l(n),i,r);if(c!=null)return c}return o?`${l(a)}-${l(n)}`:a!=null?l(a):`${s}`}},mk=class extends es{constructor(){super(Yg,hs),this.filterType="number",this.FilterModelFormatterClass=Zg}comparator(){return(e,t)=>e===t?0:e{},this.numberInputActive=!0}setupGui(e){this.eNumberInput=this.createManagedBean(new Qn),this.eTextInput=this.createManagedBean(new ut),this.eTextInput.setDisabled(!0);let t=this.eNumberInput.getGui(),o=this.eTextInput.getGui();e.appendChild(t),e.appendChild(o),this.setupListeners(t,i=>this.onValueChanged(i)),this.setupListeners(o,i=>this.onValueChanged(i))}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),t!==void 0&&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)}},Ck=class extends is{constructor(){super(...arguments),this.FilterModelFormatterClass=Zg,this.filterType="number",this.defaultOptions=hs}updateParams(e){sn(e.filterParams)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),super.updateParams(e)}createFloatingFilterInputService(e){return this.allowedCharPattern=sn(e.filterParams),this.allowedCharPattern?this.createManagedBean(new os({config:{allowedCharPattern:this.allowedCharPattern}})):this.createManagedBean(new vk)}convertValue(e){return e?Number(e):null}},ps=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"],wk=class extends zr{constructor(){super("textFilter",Gg,ps),this.filterType="text",this.eValuesFrom=[],this.eValuesTo=[],this.defaultDebounceMs=500}createCondition(e){let 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){let{eValuesFrom:t,eValuesTo:o}=this;return e>=t.length?[null,null]:[t[e],o[e]]}getValues(e){let t=[];return this.forEachPositionInput(e,(o,i,r,a)=>{ithis.removeComponents(a,e,t),{eValuesFrom:i,eValuesTo:r}=this;o(i),o(r)}},Jg=class extends Lr{constructor(){super(...arguments),this.filterTypeKeys=Ox}conditionToString(e,t,o,i,r){let{filter:a,filterTo:n,type:s}=e;if(t){let l=d=>()=>He(this,"filterSummaryTextQuote",[d]),c=this.conditionForToolPanel(s,o,l(a),l(n),i,r);if(c!=null)return c}return o?`${a}-${n}`:a!=null?`${a}`:`${s}`}},bk=({filterOption:e,value:t,filterText:o})=>{if(o==null)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 t.indexOf(o)===0;case"endsWith":{let i=t.lastIndexOf(o);return i>=0&&i===t.length-o.length}default:return!1}},yk=e=>e,Sk=e=>e==null?null:e.toString().toLowerCase(),xk=class extends Vg{constructor(){super(Gg,ps),this.filterType="text",this.FilterModelFormatterClass=Jg}updateParams(e){var o,i;super.updateParams(e);let t=e.filterParams;this.matcher=(o=t.textMatcher)!=null?o:bk,this.formatter=(i=t.textFormatter)!=null?i:t.caseSensitive?yk:Sk}evaluateNullValue(e){return e?["notEqual","notContains","blank"].indexOf(e)>=0:!1}evaluateNonNullValue(e,t,o,i){let r=e.map(u=>this.formatter(u))||[],a=this.formatter(t),{api:n,colDef:s,column:l,context:c,filterParams:{textFormatter:d}}=this.params;if(o.type==="blank")return wr(t);if(o.type==="notBlank")return!wr(t);let g={api:n,colDef:s,column:l,context:c,node:i.node,data:i.data,filterOption:o.type,value:a,textFormatter:d};return r.some(u=>this.matcher({...g,filterText:u}))}processModelToApply(e){if(e&&this.params.filterParams.trimInput){let t=o=>{var n,s;let i={...o},{filter:r,filterTo:a}=o;return r&&(i.filter=(n=on(r))!=null?n:null),a&&(i.filterTo=(s=on(a))!=null?s:null),i};return Yc(e)?{...e,conditions:e.conditions.map(t)}:t(e)}return e}},kk=class extends is{constructor(){super(...arguments),this.FilterModelFormatterClass=Jg,this.filterType="text",this.defaultOptions=ps}createFloatingFilterInputService(){return this.createManagedBean(new os)}};function Rk(e){var t;return!!((t=e.quickFilter)!=null&&t.isFilterPresent())}function Ek(e){var t;return(t=e.quickFilter)==null?void 0:t.getText()}function Fk(e){var t;(t=e.quickFilter)==null||t.resetCache()}var Dk=class extends S{constructor(){super(...arguments),this.beanName="quickFilter",this.quickFilter=null,this.quickFilterParts=null}postConstruct(){let 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",o=>this.setFilter(o.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(){var l,c;let{autoColSvc:e,colModel:t,gos:o,pivotResultCols:i}=this.beans,r=t.isPivotMode(),a=e==null?void 0:e.getColumns(),n=t.getColDefCols(),s=(c=r&&!o.get("applyQuickFilterBeforePivotOrAgg")?(l=i==null?void 0:i.getPivotResultCols())==null?void 0:l.list:n)!=null?c:[];a&&(s=s.concat(a)),this.colsToUse=o.get("includeHiddenColumnsInQuickFilter")?s:s.filter(d=>d.isVisible()||d.isRowGroupActive())}isFilterPresent(){return this.quickFilter!==null}doesRowPass(e){let 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(){let{quickFilter:e,parser:t}=this;e?this.quickFilterParts=t?t(e):e.split(" "):this.quickFilterParts=null}parseFilter(e){return M(e)?e.toUpperCase():null}setFilter(e){if(e!=null&&typeof e!="string"){k(70,{newFilter:e});return}let t=this.parseFilter(e);this.quickFilter!==t&&(this.quickFilter=t,this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}setParserAndMatcher(){let 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=>{let i=this.getTextForColumn(o,e);return M(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);let{quickFilterParts:i,matcher:r}=this;return r(i,o)}checkGenerateAggText(e){e.quickFilterAggregateText||(e.quickFilterAggregateText=this.getAggText(e))}getTextForColumn(e,t){let o=this.beans.filterValueSvc.getValue(e,t),i=e.getColDef();if(i.getQuickFilterText){let r=O(this.gos,{value:o,node:t,data:t.data,column:e,colDef:i});o=i.getQuickFilterText(r)}return M(o)?o.toString().toUpperCase():null}getAggText(e){let t=[];for(let o of this.colsToUse){let i=this.getTextForColumn(o,e);M(i)&&t.push(i)}return t.join(` +`)}},Mk={moduleName:"ClientSideRowModelFilter",version:D,rowModels:["clientSide"],beans:[S3]},fs={moduleName:"FilterCore",version:D,beans:[Cx],apiFunctions:{isAnyFilterPresent:mx,onFilterChanged:vx},css:[Y2],dependsOn:[Mk]},Xg={moduleName:"FilterValue",version:D,beans:[Ex]},Si={moduleName:"ColumnFilter",version:D,beans:[fx,Rx],dynamicBeans:{headerFilterCellCtrl:_2},icons:{filter:"filter",filterActive:"filter"},apiFunctions:{isColumnFilterPresent:Q2,getColumnFilterInstance:Z2,destroyFilter:J2,setFilterModel:X2,getFilterModel:ex,getColumnFilterModel:tx,setColumnFilterModel:ox,showColumnFilter:ix,hideColumnFilter:rx,getColumnFilterHandler:ax,doFilterAction:nx},dependsOn:[fs,Ir,Xg,$2]},Pk={moduleName:"CustomFilter",version:D,userComponents:{agReadOnlyFloatingFilter:Dx},dependsOn:[Si]},Ik={moduleName:"TextFilter",version:D,dependsOn:[Si],userComponents:{agTextColumnFilter:{classImp:wk,params:{useForm:!0}},agTextColumnFloatingFilter:kk},dynamicBeans:{agTextColumnFilterHandler:xk}},Tk={moduleName:"NumberFilter",version:D,dependsOn:[Si],userComponents:{agNumberColumnFilter:{classImp:pk,params:{useForm:!0}},agNumberColumnFloatingFilter:Ck},dynamicBeans:{agNumberColumnFilterHandler:mk}},Ak={moduleName:"BigIntFilter",version:D,dependsOn:[Si],userComponents:{agBigIntColumnFilter:{classImp:zx,params:{useForm:!0}},agBigIntColumnFloatingFilter:Vx},dynamicBeans:{agBigIntColumnFilterHandler:Hx}},zk={moduleName:"DateFilter",version:D,dependsOn:[Si],userComponents:{agDateColumnFilter:{classImp:Nx,params:{useForm:!0}},agDateInput:hk,agDateColumnFloatingFilter:gk},dynamicBeans:{agDateColumnFilterHandler:qx}},Lk={moduleName:"QuickFilterCore",version:D,rowModels:["clientSide"],beans:[Dk],dependsOn:[fs,Xg]},Ok={moduleName:"QuickFilter",version:D,apiFunctions:{isQuickFilterPresent:Rk,getQuickFilter:Ek,resetQuickFilter:Fk},dependsOn:[Lk]},Hk={moduleName:"ExternalFilter",version:D,dependsOn:[fs]},Bk=class extends S{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){let 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=[];let{params:{blockSize:e,rowHeight:t},startRow:o,beans:i,rowNodes:r}=this;for(let a=0;a{this.params.datasource.getRows(e)},0)}createLoadParams(){let{startRow:e,endRow:t,version:o,params:{sortModel:i,filterModel:r},gos:a}=this;return O(a,{startRow:e,endRow:t,successCallback:this.pageLoaded.bind(this,o),failCallback:this.pageLoadFailed.bind(this,o),sortModel:i,filterModel:r})}forEachNode(e,t,o){this.rowNodes.forEach((i,r)=>{this.startRow+r{let n=e.rowData?e.rowData[a]:void 0;!r.id&&r.alreadyRendered&&n&&(t[a]=new Mt(o),t[a].setRowIndex(r.rowIndex),t[a].setRowTop(r.rowTop),t[a].setRowHeight(r.rowHeight),r._destroy(!0)),this.setDataAndId(t[a],n,this.startRow+a)});let i=e.rowCount!=null&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,i)}destroy(){let e=this.rowNodes;for(let t=0,o=e.length;tn!=e),o=(n,s)=>s.lastAccessed-n.lastAccessed;t.sort(o);let i=this.params.maxBlocksInCache>0,r=i?this.params.maxBlocksInCache-1:null,a=Vk-1;t.forEach((n,s)=>{let l=n.state==="needsLoading"&&s>=a,c=i?s>=r:!1;if(l||c){if(this.isBlockCurrentlyDisplayed(n)||this.isBlockFocused(n))return;this.removeBlockFromCache(n)}})}isBlockFocused(e){let t=this.beans.focusSvc.getFocusCellToUseAfterRefresh();if(!t||t.rowPinned!=null)return!1;let{startRow:o,endRow:i}=e;return t.rowIndex>=o&&t.rowIndex=0)this.rowCount=t,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){let{blockSize:o,overflowSize:i}=this.params,a=(e.id+1)*o+i;this.rowCounto.id-i.id;return Object.values(this.blocks).sort(e)}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(){let e=[];for(let t of this.getBlocksInOrder())t.id*this.params.blockSize>=this.rowCount&&e.push(t);if(e.length>0)for(let t of e)this.destroyBlock(t)}purgeCache(){for(let e of this.getBlocksInOrder())this.removeBlockFromCache(e);this.lastRowIndexKnown=!1,this.rowCount===0&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(e,t){let o=[],i=-1,r=!1,a={value:0},n=!1;for(let l of this.getBlocksInOrder())if(!n){if(r&&i+1!==l.id){n=!0;continue}i=l.id,l.forEachNode(c=>{let d=c===e||c===t;(r||d)&&o.push(c),d&&(r=!r)},a,this.rowCount)}return n||r?[]:o}},Gk=class extends S{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null,this.hierarchical=!1}getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}ensureRowHeightsValid(){return!1}postConstruct(){if(this.gos.get("rowModelType")!=="infinite")return;let e=this.beans,t=new Mt(e);this.rootNode=t,t.level=-1,this.rowHeight=Ut(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=Ut(this.beans),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onColumnEverything(){var t,o;let e;this.cacheParams?e=!oi(this.cacheParams.sortModel,(o=(t=this.beans.sortSvc)==null?void 0:t.getSortModel())!=null?o:[]):e=!0,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(){var t;let e=this.infiniteCache;return(e==null?void 0:e.getRowCount())===0?(t=this.beans.filterManager)!=null&&t.isAnyFilterPresent()?"noMatchingRows":"noRows":null}getNodesInRangeForSelection(e,t){var o,i;return(i=(o=this.infiniteCache)==null?void 0:o.getRowNodesInRange(e,t))!=null?i:[]}reset(){var o;if(!this.datasource)return;Do(this.gos)!=null||(o=this.beans.selectionSvc)==null||o.reset("rowDataChanged"),this.resetCache()}dispatchModelUpdatedEvent(){this.eventSvc.dispatchEvent({type:"modelUpdated",newPage:!1,newPageSize:!1,newData:!1,keepRenderedRows:!0,animate:!1})}resetCache(){var n,s;this.destroyCache();let e=this.beans,{filterManager:t,sortSvc:o,rowNodeBlockLoader:i,eventSvc:r,gos:a}=e;this.cacheParams={datasource:this.datasource,filterModel:(n=t==null?void 0:t.getFilterModel())!=null?n:{},sortModel:(s=o==null?void 0:o.getSortModel())!=null?s:[],rowNodeBlockLoader:i,initialRowCount:a.get("infiniteInitialRowCount"),maxBlocksInCache:a.get("maxBlocksInCache"),rowHeight:Ut(e),overflowSize:a.get("cacheOverflowSize"),blockSize:a.get("cacheBlockSize"),lastAccessedSequence:{value:0}},this.infiniteCache=this.createBean(new Nk(this.cacheParams)),r.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){let 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){var t;(t=this.infiniteCache)==null||t.forEachNodeDeep(e)}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(e){return e}getRowIndexAtPixel(e){if(this.rowHeight!==0){let 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(){var e;(e=this.infiniteCache)==null||e.refreshCache()}purgeCache(){var e;(e=this.infiniteCache)==null||e.purgeCache()}isLastRowIndexKnown(){var e,t;return(t=(e=this.infiniteCache)==null?void 0:e.isLastRowIndexKnown())!=null?t:!1}setRowCount(e,t){var o;(o=this.infiniteCache)==null||o.setRowCount(e,t)}resetRowHeights(){}onRowHeightChanged(){}};function Wk(e){var t;(t=Fr(e))==null||t.refreshCache()}function qk(e){var t;(t=Fr(e))==null||t.purgeCache()}function _k(e){var t;return(t=Fr(e))==null?void 0:t.getRowCount()}var Uk=class extends S{constructor(){super(...arguments),this.beanName="rowNodeBlockLoader",this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=Mh(this.gos);let e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=re(this,this.performCheckBlocksToLoad.bind(this),e))}addBlock(e){this.blocks.push(e),e.addEventListener("loadComplete",this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){Xe(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(),this.maxConcurrentRequests!=null&&this.activeBlockLoadsCount>=this.maxConcurrentRequests){Et(this.gos,"RowNodeBlockLoader - checkBlockToLoad: max loads exceeded");return}let e=this.maxConcurrentRequests!=null?this.maxConcurrentRequests-this.activeBlockLoadsCount:1,t=this.blocks.filter(o=>o.state==="needsLoading").slice(0,e);this.activeBlockLoadsCount+=t.length;for(let o of t)o.load();this.printCacheStatus()}getBlockState(){let e={};return this.blocks.forEach(t=>{let{id:o,state:i}=t.getBlockStateJson();e[o]=i}),e}printCacheStatus(){Et(this.gos,`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}},jk={moduleName:"InfiniteRowModelCore",version:D,rowModels:["infinite"],beans:[Gk,Uk]},Kk={moduleName:"InfiniteRowModel",version:D,apiFunctions:{refreshInfiniteCache:Wk,purgeInfiniteCache:qk,getInfiniteRowCount:_k},dependsOn:[jk,f3]},$k=class extends S{constructor(){super(...arguments),this.beanName="apiEventSvc",this.syncListeners=new Map,this.asyncListeners=new Map,this.syncGlobalListeners=new Set,this.globalListenerPairs=new Map}postConstruct(){var e,t;this.wrapSvc=(t=(e=this.beans.frameworkOverrides).createGlobalEventListenerWrapper)==null?void 0:t.call(e)}addListener(e,t){var a,n;let o=(n=(a=this.wrapSvc)==null?void 0:a.wrap(e,t))!=null?n:t,i=!ji.has(e),r=i?this.asyncListeners:this.syncListeners;r.has(e)||r.set(e,new Set),r.get(e).add(o),this.eventSvc.addListener(e,o,i)}removeListener(e,t){var a,n,s;let o=(n=(a=this.wrapSvc)==null?void 0:a.unwrap(e,t))!=null?n:t,i=this.asyncListeners.get(e),r=!!(i!=null&&i.delete(o));r||(s=this.syncListeners.get(e))==null||s.delete(o),this.eventSvc.removeListener(e,o,r)}addGlobalListener(e){var a,n;let t=(n=(a=this.wrapSvc)==null?void 0:a.wrapGlobal(e))!=null?n:e,o=(s,l)=>{ji.has(s)&&t(s,l)},i=(s,l)=>{ji.has(s)||t(s,l)};this.globalListenerPairs.set(e,{syncListener:o,asyncListener:i});let r=this.eventSvc;r.addGlobalListener(o,!1),r.addGlobalListener(i,!0)}removeGlobalListener(e){var n;let{eventSvc:t,wrapSvc:o,globalListenerPairs:i}=this,r=(n=o==null?void 0:o.unwrapGlobal(e))!=null?n:e;if(i.has(r)){let{syncListener:s,asyncListener:l}=i.get(r);t.removeGlobalListener(s,!1),t.removeGlobalListener(l,!0),i.delete(e)}else this.syncGlobalListeners.delete(r),t.removeGlobalListener(r,!1)}destroyEventListeners(e,t){e.forEach((o,i)=>{o.forEach(r=>this.eventSvc.removeListener(i,r,t)),o.clear()}),e.clear()}destroyGlobalListeners(e,t){for(let 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);let{globalListenerPairs:e,eventSvc:t}=this;e.forEach(({syncListener:o,asyncListener:i})=>{t.removeGlobalListener(o,!1),t.removeGlobalListener(i,!0)}),e.clear()}};function Yk(e,t,o){var i;(i=e.apiEventSvc)==null||i.addListener(t,o)}function Qk(e,t,o){var i;(i=e.apiEventSvc)==null||i.removeListener(t,o)}function Zk(e,t){var o;(o=e.apiEventSvc)==null||o.addGlobalListener(t)}function Jk(e,t){var o;(o=e.apiEventSvc)==null||o.removeGlobalListener(t)}var Xk={moduleName:"EventApi",version:D,apiFunctions:{addEventListener:Yk,addGlobalListener:Zk,removeEventListener:Qk,removeGlobalListener:Jk},beans:[$k]},eR=class extends S{constructor(){super(...arguments),this.beanName="localeSvc"}getLocaleTextFunc(){let e=this.gos,t=e.getCallback("getLocaleText");return t?Ju(t):Xu(e.get("localeText"))}},tR={moduleName:"Locale",version:D,beans:[eR]};function oR(e){var t,o;return(o=(t=e.stateSvc)==null?void 0:t.getState())!=null?o:{}}function iR(e,t,o){var i;return(i=e.stateSvc)==null?void 0:i.setState(t,o)}function Jl(e){return e={...e},e.version||(e.version="32.1.0"),e.version==="32.1.0"&&(e=rR(e)),e.version=D,e}function rR(e){return e.cellSelection=aR(e,"rangeSelection"),e}function aR(e,t){if(e&&typeof e=="object")return e[t]}var nR=class extends S{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=re(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=re(this,()=>this.updateGroupExpansionState(),0),this.onRowSelectedDebounced=re(this,()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){var c;let{gos:e,ctrlsSvc:t,colDelayRenderSvc:o}=this.beans;this.isClientSideRowModel=ee(e);let i=Jl((c=e.get("initialState"))!=null?c:{}),r=i.partialColumnState;delete i.partialColumnState,this.cachedState=i;let a=this.suppressEventsAndDispatchInitEvent.bind(this);t.whenReady(this,()=>a(()=>this.setupStateOnGridReady(i))),(i.columnOrder||i.columnVisibility||i.columnSizing||i.columnPinning||i.columnGroup)&&(o==null||o.hideColumns("columnState"));let[n,s,l]=this.addManagedEventListeners({newColumnsLoaded:({source:d})=>{d==="gridInitializing"&&(n(),a(()=>{this.setupStateOnColumnsInitialised(i,!!r),o==null||o.revealColumns("columnState")}))},rowCountReady:()=>{s==null||s(),a(()=>this.setupStateOnRowCountReady(i))},firstDataRendered:()=>{l==null||l(),a(()=>this.setupStateOnFirstDataRendered(i))}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setState(e,t){let o=Jl(e);delete o.partialColumnState,this.cachedState=o,this.startSuppressEvents();let i="api",r=t?new Set(t):void 0;this.setGridReadyState(o,i,r),this.setColumnsInitialisedState(o,i,!!r,r),this.setRowCountState(o,i,r),setTimeout(()=>{this.isAlive()&&this.setFirstDataRenderedState(o,i,r),this.stopSuppressEvents(i)})}setGridReadyState(e,t,o){var i,r;t==="api"&&!(o!=null&&o.has("sideBar"))&&((r=(i=this.beans.sideBar)==null?void 0:i.comp)==null||r.setState(e.sideBar)),this.updateCachedState("sideBar",this.getSideBarState())}setupStateOnGridReady(e){this.setGridReadyState(e,"gridInitializing");let t=()=>this.updateCachedState("sideBar",this.getSideBarState());this.addManagedEventListeners({toolPanelVisibleChanged:t,sideBarUpdated:t})}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);let o=i=>()=>this.updateColumnState([i]);this.addManagedEventListeners({columnValueChanged:o("aggregation"),columnMoved:o("columnOrder"),columnPinned:o("columnPinning"),columnResized:o("columnSizing"),columnVisible:o("columnVisibility"),columnPivotChanged:o("pivot"),columnPivotModeChanged:o("pivot"),columnRowGroupChanged:o("rowGroup"),sortChanged:o("sort"),newColumnsLoaded:({source:i})=>{this.updateColumnAndGroupState(),i!=="gridInitializing"&&this.isClientSideRowModel&&this.onRowGroupOpenedDebounced()},columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setRowCountState(e,t,o){let{filter:i,rowGroupExpansion:r,ssrmRowGroupExpansion:a,rowSelection:n,pagination:s,rowPinning:l}=e,c=(g,u)=>!(o!=null&&o.has(g))&&(u||t==="api");c("filter",i)&&this.setFilterState(i),(c("rowGroupExpansion",r)||c("ssrmRowGroupExpansion",a))&&this.setRowGroupExpansionState(a,r,t),c("rowSelection",n)&&this.setRowSelectionState(n,t),c("pagination",s)&&this.setPaginationState(s,t),c("rowPinning",l)&&this.setRowPinningState(l);let d=this.updateCachedState.bind(this);d("filter",this.getFilterState()),this.updateGroupExpansionState(),d("rowSelection",this.getRowSelectionState()),d("pagination",this.getPaginationState())}setupStateOnRowCountReady(e){this.setRowCountState(e,"gridInitializing");let t=this.updateCachedState.bind(this),o=()=>{this.updateRowGroupExpansionStateTimer=0,this.updateGroupExpansionState()},i=()=>t("filter",this.getFilterState()),{gos:r,colFilter:a,selectableFilter:n}=this.beans;this.addManagedEventListeners({filterChanged:i,rowExpansionStateChanged:this.onRowGroupOpenedDebounced,expandOrCollapseAll:o,columnRowGroupChanged:o,rowDataUpdated:()=>{(r.get("groupDefaultExpanded")!==0||r.get("isGroupOpenByDefault"))&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(o)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:s=>{(s.newPage||s.newPageSize)&&t("pagination",this.getPaginationState())},pinnedRowsChanged:()=>t("rowPinning",this.getRowPinningState())}),a&&this.addManagedListeners(a,{filterStateChanged:i}),n&&this.addManagedListeners(n,{selectedFilterChanged:i})}setFirstDataRenderedState(e,t,o){let{scroll:i,cellSelection:r,focusedCell:a,columnOrder:n}=e,s=(d,g)=>!(o!=null&&o.has(d))&&(g||t==="api");s("focusedCell",a)&&this.setFocusedCellState(a),s("cellSelection",r)&&this.setCellSelectionState(r),s("scroll",i)&&this.setScrollState(i),this.setColumnPivotState(!!(n!=null&&n.orderedColIds),t);let l=this.updateCachedState.bind(this);l("sideBar",this.getSideBarState()),l("focusedCell",this.getFocusedCellState());let c=this.getRangeSelectionState();l("rangeSelection",c),l("cellSelection",c),l("scroll",this.getScrollState())}setupStateOnFirstDataRendered(e){this.setFirstDataRenderedState(e,"gridInitializing");let t=this.updateCachedState.bind(this),o=()=>t("focusedCell",this.getFocusedCellState());this.addManagedEventListeners({cellFocused:o,cellFocusCleared:o,cellSelectionChanged:i=>{if(i.finished){let r=this.getRangeSelectionState();t("rangeSelection",r),t("cellSelection",r)}},bodyScrollEnd:()=>t("scroll",this.getScrollState())})}getColumnState(){let e=this.beans;return qy(ur(e),e.colModel.isPivotMode())}setColumnState(e,t,o,i){var z,L,N,j;let{sort:r,rowGroup:a,aggregation:n,pivot:s,columnPinning:l,columnVisibility:c,columnSizing:d,columnOrder:g}=e,u=!1,h=(A,H)=>{let V=!(i!=null&&i.has(A))&&!!(H||t==="api");return u||(u=V),V},p={},f=A=>{let H=p[A];return H||(H={colId:A},p[A]=H,H)},m={},v=h("sort",r);v&&(r==null||r.sortModel.forEach(({colId:A,sort:H,type:V},Z)=>{let K=f(A);K.sort=H,K.sortIndex=Z,K.sortType=V})),(v||!o)&&(m.sort=null,m.sortIndex=null);let C=h("rowGroup",a);C&&(a==null||a.groupColIds.forEach((A,H)=>{let V=f(A);V.rowGroup=!0,V.rowGroupIndex=H})),(C||!o)&&(m.rowGroup=null,m.rowGroupIndex=null);let w=h("aggregation",n);w&&(n==null||n.aggregationModel.forEach(({colId:A,aggFunc:H})=>{f(A).aggFunc=H})),(w||!o)&&(m.aggFunc=null);let y=h("pivot",s);y&&(s==null||s.pivotColIds.forEach((A,H)=>{let V=f(A);V.pivot=!0,V.pivotIndex=H}),this.gos.updateGridOptions({options:{pivotMode:!!(s!=null&&s.pivotMode)},source:t})),(y||!o)&&(m.pivot=null,m.pivotIndex=null);let x=h("columnPinning",l);if(x){for(let A of(z=l==null?void 0:l.leftColIds)!=null?z:[])f(A).pinned="left";for(let A of(L=l==null?void 0:l.rightColIds)!=null?L:[])f(A).pinned="right"}(x||!o)&&(m.pinned=null);let R=h("columnVisibility",c);if(R)for(let A of(N=c==null?void 0:c.hiddenColIds)!=null?N:[])f(A).hide=!0;(R||!o)&&(m.hide=null);let F=h("columnSizing",d);if(F)for(let{colId:A,flex:H,width:V}of(j=d==null?void 0:d.columnSizingModel)!=null?j:[]){let Z=f(A);Z.flex=H!=null?H:null,Z.width=V}(F||!o)&&(m.flex=null);let P=g==null?void 0:g.orderedColIds,T=!!(P!=null&&P.length)&&!(i!=null&&i.has("columnOrder")),I=T?P.map(A=>f(A)):Object.values(p);(I.length||u)&&(this.columnStates=I,Ve(this.beans,{state:I,applyOrder:T,defaultState:m},t))}setColumnPivotState(e,t){let o=this.columnStates;this.columnStates=void 0;let i=this.columnGroupStates;this.columnGroupStates=void 0;let r=this.beans,{pivotResultCols:a,colGroupSvc:n}=r;if(a!=null&&a.isPivotResultColsPresent()){if(o){let s=[];for(let l of o)a.getPivotResultCol(l.colId)&&s.push(l);Ve(r,{state:s,applyOrder:e},t)}i&&(n==null||n.setColumnGroupState(i,t))}}getColumnGroupState(){let e=this.beans.colGroupSvc;if(!e)return;let t=e.getColumnGroupState();return _y(t)}setColumnGroupState(e,t,o){var s;let i=this.beans.colGroupSvc;if(!i||o!=null&&o.has("columnGroup")||t!=="api"&&!Object.prototype.hasOwnProperty.call(e,"columnGroup"))return;let r=new Set((s=e.columnGroup)==null?void 0:s.openColumnGroupIds),n=i.getColumnGroupState().map(({groupId:l})=>{let c=r.has(l);return c&&r.delete(l),{groupId:l,open:c}});for(let l of r)n.push({groupId:l,open:!0});n.length&&(this.columnGroupStates=n),i.setColumnGroupState(n,t)}getFilterState(){var n;let{filterManager:e,selectableFilter:t}=this.beans,o=e==null?void 0:e.getFilterModel();o&&Object.keys(o).length===0&&(o=void 0);let i=e==null?void 0:e.getFilterState(),r=(n=e==null?void 0:e.getAdvFilterModel())!=null?n:void 0,a=t==null?void 0:t.getState();return o||r||i||a?{filterModel:o,columnFilterState:i,advancedFilterModel:r,selectableFilters:a}:void 0}setFilterState(e){let{filterManager:t,selectableFilter:o}=this.beans,{filterModel:i,columnFilterState:r,advancedFilterModel:a,selectableFilters:n}=e!=null?e:{filterModel:null,columnFilterState:null,advancedFilterModel:null};n!==void 0&&(o==null||o.setState(n!=null?n:{})),(i!==void 0||r!==void 0)&&(t==null||t.setFilterState(i!=null?i:null,r!=null?r:null,"columnFilter")),a!==void 0&&(t==null||t.setAdvFilterModel(a!=null?a:null,"advancedFilter"))}getRangeSelectionState(){var t;let e=(t=this.beans.rangeSvc)==null?void 0:t.getCellRanges().map(o=>{let{id:i,type:r,startRow:a,endRow:n,columns:s,startColumn:l}=o;return{id:i,type:r,startRow:a,endRow:n,colIds:s.map(c=>c.getColId()),startColId:l.getColId()}});return e!=null&&e.length?{cellRanges:e}:void 0}setCellSelectionState(e){var n;let{gos:t,rangeSvc:o,colModel:i,visibleCols:r}=this.beans;if(!dt(t)||!o)return;let a=[];for(let s of(n=e==null?void 0:e.cellRanges)!=null?n:[]){let l=[];for(let d of s.colIds){let g=i.getCol(d);g&&l.push(g)}if(!l.length)continue;let c=i.getCol(s.startColId);if(!c){let d=r.allCols,g=new Set(l);c=d.find(u=>g.has(u))}a.push({...s,columns:l,startColumn:c})}o.setCellRanges(a)}getScrollState(){var i,r;if(!this.isClientSideRowModel)return;let e=this.beans.ctrlsSvc.getScrollFeature(),{left:t}=(i=e==null?void 0:e.getHScrollPosition())!=null?i:{left:0},{top:o}=(r=e==null?void 0:e.getVScrollPosition())!=null?r:{top:0};return o||t?{top:o,left:t}:void 0}setScrollState(e){if(!this.isClientSideRowModel)return;let{top:t,left:o}=e!=null?e:{top:0,left:0},{frameworkOverrides:i,rowRenderer:r,animationFrameSvc:a,ctrlsSvc:n}=this.beans;i.wrapIncoming(()=>{var s;n.get("center").setCenterViewportScrollLeft(o),(s=n.getScrollFeature())==null||s.setVerticalScrollPosition(t),r.redraw({afterScroll:!0}),a==null||a.flushAllFrames()})}getSideBarState(){var e,t;return(t=(e=this.beans.sideBar)==null?void 0:e.comp)==null?void 0:t.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;let e=this.beans.focusSvc.getFocusedCell();if(e){let{column:t,rowIndex:o,rowPinned:i}=e;return{colId:t.getColId(),rowIndex:o,rowPinned:i}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;let{focusSvc:t,colModel:o}=this.beans;if(!e){t.clearFocusedCell();return}let{colId:i,rowIndex:r,rowPinned:a}=e;t.setFocusedCell({column:o.getCol(i),rowIndex:r,rowPinned:a,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){let{pagination:e,gos:t}=this.beans;if(!e)return;let o=e.getCurrentPage(),i=t.get("paginationAutoPageSize")?void 0:e.getPageSize();if(!(!o&&!i))return{page:o,pageSize:i}}setPaginationState(e,t){let{pagination:o,gos:i}=this.beans;if(!o)return;let{pageSize:r,page:a}=e!=null?e:{page:0,pageSize:i.get("paginationPageSize")},n=t==="gridInitializing";r&&!i.get("paginationAutoPageSize")&&o.setPageSize(r,n?"initialState":"pageSizeSelector"),typeof a=="number"&&(n?o.setPage(a):o.goToPage(a))}getRowSelectionState(){var i;let e=this.beans.selectionSvc;if(!e)return;let t=e.getSelectionState();return!t||!Array.isArray(t)&&(t.selectAll===!1||t.selectAllChildren===!1)&&!((i=t==null?void 0:t.toggledNodes)!=null&&i.length)?void 0:t}setRowSelectionState(e,t){var o;(o=this.beans.selectionSvc)==null||o.setSelectionState(e,t,t==="api")}updateGroupExpansionState(){let{expansionSvc:e,gos:t}=this.beans,o=e==null?void 0:e.getExpansionState(),i=t.get("ssrmExpandAllAffectsAllRows");this.updateCachedState("ssrmRowGroupExpansion",i?o:void 0),this.updateCachedState("rowGroupExpansion",i?void 0:o)}getRowPinningState(){var e;return(e=this.beans.pinnedRowModel)==null?void 0:e.getPinnedState()}setRowPinningState(e){let t=this.beans.pinnedRowModel;e?t==null||t.setPinnedState(e):t==null||t.reset()}setRowGroupExpansionState(e,t,o){var r,a;let i=(r=e!=null?e:t)!=null?r:{expandedRowGroupIds:[],collapsedRowGroupIds:[]};(a=this.beans.expansionSvc)==null||a.setExpansionState(i,o)}updateColumnState(e){let t=this.getColumnState(),o=!1,i=this.cachedState;for(let r of Object.keys(t)){let a=t[r];oi(a,i[r])||(o=!0)}this.cachedState={...i,...t},o&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){let o=this.cachedState[e];this.setCachedStateValue(e,t),oi(t,o)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState={...this.cachedState,[e]:t}}refreshStaleState(){let e=this.staleStateKeys;for(let t of e)t==="rowSelection"&&this.setCachedStateValue(t,this.getRowSelectionState());e.clear()}dispatchStateUpdateEvent(e){if(!this.suppressEvents){for(let t of e)this.queuedUpdateSources.add(t);this.dispatchStateUpdateEventDebounced()}}dispatchQueuedStateUpdateEvents(){let e=this.queuedUpdateSources,t=Array.from(e);e.clear(),this.eventSvc.dispatchEvent({type:"stateUpdated",sources:t,state:this.cachedState})}startSuppressEvents(){var e;this.suppressEvents=!0,(e=this.beans.colAnimation)==null||e.setSuppressAnimation(!0)}stopSuppressEvents(e){setTimeout(()=>{var t;this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&((t=this.beans.colAnimation)==null||t.setSuppressAnimation(!1),this.dispatchStateUpdateEvent([e]))})}suppressEventsAndDispatchInitEvent(e){this.startSuppressEvents(),e(),this.stopSuppressEvents("gridInitializing")}},sR={moduleName:"GridState",version:D,beans:[nR],apiFunctions:{getState:oR,setState:iR}};function lR(e){return e.rowModel.isLastRowIndexKnown()}function cR(e){var t,o;return(o=(t=e.pagination)==null?void 0:t.getPageSize())!=null?o:100}function dR(e){var t,o;return(o=(t=e.pagination)==null?void 0:t.getCurrentPage())!=null?o:0}function gR(e){var t,o;return(o=(t=e.pagination)==null?void 0:t.getTotalPages())!=null?o:1}function uR(e){return e.pagination?e.pagination.getMasterRowCount():e.rowModel.getRowCount()}function hR(e){var t;(t=e.pagination)==null||t.goToNextPage()}function pR(e){var t;(t=e.pagination)==null||t.goToPreviousPage()}function fR(e){var t;(t=e.pagination)==null||t.goToFirstPage()}function mR(e){var t;(t=e.pagination)==null||t.goToLastPage()}function vR(e,t){var o;(o=e.pagination)==null||o.goToPage(t)}var CR=class extends S{constructor(){super(...arguments),this.beanName="paginationAutoPageSizeSvc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowsCtrl=e.center;let 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")||this.centerRowsCtrl==null}onPaginationAutoSizeChanged(){this.notActive()?this.beans.pagination.unsetAutoCalculatedPageSize():this.checkPageSize()}checkPageSize(){if(this.notActive())return;let e=this.centerRowsCtrl.viewportSizeFeature.getBodyHeight();if(e>0){let t=this.beans,o=()=>{let i=Math.max(Ut(t),1),r=Math.floor(e/i);t.pagination.setPageSize(r,"autoCalculated")};this.isBodyRendered?re(this,o,50)():(o(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}};function wR(e,t){if(typeof e!="number")return"";let o=t(),i=o("thousandSeparator",","),r=o("decimalSeparator",".");return e.toString().replace(".",r).replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${i}`)}var qo="paginationPageSizeSelector",bR={tag:"span",cls:"ag-paging-page-size"},yR=class extends _{constructor(){super(bR),this.hasEmptyOption=!1,this.handlePageSizeItemSelected=()=>{if(!this.selectPageSizeComp)return;let e=this.selectPageSizeComp.getValue();if(!e)return;let 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(qo,()=>{this.onPageSizeSelectorValuesChange()}),this.addManagedEventListeners({paginationChanged:e=>this.handlePaginationChanged(e)})}handlePaginationChanged(e){if(!this.selectPageSizeComp||!(e!=null&&e.newPageSize))return;let 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(){ne(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")&&this.gos.get(qo)!==!1}reloadPageSizesSelector(){let e=this.getPageSizeSelectorValues(),t=this.pagination.getPageSize(),o=!t||!e.includes(t);if(o){let r=this.gos.exists("paginationPageSize"),a=this.gos.get(qo)!==!0;k(94,{pageSizeSet:r,pageSizesSet:a,pageSizeOptions:e,paginationPageSizeOption:t}),a||k(95,{paginationPageSizeOption:t,paginationPageSizeSelector:qo}),e.unshift("")}let i=String(o?"":t);this.selectPageSizeComp?(It(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(t=>({value:String(t)}))}createPageSizeSelectorComp(e,t){let o=this.getLocaleTextFunc(),i=o("pageSizeSelectorLabel","Page Size:"),r=o("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new Zn).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(r).setLabel(i).onValueChange(()=>this.handlePageSizeItemSelected()),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){let e=[20,50,100],t=this.gos.get(qo);return!Array.isArray(t)||!(t!=null&&t.length)?e:[...t].sort((o,i)=>o-i)}destroy(){this.toggleSelectDisplay(!1),super.destroy()}},SR={selector:"AG-PAGE-SIZE-SELECTOR",component:yR},xR=".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}",kR=class extends Ed{constructor(){super(),this.btFirst=E,this.btPrevious=E,this.btNext=E,this.btLast=E,this.lbRecordCount=E,this.lbFirstRowOnPage=E,this.lbLastRowOnPage=E,this.lbCurrent=E,this.lbTotal=E,this.pageSizeComp=E,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1,this.registerCSS(xR)}wireBeans(e){this.rowModel=e.rowModel,this.pagination=e.pagination,this.ariaAnnounce=e.ariaAnnounce}postConstruct(){let e=this.gos.get("enableRtl");this.setTemplate(this.getTemplate(),[SR]);let{btFirst:t,btPrevious:o,btNext:i,btLast:r}=this;this.activateTabIndex([t,o,i,r]),t.insertAdjacentElement("afterbegin",ye(e?"last":"first",this.beans)),o.insertAdjacentElement("afterbegin",ye(e?"next":"previous",this.beans)),i.insertAdjacentElement("afterbegin",ye(e?"previous":"next",this.beans)),r.insertAdjacentElement("afterbegin",ye(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:a=>this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(a):Pf(this.beans,a),forceFocusOutWhenTabGuardsAreEmpty:!0}),this.onPaginationChanged()}setAllowFocus(e){this.allowFocusInnerElement=e}getFocusableContainerName(){return"pagination"}onPaginationChanged(){let t=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.setDisplayed(t),t&&(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(let 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)}]){let{el:t,fn:o}=e;this.addManagedListeners(t,{click:o,keydown:i=>{(i.key===b.ENTER||i.key===b.SPACE)&&(i.preventDefault(),o())}})}Mf(this.beans,this,this.getGui()),this.areListenersSetup=!0}}onBtFirst(){this.previousAndFirstButtonsDisabled||this.pagination.goToFirstPage()}formatNumber(e){let t=this.gos.getCallback("paginationNumberFormatter");return t?t({value:e}):wR(e,this.getLocaleTextFunc.bind(this))}getTemplate(){let 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(){let e=this.pagination.getCurrentPage(),t=this.rowModel.isLastRowIndexKnown(),o=this.pagination.getTotalPages();this.previousAndFirstButtonsDisabled=e===0,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);let i=this.isZeroPagesToDisplay(),r=e===o-1;this.nextButtonDisabled=r||i,this.lastButtonDisabled=!t||i||e===o-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){Ru(e,t),e.classList.toggle("ag-disabled",t)}isZeroPagesToDisplay(){let e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages();return e&&t===0}updateLabels(){let e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages(),o=this.pagination.getMasterRowCount(),i=e?o:null,r=this.pagination.getCurrentPage(),a=this.pagination.getPageSize(),n,s;this.isZeroPagesToDisplay()?n=s=0:(n=a*r+1,s=n+a-1,e&&s>i&&(s=i));let l=n+a-1,c=!e&&o0?r+1:0,f=this.formatNumber(p);this.lbCurrent.textContent=f;let m,v;if(e)m=this.formatNumber(t),v=this.formatNumber(i);else{let C=u("more","more");m=C,v=C}this.lbTotal.textContent=m,this.lbRecordCount.textContent=v,this.announceAriaStatus(d,g,v,f,m)}announceAriaStatus(e,t,o,i,r){var g,u;let a=this.getLocaleTextFunc(),n=a("page","Page"),s=a("to","to"),l=a("of","of"),c=`${e} ${s} ${t} ${l} ${o}`,d=`${n} ${i} ${l} ${r}`;c!==this.ariaRowStatus&&(this.ariaRowStatus=c,(g=this.ariaAnnounce)==null||g.announceValue(c,"paginationRow")),d!==this.ariaPageStatus&&(this.ariaPageStatus=d,(u=this.ariaAnnounce)==null||u.announceValue(d,"paginationPage"))}},RR={selector:"AG-PAGINATION",component:kR},ER=100,FR=class extends S{constructor(){super(...arguments),this.beanName="pagination",this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=0,this.masterRowCount=0}postConstruct(){let 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 RR}isPaginateChildRows(){let e=this.gos;return e.get("groupHideParentOfSingleChild")||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")?!0: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){let t=this.currentPage;if(!this.active||t===e||typeof t!="number")return;let{editSvc:o}=this.beans;o!=null&&o.isEditing()&&(o.isBatchEditing()?o.cleanupEditors():o.stopEditing(void 0,{source:"api"})),this.currentPage=e,this.calculatePages(),this.dispatchPaginationChangedEvent({newPage:!0})}goToPageWithIndex(e){var o,i,r;if(!this.active)return;let t=e;this.paginateChildRows||(t=(r=(i=(o=this.beans.rowModel).getTopLevelIndexFromDisplayedIndex)==null?void 0:i.call(o,e))!=null?r:e),this.goToPage(Math.floor(t/this.pageSize))}isRowInPage(e){return this.active?e>=this.topDisplayedRowIndex&&e<=this.bottomDisplayedRowIndex:!0}getCurrentPage(){return this.currentPage}goToNextPage(){this.goToPage(this.currentPage+1)}goToPreviousPage(){this.goToPage(this.currentPage-1)}goToFirstPage(){this.goToPage(0)}goToLastPage(){let 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 M(this.pageSizeAutoCalculated)&&this.gos.get("paginationAutoPageSize")?this.pageSizeAutoCalculated:M(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:M(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:M(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:ER}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.beans.pageBounds.calculateBounds(this.topDisplayedRowIndex,this.bottomDisplayedRowIndex)}unsetAutoCalculatedPageSize(){if(this.pageSizeAutoCalculated===void 0)return;let e=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==e&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0}))}setPageSize(e,t){let o=this.pageSize;switch(t){case"autoCalculated":this.pageSizeAutoCalculated=e;break;case"pageSizeSelector":this.pageSizeFromPageSizeSelector=e,this.currentPage!==0&&this.goToFirstPage();break;case"initialState":this.pageSizeFromInitialState=e;break;case"gridOptions":this.pageSizeFromGridOptions=e,this.pageSizeFromInitialState=void 0,this.pageSizeFromPageSizeSelector=void 0,this.currentPage!==0&&this.goToFirstPage();break}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(){let e=this.totalPages;this.currentPage>=e&&(this.currentPage=e-1);let t=this.currentPage;(!isFinite(t)||isNaN(t)||t<0)&&(this.currentPage=0)}calculatePagesMasterRowsOnly(){let e=this.beans.rowModel,t=e.getTopLevelRowCount();if(this.masterRowCount=t,t<=0){this.setZeroRows();return}let o=this.pageSize,i=t-1;this.totalPages=Math.floor(i/o)+1,this.adjustCurrentPageIfInvalid();let r=this.currentPage,a=o*r,n=o*(r+1)-1;if(n>i&&(n=i),this.topDisplayedRowIndex=e.getTopLevelRowDisplayedIndex(a),n===i)this.bottomDisplayedRowIndex=e.getRowCount()-1;else{let s=e.getTopLevelRowDisplayedIndex(n+1);this.bottomDisplayedRowIndex=s-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){let e=this.beans.rowModel.getRowCount();if(this.masterRowCount=e,e===0){this.setZeroRows();return}let{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){let{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})}},DR={moduleName:"Pagination",version:D,beans:[FR,CR],icons:{first:"first",previous:"previous",next:"next",last:"last"},apiFunctions:{paginationIsLastPageFound:lR,paginationGetPageSize:cR,paginationGetCurrentPage:dR,paginationGetTotalPages:gR,paginationGetRowCount:uR,paginationGoToNextPage:hR,paginationGoToPreviousPage:pR,paginationGoToFirstPage:fR,paginationGoToLastPage:mR,paginationGoToPage:vR},dependsOn:[Ir]},MR=".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)}";function PR(e){var t,o;return(o=(t=e.pinnedRowModel)==null?void 0:t.getPinnedTopRowCount())!=null?o:0}function IR(e){var t,o;return(o=(t=e.pinnedRowModel)==null?void 0:t.getPinnedBottomRowCount())!=null?o:0}function TR(e,t){var o;return(o=e.pinnedRowModel)==null?void 0:o.getPinnedTopRow(t)}function AR(e,t){var o;return(o=e.pinnedRowModel)==null?void 0:o.getPinnedBottomRow(t)}function zR(e,t,o){var i;return(i=e.pinnedRowModel)==null?void 0:i.forEachPinnedRow(t,o)}var LR={moduleName:"PinnedRow",version:D,beans:[pf],css:[MR],apiFunctions:{getPinnedTopRowCount:PR,getPinnedBottomRowCount:IR,getPinnedTopRow:TR,getPinnedBottomRow:AR,forEachPinnedRow:zR},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},OR="\u2191",HR="\u2193",BR={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},VR=class extends _{constructor(){super(BR),this.eValue=E,this.eDelta=E,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){let o=Math.abs(t),i=e.formatValue(o),r=M(i)?i:o,a=t>=0,n=this.eDelta;a?n.textContent=OR+r:n.textContent=HR+r,n.classList.toggle("ag-value-change-delta-up",a),n.classList.toggle("ag-value-change-delta-down",!a)}setTimerToRemoveDelta(){this.refreshCount++;let 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"),ne(this.eDelta)}refresh(e,t=!1){var c;let{value:o,valueFormatted:i}=e,{eValue:r,lastValue:a,beans:n}=this;if(o===a||(M(i)?r.textContent=i:M(o)?r.textContent=o:ne(r),(c=n.filterManager)!=null&&c.isSuppressFlashingCellsBecauseFiltering()))return!1;let s=o&&typeof o=="object"&&"toNumber"in o?o.toNumber():o,l=a&&typeof a=="object"&&"toNumber"in a?a.toNumber():a;if(s===l)return!1;if(typeof s=="number"&&typeof l=="number"){let d=s-l;this.showDelta(e,d)}return a&&r.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=o,!0}},NR=".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}",GR={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},WR=class extends _{constructor(){super(GR),this.eCurrent=E,this.refreshCount=0,this.registerCSS(NR)}init(e){this.refresh(e,!0)}addSlideAnimation(){var r;this.refreshCount++;let e=this.refreshCount;(r=this.ePrevious)==null||r.remove();let{beans:t,eCurrent:o}=this,i=oe({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(()=>{var a;e===this.refreshCount&&((a=this.ePrevious)==null||a.remove(),this.ePrevious=null)},3e3)})}refresh(e,t=!1){var r;let o=e.value;if(Q(o)&&(o=""),o===this.lastValue||(r=this.beans.filterManager)!=null&&r.isSuppressFlashingCellsBecauseFiltering())return!1;t||this.addSlideAnimation(),this.lastValue=o;let i=this.eCurrent;return M(e.valueFormatted)?i.textContent=e.valueFormatted:M(e.value)?i.textContent=o:ne(i),!0}},qR=class extends S{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")){let r=this.animations[t];r.delete(e);let a=Date.now(),n=a+o,s=a+o+i,l={phase:"flash",flashEndTime:n,fadeEndTime:s};r.set(e,l);let c=`ag-cell-${t}`,d=`${c}-animation`,{comp:g,eGui:{style:u}}=e;g.toggleCss(c,!0),g.toggleCss(d,!1),u.removeProperty("transition"),u.removeProperty("transition-delay"),this.nextAnimationTime&&n+15{this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),o)}),this.nextAnimationTime=n)}advanceAnimations(){let e=Date.now(),t=null;for(let o of Object.keys(this.animations)){let i=this.animations[o],r=`ag-cell-${o}`,a=`${r}-animation`;for(let[n,s]of i){if(!n.isAlive()||!n.comp){i.delete(n);continue}let{phase:l,flashEndTime:c,fadeEndTime:d}=s,g=l==="flash"?c:d;if(!(e+15>=g)){t=Math.min(g,t!=null?t:1/0);continue}let{comp:h,eGui:{style:p}}=n;switch(l){case"flash":h.toggleCss(r,!1),h.toggleCss(a,!0),p.transition=`background-color ${d-c}ms`,p.transitionDelay=`${c-e}ms`,t=Math.min(d,t!=null?t:1/0),s.phase="fade";break;case"fade":h.toggleCss(r,!1),h.toggleCss(a,!1),p.removeProperty("transition"),p.removeProperty("transition-delay"),i.delete(n);break}}}t==null?(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;let o=kf(e.cellPosition);t.cells[o]&&this.animateCell(e,"highlight")}flashCell(e,t){this.animateCell(e,"data-changed",t==null?void 0:t.flashDuration,t==null?void 0:t.fadeDuration)}destroy(){for(let e of Object.keys(this.animations))this.animations[e].clear()}};function _R(e,t={}){let{cellFlashSvc:o}=e;o&&e.frameworkOverrides.wrapIncoming(()=>{for(let i of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns))o.flashCell(i,t)})}var UR={moduleName:"HighlightChanges",version:D,beans:[qR],userComponents:{agAnimateShowChangeCellRenderer:VR,agAnimateSlideCellRenderer:WR},apiFunctions:{flashCells:_R}};function jR(e,t,o){if(!t)return;let i=e.ctrlsSvc.getGridBodyCtrl().eGridBody,r=`aria-${t}`;o===null?i.removeAttribute(r):i.setAttribute(r,o)}function KR(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function $R(e){e.frameworkOverrides.wrapIncoming(()=>{for(let t of e.ctrlsSvc.getHeaderRowContainerCtrls())t.refresh()})}function YR(e){var t,o;return(o=(t=e.animationFrameSvc)==null?void 0:t.isQueueEmpty())!=null?o:!0}function QR(e){var t;(t=e.animationFrameSvc)==null||t.flushAllFrames()}function ZR(e){return{rowHeight:Ut(e),headerHeight:Ci(e)}}function JR(e,t={}){var a;let o=[];for(let n of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns)){let s=n.getCellRenderer();s!=null&&o.push(to(s))}if((a=t.columns)!=null&&a.length)return o;let i=[],r=ja(t.rowNodes);for(let n of e.rowRenderer.getAllRowCtrls()){if(r&&!Ka(n.rowNode,r)||!n.isFullWidth())continue;let s=n.getFullWidthCellRenderers();for(let l=0;l{var p;let u=g.__autoHeights,h=Ft(this.beans,g).height;for(let f of r){let m=u==null?void 0:u[f.getColId()],v=o==null?void 0:o.getCellSpan(f,g);if(v){if(v.getLastNode()!==g)continue;if(m=(p=o==null?void 0:o.getCellSpan(f,g))==null?void 0:p.getLastNodeAutoHeight(),!m)return}if(m==null){if(this.colSpanSkipCell(f,g))continue;return}h=Math.max(m,h)}h!==g.rowHeight&&(g.setRowHeight(h),a=!0)};(s=i==null?void 0:i.forEachPinnedRow)==null||s.call(i,"top",n),(l=i==null?void 0:i.forEachPinnedRow)==null||l.call(i,"bottom",n),(c=t.forEachDisplayedNode)==null||c.call(t,n),a&&((d=t.onRowHeightChanged)==null||d.call(t))}setRowAutoHeight(e,t,o){var r;if((r=e.__autoHeights)!=null||(e.__autoHeights={}),t==null){delete e.__autoHeights[o.getId()];return}let i=e.__autoHeights[o.getId()];e.__autoHeights[o.getId()]=t,i!==t&&this.requestCheckAutoHeight()}colSpanSkipCell(e,t){let{colModel:o,colViewport:i,visibleCols:r}=this.beans;if(!o.colSpanActive)return!1;let a=[];switch(e.getPinned()){case"left":a=r.getLeftColsForRow(t);break;case"right":a=r.getRightColsForRow(t);break;case null:a=i.getColsWithinViewport(t);break}return!a.includes(e)}setupCellAutoHeight(e,t,o){if(!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;let i=t.parentElement,{rowNode:r,column:a}=e,n=this.beans,s=d=>{var C;if((C=this.beans.editSvc)!=null&&C.isEditing(e)||!e.isAlive()||!o.isAlive())return;let{paddingTop:g,paddingBottom:u,borderBottomWidth:h,borderTopWidth:p}=ro(i),f=g+u+h+p,v=t.offsetHeight+f;if(d<5){let w=te(n),y=!(w!=null&&w.contains(t)),x=v==0;if(y||x){window.setTimeout(()=>s(d+1),0);return}}this.setRowAutoHeight(r,v,a)},l=()=>s(0);l();let c=Tt(n,t,l);return o.addDestroyFunc(()=>{c(),this.setRowAutoHeight(r,void 0,a)}),!0}setAutoHeightActive(e){this.active=e.list.some(t=>t.isVisible()&&t.isAutoHeight())}areRowsMeasured(){if(!this.active)return!0;let e=this.beans.rowRenderer.getAllRowCtrls(),t=null;for(let{rowNode:o}of e)if((!t||this.beans.colModel.colSpanActive)&&(t=this.beans.colViewport.getColsWithinViewport(o).filter(r=>r.isAutoHeight())),t.length!==0){if(!o.__autoHeights)return!1;for(let i of t){let r=o.__autoHeights[i.getColId()];if(!r||o.rowHeight{p=y,f=null,m=x},C=y=>{let x=!y.isExpandable()&&!y.group&&!y.detail&&(d?!d({rowNode:y}):!0);if(y.rowIndex==null||!x){v(null,null);return}if(p==null||y.level!==p.level||y.footer||f&&y.rowIndex-1!==(f==null?void 0:f.getLastNode().rowIndex)){v(y,a.getValue(t,y,"data"));return}let R=a.getValue(t,y,"data");if(h){let F=O(o,{valueA:m,nodeA:p,valueB:R,nodeB:y,column:t,colDef:s});if(!u(F)){v(y,R);return}}else if(g?!g(m,R):m!==R){v(y,R);return}if(!f){let F=l==null?void 0:l.get(p);(F==null?void 0:F.firstNode)===p?(F.reset(),f=F):f=new oE(t,p),c.set(p,f)}f.addSpannedNode(y),c.set(y,f)};switch(e){case"center":(w=r.forEachDisplayedNode)==null||w.call(r,y=>{(!n||n.isRowInPage(y.rowIndex))&&C(y)}),this.centerValueNodeMap=c;break;case"top":i==null||i.forEachPinnedRow("top",C),this.topValueNodeMap=c;break;case"bottom":i==null||i.forEachPinnedRow("bottom",C),this.bottomValueNodeMap=c;break}}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}}},rE=class extends S{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=re(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=re(this,this.dispatchCellsUpdatedEvent.bind(this,!1),0),this.pinnedTimeout=null,this.modelTimeout=null}postConstruct(){let 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){let{gos:t}=this.beans;if(!t.get("enableCellSpan")||this.spanningColumns.has(e))return;let o=this.createManagedBean(new iE(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}){let{spannedRowRenderer:t}=this.beans;if(e.rowPinned){if(this.pinnedTimeout!=null)return;this.pinnedTimeout=window.setTimeout(()=>{this.pinnedTimeout=null,this.buildPinnedCaches(),t==null||t.createCtrls("top"),t==null||t.createCtrls("bottom")},0);return}this.modelTimeout==null&&(this.modelTimeout=window.setTimeout(()=>{this.modelTimeout=null,this.buildModelCaches(),t==null||t.createCtrls("center")},0))}buildModelCaches(){this.modelTimeout!=null&&clearTimeout(this.modelTimeout),this.spanningColumns.forEach(e=>e.buildCache("center")),this.debounceModelEvent()}buildPinnedCaches(){this.pinnedTimeout!=null&&clearTimeout(this.pinnedTimeout),this.spanningColumns.forEach(e=>{e.buildCache("top"),e.buildCache("bottom")}),this.debouncePinnedEvent()}isCellSpanning(e,t){let o=this.spanningColumns.get(e);return o?o.isCellSpanning(t):!1}getCellSpanByPosition(e){let{pinnedRowModel:t,rowModel:o}=this.beans,i=e.column,r=e.rowIndex,a=this.spanningColumns.get(i);if(!a)return;let n;switch(e.rowPinned){case"top":n=t==null?void 0:t.getPinnedTopRow(r);break;case"bottom":n=t==null?void 0:t.getPinnedBottomRow(r);break;default:n=o.getRow(r)}if(n)return a.getCellSpan(n)}getCellStart(e){let t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.firstNode.rowIndex}:e}getCellEnd(e){let t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.getLastNode().rowIndex}:e}getCellSpan(e,t){let o=this.spanningColumns.get(e);if(o)return o.getCellSpan(t)}forEachSpannedColumn(e,t){for(let[o,i]of this.spanningColumns)if(i.isCellSpanning(e)){let r=i.getCellSpan(e);t(o,r)}}destroy(){super.destroy(),this.spanningColumns.clear()}},aE=class extends Eo{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,r,a,n){this.eWrapper=o,super.setComp(e,t,o,i,r,a,n),this.setAriaRowSpan()}isCellSpanning(){return!0}getCellSpan(){return this.cellSpan}refreshAriaRowIndex(){let{eGui:e,rowNode:t}=this;!e||t.rowIndex==null||ri(e,t.rowIndex)}setAriaRowSpan(){Pu(this.eGui,this.cellSpan.spannedNodes.size)}setFocusedCellPosition(e){this.focusedCellPosition=e}getFocusedCellPosition(){var e;return(e=this.focusedCellPosition)!=null?e:this.cellPosition}checkCellFocused(){let 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){let{beans:t}=this;if(hi(t)){this.focusedCellPosition=void 0;return}let 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}},nE=class extends mr{getInitialRowClasses(e){return["ag-spanned-row"]}getNewCellCtrl(e){var i;let t=(i=this.beans.rowSpanSvc)==null?void 0:i.getCellSpan(e,this.rowNode);if(!(!t||t.firstNode!==this.rowNode))return new aE(t,this,this.beans)}isCorrectCtrlForSpan(e){var i;let t=(i=this.beans.rowSpanSvc)==null?void 0:i.getCellSpan(e.column,this.rowNode);return!t||t.firstNode!==this.rowNode?!1:e.getCellSpan()===t}onRowHeightChanged(){}refreshFirstAndLastRowStyles(){}addHoverFunctionality(){}resetHoveredStatus(){}},sE=class extends S{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){let{rowSpanSvc:t}=this.beans,o=this.getCtrlsMap(e),i=o.size,r=this.getAllRelevantRowControls(e),a=new Map,n=!1;for(let l of r)l.isAlive()&&(t==null||t.forEachSpannedColumn(l.rowNode,(c,d)=>{if(a.has(d.firstNode))return;let g=o.get(d.firstNode);if(g){a.set(d.firstNode,g),o.delete(d.firstNode);return}n=!0;let u=new nE(d.firstNode,this.beans,!1,!1,!1);a.set(d.firstNode,u)}));this.setCtrlsMap(e,a);let s=a.size===i;if(!(!n&&s)){for(let l of o.values())l.destroyFirstPass(!0),l.destroySecondPass();this.dispatchLocalEvent({type:"spannedRowsUpdated",ctrlsKey:e})}}getAllRelevantRowControls(e){let{rowRenderer:t}=this.beans;switch(e){case"top":return t.topRowCtrls;case"bottom":return t.bottomRowCtrls;case"center":return t.allRowCtrls}}getCellByPosition(e){let{rowSpanSvc:t}=this.beans,o=t==null?void 0:t.getCellSpanByPosition(e);if(!o)return;let i=this.getCtrlsMap(e.rowPinned).get(o.firstNode);if(i)return i.getAllCellCtrls().find(r=>r.column===e.column)}getCtrls(e){return[...this.getCtrlsMap(e).values()]}destroyRowCtrls(e){for(let 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;break}}destroy(){super.destroy(),this.destroyRowCtrls("top"),this.destroyRowCtrls("bottom"),this.destroyRowCtrls("center")}},lE={moduleName:"CellSpan",version:D,beans:[rE,sE]},cE=class extends S{constructor(){super(...arguments),this.beanName="selectionColSvc"}postConstruct(){this.addManagedPropertyListener("rowSelection",e=>{this.onSelectionOptionsChanged(e.currentValue,e.previousValue,ko(e.source))}),this.addManagedPropertyListener("selectionColumnDef",this.updateColumns.bind(this))}addColumns(e){let t=this.columns;t!=null&&(e.list=t.list.concat(e.list),e.tree=t.tree.concat(e.tree),ip(e))}createColumns(e,t){var u,h,p,f,m,v;let o=()=>{var C;rr(this.beans,(C=this.columns)==null?void 0:C.tree),this.columns=null},i=e.treeDepth,a=((h=(u=this.columns)==null?void 0:u.treeDepth)!=null?h:-1)==i,n=this.generateSelectionCols();if(op(n,(f=(p=this.columns)==null?void 0:p.list)!=null?f:[])&&a)return;o();let{colGroupSvc:l}=this.beans,c=(m=l==null?void 0:l.findDepth(e.tree))!=null?m:0,d=(v=l==null?void 0:l.balanceTreeForAutoCols(n,c))!=null?v:[];this.columns={list:n,tree:d,treeDepth:c,map:{}},t(C=>{if(!C)return null;let w=C.filter(y=>!At(y));return[...n,...w]})}updateColumns(e){var i,r;let t=ko(e.source),{beans:o}=this;for(let a of(r=(i=this.columns)==null?void 0:i.list)!=null?r:[]){let n=this.createSelectionColDef(e.currentValue);a.setColDef(n,null,t),Ve(o,{state:[ap(n,a.colId)]},t)}}getColumn(e){var t,o;return(o=(t=this.columns)==null?void 0:t.list.find(i=>Zo(i,e)))!=null?o:null}getColumns(){var e,t;return(t=(e=this.columns)==null?void 0:e.list)!=null?t:null}isSelectionColumnEnabled(){var n,s,l;let{gos:e,beans:t}=this,o=e.get("rowSelection");if(typeof o!="object"||!_t(e))return!1;let i=((l=(s=(n=t.autoColSvc)==null?void 0:n.getColumns())==null?void 0:s.length)!=null?l:0)>0;if(o.checkboxLocation==="autoGroupColumn"&&i)return!1;let r=!!yo(o),a=Ni(o);return r||a}createSelectionColDef(e){let{gos:t}=this,o=e!=null?e:t.get("selectionColumnDef"),i=t.get("enableRtl"),{rowSpan:r,spanRows:a,...n}=o!=null?o:{};return{width:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:i?"right":"left",comparator(s,l,c,d){let g=c.isSelected(),u=d.isSelected();return g===u?0:g?1:-1},editable:!1,suppressFillHandle:!0,suppressAutoSize:!0,pinned:null,...n,colId:Vc,chartDataType:"excluded"}}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];let e=this.createSelectionColDef(),t=e.colId;this.gos.validateColDef(e,t,!0);let o=new ao(e,null,t,!1);return this.createBean(o),[o]}onSelectionOptionsChanged(e,t,o){let i=t&&typeof t!="string"?yo(t):void 0,r=e&&typeof e!="string"?yo(e):void 0,a=i!==r,n=t&&typeof t!="string"?Ni(t):void 0,s=e&&typeof e!="string"?Ni(e):void 0,l=n!==s,c=tr(e),d=tr(t);(a||l||c!==d)&&this.beans.colModel.refreshAll(o)}destroy(){var e;rr(this.beans,(e=this.columns)==null?void 0:e.tree),super.destroy()}refreshVisibility(e,t,o){var l,c;if(!((l=this.columns)!=null&&l.list.length))return;let i=e.length+t.length+o.length;if(i===0)return;let r=this.columns.list[0];if(!r.isVisible())return;let a=()=>{let d;switch(r.pinned){case"left":case!0:d=e;break;case"right":d=o;break;default:d=t}d&&Xe(d,r)};(((c=this.beans.rowNumbersSvc)==null?void 0:c.getColumn(Nc))?2:1)===i&&a()}},dE=':where(.ag-selection-checkbox) .ag-checkbox-input-wrapper:before{content:"";cursor:pointer;inset:-8px;position:absolute}';function gE(e,t){var n;if(!t.nodes.every(s=>s.rowPinned&&!Mr(s)?(k(59),!1):s.id===void 0?(k(60),!1):!0))return;let{nodes:i,source:r,newValue:a}=t;(n=e.selectionSvc)==null||n.setNodesSelected({nodes:i,source:r!=null?r:"api",newValue:a})}function uE(e,t,o="apiSelectAll"){var i;(i=e.selectionSvc)==null||i.selectAllRowNodes({source:o,selectAll:t})}function hE(e,t,o="apiSelectAll"){var i;(i=e.selectionSvc)==null||i.deselectAllRowNodes({source:o,selectAll:t})}function pE(e,t="apiSelectAllFiltered"){var o;(o=e.selectionSvc)==null||o.selectAllRowNodes({source:t,selectAll:"filtered"})}function fE(e,t="apiSelectAllFiltered"){var o;(o=e.selectionSvc)==null||o.deselectAllRowNodes({source:t,selectAll:"filtered"})}function mE(e,t="apiSelectAllCurrentPage"){var o;(o=e.selectionSvc)==null||o.selectAllRowNodes({source:t,selectAll:"currentPage"})}function vE(e,t="apiSelectAllCurrentPage"){var o;(o=e.selectionSvc)==null||o.deselectAllRowNodes({source:t,selectAll:"currentPage"})}function CE(e){var t,o;return(o=(t=e.selectionSvc)==null?void 0:t.getSelectedNodes())!=null?o:[]}function wE(e){var t,o;return(o=(t=e.selectionSvc)==null?void 0:t.getSelectedRows())!=null?o:[]}var bE={tag:"div",cls:"ag-selection-checkbox",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},yE=class extends _{constructor(){super(bE,[Nn]),this.eCheckbox=E}postConstruct(){this.eCheckbox.setPassive(!0)}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){let e=this.getLocaleTextFunc(),{rowNode:t,eCheckbox:o}=this,i=t.isSelected(),r=yr(e,i),[a,n]=t.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],s=e(a,n);o.setValue(i,!0),o.setInputAriaLabel(`${s} (${r})`)}init(e){if(this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getWrapperElement(),{dblclick:Xt,click:i=>{var r;Xt(i),!this.eCheckbox.isDisabled()&&((r=this.beans.selectionSvc)==null||r.handleSelectionEvent(i,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:i,previousValue:r})=>{let a=typeof i=="object"?Wr(i):void 0,n=typeof r=="object"?Wr(r):void 0;a!==n&&this.onSelectableChanged()}),Ma(this.gos)||typeof this.getIsVisible()=="function"){let i=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:i}),this.addManagedListeners(this.rowNode,{dataChanged:i,cellChanged:i}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}showOrHideSelect(){let{column:e,rowNode:t,overrides:o,gos:i}=this,r=t.selectable,a=this.getIsVisible(),n;if(typeof a=="function"){let g=o==null?void 0:o.callbackParams;if(!e)n=a({...g,node:t,data:t.data});else{let u=e.createColumnFunctionCallbackParams(t);n=a({...g,...u})}}else n=a!=null?a:!1;let s=r&&!n||!r&&n,l=r||n,c=i.get("rowSelection"),d=c&&typeof c!="string"?!Wr(c):!!(e!=null&&e.getColDef().showDisabledCheckboxes);this.setVisible(l&&(s?d:!0)),this.setDisplayed(l&&(s?d:!0)),l&&this.eCheckbox.setDisabled(s),o!=null&&o.removeHidden&&this.setDisplayed(l)}getIsVisible(){var o,i;let e=this.overrides;if(e)return e.isVisible;let t=this.gos.get("rowSelection");return t&&typeof t!="string"?yo(t):(i=(o=this.column)==null?void 0:o.getColDef())==null?void 0:i.checkboxSelection}},SE=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(){var e;if(this.cachedRange.length===0){let t=this.getRoot(),o=this.getEnd();if(t==null||o==null)return this.cachedRange;this.cachedRange=(e=this.getNodesInRange(t,o))!=null?e:[]}return this.cachedRange}isInRange(e){return this.rootId===null?!1:this.getRange().some(t=>t.id===e.id)}getRoot(e){if(this.rootId)return this.getRowNode(this.rootId);if(e)return this.setRoot(e),e}getEnd(){if(this.endId)return this.getRowNode(this.endId)}getRowNode(e){let t,{rowModel:o,pinnedRowModel:i}=this;return t!=null||(t=o.getRowNode(e)),i!=null&&i.isManual()&&(t!=null||(t=i.getPinnedRowById(e,"top")),t!=null||(t=i.getPinnedRowById(e,"bottom"))),t}truncate(e){let t=this.getRange();if(t.length===0)return{keep:[],discard:[]};let o=t[0].id===this.rootId,i=t.findIndex(r=>r.id===e.id);if(i>-1){let r=t.slice(0,i),a=t.slice(i+1);return this.setEndRange(e),o?{keep:r,discard:a}:{keep:a,discard:r}}else return{keep:t,discard:[]}}extend(e,t=!1){let o=this.getRoot();if(o==null){let r=this.getRange().slice();return t&&e.depthFirstSearch(a=>!a.group&&r.push(a)),r.push(e),this.setRoot(e),{keep:r,discard:[]}}let i=this.getNodesInRange(o,e);if(!i)return this.setRoot(e),{keep:[e],discard:[]};if(i.find(r=>r.id===this.endId))return this.setEndRange(e),{keep:this.getRange(),discard:[]};{let r=this.getRange().slice();return this.setEndRange(e),{keep:this.getRange(),discard:r}}}getNodesInRange(e,t){var r,a,n,s,l,c;let{pinnedRowModel:o,rowModel:i}=this;if(!(o!=null&&o.isManual()))return i.getNodesInRangeForSelection(e,t);if(e.rowPinned==="top"&&!t.rowPinned)return Re(o,"top",e,void 0).concat((r=i.getNodesInRangeForSelection(i.getRow(0),t))!=null?r:[]);if(e.rowPinned==="bottom"&&!t.rowPinned){let d=Re(o,"bottom",void 0,e),g=i.getRowCount(),u=i.getRow(g-1);return((a=i.getNodesInRangeForSelection(t,u))!=null?a:[]).concat(d)}if(!e.rowPinned&&!t.rowPinned)return i.getNodesInRangeForSelection(e,t);if(e.rowPinned==="top"&&t.rowPinned==="top")return Re(o,"top",e,t);if(e.rowPinned==="bottom"&&t.rowPinned==="top"){let d=Re(o,"top",t,void 0),g=Re(o,"bottom",void 0,e),u=i.getRow(0),h=i.getRow(i.getRowCount()-1);return d.concat((n=i.getNodesInRangeForSelection(u,h))!=null?n:[]).concat(g)}if(!e.rowPinned&&t.rowPinned==="top")return Re(o,"top",t,void 0).concat((s=i.getNodesInRangeForSelection(i.getRow(0),e))!=null?s:[]);if(e.rowPinned==="top"&&t.rowPinned==="bottom"){let d=Re(o,"top",e,void 0),g=Re(o,"bottom",void 0,t),u=i.getRow(0),h=i.getRow(i.getRowCount()-1);return d.concat((l=i.getNodesInRangeForSelection(u,h))!=null?l:[]).concat(g)}if(e.rowPinned==="bottom"&&t.rowPinned==="bottom")return Re(o,"bottom",e,t);if(!e.rowPinned&&t.rowPinned==="bottom"){let d=Re(o,"bottom",void 0,t),g=i.getRow(i.getRowCount());return((c=i.getNodesInRangeForSelection(e,g))!=null?c:[]).concat(d)}return null}},xE=class extends S{constructor(e){super(),this.column=e,this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1}onSpaceKeyDown(e){let t=this.cbSelectAll;t.isDisplayed()&&!t.getGui().contains(Y(this.beans))&&(e.preventDefault(),t.setValue(!t.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(e){this.headerCellCtrl=e;let t=this.createManagedBean(new Vn);this.cbSelectAll=t,t.addCss("ag-header-select-all"),Rt(t.getGui(),"presentation"),this.showOrHideSelectAll();let 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:i,previousValue:r})=>{let a=n=>typeof n=="string"||!n||n.mode==="singleRow"?void 0:n.selectAll;a(i)!==a(r)&&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(e.source==="uiColumnMoved")}showOrHideSelectAll(e=!1){let 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;let e=this.getSelectAllMode(),t=this.beans.selectionSvc,o=this.cbSelectAll,i=t.getSelectAllState(e);o.setValue(i);let r=t.hasNodesToSelect(e);o.setDisabled(!r),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(e=!1){let t=this.getLocaleTextFunc(),{headerCellCtrl:o,cbSelectAll:i,cbSelectAllVisible:r}=this,a=i.getValue(),n=yr(t,a),s=t("ariaRowSelectAll","Press Space to toggle all rows selection");o.setAriaDescriptionProperty("selectAll",r?`${s} (${n})`:null),i.setInputAriaLabel(t("ariaHeaderSelection","Column with Header Selection")),e||o.announceAriaDescription()}checkSelectionType(e){return di(this.gos)?!0:(k(128,{feature:e}),!1)}checkRightRowModelType(e){let{gos:t,rowModel:o}=this.beans;return ee(t)||mi(t)?!0:(k(129,{feature:e,rowModel:o.getType()}),!1)}onCbSelectAll(){if(this.processingEventFromCheckbox||!this.cbSelectAllVisible)return;let e=this.cbSelectAll.getValue(),t=this.getSelectAllMode(),o="uiSelectAll";t==="currentPage"?o="uiSelectAllCurrentPage":t==="filtered"&&(o="uiSelectAllFiltered");let i={source:o,selectAll:t},r=this.beans.selectionSvc;e?r.selectAllRowNodes(i):r.deselectAllRowNodes(i)}isCheckboxSelection(){let{column:e,gos:t,beans:o}=this,a=typeof t.get("rowSelection")=="object"?"headerCheckbox":"headerCheckboxSelection";return eu(o,e)&&this.checkRightRowModelType(a)&&this.checkSelectionType(a)}getSelectAllMode(){let e=Lc(this.gos,!1);if(e)return e;let{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 eu({gos:e,selectionColSvc:t},o){let i=e.get("rowSelection"),r=o.getColDef(),{headerCheckboxSelection:a}=r,n=!1;if(typeof i=="object"){let l=At(o),c=xn(o);(tr(i)==="autoGroupColumn"&&c||l&&(t!=null&&t.isSelectionColumnEnabled()))&&(n=Ni(i))}else typeof a=="function"?n=a(O(e,{column:o,colDef:r})):n=!!a;return n}var kE=class extends S{postConstruct(){let{gos:e,beans:t}=this;this.selectionCtx=new SE(t.rowModel,t.pinnedRowModel),this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],()=>{let o=Ma(e);o!==this.isRowSelectable&&(this.isRowSelectable=o,this.updateSelectable())}),this.isRowSelectable=Ma(e),this.addManagedEventListeners({cellValueChanged:o=>this.updateRowSelectable(o.node),rowNodeDataChanged:o=>this.updateRowSelectable(o.node)})}destroy(){super.destroy(),this.selectionCtx.reset()}createCheckboxSelectionComponent(){return new yE}createSelectAllFeature(e){if(eu(this.beans,e))return new xE(e)}isMultiSelect(){return di(this.gos)}onRowCtrlSelected(e,t,o){let i=!!e.rowNode.isSelected();e.forEachGui(o,r=>{r.rowComp.toggleCss("ag-row-selected",i);let a=r.element;nc(a,i),a.contains(Y(this.beans))&&t(r)})}announceAriaRowSelection(e){var a,n;if(this.isRowSelectionBlocked(e))return;let t=e.isSelected(),o=(a=this.beans.editSvc)==null?void 0:a.isEditing({rowNode:e});if(!e.selectable||o)return;let r=this.getLocaleTextFunc()(t?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${t?"deselect":"select"} this row`);(n=this.beans.ariaAnnounce)==null||n.announceValue(r,"rowSelection")}isRowSelectionBlocked(e){return!e.selectable||e.rowPinned&&!Mr(e)||!_t(this.gos)}updateRowSelectable(e,t){var i,r;let o=e.rowPinned&&e.pinnedSibling?e.pinnedSibling.selectable:(r=(i=this.isRowSelectable)==null?void 0:i.call(this,e))!=null?r:!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(gi(this.gos)){let r=this.calculateSelectedFromChildren(e);this.setNodesSelected({nodes:[e],newValue:r!=null?r:!1,source:"selectableChanged"});return}e.isSelected()&&!e.selectable&&this.setNodesSelected({nodes:[e],newValue:!1,source:"selectableChanged"})}}calculateSelectedFromChildren(e){var i;let t=!1,o=!1;if(!((i=e.childrenAfterGroup)!=null&&i.length))return e.selectable?e.__selected:null;for(let r=0;r{let t=gi(e),o=or(e),i=ir(e)==="filteredDescendants";this.masterSelectsDetail=Es(e)==="detail",(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;let i=this.inferNodeSelections(t,e.shiftKey,e.metaKey||e.ctrlKey,o);if(i==null)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);{let r=i.checkFilteredNodes?ou(i.node):i.newValue;return this.setNodesSelected({nodes:[i.node],newValue:r,clearSelection:i.clearSelection,keepDescendants:i.keepDescendants,event:e,source:o})}}setNodesSelected({newValue:e,clearSelection:t,suppressFinishActions:o,nodes:i,event:r,source:a,keepDescendants:n=!1}){var c;if(i.length===0)return 0;let{gos:s}=this;if(!_t(s)&&e)return k(132),0;if(i.length>1&&!this.isMultiSelect())return k(130),0;let l=0;for(let d=0;d0&&(this.updateGroupsFromChildrenSelections(a),this.dispatchSelectionChanged(a))),l}selectRange(e,t,o){let i=0;return e.forEach(r=>{let a=r.primaryRow;if(a.group&&this.groupSelectsDescendants)return;this.selectRowNode(a,t,void 0,o)&&i++}),i>0&&(this.updateGroupsFromChildrenSelections(o),this.dispatchSelectionChanged(o)),i}selectChildren(e,t,o){let 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(){let e=[];return this.selectedNodes.forEach(t=>t.data&&e.push(t.data)),e}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(e){let 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;let{gos:o,rowModel:i}=this.beans;if(!ee(o,i))return!1;let r=i.rootNode;if(!r)return!1;let a=!1,n=s=>{if(s!==r){let l=this.calculateSelectedFromChildren(s);a=this.selectRowNode(s,l===null?!1:l,void 0,e)||a}};return io(r,this.beans.rowModel.hierarchical,t,n),a}clearOtherNodes(e,t,o){let i=new Map,r=0;return this.selectedNodes.forEach(a=>{let n=a.id==e.id;if((t?!FE(e,a):!0)&&!n){let l=this.selectedNodes.get(a.id);r+=this.setNodesSelected({nodes:[l],newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:o}),this.groupSelectsDescendants&&a.parent&&i.set(a.parent.id,a.parent)}}),i.forEach(a=>{let n=this.calculateSelectedFromChildren(a);this.selectRowNode(a,n===null?!1:n,void 0,o)}),r}onRowSelected(e){let 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;let t=new Mt(this.beans);return t.id=e.id,t.data=e.data,t.__selected=e.__selected,t.level=e.level,t}syncInOldRowNode(e,t){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){let t=this.getSelectionCount();this.resetNodes(),t&&this.dispatchSelectionChanged(e)}resetNodes(){this.selectedNodes.forEach(e=>{this.selectRowNode(e,!1)}),this.selectedNodes.clear()}getBestCostNodeSelection(){let{gos:e,rowModel:t}=this.beans;if(!ee(e,t))return;let o=t.getTopLevelNodes();if(o===null)return;let i=[];function r(a){for(let n=0,s=a.length;n{let n=this.selectRowNode(a.primaryRow,!1,void 0,e);i||(i=n)};if(t==="currentPage"||t==="filtered"){if(!o){W(102);return}this.getNodesToSelect(t).forEach(r)}else this.selectedNodes.forEach(r),this.reset(e);if(this.selectionCtx.selectAll=!1,o&&this.groupSelectsDescendants){let a=this.updateGroupsFromChildrenSelections(e);i||(i=a)}i&&this.dispatchSelectionChanged(e)}getSelectedCounts(e){let t=0,o=0;return this.getNodesToSelect(e).forEach(i=>{this.groupSelectsDescendants&&i.group||(i.isSelected()?t++:i.selectable&&o++)}),{selectedCount:t,notSelectedCount:o}}getSelectAllState(e){var i;let{selectedCount:t,notSelectedCount:o}=this.getSelectedCounts(e);return(i=tu(t,o))!=null?i:null}hasNodesToSelect(e){return this.getNodesToSelect(e).filter(t=>t.selectable).length>0}getNodesToSelect(e){if(!this.canSelectAll())return[];let t=[],o=r=>t.push(r);if(e==="currentPage")return this.forEachNodeOnPage(r=>{if(!r.group){o(r);return}if(!r.footer&&!r.expanded){let a=n=>{o(n);let s=n.childrenAfterFilter;if(s)for(let l=0,c=s.length;l{let s=this.selectRowNode(n.primaryRow,!0,void 0,i);a||(a=s)}),o.selectAll=!0,ee(t)&&this.groupSelectsDescendants){let n=this.updateGroupsFromChildrenSelections(i);a||(a=n)}a&&this.dispatchSelectionChanged(i)}getSelectionState(){return this.isEmpty()?null:Array.from(this.selectedNodes.keys())}setSelectionState(e,t,o){if(e||(e=[]),!Array.isArray(e)){W(103);return}let i=new Set(e),r=[];this.beans.rowModel.forEachNode(a=>{i.has(a.id)&&r.push(a)}),o&&this.resetNodes(),this.setNodesSelected({newValue:!0,nodes:r,source:t})}canSelectAll(){return ee(this.beans.gos)}updateSelectable(e){var n;let{gos:t,rowModel:o}=this.beans;if(!_t(t))return;let i="selectableChanged",r=ee(t)&&this.groupSelectsDescendants,a=[];if(r){let s=o.rootNode;s&&io(s,o.hierarchical,e,l=>{let c=!1;for(let d of l.childrenAfterGroup)c||(c=d.selectable),!d.group&&!this.updateRowSelectable(d,!0)&&d.isSelected()&&a.push(d);this.setRowSelectable(l,c,!0)})}else o.forEachNode(s=>{!this.updateRowSelectable(s,!0)&&s.isSelected()&&a.push(s)});a.length&&this.setNodesSelected({nodes:a,newValue:!1,source:i}),!e&&r&&((n=this.updateGroupsFromChildrenSelections)==null||n.call(this,i))}updateSelectableAfterGrouping(e){var t;this.updateSelectable(e),this.groupSelectsDescendants&&((t=this.updateGroupsFromChildrenSelections)!=null&&t.call(this,"rowGroupChanged",e))&&this.dispatchSelectionChanged("rowGroupChanged")}refreshMasterNodeState(e,t){var a,n;if(!this.masterSelectsDetail)return;let o=(n=(a=e.detailNode)==null?void 0:a.detailGridInfo)==null?void 0:n.api;if(!o)return;let i=EE(o);e.isSelected()!==i&&this.selectRowNode(e,i,t,"masterDetail")&&this.dispatchSelectionChanged("masterDetail"),i||this.detailSelection.set(e.id,new Set(o.getSelectedNodes().map(s=>s.id)))}setDetailSelectionState(e,t,o){if(this.masterSelectsDetail){if(!di(t)){k(269);return}switch(e.isSelected()){case!0:{o.selectAll();break}case!1:{o.deselectAll();break}case void 0:{let i=this.detailSelection.get(e.id);if(i){let r=[];for(let a of i){let n=o.getRowNode(a);n&&r.push(n)}o.setNodesSelected({nodes:r,newValue:!0,source:"masterDetail"})}break}default:break}}}dispatchSelectionChanged(e){this.eventSvc.dispatchEvent({type:"selectionChanged",source:e,selectedNodes:this.getSelectedNodes(),serverSideState:null})}};function EE(e){let t=0,o=0;return e.forEachNode(i=>{i.isSelected()?t++:i.selectable&&o++}),tu(t,o)}function tu(e,t){if(e===0&&t===0)return!1;if(!(e>0&&t>0))return e>0}function FE(e,t){let o=t.parent;for(;o;){if(o===e)return!0;o=o.parent}return!1}function ou(e){var i,r;let t=e.isSelected()===!1,o=(r=(i=e.childrenAfterFilter)==null?void 0:i.some(ou))!=null?r:!1;return t||o}var DE={moduleName:"SharedRowSelection",version:D,beans:[cE],css:[dE],apiFunctions:{setNodesSelected:gE,selectAll:uE,deselectAll:hE,selectAllFiltered:pE,deselectAllFiltered:fE,selectAllOnCurrentPage:mE,deselectAllOnCurrentPage:vE,getSelectedNodes:CE,getSelectedRows:wE}},ME={moduleName:"RowSelection",version:D,rowModels:["clientSide","infinite","viewport"],beans:[RE],dependsOn:[DE]},PE=class extends S{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(){let{column:e,cellComp:t}=this,o=e.colDef,i=o.cellClassRules,r=this.getCellClassParams(e,o);Kn(this.beans.expressionSvc,i===this.cellClassRules?void 0:this.cellClassRules,i,r,a=>t.toggleCss(a,!0),a=>t.toggleCss(a,!1)),this.cellClassRules=i}applyUserStyles(){let e=this.column,t=e.colDef,o=t.cellStyle;if(!o)return;let i;if(typeof o=="function"){let r=this.getCellClassParams(e,t);i=o(r)}else i=o;i&&this.cellComp.setUserStyles(i)}applyClassesFromColDef(){let{column:e,cellComp:t}=this,o=e.colDef,i=this.getCellClassParams(e,o);for(let a of this.staticClasses)t.toggleCss(a,!1);let r=this.beans.cellStyles.getStaticCellClasses(o,i);this.staticClasses=r;for(let a of r)t.toggleCss(a,!0)}getCellClassParams(e,t){let{value:o,rowNode:i}=this.cellCtrl;return O(this.beans.gos,{value:o,data:i.data,node:i,colDef:t,column:e,rowIndex:i.rowIndex})}},IE=class extends S{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,o,i){Kn(this.beans.expressionSvc,void 0,e.cellClassRules,t,o,i),this.processStaticCellClasses(e,t,o)}getStaticCellClasses(e,t){let{cellClass:o}=e;if(!o)return[];let i;return typeof o=="function"?i=o(t):i=o,typeof i=="string"&&(i=[i]),i||[]}createCellCustomStyleFeature(e){return new PE(e,this.beans)}processStaticCellClasses(e,t,o){this.getStaticCellClasses(e,t).forEach(r=>{o(r)})}},TE={moduleName:"CellStyle",version:D,beans:[IE]},AE={moduleName:"RowStyle",version:D,beans:[E1]},zE={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},Ce="clientSide",ce="serverSide",co="infinite",LE={onGroupExpandedOrCollapsed:[Ce],refreshClientSideRowModel:[Ce],isRowDataEmpty:[Ce],forEachLeafNode:[Ce],forEachNodeAfterFilter:[Ce],forEachNodeAfterFilterAndSort:[Ce],resetRowHeights:[Ce,ce],applyTransaction:[Ce],applyTransactionAsync:[Ce],flushAsyncTransactions:[Ce],getBestCostNodeSelection:[Ce],getServerSideSelectionState:[ce],setServerSideSelectionState:[ce],applyServerSideTransaction:[ce],applyServerSideTransactionAsync:[ce],applyServerSideRowData:[ce],retryServerSideLoads:[ce],flushServerSideAsyncTransactions:[ce],refreshServerSide:[ce],getServerSideGroupLevelState:[ce],refreshInfiniteCache:[co],purgeInfiniteCache:[co],getInfiniteRowCount:[co],isLastRowIndexKnown:[co,ce],expandAll:[Ce,ce],collapseAll:[Ce,ce],onRowHeightChanged:[Ce,ce],setRowCount:[co,ce],getCacheBlockState:[co,ce]},OE={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")'}};function HE(e,t,o){let i=OE[e];if(i){let{version:a,new:n,old:s,message:l}=i,c=s!=null?s:e;return(...d)=>{let g=n?`Please use ${n} instead. `:"";return Qo(`Since ${a} api.${c} is deprecated. ${g}${l!=null?l:""}`),t.apply(t,d)}}let r=LE[e];return r?(...a)=>{let n=o.rowModel.getType();if(!r.includes(n)){vo(`api.${e} can only be called when gridOptions.rowModelType is ${r.join(" or ")}`);return}return t.apply(t,a)}:t}var BE={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"},VE={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},NE={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"},GE=new Set(["colorPicker","smallUp","checkboxChecked","checkboxIndeterminate","checkboxUnchecked","radioButtonOn","radioButtonOff","smallDown","smallLeft","smallRight"]),WE=class extends S{constructor(){super(...arguments),this.beanName="validation"}wireBeans(e){this.gridOptions=e.gridOptions,mh(By)}warnOnInitialPropertyUpdate(e,t){e==="api"&&zE[t]&&k(22,{key:t})}processGridOptions(e){this.processOptions(e,Fb())}validateApiFunction(e,t){return HE(e,t,this.beans)}missingUserComponent(e,t,o,i){let r=Ro[t];r?this.gos.assertModuleRegistered(r,`AG Grid '${e}' component: ${t}`):k(101,{propertyName:e,componentName:t,agGridDefaults:o,jsComps:i})}missingDynamicBean(e){let t=BE[e];return t?Je(200,{...this.gos.getModuleErrorParams(),moduleName:t,reasonOrId:e}):void 0}checkRowEvents(e){_E.has(e)&&k(10,{eventType:e})}validateIcon(e){if(GE.has(e)&&k(43,{iconName:e}),VE[e])return;let t=NE[e];if(t){W(200,{reasonOrId:`icon '${e}'`,moduleName:t,gridScoped:wn(),gridId:this.beans.context.getId(),rowModelType:this.gos.get("rowModelType"),additionalText:"Alternatively, use the CSS icon name directly."});return}k(134,{iconName:e})}isProvidedUserComp(e){return!!Ro[e]}validateColDef(e){this.processOptions(e,mb())}processOptions(e,t){let{validations:o,deprecations:i,allProperties:r,propertyExceptions:a,objectName:n,docsUrl:s}=t;r&&this.gridOptions.suppressPropertyNamesCheck!==!0&&this.checkProperties(e,[...a!=null?a:[],...Object.keys(i)],r,n,s);let l=new Set;if(Object.keys(e).forEach(d=>{var C;let g=i[d];if(g){let{message:w,version:y}=g;l.add(`As of v${y}, ${String(d)} is deprecated. ${w!=null?w:""}`)}let u=e[d];if(u==null||u===!1)return;let h=o[d];if(!h)return;let{dependencies:p,validate:f,supportedRowModels:m,expectedType:v}=h;if(v){let w=typeof u;if(w!==v){l.add(`${String(d)} should be of type '${v}' but received '${w}' (${u}).`);return}}if(m){let w=(C=this.gridOptions.rowModelType)!=null?C:"clientSide";if(!m.includes(w)){l.add(`${String(d)} is not supported with the '${w}' row model. It is only valid with: ${m.join(", ")}.`);return}}if(p){let w=this.checkForRequiredDependencies(d,p,e);if(w){l.add(w);return}}if(f){let w=f(e,this.gridOptions,this.beans);if(w){l.add(w);return}}}),l.size>0)for(let d of l)Qo(d)}checkForRequiredDependencies(e,t,o){let r=Object.entries(t).filter(([a,n])=>{let s=o[a];return!n.required.includes(s)});return r.length===0?null:r.map(([a,n])=>{var s;return`'${String(e)}' requires '${a}' to be one of [${n.required.map(l=>l===null?"null":l===void 0?"undefined":l).join(", ")}]. ${(s=n.reason)!=null?s:""}`}).join(` + `)}checkProperties(e,t,o,i,r){let a=["__ob__","__v_skip","__metadata__"],n=qE(Object.getOwnPropertyNames(e),[...a,...t,...o],o),s=Object.keys(n);for(let l of s){let c=n[l],d=`invalid ${i} property '${l}' did you mean any of these: ${c.slice(0,8).join(", ")}.`;o.includes("context")&&(d+=` +If you are trying to annotate ${i} with application data, use the '${i}.context' property instead.`),Qo(d)}if(s.length>0&&r){let l=this.beans.frameworkOverrides.getDocLink(r);Qo(`to see all the valid ${i} properties please check: ${l}`)}}};function qE(e,t,o){let i={},r=e.filter(a=>!t.some(n=>n===a));if(r.length>0)for(let a of r)i[a]=$a({inputValue:a,allSuggestions:o}).values;return i}var _E=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),UE={moduleName:"Validation",version:D,beans:[WE]},iu={moduleName:"AllCommunity",version:D,dependsOn:[N3,lS,Kk,UE,L2,O2,H2,B2,V2,N2,G2,z2,Ik,Tk,Ak,zk,Pk,Ok,Hk,sR,jy,DR,_d,a3,n3,XR,K3,Ov,LR,ME,ky,TE,J3,AE,Xk,Fy,UR,Fg,tR,tE,Lv,G3,lE]};xc.registerModules([iu]);var jE="[data-portfolio-list-panel]",au=5;function nu(e){if(!e)return null;let t=new Date(e);return Number.isNaN(t.getTime())?null:t}function ru(e){let t=nu(e);return t?new Intl.DateTimeFormat("ko-KR",{year:"numeric",month:"2-digit",day:"2-digit"}).format(t):""}function KE(e){let t=nu(e);if(!t)return"";let o=Date.now()-t.getTime();if(o<0)return ru(e);let i=Math.floor(o/6e4);if(i<1)return"\uBC29\uAE08 \uC804";if(i<60)return`${i}\uBD84 \uC804`;let r=Math.floor(i/60);return r<24?`${r}\uC2DC\uAC04 \uC804`:ru(e)}function $E(e){return`/portfolio/${encodeURIComponent(e)}`}function YE(e){let t=document.createElement("a");return t.className="portfolio-post-title-link",t.href=$E(e.data.portfolioIdntfNo),t.textContent=e.value||"",t.title=e.value||"",t}function ms(e,t={}){let o=document.createElement("button");return o.type="button",o.className="portfolio-post-page-button",o.textContent=e,t.active&&(o.classList.add("is-active"),o.setAttribute("aria-current","page")),t.disabled&&(o.disabled=!0),typeof t.onClick=="function"&&o.addEventListener("click",t.onClick),o}function xi(e,t){if(!e||!t)return;let o=e.paginationGetTotalPages(),i=e.paginationGetCurrentPage();if(t.replaceChildren(),o<=0)return;let r=10,n=Math.floor(i/r)*r,s=Math.min(n+r,o);n>0&&t.appendChild(ms("\uC774\uC804",{onClick:()=>e.paginationGoToPage(n-1)}));for(let l=n;le.paginationGoToPage(l)}));s",{onClick:()=>e.paginationGoToPage(s)}))}function QE(e,t,o){return{rowData:e,columnDefs:[{field:"title",headerName:"\uAE00 \uC81C\uBAA9",flex:1,minWidth:260,cellRenderer:YE},{field:"viewCount",headerName:"\uC870\uD68C\uC218",width:96,type:"numericColumn",headerClass:"portfolio-post-number-header",cellClass:"portfolio-post-number-cell"},{field:"registeredAt",headerName:"\uC791\uC131\uC77C",width:132,valueFormatter:i=>KE(i.value),headerClass:"portfolio-post-date-header",cellClass:"portfolio-post-date-cell"}],defaultColDef:{sortable:!0,resizable:!1,suppressMovable:!0},domLayout:"autoHeight",headerHeight:34,rowHeight:40,pagination:!0,paginationPageSize:au,suppressPaginationPanel:!0,suppressCellFocus:!0,suppressDragLeaveHidesColumns:!0,suppressHorizontalScroll:!0,getRowId:i=>i.data.portfolioIdntfNo,getRowClass:i=>i.data.portfolioIdntfNo===t?"ag-row-current-post":"",onGridReady:i=>xi(i.api,o),onPaginationChanged:i=>xi(i.api,o),localeText:{page:"\uD398\uC774\uC9C0",more:"\uB354 \uBCF4\uAE30",to:"-",of:"/",next:"\uB2E4\uC74C",last:"\uB9C8\uC9C0\uB9C9",first:"\uCC98\uC74C",previous:"\uC774\uC804",loadingOoo:"\uBD88\uB7EC\uC624\uB294 \uC911...",noRowsToShow:"\uB4F1\uB85D\uB41C \uAE00\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",pageSizeSelectorLabel:"\uC904 \uBCF4\uAE30"}}}async function ZE(e){let t=await fetch(e,{headers:{Accept:"application/json"},credentials:"same-origin"});if(!t.ok)throw new Error("\uD3EC\uD2B8\uD3F4\uB9AC\uC624 \uBAA9\uB85D\uC744 \uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.");let o=await t.json();return Array.isArray(o)?o:[]}function su(e=jE){let t=document.querySelector(e);if(!t)return null;let o=t.querySelector("[data-portfolio-list-toggle]"),i=t.querySelector("[data-portfolio-list-body]"),r=t.querySelector("[data-portfolio-list-grid]"),a=t.querySelector("[data-portfolio-pagination]"),n=t.querySelector("[data-portfolio-page-size]"),s=t.querySelector(".portfolio-post-list-summary span"),l=t.dataset.listUrl,c=t.dataset.currentId||"",d=t.dataset.initialOpen==="true";if(!o||!i||!r||!a||!l)return null;let g=!1,u=null,h=null,p=()=>(u||(u=ZE(l)),u),f=async()=>{let v=await p();if(s&&(s.textContent=`${v.length}\uAC1C\uC758 \uAE00`),!h){h=mg(r,QE(v,c,a)),xi(h,a);return}h.setGridOption("rowData",v),xi(h,a)},m=async v=>{if(g=v,o.textContent=g?"\uBAA9\uB85D\uB2EB\uAE30":"\uBAA9\uB85D\uC5F4\uAE30",o.setAttribute("aria-expanded",String(g)),i.hidden=!g,!!g){o.disabled=!0;try{await f()}catch(C){window.alert(C.message||"\uD3EC\uD2B8\uD3F4\uB9AC\uC624 \uBAA9\uB85D\uC744 \uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."),m(!1)}finally{o.disabled=!1}}};return o.addEventListener("click",()=>{m(!g)}),n==null||n.addEventListener("change",()=>{h&&(h.setGridOption("paginationPageSize",Number.parseInt(n.value,10)||au),h.paginationGoToPage(0),xi(h,a))}),m(d),{open:()=>m(!0),close:()=>m(!1),reload:async()=>{u=null,await f()}}}document.addEventListener("DOMContentLoaded",()=>{su()});return hu(JE);})(); diff --git a/src/main/resources/static/resources/kr/iotdoor/comn/site/layout/css/custom.css b/src/main/resources/static/resources/kr/iotdoor/comn/site/layout/css/custom.css index 0208aea..47f13cb 100644 --- a/src/main/resources/static/resources/kr/iotdoor/comn/site/layout/css/custom.css +++ b/src/main/resources/static/resources/kr/iotdoor/comn/site/layout/css/custom.css @@ -13,4 +13,90 @@ margin: auto 0; border-radius: 20px; box-shadow: 0 5px 6px rgba(0, 0, 0, .1019607843); -} \ No newline at end of file +} + +.portfolio-content { + color: #1d2939; + font-size: 1rem; + line-height: 1.8; +} + +.portfolio-content p { + margin: 0 0 1rem; +} + +.portfolio-content h1, +.portfolio-content h2, +.portfolio-content h3 { + color: #101828; + font-weight: 700; + margin: 1.5rem 0 1rem; +} + +.portfolio-content h1 { + font-size: 2rem; +} + +.portfolio-content h2 { + font-size: 1.5rem; +} + +.portfolio-content h3 { + font-size: 1.25rem; +} + +.portfolio-content blockquote { + margin: 1rem 0; + padding: 0.75rem 1rem; + border-left: 4px solid #9cb9ff; + background: #f9fafb; + color: #475467; +} + +.portfolio-content ul, +.portfolio-content ol { + padding-left: 1.5rem; +} + +.portfolio-content img { + display: block; + max-width: 100%; + height: auto; + margin: 1.25rem 0; + border-radius: 1rem; +} + +.main-service-card { + height: 100%; + display: flex; + flex-direction: column; +} + +.main-service-card-image { + width: 100%; + aspect-ratio: 3 / 2; + height: auto; + object-fit: cover; +} + +.main-service-card-body { + flex: 1; + display: flex; + flex-direction: column; + min-height: 210px; +} + +.main-service-card-body h4 { + word-break: keep-all; +} + +.main-service-card-content { + flex: 1; + margin-bottom: 1rem; + line-height: 1.7; + word-break: keep-all; +} + +.main-service-card-link { + margin-top: auto; +} diff --git a/src/main/resources/static/resources/kr/iotdoor/comn/site/layout/js/main.js b/src/main/resources/static/resources/kr/iotdoor/comn/site/layout/js/main.js index 66843ff..e46b174 100644 --- a/src/main/resources/static/resources/kr/iotdoor/comn/site/layout/js/main.js +++ b/src/main/resources/static/resources/kr/iotdoor/comn/site/layout/js/main.js @@ -10,6 +10,25 @@ }, 1); }; spinner(); + + + // Mobile navbar fallback + $(document).on('click', '.navbar-toggler[data-bs-target]', function () { + if (window.bootstrap && window.bootstrap.Collapse && window.bootstrap.Collapse.DATA_KEY === 'bs.collapse') { + return; + } + + var targetSelector = $(this).attr('data-bs-target'); + var $target = targetSelector ? $(targetSelector) : $(); + + if (!$target.length) { + return; + } + + var isOpen = $target.hasClass('show'); + $target.toggleClass('show', !isOpen); + $(this).attr('aria-expanded', String(!isOpen)); + }); // Initiate the wowjs @@ -95,4 +114,3 @@ }); })(jQuery); - diff --git a/src/main/resources/templates/kr/iotdoor/boot/admin/banner/form.html b/src/main/resources/templates/kr/iotdoor/boot/admin/banner/form.html new file mode 100644 index 0000000..fe91a58 --- /dev/null +++ b/src/main/resources/templates/kr/iotdoor/boot/admin/banner/form.html @@ -0,0 +1,181 @@ + + + +
+
+
+

배너 등록

+

메인 서비스 영역에 노출할 이미지, 제목, 내용을 입력합니다.

+
+ + 목록으로 + +
+ +
+
+

배너 정보

+
+
+
+ + + + + + +
+
+ +
+ 배너 이미지 미리보기 + + +
+
이미지 오류
+
+ +
+
+ + +
제목 오류
+
+ +
+ + +
내용 오류
+
+ +
+ +
+ +
+ 오류 메시지 +
+ +
+ + + 취소 + +
+
+
+
+
+
+
+ + + + + + diff --git a/src/main/resources/templates/kr/iotdoor/boot/admin/banner/list.html b/src/main/resources/templates/kr/iotdoor/boot/admin/banner/list.html new file mode 100644 index 0000000..5d1a740 --- /dev/null +++ b/src/main/resources/templates/kr/iotdoor/boot/admin/banner/list.html @@ -0,0 +1,118 @@ + + + +
+
+
+

배너관리

+

메인 서비스 배너의 노출 순서와 내용을 관리합니다.

+
+ + 새 배너 등록 + +
+ +
+ 배너가 저장되었습니다. +
+
+ 배너가 삭제되었습니다. +
+
+ 배너 순서가 변경되었습니다. +
+ +
+
+

등록 목록

+

위/아래 버튼으로 메인 노출 순서를 변경할 수 있습니다.

+
+
+
+ 아직 등록된 배너가 없습니다. +
+
+ + + + + + + + + + + + + + + + + + + + + +
순서이미지제목/내용노출등록일시관리
+
+
+ + + + +
+
+ + + + +
+
+
+ + +
배너 제목
+

배너 내용

+
+ 노출 + 2026-04-21 09:00 +
+ + 수정 + +
+ + + +
+
+
+
+
+
+
+ + diff --git a/src/main/resources/templates/kr/iotdoor/boot/admin/layout/adminLayout.html b/src/main/resources/templates/kr/iotdoor/boot/admin/layout/adminLayout.html index ce8518b..54ed0d4 100644 --- a/src/main/resources/templates/kr/iotdoor/boot/admin/layout/adminLayout.html +++ b/src/main/resources/templates/kr/iotdoor/boot/admin/layout/adminLayout.html @@ -67,6 +67,20 @@ 포트폴리오 관리 +
  • + + + + + + + + 배너관리 + +
  • +
    -
    +

    운영 중인 관리자

    diff --git a/src/main/resources/templates/kr/iotdoor/boot/admin/portfolio/form.html b/src/main/resources/templates/kr/iotdoor/boot/admin/portfolio/form.html index 19bb50e..a889d08 100644 --- a/src/main/resources/templates/kr/iotdoor/boot/admin/portfolio/form.html +++ b/src/main/resources/templates/kr/iotdoor/boot/admin/portfolio/form.html @@ -34,6 +34,7 @@ data-current-thumbnail-file-sn=*{thumbnailFileSn}"> + diff --git a/src/main/resources/templates/kr/iotdoor/boot/admin/portfolio/list.html b/src/main/resources/templates/kr/iotdoor/boot/admin/portfolio/list.html index 92b0238..59d9744 100644 --- a/src/main/resources/templates/kr/iotdoor/boot/admin/portfolio/list.html +++ b/src/main/resources/templates/kr/iotdoor/boot/admin/portfolio/list.html @@ -33,7 +33,15 @@ 아직 등록된 포트폴리오가 없습니다.
    - +
    + + + + + + + + @@ -47,7 +55,7 @@ - - - - + +
    대표이미지
    + @@ -61,12 +69,12 @@ 공개 페이지 보기 2026-04-17 09:00관리자0관리자0 -
    +
    수정 diff --git a/src/main/resources/templates/kr/iotdoor/boot/admin/statistics/access.html b/src/main/resources/templates/kr/iotdoor/boot/admin/statistics/access.html new file mode 100644 index 0000000..06b5f92 --- /dev/null +++ b/src/main/resources/templates/kr/iotdoor/boot/admin/statistics/access.html @@ -0,0 +1,167 @@ + + + + + + diff --git a/src/main/resources/templates/kr/iotdoor/cmty/portfolio/detail.html b/src/main/resources/templates/kr/iotdoor/cmty/portfolio/detail.html index 801f74a..657b70c 100644 --- a/src/main/resources/templates/kr/iotdoor/cmty/portfolio/detail.html +++ b/src/main/resources/templates/kr/iotdoor/cmty/portfolio/detail.html @@ -5,13 +5,54 @@ xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{kr/iotdoor/comn/site/layout/cmmnSiteLayout.html}"> + + + + +
    - +
    +
    +
    + 전체보기 + 0개의 글 +
    + +
    + +
    @@ -29,4 +70,8 @@
    + + + + diff --git a/src/main/resources/templates/kr/iotdoor/cmty/portfolio/portfolio.html b/src/main/resources/templates/kr/iotdoor/cmty/portfolio/portfolio.html index f2c9645..5a9c9b5 100644 --- a/src/main/resources/templates/kr/iotdoor/cmty/portfolio/portfolio.html +++ b/src/main/resources/templates/kr/iotdoor/cmty/portfolio/portfolio.html @@ -5,6 +5,11 @@ xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{kr/iotdoor/comn/site/layout/cmmnSiteLayout.html}"> + + + + +
    @@ -14,6 +19,45 @@

    대표 이미지, 상세 내용, 등록일시, 조회수까지 포함한 포트폴리오를 관리자 화면에서 직접 관리할 수 있습니다.

    +
    +
    +
    + 전체보기 + 0개의 글 +
    + +
    + +
    +
    아직 등록된 포트폴리오가 없습니다.
    @@ -22,25 +66,20 @@
    - @@ -50,4 +89,8 @@
    + + + + diff --git a/src/main/resources/templates/kr/iotdoor/comn/site/layout/cmmnHeader.html b/src/main/resources/templates/kr/iotdoor/comn/site/layout/cmmnHeader.html index 1718ff2..8d27819 100644 --- a/src/main/resources/templates/kr/iotdoor/comn/site/layout/cmmnHeader.html +++ b/src/main/resources/templates/kr/iotdoor/comn/site/layout/cmmnHeader.html @@ -1,5 +1,6 @@ -
    +
    Loading...
    @@ -30,9 +31,12 @@
    - - - + + +
    @@ -47,13 +51,14 @@ 로고 -