Plugin Directory

Changeset 3392960


Ignore:
Timestamp:
11/10/2025 01:06:31 PM (5 months ago)
Author:
eventkoi
Message:

Release 1.0.14 – Fix: Admin Event Description Editor stability and mode toggle

Location:
eventkoi-lite/trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • eventkoi-lite/trunk/eventkoi.php

    r3381596 r3392960  
    44 * Plugin URI:        https://eventkoi.com
    55 * Description:       Event and calendar management for WordPress.
    6  * Version:           1.0.13
     6 * Version:           1.0.14
    77 * Author:            EventKoi
    88 * Author URI:        https://eventkoi.com/
     
    3333
    3434// Define constants for the plugin.
    35 define( 'EVENTKOI_VERSION', '1.0.13' );
     35define( 'EVENTKOI_VERSION', '1.0.14' );
    3636define( 'EVENTKOI_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
    3737define( 'EVENTKOI_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
  • eventkoi-lite/trunk/readme.txt

    r3381598 r3392960  
    77Tested up to: 6.8
    88Requires PHP: 8.0 
    9 Stable tag: 1.0.13
     9Stable tag: 1.0.14
    1010License: GPLv2 or later
    1111License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    134134== Changelog ==
    135135
     136= 1.0.14 – Admin Event Description Editor Fix – 2025-11-10 =
     137* Fix: Resolved issue where the event description editor in the admin sometimes failed to display or save properly.
     138
    136139= 1.0.13 – Week View Layout & Header Improvements – 2025-10-21 =
    137140* Improvement: Redesigned week view header to show weekday names and dates on separate lines for better readability.
  • eventkoi-lite/trunk/scripts/backend/build/index-rtl.css

    r3380900 r3392960  
    11:root{--fc-border-color: #dddddd;--fc-daygrid-event-dot-width: 6px;--fc-today-bg-color: transparent;--fc-page-bg-color: transparent}.fc{position:relative !important}.fc table{margin-bottom:0}.fc .fc-timegrid-body{border-right:1px solid var(--fc-border-color)}.fc a{color:inherit}.fc .fc-daygrid-event{border-radius:0;border-top-width:0;border-left-width:0;border-bottom-width:0;border-right-width:0;outline:0;font-size:13px;box-shadow:none !important;margin-top:3px}.fc .fc-daygrid-event .fc-event-main{color:inherit !important}.fc .fc-daygrid-event.fc-daygrid-dot-event{background-color:rgba(0,0,0,0) !important}.fc .fc-daygrid-event.fc-h-event{color:#fff !important;border-radius:3px !important;padding:4px 2px}.fc .fc-event-selected::after,.fc .fc-event:focus::after{background-color:rgba(0,0,0,0) !important}.fc .fc-scrollgrid{border:0}.fc .fc-daygrid-day.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-daygrid-day-top{flex-direction:row}.fc .fc-daygrid-body{border-right:1px solid var(--fc-border-color)}.fc .fc-scrollgrid-section-body>td{border-top:1px solid var(--fc-border-color)}.fc .fc-daygrid-day-number{text-decoration:none !important;padding:4px 6px 0}.fc .fc-scrollgrid-section th{border:0}.fc .fc-event-main{font-size:13px;padding-right:3px}.fc .fc-col-header{border:none}.fc .fc-col-header th{border:0}.fc .fc-col-header-cell{padding-top:10px;padding-bottom:20px;font-size:.9em;text-align:right}.fc .fc-col-header-cell-cushion{text-decoration:none;font-weight:500;text-transform:uppercase;padding:0 6px 0 0;font-size:14px}.fc .fc-toolbar.fc-header-toolbar{margin-bottom:0}.fc .fc-toolbar.fc-header-toolbar .fc-toolbar-chunk{display:flex;align-items:center;gap:10px}.fc .fc-toolbar.fc-header-toolbar .fc-toolbar-chunk:last-child .fc-button-group{gap:0px;background:#f5f5f5;border:1px solid #eee;border-radius:8px;padding:0px}.fc .fc-toolbar.fc-header-toolbar .fc-toolbar-chunk:last-child .fc-button{font-size:14px;background-color:rgba(0,0,0,0) !important;box-shadow:none !important;color:#666 !important;border:0 !important;padding:4px 14px !important;text-transform:capitalize;height:32px !important}.fc .fc-toolbar.fc-header-toolbar .fc-toolbar-chunk:last-child .fc-button.fc-button-active{color:#333 !important;background-color:#fff !important;border-radius:8px;border:0 !important;box-shadow:0 1px #eee !important;font-weight:500}.fc .fc-toolbar.fc-header-toolbar .fc-toolbar-title{display:inline-flex;font-family:Helvetica,sans-serif;margin:0 !important}.fc .fc-toolbar.fc-header-toolbar .fc-button-group{gap:6px;font-size:11px;min-height:32px}.fc .fc-button.fc-prev-button,.fc .fc-button.fc-next-button{background-color:rgba(0,0,0,0) !important;border-color:rgba(0,0,0,0) !important;border-radius:0 !important;box-shadow:none !important;color:#393838 !important;border:none;padding:0}.fc .fc-button.fc-prev-button:hover,.fc .fc-button.fc-prev-button:focus,.fc .fc-button.fc-prev-button:active,.fc .fc-button.fc-next-button:hover,.fc .fc-button.fc-next-button:focus,.fc .fc-button.fc-next-button:active{background-color:rgba(0,0,0,0) !important;border-color:rgba(0,0,0,0) !important;border-radius:0 !important;box-shadow:none !important;color:#111 !important}.fc .fc-today-button{background-color:rgba(0,0,0,0);border:1px solid #aaa;font-size:14px;border-radius:4px;color:#666;height:32px;line-height:32px;display:flex;align-items:center;margin:0 !important}.fc .fc-today-button:disabled{background-color:rgba(0,0,0,0);color:#888;border-color:#bbb}.fc .fc-scrollgrid-section-header .fc-scroller{overflow:hidden !important}.fc .fc-event-title{padding:0}.fc .fc-event-time{flex-shrink:0;padding:0}.fc .fc-timegrid tbody>tr.fc-scrollgrid-section.fc-scrollgrid-section-body:nth-of-type(3)>td{border-top:0 !important}.fc .fc-timegrid .fc-event-main{font-size:14px}.fc .fc-timegrid-slot{font-size:14px}.fc .fc-timegrid-slot-minor{border-top:0}.fc .fc-timegrid-axis-cushion{font-size:15px}.fc .fc-timegrid-col .fc-event-main{padding:4px}.fc .fc-timegrid-col .fc-event-main .fc-event-title{font-weight:500}.fc .fc-timegrid-axis-cushion::first-letter{text-transform:uppercase}.fc .fc-scrollgrid-sync-inner{text-align:center}.fc .fc-daygrid-body-natural .fc-daygrid-day-events{margin-bottom:0}.fc [class=fc-scrollgrid-section]{display:none}.fc .fc-timegrid-all-day{font-weight:bold}.fc .fc-scrollgrid-section-sticky>*{background-color:#fff}@media(max-width: 768px){.fc .fc-col-header-cell{text-align:center !important;padding-right:0 !important;padding-bottom:10px !important;padding-top:5px !important}.fc .fc-col-header-cell-cushion{padding-right:0 !important;display:inline-block;width:100%;text-align:center}[data-event-popover]{right:0 !important;width:100% !important;max-width:none !important}.fc .fc-event-main,.fc .fc-daygrid-dot-event{font-size:10px}.fc-timegrid th.fc-day .fc-scrollgrid-sync-inner{margin:0 10px}.fc .fc-timegrid .fc-event-main{font-size:13px;padding:2px}}
    2 .wp-eventkoi #wpbody-content{padding-bottom:0}.wp-eventkoi #wpcontent{padding-right:0}body.eventkoi-active .components-panel__body.is-opened .block-editor-hooks__layout-constrained+.block-editor-hooks__layout-constrained{display:none !important}.eventkoi-admin{font-family:inter,-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:16px}.eventkoi-admin p{font-size:16px}.eventkoi-admin li{margin-bottom:0px}.eventkoi-admin a:hover,.eventkoi-admin a:focus{box-shadow:none;color:inherit}.eventkoi-admin [contenteditable=true]:empty:before{content:attr(placeholder);pointer-events:none;display:block;color:#777}.eventkoi-admin .eventkoi-error{border-color:#d13d3d !important}.eventkoi-admin .scrollbar-hide::-webkit-scrollbar{display:none}.eventkoi-admin .scrollbar-hide{-ms-overflow-style:none;scrollbar-width:none}.eventkoi-admin .appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.eventkoi-admin .mce-tinymce{border:1px solid #e5e7eb;border-radius:.5rem;box-shadow:0 1px 2px rgba(0,0,0,.04);background-color:#f9fafb;overflow:hidden}.eventkoi-admin .mce-container-body .mce-toolbar-grp{background-color:#f9fafb;border-bottom:0;padding:0}.eventkoi-admin .mce-container-body .mce-btn{margin:0 2px;border:none;min-height:28px;display:inline-flex}.eventkoi-admin .mce-container-body .mce-btn:hover,.eventkoi-admin .mce-container-body .mce-btn.mce-listbox:hover{box-shadow:none}.eventkoi-admin .mce-container-body .mce-btn .mce-ico::before{position:relative;top:1px}.eventkoi-admin .mce-container-body .mce-btn button{background:rgba(0,0,0,0);color:#374151;font-size:14px;padding:4px 6px;border-radius:2px;transition:none;border:none}.eventkoi-admin .mce-container-body{padding:0}.eventkoi-admin .mce-container-body .mce-btn button:hover{background-color:#e5e7eb;color:#111827;border:none}.eventkoi-admin .mce-container-body .mce-btn.mce-active button{background-color:#333;color:#fff;border:none}.eventkoi-admin .mce-container-body .mce-btn i{color:inherit !important;font-size:16px}.eventkoi-admin .mce-edit-area iframe{padding:0}.eventkoi-admin .mce-container-body .mce-btn button:focus{outline:none;box-shadow:none}.eventkoi-admin .mce-container-body .mce-btn-group{padding:4px}.eventkoi-admin .mce-container-body .mce-btn-group:not(:first-child){border-right:1px solid #eee !important;margin-right:0}
     2.wp-eventkoi #wpbody-content{padding-bottom:0}.wp-eventkoi #wpcontent{padding-right:0}body.eventkoi-active .components-panel__body.is-opened .block-editor-hooks__layout-constrained+.block-editor-hooks__layout-constrained{display:none !important}.eventkoi-admin{font-family:inter,-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:16px}.eventkoi-admin p{font-size:16px}.eventkoi-admin li{margin-bottom:0px}.eventkoi-admin a:hover,.eventkoi-admin a:focus{box-shadow:none;color:inherit}.eventkoi-admin [contenteditable=true]:empty:before{content:attr(placeholder);pointer-events:none;display:block;color:#777}.eventkoi-admin .eventkoi-error{border-color:#d13d3d !important}.eventkoi-admin .scrollbar-hide::-webkit-scrollbar{display:none}.eventkoi-admin .scrollbar-hide{-ms-overflow-style:none;scrollbar-width:none}.eventkoi-admin .appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.eventkoi-admin .mce-tinymce{border:1px solid #e5e7eb;border-radius:.5rem;box-shadow:0 1px 2px rgba(0,0,0,.04);background-color:#f9fafb;overflow:hidden;box-sizing:border-box}.eventkoi-admin .mce-container-body .mce-toolbar-grp{background-color:#f9fafb;border-bottom:0;padding:0}.eventkoi-admin .mce-container-body.mce-flow-layout{display:flex}.eventkoi-admin .mce-container-body.mce-flow-layout .mce-btn-group.mce-last{margin-right:auto}.eventkoi-admin .mce-container-body .mce-btn{margin:0 2px;border:none;min-height:28px;display:inline-flex}.eventkoi-admin .mce-container-body .mce-btn:hover,.eventkoi-admin .mce-container-body .mce-btn.mce-listbox:hover{box-shadow:none}.eventkoi-admin .mce-container-body .mce-btn .mce-ico::before{position:relative;top:1px}.eventkoi-admin .mce-container-body .mce-btn button{background:rgba(0,0,0,0);color:#374151;font-size:14px;padding:4px 6px;border-radius:2px;transition:none;border:none}.eventkoi-admin .mce-container-body{padding:0}.eventkoi-admin .mce-container-body .mce-btn button:hover{background-color:#e5e7eb;color:#111827;border:none}.eventkoi-admin .mce-container-body .mce-btn.mce-active button{background-color:#333;color:#fff;border:none}.eventkoi-admin .mce-container-body .mce-btn i{color:inherit !important;font-size:16px}.eventkoi-admin .mce-edit-area iframe{padding:0}.eventkoi-admin .mce-container-body .mce-btn button:focus{outline:none;box-shadow:none}.eventkoi-admin .mce-container-body .mce-btn-group{padding:4px}.eventkoi-admin .mce-container-body .mce-btn-group:not(:first-child){border-right:1px solid #eee !important;margin-right:0}.eventkoi-admin .mce-i-removeformat::before{content:"";display:inline-block;width:16px;height:16px;background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2724%27 height=%2724%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27currentColor%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M4 7V4h16v3%27/%3E%3Cpath d=%27M5 20h6%27/%3E%3Cpath d=%27M13 4 8 20%27/%3E%3Cpath d=%27m15 15 5 5%27/%3E%3Cpath d=%27m20 15-5 5%27/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:center;background-size:14px 14px;vertical-align:middle}.eventkoi-admin .mce-i-removeformat{font-family:none !important;color:currentColor !important}
    33.wp-block-eventkoi-calendar{margin-right:auto !important;margin-left:auto !important}
    44
  • eventkoi-lite/trunk/scripts/backend/build/index.asset.php

    r3381596 r3392960  
    1 <?php return array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-media-utils', 'wp-primitives'), 'version' => 'd749213bce681566e099');
     1<?php return array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-media-utils', 'wp-primitives'), 'version' => 'f2f56858549f681b0e4b');
  • eventkoi-lite/trunk/scripts/backend/build/index.css

    r3380900 r3392960  
    11:root{--fc-border-color: #dddddd;--fc-daygrid-event-dot-width: 6px;--fc-today-bg-color: transparent;--fc-page-bg-color: transparent}.fc{position:relative !important}.fc table{margin-bottom:0}.fc .fc-timegrid-body{border-left:1px solid var(--fc-border-color)}.fc a{color:inherit}.fc .fc-daygrid-event{border-radius:0;border-top-width:0;border-right-width:0;border-bottom-width:0;border-left-width:0;outline:0;font-size:13px;box-shadow:none !important;margin-top:3px}.fc .fc-daygrid-event .fc-event-main{color:inherit !important}.fc .fc-daygrid-event.fc-daygrid-dot-event{background-color:rgba(0,0,0,0) !important}.fc .fc-daygrid-event.fc-h-event{color:#fff !important;border-radius:3px !important;padding:4px 2px}.fc .fc-event-selected::after,.fc .fc-event:focus::after{background-color:rgba(0,0,0,0) !important}.fc .fc-scrollgrid{border:0}.fc .fc-daygrid-day.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-daygrid-day-top{flex-direction:row}.fc .fc-daygrid-body{border-left:1px solid var(--fc-border-color)}.fc .fc-scrollgrid-section-body>td{border-top:1px solid var(--fc-border-color)}.fc .fc-daygrid-day-number{text-decoration:none !important;padding:4px 6px 0}.fc .fc-scrollgrid-section th{border:0}.fc .fc-event-main{font-size:13px;padding-left:3px}.fc .fc-col-header{border:none}.fc .fc-col-header th{border:0}.fc .fc-col-header-cell{padding-top:10px;padding-bottom:20px;font-size:.9em;text-align:left}.fc .fc-col-header-cell-cushion{text-decoration:none;font-weight:500;text-transform:uppercase;padding:0 0 0 6px;font-size:14px}.fc .fc-toolbar.fc-header-toolbar{margin-bottom:0}.fc .fc-toolbar.fc-header-toolbar .fc-toolbar-chunk{display:flex;align-items:center;gap:10px}.fc .fc-toolbar.fc-header-toolbar .fc-toolbar-chunk:last-child .fc-button-group{gap:0px;background:#f5f5f5;border:1px solid #eee;border-radius:8px;padding:0px}.fc .fc-toolbar.fc-header-toolbar .fc-toolbar-chunk:last-child .fc-button{font-size:14px;background-color:rgba(0,0,0,0) !important;box-shadow:none !important;color:#666 !important;border:0 !important;padding:4px 14px !important;text-transform:capitalize;height:32px !important}.fc .fc-toolbar.fc-header-toolbar .fc-toolbar-chunk:last-child .fc-button.fc-button-active{color:#333 !important;background-color:#fff !important;border-radius:8px;border:0 !important;box-shadow:0 1px #eee !important;font-weight:500}.fc .fc-toolbar.fc-header-toolbar .fc-toolbar-title{display:inline-flex;font-family:Helvetica,sans-serif;margin:0 !important}.fc .fc-toolbar.fc-header-toolbar .fc-button-group{gap:6px;font-size:11px;min-height:32px}.fc .fc-button.fc-prev-button,.fc .fc-button.fc-next-button{background-color:rgba(0,0,0,0) !important;border-color:rgba(0,0,0,0) !important;border-radius:0 !important;box-shadow:none !important;color:#393838 !important;border:none;padding:0}.fc .fc-button.fc-prev-button:hover,.fc .fc-button.fc-prev-button:focus,.fc .fc-button.fc-prev-button:active,.fc .fc-button.fc-next-button:hover,.fc .fc-button.fc-next-button:focus,.fc .fc-button.fc-next-button:active{background-color:rgba(0,0,0,0) !important;border-color:rgba(0,0,0,0) !important;border-radius:0 !important;box-shadow:none !important;color:#111 !important}.fc .fc-today-button{background-color:rgba(0,0,0,0);border:1px solid #aaa;font-size:14px;border-radius:4px;color:#666;height:32px;line-height:32px;display:flex;align-items:center;margin:0 !important}.fc .fc-today-button:disabled{background-color:rgba(0,0,0,0);color:#888;border-color:#bbb}.fc .fc-scrollgrid-section-header .fc-scroller{overflow:hidden !important}.fc .fc-event-title{padding:0}.fc .fc-event-time{flex-shrink:0;padding:0}.fc .fc-timegrid tbody>tr.fc-scrollgrid-section.fc-scrollgrid-section-body:nth-of-type(3)>td{border-top:0 !important}.fc .fc-timegrid .fc-event-main{font-size:14px}.fc .fc-timegrid-slot{font-size:14px}.fc .fc-timegrid-slot-minor{border-top:0}.fc .fc-timegrid-axis-cushion{font-size:15px}.fc .fc-timegrid-col .fc-event-main{padding:4px}.fc .fc-timegrid-col .fc-event-main .fc-event-title{font-weight:500}.fc .fc-timegrid-axis-cushion::first-letter{text-transform:uppercase}.fc .fc-scrollgrid-sync-inner{text-align:center}.fc .fc-daygrid-body-natural .fc-daygrid-day-events{margin-bottom:0}.fc [class=fc-scrollgrid-section]{display:none}.fc .fc-timegrid-all-day{font-weight:bold}.fc .fc-scrollgrid-section-sticky>*{background-color:#fff}@media(max-width: 768px){.fc .fc-col-header-cell{text-align:center !important;padding-left:0 !important;padding-bottom:10px !important;padding-top:5px !important}.fc .fc-col-header-cell-cushion{padding-left:0 !important;display:inline-block;width:100%;text-align:center}[data-event-popover]{left:0 !important;width:100% !important;max-width:none !important}.fc .fc-event-main,.fc .fc-daygrid-dot-event{font-size:10px}.fc-timegrid th.fc-day .fc-scrollgrid-sync-inner{margin:0 10px}.fc .fc-timegrid .fc-event-main{font-size:13px;padding:2px}}
    2 .wp-eventkoi #wpbody-content{padding-bottom:0}.wp-eventkoi #wpcontent{padding-left:0}body.eventkoi-active .components-panel__body.is-opened .block-editor-hooks__layout-constrained+.block-editor-hooks__layout-constrained{display:none !important}.eventkoi-admin{font-family:inter,-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:16px}.eventkoi-admin p{font-size:16px}.eventkoi-admin li{margin-bottom:0px}.eventkoi-admin a:hover,.eventkoi-admin a:focus{box-shadow:none;color:inherit}.eventkoi-admin [contenteditable=true]:empty:before{content:attr(placeholder);pointer-events:none;display:block;color:#777}.eventkoi-admin .eventkoi-error{border-color:#d13d3d !important}.eventkoi-admin .scrollbar-hide::-webkit-scrollbar{display:none}.eventkoi-admin .scrollbar-hide{-ms-overflow-style:none;scrollbar-width:none}.eventkoi-admin .appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.eventkoi-admin .mce-tinymce{border:1px solid #e5e7eb;border-radius:.5rem;box-shadow:0 1px 2px rgba(0,0,0,.04);background-color:#f9fafb;overflow:hidden}.eventkoi-admin .mce-container-body .mce-toolbar-grp{background-color:#f9fafb;border-bottom:0;padding:0}.eventkoi-admin .mce-container-body .mce-btn{margin:0 2px;border:none;min-height:28px;display:inline-flex}.eventkoi-admin .mce-container-body .mce-btn:hover,.eventkoi-admin .mce-container-body .mce-btn.mce-listbox:hover{box-shadow:none}.eventkoi-admin .mce-container-body .mce-btn .mce-ico::before{position:relative;top:1px}.eventkoi-admin .mce-container-body .mce-btn button{background:rgba(0,0,0,0);color:#374151;font-size:14px;padding:4px 6px;border-radius:2px;transition:none;border:none}.eventkoi-admin .mce-container-body{padding:0}.eventkoi-admin .mce-container-body .mce-btn button:hover{background-color:#e5e7eb;color:#111827;border:none}.eventkoi-admin .mce-container-body .mce-btn.mce-active button{background-color:#333;color:#fff;border:none}.eventkoi-admin .mce-container-body .mce-btn i{color:inherit !important;font-size:16px}.eventkoi-admin .mce-edit-area iframe{padding:0}.eventkoi-admin .mce-container-body .mce-btn button:focus{outline:none;box-shadow:none}.eventkoi-admin .mce-container-body .mce-btn-group{padding:4px}.eventkoi-admin .mce-container-body .mce-btn-group:not(:first-child){border-left:1px solid #eee !important;margin-left:0}
     2.wp-eventkoi #wpbody-content{padding-bottom:0}.wp-eventkoi #wpcontent{padding-left:0}body.eventkoi-active .components-panel__body.is-opened .block-editor-hooks__layout-constrained+.block-editor-hooks__layout-constrained{display:none !important}.eventkoi-admin{font-family:inter,-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:16px}.eventkoi-admin p{font-size:16px}.eventkoi-admin li{margin-bottom:0px}.eventkoi-admin a:hover,.eventkoi-admin a:focus{box-shadow:none;color:inherit}.eventkoi-admin [contenteditable=true]:empty:before{content:attr(placeholder);pointer-events:none;display:block;color:#777}.eventkoi-admin .eventkoi-error{border-color:#d13d3d !important}.eventkoi-admin .scrollbar-hide::-webkit-scrollbar{display:none}.eventkoi-admin .scrollbar-hide{-ms-overflow-style:none;scrollbar-width:none}.eventkoi-admin .appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.eventkoi-admin .mce-tinymce{border:1px solid #e5e7eb;border-radius:.5rem;box-shadow:0 1px 2px rgba(0,0,0,.04);background-color:#f9fafb;overflow:hidden;box-sizing:border-box}.eventkoi-admin .mce-container-body .mce-toolbar-grp{background-color:#f9fafb;border-bottom:0;padding:0}.eventkoi-admin .mce-container-body.mce-flow-layout{display:flex}.eventkoi-admin .mce-container-body.mce-flow-layout .mce-btn-group.mce-last{margin-left:auto}.eventkoi-admin .mce-container-body .mce-btn{margin:0 2px;border:none;min-height:28px;display:inline-flex}.eventkoi-admin .mce-container-body .mce-btn:hover,.eventkoi-admin .mce-container-body .mce-btn.mce-listbox:hover{box-shadow:none}.eventkoi-admin .mce-container-body .mce-btn .mce-ico::before{position:relative;top:1px}.eventkoi-admin .mce-container-body .mce-btn button{background:rgba(0,0,0,0);color:#374151;font-size:14px;padding:4px 6px;border-radius:2px;transition:none;border:none}.eventkoi-admin .mce-container-body{padding:0}.eventkoi-admin .mce-container-body .mce-btn button:hover{background-color:#e5e7eb;color:#111827;border:none}.eventkoi-admin .mce-container-body .mce-btn.mce-active button{background-color:#333;color:#fff;border:none}.eventkoi-admin .mce-container-body .mce-btn i{color:inherit !important;font-size:16px}.eventkoi-admin .mce-edit-area iframe{padding:0}.eventkoi-admin .mce-container-body .mce-btn button:focus{outline:none;box-shadow:none}.eventkoi-admin .mce-container-body .mce-btn-group{padding:4px}.eventkoi-admin .mce-container-body .mce-btn-group:not(:first-child){border-left:1px solid #eee !important;margin-left:0}.eventkoi-admin .mce-i-removeformat::before{content:"";display:inline-block;width:16px;height:16px;background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2724%27 height=%2724%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27currentColor%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M4 7V4h16v3%27/%3E%3Cpath d=%27M5 20h6%27/%3E%3Cpath d=%27M13 4 8 20%27/%3E%3Cpath d=%27m15 15 5 5%27/%3E%3Cpath d=%27m20 15-5 5%27/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:center;background-size:14px 14px;vertical-align:middle}.eventkoi-admin .mce-i-removeformat{font-family:none !important;color:currentColor !important}
    33.wp-block-eventkoi-calendar{margin-left:auto !important;margin-right:auto !important}
    44
  • eventkoi-lite/trunk/scripts/backend/build/index.js

    r3381596 r3392960  
    1 (()=>{var e,t,n={17:e=>{"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,o,a;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(o=r;0!==o--;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(a=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(o=r;0!==o--;)if(!Object.prototype.hasOwnProperty.call(n,a[o]))return!1;for(o=r;0!==o--;){var s=a[o];if(!e(t[s],n[s]))return!1}return!0}return t!=t&&n!=n}},106:(e,t)=>{!function(){var e={814:function(e,t,n){var r;function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}!function(){"use strict";var a={}.hasOwnProperty;function s(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var r=o(n);if("string"===r||"number"===r)e.push(n);else if(Array.isArray(n)){if(n.length){var i=s.apply(null,n);i&&e.push(i)}}else if("object"===r){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var l in n)a.call(n,l)&&n[l]&&e.push(l)}}}return e.join(" ")}e.exports?(s.default=s,e.exports=s):"object"===o(n.amdO)&&n.amdO?void 0===(r=function(){return s}.apply(t,[]))||(e.exports=r):window.classNames=s}()},922:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,a){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(r)for(var i=0;i<this.length;i++){var l=this[i][0];null!=l&&(s[l]=!0)}for(var c=0;c<e.length;c++){var d=[].concat(e[c]);r&&s[d[0]]||(void 0!==a&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=a),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),o&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=o):d[4]="".concat(o)),t.push(d))}},t}},499:function(e){"use strict";e.exports=function(e){return e[1]}},245:function(e,t,n){"use strict";var r=n(499),o=n.n(r),a=n(922),s=n.n(a)()(o());s.push([e.id,':root{--wp-admin-theme-color: #007cba;--wp-admin-theme-color--rgb: 0,124,186;--wp-admin-theme-color-darker-10: #006ba1;--wp-admin-theme-color-darker-10--rgb: 0,107,160.5;--wp-admin-theme-color-darker-20: #005a87;--wp-admin-theme-color-darker-20--rgb: 0,90,135;--wp-admin-border-width-focus: 2px}@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi){:root{--wp-admin-border-width-focus: 1.5px}}.codeamp-components-multi-select-control__input-container{font-size:13px;line-height:normal}.codeamp-components-multi-select-control__input-container{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;padding:6px 8px;box-shadow:0 0 0 transparent;transition:box-shadow 0.1s linear;border-radius:2px;border:1px solid #757575;font-size:16px;line-height:normal;width:100%;margin:0 0 8px 0;padding:0;cursor:text}@media (prefers-reduced-motion: reduce){.codeamp-components-multi-select-control__input-container{transition-duration:0s;transition-delay:0s}}@media (min-width: 600px){.codeamp-components-multi-select-control__input-container{font-size:13px;line-height:normal}}.codeamp-components-multi-select-control__input-container:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid transparent}.codeamp-components-multi-select-control__input-container::-webkit-input-placeholder{color:rgba(30,30,30,0.62)}.codeamp-components-multi-select-control__input-container::-moz-placeholder{opacity:1;color:rgba(30,30,30,0.62)}.codeamp-components-multi-select-control__input-container:-ms-input-placeholder{color:rgba(30,30,30,0.62)}.codeamp-components-multi-select-control__input-container.is-disabled{background:#ddd;border-color:#ddd}.codeamp-components-multi-select-control__input-container.is-active{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid transparent}.codeamp-components-multi-select-control__input-container input[type="text"].codeamp-components-multi-select-control__input{display:inline-block;flex:1;font-family:inherit;font-size:16px;width:100%;max-width:100%;margin-left:4px;padding:0;min-height:24px;min-width:50px;background:inherit;border:0;color:#1e1e1e;box-shadow:none}@media (min-width: 600px){.codeamp-components-multi-select-control__input-container input[type="text"].codeamp-components-multi-select-control__input{font-size:13px}}.codeamp-components-multi-select-control__input-container input[type="text"].codeamp-components-multi-select-control__input:focus,.codeamp-components-multi-select-control.is-active .codeamp-components-multi-select-control__input-container input[type="text"].codeamp-components-multi-select-control__input{outline:none;box-shadow:none}.codeamp-components-multi-select-control__input-container .codeamp-components-multi-select-control__token+input[type="text"].codeamp-components-multi-select-control__input{width:auto}.codeamp-components-multi-select-control__help{font-size:12px;font-style:normal;color:#757575}.codeamp-components-multi-select-control__tokens-container{padding:4px}.codeamp-components-multi-select-control__token{font-size:13px;display:flex;color:#1e1e1e;max-width:100%}.codeamp-components-multi-select-control__token.is-borderless{position:relative;padding:0 24px 0 0}.codeamp-components-multi-select-control__token.is-borderless .codeamp-components-multi-select-control__token-text{background:transparent;color:var(--wp-admin-theme-color)}.codeamp-components-multi-select-control__token.is-borderless .codeamp-components-multi-select-control__remove-token{background:transparent;color:#757575;position:absolute;top:1px;right:0;padding:0}.codeamp-components-multi-select-control__token.is-borderless.is-success .codeamp-components-multi-select-control__token-text{color:#4ab866}.codeamp-components-multi-select-control__token.is-borderless.is-error .codeamp-components-multi-select-control__token-text{color:#cc1818;border-radius:4px 0 0 4px;padding:0 4px 0 6px}.codeamp-components-multi-select-control__token.is-borderless.is-validating .codeamp-components-multi-select-control__token-text{color:#1e1e1e}.codeamp-components-multi-select-control__token.is-disabled .codeamp-components-multi-select-control__remove-token{cursor:default}.codeamp-components-multi-select-control__token-text,.codeamp-components-multi-select-control__remove-token.components-button{display:inline-block;line-height:24px;height:auto;background:#ddd;min-width:unset;transition:all 0.2s cubic-bezier(0.4, 1, 0.4, 1)}@media (prefers-reduced-motion: reduce){.codeamp-components-multi-select-control__token-text,.codeamp-components-multi-select-control__remove-token.components-button{transition-duration:0s;transition-delay:0s;animation-duration:1ms;animation-delay:0s}}.codeamp-components-multi-select-control__token-text{border-radius:2px 0 0 2px;padding:0 0 0 8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.codeamp-components-multi-select-control__remove-token.components-button{cursor:pointer;border-radius:0 2px 2px 0;padding:0 2px;color:#1e1e1e;line-height:10px;overflow:initial}.codeamp-components-multi-select-control__remove-token.components-button:hover{color:#1e1e1e}.codeamp-components-multi-select-control__suggestions-list{flex:1 0 100%;min-width:100%;max-height:9em;overflow-y:auto;transition:all 0.15s ease-in-out;list-style:none;border-top:1px solid #757575;margin:0;padding:0}@media (prefers-reduced-motion: reduce){.codeamp-components-multi-select-control__suggestions-list{transition-duration:0s;transition-delay:0s}}.codeamp-components-multi-select-control__no-suggestions{color:#757575;font-size:13px;margin:0;display:block;padding:4px 8px}.codeamp-components-multi-select-control__suggestion{color:#757575;display:block;font-size:13px;padding:4px 8px;margin:0;cursor:pointer}.codeamp-components-multi-select-control__suggestion.is-selected{background:var(--wp-admin-theme-color);color:#fff}.codeamp-components-multi-select-control__suggestion-match{text-decoration:underline}\n',""]),t.Z=s},313:function(e,t,n){"use strict";var r=n(499),o=n.n(r),a=n(922),s=n.n(a)()(o());s.push([e.id,".codeamp-components-resource-select-control>.components-base-control__field{position:relative;display:flex;flex-wrap:wrap}.codeamp-components-resource-select-control>.components-base-control__field>.components-base-control__label{flex:2}.codeamp-components-resource-select-control__label{margin-bottom:8px}.codeamp-components-resource-select-control__add_button{padding:0;margin:0;min-height:revert;height:auto;color:var(--wp-admin-theme-color);align-self:center;justify-content:right;margin-bottom:8px}.codeamp-components-resource-select-control__add_button:hover{text-decoration:underline}.codeamp-components-resource-select-control__edit_button.components-button.is-secondary{height:auto;margin-bottom:0}.codeamp-components-resource-select-control__select{width:auto;flex:1}.codeamp-components-resource-select-control .components-base-control{margin-bottom:0}.codeamp-components-resource-select-control .components-base-control__field{margin-bottom:0}.codeamp-components-resource-select-control .components-base-control{flex:1}\n",""]),t.Z=s},379:function(e){"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var a={},s=[],i=0;i<e.length;i++){var l=e[i],c=r.base?l[0]+r.base:l[0],d=a[c]||0,u="".concat(c," ").concat(d);a[c]=d+1;var f=n(u),h={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==f)t[f].references++,t[f].updater(h);else{var m=o(h,r);r.byIndex=i,t.splice(i,0,{identifier:u,updater:m,references:1})}s.push(u)}return s}function o(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,o){var a=r(e=e||[],o=o||{});return function(e){e=e||[];for(var s=0;s<a.length;s++){var i=n(a[s]);t[i].references--}for(var l=r(e,o),c=0;c<a.length;c++){var d=n(a[c]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}a=l}}},569:function(e){"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},216:function(e){"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},565:function(e,t,n){"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},795:function(e){"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var a=n.sourceMap;a&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},589:function(e){"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var a=n[t]={id:t,exports:{}};return e[t](a,a.exports,r),a.exports}r.amdO={},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nc=void 0;var o={};!function(){"use strict";r.r(o),r.d(o,{MultiSelectControl:function(){return xe},ResourceSelectControl:function(){return C}});var e=window.wp.i18n,t=window.wp.components,n=window.wp.compose,a=r(379),s=r.n(a),i=r(795),l=r.n(i),c=r(569),d=r.n(c),u=r(565),f=r.n(u),h=r(216),m=r.n(h),p=r(589),g=r.n(p),v=r(313),y={};y.styleTagTransform=g(),y.setAttributes=f(),y.insert=d().bind(null,"head"),y.domAPI=l(),y.insertStyleElement=m(),s()(v.Z,y),v.Z&&v.Z.locals&&v.Z.locals;var b=r(814),x=r.n(b);function w(){return w=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},w.apply(this,arguments)}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var S=function(){},C=function r(o){var a,s,i,l,c=o.onChange,d=void 0===c?S:c,u=o.onPrimaryAction,f=void 0===u?S:u,h=o.onSecondaryAction,m=void 0===h?S:h,p=o.label,g=void 0===p?"":p,v=o.primaryActionLabel,y=void 0===v?(0,e.__)("Edit","codeamp-block-components"):v,b=o.secondaryActionLabel,C=void 0===b?(0,e.__)("Add new","codeamp-block-components"):b,_=o.loadingLabel,j=void 0===_?(0,e.__)("Loading","codeamp-block-components"):_,E=o.showPrimaryAction,N=void 0===E||E,D=o.disabled,T=void 0!==D&&D,A=o.showSecondaryAction,R=void 0===A||A,M=o.defaultOption,O=o.options,I=o.value,P=o.help,L=o.primaryActionProps,F=o.secondaryActionProps,z=o.id,H=o.className,V=[];j&&(V=[{value:"loading",label:j}]),O&&(V=[],M&&V.push(M),(i=V).push.apply(i,function(e){if(Array.isArray(e))return k(e)}(l=O)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(l)||function(e,t){if(e){if("string"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k(e,t):void 0}}(l)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()));var B=(0,n.useInstanceId)(r,"codeamp-components-resource-select-control");return z&&(B=z),React.createElement(t.BaseControl,{id:B,className:x()("components-base-control codeamp-components-resource-select-control",H),help:P,label:g,__nextHasNoMarginBottom:!0},R&&React.createElement(t.Button,w({className:"codeamp-components-resource-select-control__add_button",disabled:T,onClick:m},F),null!==(a=null==F?void 0:F.label)&&void 0!==a?a:C),React.createElement(t.__experimentalHStack,null,React.createElement(t.SelectControl,{id:B,value:I,options:V,className:"codeamp-components-resource-select-control__select",onChange:d,disabled:T,__nextHasNoMarginBottom:!0}),N&&React.createElement(t.Button,w({onClick:f,variant:"secondary",disabled:T,className:"codeamp-components-resource-select-control__edit_button"},L),null!==(s=null==L?void 0:L.label)&&void 0!==s?s:y)))},_=window.wp.element,j=window.wp.a11y,E=window.wp.isShallowEqual,N=r.n(E),D=window.wp.primitives,T=(0,_.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(D.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})),A=function(){};function R(r){var o=r.value,a=r.label,s=r.title,i=r.isBorderless,l=void 0!==i&&i,c=r.disabled,d=void 0!==c&&c,u=r.onClickRemove,f=void 0===u?A:u,h=r.onMouseEnter,m=r.onMouseLeave,p=r.messages,g=r.termPosition,v=r.termsCount,y=(0,n.useInstanceId)(R),b=x()("codeamp-components-multi-select-control__token",{"is-borderless":l,"is-disabled":d}),w=(0,e.sprintf)((0,e.__)("%1$s (%2$s of %3$s)"),a,g,v);return React.createElement("span",{className:b,onMouseEnter:h,onMouseLeave:m,title:s,style:{margin:"0"}},React.createElement("span",{className:"codeamp-components-multi-select-control__token-text",id:"codeamp-components-multi-select-control__token-text-".concat(y)},React.createElement(t.VisuallyHidden,{as:"span"},w),React.createElement("span",{"aria-hidden":"true"},a)),React.createElement(t.Button,{className:"codeamp-components-multi-select-control__remove-token",icon:T,onClick:d?A:function(){return f({value:o})},label:p.remove,"aria-describedby":"codeamp-components-multi-select-control__token-text-".concat(y)}))}var M=["value","isExpanded","instanceId","selectedSuggestionIndex","className","onChange","onFocus","onBlur"];function O(){return O=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},O.apply(this,arguments)}function I(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var P=(0,_.forwardRef)((function(e,t){var n=e.value,r=e.isExpanded,o=e.instanceId,a=e.selectedSuggestionIndex,s=e.className,i=e.onChange,l=e.onFocus,c=e.onBlur,d=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,M),u=function(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,o=[],a=!0,s=!1;try{for(t=t.call(e);!(a=(n=t.next()).done)&&(o.push(n.value),2!==o.length);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==t.return||t.return()}finally{if(s)throw r}}return o}}(e)||function(e){if(e){if("string"==typeof e)return I(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?I(e,2):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,_.useState)(!1)),f=u[0],h=u[1],m=n?n.length+1:0;return React.createElement("input",O({ref:t,id:o,type:"text"},d,{value:n||"",onChange:function(e){i&&i({value:e.target.value})},onFocus:function(e){h(!0),null==l||l(e)},onBlur:function(e){h(!1),null==c||c(e)},size:m,className:x()(s,"codeamp-components-multi-select-control__input"),autoComplete:"off",role:"combobox","aria-expanded":r,"aria-autocomplete":"list","aria-owns":r?"".concat(o,"-suggestions"):void 0,"aria-activedescendant":f&&-1!==a&&r?"".concat(o,"-suggestions-").concat(a):void 0,"aria-describedby":"".concat(o,"-howto"),"data-lpignore":"true"}))}));function L(e){return L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},L(e)}function F(e){return F="function"==typeof Symbol&&"symbol"===L(Symbol.iterator)?function(e){return L(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":L(e)},F(e)}function z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function H(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function V(e,t){var n=e["page".concat(t?"Y":"X","Offset")],r="scroll".concat(t?"Top":"Left");if("number"!=typeof n){var o=e.document;"number"!=typeof(n=o.documentElement[r])&&(n=o.body[r])}return n}function B(e){return V(e)}function W(e){return V(e,!0)}function U(e){var t=function(e){var t,n,r,o=e.ownerDocument,a=o.body,s=o&&o.documentElement;return n=(t=e.getBoundingClientRect()).left,r=t.top,{left:n-=s.clientLeft||a.clientLeft||0,top:r-=s.clientTop||a.clientTop||0}}(e),n=e.ownerDocument,r=n.defaultView||n.parentWindow;return t.left+=B(r),t.top+=W(r),t}var $,G=new RegExp("^(".concat(/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,")(?!px)[a-z%]+$"),"i"),Y=/^(top|right|bottom|left)$/;function q(e,t){for(var n=0;n<e.length;n++)t(e[n])}function Z(e){return"border-box"===$(e,"boxSizing")}"undefined"!=typeof window&&($=window.getComputedStyle?function(e,t,n){var r="",o=e.ownerDocument,a=n||o.defaultView.getComputedStyle(e,null);return a&&(r=a.getPropertyValue(t)||a[t]),r}:function(e,t){var n=e.currentStyle&&e.currentStyle[t];if(G.test(n)&&!Y.test(t)){var r=e.style,o=r.left,a=e.runtimeStyle.left;e.runtimeStyle.left=e.currentStyle.left,r.left="fontSize"===t?"1em":n||0,n=r.pixelLeft+"px",r.left=o,e.runtimeStyle.left=a}return""===n?"auto":n});var K=["margin","border","padding"];function Q(e,t,n){var r,o,a,s=0;for(o=0;o<t.length;o++)if(r=t[o])for(a=0;a<n.length;a++){var i;i="border"===r?"".concat(r+n[a],"Width"):r+n[a],s+=parseFloat($(e,i))||0}return s}function J(e){return null!=e&&e==e.window}var X={};function ee(e,t,n){if(J(e))return"width"===t?X.viewportWidth(e):X.viewportHeight(e);if(9===e.nodeType)return"width"===t?X.docWidth(e):X.docHeight(e);var r="width"===t?["Left","Right"]:["Top","Bottom"],o="width"===t?e.offsetWidth:e.offsetHeight,a=($(e),Z(e)),s=0;(null==o||o<=0)&&(o=void 0,(null==(s=$(e,t))||Number(s)<0)&&(s=e.style[t]||0),s=parseFloat(s)||0),void 0===n&&(n=a?1:-1);var i=void 0!==o||a,l=o||s;if(-1===n)return i?l-Q(e,["border","padding"],r):s;if(i){var c=2===n?-Q(e,["border"],r):Q(e,["margin"],r);return l+(1===n?0:c)}return s+Q(e,K.slice(n),r)}q(["Width","Height"],(function(e){X["doc".concat(e)]=function(t){var n=t.document;return Math.max(n.documentElement["scroll".concat(e)],n.body["scroll".concat(e)],X["viewport".concat(e)](n))},X["viewport".concat(e)]=function(t){var n="client".concat(e),r=t.document,o=r.body,a=r.documentElement[n];return"CSS1Compat"===r.compatMode&&a||o&&o[n]||a}}));var te={position:"absolute",visibility:"hidden",display:"block"};function ne(e){var t,n=arguments;return 0!==e.offsetWidth?t=ee.apply(void 0,n):function(e,t,n){var r,o={},a=e.style;for(r in t)t.hasOwnProperty(r)&&(o[r]=a[r],a[r]=t[r]);for(r in n.call(e),t)t.hasOwnProperty(r)&&(a[r]=o[r])}(e,te,(function(){t=ee.apply(void 0,n)})),t}function re(e,t,n){var r=n;if("object"!==F(t))return void 0!==r?("number"==typeof r&&(r+="px"),void(e.style[t]=r)):$(e,t);for(var o in t)t.hasOwnProperty(o)&&re(e,o,t[o])}q(["width","height"],(function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);X["outer".concat(t)]=function(t,n){return t&&ne(t,e,n?0:1)};var n="width"===e?["Left","Right"]:["Top","Bottom"];X[e]=function(t,r){return void 0===r?t&&ne(t,e,-1):t?($(t),Z(t)&&(r+=Q(t,["padding","border"],n)),re(t,e,r)):void 0}}));var oe=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?H(n,!0).forEach((function(t){z(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({getWindow:function(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow},offset:function(e,t){if(void 0===t)return U(e);!function(e,t){"static"===re(e,"position")&&(e.style.position="relative");var n,r,o=U(e),a={};for(r in t)t.hasOwnProperty(r)&&(n=parseFloat(re(e,r))||0,a[r]=n+t[r]-o[r]);re(e,a)}(e,t)},isWindow:J,each:q,css:re,clone:function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);if(e.overflow)for(var r in e)e.hasOwnProperty(r)&&(t.overflow[r]=e.overflow[r]);return t},scrollLeft:function(e,t){if(J(e)){if(void 0===t)return B(e);window.scrollTo(t,W(e))}else{if(void 0===t)return e.scrollLeft;e.scrollLeft=t}},scrollTop:function(e,t){if(J(e)){if(void 0===t)return W(e);window.scrollTo(B(e),t)}else{if(void 0===t)return e.scrollTop;e.scrollTop=t}},viewportWidth:0,viewportHeight:0},X);function ae(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var se=function(e){e.preventDefault()},ie=function(t){var r=t.selectedIndex,o=t.scrollIntoView,a=t.searchValue,s=t.onHover,i=t.onSelect,l=t.suggestions,c=void 0===l?[]:l,d=t.instanceId,u=t.__experimentalRenderItem,f=function(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,o=[],a=!0,s=!1;try{for(t=t.call(e);!(a=(n=t.next()).done)&&(o.push(n.value),2!==o.length);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==t.return||t.return()}finally{if(s)throw r}}return o}}(e)||function(e){if(e){if("string"==typeof e)return ae(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ae(e,2):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,_.useState)(!1)),h=f[0],m=f[1],p=(0,n.useRefEffect)((function(e){var t;return r>-1&&o&&e.children[r]&&(m(!0),function(e,t,n){n=n||{},9===t.nodeType&&(t=oe.getWindow(t));var r=n.allowHorizontalScroll,o=n.onlyScrollIfNeeded,a=n.alignWithTop,s=n.alignWithLeft,i=n.offsetTop||0,l=n.offsetLeft||0,c=n.offsetBottom||0,d=n.offsetRight||0;r=void 0===r||r;var u,f,h,m,p,g,v,y,b,x,w=oe.isWindow(t),k=oe.offset(e),S=oe.outerHeight(e),C=oe.outerWidth(e);w?(v=t,x=oe.height(v),b=oe.width(v),y={left:oe.scrollLeft(v),top:oe.scrollTop(v)},p={left:k.left-y.left-l,top:k.top-y.top-i},g={left:k.left+C-(y.left+b)+d,top:k.top+S-(y.top+x)+c},m=y):(u=oe.offset(t),f=t.clientHeight,h=t.clientWidth,m={left:t.scrollLeft,top:t.scrollTop},p={left:k.left-(u.left+(parseFloat(oe.css(t,"borderLeftWidth"))||0))-l,top:k.top-(u.top+(parseFloat(oe.css(t,"borderTopWidth"))||0))-i},g={left:k.left+C-(u.left+h+(parseFloat(oe.css(t,"borderRightWidth"))||0))+d,top:k.top+S-(u.top+f+(parseFloat(oe.css(t,"borderBottomWidth"))||0))+c}),p.top<0||g.top>0?!0===a?oe.scrollTop(t,m.top+p.top):!1===a?oe.scrollTop(t,m.top+g.top):p.top<0?oe.scrollTop(t,m.top+p.top):oe.scrollTop(t,m.top+g.top):o||((a=void 0===a||!!a)?oe.scrollTop(t,m.top+p.top):oe.scrollTop(t,m.top+g.top)),r&&(p.left<0||g.left>0?!0===s?oe.scrollLeft(t,m.left+p.left):!1===s?oe.scrollLeft(t,m.left+g.left):p.left<0?oe.scrollLeft(t,m.left+p.left):oe.scrollLeft(t,m.left+g.left):o||((s=void 0===s||!!s)?oe.scrollLeft(t,m.left+p.left):oe.scrollLeft(t,m.left+g.left)))}(e.children[r],e,{onlyScrollIfNeeded:!0}),t=requestAnimationFrame((function(){m(!1)}))),function(){void 0!==t&&cancelAnimationFrame(t)}}),[r,o]),g=function(e){return function(){h||null==s||s(e)}},v=function(e){return function(){null==i||i(e)}};return React.createElement("ul",{ref:p,className:"codeamp-components-multi-select-control__suggestions-list",id:"".concat(d,"-suggestions"),role:"listbox"},0===c.length&&React.createElement("li",{className:"codeamp-components-multi-select-control__no-suggestions",role:"option"},(0,e.__)("No results found.","codeamp-block-components")),c.map((function(e,t){var n,o=function(e){var t=e.label.toLocaleLowerCase().indexOf(a);return{suggestionBeforeMatch:e.label.substring(0,t),suggestionMatch:e.label.substring(t,t+a.length),suggestionAfterMatch:e.label.substring(t+a.length)}}(e),s=x()("codeamp-components-multi-select-control__suggestion",{"is-selected":t===r});return n="function"==typeof u?u({item:e}):o?React.createElement("span",{"aria-label":e.label},o.suggestionBeforeMatch,React.createElement("strong",{className:"codeamp-components-multi-select-control__suggestion-match"},o.suggestionMatch),o.suggestionAfterMatch):e.label,React.createElement("li",{id:"".concat(d,"-suggestions-").concat(t),role:"option",className:s,key:e.value,onMouseDown:se,onClick:v(e),onMouseEnter:g(e),"aria-selected":t===r},n)})))},le=r(245),ce={};function de(){return de=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},de.apply(this,arguments)}function ue(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function he(e){return he="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},he(e)}function me(e){return function(e){if(Array.isArray(e))return ve(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ge(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],s=!0,i=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);s=!0);}catch(e){i=!0,o=e}finally{try{s||null==n.return||n.return()}finally{if(i)throw o}}return a}}(e,t)||ge(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ge(e,t){if(e){if("string"==typeof e)return ve(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ve(e,t):void 0}}function ve(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ye(e){if(""===e)return null;var t=null!=e?e:"",n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).find((function(e){return-1!==e.label.toLocaleLowerCase().indexOf(t.trim().toLocaleLowerCase())}));return n}ce.styleTagTransform=g(),ce.setAttributes=f(),ce.insert=d().bind(null,"head"),ce.domAPI=l(),ce.insertStyleElement=m(),s()(le.Z,ce),le.Z&&le.Z.locals&&le.Z.locals;var be=function(){};function xe(r){var o=r.autoCapitalize,a=r.autoComplete,s=r.maxLength,i=r.placeholder,l=r.label,c=void 0===l?(0,e.__)("Add item"):l,d=r.help,u=r.className,f=r.suggestions,h=void 0===f?[]:f,m=r.options,p=void 0===m?[]:m,g=r.maxSuggestions,v=void 0===g?100:g,y=r.value,b=void 0===y?[]:y,w=r.onChange,k=void 0===w?function(){}:w,S=r.onInputChange,C=void 0===S?function(){}:S,E=r.onFocus,D=void 0===E?void 0:E,T=(r.isBorderless,r.id),A=r.disabled,M=void 0!==A&&A,O=r.messages,I=void 0===O?{added:(0,e.__)("Item added."),removed:(0,e.__)("Item removed."),remove:(0,e.__)("Remove item"),__experimentalInvalid:(0,e.__)("Invalid item")}:O,L=r.__experimentalRenderItem,F=r.__experimentalAutoSelectFirstMatch,z=void 0===F||F,H=r.__experimentalValidateInput,V=void 0===H?function(){return!0}:H,B=r.__experimentalCloseSuggestionsOnSelect,W=void 0===B||B,U=r.__next36pxDefaultSize,$=void 0!==U&&U,G=(0,n.useInstanceId)(xe,"codeamp-components-multi-select-control");T&&(G=T);var Y=pe((0,_.useState)(""),2),q=Y[0],Z=Y[1],K=pe((0,_.useState)(0),2),Q=K[0],J=K[1],X=pe((0,_.useState)(!1),2),ee=X[0],te=X[1],ne=pe((0,_.useState)(!1),2),re=ne[0],oe=ne[1],ae=pe((0,_.useState)(-1),2),se=ae[0],le=ae[1],ce=pe((0,_.useState)(!1),2),ge=ce[0],ve=ce[1],we=(0,n.usePrevious)(h),ke=(0,n.usePrevious)(b),Se=(0,_.useRef)(null),Ce=(0,_.useRef)(null),_e=(0,n.useDebounce)(j.speak,500);function je(){var e;null===(e=Se.current)||void 0===e||e.focus()}function Ee(){var e;return Se.current===(null===(e=Se.current)||void 0===e?void 0:e.ownerDocument.activeElement)}function Ne(e){Ee()||e.target===Ce.current?(te(!0),oe(!0)):te(!1),"function"==typeof D&&D(e)}function De(e){e.target===Ce.current&&ee&&e.preventDefault()}function Te(e){Ie(e.value),je()}function Ae(e){var t=!1;return Ee()&&He()&&(e(),t=!0),t}function Re(){var e=ze()-1;e>-1&&Ie(b[e])}function Me(){var e=ze();e<b.length&&(Ie(b[e]),function(e){J(b.length-Math.max(e,-1)-1)}(e))}function Oe(e){V(e.label)?(function(e){if(me(new Set(e.filter((function(e){return!function(e){return b.some((function(t){return Pe(e)===Pe(t)}))}(e)})))),e.length>0){var t=me(b);t.splice.apply(t,[ze(),0].concat(me(e))),k(t)}}([e.value]),(0,j.speak)(I.added,"assertive"),Z(""),ve(!1),le(-1),W&&oe(!1),ee&&je()):(0,j.speak)(I.__experimentalInvalid,"assertive")}function Ie(e){var t=b.filter((function(t){return Pe(t)!==Pe(e)}));k(t),(0,j.speak)(I.removed,"assertive")}function Pe(e){return"object"===he(e)?e.value:e}function Le(){return p.filter((function(e){return-1===b.indexOf(e.value)}))}function Fe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:q,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Le(),n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:v;if(""!==e.trim()){var r=[],o=[];t.forEach((function(t){var n=t.label.toLocaleLowerCase().indexOf(e.trim().toLocaleLowerCase());0===n?r.push(t):n>0&&o.push(t)})),t=r.concat(o)}return t.slice(0,n)}function ze(){return b.length-Q}function He(){return 0===q.length}function Ve(){var e,t;return(null===(e=ye(q))||void 0===e||null===(t=e.label)||void 0===t?void 0:t.length)>0}function Be(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=Fe(q),r=n.length>0;t&&(z&&r?(le(0),ve(!0)):(le(-1),ve(!1))),le(0);var o=r?(0,e.sprintf)((0,e._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",n.length),n.length):(0,e.__)("No results.");_e(o,"assertive")}(0,_.useEffect)((function(){ee&&!Ee()&&je()}),[ee]),(0,_.useEffect)((function(){var e=!N()(h,we||[]);(e||b!==ke)&&Be(e)}),[h,we,b,ke]),(0,_.useEffect)((function(){Be()}),[q]),M&&ee&&(te(!1),Z(""));var We,Ue,$e=x()(u,"codeamp-components-multi-select-control__input-container",{"is-active":ee,"is-disabled":M}),Ge={className:"components-base-control codeamp-components-multi-select-control",tabIndex:-1},Ye=Fe();return M||(Ge=Object.assign({},Ge,{onKeyDown:function(e){var t=!1;if(!e.defaultPrevented){switch(e.code){case"Backspace":t=Ae(Re);break;case"Enter":case"Space":t=function(){var e=!1,t=function(){if(-1!==se)return Fe()[se]}();return t&&re?(Oe(t),e=!0):Ve()&&""!==q.trim()&&(Oe(q),e=!0),e}();break;case"ArrowLeft":t=function(){var e=!1;return He()&&(J((function(e){return Math.min(e+1,b.length)})),e=!0),e}();break;case"ArrowUp":t=re?(le((function(e){return(0===e?Fe(q,Le(),b,v).length:e)-1})),ve(!0),!0):(oe(!0),le(0),ve(!0),!0);break;case"ArrowRight":t=function(){var e=!1;return He()&&(J((function(e){return Math.max(e-1,0)})),e=!0),e}();break;case"ArrowDown":t=re?(le((function(e){return(e+1)%Fe(q,Le(),b,v).length})),ve(!0),!0):(oe(!0),le(0),ve(!0),!0);break;case"Delete":t=Ae(Me);break;case"Escape":t=function(e){return e.target instanceof HTMLInputElement&&(Z(e.target.value),oe(!1),le(-1),ve(!1)),!0}(e)}t&&e.preventDefault()}},onKeyPress:function(e){var t=!1;44===e.charCode&&(Ve()&&Oe(q),t=!0),t&&e.preventDefault()},onFocus:Ne})),React.createElement(t.BaseControl,{id:G,label:c,help:d},React.createElement("div",Ge,React.createElement("div",{ref:Ce,className:$e,tabIndex:-1,onMouseDown:De,onTouchStart:De},React.createElement(t.Flex,{className:"codeamp-components-multi-select-control__tokens-container",justify:"flex-start",align:"flex-start",gap:"4px",wrap:!0,__next36pxDefaultSize:$,hasTokens:!!b.length},(Ue=b.map((function(e){return p.find((function(t){return t.value===e}))||null})).map((function(e,n){return function(e,n){var r=e.value,o=e.label,a=e.onMouseEnter,s=void 0===a?be:a,i=e.onMouseLeave,l=void 0===i?be:i,c=e.isBorderless,d=void 0!==c&&c,u=r,f=n+1;return React.createElement(t.FlexItem,{key:"token-"+u},React.createElement(R,{value:u,label:o,title:"string"!=typeof token?o:void 0,onClickRemove:Te,isBorderless:d,onMouseEnter:s,onMouseLeave:l,disabled:M,messages:I,termPosition:f,termsCount:b.length}))}(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ue(Object(n),!0).forEach((function(t){fe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ue(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e),n)})),Ue.splice(ze(),0,(We={instanceId:G,autoCapitalize:o,autoComplete:a,placeholder:0===b.length?i:"",key:"input",disabled:M,value:q,onBlur:function(){Ve()?te(!1):(Z(""),J(0),te(!1),oe(!1),le(-1),ve(!1))},isExpanded:re,selectedSuggestionIndex:se,style:{lineHeight:"24px"},onClick:Ne},React.createElement(P,de({},We,{onChange:s&&b.length>=s?void 0:function(e){var t=e.value;Z(t),oe(!0),C(t)},ref:Se})))),Ue)),re&&React.createElement(ie,{instanceId:G,match:ye(q,p),searchValue:q.trim(),suggestions:Ye,selectedIndex:se,scrollIntoView:ge,onHover:function(e){var t=Fe().indexOf(e);t>=0&&(le(t),ve(!1))},onSelect:function(e){Oe(e)},__experimentalRenderItem:L}))))}}();var a=t;for(var s in o)a[s]=o[s];o.__esModule&&Object.defineProperty(a,"__esModule",{value:!0})}()},338:(e,t,n)=>{"use strict";var r=n(795);t.H=r.createRoot,r.hydrateRoot},795:e=>{"use strict";e.exports=window.ReactDOM},833:e=>{e.exports=function(e,t,n,r){var o=n?n.call(r,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var a=Object.keys(e),s=Object.keys(t);if(a.length!==s.length)return!1;for(var i=Object.prototype.hasOwnProperty.bind(t),l=0;l<a.length;l++){var c=a[l];if(!i(c))return!1;var d=e[c],u=t[c];if(!1===(o=n?n.call(r,d,u,c):void 0)||void 0===o&&d!==u)return!1}return!0}}},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var a=r[e]={exports:{}};return n[e](a,a.exports,o),a.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var a=Object.create(null);o.r(a);var s={};e=e||[null,t({}),t([]),t(t)];for(var i=2&r&&n;"object"==typeof i&&!~e.indexOf(i);i=t(i))Object.getOwnPropertyNames(i).forEach((e=>s[e]=()=>n[e]));return s.default=()=>n,o.d(a,s),a},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nc=void 0,(()=>{"use strict";const e=window.React;var t,n=o.t(e,2),r=o.n(e),a=o(338);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(t||(t={}));const i="popstate";function l(e,t){if(!1===e||null==e)throw new Error(t)}function c(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function d(e,t){return{usr:e.state,key:e.key,idx:t}}function u(e,t,n,r){return void 0===n&&(n=null),s({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?h(t):t,{state:n,key:t&&t.key||r||Math.random().toString(36).substr(2,8)})}function f(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function h(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}var m;function p(e,t,n){return void 0===n&&(n="/"),function(e,t,n,r){let o=D(("string"==typeof t?h(t):t).pathname||"/",n);if(null==o)return null;let a=g(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(a);let s=null;for(let e=0;null==s&&e<a.length;++e){let t=N(o);s=j(a[e],t,r)}return s}(e,t,n,!1)}function g(e,t,n,r){void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r="");let o=(e,o,a)=>{let s={relativePath:void 0===a?e.path||"":a,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};s.relativePath.startsWith("/")&&(l(s.relativePath.startsWith(r),'Absolute route path "'+s.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),s.relativePath=s.relativePath.slice(r.length));let i=M([r,s.relativePath]),c=n.concat(s);e.children&&e.children.length>0&&(l(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+i+'".'),g(e.children,t,c,i)),(null!=e.path||e.index)&&t.push({path:i,score:_(i,e.index),routesMeta:c})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let n of v(e.path))o(e,t,n);else o(e,t)})),t}function v(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,o=n.endsWith("?"),a=n.replace(/\?$/,"");if(0===r.length)return o?[a,""]:[a];let s=v(r.join("/")),i=[];return i.push(...s.map((e=>""===e?a:[a,e].join("/")))),o&&i.push(...s),i.map((t=>e.startsWith("/")&&""===t?"/":t))}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(m||(m={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const y=/^:[\w-]+$/,b=3,x=2,w=1,k=10,S=-2,C=e=>"*"===e;function _(e,t){let n=e.split("/"),r=n.length;return n.some(C)&&(r+=S),t&&(r+=x),n.filter((e=>!C(e))).reduce(((e,t)=>e+(y.test(t)?b:""===t?w:k)),r)}function j(e,t,n){void 0===n&&(n=!1);let{routesMeta:r}=e,o={},a="/",s=[];for(let e=0;e<r.length;++e){let i=r[e],l=e===r.length-1,c="/"===a?t:t.slice(a.length)||"/",d=E({path:i.relativePath,caseSensitive:i.caseSensitive,end:l},c),u=i.route;if(!d&&l&&n&&!r[r.length-1].route.index&&(d=E({path:i.relativePath,caseSensitive:i.caseSensitive,end:!1},c)),!d)return null;Object.assign(o,d.params),s.push({params:o,pathname:M([a,d.pathname]),pathnameBase:O(M([a,d.pathnameBase])),route:u}),"/"!==d.pathnameBase&&(a=M([a,d.pathnameBase]))}return s}function E(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!0),c("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));return e.endsWith("*")?(r.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let a=o[0],s=a.replace(/(.)\/+$/,"$1"),i=o.slice(1),l=r.reduce(((e,t,n)=>{let{paramName:r,isOptional:o}=t;if("*"===r){let e=i[n]||"";s=a.slice(0,a.length-e.length).replace(/(.)\/+$/,"$1")}const l=i[n];return e[r]=o&&!l?void 0:(l||"").replace(/%2F/g,"/"),e}),{});return{params:l,pathname:a,pathnameBase:s,pattern:e}}function N(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return c(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function D(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function T(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"].  Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function A(e,t){let n=function(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}(e);return t?n.map(((e,t)=>t===n.length-1?e.pathname:e.pathnameBase)):n.map((e=>e.pathnameBase))}function R(e,t,n,r){let o;void 0===r&&(r=!1),"string"==typeof e?o=h(e):(o=s({},e),l(!o.pathname||!o.pathname.includes("?"),T("?","pathname","search",o)),l(!o.pathname||!o.pathname.includes("#"),T("#","pathname","hash",o)),l(!o.search||!o.search.includes("#"),T("#","search","hash",o)));let a,i=""===e||""===o.pathname,c=i?"/":o.pathname;if(null==c)a=n;else{let e=t.length-1;if(!r&&c.startsWith("..")){let t=c.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}a=e>=0?t[e]:"/"}let d=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:o=""}="string"==typeof e?h(e):e,a=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:a,search:I(r),hash:P(o)}}(o,a),u=c&&"/"!==c&&c.endsWith("/"),f=(i||"."===c)&&n.endsWith("/");return d.pathname.endsWith("/")||!u&&!f||(d.pathname+="/"),d}const M=e=>e.join("/").replace(/\/\/+/g,"/"),O=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),I=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",P=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;const L=["post","put","patch","delete"],F=(new Set(L),["get",...L]);function z(){return z=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},z.apply(this,arguments)}new Set(F),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const H=e.createContext(null),V=e.createContext(null),B=e.createContext(null),W=e.createContext(null),U=e.createContext({outlet:null,matches:[],isDataRoute:!1}),$=e.createContext(null);function G(){return null!=e.useContext(W)}function Y(){return G()||l(!1),e.useContext(W).location}function q(t){G()||l(!1);let{pathname:n}=Y();return e.useMemo((()=>E(t,N(n))),[n,t])}function Z(t){e.useContext(B).static||e.useLayoutEffect(t)}function K(){let{isDataRoute:t}=e.useContext(U);return t?function(){let{router:t}=function(){let t=e.useContext(H);return t||l(!1),t}(se.UseNavigateStable),n=le(ie.UseNavigateStable),r=e.useRef(!1);Z((()=>{r.current=!0}));let o=e.useCallback((function(e,o){void 0===o&&(o={}),r.current&&("number"==typeof e?t.navigate(e):t.navigate(e,z({fromRouteId:n},o)))}),[t,n]);return o}():function(){G()||l(!1);let t=e.useContext(H),{basename:n,future:r,navigator:o}=e.useContext(B),{matches:a}=e.useContext(U),{pathname:s}=Y(),i=JSON.stringify(A(a,r.v7_relativeSplatPath)),c=e.useRef(!1);Z((()=>{c.current=!0}));let d=e.useCallback((function(e,r){if(void 0===r&&(r={}),!c.current)return;if("number"==typeof e)return void o.go(e);let a=R(e,JSON.parse(i),s,"path"===r.relative);null==t&&"/"!==n&&(a.pathname="/"===a.pathname?n:M([n,a.pathname])),(r.replace?o.replace:o.push)(a,r.state,r)}),[n,o,i,s,t]);return d}()}const Q=e.createContext(null);function J(){return e.useContext(Q)}function X(){let{matches:t}=e.useContext(U),n=t[t.length-1];return n?n.params:{}}function ee(t,n){let{relative:r}=void 0===n?{}:n,{future:o}=e.useContext(B),{matches:a}=e.useContext(U),{pathname:s}=Y(),i=JSON.stringify(A(a,o.v7_relativeSplatPath));return e.useMemo((()=>R(t,JSON.parse(i),s,"path"===r)),[t,i,s,r])}function te(n,r,o,a){G()||l(!1);let{navigator:s,static:i}=e.useContext(B),{matches:c}=e.useContext(U),d=c[c.length-1],u=d?d.params:{},f=(d&&d.pathname,d?d.pathnameBase:"/");d&&d.route;let m,g=Y();if(r){var v;let e="string"==typeof r?h(r):r;"/"===f||(null==(v=e.pathname)?void 0:v.startsWith(f))||l(!1),m=e}else m=g;let y=m.pathname||"/",b=y;if("/"!==f){let e=f.replace(/^\//,"").split("/");b="/"+y.replace(/^\//,"").split("/").slice(e.length).join("/")}let x=!i&&o&&o.matches&&o.matches.length>0?o.matches:p(n,{pathname:b}),w=function(t,n,r,o){var a;if(void 0===n&&(n=[]),void 0===r&&(r=null),void 0===o&&(o=null),null==t){var s;if(!r)return null;if(r.errors)t=r.matches;else{if(!(null!=(s=o)&&s.v7_partialHydration&&0===n.length&&!r.initialized&&r.matches.length>0))return null;t=r.matches}}let i=t,c=null==(a=r)?void 0:a.errors;if(null!=c){let e=i.findIndex((e=>e.route.id&&void 0!==(null==c?void 0:c[e.route.id])));e>=0||l(!1),i=i.slice(0,Math.min(i.length,e+1))}let d=!1,u=-1;if(r&&o&&o.v7_partialHydration)for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(u=e),t.route.id){let{loaderData:e,errors:n}=r,o=t.route.loader&&void 0===e[t.route.id]&&(!n||void 0===n[t.route.id]);if(t.route.lazy||o){d=!0,i=u>=0?i.slice(0,u+1):[i[0]];break}}}return i.reduceRight(((t,o,a)=>{let s,l=!1,f=null,h=null;var m;r&&(s=c&&o.route.id?c[o.route.id]:void 0,f=o.route.errorElement||re,d&&(u<0&&0===a?(ce[m="route-fallback"]||(ce[m]=!0),l=!0,h=null):u===a&&(l=!0,h=o.route.hydrateFallbackElement||null)));let p=n.concat(i.slice(0,a+1)),g=()=>{let n;return n=s?f:l?h:o.route.Component?e.createElement(o.route.Component,null):o.route.element?o.route.element:t,e.createElement(ae,{match:o,routeContext:{outlet:t,matches:p,isDataRoute:null!=r},children:n})};return r&&(o.route.ErrorBoundary||o.route.errorElement||0===a)?e.createElement(oe,{location:r.location,revalidation:r.revalidation,component:f,error:s,children:g(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):g()}),null)}(x&&x.map((e=>Object.assign({},e,{params:Object.assign({},u,e.params),pathname:M([f,s.encodeLocation?s.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?f:M([f,s.encodeLocation?s.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),c,o,a);return r&&w?e.createElement(W.Provider,{value:{location:z({pathname:"/",search:"",hash:"",state:null,key:"default"},m),navigationType:t.Pop}},w):w}function ne(){let t=function(){var t;let n=e.useContext($),r=function(){let t=e.useContext(V);return t||l(!1),t}(ie.UseRouteError),o=le(ie.UseRouteError);return void 0!==n?n:null==(t=r.errors)?void 0:t[o]}(),n=function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return e.createElement(e.Fragment,null,e.createElement("h2",null,"Unexpected Application Error!"),e.createElement("h3",{style:{fontStyle:"italic"}},n),r?e.createElement("pre",{style:o},r):null,null)}const re=e.createElement(ne,null);class oe extends e.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?e.createElement(U.Provider,{value:this.props.routeContext},e.createElement($.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ae(t){let{routeContext:n,match:r,children:o}=t,a=e.useContext(H);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),e.createElement(U.Provider,{value:n},o)}var se=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(se||{}),ie=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(ie||{});function le(t){let n=function(){let t=e.useContext(U);return t||l(!1),t}(),r=n.matches[n.matches.length-1];return r.route.id||l(!1),r.route.id}const ce={};function de(t){return function(t){let n=e.useContext(U).outlet;return n?e.createElement(Q.Provider,{value:t},n):n}(t.context)}function ue(e){l(!1)}function fe(n){let{basename:r="/",children:o=null,location:a,navigationType:s=t.Pop,navigator:i,static:c=!1,future:d}=n;G()&&l(!1);let u=r.replace(/^\/*/,"/"),f=e.useMemo((()=>({basename:u,navigator:i,static:c,future:z({v7_relativeSplatPath:!1},d)})),[u,d,i,c]);"string"==typeof a&&(a=h(a));let{pathname:m="/",search:p="",hash:g="",state:v=null,key:y="default"}=a,b=e.useMemo((()=>{let e=D(m,u);return null==e?null:{location:{pathname:e,search:p,hash:g,state:v,key:y},navigationType:s}}),[u,m,p,g,v,y,s]);return null==b?null:e.createElement(B.Provider,{value:f},e.createElement(W.Provider,{children:o,value:b}))}function he(e){let{children:t,location:n}=e;return te(me(t),n)}function me(t,n){void 0===n&&(n=[]);let r=[];return e.Children.forEach(t,((t,o)=>{if(!e.isValidElement(t))return;let a=[...n,o];if(t.type===e.Fragment)return void r.push.apply(r,me(t.props.children,a));t.type!==ue&&l(!1),t.props.index&&t.props.children&&l(!1);let s={id:t.props.id||a.join("-"),caseSensitive:t.props.caseSensitive,element:t.props.element,Component:t.props.Component,index:t.props.index,path:t.props.path,loader:t.props.loader,action:t.props.action,errorElement:t.props.errorElement,ErrorBoundary:t.props.ErrorBoundary,hasErrorBoundary:null!=t.props.ErrorBoundary||null!=t.props.errorElement,shouldRevalidate:t.props.shouldRevalidate,handle:t.props.handle,lazy:t.props.lazy};t.props.children&&(s.children=me(t.props.children,a)),r.push(s)})),r}e.startTransition,new Promise((()=>{})),e.Component;var pe=o(795);function ge(){return ge=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ge.apply(this,arguments)}function ve(e){return void 0===e&&(e=""),new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map((e=>[n,e])):[[n,r]])}),[]))}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const ye=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"];try{window.__reactRouterVersion="6"}catch(e){}new Map;const be=e.startTransition;function xe(n){let{basename:r,children:o,future:a,window:m}=n,p=e.useRef();null==p.current&&(p.current=function(e){return void 0===e&&(e={}),function(e,n,r,o){void 0===o&&(o={});let{window:a=document.defaultView,v5Compat:c=!1}=o,h=a.history,m=t.Pop,p=null,g=v();function v(){return(h.state||{idx:null}).idx}function y(){m=t.Pop;let e=v(),n=null==e?null:e-g;g=e,p&&p({action:m,location:x.location,delta:n})}function b(e){let t="null"!==a.location.origin?a.location.origin:a.location.href,n="string"==typeof e?e:f(e);return n=n.replace(/ $/,"%20"),l(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==g&&(g=0,h.replaceState(s({},h.state,{idx:g}),""));let x={get action(){return m},get location(){return e(a,h)},listen(e){if(p)throw new Error("A history only accepts one active listener");return a.addEventListener(i,y),p=e,()=>{a.removeEventListener(i,y),p=null}},createHref:e=>n(a,e),createURL:b,encodeLocation(e){let t=b(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,n){m=t.Push;let o=u(x.location,e,n);r&&r(o,e),g=v()+1;let s=d(o,g),i=x.createHref(o);try{h.pushState(s,"",i)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;a.location.assign(i)}c&&p&&p({action:m,location:x.location,delta:1})},replace:function(e,n){m=t.Replace;let o=u(x.location,e,n);r&&r(o,e),g=v();let a=d(o,g),s=x.createHref(o);h.replaceState(a,"",s),c&&p&&p({action:m,location:x.location,delta:0})},go:e=>h.go(e)};return x}((function(e,t){let{pathname:n="/",search:r="",hash:o=""}=h(e.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),u("",{pathname:n,search:r,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"==typeof t?t:f(t))}),(function(e,t){c("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}({window:m,v5Compat:!0}));let g=p.current,[v,y]=e.useState({action:g.action,location:g.location}),{v7_startTransition:b}=a||{},x=e.useCallback((e=>{b&&be?be((()=>y(e))):y(e)}),[y,b]);return e.useLayoutEffect((()=>g.listen(x)),[g,x]),e.useEffect((()=>{return null==(e=a)||e.v7_startTransition,void 0!==(null==e?void 0:e.v7_relativeSplatPath)||t&&t.v7_relativeSplatPath,void(t&&(t.v7_fetcherPersist,t.v7_normalizeFormMethod,t.v7_partialHydration,t.v7_skipActionErrorRevalidation));var e,t}),[a]),e.createElement(fe,{basename:r,children:o,location:v.location,navigationType:v.action,navigator:g,future:a})}pe.flushSync,e.useId;const we="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,ke=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Se=e.forwardRef((function(t,n){let r,{onClick:o,relative:a,reloadDocument:s,replace:i,state:c,target:d,to:u,preventScrollReset:h,viewTransition:m}=t,p=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(t,ye),{basename:g}=e.useContext(B),v=!1;if("string"==typeof u&&ke.test(u)&&(r=u,we))try{let e=new URL(window.location.href),t=u.startsWith("//")?new URL(e.protocol+u):new URL(u),n=D(t.pathname,g);t.origin===e.origin&&null!=n?u=n+t.search+t.hash:v=!0}catch(e){}let y=function(t,n){let{relative:r}=void 0===n?{}:n;G()||l(!1);let{basename:o,navigator:a}=e.useContext(B),{hash:s,pathname:i,search:c}=ee(t,{relative:r}),d=i;return"/"!==o&&(d="/"===i?o:M([o,i])),a.createHref({pathname:d,search:c,hash:s})}(u,{relative:a}),b=function(t,n){let{target:r,replace:o,state:a,preventScrollReset:s,relative:i,viewTransition:l}=void 0===n?{}:n,c=K(),d=Y(),u=ee(t,{relative:i});return e.useCallback((e=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(e,r)){e.preventDefault();let n=void 0!==o?o:f(d)===f(u);c(t,{replace:n,state:a,preventScrollReset:s,relative:i,viewTransition:l})}}),[d,c,u,o,a,r,t,s,i,l])}(u,{replace:i,state:c,target:d,preventScrollReset:h,relative:a,viewTransition:m});return e.createElement("a",ge({},p,{href:r||y,onClick:v||s?o:function(e){o&&o(e),e.defaultPrevented||b(e)},ref:n,target:d}))}));var Ce,_e;function je(t){let n=e.useRef(ve(t)),r=e.useRef(!1),o=Y(),a=e.useMemo((()=>function(e,t){let n=ve(e);return t&&t.forEach(((e,r)=>{n.has(r)||t.getAll(r).forEach((e=>{n.append(r,e)}))})),n}(o.search,r.current?null:n.current)),[o.search]),s=K(),i=e.useCallback(((e,t)=>{const n=ve("function"==typeof e?e(a):e);r.current=!0,s("?"+n,t)}),[s,a]);return[a,i]}(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Ce||(Ce={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(_e||(_e={}));const Ee=window.wp.apiFetch;var Ne=o.n(Ee);const De=window.ReactJSXRuntime;let Te=null;const Ae=(0,e.createContext)({settings:null,refreshSettings:()=>Promise.resolve(null)}),Re=()=>(0,e.useContext)(Ae);function Me({children:t}){const[n,r]=(0,e.useState)(null),o=(0,e.useCallback)((async()=>{try{const e=await Ne()({path:`${eventkoi_params.api}/settings`,method:"get",headers:{"EVENTKOI-API-KEY":eventkoi_params.api_key}});return r(e),Te=e,e}catch(e){return console.error("Failed to load settings:",e),null}}),[]);return(0,e.useEffect)((()=>{o()}),[o]),(0,De.jsx)(Ae.Provider,{value:{settings:n,refreshSettings:o},children:t})}const Oe={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function Ie(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Pe={date:Ie({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Ie({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Ie({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Le={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Fe(e){return(t,n)=>{let r;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,o=n?.width?String(n.width):t;r=e.formattingValues[o]||e.formattingValues[t]}else{const t=e.defaultWidth,o=n?.width?String(n.width):e.defaultWidth;r=e.values[o]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}const ze={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Fe({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Fe({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Fe({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Fe({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Fe({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function He(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;const s=a[0],i=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(i)?function(e){for(let t=0;t<e.length;t++)if(e[t].test(s))return t}(i):function(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&e[t].test(s))return t}(i);let c;return c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c,{value:c,rest:t.slice(s.length)}}}const Ve={ordinalNumber:(Be={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const n=e.match(Be.matchPattern);if(!n)return null;const r=n[0],o=e.match(Be.parsePattern);if(!o)return null;let a=Be.valueCallback?Be.valueCallback(o[0]):o[0];return a=t.valueCallback?t.valueCallback(a):a,{value:a,rest:e.slice(r.length)}}),era:He({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:He({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:He({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:He({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:He({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};var Be;const We={code:"en-US",formatDistance:(e,t,n)=>{let r;const o=Oe[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:Pe,formatRelative:(e,t,n,r)=>Le[e],localize:ze,match:Ve,options:{weekStartsOn:0,firstWeekContainsDate:1}};let Ue={};function $e(){return Ue}Math.pow(10,8);const Ge=6048e5;function Ye(e){const t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):"number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?new Date(e):new Date(NaN)}function qe(e){const t=Ye(e);return t.setHours(0,0,0,0),t}function Ze(e){const t=Ye(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Ke(e,t){const n=qe(e),r=qe(t),o=+n-Ze(n),a=+r-Ze(r);return Math.round((o-a)/864e5)}function Qe(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function Je(e){const t=Ye(e),n=Qe(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Xe(e,t){const n=$e(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Ye(e),a=o.getDay(),s=(a<r?7:0)+a-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function et(e){return Xe(e,{weekStartsOn:1})}function tt(e){const t=Ye(e),n=t.getFullYear(),r=Qe(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const o=et(r),a=Qe(e,0);a.setFullYear(n,0,4),a.setHours(0,0,0,0);const s=et(a);return t.getTime()>=o.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function nt(e){const t=Ye(e),n=+et(t)-+function(e){const t=tt(e),n=Qe(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),et(n)}(t);return Math.round(n/Ge)+1}function rt(e,t){const n=Ye(e),r=n.getFullYear(),o=$e(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,s=Qe(e,0);s.setFullYear(r+1,0,a),s.setHours(0,0,0,0);const i=Xe(s,t),l=Qe(e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);const c=Xe(l,t);return n.getTime()>=i.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function ot(e,t){const n=Ye(e),r=+Xe(n,t)-+function(e,t){const n=$e(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=rt(e,t),a=Qe(e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),Xe(a,t)}(n,t);return Math.round(r/Ge)+1}function at(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const st={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return at("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):at(n+1,2)},d:(e,t)=>at(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>at(e.getHours()%12||12,t.length),H:(e,t)=>at(e.getHours(),t.length),m:(e,t)=>at(e.getMinutes(),t.length),s:(e,t)=>at(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return at(Math.trunc(r*Math.pow(10,n-3)),t.length)}},it={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:"year"})}return st.y(e,t)},Y:function(e,t,n,r){const o=rt(e,r),a=o>0?o:1-o;return"YY"===t?at(a%100,2):"Yo"===t?n.ordinalNumber(a,{unit:"year"}):at(a,t.length)},R:function(e,t){return at(tt(e),t.length)},u:function(e,t){return at(e.getFullYear(),t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return at(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return at(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return st.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return at(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=ot(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):at(o,t.length)},I:function(e,t,n){const r=nt(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):at(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):st.d(e,t)},D:function(e,t,n){const r=function(e){const t=Ye(e);return Ke(t,Je(t))+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):at(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return at(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return at(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return at(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(o=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(o=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return st.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):st.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):at(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):at(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):st.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):st.s(e,t)},S:function(e,t){return st.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return ct(r);case"XXXX":case"XX":return dt(r);default:return dt(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return ct(r);case"xxxx":case"xx":return dt(r);default:return dt(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+lt(r,":");default:return"GMT"+dt(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+lt(r,":");default:return"GMT"+dt(r,":")}},t:function(e,t,n){return at(Math.trunc(e.getTime()/1e3),t.length)},T:function(e,t,n){return at(e.getTime(),t.length)}};function lt(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),a=r%60;return 0===a?n+String(o):n+String(o)+t+at(a,2)}function ct(e,t){return e%60==0?(e>0?"-":"+")+at(Math.abs(e)/60,2):dt(e,t)}function dt(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+at(Math.trunc(r/60),2)+t+at(r%60,2)}const ut=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},ft=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},ht={p:ft,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return ut(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;default:a=t.dateTime({width:"full"})}return a.replace("{{date}}",ut(r,t)).replace("{{time}}",ft(o,t))}},mt=/^D+$/,pt=/^Y+$/,gt=["D","DD","YY","YYYY"];function vt(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}function yt(e){if(!vt(e)&&"number"!=typeof e)return!1;const t=Ye(e);return!isNaN(Number(t))}const bt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,xt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,wt=/^'([^]*?)'?$/,kt=/''/g,St=/[a-zA-Z]/;function Ct(e,t,n){const r=$e(),o=n?.locale??r.locale??We,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,s=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=Ye(e);if(!yt(i))throw new RangeError("Invalid time value");let l=t.match(xt).map((e=>{const t=e[0];return"p"===t||"P"===t?(0,ht[t])(e,o.formatLong):e})).join("").match(bt).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:_t(e)};if(it[t])return{isToken:!0,value:e};if(t.match(St))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));o.localize.preprocessor&&(l=o.localize.preprocessor(i,l));const c={firstWeekContainsDate:a,weekStartsOn:s,locale:o};return l.map((r=>{if(!r.isToken)return r.value;const a=r.value;return(!n?.useAdditionalWeekYearTokens&&function(e){return pt.test(e)}(a)||!n?.useAdditionalDayOfYearTokens&&function(e){return mt.test(e)}(a))&&function(e,t,n){const r=function(e,t,n){const r="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,n);if(console.warn(r),gt.includes(e))throw new RangeError(r)}(a,t,String(e)),(0,it[a[0]])(i,a,o.localize,c)})).join("")}function _t(e){const t=e.match(wt);return t?t[1].replace(kt,"'"):e}function jt(e,t,n){const r=Object.assign({},$e()),o=function(e,t,n){return new Intl.DateTimeFormat(n?[n.code,"en-US"]:void 0,{timeZone:t,timeZoneName:e})}(e,n.timeZone,n.locale??r.locale);return"formatToParts"in o?function(e,t){const n=e.formatToParts(t);for(let e=n.length-1;e>=0;--e)if("timeZoneName"===n[e].type)return n[e].value}(o,t):function(e,t){const n=e.format(t).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(n);return r?r[0].substr(1):""}(o,t)}const Et={year:0,month:1,day:2,hour:3,minute:4,second:5},Nt={},Dt=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),Tt="06/25/2014, 00:00:00"===Dt||"‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00"===Dt;function At(e,t,n,r,o,a,s){const i=new Date(0);return i.setUTCFullYear(e,t,n),i.setUTCHours(r,o,a,s),i}const Rt=36e5,Mt={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function Ot(e,t,n){if(!e)return 0;let r,o,a=Mt.timezoneZ.exec(e);if(a)return 0;if(a=Mt.timezoneHH.exec(e),a)return r=parseInt(a[1],10),Pt(r)?-r*Rt:NaN;if(a=Mt.timezoneHHMM.exec(e),a){r=parseInt(a[2],10);const e=parseInt(a[3],10);return Pt(r,e)?(o=Math.abs(r)*Rt+6e4*e,"+"===a[1]?-o:o):NaN}if(function(e){if(Lt[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),Lt[e]=!0,!0}catch(e){return!1}}(e)){t=new Date(t||Date.now());const r=n?t:function(e){return At(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}(t),o=It(r,e),a=n?o:function(e,t,n){let r=e.getTime()-t;const o=It(new Date(r),n);if(t===o)return t;r-=o-t;const a=It(new Date(r),n);return o===a?o:Math.max(o,a)}(t,o,e);return-a}return NaN}function It(e,t){const n=function(e,t){const n=function(e){return Nt[e]||(Nt[e]=Tt?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),Nt[e]}(t);return"formatToParts"in n?function(e,t){try{const n=e.formatToParts(t),r=[];for(let e=0;e<n.length;e++){const t=Et[n[e].type];void 0!==t&&(r[t]=parseInt(n[e].value,10))}return r}catch(e){if(e instanceof RangeError)return[NaN];throw e}}(n,e):function(e,t){const n=e.format(t),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[parseInt(r[3],10),parseInt(r[1],10),parseInt(r[2],10),parseInt(r[4],10),parseInt(r[5],10),parseInt(r[6],10)]}(n,e)}(e,t),r=At(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime();let o=e.getTime();const a=o%1e3;return o-=a>=0?a:1e3+a,r-o}function Pt(e,t){return-23<=e&&e<=23&&(null==t||0<=t&&t<=59)}const Lt={},Ft={X:function(e,t,n){const r=zt(n.timeZone,e);if(0===r)return"Z";switch(t){case"X":return Bt(r);case"XXXX":case"XX":return Vt(r);default:return Vt(r,":")}},x:function(e,t,n){const r=zt(n.timeZone,e);switch(t){case"x":return Bt(r);case"xxxx":case"xx":return Vt(r);default:return Vt(r,":")}},O:function(e,t,n){const r=zt(n.timeZone,e);switch(t){case"O":case"OO":case"OOO":return"GMT"+function(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),a=r%60;return 0===a?n+String(o):n+String(o)+t+Ht(a,2)}(r,":");default:return"GMT"+Vt(r,":")}},z:function(e,t,n){switch(t){case"z":case"zz":case"zzz":return jt("short",e,n);default:return jt("long",e,n)}}};function zt(e,t){const n=e?Ot(e,t,!0)/6e4:t?.getTimezoneOffset()??0;if(Number.isNaN(n))throw new RangeError("Invalid time zone specified: "+e);return n}function Ht(e,t){const n=e<0?"-":"";let r=Math.abs(e).toString();for(;r.length<t;)r="0"+r;return n+r}function Vt(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+Ht(Math.floor(r/60),2)+t+Ht(Math.floor(r%60),2)}function Bt(e,t){return e%60==0?(e>0?"-":"+")+Ht(Math.abs(e)/60,2):Vt(e,t)}function Wt(e){const t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+e-+t}const Ut=36e5,$t={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/};function Gt(e,t={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(null===e)return new Date(NaN);const n=null==t.additionalDigits?2:Number(t.additionalDigits);if(2!==n&&1!==n&&0!==n)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e))return new Date(e.getTime());if("number"==typeof e||"[object Number]"===Object.prototype.toString.call(e))return new Date(e);if("[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);const r=function(e){const t={};let n,r=$t.dateTimePattern.exec(e);if(r?(t.date=r[1],n=r[3]):(r=$t.datePattern.exec(e),r?(t.date=r[1],n=r[2]):(t.date=null,n=e)),n){const e=$t.timeZone.exec(n);e?(t.time=n.replace(e[1],""),t.timeZone=e[1].trim()):t.time=n}return t}(e),{year:o,restDateString:a}=function(e,t){if(e){const n=$t.YYY[t],r=$t.YYYYY[t];let o=$t.YYYY.exec(e)||r.exec(e);if(o){const t=o[1];return{year:parseInt(t,10),restDateString:e.slice(t.length)}}if(o=$t.YY.exec(e)||n.exec(e),o){const t=o[1];return{year:100*parseInt(t,10),restDateString:e.slice(t.length)}}}return{year:null}}(r.date,n),s=function(e,t){if(null===t)return null;let n,r,o;if(!e||!e.length)return n=new Date(0),n.setUTCFullYear(t),n;let a=$t.MM.exec(e);if(a)return n=new Date(0),r=parseInt(a[1],10)-1,Qt(t,r)?(n.setUTCFullYear(t,r),n):new Date(NaN);if(a=$t.DDD.exec(e),a){n=new Date(0);const e=parseInt(a[1],10);return function(e,t){if(t<1)return!1;const n=Kt(e);return!(n&&t>366)&&!(!n&&t>365)}(t,e)?(n.setUTCFullYear(t,0,e),n):new Date(NaN)}if(a=$t.MMDD.exec(e),a){n=new Date(0),r=parseInt(a[1],10)-1;const e=parseInt(a[2],10);return Qt(t,r,e)?(n.setUTCFullYear(t,r,e),n):new Date(NaN)}if(a=$t.Www.exec(e),a)return o=parseInt(a[1],10)-1,Jt(o)?Yt(t,o):new Date(NaN);if(a=$t.WwwD.exec(e),a){o=parseInt(a[1],10)-1;const e=parseInt(a[2],10)-1;return Jt(o,e)?Yt(t,o,e):new Date(NaN)}return null}(a,o);if(null===s||isNaN(s.getTime()))return new Date(NaN);if(s){const e=s.getTime();let n,o=0;if(r.time&&(o=function(e){let t,n,r=$t.HH.exec(e);if(r)return t=parseFloat(r[1].replace(",",".")),Xt(t)?t%24*Ut:NaN;if(r=$t.HHMM.exec(e),r)return t=parseInt(r[1],10),n=parseFloat(r[2].replace(",",".")),Xt(t,n)?t%24*Ut+6e4*n:NaN;if(r=$t.HHMMSS.exec(e),r){t=parseInt(r[1],10),n=parseInt(r[2],10);const e=parseFloat(r[3].replace(",","."));return Xt(t,n,e)?t%24*Ut+6e4*n+1e3*e:NaN}return null}(r.time),null===o||isNaN(o)))return new Date(NaN);if(r.timeZone||t.timeZone){if(n=Ot(r.timeZone||t.timeZone,new Date(e+o)),isNaN(n))return new Date(NaN)}else n=Wt(new Date(e+o)),n=Wt(new Date(e+o+n));return new Date(e+o+n)}return new Date(NaN)}function Yt(e,t,n){t=t||0,n=n||0;const r=new Date(0);r.setUTCFullYear(e,0,4);const o=7*t+n+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+o),r}const qt=[31,28,31,30,31,30,31,31,30,31,30,31],Zt=[31,29,31,30,31,30,31,31,30,31,30,31];function Kt(e){return e%400==0||e%4==0&&e%100!=0}function Qt(e,t,n){if(t<0||t>11)return!1;if(null!=n){if(n<1)return!1;const r=Kt(e);if(r&&n>Zt[t])return!1;if(!r&&n>qt[t])return!1}return!0}function Jt(e,t){return!(e<0||e>52||null!=t&&(t<0||t>6))}function Xt(e,t,n){return!(e<0||e>=25||null!=t&&(t<0||t>=60)||null!=n&&(n<0||n>=60))}const en=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function tn(e,t,n,r){return function(e,t,n={}){const r=(t=String(t)).match(en);if(r){const o=Gt(n.originalDate||e,n);t=r.reduce((function(e,t){if("'"===t[0])return e;const r=e.indexOf(t),a="'"===e[r-1],s=e.replace(t,"'"+Ft[t[0]](o,t,n)+"'");return a?s.substring(0,r-1)+s.substring(r+1):s}),t)}return Ct(e,t,n)}(function(e,t,n){const r=Ot(t,e=Gt(e,n),!0),o=new Date(e.getTime()-r),a=new Date(0);return a.setFullYear(o.getUTCFullYear(),o.getUTCMonth(),o.getUTCDate()),a.setHours(o.getUTCHours(),o.getUTCMinutes(),o.getUTCSeconds(),o.getUTCMilliseconds()),a}(e,t,{timeZone:(r={...r,timeZone:t,originalDate:e}).timeZone}),n,r)}class nn extends Error{}class rn extends nn{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class on extends nn{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class an extends nn{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class sn extends nn{}class ln extends nn{constructor(e){super(`Invalid unit ${e}`)}}class cn extends nn{}class dn extends nn{constructor(){super("Zone is an abstract class")}}const un="numeric",fn="short",hn="long",mn={year:un,month:un,day:un},pn={year:un,month:fn,day:un},gn={year:un,month:fn,day:un,weekday:fn},vn={year:un,month:hn,day:un},yn={year:un,month:hn,day:un,weekday:hn},bn={hour:un,minute:un},xn={hour:un,minute:un,second:un},wn={hour:un,minute:un,second:un,timeZoneName:fn},kn={hour:un,minute:un,second:un,timeZoneName:hn},Sn={hour:un,minute:un,hourCycle:"h23"},Cn={hour:un,minute:un,second:un,hourCycle:"h23"},jn={hour:un,minute:un,second:un,hourCycle:"h23",timeZoneName:fn},En={hour:un,minute:un,second:un,hourCycle:"h23",timeZoneName:hn},Nn={year:un,month:un,day:un,hour:un,minute:un},Dn={year:un,month:un,day:un,hour:un,minute:un,second:un},Tn={year:un,month:fn,day:un,hour:un,minute:un},An={year:un,month:fn,day:un,hour:un,minute:un,second:un},Rn={year:un,month:fn,day:un,weekday:fn,hour:un,minute:un},Mn={year:un,month:hn,day:un,hour:un,minute:un,timeZoneName:fn},On={year:un,month:hn,day:un,hour:un,minute:un,second:un,timeZoneName:fn},In={year:un,month:hn,day:un,weekday:hn,hour:un,minute:un,timeZoneName:hn},Pn={year:un,month:hn,day:un,weekday:hn,hour:un,minute:un,second:un,timeZoneName:hn};class Ln{get type(){throw new dn}get name(){throw new dn}get ianaName(){return this.name}get isUniversal(){throw new dn}offsetName(e,t){throw new dn}formatOffset(e,t){throw new dn}offset(e){throw new dn}equals(e){throw new dn}get isValid(){throw new dn}}let Fn=null;class zn extends Ln{static get instance(){return null===Fn&&(Fn=new zn),Fn}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return ao(e,t,n)}formatOffset(e,t){return co(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return"system"===e.type}get isValid(){return!0}}const Hn=new Map,Vn={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6},Bn=new Map;class Wn extends Ln{static create(e){let t=Bn.get(e);return void 0===t&&Bn.set(e,t=new Wn(e)),t}static resetCache(){Bn.clear(),Hn.clear()}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}}constructor(e){super(),this.zoneName=e,this.valid=Wn.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return ao(e,t,n,this.name)}formatOffset(e,t){return co(this.offset(e),t)}offset(e){if(!this.valid)return NaN;const t=new Date(e);if(isNaN(t))return NaN;const n=function(e){let t=Hn.get(e);return void 0===t&&(t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),Hn.set(e,t)),t}(this.name);let[r,o,a,s,i,l,c]=n.formatToParts?function(e,t){const n=e.formatToParts(t),r=[];for(let e=0;e<n.length;e++){const{type:t,value:o}=n[e],a=Vn[t];"era"===t?r[a]=o:Fr(a)||(r[a]=parseInt(o,10))}return r}(n,t):function(e,t){const n=e.format(t).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,o,a,s,i,l,c,d]=r;return[s,o,a,i,l,c,d]}(n,t);"BC"===s&&(r=1-Math.abs(r));let d=+t;const u=d%1e3;return d-=u>=0?u:1e3+u,(to({year:r,month:o,day:a,hour:24===i?0:i,minute:l,second:c,millisecond:0})-d)/6e4}equals(e){return"iana"===e.type&&e.name===this.name}get isValid(){return this.valid}}let Un={};const $n=new Map;function Gn(e,t={}){const n=JSON.stringify([e,t]);let r=$n.get(n);return void 0===r&&(r=new Intl.DateTimeFormat(e,t),$n.set(n,r)),r}const Yn=new Map,qn=new Map;let Zn=null;const Kn=new Map;function Qn(e){let t=Kn.get(e);return void 0===t&&(t=new Intl.DateTimeFormat(e).resolvedOptions(),Kn.set(e,t)),t}const Jn=new Map;function Xn(e,t,n,r){const o=e.listingMode();return"error"===o?null:"en"===o?n(t):r(t)}class er{constructor(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;const{padTo:r,floor:o,...a}=n;if(!t||Object.keys(a).length>0){const t={useGrouping:!1,...n};n.padTo>0&&(t.minimumIntegerDigits=n.padTo),this.inf=function(e,t={}){const n=JSON.stringify([e,t]);let r=Yn.get(n);return void 0===r&&(r=new Intl.NumberFormat(e,t),Yn.set(n,r)),r}(e,t)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}return Yr(this.floor?Math.floor(e):Qr(e,3),this.padTo)}}class tr{constructor(e,t,n){let r;if(this.opts=n,this.originalZone=void 0,this.opts.timeZone)this.dt=e;else if("fixed"===e.zone.type){const t=e.offset/60*-1,n=t>=0?`Etc/GMT+${t}`:`Etc/GMT${t}`;0!==e.offset&&Wn.create(n).valid?(r=n,this.dt=e):(r="UTC",this.dt=0===e.offset?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else"system"===e.zone.type?this.dt=e:"iana"===e.zone.type?(this.dt=e,r=e.zone.name):(r="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const o={...this.opts};o.timeZone=o.timeZone||r,this.dtf=Gn(t,o)}format(){return this.originalZone?this.formatToParts().map((({value:e})=>e)).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map((e=>{if("timeZoneName"===e.type){const t=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...e,value:t}}return e})):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class nr{constructor(e,t,n){this.opts={style:"long",...n},!t&&Vr()&&(this.rtf=function(e,t={}){const{base:n,...r}=t,o=JSON.stringify([e,r]);let a=qn.get(o);return void 0===a&&(a=new Intl.RelativeTimeFormat(e,t),qn.set(o,a)),a}(e,n))}format(e,t){return this.rtf?this.rtf.format(e,t):function(e,t,n="always",r=!1){const o={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},a=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&a){const n="days"===e;switch(t){case 1:return n?"tomorrow":`next ${o[e][0]}`;case-1:return n?"yesterday":`last ${o[e][0]}`;case 0:return n?"today":`this ${o[e][0]}`}}const s=Object.is(t,-0)||t<0,i=Math.abs(t),l=1===i,c=o[e],d=r?l?c[1]:c[2]||c[1]:l?o[e][0]:e;return s?`${i} ${d} ago`:`in ${i} ${d}`}(t,e,this.opts.numeric,"long"!==this.opts.style)}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}const rr={firstDay:1,minimalDays:4,weekend:[6,7]};class or{static fromOpts(e){return or.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,n,r,o=!1){const a=e||kr.defaultLocale,s=a||(o?"en-US":Zn||(Zn=(new Intl.DateTimeFormat).resolvedOptions().locale,Zn)),i=t||kr.defaultNumberingSystem,l=n||kr.defaultOutputCalendar,c=$r(r)||kr.defaultWeekSettings;return new or(s,i,l,c,a)}static resetCache(){Zn=null,$n.clear(),Yn.clear(),qn.clear(),Kn.clear(),Jn.clear()}static fromObject({locale:e,numberingSystem:t,outputCalendar:n,weekSettings:r}={}){return or.create(e,t,n,r)}constructor(e,t,n,r,o){const[a,s,i]=function(e){const t=e.indexOf("-x-");-1!==t&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(-1===n)return[e];{let t,r;try{t=Gn(e).resolvedOptions(),r=e}catch(o){const a=e.substring(0,n);t=Gn(a).resolvedOptions(),r=a}const{numberingSystem:o,calendar:a}=t;return[r,o,a]}}(e);this.locale=a,this.numberingSystem=t||s||null,this.outputCalendar=n||i||null,this.weekSettings=r,this.intl=function(e,t,n){return n||t?(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`),e):e}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=o,this.fastNumbersCached=null}get fastNumbers(){var e;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(e=this).numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||"latn"===Qn(e.locale).numberingSystem)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return e&&t?"en":"intl"}clone(e){return e&&0!==Object.getOwnPropertyNames(e).length?or.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,$r(e.weekSettings)||this.weekSettings,e.defaultToEN||!1):this}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return Xn(this,e,po,(()=>{const n="ja"===this.intl||this.intl.startsWith("ja-"),r=(t&=!n)?{month:e,day:"numeric"}:{month:e},o=t?"format":"standalone";if(!this.monthsCache[o][e]){const t=n?e=>this.dtFormatter(e,r).format():e=>this.extract(e,r,"month");this.monthsCache[o][e]=function(e){const t=[];for(let n=1;n<=12;n++){const r=vs.utc(2009,n,1);t.push(e(r))}return t}(t)}return this.monthsCache[o][e]}))}weekdays(e,t=!1){return Xn(this,e,bo,(()=>{const n=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},r=t?"format":"standalone";return this.weekdaysCache[r][e]||(this.weekdaysCache[r][e]=function(e){const t=[];for(let n=1;n<=7;n++){const r=vs.utc(2016,11,13+n);t.push(e(r))}return t}((e=>this.extract(e,n,"weekday")))),this.weekdaysCache[r][e]}))}meridiems(){return Xn(this,void 0,(()=>xo),(()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[vs.utc(2016,11,13,9),vs.utc(2016,11,13,19)].map((t=>this.extract(t,e,"dayperiod")))}return this.meridiemCache}))}eras(e){return Xn(this,e,Co,(()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[vs.utc(-40,1,1),vs.utc(2017,1,1)].map((e=>this.extract(e,t,"era")))),this.eraCache[e]}))}extract(e,t,n){const r=this.dtFormatter(e,t).formatToParts().find((e=>e.type.toLowerCase()===n));return r?r.value:null}numberFormatter(e={}){return new er(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new tr(e,this.intl,t)}relFormatter(e={}){return new nr(this.intl,this.isEnglish(),e)}listFormatter(e={}){return function(e,t={}){const n=JSON.stringify([e,t]);let r=Un[n];return r||(r=new Intl.ListFormat(e,t),Un[n]=r),r}(this.intl,e)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||Qn(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Br()?function(e){let t=Jn.get(e);if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,"minimalDays"in t||(t={...rr,...t}),Jn.set(e,t)}return t}(this.locale):rr}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let ar=null;class sr extends Ln{static get utcInstance(){return null===ar&&(ar=new sr(0)),ar}static instance(e){return 0===e?sr.utcInstance:new sr(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new sr(so(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${co(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${co(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return co(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return"fixed"===e.type&&e.fixed===this.fixed}get isValid(){return!0}}class ir extends Ln{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function lr(e,t){if(Fr(e)||null===e)return t;if(e instanceof Ln)return e;if("string"==typeof e){const n=e.toLowerCase();return"default"===n?t:"local"===n||"system"===n?zn.instance:"utc"===n||"gmt"===n?sr.utcInstance:sr.parseSpecifier(n)||Wn.create(e)}return zr(e)?sr.instance(e):"object"==typeof e&&"offset"in e&&"function"==typeof e.offset?e:new ir(e)}const cr={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},dr={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},ur=cr.hanidec.replace(/[\[|\]]/g,"").split(""),fr=new Map;function hr({numberingSystem:e},t=""){const n=e||"latn";let r=fr.get(n);void 0===r&&(r=new Map,fr.set(n,r));let o=r.get(t);return void 0===o&&(o=new RegExp(`${cr[n]}${t}`),r.set(t,o)),o}let mr,pr=()=>Date.now(),gr="system",vr=null,yr=null,br=null,xr=60,wr=null;class kr{static get now(){return pr}static set now(e){pr=e}static set defaultZone(e){gr=e}static get defaultZone(){return lr(gr,zn.instance)}static get defaultLocale(){return vr}static set defaultLocale(e){vr=e}static get defaultNumberingSystem(){return yr}static set defaultNumberingSystem(e){yr=e}static get defaultOutputCalendar(){return br}static set defaultOutputCalendar(e){br=e}static get defaultWeekSettings(){return wr}static set defaultWeekSettings(e){wr=$r(e)}static get twoDigitCutoffYear(){return xr}static set twoDigitCutoffYear(e){xr=e%100}static get throwOnInvalid(){return mr}static set throwOnInvalid(e){mr=e}static resetCaches(){or.resetCache(),Wn.resetCache(),vs.resetCache(),fr.clear()}}class Sr{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Cr=[0,31,59,90,120,151,181,212,243,273,304,334],_r=[0,31,60,91,121,152,182,213,244,274,305,335];function jr(e,t){return new Sr("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function Er(e,t,n){const r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const o=r.getUTCDay();return 0===o?7:o}function Nr(e,t,n){return n+(Jr(e)?_r:Cr)[t-1]}function Dr(e,t){const n=Jr(e)?_r:Cr,r=n.findIndex((e=>e<t));return{month:r+1,day:t-n[r]}}function Tr(e,t){return(e-t+7)%7+1}function Ar(e,t=4,n=1){const{year:r,month:o,day:a}=e,s=Nr(r,o,a),i=Tr(Er(r,o,a),n);let l,c=Math.floor((s-i+14-t)/7);return c<1?(l=r-1,c=ro(l,t,n)):c>ro(r,t,n)?(l=r+1,c=1):l=r,{weekYear:l,weekNumber:c,weekday:i,...uo(e)}}function Rr(e,t=4,n=1){const{weekYear:r,weekNumber:o,weekday:a}=e,s=Tr(Er(r,1,t),n),i=Xr(r);let l,c=7*o+a-s-7+t;c<1?(l=r-1,c+=Xr(l)):c>i?(l=r+1,c-=Xr(r)):l=r;const{month:d,day:u}=Dr(l,c);return{year:l,month:d,day:u,...uo(e)}}function Mr(e){const{year:t,month:n,day:r}=e;return{year:t,ordinal:Nr(t,n,r),...uo(e)}}function Or(e){const{year:t,ordinal:n}=e,{month:r,day:o}=Dr(t,n);return{year:t,month:r,day:o,...uo(e)}}function Ir(e,t){if(!Fr(e.localWeekday)||!Fr(e.localWeekNumber)||!Fr(e.localWeekYear)){if(!Fr(e.weekday)||!Fr(e.weekNumber)||!Fr(e.weekYear))throw new sn("Cannot mix locale-based week fields with ISO-based week fields");return Fr(e.localWeekday)||(e.weekday=e.localWeekday),Fr(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),Fr(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}return{minDaysInFirstWeek:4,startOfWeek:1}}function Pr(e){const t=Hr(e.year),n=Gr(e.month,1,12),r=Gr(e.day,1,eo(e.year,e.month));return t?n?!r&&jr("day",e.day):jr("month",e.month):jr("year",e.year)}function Lr(e){const{hour:t,minute:n,second:r,millisecond:o}=e,a=Gr(t,0,23)||24===t&&0===n&&0===r&&0===o,s=Gr(n,0,59),i=Gr(r,0,59),l=Gr(o,0,999);return a?s?i?!l&&jr("millisecond",o):jr("second",r):jr("minute",n):jr("hour",t)}function Fr(e){return void 0===e}function zr(e){return"number"==typeof e}function Hr(e){return"number"==typeof e&&e%1==0}function Vr(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function Br(){try{return"undefined"!=typeof Intl&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch(e){return!1}}function Wr(e,t,n){if(0!==e.length)return e.reduce(((e,r)=>{const o=[t(r),r];return e&&n(e[0],o[0])===e[0]?e:o}),null)[1]}function Ur(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function $r(e){if(null==e)return null;if("object"!=typeof e)throw new cn("Week settings must be an object");if(!Gr(e.firstDay,1,7)||!Gr(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some((e=>!Gr(e,1,7))))throw new cn("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function Gr(e,t,n){return Hr(e)&&e>=t&&e<=n}function Yr(e,t=2){let n;return n=e<0?"-"+(""+-e).padStart(t,"0"):(""+e).padStart(t,"0"),n}function qr(e){return Fr(e)||null===e||""===e?void 0:parseInt(e,10)}function Zr(e){return Fr(e)||null===e||""===e?void 0:parseFloat(e)}function Kr(e){if(!Fr(e)&&null!==e&&""!==e){const t=1e3*parseFloat("0."+e);return Math.floor(t)}}function Qr(e,t,n="round"){const r=10**t;switch(n){case"expand":return e>0?Math.ceil(e*r)/r:Math.floor(e*r)/r;case"trunc":return Math.trunc(e*r)/r;case"round":return Math.round(e*r)/r;case"floor":return Math.floor(e*r)/r;case"ceil":return Math.ceil(e*r)/r;default:throw new RangeError(`Value rounding ${n} is out of range`)}}function Jr(e){return e%4==0&&(e%100!=0||e%400==0)}function Xr(e){return Jr(e)?366:365}function eo(e,t){const n=function(e){return e-12*Math.floor(e/12)}(t-1)+1;return 2===n?Jr(e+(t-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function to(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function no(e,t,n){return-Tr(Er(e,1,t),n)+t-1}function ro(e,t=4,n=1){const r=no(e,t,n),o=no(e+1,t,n);return(Xr(e)-r+o)/7}function oo(e){return e>99?e:e>kr.twoDigitCutoffYear?1900+e:2e3+e}function ao(e,t,n,r=null){const o=new Date(e),a={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(a.timeZone=r);const s={timeZoneName:t,...a},i=new Intl.DateTimeFormat(n,s).formatToParts(o).find((e=>"timezonename"===e.type.toLowerCase()));return i?i.value:null}function so(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const r=parseInt(t,10)||0;return 60*n+(n<0||Object.is(n,-0)?-r:r)}function io(e){const t=Number(e);if("boolean"==typeof e||""===e||!Number.isFinite(t))throw new cn(`Invalid unit value ${e}`);return t}function lo(e,t){const n={};for(const r in e)if(Ur(e,r)){const o=e[r];if(null==o)continue;n[t(r)]=io(o)}return n}function co(e,t){const n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),o=e>=0?"+":"-";switch(t){case"short":return`${o}${Yr(n,2)}:${Yr(r,2)}`;case"narrow":return`${o}${n}${r>0?`:${r}`:""}`;case"techie":return`${o}${Yr(n,2)}${Yr(r,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function uo(e){return function(e){return["hour","minute","second","millisecond"].reduce(((t,n)=>(t[n]=e[n],t)),{})}(e)}const fo=["January","February","March","April","May","June","July","August","September","October","November","December"],ho=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],mo=["J","F","M","A","M","J","J","A","S","O","N","D"];function po(e){switch(e){case"narrow":return[...mo];case"short":return[...ho];case"long":return[...fo];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const go=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],vo=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],yo=["M","T","W","T","F","S","S"];function bo(e){switch(e){case"narrow":return[...yo];case"short":return[...vo];case"long":return[...go];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const xo=["AM","PM"],wo=["Before Christ","Anno Domini"],ko=["BC","AD"],So=["B","A"];function Co(e){switch(e){case"narrow":return[...So];case"short":return[...ko];case"long":return[...wo];default:return null}}function _o(e,t){let n="";for(const r of e)r.literal?n+=r.val:n+=t(r.val);return n}const jo={D:mn,DD:pn,DDD:vn,DDDD:yn,t:bn,tt:xn,ttt:wn,tttt:kn,T:Sn,TT:Cn,TTT:jn,TTTT:En,f:Nn,ff:Tn,fff:Mn,ffff:In,F:Dn,FF:An,FFF:On,FFFF:Pn};class Eo{static create(e,t={}){return new Eo(e,t)}static parseFormat(e){let t=null,n="",r=!1;const o=[];for(let a=0;a<e.length;a++){const s=e.charAt(a);"'"===s?((n.length>0||r)&&o.push({literal:r||/^\s+$/.test(n),val:""===n?"'":n}),t=null,n="",r=!r):r||s===t?n+=s:(n.length>0&&o.push({literal:/^\s+$/.test(n),val:n}),n=s,t=s)}return n.length>0&&o.push({literal:r||/^\s+$/.test(n),val:n}),o}static macroTokenToFormatOpts(e){return jo[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0,n=void 0){if(this.opts.forceSimple)return Yr(e,t);const r={...this.opts};return t>0&&(r.padTo=t),n&&(r.signDisplay=n),this.loc.numberFormatter(r).format(e)}formatDateTimeFromString(e,t){const n="en"===this.loc.listingMode(),r=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,o=(t,n)=>this.loc.extract(e,t,n),a=t=>e.isOffsetFixed&&0===e.offset&&t.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,t.format):"",s=(t,r)=>n?function(e,t){return po(t)[e.month-1]}(e,t):o(r?{month:t}:{month:t,day:"numeric"},"month"),i=(t,r)=>n?function(e,t){return bo(t)[e.weekday-1]}(e,t):o(r?{weekday:t}:{weekday:t,month:"long",day:"numeric"},"weekday"),l=t=>{const n=Eo.macroTokenToFormatOpts(t);return n?this.formatWithSystemDefault(e,n):t},c=t=>n?function(e,t){return Co(t)[e.year<0?0:1]}(e,t):o({era:t},"era");return _o(Eo.parseFormat(t),(t=>{switch(t){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12==0?12:e.hour%12);case"hh":return this.num(e.hour%12==0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return a({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return a({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return a({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return n?function(e){return xo[e.hour<12?0:1]}(e):o({hour:"numeric",hourCycle:"h12"},"dayperiod");case"d":return r?o({day:"numeric"},"day"):this.num(e.day);case"dd":return r?o({day:"2-digit"},"day"):this.num(e.day,2);case"c":case"E":return this.num(e.weekday);case"ccc":return i("short",!0);case"cccc":return i("long",!0);case"ccccc":return i("narrow",!0);case"EEE":return i("short",!1);case"EEEE":return i("long",!1);case"EEEEE":return i("narrow",!1);case"L":return r?o({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return r?o({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return s("short",!0);case"LLLL":return s("long",!0);case"LLLLL":return s("narrow",!0);case"M":return r?o({month:"numeric"},"month"):this.num(e.month);case"MM":return r?o({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return s("short",!1);case"MMMM":return s("long",!1);case"MMMMM":return s("narrow",!1);case"y":return r?o({year:"numeric"},"year"):this.num(e.year);case"yy":return r?o({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return r?o({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return r?o({year:"numeric"},"year"):this.num(e.year,6);case"G":return c("short");case"GG":return c("long");case"GGGGG":return c("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return l(t)}}))}formatDurationFromString(e,t){const n="negativeLargestOnly"===this.opts.signMode?-1:1,r=e=>{switch(e[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},o=Eo.parseFormat(t),a=o.reduce(((e,{literal:t,val:n})=>t?e:e.concat(n)),[]),s=e.shiftTo(...a.map(r).filter((e=>e)));return _o(o,((e,t)=>o=>{const a=r(o);if(a){const r=t.isNegativeDuration&&a!==t.largestUnit?n:1;let s;return s="negativeLargestOnly"===this.opts.signMode&&a!==t.largestUnit?"never":"all"===this.opts.signMode?"always":"auto",this.num(e.get(a)*r,o.length,s)}return o})(s,{isNegativeDuration:s<0,largestUnit:Object.keys(s.values)[0]}))}}const No=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Do(...e){const t=e.reduce(((e,t)=>e+t.source),"");return RegExp(`^${t}$`)}function To(...e){return t=>e.reduce((([e,n,r],o)=>{const[a,s,i]=o(t,r);return[{...e,...a},s||n,i]}),[{},null,1]).slice(0,2)}function Ao(e,...t){if(null==e)return[null,null];for(const[n,r]of t){const t=n.exec(e);if(t)return r(t)}return[null,null]}function Ro(...e){return(t,n)=>{const r={};let o;for(o=0;o<e.length;o++)r[e[o]]=qr(t[n+o]);return[r,null,n+o]}}const Mo=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,Oo=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Io=RegExp(`${Oo.source}(?:${Mo.source}?(?:\\[(${No.source})\\])?)?`),Po=RegExp(`(?:[Tt]${Io.source})?`),Lo=Ro("weekYear","weekNumber","weekDay"),Fo=Ro("year","ordinal"),zo=RegExp(`${Oo.source} ?(?:${Mo.source}|(${No.source}))?`),Ho=RegExp(`(?: ${zo.source})?`);function Vo(e,t,n){const r=e[t];return Fr(r)?n:qr(r)}function Bo(e,t){return[{hours:Vo(e,t,0),minutes:Vo(e,t+1,0),seconds:Vo(e,t+2,0),milliseconds:Kr(e[t+3])},null,t+4]}function Wo(e,t){const n=!e[t]&&!e[t+1],r=so(e[t+1],e[t+2]);return[{},n?null:sr.instance(r),t+3]}function Uo(e,t){return[{},e[t]?Wn.create(e[t]):null,t+1]}const $o=RegExp(`^T?${Oo.source}$`),Go=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function Yo(e){const[t,n,r,o,a,s,i,l,c]=e,d="-"===t[0],u=l&&"-"===l[0],f=(e,t=!1)=>void 0!==e&&(t||e&&d)?-e:e;return[{years:f(Zr(n)),months:f(Zr(r)),weeks:f(Zr(o)),days:f(Zr(a)),hours:f(Zr(s)),minutes:f(Zr(i)),seconds:f(Zr(l),"-0"===l),milliseconds:f(Kr(c),u)}]}const qo={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Zo(e,t,n,r,o,a,s){const i={year:2===t.length?oo(qr(t)):qr(t),month:ho.indexOf(n)+1,day:qr(r),hour:qr(o),minute:qr(a)};return s&&(i.second=qr(s)),e&&(i.weekday=e.length>3?go.indexOf(e)+1:vo.indexOf(e)+1),i}const Ko=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Qo(e){const[,t,n,r,o,a,s,i,l,c,d,u]=e,f=Zo(t,o,r,n,a,s,i);let h;return h=l?qo[l]:c?0:so(d,u),[f,new sr(h)]}const Jo=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Xo=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,ea=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function ta(e){const[,t,n,r,o,a,s,i]=e;return[Zo(t,o,r,n,a,s,i),sr.utcInstance]}function na(e){const[,t,n,r,o,a,s,i]=e;return[Zo(t,i,n,r,o,a,s),sr.utcInstance]}const ra=Do(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Po),oa=Do(/(\d{4})-?W(\d\d)(?:-?(\d))?/,Po),aa=Do(/(\d{4})-?(\d{3})/,Po),sa=Do(Io),ia=To((function(e,t){return[{year:Vo(e,t),month:Vo(e,t+1,1),day:Vo(e,t+2,1)},null,t+3]}),Bo,Wo,Uo),la=To(Lo,Bo,Wo,Uo),ca=To(Fo,Bo,Wo,Uo),da=To(Bo,Wo,Uo),ua=To(Bo),fa=Do(/(\d{4})-(\d\d)-(\d\d)/,Ho),ha=Do(zo),ma=To(Bo,Wo,Uo),pa="Invalid Duration",ga={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},va={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6},...ga},ya={years:{quarters:4,months:12,weeks:52.1775,days:365.2425,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:4.3481250000000005,days:30.436875,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...ga},ba=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],xa=ba.slice(0).reverse();function wa(e,t,n=!1){const r={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new _a(r)}function ka(e,t){let n=t.milliseconds??0;for(const r of xa.slice(1))t[r]&&(n+=t[r]*e[r].milliseconds);return n}function Sa(e,t){const n=ka(e,t)<0?-1:1;ba.reduceRight(((r,o)=>{if(Fr(t[o]))return r;if(r){const a=t[r]*n,s=e[o][r],i=Math.floor(a/s);t[o]+=i*n,t[r]-=i*s*n}return o}),null),ba.reduce(((n,r)=>{if(Fr(t[r]))return n;if(n){const o=t[n]%1;t[n]-=o,t[r]+=o*e[n][r]}return r}),null)}function Ca(e){const t={};for(const[n,r]of Object.entries(e))0!==r&&(t[n]=r);return t}class _a{constructor(e){const t="longterm"===e.conversionAccuracy||!1;let n=t?ya:va;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||or.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(e,t){return _a.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(null==e||"object"!=typeof e)throw new cn("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new _a({values:lo(e,_a.normalizeUnit),loc:or.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(zr(e))return _a.fromMillis(e);if(_a.isDuration(e))return e;if("object"==typeof e)return _a.fromObject(e);throw new cn(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[n]=function(e){return Ao(e,[Go,Yo])}(e);return n?_a.fromObject(n,t):_a.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[n]=function(e){return Ao(e,[$o,ua])}(e);return n?_a.fromObject(n,t):_a.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new cn("need to specify a reason the Duration is invalid");const n=e instanceof Sr?e:new Sr(e,t);if(kr.throwOnInvalid)throw new an(n);return new _a({invalid:n})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e?e.toLowerCase():e];if(!t)throw new ln(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const n={...t,floor:!1!==t.round&&!1!==t.floor};return this.isValid?Eo.create(this.loc,n).formatDurationFromString(this,e):pa}toHuman(e={}){if(!this.isValid)return pa;const t=!1!==e.showZeros,n=ba.map((n=>{const r=this.values[n];return Fr(r)||0===r&&!t?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:n.slice(0,-1)}).format(r)})).filter((e=>e));return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=Qr(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();return t<0||t>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},vs.fromMillis(t,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?ka(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=_a.fromDurationLike(e),n={};for(const e of ba)(Ur(t.values,e)||Ur(this.values,e))&&(n[e]=t.get(e)+this.get(e));return wa(this,{values:n},!0)}minus(e){if(!this.isValid)return this;const t=_a.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=io(e(this.values[n],n));return wa(this,{values:t},!0)}get(e){return this[_a.normalizeUnit(e)]}set(e){return this.isValid?wa(this,{values:{...this.values,...lo(e,_a.normalizeUnit)}}):this}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:n,matrix:r}={}){return wa(this,{loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:r,conversionAccuracy:n})}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return Sa(this.matrix,e),wa(this,{values:e},!0)}rescale(){return this.isValid?wa(this,{values:Ca(this.normalize().shiftToAll().toObject())},!0):this}shiftTo(...e){if(!this.isValid)return this;if(0===e.length)return this;e=e.map((e=>_a.normalizeUnit(e)));const t={},n={},r=this.toObject();let o;for(const a of ba)if(e.indexOf(a)>=0){o=a;let e=0;for(const t in n)e+=this.matrix[t][a]*n[t],n[t]=0;zr(r[a])&&(e+=r[a]);const s=Math.trunc(e);t[a]=s,n[a]=(1e3*e-1e3*s)/1e3}else zr(r[a])&&(n[a]=r[a]);for(const e in n)0!==n[e]&&(t[o]+=e===o?n[e]:n[e]/this.matrix[o][e]);return Sa(this.matrix,t),wa(this,{values:t},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=0===this.values[t]?0:-this.values[t];return wa(this,{values:e},!0)}removeZeros(){return this.isValid?wa(this,{values:Ca(this.values)},!0):this}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;for(const r of ba)if(t=this.values[r],n=e.values[r],!(void 0===t||0===t?void 0===n||0===n:t===n))return!1;var t,n;return!0}}const ja="Invalid Interval";class Ea{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,t=null){if(!e)throw new cn("need to specify a reason the Interval is invalid");const n=e instanceof Sr?e:new Sr(e,t);if(kr.throwOnInvalid)throw new on(n);return new Ea({invalid:n})}static fromDateTimes(e,t){const n=ys(e),r=ys(t),o=function(e,t){return e&&e.isValid?t&&t.isValid?t<e?Ea.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null:Ea.invalid("missing or invalid end"):Ea.invalid("missing or invalid start")}(n,r);return null==o?new Ea({start:n,end:r}):o}static after(e,t){const n=_a.fromDurationLike(t),r=ys(e);return Ea.fromDateTimes(r,r.plus(n))}static before(e,t){const n=_a.fromDurationLike(t),r=ys(e);return Ea.fromDateTimes(r.minus(n),r)}static fromISO(e,t){const[n,r]=(e||"").split("/",2);if(n&&r){let e,o,a,s;try{e=vs.fromISO(n,t),o=e.isValid}catch(r){o=!1}try{a=vs.fromISO(r,t),s=a.isValid}catch(r){s=!1}if(o&&s)return Ea.fromDateTimes(e,a);if(o){const n=_a.fromISO(r,t);if(n.isValid)return Ea.after(e,n)}else if(s){const e=_a.fromISO(n,t);if(e.isValid)return Ea.before(a,e)}}return Ea.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return null===this.invalidReason}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",t){if(!this.isValid)return NaN;const n=this.start.startOf(e,t);let r;return r=t?.useLocaleWeeks?this.end.reconfigure({locale:n.locale}):this.end,r=r.startOf(e,t),Math.floor(r.diff(n,e).get(e))+(r.valueOf()!==this.end.valueOf())}hasSame(e){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,e))}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return!!this.isValid&&this.s>e}isBefore(e){return!!this.isValid&&this.e<=e}contains(e){return!!this.isValid&&this.s<=e&&this.e>e}set({start:e,end:t}={}){return this.isValid?Ea.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(ys).filter((e=>this.contains(e))).sort(((e,t)=>e.toMillis()-t.toMillis())),n=[];let{s:r}=this,o=0;for(;r<this.e;){const e=t[o]||this.e,a=+e>+this.e?this.e:e;n.push(Ea.fromDateTimes(r,a)),r=a,o+=1}return n}splitBy(e){const t=_a.fromDurationLike(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];let n,{s:r}=this,o=1;const a=[];for(;r<this.e;){const e=this.start.plus(t.mapUnits((e=>e*o)));n=+e>+this.e?this.e:e,a.push(Ea.fromDateTimes(r,n)),r=n,o+=1}return a}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return!!this.isValid&&+this.e===+e.s}abutsEnd(e){return!!this.isValid&&+e.e===+this.s}engulfs(e){return!!this.isValid&&this.s<=e.s&&this.e>=e.e}equals(e){return!(!this.isValid||!e.isValid)&&this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,n=this.e<e.e?this.e:e.e;return t>=n?null:Ea.fromDateTimes(t,n)}union(e){if(!this.isValid)return this;const t=this.s<e.s?this.s:e.s,n=this.e>e.e?this.e:e.e;return Ea.fromDateTimes(t,n)}static merge(e){const[t,n]=e.sort(((e,t)=>e.s-t.s)).reduce((([e,t],n)=>t?t.overlaps(n)||t.abutsStart(n)?[e,t.union(n)]:[e.concat([t]),n]:[e,n]),[[],null]);return n&&t.push(n),t}static xor(e){let t=null,n=0;const r=[],o=e.map((e=>[{time:e.s,type:"s"},{time:e.e,type:"e"}])),a=Array.prototype.concat(...o).sort(((e,t)=>e.time-t.time));for(const e of a)n+="s"===e.type?1:-1,1===n?t=e.time:(t&&+t!==+e.time&&r.push(Ea.fromDateTimes(t,e.time)),t=null);return Ea.merge(r)}difference(...e){return Ea.xor([this].concat(e)).map((e=>this.intersection(e))).filter((e=>e&&!e.isEmpty()))}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:ja}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=mn,t={}){return this.isValid?Eo.create(this.s.loc.clone(t),e).formatInterval(this):ja}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:ja}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:ja}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:ja}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:ja}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):_a.invalid(this.invalidReason)}mapEndpoints(e){return Ea.fromDateTimes(e(this.s),e(this.e))}}class Na{static hasDST(e=kr.defaultZone){const t=vs.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return Wn.isValidZone(e)}static normalizeZone(e){return lr(e,kr.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||or.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||or.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||or.create(e)).getWeekendDays().slice()}static months(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:o="gregory"}={}){return(r||or.create(t,n,o)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:o="gregory"}={}){return(r||or.create(t,n,o)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||or.create(t,n,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||or.create(t,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return or.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return or.create(t,null,"gregory").eras(e)}static features(){return{relative:Vr(),localeWeek:Br()}}}function Da(e,t){const n=e=>e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(t)-n(e);return Math.floor(_a.fromMillis(r).as("days"))}function Ta(e,t=e=>e){return{regex:e,deser:([e])=>t(function(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);if(-1!==e[n].search(cr.hanidec))t+=ur.indexOf(e[n]);else for(const e in dr){const[n,o]=dr[e];r>=n&&r<=o&&(t+=r-n)}}return parseInt(t,10)}return t}(e))}}const Aa=`[ ${String.fromCharCode(160)}]`,Ra=new RegExp(Aa,"g");function Ma(e){return e.replace(/\./g,"\\.?").replace(Ra,Aa)}function Oa(e){return e.replace(/\./g,"").replace(Ra," ").toLowerCase()}function Ia(e,t){return null===e?null:{regex:RegExp(e.map(Ma).join("|")),deser:([n])=>e.findIndex((e=>Oa(n)===Oa(e)))+t}}function Pa(e,t){return{regex:e,deser:([,e,t])=>so(e,t),groups:t}}function La(e){return{regex:e,deser:([e])=>e}}const Fa={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};let za=null;function Ha(e,t){return Array.prototype.concat(...e.map((e=>function(e,t){if(e.literal)return e;const n=Wa(Eo.macroTokenToFormatOpts(e.val),t);return null==n||n.includes(void 0)?e:n}(e,t))))}class Va{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=Ha(Eo.parseFormat(t),e),this.units=this.tokens.map((t=>function(e,t){const n=hr(t),r=hr(t,"{2}"),o=hr(t,"{3}"),a=hr(t,"{4}"),s=hr(t,"{6}"),i=hr(t,"{1,2}"),l=hr(t,"{1,3}"),c=hr(t,"{1,6}"),d=hr(t,"{1,9}"),u=hr(t,"{2,4}"),f=hr(t,"{4,6}"),h=e=>{return{regex:RegExp((t=e.val,t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:([e])=>e,literal:!0};var t},m=(m=>{if(e.literal)return h(m);switch(m.val){case"G":return Ia(t.eras("short"),0);case"GG":return Ia(t.eras("long"),0);case"y":return Ta(c);case"yy":case"kk":return Ta(u,oo);case"yyyy":case"kkkk":return Ta(a);case"yyyyy":return Ta(f);case"yyyyyy":return Ta(s);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return Ta(i);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return Ta(r);case"MMM":return Ia(t.months("short",!0),1);case"MMMM":return Ia(t.months("long",!0),1);case"LLL":return Ia(t.months("short",!1),1);case"LLLL":return Ia(t.months("long",!1),1);case"o":case"S":return Ta(l);case"ooo":case"SSS":return Ta(o);case"u":return La(d);case"uu":return La(i);case"uuu":case"E":case"c":return Ta(n);case"a":return Ia(t.meridiems(),0);case"EEE":return Ia(t.weekdays("short",!1),1);case"EEEE":return Ia(t.weekdays("long",!1),1);case"ccc":return Ia(t.weekdays("short",!0),1);case"cccc":return Ia(t.weekdays("long",!0),1);case"Z":case"ZZ":return Pa(new RegExp(`([+-]${i.source})(?::(${r.source}))?`),2);case"ZZZ":return Pa(new RegExp(`([+-]${i.source})(${r.source})?`),2);case"z":return La(/[a-z_+-/]{1,256}?/i);case" ":return La(/[^\S\n\r]/);default:return h(m)}})(e)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return m.token=e,m}(t,e))),this.disqualifyingUnit=this.units.find((e=>e.invalidReason)),!this.disqualifyingUnit){const[e,t]=function(e){const t=e.map((e=>e.regex)).reduce(((e,t)=>`${e}(${t.source})`),"");return[`^${t}$`,e]}(this.units);this.regex=RegExp(e,"i"),this.handlers=t}}explainFromTokens(e){if(this.isValid){const[t,n]=function(e,t,n){const r=e.match(t);if(r){const e={};let t=1;for(const o in n)if(Ur(n,o)){const a=n[o],s=a.groups?a.groups+1:1;!a.literal&&a.token&&(e[a.token.val[0]]=a.deser(r.slice(t,t+s))),t+=s}return[r,e]}return[r,{}]}(e,this.regex,this.handlers),[r,o,a]=n?function(e){let t,n=null;Fr(e.z)||(n=Wn.create(e.z)),Fr(e.Z)||(n||(n=new sr(e.Z)),t=e.Z),Fr(e.q)||(e.M=3*(e.q-1)+1),Fr(e.h)||(e.h<12&&1===e.a?e.h+=12:12===e.h&&0===e.a&&(e.h=0)),0===e.G&&e.y&&(e.y=-e.y),Fr(e.u)||(e.S=Kr(e.u));const r=Object.keys(e).reduce(((t,n)=>{const r=(e=>{switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}})(n);return r&&(t[r]=e[n]),t}),{});return[r,n,t]}(n):[null,null,void 0];if(Ur(n,"a")&&Ur(n,"H"))throw new sn("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:n,result:r,zone:o,specificOffset:a}}return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function Ba(e,t,n){return new Va(e,n).explainFromTokens(t)}function Wa(e,t){if(!e)return null;const n=Eo.create(t,e).dtFormatter((za||(za=vs.fromMillis(1555555555555)),za)),r=n.formatToParts(),o=n.resolvedOptions();return r.map((t=>function(e,t,n){const{type:r,value:o}=e;if("literal"===r){const e=/^\s+$/.test(o);return{literal:!e,val:e?" ":o}}const a=t[r];let s=r;"hour"===r&&(s=null!=t.hour12?t.hour12?"hour12":"hour24":null!=t.hourCycle?"h11"===t.hourCycle||"h12"===t.hourCycle?"hour12":"hour24":n.hour12?"hour12":"hour24");let i=Fa[s];if("object"==typeof i&&(i=i[a]),i)return{literal:!1,val:i}}(t,e,o)))}const Ua="Invalid DateTime",$a=864e13;function Ga(e){return new Sr("unsupported zone",`the zone "${e.name}" is not supported`)}function Ya(e){return null===e.weekData&&(e.weekData=Ar(e.c)),e.weekData}function qa(e){return null===e.localWeekData&&(e.localWeekData=Ar(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function Za(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new vs({...n,...t,old:n})}function Ka(e,t,n){let r=e-60*t*1e3;const o=n.offset(r);if(t===o)return[r,t];r-=60*(o-t)*1e3;const a=n.offset(r);return o===a?[r,o]:[e-60*Math.min(o,a)*1e3,Math.max(o,a)]}function Qa(e,t){const n=new Date(e+=60*t*1e3);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function Ja(e,t,n){return Ka(to(e),t,n)}function Xa(e,t){const n=e.o,r=e.c.year+Math.trunc(t.years),o=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),a={...e.c,year:r,month:o,day:Math.min(e.c.day,eo(r,o))+Math.trunc(t.days)+7*Math.trunc(t.weeks)},s=_a.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),i=to(a);let[l,c]=Ka(i,n,e.zone);return 0!==s&&(l+=s,c=e.zone.offset(l)),{ts:l,o:c}}function es(e,t,n,r,o,a){const{setZone:s,zone:i}=n;if(e&&0!==Object.keys(e).length||t){const r=t||i,o=vs.fromObject(e,{...n,zone:r,specificOffset:a});return s?o:o.setZone(i)}return vs.invalid(new Sr("unparsable",`the input "${o}" can't be parsed as ${r}`))}function ts(e,t,n=!0){return e.isValid?Eo.create(or.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function ns(e,t,n){const r=e.c.year>9999||e.c.year<0;let o="";if(r&&e.c.year>=0&&(o+="+"),o+=Yr(e.c.year,r?6:4),"year"===n)return o;if(t){if(o+="-",o+=Yr(e.c.month),"month"===n)return o;o+="-"}else if(o+=Yr(e.c.month),"month"===n)return o;return o+=Yr(e.c.day),o}function rs(e,t,n,r,o,a,s){let i=!n||0!==e.c.millisecond||0!==e.c.second,l="";switch(s){case"day":case"month":case"year":break;default:if(l+=Yr(e.c.hour),"hour"===s)break;if(t){if(l+=":",l+=Yr(e.c.minute),"minute"===s)break;i&&(l+=":",l+=Yr(e.c.second))}else{if(l+=Yr(e.c.minute),"minute"===s)break;i&&(l+=Yr(e.c.second))}if("second"===s)break;!i||r&&0===e.c.millisecond||(l+=".",l+=Yr(e.c.millisecond,3))}return o&&(e.isOffsetFixed&&0===e.offset&&!a?l+="Z":e.o<0?(l+="-",l+=Yr(Math.trunc(-e.o/60)),l+=":",l+=Yr(Math.trunc(-e.o%60))):(l+="+",l+=Yr(Math.trunc(e.o/60)),l+=":",l+=Yr(Math.trunc(e.o%60)))),a&&(l+="["+e.zone.ianaName+"]"),l}const os={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},as={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},ss={ordinal:1,hour:0,minute:0,second:0,millisecond:0},is=["year","month","day","hour","minute","second","millisecond"],ls=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],cs=["year","ordinal","hour","minute","second","millisecond"];function ds(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new ln(e);return t}function us(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return ds(e)}}function fs(e,t){const n=lr(t.zone,kr.defaultZone);if(!n.isValid)return vs.invalid(Ga(n));const r=or.fromObject(t);let o,a;if(Fr(e.year))o=kr.now();else{for(const t of is)Fr(e[t])&&(e[t]=os[t]);const t=Pr(e)||Lr(e);if(t)return vs.invalid(t);const r=function(e){if(void 0===ps&&(ps=kr.now()),"iana"!==e.type)return e.offset(ps);const t=e.name;let n=gs.get(t);return void 0===n&&(n=e.offset(ps),gs.set(t,n)),n}(n);[o,a]=Ja(e,r,n)}return new vs({ts:o,zone:n,loc:r,o:a})}function hs(e,t,n){const r=!!Fr(n.round)||n.round,o=Fr(n.rounding)?"trunc":n.rounding,a=(e,a)=>(e=Qr(e,r||n.calendary?0:2,n.calendary?"round":o),t.loc.clone(n).relFormatter(n).format(e,a)),s=r=>n.calendary?t.hasSame(e,r)?0:t.startOf(r).diff(e.startOf(r),r).get(r):t.diff(e,r).get(r);if(n.unit)return a(s(n.unit),n.unit);for(const e of n.units){const t=s(e);if(Math.abs(t)>=1)return a(t,e)}return a(e>t?-0:0,n.units[n.units.length-1])}function ms(e){let t,n={};return e.length>0&&"object"==typeof e[e.length-1]?(n=e[e.length-1],t=Array.from(e).slice(0,e.length-1)):t=Array.from(e),[n,t]}let ps;const gs=new Map;class vs{constructor(e){const t=e.zone||kr.defaultZone;let n=e.invalid||(Number.isNaN(e.ts)?new Sr("invalid input"):null)||(t.isValid?null:Ga(t));this.ts=Fr(e.ts)?kr.now():e.ts;let r=null,o=null;if(!n)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[r,o]=[e.old.c,e.old.o];else{const a=zr(e.o)&&!e.old?e.o:t.offset(this.ts);r=Qa(this.ts,a),n=Number.isNaN(r.year)?new Sr("invalid input"):null,r=n?null:r,o=n?null:a}this._zone=t,this.loc=e.loc||or.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=r,this.o=o,this.isLuxonDateTime=!0}static now(){return new vs({})}static local(){const[e,t]=ms(arguments),[n,r,o,a,s,i,l]=t;return fs({year:n,month:r,day:o,hour:a,minute:s,second:i,millisecond:l},e)}static utc(){const[e,t]=ms(arguments),[n,r,o,a,s,i,l]=t;return e.zone=sr.utcInstance,fs({year:n,month:r,day:o,hour:a,minute:s,second:i,millisecond:l},e)}static fromJSDate(e,t={}){const n=(r=e,"[object Date]"===Object.prototype.toString.call(r)?e.valueOf():NaN);var r;if(Number.isNaN(n))return vs.invalid("invalid input");const o=lr(t.zone,kr.defaultZone);return o.isValid?new vs({ts:n,zone:o,loc:or.fromObject(t)}):vs.invalid(Ga(o))}static fromMillis(e,t={}){if(zr(e))return e<-$a||e>$a?vs.invalid("Timestamp out of range"):new vs({ts:e,zone:lr(t.zone,kr.defaultZone),loc:or.fromObject(t)});throw new cn(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(zr(e))return new vs({ts:1e3*e,zone:lr(t.zone,kr.defaultZone),loc:or.fromObject(t)});throw new cn("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const n=lr(t.zone,kr.defaultZone);if(!n.isValid)return vs.invalid(Ga(n));const r=or.fromObject(t),o=lo(e,us),{minDaysInFirstWeek:a,startOfWeek:s}=Ir(o,r),i=kr.now(),l=Fr(t.specificOffset)?n.offset(i):t.specificOffset,c=!Fr(o.ordinal),d=!Fr(o.year),u=!Fr(o.month)||!Fr(o.day),f=d||u,h=o.weekYear||o.weekNumber;if((f||c)&&h)throw new sn("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&c)throw new sn("Can't mix ordinal dates with month/day");const m=h||o.weekday&&!f;let p,g,v=Qa(i,l);m?(p=ls,g=as,v=Ar(v,a,s)):c?(p=cs,g=ss,v=Mr(v)):(p=is,g=os);let y=!1;for(const e of p)Fr(o[e])?o[e]=y?g[e]:v[e]:y=!0;const b=m?function(e,t=4,n=1){const r=Hr(e.weekYear),o=Gr(e.weekNumber,1,ro(e.weekYear,t,n)),a=Gr(e.weekday,1,7);return r?o?!a&&jr("weekday",e.weekday):jr("week",e.weekNumber):jr("weekYear",e.weekYear)}(o,a,s):c?function(e){const t=Hr(e.year),n=Gr(e.ordinal,1,Xr(e.year));return t?!n&&jr("ordinal",e.ordinal):jr("year",e.year)}(o):Pr(o),x=b||Lr(o);if(x)return vs.invalid(x);const w=m?Rr(o,a,s):c?Or(o):o,[k,S]=Ja(w,l,n),C=new vs({ts:k,zone:n,o:S,loc:r});return o.weekday&&f&&e.weekday!==C.weekday?vs.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${C.toISO()}`):C.isValid?C:vs.invalid(C.invalid)}static fromISO(e,t={}){const[n,r]=function(e){return Ao(e,[ra,ia],[oa,la],[aa,ca],[sa,da])}(e);return es(n,r,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[n,r]=function(e){return Ao(function(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[Ko,Qo])}(e);return es(n,r,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[n,r]=function(e){return Ao(e,[Jo,ta],[Xo,ta],[ea,na])}(e);return es(n,r,t,"HTTP",t)}static fromFormat(e,t,n={}){if(Fr(e)||Fr(t))throw new cn("fromFormat requires an input string and a format");const{locale:r=null,numberingSystem:o=null}=n,a=or.fromOpts({locale:r,numberingSystem:o,defaultToEN:!0}),[s,i,l,c]=function(e,t,n){const{result:r,zone:o,specificOffset:a,invalidReason:s}=Ba(e,t,n);return[r,o,a,s]}(a,e,t);return c?vs.invalid(c):es(s,i,n,`format ${t}`,e,l)}static fromString(e,t,n={}){return vs.fromFormat(e,t,n)}static fromSQL(e,t={}){const[n,r]=function(e){return Ao(e,[fa,ia],[ha,ma])}(e);return es(n,r,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new cn("need to specify a reason the DateTime is invalid");const n=e instanceof Sr?e:new Sr(e,t);if(kr.throwOnInvalid)throw new rn(n);return new vs({invalid:n})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){const n=Wa(e,or.fromObject(t));return n?n.map((e=>e?e.val:null)).join(""):null}static expandFormat(e,t={}){return Ha(Eo.parseFormat(e),or.fromObject(t)).map((e=>e.val)).join("")}static resetCache(){ps=void 0,gs.clear()}get(e){return this[e]}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Ya(this).weekYear:NaN}get weekNumber(){return this.isValid?Ya(this).weekNumber:NaN}get weekday(){return this.isValid?Ya(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?qa(this).weekday:NaN}get localWeekNumber(){return this.isValid?qa(this).weekNumber:NaN}get localWeekYear(){return this.isValid?qa(this).weekYear:NaN}get ordinal(){return this.isValid?Mr(this.c).ordinal:NaN}get monthShort(){return this.isValid?Na.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Na.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Na.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Na.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return!this.isOffsetFixed&&(this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset)}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,t=6e4,n=to(this.c),r=this.zone.offset(n-e),o=this.zone.offset(n+e),a=this.zone.offset(n-r*t),s=this.zone.offset(n-o*t);if(a===s)return[this];const i=n-a*t,l=n-s*t,c=Qa(i,a),d=Qa(l,s);return c.hour===d.hour&&c.minute===d.minute&&c.second===d.second&&c.millisecond===d.millisecond?[Za(this,{ts:i}),Za(this,{ts:l})]:[this]}get isInLeapYear(){return Jr(this.year)}get daysInMonth(){return eo(this.year,this.month)}get daysInYear(){return this.isValid?Xr(this.year):NaN}get weeksInWeekYear(){return this.isValid?ro(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?ro(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:n,calendar:r}=Eo.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:n,outputCalendar:r}}toUTC(e=0,t={}){return this.setZone(sr.instance(e),t)}toLocal(){return this.setZone(kr.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:n=!1}={}){if((e=lr(e,kr.defaultZone)).equals(this.zone))return this;if(e.isValid){let r=this.ts;if(t||n){const t=e.offset(this.ts),n=this.toObject();[r]=Ja(n,t,e)}return Za(this,{ts:r,zone:e})}return vs.invalid(Ga(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:n}={}){return Za(this,{loc:this.loc.clone({locale:e,numberingSystem:t,outputCalendar:n})})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=lo(e,us),{minDaysInFirstWeek:n,startOfWeek:r}=Ir(t,this.loc),o=!Fr(t.weekYear)||!Fr(t.weekNumber)||!Fr(t.weekday),a=!Fr(t.ordinal),s=!Fr(t.year),i=!Fr(t.month)||!Fr(t.day),l=s||i,c=t.weekYear||t.weekNumber;if((l||a)&&c)throw new sn("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(i&&a)throw new sn("Can't mix ordinal dates with month/day");let d;o?d=Rr({...Ar(this.c,n,r),...t},n,r):Fr(t.ordinal)?(d={...this.toObject(),...t},Fr(t.day)&&(d.day=Math.min(eo(d.year,d.month),d.day))):d=Or({...Mr(this.c),...t});const[u,f]=Ja(d,this.o,this.zone);return Za(this,{ts:u,o:f})}plus(e){return this.isValid?Za(this,Xa(this,_a.fromDurationLike(e))):this}minus(e){return this.isValid?Za(this,Xa(this,_a.fromDurationLike(e).negate())):this}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;const n={},r=_a.normalizeUnit(e);switch(r){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0}if("weeks"===r)if(t){const e=this.loc.getStartOfWeek(),{weekday:t}=this;t<e&&(n.weekNumber=this.weekNumber-1),n.weekday=e}else n.weekday=1;if("quarters"===r){const e=Math.ceil(this.month/3);n.month=3*(e-1)+1}return this.set(n)}endOf(e,t){return this.isValid?this.plus({[e]:1}).startOf(e,t).minus(1):this}toFormat(e,t={}){return this.isValid?Eo.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):Ua}toLocaleString(e=mn,t={}){return this.isValid?Eo.create(this.loc.clone(t),e).formatDateTime(this):Ua}toLocaleParts(e={}){return this.isValid?Eo.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:n=!1,includeOffset:r=!0,extendedZone:o=!1,precision:a="milliseconds"}={}){if(!this.isValid)return null;const s="extended"===e;let i=ns(this,s,a=ds(a));return is.indexOf(a)>=3&&(i+="T"),i+=rs(this,s,t,n,r,o,a),i}toISODate({format:e="extended",precision:t="day"}={}){return this.isValid?ns(this,"extended"===e,ds(t)):null}toISOWeekDate(){return ts(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:n=!0,includePrefix:r=!1,extendedZone:o=!1,format:a="extended",precision:s="milliseconds"}={}){return this.isValid?(s=ds(s),(r&&is.indexOf(s)>=3?"T":"")+rs(this,"extended"===a,t,e,n,o,s)):null}toRFC2822(){return ts(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return ts(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?ns(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:n=!0}={}){let r="HH:mm:ss.SSS";return(t||e)&&(n&&(r+=" "),t?r+="z":e&&(r+="ZZ")),ts(this,r,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():Ua}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",n={}){if(!this.isValid||!e.isValid)return _a.invalid("created by diffing an invalid DateTime");const r={locale:this.locale,numberingSystem:this.numberingSystem,...n},o=(i=t,Array.isArray(i)?i:[i]).map(_a.normalizeUnit),a=e.valueOf()>this.valueOf(),s=function(e,t,n,r){let[o,a,s,i]=function(e,t,n){const r=[["years",(e,t)=>t.year-e.year],["quarters",(e,t)=>t.quarter-e.quarter+4*(t.year-e.year)],["months",(e,t)=>t.month-e.month+12*(t.year-e.year)],["weeks",(e,t)=>{const n=Da(e,t);return(n-n%7)/7}],["days",Da]],o={},a=e;let s,i;for(const[l,c]of r)n.indexOf(l)>=0&&(s=l,o[l]=c(e,t),i=a.plus(o),i>t?(o[l]--,(e=a.plus(o))>t&&(i=e,o[l]--,e=a.plus(o))):e=i);return[e,o,i,s]}(e,t,n);const l=t-o,c=n.filter((e=>["hours","minutes","seconds","milliseconds"].indexOf(e)>=0));0===c.length&&(s<t&&(s=o.plus({[i]:1})),s!==o&&(a[i]=(a[i]||0)+l/(s-o)));const d=_a.fromObject(a,r);return c.length>0?_a.fromMillis(l,r).shiftTo(...c).plus(d):d}(a?this:e,a?e:this,o,r);var i;return a?s.negate():s}diffNow(e="milliseconds",t={}){return this.diff(vs.now(),e,t)}until(e){return this.isValid?Ea.fromDateTimes(this,e):this}hasSame(e,t,n){if(!this.isValid)return!1;const r=e.valueOf(),o=this.setZone(e.zone,{keepLocalTime:!0});return o.startOf(t,n)<=r&&r<=o.endOf(t,n)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||vs.fromObject({},{zone:this.zone}),n=e.padding?this<t?-e.padding:e.padding:0;let r=["years","months","days","hours","minutes","seconds"],o=e.unit;return Array.isArray(e.unit)&&(r=e.unit,o=void 0),hs(t,this.plus(n),{...e,numeric:"always",units:r,unit:o})}toRelativeCalendar(e={}){return this.isValid?hs(e.base||vs.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(vs.isDateTime))throw new cn("min requires all arguments be DateTimes");return Wr(e,(e=>e.valueOf()),Math.min)}static max(...e){if(!e.every(vs.isDateTime))throw new cn("max requires all arguments be DateTimes");return Wr(e,(e=>e.valueOf()),Math.max)}static fromFormatExplain(e,t,n={}){const{locale:r=null,numberingSystem:o=null}=n;return Ba(or.fromOpts({locale:r,numberingSystem:o,defaultToEN:!0}),e,t)}static fromStringExplain(e,t,n={}){return vs.fromFormatExplain(e,t,n)}static buildFormatParser(e,t={}){const{locale:n=null,numberingSystem:r=null}=t,o=or.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0});return new Va(o,e)}static fromFormatParser(e,t,n={}){if(Fr(e)||Fr(t))throw new cn("fromFormatParser requires an input string and a format parser");const{locale:r=null,numberingSystem:o=null}=n,a=or.fromOpts({locale:r,numberingSystem:o,defaultToEN:!0});if(!a.equals(t.locale))throw new cn(`fromFormatParser called with a locale of ${a}, but the format parser was created for ${t.locale}`);const{result:s,zone:i,specificOffset:l,invalidReason:c}=t.explainFromTokens(e);return c?vs.invalid(c):es(s,i,n,`format ${t.format}`,e,l)}static get DATE_SHORT(){return mn}static get DATE_MED(){return pn}static get DATE_MED_WITH_WEEKDAY(){return gn}static get DATE_FULL(){return vn}static get DATE_HUGE(){return yn}static get TIME_SIMPLE(){return bn}static get TIME_WITH_SECONDS(){return xn}static get TIME_WITH_SHORT_OFFSET(){return wn}static get TIME_WITH_LONG_OFFSET(){return kn}static get TIME_24_SIMPLE(){return Sn}static get TIME_24_WITH_SECONDS(){return Cn}static get TIME_24_WITH_SHORT_OFFSET(){return jn}static get TIME_24_WITH_LONG_OFFSET(){return En}static get DATETIME_SHORT(){return Nn}static get DATETIME_SHORT_WITH_SECONDS(){return Dn}static get DATETIME_MED(){return Tn}static get DATETIME_MED_WITH_SECONDS(){return An}static get DATETIME_MED_WITH_WEEKDAY(){return Rn}static get DATETIME_FULL(){return Mn}static get DATETIME_FULL_WITH_SECONDS(){return On}static get DATETIME_HUGE(){return In}static get DATETIME_HUGE_WITH_SECONDS(){return Pn}}function ys(e){if(vs.isDateTime(e))return e;if(e&&e.valueOf&&zr(e.valueOf()))return vs.fromJSDate(e);if(e&&"object"==typeof e)return vs.fromObject(e);throw new cn(`Unknown datetime argument: ${e}, of type ${typeof e}`)}const bs={january:1,february:2,march:3,april:4,may:5,june:6,july:7,august:8,september:9,october:10,november:11,december:12};function xs(e,t="24",n=!0){if(!e)return"12"===t?"UTC, AM/PM":"UTC, 24hr";const r=e=>n?"12"===t?`${e}, AM/PM`:`${e}, 24hr`:e,o=e.match(/^([+-])(\d{2}):?(\d{2})$/);if(o){const e=o[1],t=parseInt(o[2],10),n=parseInt(o[3],10);return r(0===n?`UTC${e}${t}`:`UTC${e}${t}:${n.toString().padStart(2,"0")}`)}if(e.startsWith("Etc/GMT")){const t=e.replace("Etc/GMT",""),n=parseInt(t,10);return r(0===n?"UTC":`UTC${n>=0?"+":"-"}${Math.abs(n)}`)}if(!isNaN(parseFloat(e))&&isFinite(e)){const t=parseFloat(e);return r(0===t?"UTC":`UTC${t>=0?"+":""}${t}`)}if("local"===e.toLowerCase()){const e=Intl.DateTimeFormat().resolvedOptions().timeZone;let t=vs.now().setZone(e).toFormat("ZZ");return t=t.replace(":00","").replace(/^(\+|-)0/,"$1"),r(`${e} (UTC${t})`)}if("UTC"===e.toUpperCase())return r("UTC");const a=vs.now().setZone(e);if(a.isValid){let t=a.toFormat("ZZ");return t=t.replace(":00","").replace(/^(\+|-)0/,"$1"),r(`${e} (UTC${t})`)}return r(e)}function ws(e,t){if(e.tbc)return e.tbc_note||"Date and time to be confirmed";const n=Ns(t||"UTC"),r=eventkoi_params?.time_format||"12",o="undefined"!=typeof eventkoi_params&&eventkoi_params.locale&&(a=eventkoi_params.locale)?a.replace("_","-"):"en";var a;const s=e=>e?.isValid?"24"===r?e.setLocale(o).toFormat("HH:mm"):e.setLocale(o).toFormat(0===e.minute?"ha":"h:mma").toLowerCase().replace(":00",""):"",i=e=>{if(!e)return null;const t=vs.fromISO(e,{zone:"utc"}).setZone(n).setLocale(o);return t.isValid?t:null};if("recurring"===e.date_type){const t=i(e.start_date_iso||e.start_date),n=i(e.end_real)||i(e.end_date_iso||e.end_date);if(!t)return null;const r=!!e.all_day,o=n&&t.hasSame(n,"day");return o&&!r?`${t.toLocaleString(vs.DATE_MED_WITH_WEEKDAY)}, ${s(t)} – ${s(n)}`:!n||o?t.toLocaleString(vs.DATE_MED_WITH_WEEKDAY):`${t.toLocaleString(vs.DATE_MED_WITH_WEEKDAY)} – ${n.toLocaleString(vs.DATE_MED_WITH_WEEKDAY)}`}if("standard"===e.date_type||"multi"===e.date_type){const t=i(e.start_date_iso||e.start_date),n=i(e.end_real)||i(e.end_date_iso||e.end_date);if(!t)return null;const r=!!e.all_day;return n&&t.hasSame(n,"day")&&!r?`${t.toLocaleString(vs.DATE_MED_WITH_WEEKDAY)}, ${s(t)} – ${s(n)}`:n?`${t.toLocaleString(vs.DATE_MED_WITH_WEEKDAY)}, ${s(t)} – ${n.toLocaleString(vs.DATE_MED_WITH_WEEKDAY)}, ${s(n)}`:r?t.toLocaleString(vs.DATE_MED_WITH_WEEKDAY):`${t.toLocaleString(vs.DATE_MED_WITH_WEEKDAY)}, ${s(t)}`}return null}function ks(e,t,n="12"){if(e.tbc)return e.tbc_note||"Date and time to be confirmed";const r=Ns(t||"UTC"),o="undefined"!=typeof eventkoi_params&&eventkoi_params.locale&&(a=eventkoi_params.locale)?a.replace("_","-"):"en";var a;const s=e=>e?.isValid?"24"===n?e.setLocale(o).toFormat("HH:mm"):e.setLocale(o).toFormat(0===e.minute?"ha":"h:mma").toLowerCase().replace(":00",""):"",i=e=>{if(!e)return null;const t=vs.fromISO(e,{zone:"utc"}).setZone(r).setLocale(o);return t.isValid?t:null};if("recurring"===e.date_type&&e.timeline){const t=i(e.start),n=i(e.end_real)||i(e.end);if(!t)return null;const r=!!e.allDay,o=n&&t.hasSame(n,"day");return o&&!r?`${t.toLocaleString(vs.DATE_MED_WITH_WEEKDAY)}, ${s(t)} – ${s(n)}`:!n||o?t.toLocaleString(vs.DATE_MED_WITH_WEEKDAY):`${t.toLocaleString(vs.DATE_MED_WITH_WEEKDAY)} – ${n.toLocaleString(vs.DATE_MED_WITH_WEEKDAY)}`}if("standard"===e.date_type||"multi"===e.date_type){const t=i(e.start),n=i(e.end_real)||i(e.end);if(!t)return null;const r=!!e.allDay;return n&&t.hasSame(n,"day")&&!r?`${t.toLocaleString(vs.DATE_MED_WITH_WEEKDAY)}, ${s(t)} – ${s(n)}`:n?`${t.toLocaleString(vs.DATE_MED_WITH_WEEKDAY)}, ${s(t)} – ${n.toLocaleString(vs.DATE_MED_WITH_WEEKDAY)}, ${s(n)}`:r?t.toLocaleString(vs.DATE_MED_WITH_WEEKDAY):`${t.toLocaleString(vs.DATE_MED_WITH_WEEKDAY)}, ${s(t)}`}return null}function Ss(e,t={}){if(!e)return"";const{time_format:n}=Te||{},r=Ns(t.timezone||"undefined"!=typeof eventkoi_params&&eventkoi_params.timezone_string||"UTC"),o=new Date(e),a=o.toLocaleDateString("en-CA",{year:"numeric",month:"2-digit",day:"2-digit",timeZone:r}),s="24"===n,i=o.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit",hour12:!s,timeZone:r});return"date"===t.format?a:"time"===t.format?i:`${a}\n${i}`}function Cs(e){if(e)return/[+-]\d\d:\d\d|Z$/.test(e)?e:/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(e)?e.replace(" ","T")+"Z":e+"Z"}function _s(e,t="UTC"){if(!e)return null;const n=Ns(t);let r;return r=/[+-]\d\d:\d\d|Z$/.test(e)?vs.fromISO(e,{zone:"utc"}):vs.fromISO(e,{zone:n}),r.setZone(n).toJSDate()}function js(e,t="UTC"){if(!e)return null;const n=Ns(t);return vs.fromISO(e,{zone:n}).setZone("utc").toISO({suppressMilliseconds:!0})}const Es=[{key:0,short:"Mo",label:"Monday"},{key:1,short:"Tu",label:"Tuesday"},{key:2,short:"We",label:"Wednesday"},{key:3,short:"Th",label:"Thursday"},{key:4,short:"Fr",label:"Friday"},{key:5,short:"Sa",label:"Saturday"},{key:6,short:"Su",label:"Sunday"}];function Ns(e){if(!e)return"UTC";if("local"===e)return Intl.DateTimeFormat().resolvedOptions().timeZone;if("utc"===e.toLowerCase())return"UTC";const t=e.match(/^UTC([+-]?\d+(\.\d+)?)$/i);if(t){const e=parseFloat(t[1]);return`Etc/GMT${e>=0?"-":"+"}${Math.abs(e)}`}if(!isNaN(parseFloat(e))&&isFinite(e)){const t=parseFloat(e);return`Etc/GMT${t>=0?"-":"+"}${Math.abs(t)}`}return e}function Ds(e=0){return[...Es.slice(e),...Es.slice(0,e)]}function Ts(e,t,n="UTC"){if(!e)return"";const r=Ns(n),o="string"==typeof e?new Date(e):e,a="string"==typeof t?new Date(t):t,s=tn(o,r,"MMM d, yyyy"),i=tn(o,r,"h:mm a"),l=a?tn(a,r,"h:mm a"):null;return`${s}, ${i}${l?` – ${l}`:""}`}function As(e){if(!e)return"UTC";const t=Ns(e);return vs.now().setZone(t).isValid?t:"UTC"}function Rs(e){const t=vs.utc();let n=t.year,r=t.month;if(e?.default_year&&""!==e.default_year){const t=parseInt(e.default_year,10);isNaN(t)||(n=t)}var o;return e?.default_month&&""!==e.default_month&&(r=null!==(o=bs[e.default_month.toLowerCase()])&&void 0!==o?o:t.month),vs.utc(n,r,1).toISODate()}const Ms=window.wp.i18n;function Os(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Os(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Is(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Os(e))&&(r&&(r+=" "),r+=t);return r}const Ps=e=>{const t=Hs(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{const n=e.split("-");return""===n[0]&&1!==n.length&&n.shift(),Ls(n,t)||zs(e)},getConflictingClassGroupIds:(e,t)=>{const o=n[e]||[];return t&&r[e]?[...o,...r[e]]:o}}},Ls=(e,t)=>{if(0===e.length)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Ls(e.slice(1),r):void 0;if(o)return o;if(0===t.validators.length)return;const a=e.join("-");return t.validators.find((({validator:e})=>e(a)))?.classGroupId},Fs=/^\[(.+)\]$/,zs=e=>{if(Fs.test(e)){const t=Fs.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Hs=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Us(Object.entries(e.classGroups),n).forEach((([e,n])=>{Vs(n,r,e,t)})),r},Vs=(e,t,n,r)=>{e.forEach((e=>{if("string"!=typeof e){if("function"==typeof e)return Ws(e)?void Vs(e(r),t,n,r):void t.validators.push({validator:e,classGroupId:n});Object.entries(e).forEach((([e,o])=>{Vs(o,Bs(t,e),n,r)}))}else(""===e?t:Bs(t,e)).classGroupId=n}))},Bs=(e,t)=>{let n=e;return t.split("-").forEach((e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)})),n},Ws=e=>e.isThemeGetter,Us=(e,t)=>t?e.map((([e,n])=>[e,n.map((e=>"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map((([e,n])=>[t+e,n]))):e))])):e,$s=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(o,a)=>{n.set(o,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);return void 0!==t?t:void 0!==(t=r.get(e))?(o(e,t),t):void 0},set(e,t){n.has(e)?n.set(e,t):o(e,t)}}},Gs=e=>{const{separator:t,experimentalParseClassName:n}=e,r=1===t.length,o=t[0],a=t.length,s=e=>{const n=[];let s,i=0,l=0;for(let c=0;c<e.length;c++){let d=e[c];if(0===i){if(d===o&&(r||e.slice(c,c+a)===t)){n.push(e.slice(l,c)),l=c+a;continue}if("/"===d){s=c;continue}}"["===d?i++:"]"===d&&i--}const c=0===n.length?e:e.substring(l),d=c.startsWith("!");return{modifiers:n,hasImportantModifier:d,baseClassName:d?c.substring(1):c,maybePostfixModifierPosition:s&&s>l?s-l:void 0}};return n?e=>n({className:e,parseClassName:s}):s},Ys=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach((e=>{"["===e[0]?(t.push(...n.sort(),e),n=[]):n.push(e)})),t.push(...n.sort()),t},qs=/\s+/;function Zs(){let e,t,n=0,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=Ks(e))&&(r&&(r+=" "),r+=t);return r}const Ks=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Ks(e[r]))&&(n&&(n+=" "),n+=t);return n};function Qs(e,...t){let n,r,o,a=function(i){const l=t.reduce(((e,t)=>t(e)),e());return n=(e=>({cache:$s(e.cacheSize),parseClassName:Gs(e),...Ps(e)}))(l),r=n.cache.get,o=n.cache.set,a=s,s(i)};function s(e){const t=r(e);if(t)return t;const a=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,a=[],s=e.trim().split(qs);let i="";for(let e=s.length-1;e>=0;e-=1){const t=s[e],{modifiers:l,hasImportantModifier:c,baseClassName:d,maybePostfixModifierPosition:u}=n(t);let f=Boolean(u),h=r(f?d.substring(0,u):d);if(!h){if(!f){i=t+(i.length>0?" "+i:i);continue}if(h=r(d),!h){i=t+(i.length>0?" "+i:i);continue}f=!1}const m=Ys(l).join(":"),p=c?m+"!":m,g=p+h;if(a.includes(g))continue;a.push(g);const v=o(h,f);for(let e=0;e<v.length;++e){const t=v[e];a.push(p+t)}i=t+(i.length>0?" "+i:i)}return i})(e,n);return o(e,a),a}return function(){return a(Zs.apply(null,arguments))}}const Js=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},Xs=/^\[(?:([a-z-]+):)?(.+)\]$/i,ei=/^\d+\/\d+$/,ti=new Set(["px","full","screen"]),ni=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ri=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,oi=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,ai=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,si=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ii=e=>ci(e)||ti.has(e)||ei.test(e),li=e=>ki(e,"length",Si),ci=e=>Boolean(e)&&!Number.isNaN(Number(e)),di=e=>ki(e,"number",ci),ui=e=>Boolean(e)&&Number.isInteger(Number(e)),fi=e=>e.endsWith("%")&&ci(e.slice(0,-1)),hi=e=>Xs.test(e),mi=e=>ni.test(e),pi=new Set(["length","size","percentage"]),gi=e=>ki(e,pi,Ci),vi=e=>ki(e,"position",Ci),yi=new Set(["image","url"]),bi=e=>ki(e,yi,ji),xi=e=>ki(e,"",_i),wi=()=>!0,ki=(e,t,n)=>{const r=Xs.exec(e);return!!r&&(r[1]?"string"==typeof t?r[1]===t:t.has(r[1]):n(r[2]))},Si=e=>ri.test(e)&&!oi.test(e),Ci=()=>!1,_i=e=>ai.test(e),ji=e=>si.test(e),Ei=Qs((Symbol.toStringTag,()=>{const e=Js("colors"),t=Js("spacing"),n=Js("blur"),r=Js("brightness"),o=Js("borderColor"),a=Js("borderRadius"),s=Js("borderSpacing"),i=Js("borderWidth"),l=Js("contrast"),c=Js("grayscale"),d=Js("hueRotate"),u=Js("invert"),f=Js("gap"),h=Js("gradientColorStops"),m=Js("gradientColorStopPositions"),p=Js("inset"),g=Js("margin"),v=Js("opacity"),y=Js("padding"),b=Js("saturate"),x=Js("scale"),w=Js("sepia"),k=Js("skew"),S=Js("space"),C=Js("translate"),_=()=>["auto",hi,t],j=()=>[hi,t],E=()=>["",ii,li],N=()=>["auto",ci,hi],D=()=>["","0",hi],T=()=>[ci,hi];return{cacheSize:500,separator:":",theme:{colors:[wi],spacing:[ii,li],blur:["none","",mi,hi],brightness:T(),borderColor:[e],borderRadius:["none","","full",mi,hi],borderSpacing:j(),borderWidth:E(),contrast:T(),grayscale:D(),hueRotate:T(),invert:D(),gap:j(),gradientColorStops:[e],gradientColorStopPositions:[fi,li],inset:_(),margin:_(),opacity:T(),padding:j(),saturate:T(),scale:T(),sepia:D(),skew:T(),space:j(),translate:j()},classGroups:{aspect:[{aspect:["auto","square","video",hi]}],container:["container"],columns:[{columns:[mi]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",hi]}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[p]}],"inset-x":[{"inset-x":[p]}],"inset-y":[{"inset-y":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ui,hi]}],basis:[{basis:_()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",hi]}],grow:[{grow:D()}],shrink:[{shrink:D()}],order:[{order:["first","last","none",ui,hi]}],"grid-cols":[{"grid-cols":[wi]}],"col-start-end":[{col:["auto",{span:["full",ui,hi]},hi]}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":[wi]}],"row-start-end":[{row:["auto",{span:[ui,hi]},hi]}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",hi]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",hi]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal","start","end","center","between","around","evenly","stretch"]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",hi,t]}],"min-w":[{"min-w":[hi,t,"min","max","fit"]}],"max-w":[{"max-w":[hi,t,"none","full","min","max","fit","prose",{screen:[mi]},mi]}],h:[{h:[hi,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[hi,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[hi,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[hi,t,"auto","min","max","fit"]}],"font-size":[{text:["base",mi,li]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",di]}],"font-family":[{font:[wi]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",hi]}],"line-clamp":[{"line-clamp":["none",ci,di]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ii,hi]}],"list-image":[{"list-image":["none",hi]}],"list-style-type":[{list:["none","disc","decimal",hi]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","none","wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ii,li]}],"underline-offset":[{"underline-offset":["auto",ii,hi]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",hi]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",hi]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",vi]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",gi]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},bi]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:["solid","dashed","dotted","double","none","hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["","solid","dashed","dotted","double","none"]}],"outline-offset":[{"outline-offset":[ii,hi]}],"outline-w":[{outline:[ii,li]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:E()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[ii,li]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",mi,xi]}],"shadow-color":[{shadow:[wi]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",mi,hi]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[u]}],saturate:[{saturate:[b]}],sepia:[{sepia:[w]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[w]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",hi]}],duration:[{duration:T()}],ease:[{ease:["linear","in","out","in-out",hi]}],delay:[{delay:T()}],animate:[{animate:["none","spin","ping","pulse","bounce",hi]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[ui,hi]}],"translate-x":[{"translate-x":[C]}],"translate-y":[{"translate-y":[C]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",hi]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",hi]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",hi]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ii,li,di]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}));function Ni(...e){return Ei(Is(e))}const Di=window.wp.primitives;function Ti({fill:e="#fb4409",width:t="16.918",height:n="21.89"}){return(0,De.jsx)(Di.SVG,{xmlns:"http://www.w3.org/2000/svg",width:t,height:n,viewBox:"0 0 16.918 21.89",children:(0,De.jsxs)("g",{transform:"translate(0 -13.696)",children:[(0,De.jsx)("g",{transform:"translate(0 13.696)",children:(0,De.jsx)(Di.Path,{d:"M6.19-72.725A3.818,3.818,0,0,0,4.837-75.38a3.359,3.359,0,0,0-2.484-.876A1.885,1.885,0,0,0,.611-74.9a1.612,1.612,0,0,0-.092,1.06,6.23,6.23,0,0,0,.518,1.178,8.55,8.55,0,0,1,.4.832,4.387,4.387,0,0,1,.224.775,7.582,7.582,0,0,0,.984,2.5,4.542,4.542,0,0,0,1.52,1.613,1.022,1.022,0,0,0,1.363-.107q.563-.391.693-2.332A18.33,18.33,0,0,0,6.19-72.725Zm-.09,7.2q-1.034,0-1.242,2.7a18.162,18.162,0,0,0,.413,5.442q.622,2.739,1.677,2.878,2.3.313,2.729-2.422a10.636,10.636,0,0,0-.736-5.668Q7.773-65.521,6.1-65.521Zm2.05-1.52a.88.88,0,0,0,.941.487,2.49,2.49,0,0,0,1.12-.657q.583-.539,1.389-1.4.481-.627.9-1.091a5.462,5.462,0,0,1,.805-.754,4.378,4.378,0,0,0,2.051-2.931,2.483,2.483,0,0,0-.917-2.533,2.674,2.674,0,0,0-2.914-.028A5.715,5.715,0,0,0,9.343-73.55,12.509,12.509,0,0,0,7.9-69.78,3.422,3.422,0,0,0,8.149-67.041Z",transform:"translate(-0.467 76.356)",fill:e})}),(0,De.jsx)("g",{transform:"translate(7.301 20.061)",children:(0,De.jsx)(Di.Path,{d:"M34.564-32.511a2.816,2.816,0,0,0-.269,1.24,1.461,1.461,0,0,0,.269.913c.535.852.818,1.139,1.1,1.59a15.006,15.006,0,0,0,3.8,4.125q2.223,1.635,3.58.774a1.555,1.555,0,0,0,.865-1.448,3.235,3.235,0,0,0-.619-1.622A17.131,17.131,0,0,0,41.85-28.67l-.332-.386a20.805,20.805,0,0,0-2.5-2.265,10.6,10.6,0,0,0-2.8-1.656Q34.936-33.447,34.564-32.511Z",transform:"translate(-34.295 33.134)",fill:e})})]})})}function Ai({invisible:e=!1}){return(0,De.jsx)("div",{className:"flex items-center",children:(0,De.jsxs)(Se,{to:"dashboard",className:Ni("flex items-center gap-2 font-semibold text-sm hover:text-foreground",e&&"opacity-0 pointer-events-none"),children:[(0,De.jsx)(Ti,{}),(0,De.jsx)("span",{className:"sr-only",children:"EventKoi"})]})})}var Ri={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Mi=(t,n)=>{const r=(0,e.forwardRef)((({color:r="currentColor",size:o=24,strokeWidth:a=2,absoluteStrokeWidth:s,className:i="",children:l,...c},d)=>{return(0,e.createElement)("svg",{ref:d,...Ri,width:o,height:o,stroke:r,strokeWidth:s?24*Number(a)/Number(o):a,className:["lucide",`lucide-${u=t,u.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,i].join(" "),...c},[...n.map((([t,n])=>(0,e.createElement)(t,n))),...Array.isArray(l)?l:[l]]);var u}));return r.displayName=`${t}`,r},Oi=Mi("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);function Ii({tabs:e,isSub:t,asDiv:n}){const r=Y(),o=r.pathname?.split("/");let a=o?o[1]:null;o[2]&&t&&(a=o[2]),t&&(!o[2]||parseInt(o[2])>0||["add"].includes(o[2]))&&(a="");const s=n?"div":"nav";return(0,De.jsx)(s,{className:Ni("flex flex-col md:flex-row text-sm gap-3 md:gap-10 items-start md:items-center"),children:e.map(((e,t)=>{const n=a===e.href;return(0,De.jsxs)(Se,{to:e.href,className:Ni("flex items-center",n?"text-foreground":"text-muted-foreground",n&&"relative after:absolute after:bg-foreground after:w-full after:-bottom-[1px] md:after:-bottom-[14px] after:left-[0px] after:h-[2px]","transition-colors hover:text-foreground"),children:[e.title,e.submenu&&(0,De.jsx)(Oi,{className:"w-3.5 h-3.5 ml-1"})]},`tab-${t}`)}))})}const Pi={main:[{href:"dashboard",title:"Dashboard"},{href:"events",title:"Events"},{href:"calendars",title:"Calendars"},{href:"settings",title:"Settings"}],side:[]};function Li({root:e}){const t=Y();if(!Pi[e])return null;const n=t.pathname.split("events/");return n[1]&&(parseInt(n[1])>0||n[1].includes("add"))?null:(0,De.jsxs)("div",{className:"flex text-sm h-12 items-center border-b gap-6 px-8",children:[(0,De.jsx)(Ai,{invisible:!0}),(0,De.jsx)(Ii,{tabs:Pi[e],isSub:!0})]})}function Fi({className:e,children:t}){return(0,De.jsx)("main",{className:Ni("flex flex-1 flex-col w-full max-w-[1280px] mx-auto p-4 md:p-8",e),children:t})}function zi(){return(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)(Li,{root:"dashboard"}),(0,De.jsx)(Fi,{children:(0,De.jsx)(de,{})})]})}const Hi={h1:"text-2xl",h3:"text-xl",h4:"text-base"};function Vi({level:e=1,tagline:t=null,className:n,children:r}){const o=`h${e}`;return(0,De.jsxs)("div",{className:Ni("grid gap-1",n),children:[(0,De.jsx)(o,{className:Ni(Hi[o],"font-medium text-foreground tracking-tight scroll-m-20"),children:r}),t&&(0,De.jsx)("span",{className:"block text-sm text-muted-foreground font-normal",children:t})]})}function Bi({container:e=!1,className:t,children:n}){return(0,De.jsx)("div",{className:Ni("w-full flex flex-col rounded-lg border text-sm bg-card text-card-foreground shadow-sm gap-6",e&&"p-6",t),children:n})}function Wi(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function Ui(...e){return t=>{let n=!1;const r=e.map((e=>{const r=Wi(e,t);return n||"function"!=typeof r||(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():Wi(e[t],null)}}}}function $i(...t){return e.useCallback(Ui(...t),t)}function Gi(t){const n=qi(t),r=e.forwardRef(((t,r)=>{const{children:o,...a}=t,s=e.Children.toArray(o),i=s.find(Ki);if(i){const t=i.props.children,o=s.map((n=>n===i?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:n));return(0,De.jsx)(n,{...a,ref:r,children:e.isValidElement(t)?e.cloneElement(t,void 0,o):null})}return(0,De.jsx)(n,{...a,ref:r,children:o})}));return r.displayName=`${t}.Slot`,r}var Yi=Gi("Slot");function qi(t){const n=e.forwardRef(((t,n)=>{const{children:r,...o}=t,a=$i(e.isValidElement(r)?function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}(r):void 0,n);if(e.isValidElement(r)){const t=function(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}(o,r.props);return r.type!==e.Fragment&&(t.ref=a),e.cloneElement(r,t)}return e.Children.count(r)>1?e.Children.only(null):null}));return n.displayName=`${t}.SlotClone`,n}var Zi=Symbol("radix.slottable");function Ki(t){return e.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===Zi}const Qi=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,Ji=Is,Xi=(e,t)=>n=>{var r;if(null==(null==t?void 0:t.variants))return Ji(e,null==n?void 0:n.class,null==n?void 0:n.className);const{variants:o,defaultVariants:a}=t,s=Object.keys(o).map((e=>{const t=null==n?void 0:n[e],r=null==a?void 0:a[e];if(null===t)return null;const s=Qi(t)||Qi(r);return o[e][s]})),i=n&&Object.entries(n).reduce(((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e}),{}),l=null==t||null===(r=t.compoundVariants)||void 0===r?void 0:r.reduce(((e,t)=>{let{class:n,className:r,...o}=t;return Object.entries(o).every((e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...a,...i}[t]):{...a,...i}[t]===n}))?[...e,n,r]:e}),[]);return Ji(e,s,l,null==n?void 0:n.class,null==n?void 0:n.className)},el=Xi("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent text-foreground hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-input hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),tl=e.forwardRef((({className:e,variant:t,size:n,asChild:r=!1,...o},a)=>{const s=r?Yi:"button";return(0,De.jsx)(s,{className:Ni(el({variant:t,size:n,className:e})),ref:a,...o})}));function nl({className:e}){return(0,De.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor",stroke:"none",width:20,height:20,className:Ni("inline-block align-middle text-foreground",e),"aria-hidden":"true",children:(0,De.jsx)("path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z"})})}tl.displayName="Button";const rl=["Recurring events","Unlimited calendars","Priority support","30 day money-back guarantee"];function ol({className:e,headline:t,minimal:n=!1}){return(0,De.jsxs)(Bi,{container:!0,className:Ni("border-[#B8D7D4] gap-8",e),children:[(0,De.jsxs)("div",{className:"flex gap-4",children:[(0,De.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,De.jsxs)("div",{className:"flex items-center gap-[6px] mb-3",children:[(0,De.jsx)(nl,{}),(0,De.jsx)("div",{className:"!m-0 !p-0 text-foreground text-[20px] font-medium",children:t||"Access Pro features"})]}),(0,De.jsx)("div",{className:"text-sm leading-[1.6] text-muted-foreground mb-4",children:"Thanks for using EventKoi Lite. Get an exclusive 10% discount on all Pro plans when you upgrade today."}),(0,De.jsx)(tl,{asChild:!0,className:Ni("bg-[#3A6667] hover:bg-[#325c5c] min-w-[140px] text-white font-medium text-sm px-5 py-2 rounded-sm"),size:"sm",children:(0,De.jsx)("a",{href:"https://eventkoi.com/upgradeqf35m3ref/",target:"_blank",rel:"noopener noreferrer",children:"Claim discount"})})]}),(0,De.jsxs)("div",{className:"flex flex-col items-center min-w-[82px] select-none",children:[(0,De.jsx)("span",{className:"text-[60px] leading-[1] tracking-[-3px] block font-bold",style:{background:"linear-gradient(103deg, #2B4244 29.71%, #8CBCB9 57.08%, #4E8888 80.54%)",WebkitBackgroundClip:"text",backgroundClip:"text",WebkitTextFillColor:"transparent"},children:"10%"}),(0,De.jsx)("span",{className:"font-bold uppercase tracking-wide text-[16px] text-[#3A6667] mt-[4px]",children:"Discount"})]})]}),!n&&(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)("hr",{className:"border-t border-[#E1E7E8]"}),(0,De.jsx)("ul",{className:"space-y-4 pl-0 mb-0",children:rl.map((e=>(0,De.jsxs)("li",{className:"flex items-center gap-[6px] text-[15px] text-[#263130] font-normal",children:[(0,De.jsx)(nl,{className:"w-4 h-4"}),e]},e)))})]})]})}function al({href:e,children:t,disabled:n=!1}){return(0,De.jsx)("a",{href:n?void 0:e,target:n?void 0:"_blank","aria-disabled":n,className:`\n        flex border rounded-xl items-center text-base px-6 py-4 h-[70px]\n        ${n?"bg-muted text-muted-foreground border-muted opacity-50 cursor-not-allowed pointer-events-none":"bg-transparent text-card-foreground hover:bg-accent border-input hover:border-foreground/40"}\n      `,children:t})}const sl=Mi("Rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]),il=Mi("BookOpen",[["path",{d:"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z",key:"vv98re"}],["path",{d:"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z",key:"1cyq3y"}]]),ll=Mi("Inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]),cl=Mi("CircleUser",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]]);function dl(){return(0,De.jsxs)(Bi,{container:!0,children:[(0,De.jsx)(Vi,{level:3,children:"Quick links"}),(0,De.jsxs)(al,{href:"https://eventkoi.com/docs/knowledge-base/quick-start-guide/",children:[(0,De.jsx)(sl,{className:"w-5 h-5 mr-4"}),(0,De.jsx)("span",{children:"View Quick Start Guide"})]}),(0,De.jsxs)(al,{href:"https://eventkoi.com/docs",children:[(0,De.jsx)(il,{className:"w-5 h-5 mr-4"}),(0,De.jsx)("span",{children:"Read documentation"})]}),(0,De.jsxs)(al,{href:"https://eventkoi.com/docs/request-support/",children:[(0,De.jsx)(ll,{className:"w-5 h-5 mr-4"}),(0,De.jsx)("span",{children:"Request support"})]}),(0,De.jsxs)(al,{href:"https://pro.eventkoi.com/account",children:[(0,De.jsx)(cl,{className:"w-5 h-5 mr-4"}),(0,De.jsx)("span",{children:"Go to my account"})]})]})}const ul=Xi("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function fl({className:e,variant:t,...n}){return(0,De.jsx)("div",{className:Ni(ul({variant:t}),e),...n})}const hl=Mi("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),ml=Mi("CircleDotDashed",[["path",{d:"M10.1 2.18a9.93 9.93 0 0 1 3.8 0",key:"1qdqn0"}],["path",{d:"M17.6 3.71a9.95 9.95 0 0 1 2.69 2.7",key:"1bq7p6"}],["path",{d:"M21.82 10.1a9.93 9.93 0 0 1 0 3.8",key:"1rlaqf"}],["path",{d:"M20.29 17.6a9.95 9.95 0 0 1-2.7 2.69",key:"1xk03u"}],["path",{d:"M13.9 21.82a9.94 9.94 0 0 1-3.8 0",key:"l7re25"}],["path",{d:"M6.4 20.29a9.95 9.95 0 0 1-2.69-2.7",key:"1v18p6"}],["path",{d:"M2.18 13.9a9.93 9.93 0 0 1 0-3.8",key:"xdo6bj"}],["path",{d:"M3.71 6.4a9.95 9.95 0 0 1 2.7-2.69",key:"1jjmaz"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]),pl=Mi("Clock3",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16.5 12",key:"1aq6pp"}]]),gl=Mi("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]),vl=Mi("Repeat",[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]]),yl=Mi("Ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]]),bl={live:"Live",completed:"Completed",recurring:"Recurring",tbc:"Date not set",upcoming:"Upcoming",publish:"Upcoming",draft:"Draft",trash:"Trash"};function xl({status:e}){return(0,De.jsxs)(fl,{className:"absolute top-2 right-2 opacity-90 flex gap-1 font-normal text-[12px] py-1 px-3 pointer-events-none",children:["completed"==e&&(0,De.jsx)(hl,{className:"w-4 h-4 text-[#71ffca]"}),"draft"==e&&(0,De.jsx)(ml,{className:"w-4 h-4 text-white"}),"tbc"==e&&(0,De.jsx)(ml,{className:"w-4 h-4 text-white"}),"upcoming"==e&&(0,De.jsx)(pl,{className:"w-4 h-4 text-[#9addff]"}),"live"==e&&(0,De.jsx)(gl,{className:"w-4 h-4 text-[#ff8a88]"}),"publish"==e&&(0,De.jsx)(pl,{className:"w-4 h-4 text-[#48BEFA]"}),"recurring"==e&&(0,De.jsx)(vl,{className:"w-4 h-4 text-white"}),"trash"==e&&(0,De.jsx)(yl,{className:"w-4 h-4 text-primary/40"}),bl[e]]})}var wl=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce(((t,n)=>{const r=Gi(`Primitive.${n}`),o=e.forwardRef(((e,t)=>{const{asChild:o,...a}=e,s=o?r:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,De.jsx)(s,{...a,ref:t})}));return o.displayName=`Primitive.${n}`,{...t,[n]:o}}),{});function kl(e,t){e&&pe.flushSync((()=>e.dispatchEvent(t)))}var Sl=e.forwardRef(((e,t)=>{const{ratio:n=1,style:r,...o}=e;return(0,De.jsx)("div",{style:{position:"relative",width:"100%",paddingBottom:100/n+"%"},"data-radix-aspect-ratio-wrapper":"",children:(0,De.jsx)(wl.div,{...o,ref:t,style:{...r,position:"absolute",top:0,right:0,bottom:0,left:0}})})}));Sl.displayName="AspectRatio";const Cl=Sl;function _l({className:e,...t}){return(0,De.jsx)("div",{className:Ni("animate-pulse rounded-md bg-muted",e),...t})}function jl(){return(0,De.jsxs)("div",{className:"flex flex-col space-y-3",children:[(0,De.jsx)(Cl,{ratio:1.5,children:(0,De.jsx)(_l,{className:"h-full w-full rounded-xl"})}),(0,De.jsxs)("div",{className:"space-y-2",children:[(0,De.jsx)(_l,{className:"h-3 w-[80%]"}),(0,De.jsx)(_l,{className:"h-3 w-[60%]"}),(0,De.jsx)(_l,{className:"h-3 w-[40%]"})]})]})}const El=Mi("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]),Nl=Mi("MapPin",[["path",{d:"M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z",key:"2oe9fu"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]),Dl=Mi("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]),Tl=Mi("CirclePlus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]),Al=Mi("List",[["line",{x1:"8",x2:"21",y1:"6",y2:"6",key:"7ey8pc"}],["line",{x1:"8",x2:"21",y1:"12",y2:"12",key:"rjfblc"}],["line",{x1:"8",x2:"21",y1:"18",y2:"18",key:"c3b1m8"}],["line",{x1:"3",x2:"3.01",y1:"6",y2:"6",key:"1g7gq3"}],["line",{x1:"3",x2:"3.01",y1:"12",y2:"12",key:"1pjlvk"}],["line",{x1:"3",x2:"3.01",y1:"18",y2:"18",key:"28t2mc"}]]),Rl=Mi("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);function Ml(){const[t,n]=(0,e.useState)(null);(0,e.useEffect)((()=>{Ne()({path:`${eventkoi_params.api}/events?number=3`,method:"get"}).then(n).catch((()=>{}))}),[]);const r=e=>{if(!e.location_line)return null;const t="virtual"===e.type||"online"===e.type||e.location_line.startsWith("http://")||e.location_line.startsWith("https://"),n=t?El:Nl;return(0,De.jsxs)("span",{className:Ni("flex items-center gap-1 truncate text-muted-foreground",t&&"underline underline-offset-4"),title:e.location_line,onClick:n=>{t&&(n.preventDefault(),n.stopPropagation(),window.open(e.location_line,"_blank"))},children:[(0,De.jsx)(n,{className:"w-4 h-4 shrink-0"}),(0,De.jsx)("span",{className:"truncate",children:e.location_line})]})},o=1===t?.length?2:2===t?.length?1:0;return console.log(t),(0,De.jsxs)(Bi,{container:!0,children:[(0,De.jsx)(Vi,{level:3,children:"Events"}),(0,De.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6 sm:gap-8 lg:gap-10",children:[!t&&Array.from({length:3}).map(((e,t)=>(0,De.jsx)(jl,{},t))),t&&t.map((e=>(0,De.jsxs)(Se,{className:"flex flex-col space-y-3",to:`/events/${e.id}`,children:[(0,De.jsx)(Cl,{ratio:1.5,children:e.image?(0,De.jsxs)("div",{className:"h-full w-full flex items-center justify-center relative",children:[(0,De.jsx)(xl,{status:e.status}),(0,De.jsx)("img",{src:e.image,className:"h-full w-full rounded-xl object-cover",alt:e.title})]}):(0,De.jsxs)("div",{className:"h-full w-full rounded-xl border border-input flex items-center justify-center relative",children:[(0,De.jsx)(xl,{status:e.status}),(0,De.jsx)(Dl,{className:"w-6 h-6 text-muted-foreground/40"})]})}),(0,De.jsxs)("div",{className:"space-y-[2px]",children:[(0,De.jsx)("span",{className:"block text-base font-medium text-foreground truncate",title:e.title,children:e.title}),"tbc"!==e.status&&(0,De.jsx)("span",{className:"block text-muted-foreground",children:ws(e,e.timezone)}),r(e)]})]},`event-${e.id}`))),t&&0===t.length&&(0,De.jsx)("div",{className:"col-span-3 flex items-center justify-center text-muted-foreground/80 text-base",children:"There are no upcoming events."}),Array.from({length:o}).map(((e,t)=>(0,De.jsx)("div",{},`filler-${t}`))),(0,De.jsxs)("div",{className:"flex flex-col gap-4 justify-between h-full",children:[(0,De.jsx)(tl,{variant:"default",className:"flex flex-col grow gap-1 px-4 justify-center h-auto border rounded-xl items-center border-foreground bg-foreground text-white hover:text-card-foreground hover:bg-accent hover:border-foreground/40",asChild:!0,children:(0,De.jsxs)(Se,{to:"/events/add/main",children:[(0,De.jsx)(Tl,{className:"w-5 h-5"}),"Add new event"]})}),(0,De.jsx)(tl,{className:"flex flex-col grow gap-1 px-4 justify-center h-auto border rounded-xl items-center bg-transparent text-card-foreground hover:bg-accent border-foreground/40",asChild:!0,children:(0,De.jsxs)(Se,{to:"/events",children:[(0,De.jsx)(Al,{className:"w-5 h-5"}),"View all events"]})}),(0,De.jsx)(tl,{className:"flex flex-col grow gap-1 px-4 justify-center h-auto border rounded-xl items-center bg-transparent text-card-foreground hover:bg-accent border-foreground/40",asChild:!0,children:(0,De.jsxs)("a",{href:eventkoi_params?.default_calendar,target:"_blank",rel:"noopener noreferrer",children:[(0,De.jsx)(Rl,{className:"w-5 h-5"}),"View default calendar"]})})]})]})]})}function Ol(){return(0,De.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,De.jsx)("div",{className:"mx-auto flex w-full gap-2 justify-between",children:(0,De.jsx)(Vi,{children:"Dashboard"})}),(0,De.jsx)("div",{className:"grid",children:(0,De.jsx)(Ml,{})}),(0,De.jsxs)("div",{className:"grid gap-8 md:grid-cols-2",children:[(0,De.jsx)(dl,{}),(0,De.jsx)(ol,{})]})]})}function Il(){const t=K();return(0,e.useEffect)((()=>{t("/dashboard")})),null}function Pl(){return q("/events/:id/*")||q("/events/add")?(0,De.jsx)(de,{}):(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)(Li,{root:"events"}),(0,De.jsx)(Fi,{children:(0,De.jsx)(de,{})})]})}const Ll=(0,e.createContext)(null);function Fl(){const t=(0,e.useContext)(Ll);if(!t)throw new Error("useEventEditContext must be used within an EventEditContext.Provider");return t}const zl=Mi("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),Hl=Mi("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);function Vl(){const{event:e}=Fl(),{timestamp:t}=X(),n=Y().pathname.includes("/instances/edit/"),r=n?"Edit event instance":e?.id>0?"Edit event":"Add event";return(0,De.jsxs)("div",{className:"flex flex-col gap-[1px] flex-shrink-0 min-w-0 overflow-hidden",children:[(0,De.jsx)("div",{className:"flex items-center gap-1 text-muted-foreground text-sm font-normal",children:n?(0,De.jsxs)("div",{className:"hidden md:flex items-center gap-2 pl-6",children:[(0,De.jsx)(Se,{to:"/events",className:"text-foreground hover:underline flex items-center gap-1",children:"Back to all events"}),(0,De.jsx)(zl,{className:"w-4 h-4"}),(0,De.jsx)(Se,{to:`/events/${e?.id}/instances`,className:"text-foreground hover:underline",children:"Recurring event instances table"}),(0,De.jsx)(zl,{className:"w-4 h-4"}),(0,De.jsx)("span",{className:"text-muted-foreground",children:"Edit event instance"})]}):(0,De.jsx)(tl,{variant:"link",className:"p-0 h-auto text-muted-foreground font-normal",asChild:!0,children:(0,De.jsxs)(Se,{to:"/events",children:[(0,De.jsx)(Hl,{className:"mr-2 h-4 w-4"}),"Back to all events"]})})}),n&&(0,De.jsx)("div",{className:"flex sm:hidden items-center text-sm text-muted-foreground font-normal pl-0",children:(0,De.jsxs)(Se,{to:`/events/${e?.id}/instances`,className:"hover:underline flex items-center gap-1",children:[(0,De.jsx)(Hl,{className:"h-4 w-4"}),"Back"]})}),(0,De.jsx)("div",{children:(0,De.jsx)(Vi,{level:3,className:n?"mt-[2px] pl-2 md:pl-6 truncate":"mt-[2px] pl-6 truncate",children:r})})]})}function Bl(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function Wl(t,n=[]){let r=[];const o=()=>{const n=r.map((t=>e.createContext(t)));return function(r){const o=r?.[t]||n;return e.useMemo((()=>({[`__scope${t}`]:{...r,[t]:o}})),[r,o])}};return o.scopeName=t,[function(n,o){const a=e.createContext(o),s=r.length;r=[...r,o];const i=n=>{const{scope:r,children:o,...i}=n,l=r?.[t]?.[s]||a,c=e.useMemo((()=>i),Object.values(i));return(0,De.jsx)(l.Provider,{value:c,children:o})};return i.displayName=n+"Provider",[i,function(r,i){const l=i?.[t]?.[s]||a,c=e.useContext(l);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${r}\` must be used within \`${n}\``)}]},Ul(o,...n)]}function Ul(...t){const n=t[0];if(1===t.length)return n;const r=()=>{const r=t.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(t){const o=r.reduce(((e,{useScope:n,scopeName:r})=>({...e,...n(t)[`__scope${r}`]})),{});return e.useMemo((()=>({[`__scope${n.scopeName}`]:o})),[o])}};return r.scopeName=n.scopeName,r}var $l=globalThis?.document?e.useLayoutEffect:()=>{},Gl=n[" useInsertionEffect ".trim().toString()]||$l;function Yl({prop:t,defaultProp:n,onChange:r=()=>{},caller:o}){const[a,s,i]=function({defaultProp:t,onChange:n}){const[r,o]=e.useState(t),a=e.useRef(r),s=e.useRef(n);return Gl((()=>{s.current=n}),[n]),e.useEffect((()=>{a.current!==r&&(s.current?.(r),a.current=r)}),[r,a]),[r,o,s]}({defaultProp:n,onChange:r}),l=void 0!==t,c=l?t:a;{const n=e.useRef(void 0!==t);e.useEffect((()=>{const e=n.current;if(e!==l){const t=e?"controlled":"uncontrolled",n=l?"controlled":"uncontrolled";console.warn(`${o} is changing from ${t} to ${n}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}n.current=l}),[l,o])}const d=e.useCallback((e=>{if(l){const n=function(e){return"function"==typeof e}(e)?e(t):e;n!==t&&i.current?.(n)}else s(e)}),[l,t,s,i]);return[c,d]}function ql(t){const n=t+"CollectionProvider",[r,o]=Wl(n),[a,s]=r(n,{collectionRef:{current:null},itemMap:new Map}),i=t=>{const{scope:n,children:r}=t,o=e.useRef(null),s=e.useRef(new Map).current;return(0,De.jsx)(a,{scope:n,itemMap:s,collectionRef:o,children:r})};i.displayName=n;const l=t+"CollectionSlot",c=Gi(l),d=e.forwardRef(((e,t)=>{const{scope:n,children:r}=e,o=$i(t,s(l,n).collectionRef);return(0,De.jsx)(c,{ref:o,children:r})}));d.displayName=l;const u=t+"CollectionItemSlot",f="data-radix-collection-item",h=Gi(u),m=e.forwardRef(((t,n)=>{const{scope:r,children:o,...a}=t,i=e.useRef(null),l=$i(n,i),c=s(u,r);return e.useEffect((()=>(c.itemMap.set(i,{ref:i,...a}),()=>{c.itemMap.delete(i)}))),(0,De.jsx)(h,{[f]:"",ref:l,children:o})}));return m.displayName=u,[{Provider:i,Slot:d,ItemSlot:m},function(n){const r=s(t+"CollectionConsumer",n),o=e.useCallback((()=>{const e=r.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${f}]`)),n=Array.from(r.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)));return n}),[r.collectionRef,r.itemMap]);return o},o]}Symbol("RADIX:SYNC_STATE");Map;var Zl=e.createContext(void 0);function Kl(t){const n=e.useContext(Zl);return t||n||"ltr"}function Ql(t){const n=e.useRef(t);return e.useEffect((()=>{n.current=t})),e.useMemo((()=>(...e)=>n.current?.(...e)),[])}var Jl,Xl="dismissableLayer.update",ec=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),tc=e.forwardRef(((t,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:i,onDismiss:l,...c}=t,d=e.useContext(ec),[u,f]=e.useState(null),h=u?.ownerDocument??globalThis?.document,[,m]=e.useState({}),p=$i(n,(e=>f(e))),g=Array.from(d.layers),[v]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(v),b=u?g.indexOf(u):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,w=b>=y,k=function(t,n=globalThis?.document){const r=Ql(t),o=e.useRef(!1),a=e.useRef((()=>{}));return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){let t=function(){oc("dismissableLayer.pointerDownOutside",r,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(n.removeEventListener("click",a.current),a.current=t,n.addEventListener("click",a.current,{once:!0})):t()}else n.removeEventListener("click",a.current);o.current=!1},t=window.setTimeout((()=>{n.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(t),n.removeEventListener("pointerdown",e),n.removeEventListener("click",a.current)}}),[n,r]),{onPointerDownCapture:()=>o.current=!0}}((e=>{const t=e.target,n=[...d.branches].some((e=>e.contains(t)));w&&!n&&(a?.(e),i?.(e),e.defaultPrevented||l?.())}),h),S=function(t,n=globalThis?.document){const r=Ql(t),o=e.useRef(!1);return e.useEffect((()=>{const e=e=>{e.target&&!o.current&&oc("dismissableLayer.focusOutside",r,{originalEvent:e},{discrete:!1})};return n.addEventListener("focusin",e),()=>n.removeEventListener("focusin",e)}),[n,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}((e=>{const t=e.target;[...d.branches].some((e=>e.contains(t)))||(s?.(e),i?.(e),e.defaultPrevented||l?.())}),h);return function(t,n=globalThis?.document){const r=Ql(t);e.useEffect((()=>{const e=e=>{"Escape"===e.key&&r(e)};return n.addEventListener("keydown",e,{capture:!0}),()=>n.removeEventListener("keydown",e,{capture:!0})}),[r,n])}((e=>{b===d.layers.size-1&&(o?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))}),h),e.useEffect((()=>{if(u)return r&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(Jl=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(u)),d.layers.add(u),rc(),()=>{r&&1===d.layersWithOutsidePointerEventsDisabled.size&&(h.body.style.pointerEvents=Jl)}}),[u,h,r,d]),e.useEffect((()=>()=>{u&&(d.layers.delete(u),d.layersWithOutsidePointerEventsDisabled.delete(u),rc())}),[u,d]),e.useEffect((()=>{const e=()=>m({});return document.addEventListener(Xl,e),()=>document.removeEventListener(Xl,e)}),[]),(0,De.jsx)(wl.div,{...c,ref:p,style:{pointerEvents:x?w?"auto":"none":void 0,...t.style},onFocusCapture:Bl(t.onFocusCapture,S.onFocusCapture),onBlurCapture:Bl(t.onBlurCapture,S.onBlurCapture),onPointerDownCapture:Bl(t.onPointerDownCapture,k.onPointerDownCapture)})}));tc.displayName="DismissableLayer";var nc=e.forwardRef(((t,n)=>{const r=e.useContext(ec),o=e.useRef(null),a=$i(n,o);return e.useEffect((()=>{const e=o.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}}),[r.branches]),(0,De.jsx)(wl.div,{...t,ref:a})}));function rc(){const e=new CustomEvent(Xl);document.dispatchEvent(e)}function oc(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?kl(o,a):o.dispatchEvent(a)}nc.displayName="DismissableLayerBranch";var ac=0;function sc(){e.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ic()),document.body.insertAdjacentElement("beforeend",e[1]??ic()),ac++,()=>{1===ac&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),ac--}}),[])}function ic(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var lc="focusScope.autoFocusOnMount",cc="focusScope.autoFocusOnUnmount",dc={bubbles:!1,cancelable:!0},uc=e.forwardRef(((t,n)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:a,onUnmountAutoFocus:s,...i}=t,[l,c]=e.useState(null),d=Ql(a),u=Ql(s),f=e.useRef(null),h=$i(n,(e=>c(e))),m=e.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;e.useEffect((()=>{if(o){let e=function(e){if(m.paused||!l)return;const t=e.target;l.contains(t)?f.current=t:pc(f.current,{select:!0})},t=function(e){if(m.paused||!l)return;const t=e.relatedTarget;null!==t&&(l.contains(t)||pc(f.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&pc(l)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[o,l,m.paused]),e.useEffect((()=>{if(l){gc.add(m);const e=document.activeElement;if(!l.contains(e)){const t=new CustomEvent(lc,dc);l.addEventListener(lc,d),l.dispatchEvent(t),t.defaultPrevented||(function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(pc(r,{select:t}),document.activeElement!==n)return}(fc(l).filter((e=>"A"!==e.tagName)),{select:!0}),document.activeElement===e&&pc(l))}return()=>{l.removeEventListener(lc,d),setTimeout((()=>{const t=new CustomEvent(cc,dc);l.addEventListener(cc,u),l.dispatchEvent(t),t.defaultPrevented||pc(e??document.body,{select:!0}),l.removeEventListener(cc,u),gc.remove(m)}),0)}}}),[l,d,u,m]);const p=e.useCallback((e=>{if(!r&&!o)return;if(m.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){const t=e.currentTarget,[o,a]=function(e){const t=fc(e);return[hc(t,e),hc(t.reverse(),e)]}(t);o&&a?e.shiftKey||n!==a?e.shiftKey&&n===o&&(e.preventDefault(),r&&pc(a,{select:!0})):(e.preventDefault(),r&&pc(o,{select:!0})):n===t&&e.preventDefault()}}),[r,o,m.paused]);return(0,De.jsx)(wl.div,{tabIndex:-1,...i,ref:h,onKeyDown:p})}));function fc(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function hc(e,t){for(const n of e)if(!mc(n,{upTo:t}))return n}function mc(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function pc(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}uc.displayName="FocusScope";var gc=function(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=vc(e,t),e.unshift(t)},remove(t){e=vc(e,t),e[0]?.resume()}}}();function vc(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var yc=n[" useId ".trim().toString()]||(()=>{}),bc=0;function xc(t){const[n,r]=e.useState(yc());return $l((()=>{t||r((e=>e??String(bc++)))}),[t]),t||(n?`radix-${n}`:"")}const wc=["top","right","bottom","left"],kc=Math.min,Sc=Math.max,Cc=Math.round,_c=Math.floor,jc=e=>({x:e,y:e}),Ec={left:"right",right:"left",bottom:"top",top:"bottom"},Nc={start:"end",end:"start"};function Dc(e,t,n){return Sc(e,kc(t,n))}function Tc(e,t){return"function"==typeof e?e(t):e}function Ac(e){return e.split("-")[0]}function Rc(e){return e.split("-")[1]}function Mc(e){return"x"===e?"y":"x"}function Oc(e){return"y"===e?"height":"width"}function Ic(e){return["top","bottom"].includes(Ac(e))?"y":"x"}function Pc(e){return Mc(Ic(e))}function Lc(e){return e.replace(/start|end/g,(e=>Nc[e]))}function Fc(e){return e.replace(/left|right|bottom|top/g,(e=>Ec[e]))}function zc(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Hc(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Vc(e,t,n){let{reference:r,floating:o}=e;const a=Ic(t),s=Pc(t),i=Oc(s),l=Ac(t),c="y"===a,d=r.x+r.width/2-o.width/2,u=r.y+r.height/2-o.height/2,f=r[i]/2-o[i]/2;let h;switch(l){case"top":h={x:d,y:r.y-o.height};break;case"bottom":h={x:d,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:u};break;case"left":h={x:r.x-o.width,y:u};break;default:h={x:r.x,y:r.y}}switch(Rc(t)){case"start":h[s]-=f*(n&&c?-1:1);break;case"end":h[s]+=f*(n&&c?-1:1)}return h}async function Bc(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:a,rects:s,elements:i,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:f=!1,padding:h=0}=Tc(t,e),m=zc(h),p=i[f?"floating"===u?"reference":"floating":u],g=Hc(await a.getClippingRect({element:null==(n=await(null==a.isElement?void 0:a.isElement(p)))||n?p:p.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(i.floating)),boundary:c,rootBoundary:d,strategy:l})),v="floating"===u?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,y=await(null==a.getOffsetParent?void 0:a.getOffsetParent(i.floating)),b=await(null==a.isElement?void 0:a.isElement(y))&&await(null==a.getScale?void 0:a.getScale(y))||{x:1,y:1},x=Hc(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:v,offsetParent:y,strategy:l}):v);return{top:(g.top-x.top+m.top)/b.y,bottom:(x.bottom-g.bottom+m.bottom)/b.y,left:(g.left-x.left+m.left)/b.x,right:(x.right-g.right+m.right)/b.x}}function Wc(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Uc(e){return wc.some((t=>e[t]>=0))}function $c(){return"undefined"!=typeof window}function Gc(e){return Zc(e)?(e.nodeName||"").toLowerCase():"#document"}function Yc(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function qc(e){var t;return null==(t=(Zc(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Zc(e){return!!$c()&&(e instanceof Node||e instanceof Yc(e).Node)}function Kc(e){return!!$c()&&(e instanceof Element||e instanceof Yc(e).Element)}function Qc(e){return!!$c()&&(e instanceof HTMLElement||e instanceof Yc(e).HTMLElement)}function Jc(e){return!(!$c()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Yc(e).ShadowRoot)}function Xc(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ad(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function ed(e){return["table","td","th"].includes(Gc(e))}function td(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function nd(e){const t=rd(),n=Kc(e)?ad(e):e;return["transform","translate","scale","rotate","perspective"].some((e=>!!n[e]&&"none"!==n[e]))||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","translate","scale","rotate","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function rd(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function od(e){return["html","body","#document"].includes(Gc(e))}function ad(e){return Yc(e).getComputedStyle(e)}function sd(e){return Kc(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function id(e){if("html"===Gc(e))return e;const t=e.assignedSlot||e.parentNode||Jc(e)&&e.host||qc(e);return Jc(t)?t.host:t}function ld(e){const t=id(e);return od(t)?e.ownerDocument?e.ownerDocument.body:e.body:Qc(t)&&Xc(t)?t:ld(t)}function cd(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=ld(e),a=o===(null==(r=e.ownerDocument)?void 0:r.body),s=Yc(o);if(a){const e=dd(s);return t.concat(s,s.visualViewport||[],Xc(o)?o:[],e&&n?cd(e):[])}return t.concat(o,cd(o,[],n))}function dd(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ud(e){const t=ad(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Qc(e),a=o?e.offsetWidth:n,s=o?e.offsetHeight:r,i=Cc(n)!==a||Cc(r)!==s;return i&&(n=a,r=s),{width:n,height:r,$:i}}function fd(e){return Kc(e)?e:e.contextElement}function hd(e){const t=fd(e);if(!Qc(t))return jc(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=ud(t);let s=(a?Cc(n.width):n.width)/r,i=(a?Cc(n.height):n.height)/o;return s&&Number.isFinite(s)||(s=1),i&&Number.isFinite(i)||(i=1),{x:s,y:i}}const md=jc(0);function pd(e){const t=Yc(e);return rd()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:md}function gd(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),a=fd(e);let s=jc(1);t&&(r?Kc(r)&&(s=hd(r)):s=hd(e));const i=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Yc(e))&&t}(a,n,r)?pd(a):jc(0);let l=(o.left+i.x)/s.x,c=(o.top+i.y)/s.y,d=o.width/s.x,u=o.height/s.y;if(a){const e=Yc(a),t=r&&Kc(r)?Yc(r):r;let n=e,o=dd(n);for(;o&&r&&t!==n;){const e=hd(o),t=o.getBoundingClientRect(),r=ad(o),a=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,s=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,d*=e.x,u*=e.y,l+=a,c+=s,n=Yc(o),o=dd(n)}}return Hc({width:d,height:u,x:l,y:c})}function vd(e,t){const n=sd(e).scrollLeft;return t?t.left+n:gd(qc(e)).left+n}function yd(e,t,n){void 0===n&&(n=!1);const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:vd(e,r)),y:r.top+t.scrollTop}}function bd(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Yc(e),r=qc(e),o=n.visualViewport;let a=r.clientWidth,s=r.clientHeight,i=0,l=0;if(o){a=o.width,s=o.height;const e=rd();(!e||e&&"fixed"===t)&&(i=o.offsetLeft,l=o.offsetTop)}return{width:a,height:s,x:i,y:l}}(e,n);else if("document"===t)r=function(e){const t=qc(e),n=sd(e),r=e.ownerDocument.body,o=Sc(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Sc(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+vd(e);const i=-n.scrollTop;return"rtl"===ad(r).direction&&(s+=Sc(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:s,y:i}}(qc(e));else if(Kc(t))r=function(e,t){const n=gd(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=Qc(e)?hd(e):jc(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:o*a.x,y:r*a.y}}(t,n);else{const n=pd(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Hc(r)}function xd(e,t){const n=id(e);return!(n===t||!Kc(n)||od(n))&&("fixed"===ad(n).position||xd(n,t))}function wd(e,t,n){const r=Qc(t),o=qc(t),a="fixed"===n,s=gd(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const l=jc(0);function c(){l.x=vd(o)}if(r||!r&&!a)if(("body"!==Gc(t)||Xc(o))&&(i=sd(t)),r){const e=gd(t,!0,a,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&c();a&&!r&&o&&c();const d=!o||r||a?jc(0):yd(o,i);return{x:s.left+i.scrollLeft-l.x-d.x,y:s.top+i.scrollTop-l.y-d.y,width:s.width,height:s.height}}function kd(e){return"static"===ad(e).position}function Sd(e,t){if(!Qc(e)||"fixed"===ad(e).position)return null;if(t)return t(e);let n=e.offsetParent;return qc(e)===n&&(n=n.ownerDocument.body),n}function Cd(e,t){const n=Yc(e);if(td(e))return n;if(!Qc(e)){let t=id(e);for(;t&&!od(t);){if(Kc(t)&&!kd(t))return t;t=id(t)}return n}let r=Sd(e,t);for(;r&&ed(r)&&kd(r);)r=Sd(r,t);return r&&od(r)&&kd(r)&&!nd(r)?n:r||function(e){let t=id(e);for(;Qc(t)&&!od(t);){if(nd(t))return t;if(td(t))return null;t=id(t)}return null}(e)||n}const _d={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a="fixed"===o,s=qc(r),i=!!t&&td(t.floating);if(r===s||i&&a)return n;let l={scrollLeft:0,scrollTop:0},c=jc(1);const d=jc(0),u=Qc(r);if((u||!u&&!a)&&(("body"!==Gc(r)||Xc(s))&&(l=sd(r)),Qc(r))){const e=gd(r);c=hd(r),d.x=e.x+r.clientLeft,d.y=e.y+r.clientTop}const f=!s||u||a?jc(0):yd(s,l,!0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+f.x,y:n.y*c.y-l.scrollTop*c.y+d.y+f.y}},getDocumentElement:qc,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[..."clippingAncestors"===n?td(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=cd(e,[],!1).filter((e=>Kc(e)&&"body"!==Gc(e))),o=null;const a="fixed"===ad(e).position;let s=a?id(e):e;for(;Kc(s)&&!od(s);){const t=ad(s),n=nd(s);n||"fixed"!==t.position||(o=null),(a?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||Xc(s)&&!n&&xd(e,s))?r=r.filter((e=>e!==s)):o=t,s=id(s)}return t.set(e,r),r}(t,this._c):[].concat(n),r],s=a[0],i=a.reduce(((e,n)=>{const r=bd(t,n,o);return e.top=Sc(r.top,e.top),e.right=kc(r.right,e.right),e.bottom=kc(r.bottom,e.bottom),e.left=Sc(r.left,e.left),e}),bd(t,s,o));return{width:i.right-i.left,height:i.bottom-i.top,x:i.left,y:i.top}},getOffsetParent:Cd,getElementRects:async function(e){const t=this.getOffsetParent||Cd,n=this.getDimensions,r=await n(e.floating);return{reference:wd(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=ud(e);return{width:t,height:n}},getScale:hd,isElement:Kc,isRTL:function(e){return"rtl"===ad(e).direction}};function jd(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}const Ed=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:s,middlewareData:i}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,a=await(null==r.isRTL?void 0:r.isRTL(o.floating)),s=Ac(n),i=Rc(n),l="y"===Ic(n),c=["left","top"].includes(s)?-1:1,d=a&&l?-1:1,u=Tc(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:m}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return i&&"number"==typeof m&&(h="end"===i?-1*m:m),l?{x:h*d,y:f*c}:{x:f*c,y:h*d}}(t,e);return s===(null==(n=i.offset)?void 0:n.placement)&&null!=(r=i.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:s}}}}},Nd=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:i={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Tc(e,t),c={x:n,y:r},d=await Bc(t,l),u=Ic(Ac(o)),f=Mc(u);let h=c[f],m=c[u];if(a){const e="y"===f?"bottom":"right";h=Dc(h+d["y"===f?"top":"left"],h,h-d[e])}if(s){const e="y"===u?"bottom":"right";m=Dc(m+d["y"===u?"top":"left"],m,m-d[e])}const p=i.fn({...t,[f]:h,[u]:m});return{...p,data:{x:p.x-n,y:p.y-r,enabled:{[f]:a,[u]:s}}}}}},Dd=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:s,initialPlacement:i,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:p=!0,...g}=Tc(e,t);if(null!=(n=a.arrow)&&n.alignmentOffset)return{};const v=Ac(o),y=Ic(i),b=Ac(i)===i,x=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=f||(b||!p?[Fc(i)]:function(e){const t=Fc(e);return[Lc(e),t,Lc(t)]}(i)),k="none"!==m;!f&&k&&w.push(...function(e,t,n,r){const o=Rc(e);let a=function(e,t,n){const r=["left","right"],o=["right","left"],a=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?a:s;default:return[]}}(Ac(e),"start"===n,r);return o&&(a=a.map((e=>e+"-"+o)),t&&(a=a.concat(a.map(Lc)))),a}(i,p,m,x));const S=[i,...w],C=await Bc(t,g),_=[];let j=(null==(r=a.flip)?void 0:r.overflows)||[];if(d&&_.push(C[v]),u){const e=function(e,t,n){void 0===n&&(n=!1);const r=Rc(e),o=Pc(e),a=Oc(o);let s="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=Fc(s)),[s,Fc(s)]}(o,s,x);_.push(C[e[0]],C[e[1]])}if(j=[...j,{placement:o,overflows:_}],!_.every((e=>e<=0))){var E,N;const e=((null==(E=a.flip)?void 0:E.index)||0)+1,t=S[e];if(t){var D;const n="alignment"===u&&y!==Ic(t),r=(null==(D=j[0])?void 0:D.overflows[0])>0;if(!n||r)return{data:{index:e,overflows:j},reset:{placement:t}}}let n=null==(N=j.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:N.placement;if(!n)switch(h){case"bestFit":{var T;const e=null==(T=j.filter((e=>{if(k){const t=Ic(e.placement);return t===y||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:T[0];e&&(n=e);break}case"initialPlacement":n=i}if(o!==n)return{reset:{placement:n}}}return{}}}},Td=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:s,elements:i}=t,{apply:l=()=>{},...c}=Tc(e,t),d=await Bc(t,c),u=Ac(o),f=Rc(o),h="y"===Ic(o),{width:m,height:p}=a.floating;let g,v;"top"===u||"bottom"===u?(g=u,v=f===(await(null==s.isRTL?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(v=u,g="end"===f?"top":"bottom");const y=p-d.top-d.bottom,b=m-d.left-d.right,x=kc(p-d[g],y),w=kc(m-d[v],b),k=!t.middlewareData.shift;let S=x,C=w;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(C=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(S=y),k&&!f){const e=Sc(d.left,0),t=Sc(d.right,0),n=Sc(d.top,0),r=Sc(d.bottom,0);h?C=m-2*(0!==e||0!==t?e+t:Sc(d.left,d.right)):S=p-2*(0!==n||0!==r?n+r:Sc(d.top,d.bottom))}await l({...t,availableWidth:C,availableHeight:S});const _=await s.getDimensions(i.floating);return m!==_.width||p!==_.height?{reset:{rects:!0}}:{}}}},Ad=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Tc(e,t);switch(r){case"referenceHidden":{const e=Wc(await Bc(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Uc(e)}}}case"escaped":{const e=Wc(await Bc(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Uc(e)}}}default:return{}}}}},Rd=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:s,elements:i,middlewareData:l}=t,{element:c,padding:d=0}=Tc(e,t)||{};if(null==c)return{};const u=zc(d),f={x:n,y:r},h=Pc(o),m=Oc(h),p=await s.getDimensions(c),g="y"===h,v=g?"top":"left",y=g?"bottom":"right",b=g?"clientHeight":"clientWidth",x=a.reference[m]+a.reference[h]-f[h]-a.floating[m],w=f[h]-a.reference[h],k=await(null==s.getOffsetParent?void 0:s.getOffsetParent(c));let S=k?k[b]:0;S&&await(null==s.isElement?void 0:s.isElement(k))||(S=i.floating[b]||a.floating[m]);const C=x/2-w/2,_=S/2-p[m]/2-1,j=kc(u[v],_),E=kc(u[y],_),N=j,D=S-p[m]-E,T=S/2-p[m]/2+C,A=Dc(N,T,D),R=!l.arrow&&null!=Rc(o)&&T!==A&&a.reference[m]/2-(T<N?j:E)-p[m]/2<0,M=R?T<N?T-N:T-D:0;return{[h]:f[h]+M,data:{[h]:A,centerOffset:T-A-M,...R&&{alignmentOffset:M}},reset:R}}}),Md=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:l=!0,crossAxis:c=!0}=Tc(e,t),d={x:n,y:r},u=Ic(o),f=Mc(u);let h=d[f],m=d[u];const p=Tc(i,t),g="number"==typeof p?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(l){const e="y"===f?"height":"width",t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;h<t?h=t:h>n&&(h=n)}if(c){var v,y;const e="y"===f?"width":"height",t=["top","left"].includes(Ac(o)),n=a.reference[u]-a.floating[e]+(t&&(null==(v=s.offset)?void 0:v[u])||0)+(t?0:g.crossAxis),r=a.reference[u]+a.reference[e]+(t?0:(null==(y=s.offset)?void 0:y[u])||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:h,[u]:m}}}},Od=(e,t,n)=>{const r=new Map,o={platform:_d,...n},a={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:s}=n,i=a.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:u}=Vc(c,r,l),f=r,h={},m=0;for(let n=0;n<i.length;n++){const{name:a,fn:p}=i[n],{x:g,y:v,data:y,reset:b}=await p({x:d,y:u,initialPlacement:r,placement:f,strategy:o,middlewareData:h,rects:c,platform:s,elements:{reference:e,floating:t}});d=null!=g?g:d,u=null!=v?v:u,h={...h,[a]:{...h[a],...y}},b&&m<=50&&(m++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(c=!0===b.rects?await s.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:d,y:u}=Vc(c,f,l))),n=-1)}return{x:d,y:u,placement:f,strategy:o,middlewareData:h}})(e,t,{...o,platform:a})};var Id="undefined"!=typeof document?e.useLayoutEffect:e.useEffect;function Pd(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!Pd(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||Pd(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function Ld(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Fd(e,t){const n=Ld(e);return Math.round(t*n)/n}function zd(t){const n=e.useRef(t);return Id((()=>{n.current=t})),n}const Hd=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?Rd({element:n.current,padding:r}).fn(t):{}:n?Rd({element:n,padding:r}).fn(t):{};var o}}),Vd=(e,t)=>({...Ed(e),options:[e,t]}),Bd=(e,t)=>({...Nd(e),options:[e,t]}),Wd=(e,t)=>({...Md(e),options:[e,t]}),Ud=(e,t)=>({...Dd(e),options:[e,t]}),$d=(e,t)=>({...Td(e),options:[e,t]}),Gd=(e,t)=>({...Ad(e),options:[e,t]}),Yd=(e,t)=>({...Hd(e),options:[e,t]});var qd=e.forwardRef(((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return(0,De.jsx)(wl.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:(0,De.jsx)("polygon",{points:"0,0 30,0 15,10"})})}));qd.displayName="Arrow";var Zd=qd;function Kd(t){const[n,r]=e.useState(void 0);return $l((()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const e=new ResizeObserver((e=>{if(!Array.isArray(e))return;if(!e.length)return;const n=e[0];let o,a;if("borderBoxSize"in n){const e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,a=t.blockSize}else o=t.offsetWidth,a=t.offsetHeight;r({width:o,height:a})}));return e.observe(t,{box:"border-box"}),()=>e.unobserve(t)}r(void 0)}),[t]),n}var Qd="Popper",[Jd,Xd]=Wl(Qd),[eu,tu]=Jd(Qd),nu=t=>{const{__scopePopper:n,children:r}=t,[o,a]=e.useState(null);return(0,De.jsx)(eu,{scope:n,anchor:o,onAnchorChange:a,children:r})};nu.displayName=Qd;var ru="PopperAnchor",ou=e.forwardRef(((t,n)=>{const{__scopePopper:r,virtualRef:o,...a}=t,s=tu(ru,r),i=e.useRef(null),l=$i(n,i);return e.useEffect((()=>{s.onAnchorChange(o?.current||i.current)})),o?null:(0,De.jsx)(wl.div,{...a,ref:l})}));ou.displayName=ru;var au="PopperContent",[su,iu]=Jd(au),lu=e.forwardRef(((t,n)=>{const{__scopePopper:r,side:o="bottom",sideOffset:a=0,align:s="center",alignOffset:i=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:u=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:m="optimized",onPlaced:p,...g}=t,v=tu(au,r),[y,b]=e.useState(null),x=$i(n,(e=>b(e))),[w,k]=e.useState(null),S=Kd(w),C=S?.width??0,_=S?.height??0,j=o+("center"!==s?"-"+s:""),E="number"==typeof u?u:{top:0,right:0,bottom:0,left:0,...u},N=Array.isArray(d)?d:[d],D=N.length>0,T={padding:E,boundary:N.filter(fu),altBoundary:D},{refs:A,floatingStyles:R,placement:M,isPositioned:O,middlewareData:I}=function(t){void 0===t&&(t={});const{placement:n="bottom",strategy:r="absolute",middleware:o=[],platform:a,elements:{reference:s,floating:i}={},transform:l=!0,whileElementsMounted:c,open:d}=t,[u,f]=e.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[h,m]=e.useState(o);Pd(h,o)||m(o);const[p,g]=e.useState(null),[v,y]=e.useState(null),b=e.useCallback((e=>{e!==S.current&&(S.current=e,g(e))}),[]),x=e.useCallback((e=>{e!==C.current&&(C.current=e,y(e))}),[]),w=s||p,k=i||v,S=e.useRef(null),C=e.useRef(null),_=e.useRef(u),j=null!=c,E=zd(c),N=zd(a),D=zd(d),T=e.useCallback((()=>{if(!S.current||!C.current)return;const e={placement:n,strategy:r,middleware:h};N.current&&(e.platform=N.current),Od(S.current,C.current,e).then((e=>{const t={...e,isPositioned:!1!==D.current};A.current&&!Pd(_.current,t)&&(_.current=t,pe.flushSync((()=>{f(t)})))}))}),[h,n,r,N,D]);Id((()=>{!1===d&&_.current.isPositioned&&(_.current.isPositioned=!1,f((e=>({...e,isPositioned:!1}))))}),[d]);const A=e.useRef(!1);Id((()=>(A.current=!0,()=>{A.current=!1})),[]),Id((()=>{if(w&&(S.current=w),k&&(C.current=k),w&&k){if(E.current)return E.current(w,k,T);T()}}),[w,k,T,E,j]);const R=e.useMemo((()=>({reference:S,floating:C,setReference:b,setFloating:x})),[b,x]),M=e.useMemo((()=>({reference:w,floating:k})),[w,k]),O=e.useMemo((()=>{const e={position:r,left:0,top:0};if(!M.floating)return e;const t=Fd(M.floating,u.x),n=Fd(M.floating,u.y);return l?{...e,transform:"translate("+t+"px, "+n+"px)",...Ld(M.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}}),[r,l,M.floating,u.x,u.y]);return e.useMemo((()=>({...u,update:T,refs:R,elements:M,floatingStyles:O})),[u,T,R,M,O])}({strategy:"fixed",placement:j,whileElementsMounted:(...e)=>function(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:i="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=fd(e),d=o||a?[...c?cd(c):[],...cd(t)]:[];d.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),a&&e.addEventListener("resize",n)}));const u=c&&i?function(e,t){let n,r=null;const o=qc(e);function a(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function s(i,l){void 0===i&&(i=!1),void 0===l&&(l=1),a();const c=e.getBoundingClientRect(),{left:d,top:u,width:f,height:h}=c;if(i||t(),!f||!h)return;const m={rootMargin:-_c(u)+"px "+-_c(o.clientWidth-(d+f))+"px "+-_c(o.clientHeight-(u+h))+"px "+-_c(d)+"px",threshold:Sc(0,kc(1,l))||1};let p=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!p)return s();r?s(!1,r):n=setTimeout((()=>{s(!1,1e-7)}),1e3)}1!==r||jd(c,e.getBoundingClientRect())||s(),p=!1}try{r=new IntersectionObserver(g,{...m,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,m)}r.observe(e)}(!0),a}(c,n):null;let f,h=-1,m=null;s&&(m=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&m&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame((()=>{var e;null==(e=m)||e.observe(t)}))),n()})),c&&!l&&m.observe(c),m.observe(t));let p=l?gd(e):null;return l&&function t(){const r=gd(e);p&&!jd(p,r)&&n(),p=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;d.forEach((e=>{o&&e.removeEventListener("scroll",n),a&&e.removeEventListener("resize",n)})),null==u||u(),null==(e=m)||e.disconnect(),m=null,l&&cancelAnimationFrame(f)}}(...e,{animationFrame:"always"===m}),elements:{reference:v.anchor},middleware:[Vd({mainAxis:a+_,alignmentAxis:i}),c&&Bd({mainAxis:!0,crossAxis:!1,limiter:"partial"===f?Wd():void 0,...T}),c&&Ud({...T}),$d({...T,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:a}=t.reference,s=e.floating.style;s.setProperty("--radix-popper-available-width",`${n}px`),s.setProperty("--radix-popper-available-height",`${r}px`),s.setProperty("--radix-popper-anchor-width",`${o}px`),s.setProperty("--radix-popper-anchor-height",`${a}px`)}}),w&&Yd({element:w,padding:l}),hu({arrowWidth:C,arrowHeight:_}),h&&Gd({strategy:"referenceHidden",...T})]}),[P,L]=mu(M),F=Ql(p);$l((()=>{O&&F?.()}),[O,F]);const z=I.arrow?.x,H=I.arrow?.y,V=0!==I.arrow?.centerOffset,[B,W]=e.useState();return $l((()=>{y&&W(window.getComputedStyle(y).zIndex)}),[y]),(0,De.jsx)("div",{ref:A.setFloating,"data-radix-popper-content-wrapper":"",style:{...R,transform:O?R.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:B,"--radix-popper-transform-origin":[I.transformOrigin?.x,I.transformOrigin?.y].join(" "),...I.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:(0,De.jsx)(su,{scope:r,placedSide:P,onArrowChange:k,arrowX:z,arrowY:H,shouldHideArrow:V,children:(0,De.jsx)(wl.div,{"data-side":P,"data-align":L,...g,ref:x,style:{...g.style,animation:O?void 0:"none"}})})})}));lu.displayName=au;var cu="PopperArrow",du={top:"bottom",right:"left",bottom:"top",left:"right"},uu=e.forwardRef((function(e,t){const{__scopePopper:n,...r}=e,o=iu(cu,n),a=du[o.placedSide];return(0,De.jsx)("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:(0,De.jsx)(Zd,{...r,ref:t,style:{...r.style,display:"block"}})})}));function fu(e){return null!==e}uu.displayName=cu;var hu=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,a=0!==o.arrow?.centerOffset,s=a?0:e.arrowWidth,i=a?0:e.arrowHeight,[l,c]=mu(n),d={start:"0%",center:"50%",end:"100%"}[c],u=(o.arrow?.x??0)+s/2,f=(o.arrow?.y??0)+i/2;let h="",m="";return"bottom"===l?(h=a?d:`${u}px`,m=-i+"px"):"top"===l?(h=a?d:`${u}px`,m=`${r.floating.height+i}px`):"right"===l?(h=-i+"px",m=a?d:`${f}px`):"left"===l&&(h=`${r.floating.width+i}px`,m=a?d:`${f}px`),{data:{x:h,y:m}}}});function mu(e){const[t,n="center"]=e.split("-");return[t,n]}var pu=nu,gu=ou,vu=lu,yu=uu,bu=e.forwardRef(((t,n)=>{const{container:r,...o}=t,[a,s]=e.useState(!1);$l((()=>s(!0)),[]);const i=r||a&&globalThis?.document?.body;return i?pe.createPortal((0,De.jsx)(wl.div,{...o,ref:n}),i):null}));bu.displayName="Portal";var xu=t=>{const{present:n,children:r}=t,o=function(t){const[n,r]=e.useState(),o=e.useRef(null),a=e.useRef(t),s=e.useRef("none"),i=t?"mounted":"unmounted",[l,c]=function(t,n){return e.useReducer(((e,t)=>n[e][t]??e),t)}(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect((()=>{const e=wu(o.current);s.current="mounted"===l?e:"none"}),[l]),$l((()=>{const e=o.current,n=a.current;if(n!==t){const r=s.current,o=wu(e);c(t?"MOUNT":"none"===o||"none"===e?.display?"UNMOUNT":n&&r!==o?"ANIMATION_OUT":"UNMOUNT"),a.current=t}}),[t,c]),$l((()=>{if(n){let e;const t=n.ownerDocument.defaultView??window,r=r=>{const s=wu(o.current).includes(r.animationName);if(r.target===n&&s&&(c("ANIMATION_END"),!a.current)){const r=n.style.animationFillMode;n.style.animationFillMode="forwards",e=t.setTimeout((()=>{"forwards"===n.style.animationFillMode&&(n.style.animationFillMode=r)}))}},i=e=>{e.target===n&&(s.current=wu(o.current))};return n.addEventListener("animationstart",i),n.addEventListener("animationcancel",r),n.addEventListener("animationend",r),()=>{t.clearTimeout(e),n.removeEventListener("animationstart",i),n.removeEventListener("animationcancel",r),n.removeEventListener("animationend",r)}}c("ANIMATION_END")}),[n,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:e.useCallback((e=>{o.current=e?getComputedStyle(e):null,r(e)}),[])}}(n),a="function"==typeof r?r({present:o.isPresent}):e.Children.only(r),s=$i(o.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}(a));return"function"==typeof r||o.isPresent?e.cloneElement(a,{ref:s}):null};function wu(e){return e?.animationName||"none"}xu.displayName="Presence";var ku="rovingFocusGroup.onEntryFocus",Su={bubbles:!1,cancelable:!0},Cu="RovingFocusGroup",[_u,ju,Eu]=ql(Cu),[Nu,Du]=Wl(Cu,[Eu]),[Tu,Au]=Nu(Cu),Ru=e.forwardRef(((e,t)=>(0,De.jsx)(_u.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,De.jsx)(_u.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,De.jsx)(Mu,{...e,ref:t})})})));Ru.displayName=Cu;var Mu=e.forwardRef(((t,n)=>{const{__scopeRovingFocusGroup:r,orientation:o,loop:a=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:d,preventScrollOnEntryFocus:u=!1,...f}=t,h=e.useRef(null),m=$i(n,h),p=Kl(s),[g,v]=Yl({prop:i,defaultProp:l??null,onChange:c,caller:Cu}),[y,b]=e.useState(!1),x=Ql(d),w=ju(r),k=e.useRef(!1),[S,C]=e.useState(0);return e.useEffect((()=>{const e=h.current;if(e)return e.addEventListener(ku,x),()=>e.removeEventListener(ku,x)}),[x]),(0,De.jsx)(Tu,{scope:r,orientation:o,dir:p,loop:a,currentTabStopId:g,onItemFocus:e.useCallback((e=>v(e)),[v]),onItemShiftTab:e.useCallback((()=>b(!0)),[]),onFocusableItemAdd:e.useCallback((()=>C((e=>e+1))),[]),onFocusableItemRemove:e.useCallback((()=>C((e=>e-1))),[]),children:(0,De.jsx)(wl.div,{tabIndex:y||0===S?-1:0,"data-orientation":o,...f,ref:m,style:{outline:"none",...t.style},onMouseDown:Bl(t.onMouseDown,(()=>{k.current=!0})),onFocus:Bl(t.onFocus,(e=>{const t=!k.current;if(e.target===e.currentTarget&&t&&!y){const t=new CustomEvent(ku,Su);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=w().filter((e=>e.focusable));Lu([e.find((e=>e.active)),e.find((e=>e.id===g)),...e].filter(Boolean).map((e=>e.ref.current)),u)}}k.current=!1})),onBlur:Bl(t.onBlur,(()=>b(!1)))})})})),Ou="RovingFocusGroupItem",Iu=e.forwardRef(((t,n)=>{const{__scopeRovingFocusGroup:r,focusable:o=!0,active:a=!1,tabStopId:s,children:i,...l}=t,c=xc(),d=s||c,u=Au(Ou,r),f=u.currentTabStopId===d,h=ju(r),{onFocusableItemAdd:m,onFocusableItemRemove:p,currentTabStopId:g}=u;return e.useEffect((()=>{if(o)return m(),()=>p()}),[o,m,p]),(0,De.jsx)(_u.ItemSlot,{scope:r,id:d,focusable:o,active:a,children:(0,De.jsx)(wl.span,{tabIndex:f?0:-1,"data-orientation":u.orientation,...l,ref:n,onMouseDown:Bl(t.onMouseDown,(e=>{o?u.onItemFocus(d):e.preventDefault()})),onFocus:Bl(t.onFocus,(()=>u.onItemFocus(d))),onKeyDown:Bl(t.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void u.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const r=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:Pu[r]}(e,u.orientation,u.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let o=h().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===t)o.reverse();else if("prev"===t||"next"===t){"prev"===t&&o.reverse();const a=o.indexOf(e.currentTarget);o=u.loop?(r=a+1,(n=o).map(((e,t)=>n[(r+t)%n.length]))):o.slice(a+1)}setTimeout((()=>Lu(o)))}var n,r})),children:"function"==typeof i?i({isCurrentTabStop:f,hasTabStop:null!=g}):i})})}));Iu.displayName=Ou;var Pu={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Lu(e,t=!1){const n=document.activeElement;for(const r of e){if(r===n)return;if(r.focus({preventScroll:t}),document.activeElement!==n)return}}var Fu=Ru,zu=Iu,Hu=new WeakMap,Vu=new WeakMap,Bu={},Wu=0,Uu=function(e){return e&&(e.host||Uu(e.parentNode))},$u=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),function(e,t,n,r){var o=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=Uu(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);Bu[n]||(Bu[n]=new WeakMap);var a=Bu[n],s=[],i=new Set,l=new Set(o),c=function(e){e&&!i.has(e)&&(i.add(e),c(e.parentNode))};o.forEach(c);var d=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(i.has(e))d(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,l=(Hu.get(e)||0)+1,c=(a.get(e)||0)+1;Hu.set(e,l),a.set(e,c),s.push(e),1===l&&o&&Vu.set(e,!0),1===c&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}}))};return d(t),i.clear(),Wu++,function(){s.forEach((function(e){var t=Hu.get(e)-1,o=a.get(e)-1;Hu.set(e,t),a.set(e,o),t||(Vu.has(e)||e.removeAttribute(r),Vu.delete(e)),o||e.removeAttribute(n)})),--Wu||(Hu=new WeakMap,Hu=new WeakMap,Vu=new WeakMap,Bu={})}}(r,o,n,"aria-hidden")):function(){return null}},Gu=function(e,t){return Gu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Gu(e,t)};function Yu(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}Gu(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}var qu=function(){return qu=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},qu.apply(this,arguments)};function Zu(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function Ku(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var Qu="right-scroll-bar-position",Ju="width-before-scroll-bar";function Xu(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var ef="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,tf=new WeakMap;function nf(e){return e}var rf=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=nf);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},s=function(){return Promise.resolve().then(a)};s(),n={push:function(e){t.push(e),s()},filter:function(e){return t=t.filter(e),n}}}};return o}(null);return t.options=qu({async:!0,ssr:!1},e),t}(),of=function(){},af=e.forwardRef((function(t,n){var r=e.useRef(null),o=e.useState({onScrollCapture:of,onWheelCapture:of,onTouchMoveCapture:of}),a=o[0],s=o[1],i=t.forwardProps,l=t.children,c=t.className,d=t.removeScrollBar,u=t.enabled,f=t.shards,h=t.sideCar,m=t.noIsolation,p=t.inert,g=t.allowPinchZoom,v=t.as,y=void 0===v?"div":v,b=t.gapMode,x=Zu(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=h,k=function(t,n){var r,o,a,s=(r=n||null,o=function(e){return t.forEach((function(t){return Xu(t,e)}))},(a=(0,e.useState)((function(){return{value:r,callback:o,facade:{get current(){return a.value},set current(e){var t=a.value;t!==e&&(a.value=e,a.callback(e,t))}}}}))[0]).callback=o,a.facade);return ef((function(){var e=tf.get(s);if(e){var n=new Set(e),r=new Set(t),o=s.current;n.forEach((function(e){r.has(e)||Xu(e,null)})),r.forEach((function(e){n.has(e)||Xu(e,o)}))}tf.set(s,t)}),[t]),s}([r,n]),S=qu(qu({},x),a);return e.createElement(e.Fragment,null,u&&e.createElement(w,{sideCar:rf,removeScrollBar:d,shards:f,noIsolation:m,inert:p,setCallbacks:s,allowPinchZoom:!!g,lockRef:r,gapMode:b}),i?e.cloneElement(e.Children.only(l),qu(qu({},S),{ref:k})):e.createElement(y,qu({},S,{className:c,ref:k}),l))}));af.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},af.classNames={fullWidth:Ju,zeroRight:Qu};var sf=function(t){var n=t.sideCar,r=Zu(t,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=n.read();if(!o)throw new Error("Sidecar medium not found");return e.createElement(o,qu({},r))};sf.isSideCarExport=!0;var lf=function(){var e=0,t=null;return{add:function(n){var r,a;0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=o.nc;return t&&e.setAttribute("nonce",t),e}())&&(a=n,(r=t).styleSheet?r.styleSheet.cssText=a:r.appendChild(document.createTextNode(a)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},cf=function(){var t,n=(t=lf(),function(n,r){e.useEffect((function(){return t.add(n),function(){t.remove()}}),[n&&r])});return function(e){var t=e.styles,r=e.dynamic;return n(t,r),null}},df={left:0,top:0,right:0,gap:0},uf=function(e){return parseInt(e||"",10)||0},ff=cf(),hf="data-scroll-locked",mf=function(e,t,n,r){var o=e.left,a=e.top,s=e.right,i=e.gap;return void 0===n&&(n="margin"),"\n  .".concat("with-scroll-bars-hidden"," {\n   overflow: hidden ").concat(r,";\n   padding-right: ").concat(i,"px ").concat(r,";\n  }\n  body[").concat(hf,"] {\n    overflow: hidden ").concat(r,";\n    overscroll-behavior: contain;\n    ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n    padding-left: ".concat(o,"px;\n    padding-top: ").concat(a,"px;\n    padding-right: ").concat(s,"px;\n    margin-left:0;\n    margin-top:0;\n    margin-right: ").concat(i,"px ").concat(r,";\n    "),"padding"===n&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),"\n  }\n  \n  .").concat(Qu," {\n    right: ").concat(i,"px ").concat(r,";\n  }\n  \n  .").concat(Ju," {\n    margin-right: ").concat(i,"px ").concat(r,";\n  }\n  \n  .").concat(Qu," .").concat(Qu," {\n    right: 0 ").concat(r,";\n  }\n  \n  .").concat(Ju," .").concat(Ju," {\n    margin-right: 0 ").concat(r,";\n  }\n  \n  body[").concat(hf,"] {\n    ").concat("--removed-body-scroll-bar-size",": ").concat(i,"px;\n  }\n")},pf=function(){var e=parseInt(document.body.getAttribute(hf)||"0",10);return isFinite(e)?e:0},gf=function(t){var n=t.noRelative,r=t.noImportant,o=t.gapMode,a=void 0===o?"margin":o;e.useEffect((function(){return document.body.setAttribute(hf,(pf()+1).toString()),function(){var e=pf()-1;e<=0?document.body.removeAttribute(hf):document.body.setAttribute(hf,e.toString())}}),[]);var s=e.useMemo((function(){return function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return df;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[uf(n),uf(r),uf(o)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}}(a)}),[a]);return e.createElement(ff,{styles:mf(s,!n,a,r?"":"!important")})},vf=!1;if("undefined"!=typeof window)try{var yf=Object.defineProperty({},"passive",{get:function(){return vf=!0,!0}});window.addEventListener("test",yf,yf),window.removeEventListener("test",yf,yf)}catch(e){vf=!1}var bf=!!vf&&{passive:!1},xf=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},wf=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),kf(e,r)){var o=Sf(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},kf=function(e,t){return"v"===e?function(e){return xf(e,"overflowY")}(t):function(e){return xf(e,"overflowX")}(t)},Sf=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},Cf=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},_f=function(e){return[e.deltaX,e.deltaY]},jf=function(e){return e&&"current"in e?e.current:e},Ef=function(e){return"\n  .block-interactivity-".concat(e," {pointer-events: none;}\n  .allow-interactivity-").concat(e," {pointer-events: all;}\n")},Nf=0,Df=[];function Tf(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Af=(Rf=function(t){var n=e.useRef([]),r=e.useRef([0,0]),o=e.useRef(),a=e.useState(Nf++)[0],s=e.useState(cf)[0],i=e.useRef(t);e.useEffect((function(){i.current=t}),[t]),e.useEffect((function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(a));var e=Ku([t.lockRef.current],(t.shards||[]).map(jf),!0).filter(Boolean);return e.forEach((function(e){return e.classList.add("allow-interactivity-".concat(a))})),function(){document.body.classList.remove("block-interactivity-".concat(a)),e.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(a))}))}}}),[t.inert,t.lockRef.current,t.shards]);var l=e.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var n,a=Cf(e),s=r.current,l="deltaX"in e?e.deltaX:s[0]-a[0],c="deltaY"in e?e.deltaY:s[1]-a[1],d=e.target,u=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===u&&"range"===d.type)return!1;var f=wf(u,d);if(!f)return!0;if(f?n=u:(n="v"===u?"h":"v",f=wf(u,d)),!f)return!1;if(!o.current&&"changedTouches"in e&&(l||c)&&(o.current=n),!n)return!0;var h=o.current||n;return function(e,t,n,r){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,i=t.contains(s),l=!1,c=a>0,d=0,u=0;do{var f=Sf(e,s),h=f[0],m=f[1]-f[2]-o*h;(h||m)&&kf(e,s)&&(d+=m,u+=h),s=s instanceof ShadowRoot?s.host:s.parentNode}while(!i&&s!==document.body||i&&(t.contains(s)||t===s));return(c&&(Math.abs(d)<1||!1)||!c&&(Math.abs(u)<1||!1))&&(l=!0),l}(h,t,e,"h"===h?l:c)}),[]),c=e.useCallback((function(e){var t=e;if(Df.length&&Df[Df.length-1]===s){var r="deltaY"in t?_f(t):Cf(t),o=n.current.filter((function(e){return e.name===t.type&&(e.target===t.target||t.target===e.shadowParent)&&function(e,t){return e[0]===t[0]&&e[1]===t[1]}(e.delta,r)}))[0];if(o&&o.should)t.cancelable&&t.preventDefault();else if(!o){var a=(i.current.shards||[]).map(jf).filter(Boolean).filter((function(e){return e.contains(t.target)}));(a.length>0?l(t,a[0]):!i.current.noIsolation)&&t.cancelable&&t.preventDefault()}}}),[]),d=e.useCallback((function(e,t,r,o){var a={name:e,delta:t,target:r,should:o,shadowParent:Tf(r)};n.current.push(a),setTimeout((function(){n.current=n.current.filter((function(e){return e!==a}))}),1)}),[]),u=e.useCallback((function(e){r.current=Cf(e),o.current=void 0}),[]),f=e.useCallback((function(e){d(e.type,_f(e),e.target,l(e,t.lockRef.current))}),[]),h=e.useCallback((function(e){d(e.type,Cf(e),e.target,l(e,t.lockRef.current))}),[]);e.useEffect((function(){return Df.push(s),t.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",c,bf),document.addEventListener("touchmove",c,bf),document.addEventListener("touchstart",u,bf),function(){Df=Df.filter((function(e){return e!==s})),document.removeEventListener("wheel",c,bf),document.removeEventListener("touchmove",c,bf),document.removeEventListener("touchstart",u,bf)}}),[]);var m=t.removeScrollBar,p=t.inert;return e.createElement(e.Fragment,null,p?e.createElement(s,{styles:Ef(a)}):null,m?e.createElement(gf,{gapMode:t.gapMode}):null)},rf.useMedium(Rf),sf);var Rf,Mf=e.forwardRef((function(t,n){return e.createElement(af,qu({},t,{ref:n,sideCar:Af}))}));Mf.classNames=af.classNames;const Of=Mf;var If=["Enter"," "],Pf=["ArrowUp","PageDown","End"],Lf=["ArrowDown","PageUp","Home",...Pf],Ff={ltr:[...If,"ArrowRight"],rtl:[...If,"ArrowLeft"]},zf={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Hf="Menu",[Vf,Bf,Wf]=ql(Hf),[Uf,$f]=Wl(Hf,[Wf,Xd,Du]),Gf=Xd(),Yf=Du(),[qf,Zf]=Uf(Hf),[Kf,Qf]=Uf(Hf),Jf=t=>{const{__scopeMenu:n,open:r=!1,children:o,dir:a,onOpenChange:s,modal:i=!0}=t,l=Gf(n),[c,d]=e.useState(null),u=e.useRef(!1),f=Ql(s),h=Kl(a);return e.useEffect((()=>{const e=()=>{u.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>u.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}}),[]),(0,De.jsx)(pu,{...l,children:(0,De.jsx)(qf,{scope:n,open:r,onOpenChange:f,content:c,onContentChange:d,children:(0,De.jsx)(Kf,{scope:n,onClose:e.useCallback((()=>f(!1)),[f]),isUsingKeyboardRef:u,dir:h,modal:i,children:o})})})};Jf.displayName=Hf;var Xf=e.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e,o=Gf(n);return(0,De.jsx)(gu,{...o,...r,ref:t})}));Xf.displayName="MenuAnchor";var eh="MenuPortal",[th,nh]=Uf(eh,{forceMount:void 0}),rh=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=Zf(eh,t);return(0,De.jsx)(th,{scope:t,forceMount:n,children:(0,De.jsx)(xu,{present:n||a.open,children:(0,De.jsx)(bu,{asChild:!0,container:o,children:r})})})};rh.displayName=eh;var oh="MenuContent",[ah,sh]=Uf(oh),ih=e.forwardRef(((e,t)=>{const n=nh(oh,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Zf(oh,e.__scopeMenu),s=Qf(oh,e.__scopeMenu);return(0,De.jsx)(Vf.Provider,{scope:e.__scopeMenu,children:(0,De.jsx)(xu,{present:r||a.open,children:(0,De.jsx)(Vf.Slot,{scope:e.__scopeMenu,children:s.modal?(0,De.jsx)(lh,{...o,ref:t}):(0,De.jsx)(ch,{...o,ref:t})})})})})),lh=e.forwardRef(((t,n)=>{const r=Zf(oh,t.__scopeMenu),o=e.useRef(null),a=$i(n,o);return e.useEffect((()=>{const e=o.current;if(e)return $u(e)}),[]),(0,De.jsx)(uh,{...t,ref:a,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:Bl(t.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})})),ch=e.forwardRef(((e,t)=>{const n=Zf(oh,e.__scopeMenu);return(0,De.jsx)(uh,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})})),dh=Gi("MenuContent.ScrollLock"),uh=e.forwardRef(((t,n)=>{const{__scopeMenu:r,loop:o=!1,trapFocus:a,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:d,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:h,onDismiss:m,disableOutsideScroll:p,...g}=t,v=Zf(oh,r),y=Qf(oh,r),b=Gf(r),x=Yf(r),w=Bf(r),[k,S]=e.useState(null),C=e.useRef(null),_=$i(n,C,v.onContentChange),j=e.useRef(0),E=e.useRef(""),N=e.useRef(0),D=e.useRef(null),T=e.useRef("right"),A=e.useRef(0),R=p?Of:e.Fragment,M=p?{as:dh,allowPinchZoom:!0}:void 0;e.useEffect((()=>()=>window.clearTimeout(j.current)),[]),sc();const O=e.useCallback((e=>T.current===D.current?.side&&function(e,t){if(!t)return!1;return function(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){const s=t[e],i=t[a],l=s.x,c=s.y,d=i.x,u=i.y;c>r!=u>r&&n<(d-l)*(r-c)/(u-c)+l&&(o=!o)}return o}({x:e.clientX,y:e.clientY},t)}(e,D.current?.area)),[]);return(0,De.jsx)(ah,{scope:r,searchRef:E,onItemEnter:e.useCallback((e=>{O(e)&&e.preventDefault()}),[O]),onItemLeave:e.useCallback((e=>{O(e)||(C.current?.focus(),S(null))}),[O]),onTriggerLeave:e.useCallback((e=>{O(e)&&e.preventDefault()}),[O]),pointerGraceTimerRef:N,onPointerGraceIntentChange:e.useCallback((e=>{D.current=e}),[]),children:(0,De.jsx)(R,{...M,children:(0,De.jsx)(uc,{asChild:!0,trapped:a,onMountAutoFocus:Bl(s,(e=>{e.preventDefault(),C.current?.focus({preventScroll:!0})})),onUnmountAutoFocus:i,children:(0,De.jsx)(tc,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:d,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:h,onDismiss:m,children:(0,De.jsx)(Fu,{asChild:!0,...x,dir:y.dir,orientation:"vertical",loop:o,currentTabStopId:k,onCurrentTabStopIdChange:S,onEntryFocus:Bl(c,(e=>{y.isUsingKeyboardRef.current||e.preventDefault()})),preventScrollOnEntryFocus:!0,children:(0,De.jsx)(vu,{role:"menu","aria-orientation":"vertical","data-state":zh(v.open),"data-radix-menu-content":"",dir:y.dir,...b,...g,ref:_,style:{outline:"none",...g.style},onKeyDown:Bl(g.onKeyDown,(e=>{const t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!n&&r&&(e=>{const t=E.current+e,n=w().filter((e=>!e.disabled)),r=document.activeElement,o=n.find((e=>e.ref.current===r))?.textValue,a=function(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,o=n?e.indexOf(n):-1;let a=(s=e,i=Math.max(o,0),s.map(((e,t)=>s[(i+t)%s.length])));var s,i;1===r.length&&(a=a.filter((e=>e!==n)));const l=a.find((e=>e.toLowerCase().startsWith(r.toLowerCase())));return l!==n?l:void 0}(n.map((e=>e.textValue)),t,o),s=n.find((e=>e.textValue===a))?.ref.current;!function e(t){E.current=t,window.clearTimeout(j.current),""!==t&&(j.current=window.setTimeout((()=>e("")),1e3))}(t),s&&setTimeout((()=>s.focus()))})(e.key));const o=C.current;if(e.target!==o)return;if(!Lf.includes(e.key))return;e.preventDefault();const a=w().filter((e=>!e.disabled)).map((e=>e.ref.current));Pf.includes(e.key)&&a.reverse(),function(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}(a)})),onBlur:Bl(t.onBlur,(e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(j.current),E.current="")})),onPointerMove:Bl(t.onPointerMove,Bh((e=>{const t=e.target,n=A.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>A.current?"right":"left";T.current=t,A.current=e.clientX}})))})})})})})})}));ih.displayName=oh;var fh=e.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return(0,De.jsx)(wl.div,{role:"group",...r,ref:t})}));fh.displayName="MenuGroup";var hh=e.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return(0,De.jsx)(wl.div,{...r,ref:t})}));hh.displayName="MenuLabel";var mh="MenuItem",ph="menu.itemSelect",gh=e.forwardRef(((t,n)=>{const{disabled:r=!1,onSelect:o,...a}=t,s=e.useRef(null),i=Qf(mh,t.__scopeMenu),l=sh(mh,t.__scopeMenu),c=$i(n,s),d=e.useRef(!1);return(0,De.jsx)(vh,{...a,ref:c,disabled:r,onClick:Bl(t.onClick,(()=>{const e=s.current;if(!r&&e){const t=new CustomEvent(ph,{bubbles:!0,cancelable:!0});e.addEventListener(ph,(e=>o?.(e)),{once:!0}),kl(e,t),t.defaultPrevented?d.current=!1:i.onClose()}})),onPointerDown:e=>{t.onPointerDown?.(e),d.current=!0},onPointerUp:Bl(t.onPointerUp,(e=>{d.current||e.currentTarget?.click()})),onKeyDown:Bl(t.onKeyDown,(e=>{const t=""!==l.searchRef.current;r||t&&" "===e.key||If.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}))})}));gh.displayName=mh;var vh=e.forwardRef(((t,n)=>{const{__scopeMenu:r,disabled:o=!1,textValue:a,...s}=t,i=sh(mh,r),l=Yf(r),c=e.useRef(null),d=$i(n,c),[u,f]=e.useState(!1),[h,m]=e.useState("");return e.useEffect((()=>{const e=c.current;e&&m((e.textContent??"").trim())}),[s.children]),(0,De.jsx)(Vf.ItemSlot,{scope:r,disabled:o,textValue:a??h,children:(0,De.jsx)(zu,{asChild:!0,...l,focusable:!o,children:(0,De.jsx)(wl.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...s,ref:d,onPointerMove:Bl(t.onPointerMove,Bh((e=>{o?i.onItemLeave(e):(i.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))}))),onPointerLeave:Bl(t.onPointerLeave,Bh((e=>i.onItemLeave(e)))),onFocus:Bl(t.onFocus,(()=>f(!0))),onBlur:Bl(t.onBlur,(()=>f(!1)))})})})})),yh=e.forwardRef(((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return(0,De.jsx)(jh,{scope:e.__scopeMenu,checked:n,children:(0,De.jsx)(gh,{role:"menuitemcheckbox","aria-checked":Hh(n)?"mixed":n,...o,ref:t,"data-state":Vh(n),onSelect:Bl(o.onSelect,(()=>r?.(!!Hh(n)||!n)),{checkForDefaultPrevented:!1})})})}));yh.displayName="MenuCheckboxItem";var bh="MenuRadioGroup",[xh,wh]=Uf(bh,{value:void 0,onValueChange:()=>{}}),kh=e.forwardRef(((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=Ql(r);return(0,De.jsx)(xh,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,De.jsx)(fh,{...o,ref:t})})}));kh.displayName=bh;var Sh="MenuRadioItem",Ch=e.forwardRef(((e,t)=>{const{value:n,...r}=e,o=wh(Sh,e.__scopeMenu),a=n===o.value;return(0,De.jsx)(jh,{scope:e.__scopeMenu,checked:a,children:(0,De.jsx)(gh,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":Vh(a),onSelect:Bl(r.onSelect,(()=>o.onValueChange?.(n)),{checkForDefaultPrevented:!1})})})}));Ch.displayName=Sh;var _h="MenuItemIndicator",[jh,Eh]=Uf(_h,{checked:!1}),Nh=e.forwardRef(((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=Eh(_h,n);return(0,De.jsx)(xu,{present:r||Hh(a.checked)||!0===a.checked,children:(0,De.jsx)(wl.span,{...o,ref:t,"data-state":Vh(a.checked)})})}));Nh.displayName=_h;var Dh=e.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return(0,De.jsx)(wl.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})}));Dh.displayName="MenuSeparator";var Th=e.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e,o=Gf(n);return(0,De.jsx)(yu,{...o,...r,ref:t})}));Th.displayName="MenuArrow";var Ah="MenuSub",[Rh,Mh]=Uf(Ah),Oh=t=>{const{__scopeMenu:n,children:r,open:o=!1,onOpenChange:a}=t,s=Zf(Ah,n),i=Gf(n),[l,c]=e.useState(null),[d,u]=e.useState(null),f=Ql(a);return e.useEffect((()=>(!1===s.open&&f(!1),()=>f(!1))),[s.open,f]),(0,De.jsx)(pu,{...i,children:(0,De.jsx)(qf,{scope:n,open:o,onOpenChange:f,content:d,onContentChange:u,children:(0,De.jsx)(Rh,{scope:n,contentId:xc(),triggerId:xc(),trigger:l,onTriggerChange:c,children:r})})})};Oh.displayName=Ah;var Ih="MenuSubTrigger",Ph=e.forwardRef(((t,n)=>{const r=Zf(Ih,t.__scopeMenu),o=Qf(Ih,t.__scopeMenu),a=Mh(Ih,t.__scopeMenu),s=sh(Ih,t.__scopeMenu),i=e.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=s,d={__scopeMenu:t.__scopeMenu},u=e.useCallback((()=>{i.current&&window.clearTimeout(i.current),i.current=null}),[]);return e.useEffect((()=>u),[u]),e.useEffect((()=>{const e=l.current;return()=>{window.clearTimeout(e),c(null)}}),[l,c]),(0,De.jsx)(Xf,{asChild:!0,...d,children:(0,De.jsx)(vh,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":a.contentId,"data-state":zh(r.open),...t,ref:Ui(n,a.onTriggerChange),onClick:e=>{t.onClick?.(e),t.disabled||e.defaultPrevented||(e.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:Bl(t.onPointerMove,Bh((e=>{s.onItemEnter(e),e.defaultPrevented||t.disabled||r.open||i.current||(s.onPointerGraceIntentChange(null),i.current=window.setTimeout((()=>{r.onOpenChange(!0),u()}),100))}))),onPointerLeave:Bl(t.onPointerLeave,Bh((e=>{u();const t=r.content?.getBoundingClientRect();if(t){const n=r.content?.dataset.side,o="right"===n,a=o?-5:5,i=t[o?"left":"right"],c=t[o?"right":"left"];s.onPointerGraceIntentChange({area:[{x:e.clientX+a,y:e.clientY},{x:i,y:t.top},{x:c,y:t.top},{x:c,y:t.bottom},{x:i,y:t.bottom}],side:n}),window.clearTimeout(l.current),l.current=window.setTimeout((()=>s.onPointerGraceIntentChange(null)),300)}else{if(s.onTriggerLeave(e),e.defaultPrevented)return;s.onPointerGraceIntentChange(null)}}))),onKeyDown:Bl(t.onKeyDown,(e=>{const n=""!==s.searchRef.current;t.disabled||n&&" "===e.key||Ff[o.dir].includes(e.key)&&(r.onOpenChange(!0),r.content?.focus(),e.preventDefault())}))})})}));Ph.displayName=Ih;var Lh="MenuSubContent",Fh=e.forwardRef(((t,n)=>{const r=nh(oh,t.__scopeMenu),{forceMount:o=r.forceMount,...a}=t,s=Zf(oh,t.__scopeMenu),i=Qf(oh,t.__scopeMenu),l=Mh(Lh,t.__scopeMenu),c=e.useRef(null),d=$i(n,c);return(0,De.jsx)(Vf.Provider,{scope:t.__scopeMenu,children:(0,De.jsx)(xu,{present:o||s.open,children:(0,De.jsx)(Vf.Slot,{scope:t.__scopeMenu,children:(0,De.jsx)(uh,{id:l.contentId,"aria-labelledby":l.triggerId,...a,ref:d,align:"start",side:"rtl"===i.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{i.isUsingKeyboardRef.current&&c.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:Bl(t.onFocusOutside,(e=>{e.target!==l.trigger&&s.onOpenChange(!1)})),onEscapeKeyDown:Bl(t.onEscapeKeyDown,(e=>{i.onClose(),e.preventDefault()})),onKeyDown:Bl(t.onKeyDown,(e=>{const t=e.currentTarget.contains(e.target),n=zf[i.dir].includes(e.key);t&&n&&(s.onOpenChange(!1),l.trigger?.focus(),e.preventDefault())}))})})})})}));function zh(e){return e?"open":"closed"}function Hh(e){return"indeterminate"===e}function Vh(e){return Hh(e)?"indeterminate":e?"checked":"unchecked"}function Bh(e){return t=>"mouse"===t.pointerType?e(t):void 0}Fh.displayName=Lh;var Wh=Jf,Uh=Xf,$h=rh,Gh=ih,Yh=fh,qh=hh,Zh=gh,Kh=yh,Qh=kh,Jh=Ch,Xh=Nh,em=Dh,tm=Th,nm=Oh,rm=Ph,om=Fh,am="DropdownMenu",[sm,im]=Wl(am,[$f]),lm=$f(),[cm,dm]=sm(am),um=t=>{const{__scopeDropdownMenu:n,children:r,dir:o,open:a,defaultOpen:s,onOpenChange:i,modal:l=!0}=t,c=lm(n),d=e.useRef(null),[u,f]=Yl({prop:a,defaultProp:s??!1,onChange:i,caller:am});return(0,De.jsx)(cm,{scope:n,triggerId:xc(),triggerRef:d,contentId:xc(),open:u,onOpenChange:f,onOpenToggle:e.useCallback((()=>f((e=>!e))),[f]),modal:l,children:(0,De.jsx)(Wh,{...c,open:u,onOpenChange:f,dir:o,modal:l,children:r})})};um.displayName=am;var fm="DropdownMenuTrigger",hm=e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=dm(fm,n),s=lm(n);return(0,De.jsx)(Uh,{asChild:!0,...s,children:(0,De.jsx)(wl.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:Ui(t,a.triggerRef),onPointerDown:Bl(e.onPointerDown,(e=>{r||0!==e.button||!1!==e.ctrlKey||(a.onOpenToggle(),a.open||e.preventDefault())})),onKeyDown:Bl(e.onKeyDown,(e=>{r||(["Enter"," "].includes(e.key)&&a.onOpenToggle(),"ArrowDown"===e.key&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())}))})})}));hm.displayName=fm;var mm=e=>{const{__scopeDropdownMenu:t,...n}=e,r=lm(t);return(0,De.jsx)($h,{...r,...n})};mm.displayName="DropdownMenuPortal";var pm="DropdownMenuContent",gm=e.forwardRef(((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,a=dm(pm,r),s=lm(r),i=e.useRef(!1);return(0,De.jsx)(Gh,{id:a.contentId,"aria-labelledby":a.triggerId,...s,...o,ref:n,onCloseAutoFocus:Bl(t.onCloseAutoFocus,(e=>{i.current||a.triggerRef.current?.focus(),i.current=!1,e.preventDefault()})),onInteractOutside:Bl(t.onInteractOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;a.modal&&!r||(i.current=!0)})),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})}));gm.displayName=pm,e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=lm(n);return(0,De.jsx)(Yh,{...o,...r,ref:t})})).displayName="DropdownMenuGroup";var vm=e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=lm(n);return(0,De.jsx)(qh,{...o,...r,ref:t})}));vm.displayName="DropdownMenuLabel";var ym=e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=lm(n);return(0,De.jsx)(Zh,{...o,...r,ref:t})}));ym.displayName="DropdownMenuItem";var bm=e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=lm(n);return(0,De.jsx)(Kh,{...o,...r,ref:t})}));bm.displayName="DropdownMenuCheckboxItem",e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=lm(n);return(0,De.jsx)(Qh,{...o,...r,ref:t})})).displayName="DropdownMenuRadioGroup";var xm=e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=lm(n);return(0,De.jsx)(Jh,{...o,...r,ref:t})}));xm.displayName="DropdownMenuRadioItem";var wm=e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=lm(n);return(0,De.jsx)(Xh,{...o,...r,ref:t})}));wm.displayName="DropdownMenuItemIndicator";var km=e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=lm(n);return(0,De.jsx)(em,{...o,...r,ref:t})}));km.displayName="DropdownMenuSeparator",e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=lm(n);return(0,De.jsx)(tm,{...o,...r,ref:t})})).displayName="DropdownMenuArrow";var Sm=e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=lm(n);return(0,De.jsx)(rm,{...o,...r,ref:t})}));Sm.displayName="DropdownMenuSubTrigger";var Cm=e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=lm(n);return(0,De.jsx)(om,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})}));Cm.displayName="DropdownMenuSubContent";var _m=um,jm=hm,Em=mm,Nm=gm,Dm=vm,Tm=ym,Am=bm,Rm=xm,Mm=wm,Om=km,Im=Sm,Pm=Cm;const Lm=Mi("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),Fm=Mi("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]),zm=_m,Hm=jm,Vm=Em,Bm=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:a}=e,s=lm(t),[i,l]=Yl({prop:r,defaultProp:a??!1,onChange:o,caller:"DropdownMenuSub"});return(0,De.jsx)(nm,{...s,open:i,onOpenChange:l,children:n})},Wm=e.forwardRef((({className:e,inset:t,children:n,...r},o)=>(0,De.jsxs)(Im,{ref:o,className:Ni("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...r,children:[n,(0,De.jsx)(zl,{className:"ml-auto h-4 w-4"})]})));Wm.displayName=Im.displayName;const Um=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)(Pm,{ref:n,className:Ni("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t})));Um.displayName=Pm.displayName;const $m=e.forwardRef((({className:e,sideOffset:t=4,...n},r)=>{const o="undefined"!=typeof document?document.querySelector(".eventkoi-admin")||document.body:void 0;return(0,De.jsx)(Em,{container:o,children:(0,De.jsx)(Nm,{ref:r,sideOffset:t,className:Ni("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})})}));$m.displayName=Nm.displayName;const Gm=e.forwardRef((({className:e,inset:t,...n},r)=>(0,De.jsx)(Tm,{ref:r,className:Ni("relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...n})));Gm.displayName=Tm.displayName;const Ym=e.forwardRef((({className:e,children:t,checked:n,...r},o)=>(0,De.jsxs)(Am,{ref:o,className:Ni("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[(0,De.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,De.jsx)(Mm,{children:(0,De.jsx)(Lm,{className:"h-4 w-4"})})}),t]})));Ym.displayName=Am.displayName,e.forwardRef((({className:e,children:t,...n},r)=>(0,De.jsxs)(Rm,{ref:r,className:Ni("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[(0,De.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,De.jsx)(Mm,{children:(0,De.jsx)(Fm,{className:"h-2 w-2 fill-current"})})}),t]}))).displayName=Rm.displayName,e.forwardRef((({className:e,inset:t,...n},r)=>(0,De.jsx)(Dm,{ref:r,className:Ni("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}))).displayName=Dm.displayName;const qm=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)(Om,{ref:n,className:Ni("-mx-1 my-1 h-px bg-muted",e),...t})));qm.displayName=Om.displayName;const Zm=(0,e.createContext)(null);var Km=Array(12).fill(0),Qm=({visible:t,className:n})=>e.createElement("div",{className:["sonner-loading-wrapper",n].filter(Boolean).join(" "),"data-visible":t},e.createElement("div",{className:"sonner-spinner"},Km.map(((t,n)=>e.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`}))))),Jm=e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},e.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Xm=e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},e.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),ep=e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},e.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),tp=e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},e.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),np=e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},e.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),rp=1,op=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach((t=>t(e)))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,o="number"==typeof(null==e?void 0:e.id)||(null==(t=e.id)?void 0:t.length)>0?e.id:rp++,a=this.toasts.find((e=>e.id===o)),s=void 0===e.dismissible||e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),a?this.toasts=this.toasts.map((t=>t.id===o?(this.publish({...t,...e,id:o,title:n}),{...t,...e,id:o,dismissible:s,title:n}):t)):this.addToast({title:n,...r,dismissible:s,id:o}),o},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach((e=>{this.subscribers.forEach((t=>t({id:e.id,dismiss:!0})))})),this.subscribers.forEach((t=>t({id:e,dismiss:!0}))),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(t,n)=>{if(!n)return;let r;void 0!==n.loading&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:"function"!=typeof n.description?n.description:void 0}));let o,a=t instanceof Promise?t:t(),s=void 0!==r,i=a.then((async t=>{if(o=["resolve",t],e.isValidElement(t))s=!1,this.create({id:r,type:"default",message:t});else if(ap(t)&&!t.ok){s=!1;let e="function"==typeof n.error?await n.error(`HTTP error! status: ${t.status}`):n.error,o="function"==typeof n.description?await n.description(`HTTP error! status: ${t.status}`):n.description;this.create({id:r,type:"error",message:e,description:o})}else if(void 0!==n.success){s=!1;let e="function"==typeof n.success?await n.success(t):n.success,o="function"==typeof n.description?await n.description(t):n.description;this.create({id:r,type:"success",message:e,description:o})}})).catch((async e=>{if(o=["reject",e],void 0!==n.error){s=!1;let t="function"==typeof n.error?await n.error(e):n.error,o="function"==typeof n.description?await n.description(e):n.description;this.create({id:r,type:"error",message:t,description:o})}})).finally((()=>{var e;s&&(this.dismiss(r),r=void 0),null==(e=n.finally)||e.call(n)})),l=()=>new Promise(((e,t)=>i.then((()=>"reject"===o[0]?t(o[1]):e(o[1]))).catch(t)));return"string"!=typeof r&&"number"!=typeof r?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(e,t)=>{let n=(null==t?void 0:t.id)||rp++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter((e=>!this.dismissedToasts.has(e.id))),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},ap=e=>e&&"object"==typeof e&&"ok"in e&&"boolean"==typeof e.ok&&"status"in e&&"number"==typeof e.status,sp=Object.assign(((e,t)=>{let n=(null==t?void 0:t.id)||rp++;return op.addToast({title:e,...t,id:n}),n}),{success:op.success,info:op.info,warning:op.warning,error:op.error,custom:op.custom,message:op.message,promise:op.promise,dismiss:op.dismiss,loading:op.loading},{getHistory:()=>op.toasts,getToasts:()=>op.getActiveToasts()});function ip(e){return void 0!==e.label}!function(e,{insertAt:t}={}){if(!e||"undefined"==typeof document)return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===t&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}(':where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}\n');var lp=3,cp=14;function dp(...e){return e.filter(Boolean).join(" ")}var up=t=>{var n,r,o,a,s,i,l,c,d,u,f;let{invert:h,toast:m,unstyled:p,interacting:g,setHeights:v,visibleToasts:y,heights:b,index:x,toasts:w,expanded:k,removeToast:S,defaultRichColors:C,closeButton:_,style:j,cancelButtonStyle:E,actionButtonStyle:N,className:D="",descriptionClassName:T="",duration:A,position:R,gap:M,loadingIcon:O,expandByDefault:I,classNames:P,icons:L,closeButtonAriaLabel:F="Close toast",pauseWhenPageIsHidden:z}=t,[H,V]=e.useState(null),[B,W]=e.useState(null),[U,$]=e.useState(!1),[G,Y]=e.useState(!1),[q,Z]=e.useState(!1),[K,Q]=e.useState(!1),[J,X]=e.useState(!1),[ee,te]=e.useState(0),[ne,re]=e.useState(0),oe=e.useRef(m.duration||A||4e3),ae=e.useRef(null),se=e.useRef(null),ie=0===x,le=x+1<=y,ce=m.type,de=!1!==m.dismissible,ue=m.className||"",fe=m.descriptionClassName||"",he=e.useMemo((()=>b.findIndex((e=>e.toastId===m.id))||0),[b,m.id]),me=e.useMemo((()=>{var e;return null!=(e=m.closeButton)?e:_}),[m.closeButton,_]),pe=e.useMemo((()=>m.duration||A||4e3),[m.duration,A]),ge=e.useRef(0),ve=e.useRef(0),ye=e.useRef(0),be=e.useRef(null),[xe,we]=R.split("-"),ke=e.useMemo((()=>b.reduce(((e,t,n)=>n>=he?e:e+t.height),0)),[b,he]),Se=(()=>{let[t,n]=e.useState(document.hidden);return e.useEffect((()=>{let e=()=>{n(document.hidden)};return document.addEventListener("visibilitychange",e),()=>window.removeEventListener("visibilitychange",e)}),[]),t})(),Ce=m.invert||h,_e="loading"===ce;ve.current=e.useMemo((()=>he*M+ke),[he,ke]),e.useEffect((()=>{oe.current=pe}),[pe]),e.useEffect((()=>{$(!0)}),[]),e.useEffect((()=>{let e=se.current;if(e){let t=e.getBoundingClientRect().height;return re(t),v((e=>[{toastId:m.id,height:t,position:m.position},...e])),()=>v((e=>e.filter((e=>e.toastId!==m.id))))}}),[v,m.id]),e.useLayoutEffect((()=>{if(!U)return;let e=se.current,t=e.style.height;e.style.height="auto";let n=e.getBoundingClientRect().height;e.style.height=t,re(n),v((e=>e.find((e=>e.toastId===m.id))?e.map((e=>e.toastId===m.id?{...e,height:n}:e)):[{toastId:m.id,height:n,position:m.position},...e]))}),[U,m.title,m.description,v,m.id]);let je=e.useCallback((()=>{Y(!0),te(ve.current),v((e=>e.filter((e=>e.toastId!==m.id)))),setTimeout((()=>{S(m)}),200)}),[m,S,v,ve]);return e.useEffect((()=>{if(m.promise&&"loading"===ce||m.duration===1/0||"loading"===m.type)return;let e;return k||g||z&&Se?(()=>{if(ye.current<ge.current){let e=(new Date).getTime()-ge.current;oe.current=oe.current-e}ye.current=(new Date).getTime()})():oe.current!==1/0&&(ge.current=(new Date).getTime(),e=setTimeout((()=>{var e;null==(e=m.onAutoClose)||e.call(m,m),je()}),oe.current)),()=>clearTimeout(e)}),[k,g,m,ce,z,Se,je]),e.useEffect((()=>{m.delete&&je()}),[je,m.delete]),e.createElement("li",{tabIndex:0,ref:se,className:dp(D,ue,null==P?void 0:P.toast,null==(n=null==m?void 0:m.classNames)?void 0:n.toast,null==P?void 0:P.default,null==P?void 0:P[ce],null==(r=null==m?void 0:m.classNames)?void 0:r[ce]),"data-sonner-toast":"","data-rich-colors":null!=(o=m.richColors)?o:C,"data-styled":!(m.jsx||m.unstyled||p),"data-mounted":U,"data-promise":!!m.promise,"data-swiped":J,"data-removed":G,"data-visible":le,"data-y-position":xe,"data-x-position":we,"data-index":x,"data-front":ie,"data-swiping":q,"data-dismissible":de,"data-type":ce,"data-invert":Ce,"data-swipe-out":K,"data-swipe-direction":B,"data-expanded":!!(k||I&&U),style:{"--index":x,"--toasts-before":x,"--z-index":w.length-x,"--offset":`${G?ee:ve.current}px`,"--initial-height":I?"auto":`${ne}px`,...j,...m.style},onDragEnd:()=>{Z(!1),V(null),be.current=null},onPointerDown:e=>{_e||!de||(ae.current=new Date,te(ve.current),e.target.setPointerCapture(e.pointerId),"BUTTON"!==e.target.tagName&&(Z(!0),be.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{var e,t,n,r;if(K||!de)return;be.current=null;let o=Number((null==(e=se.current)?void 0:e.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),a=Number((null==(t=se.current)?void 0:t.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),s=(new Date).getTime()-(null==(n=ae.current)?void 0:n.getTime()),i="x"===H?o:a,l=Math.abs(i)/s;if(Math.abs(i)>=20||l>.11)return te(ve.current),null==(r=m.onDismiss)||r.call(m,m),W("x"===H?o>0?"right":"left":a>0?"down":"up"),je(),Q(!0),void X(!1);Z(!1),V(null)},onPointerMove:e=>{var n,r,o,a;if(!be.current||!de||(null==(n=window.getSelection())?void 0:n.toString().length)>0)return;let s=e.clientY-be.current.y,i=e.clientX-be.current.x,l=null!=(r=t.swipeDirections)?r:function(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}(R);!H&&(Math.abs(i)>1||Math.abs(s)>1)&&V(Math.abs(i)>Math.abs(s)?"x":"y");let c={x:0,y:0};"y"===H?(l.includes("top")||l.includes("bottom"))&&(l.includes("top")&&s<0||l.includes("bottom")&&s>0)&&(c.y=s):"x"===H&&(l.includes("left")||l.includes("right"))&&(l.includes("left")&&i<0||l.includes("right")&&i>0)&&(c.x=i),(Math.abs(c.x)>0||Math.abs(c.y)>0)&&X(!0),null==(o=se.current)||o.style.setProperty("--swipe-amount-x",`${c.x}px`),null==(a=se.current)||a.style.setProperty("--swipe-amount-y",`${c.y}px`)}},me&&!m.jsx?e.createElement("button",{"aria-label":F,"data-disabled":_e,"data-close-button":!0,onClick:_e||!de?()=>{}:()=>{var e;je(),null==(e=m.onDismiss)||e.call(m,m)},className:dp(null==P?void 0:P.closeButton,null==(a=null==m?void 0:m.classNames)?void 0:a.closeButton)},null!=(s=null==L?void 0:L.close)?s:np):null,m.jsx||(0,e.isValidElement)(m.title)?m.jsx?m.jsx:"function"==typeof m.title?m.title():m.title:e.createElement(e.Fragment,null,ce||m.icon||m.promise?e.createElement("div",{"data-icon":"",className:dp(null==P?void 0:P.icon,null==(i=null==m?void 0:m.classNames)?void 0:i.icon)},m.promise||"loading"===m.type&&!m.icon?m.icon||function(){var t,n,r;return null!=L&&L.loading?e.createElement("div",{className:dp(null==P?void 0:P.loader,null==(t=null==m?void 0:m.classNames)?void 0:t.loader,"sonner-loader"),"data-visible":"loading"===ce},L.loading):O?e.createElement("div",{className:dp(null==P?void 0:P.loader,null==(n=null==m?void 0:m.classNames)?void 0:n.loader,"sonner-loader"),"data-visible":"loading"===ce},O):e.createElement(Qm,{className:dp(null==P?void 0:P.loader,null==(r=null==m?void 0:m.classNames)?void 0:r.loader),visible:"loading"===ce})}():null,"loading"!==m.type?m.icon||(null==L?void 0:L[ce])||(e=>{switch(e){case"success":return Jm;case"info":return ep;case"warning":return Xm;case"error":return tp;default:return null}})(ce):null):null,e.createElement("div",{"data-content":"",className:dp(null==P?void 0:P.content,null==(l=null==m?void 0:m.classNames)?void 0:l.content)},e.createElement("div",{"data-title":"",className:dp(null==P?void 0:P.title,null==(c=null==m?void 0:m.classNames)?void 0:c.title)},"function"==typeof m.title?m.title():m.title),m.description?e.createElement("div",{"data-description":"",className:dp(T,fe,null==P?void 0:P.description,null==(d=null==m?void 0:m.classNames)?void 0:d.description)},"function"==typeof m.description?m.description():m.description):null),(0,e.isValidElement)(m.cancel)?m.cancel:m.cancel&&ip(m.cancel)?e.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||E,onClick:e=>{var t,n;ip(m.cancel)&&de&&(null==(n=(t=m.cancel).onClick)||n.call(t,e),je())},className:dp(null==P?void 0:P.cancelButton,null==(u=null==m?void 0:m.classNames)?void 0:u.cancelButton)},m.cancel.label):null,(0,e.isValidElement)(m.action)?m.action:m.action&&ip(m.action)?e.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||N,onClick:e=>{var t,n;ip(m.action)&&(null==(n=(t=m.action).onClick)||n.call(t,e),!e.defaultPrevented&&je())},className:dp(null==P?void 0:P.actionButton,null==(f=null==m?void 0:m.classNames)?void 0:f.actionButton)},m.action.label):null))};function fp(){if("undefined"==typeof window||"undefined"==typeof document)return"ltr";let e=document.documentElement.getAttribute("dir");return"auto"!==e&&e?e:window.getComputedStyle(document.documentElement).direction}function hp(e,t){let n={};return[e,t].forEach(((e,t)=>{let r=1===t,o=r?"--mobile-offset":"--offset",a=r?"16px":"32px";function s(e){["top","right","bottom","left"].forEach((t=>{n[`${o}-${t}`]="number"==typeof e?`${e}px`:e}))}"number"==typeof e||"string"==typeof e?s(e):"object"==typeof e?["top","right","bottom","left"].forEach((t=>{void 0===e[t]?n[`${o}-${t}`]=a:n[`${o}-${t}`]="number"==typeof e[t]?`${e[t]}px`:e[t]})):s(a)})),n}var mp=(0,e.forwardRef)((function(t,n){let{invert:r,position:o="bottom-right",hotkey:a=["altKey","KeyT"],expand:s,closeButton:i,className:l,offset:c,mobileOffset:d,theme:u="light",richColors:f,duration:h,style:m,visibleToasts:p=lp,toastOptions:g,dir:v=fp(),gap:y=cp,loadingIcon:b,icons:x,containerAriaLabel:w="Notifications",pauseWhenPageIsHidden:k}=t,[S,C]=e.useState([]),_=e.useMemo((()=>Array.from(new Set([o].concat(S.filter((e=>e.position)).map((e=>e.position)))))),[S,o]),[j,E]=e.useState([]),[N,D]=e.useState(!1),[T,A]=e.useState(!1),[R,M]=e.useState("system"!==u?u:"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),O=e.useRef(null),I=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),P=e.useRef(null),L=e.useRef(!1),F=e.useCallback((e=>{C((t=>{var n;return null!=(n=t.find((t=>t.id===e.id)))&&n.delete||op.dismiss(e.id),t.filter((({id:t})=>t!==e.id))}))}),[]);return e.useEffect((()=>op.subscribe((e=>{e.dismiss?C((t=>t.map((t=>t.id===e.id?{...t,delete:!0}:t)))):setTimeout((()=>{pe.flushSync((()=>{C((t=>{let n=t.findIndex((t=>t.id===e.id));return-1!==n?[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]:[e,...t]}))}))}))}))),[]),e.useEffect((()=>{if("system"!==u)return void M(u);if("system"===u&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?M("dark"):M("light")),"undefined"==typeof window)return;let e=window.matchMedia("(prefers-color-scheme: dark)");try{e.addEventListener("change",(({matches:e})=>{M(e?"dark":"light")}))}catch(t){e.addListener((({matches:e})=>{try{M(e?"dark":"light")}catch(e){console.error(e)}}))}}),[u]),e.useEffect((()=>{S.length<=1&&D(!1)}),[S]),e.useEffect((()=>{let e=e=>{var t,n;a.every((t=>e[t]||e.code===t))&&(D(!0),null==(t=O.current)||t.focus()),"Escape"===e.code&&(document.activeElement===O.current||null!=(n=O.current)&&n.contains(document.activeElement))&&D(!1)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[a]),e.useEffect((()=>{if(O.current)return()=>{P.current&&(P.current.focus({preventScroll:!0}),P.current=null,L.current=!1)}}),[O.current]),e.createElement("section",{ref:n,"aria-label":`${w} ${I}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},_.map(((n,o)=>{var a;let[u,w]=n.split("-");return S.length?e.createElement("ol",{key:n,dir:"auto"===v?fp():v,tabIndex:-1,ref:O,className:l,"data-sonner-toaster":!0,"data-theme":R,"data-y-position":u,"data-lifted":N&&S.length>1&&!s,"data-x-position":w,style:{"--front-toast-height":`${(null==(a=j[0])?void 0:a.height)||0}px`,"--width":"356px","--gap":`${y}px`,...m,...hp(c,d)},onBlur:e=>{L.current&&!e.currentTarget.contains(e.relatedTarget)&&(L.current=!1,P.current&&(P.current.focus({preventScroll:!0}),P.current=null))},onFocus:e=>{e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||L.current||(L.current=!0,P.current=e.relatedTarget)},onMouseEnter:()=>D(!0),onMouseMove:()=>D(!0),onMouseLeave:()=>{T||D(!1)},onDragEnd:()=>D(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||A(!0)},onPointerUp:()=>A(!1)},S.filter((e=>!e.position&&0===o||e.position===n)).map(((o,a)=>{var l,c;return e.createElement(up,{key:o.id,icons:x,index:a,toast:o,defaultRichColors:f,duration:null!=(l=null==g?void 0:g.duration)?l:h,className:null==g?void 0:g.className,descriptionClassName:null==g?void 0:g.descriptionClassName,invert:r,visibleToasts:p,closeButton:null!=(c=null==g?void 0:g.closeButton)?c:i,interacting:T,position:n,style:null==g?void 0:g.style,unstyled:null==g?void 0:g.unstyled,classNames:null==g?void 0:g.classNames,cancelButtonStyle:null==g?void 0:g.cancelButtonStyle,actionButtonStyle:null==g?void 0:g.actionButtonStyle,removeToast:F,toasts:S.filter((e=>e.position==o.position)),heights:j.filter((e=>e.position==o.position)),setHeights:E,expandByDefault:s,gap:y,loadingIcon:b,expanded:N,pauseWhenPageIsHidden:k,swipeDirections:t.swipeDirections})}))):null})))}));function pp({message:e,url:t,variant:n="default"}){return(0,De.jsxs)("div",{className:`flex items-center justify-between gap-4 rounded-md p-3 text-sm font-medium w-[280px] shadow-lg ${{default:"bg-neutral-900 text-white border border-neutral-800",success:"bg-green-600 text-white border border-green-500",error:"bg-red-600 text-white border border-red-500"}[n]}`,children:[(0,De.jsx)("div",{className:"flex-1",children:e}),t&&(0,De.jsx)("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2 text-xs hover:no-underline",children:"View"})]})}function gp(e){if(!e?.message)return;const t=e?.variant||"default";sp.custom((n=>(0,De.jsx)(pp,{message:e.message,url:e.url,variant:t})),{duration:4e3})}function vp(e){e&&sp.custom((t=>(0,De.jsx)(pp,{message:e,variant:"error"})),{duration:4e3})}const yp=Mi("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);function bp(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&"object"==typeof e&&t&&"object"==typeof t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const r of n)if(!t.hasOwnProperty(r)||!bp(e[r],t[r]))return!1;return!0}return!1}function xp(){const t=Y().pathname.includes("/instances/edit/");let n=null;try{n=(0,e.useContext)(Zm)}catch(e){n=null}const r=K(),{event:o,setEvent:a,loading:s,setLoading:i,setIsPublishing:l,setDisableAutoSave:c}=Fl(),[d,u]=(0,e.useState)(!1),[f,h]=(0,e.useState)(!1),m=(0,e.useRef)(!1),p=t?d||s:!o?.title?.trim()||d||s,g=async(e,t={})=>{u(!0);try{const n=await Ne()({path:`${eventkoi_params.api}/${e}`,method:"post",data:t,headers:{"EVENTKOI-API-KEY":eventkoi_params.api_key}});return gp(n),h(!0),setTimeout((()=>h(!1)),3e3),n}catch(e){throw gp({message:"Failed to save. Please try again."}),e}finally{u(!1)}},v=async e=>{if(console.log(o),!o?.title?.trim())return;"publish"===e&&(c?.(!0),l?.(!0),await new Promise((e=>setTimeout(e,10))));const t={...o,wp_status:e},n=await g("update_event",{event:t});n?.id&&(a?.(n),m.current||(m.current=!0,window.location.hash.includes("/events/add/")&&(window.location.hash=window.location.hash.replace("/events/add/",`/events/${n.id}/`)))),"publish"===e&&(l?.(!1),c?.(!1))},y=t&&n?.data&&n?.originalData&&!bp(n.data,n.originalData);return(0,De.jsxs)("div",{className:"flex gap-1 md:gap-2",children:[f&&(0,De.jsx)("div",{className:"text-xs text-muted-foreground mr-6 self-center",children:"Saved just now"}),t&&n?(0,De.jsxs)(De.Fragment,{children:[o?.url&&n?.timestamp&&(0,De.jsx)(tl,{variant:"link",onClick:()=>window.open(`${o.url}?instance=${n.timestamp}`,"_blank"),children:"Preview"}),(0,De.jsx)(tl,{variant:"ghost",onClick:()=>{n.resetData(),gp({message:"Changes reverted."})},disabled:!y,children:"Reset"}),(0,De.jsx)(tl,{disabled:!y||d,onClick:async()=>{if(n?.data&&n.eventId&&n.timestamp){u(!0);try{await Ne()({path:`${eventkoi_params.api}/edit_instance`,method:"post",data:{event_id:parseInt(n.eventId),timestamp:parseInt(n.timestamp),overrides:n.data},headers:{"EVENTKOI-API-KEY":eventkoi_params.api_key}}),a?.((e=>{const t={...e?.recurrence_overrides||{}};return t[n.timestamp]={...t[n.timestamp]||{},...n.data,modified_at:(new Date).toISOString()},{...e,recurrence_overrides:t}})),gp({message:"Instance updated!"}),h(!0),setTimeout((()=>h(!1)),3e3)}catch(e){gp({message:"Failed to save instance."})}finally{u(!1)}}},children:d?(0,De.jsxs)("span",{className:"flex items-center gap-2",children:[(0,De.jsx)(yp,{className:"h-4 w-4 animate-spin"}),"Saving..."]}):(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)("span",{className:"sm:hidden",children:"Save"}),(0,De.jsx)("span",{className:"hidden sm:inline",children:"Save instance"})]})})]}):(0,De.jsxs)(De.Fragment,{children:["draft"===o?.wp_status&&(0,De.jsx)(tl,{variant:"ghost",disabled:p,onClick:()=>v("draft"),children:"Save draft"}),(0,De.jsx)(tl,{variant:"link",disabled:p||!o?.url,onClick:()=>window.open(o?.url,"_blank"),children:"Preview"}),(0,De.jsxs)("div",{className:"flex items-center gap-[1px]",children:[(0,De.jsx)(tl,{variant:"default",className:"rounded-r-none",disabled:p,onClick:()=>v("publish"),children:d?(0,De.jsxs)("span",{className:"flex items-center gap-2",children:[(0,De.jsx)(yp,{className:"h-4 w-4 animate-spin"}),"Saving..."]}):"draft"===o?.wp_status?"Publish":"Save"}),(0,De.jsxs)(zm,{modal:!1,children:[(0,De.jsx)(Hm,{asChild:!0,children:(0,De.jsx)(tl,{variant:"default",size:"icon",className:"rounded-l-none",disabled:p,children:(0,De.jsx)(Oi,{className:"w-4 h-4"})})}),(0,De.jsxs)($m,{className:"w-56 z-[510000]",align:"end",children:[(0,De.jsx)(Gm,{disabled:!o?.id,onClick:async()=>{const e=await g("duplicate_event",{event_id:o?.id});e?.id&&o?.id&&(window.location.hash=window.location.hash.replace(o.id,e.id)),a?.(e)},children:"Create duplicate event"}),(0,De.jsx)(qm,{}),"publish"===o?.wp_status&&(0,De.jsx)(Gm,{onClick:()=>v("draft"),children:"Unpublish"}),(0,De.jsx)(Gm,{className:"text-destructive focus:text-destructive",onClick:async()=>{await g("delete_event",{event_id:o?.id}),r("/events")},children:"Move to trash"})]})]})]})]})]})}function wp(){const{event:e,setEvent:t}=Fl();return(0,De.jsxs)("header",{className:Ni("flex items-center text-sm h-20 sticky top-[0px] z-[100000] bg-white md:bg-muted shadow-sm border-b gap-2 md:gap-6 px-4 md:px-8"),children:[(0,De.jsx)(Ai,{}),(0,De.jsx)(Vl,{}),(0,De.jsx)("div",{className:"flex w-full justify-end",children:(0,De.jsx)(xp,{})})]})}const kp=Mi("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);function Sp({className:e}){return(0,De.jsxs)("span",{className:Ni("ml-2 inline-flex items-center uppercase px-[6px] py-[3px] rounded-full bg-primary text-xs font-semibold text-white gap-[2px]",e),style:{lineHeight:1.2},children:[(0,De.jsx)(kp,{className:"h-3 w-3 fill-white text-white",strokeWidth:0}),"Pro"]})}function Cp(){const{event:e}=Fl(),t=Y();if(t.pathname.includes("/instances/edit/"))return null;const n=t.pathname.split("/")[3]||"main",r=[{name:"main",title:"Main"},..."recurring"===e?.date_type?[{name:"instances",title:"Recurring instances"}]:[]];return(0,De.jsx)("nav",{className:"grid gap-1 text-sm text-muted-foreground",children:r.map((e=>{const t=n===e.name;return(0,De.jsxs)(Se,{to:e.name,className:"font-medium px-3 py-3 rounded-lg "+(t?"text-foreground bg-foreground/5":""),children:[e.title,"instances"===e.name&&(0,De.jsx)(Sp,{className:"ml-0"})]},e.name)}))})}const _p=Mi("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);function jp(e,t,n=!0){const r=n&&e?.recurrence_overrides?.[t]||{},o=["title","description","summary","image","image_id","template","locations"],a={};for(const t of o)n&&void 0!==r[t]?a[t]=r[t]:e&&Object.prototype.hasOwnProperty.call(e,t)?a[t]=e[t]:a[t]=null;return a}function Ep(){const{loading:t,setLoading:n,event:r,setEvent:o,settings:a,notFound:s,restoreEvent:i}=function(){const t=K(),n=Y(),{id:r}=X(),[o,a]=(0,e.useState)(!0),[s,i]=(0,e.useState)(null),[l,c]=(0,e.useState)(null),[d,u]=(0,e.useState)(!1),f=parseInt(r,10)||0,h=async()=>{try{const e=await Ne()({path:`${eventkoi_params.api}/event?id=${f}`,method:"get"}),t={...e,recurrence_rules:Array.isArray(e.recurrence_rules)?e.recurrence_rules:[]};i(t)}catch{u(!0)}},m=async()=>{try{const e=await Ne()({path:`${eventkoi_params.api}/settings`,method:"get",headers:{"EVENTKOI-API-KEY":eventkoi_params.api_key}});c(e)}catch{}};return(0,e.useEffect)((()=>{if(f)Promise.all([h(),m()]).finally((()=>a(!1)));else{const e={...eventkoi_params.new_event,recurrence_rules:[]};i(e),a(!1)}}),[f]),(0,e.useEffect)((()=>{n.pathname.endsWith(r)&&t("main")}),[n,r,t]),{loading:o,setLoading:a,event:s,setEvent:i,settings:l,notFound:d,restoreEvent:async()=>{a(!0);try{const e=await Ne()({path:`${eventkoi_params.api}/restore_event`,method:"post",data:{event_id:s?.id},headers:{"EVENTKOI-API-KEY":eventkoi_params.api_key}}),t={...e.event,recurrence_rules:Array.isArray(e.event?.recurrence_rules)?e.event.recurrence_rules:[]};i(t),(e=>{e.message&&sp((({dismiss:t})=>(0,De.jsxs)("div",{className:"flex items-center cursor-pointer active:ring-2 active:ring-ring active:ring-offset-2 bg-[#222222] rounded-sm border-0 font-medium justify-between p-4 gap-4 text-sm leading-5 text-primary-foreground w-60",onClick:t,children:[e.message,e.url&&(0,De.jsx)("div",{onClick:t=>{t.stopPropagation(),window.open(e.url,"_blank")},className:"underline underline-offset-2 hover:no-underline",children:"View event"})]})),{duration:4e3})})(e)}finally{a(!1)}}}}(),[l,c]=(0,e.useState)(!1),[d,u]=(0,e.useState)(!1),[f,h]=(0,e.useState)({}),m=Y(),{id:p,timestamp:g}=X(),v=m.pathname.includes("/instances/edit/"),y=(0,e.useMemo)((()=>v&&r&&g?jp(r,g,!1):null),[v,r,g]);if((0,e.useEffect)((()=>{!r?.id&&window.location.hash.includes("/events/add/")&&(async()=>{try{const e=await Ne()({path:`${eventkoi_params.api}/update_event`,method:"POST",data:{event:{title:"",excerpt:"(auto-draft)",wp_status:"draft"}},headers:{"EVENTKOI-API-KEY":eventkoi_params.api_key}});console.log(e.id),e?.id&&(o(e),window.location.hash=window.location.hash.replace("/events/add/",`/events/${e.id}/`))}catch(e){console.error("❌ Failed to create auto-draft",e)}})()}),[]),(0,e.useEffect)((()=>{if(v&&r?.id&&g){const e=jp(r,g,!0);h(e)}}),[v,r,g]),!r||v&&!y)return null;if("trash"===r.wp_status)return(0,De.jsxs)("div",{className:"flex-1 flex items-center justify-center text-sm flex-col gap-4 relative w-full",children:[(0,De.jsx)("div",{className:"absolute top-4 left-4",children:(0,De.jsx)(tl,{variant:"link",asChild:!0,children:(0,De.jsxs)(Se,{to:"/events",children:[(0,De.jsx)(Hl,{className:"mr-2 h-4 w-4"}),"Back"]})})}),(0,De.jsx)(_p,{className:"w-10 h-10 text-muted-foreground",strokeWidth:1}),(0,De.jsx)("div",{className:"text-base text-muted-foreground",children:"Event has moved to Trash. Restore it before you can edit."}),(0,De.jsx)("div",{className:"pt-4",children:(0,De.jsx)(tl,{onClick:i,children:"Restore event"})})]});const b=(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)(wp,{}),(0,De.jsxs)(Fi,{className:v?"max-w-[800px]":"max-w-[1180px]",children:[(0,De.jsxs)("div",{className:Ni("w-full mx-auto items-start gap-6",v?"grid grid-cols-1":"grid md:grid-cols-[180px_1fr] grid-cols-1"),children:[!v&&(0,De.jsx)(Cp,{}),(0,De.jsx)("div",{className:"grid",children:(0,De.jsx)(de,{context:{instanceData:f,setInstanceData:h}})})]}),(0,De.jsx)("div",{className:"h-10"})]})]});return(0,De.jsx)(Ll.Provider,{value:{event:r,setEvent:o,loading:t,setLoading:n,settings:a,restoreEvent:i,isPublishing:l,setIsPublishing:c,disableAutoSave:d,setDisableAutoSave:u},children:v?(0,De.jsx)(Zm.Provider,{value:{data:f,setData:h,originalData:y,setOriginalData:()=>{},resetData:async()=>{if(r?.id&&g)try{await Ne()({path:`${eventkoi_params.api}/reset_instance`,method:"POST",headers:{"EVENTKOI-API-KEY":eventkoi_params.api_key},data:{event_id:r.id,timestamp:g}});const e=jp(r,g,!1);h(e)}catch(e){console.error("Failed to reset instance:",e)}},eventId:r.id,timestamp:g,setEvent:o},children:b}):b})}const Np=Mi("EllipsisVertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);function Dp({table:e,base:t,fetchResults:n,addTo:r,queryStatus:o}){const a=async r=>{let o=e.getFilteredSelectedRowModel().rows,a=[];o.forEach(((e,t)=>{a.push(e.original.id)}));let s={ids:a,action:r,base:t};const i=`${eventkoi_params.api}/${r}_${t}`;await Ne()({path:i,method:"post",data:s,headers:{"EVENTKOI-API-KEY":eventkoi_params.api_key}}).then((t=>{e.setRowSelection({}),n(t.success)})).catch((e=>{}))};return(0,De.jsxs)(zm,{children:[(0,De.jsx)(Hm,{asChild:!0,children:(0,De.jsxs)(tl,{variant:"outline",className:"flex font-normal w-full sm:w-auto justify-start sm:justify-center",children:[(0,De.jsx)(Np,{className:"mr-2 h-4 w-4"}),"Bulk actions"]})}),(0,De.jsx)($m,{align:"start",className:"w-[180px]",children:"trash"==o?(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)(Gm,{disabled:0==e.getFilteredSelectedRowModel().rows.length,onClick:()=>{a("restore")},children:(0,De.jsx)("span",{children:"Restore"})}),(0,De.jsx)(Gm,{disabled:0==e.getFilteredSelectedRowModel().rows.length,onClick:()=>{a("remove")},children:(0,De.jsx)("span",{children:"Delete permanently"})})]}):(0,De.jsxs)(De.Fragment,{children:["calendars"!==t&&(0,De.jsx)(Gm,{disabled:0==e.getFilteredSelectedRowModel().rows.length,onClick:()=>{a("duplicate")},children:(0,De.jsx)("span",{children:"Duplicate"})}),(0,De.jsx)(Gm,{disabled:0==e.getFilteredSelectedRowModel().rows.length,onClick:()=>{a("delete")},children:(0,De.jsx)("span",{children:["calendars"].includes(t)?"Delete":"Move to trash"})}),r&&e.getFilteredSelectedRowModel().rows.length>0&&(0,De.jsxs)(Bm,{children:[(0,De.jsx)(Wm,{children:(0,De.jsx)("span",{children:r})}),(0,De.jsx)(Vm,{children:(0,De.jsx)(Um,{children:(0,De.jsx)(Ym,{children:"Panel"})})})]}),r&&0==e.getFilteredSelectedRowModel().rows.length&&(0,De.jsx)(Gm,{disabled:0==e.getFilteredSelectedRowModel().rows.length,children:(0,De.jsx)("span",{children:r})})]})})]})}function Tp(e){const t=Ye(e);return t.setDate(1),t.setHours(0,0,0,0),t}function Ap(e){const t=Ye(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function Rp(e,t){const n=Ye(e),r=n.getFullYear(),o=n.getDate(),a=Qe(e,0);a.setFullYear(r,t,15),a.setHours(0,0,0,0);const s=function(e){const t=Ye(e),n=t.getFullYear(),r=t.getMonth(),o=Qe(e,0);return o.setFullYear(n,r+1,0),o.setHours(0,0,0,0),o.getDate()}(a);return n.setMonth(t,Math.min(o,s)),n}function Mp(e,t){const n=Ye(e);return isNaN(+n)?Qe(e,NaN):(n.setFullYear(t),n)}function Op(e,t){const n=Ye(e),r=Ye(t);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}function Ip(e,t){const n=Ye(e);if(isNaN(t))return Qe(e,NaN);if(!t)return n;const r=n.getDate(),o=Qe(e,n.getTime());return o.setMonth(n.getMonth()+t+1,0),r>=o.getDate()?o:(n.setFullYear(o.getFullYear(),o.getMonth(),r),n)}function Pp(e,t){const n=Ye(e),r=Ye(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function Lp(e,t){return+Ye(e)<+Ye(t)}function Fp(e,t){const n=Ye(e);return isNaN(t)?Qe(e,NaN):t?(n.setDate(n.getDate()+t),n):n}function zp(e,t){return+qe(e)===+qe(t)}function Hp(e,t){const n=Ye(e),r=Ye(t);return n.getTime()>r.getTime()}function Vp(e,t){return Fp(e,-t)}function Bp(e,t){return Fp(e,7*t)}function Wp(e,t){return Ip(e,12*t)}function Up(e,t){const n=$e(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Ye(e),a=o.getDay(),s=6+(a<r?-7:0)-(a-r);return o.setDate(o.getDate()+s),o.setHours(23,59,59,999),o}function $p(e){return Up(e,{weekStartsOn:1})}function Gp(e,t){return function(e,t,n){const r=Xe(e,n),o=Xe(t,n),a=+r-Ze(r),s=+o-Ze(o);return Math.round((a-s)/Ge)}(function(e){const t=Ye(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(0,0,0,0),t}(e),Tp(e),t)+1}var Yp=function(){return Yp=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Yp.apply(this,arguments)};function qp(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function Zp(e){return"multiple"===e.mode}function Kp(e){return"range"===e.mode}function Qp(e){return"single"===e.mode}"function"==typeof SuppressedError&&SuppressedError;var Jp={root:"rdp",multiple_months:"rdp-multiple_months",with_weeknumber:"rdp-with_weeknumber",vhidden:"rdp-vhidden",button_reset:"rdp-button_reset",button:"rdp-button",caption:"rdp-caption",caption_start:"rdp-caption_start",caption_end:"rdp-caption_end",caption_between:"rdp-caption_between",caption_label:"rdp-caption_label",caption_dropdowns:"rdp-caption_dropdowns",dropdown:"rdp-dropdown",dropdown_month:"rdp-dropdown_month",dropdown_year:"rdp-dropdown_year",dropdown_icon:"rdp-dropdown_icon",months:"rdp-months",month:"rdp-month",table:"rdp-table",tbody:"rdp-tbody",tfoot:"rdp-tfoot",head:"rdp-head",head_row:"rdp-head_row",head_cell:"rdp-head_cell",nav:"rdp-nav",nav_button:"rdp-nav_button",nav_button_previous:"rdp-nav_button_previous",nav_button_next:"rdp-nav_button_next",nav_icon:"rdp-nav_icon",row:"rdp-row",weeknumber:"rdp-weeknumber",cell:"rdp-cell",day:"rdp-day",day_today:"rdp-day_today",day_outside:"rdp-day_outside",day_selected:"rdp-day_selected",day_disabled:"rdp-day_disabled",day_hidden:"rdp-day_hidden",day_range_start:"rdp-day_range_start",day_range_end:"rdp-day_range_end",day_range_middle:"rdp-day_range_middle"},Xp=Object.freeze({__proto__:null,formatCaption:function(e,t){return Ct(e,"LLLL y",t)},formatDay:function(e,t){return Ct(e,"d",t)},formatMonthCaption:function(e,t){return Ct(e,"LLLL",t)},formatWeekNumber:function(e){return"".concat(e)},formatWeekdayName:function(e,t){return Ct(e,"cccccc",t)},formatYearCaption:function(e,t){return Ct(e,"yyyy",t)}}),eg=Object.freeze({__proto__:null,labelDay:function(e,t,n){return Ct(e,"do MMMM (EEEE)",n)},labelMonthDropdown:function(){return"Month: "},labelNext:function(){return"Go to next month"},labelPrevious:function(){return"Go to previous month"},labelWeekNumber:function(e){return"Week n. ".concat(e)},labelWeekday:function(e,t){return Ct(e,"cccc",t)},labelYearDropdown:function(){return"Year: "}});var tg=(0,e.createContext)(void 0);function ng(e){var t,n,r,o,a,s=e.initialProps,i=(n=Jp,r=We,o=new Date,{captionLayout:"buttons",classNames:n,formatters:Xp,labels:eg,locale:r,modifiersClassNames:{},modifiers:{},numberOfMonths:1,styles:{},today:o,mode:"default"}),l=function(e){var t=e.fromYear,n=e.toYear,r=e.fromMonth,o=e.toMonth,a=e.fromDate,s=e.toDate;return r?a=Tp(r):t&&(a=new Date(t,0,1)),o?s=Ap(o):n&&(s=new Date(n,11,31)),{fromDate:a?qe(a):void 0,toDate:s?qe(s):void 0}}(s),c=l.fromDate,d=l.toDate,u=null!==(t=s.captionLayout)&&void 0!==t?t:i.captionLayout;"buttons"===u||c&&d||(u="buttons"),(Qp(s)||Zp(s)||Kp(s))&&(a=s.onSelect);var f=Yp(Yp(Yp({},i),s),{captionLayout:u,classNames:Yp(Yp({},i.classNames),s.classNames),components:Yp({},s.components),formatters:Yp(Yp({},i.formatters),s.formatters),fromDate:c,labels:Yp(Yp({},i.labels),s.labels),mode:s.mode||i.mode,modifiers:Yp(Yp({},i.modifiers),s.modifiers),modifiersClassNames:Yp(Yp({},i.modifiersClassNames),s.modifiersClassNames),onSelect:a,styles:Yp(Yp({},i.styles),s.styles),toDate:d});return(0,De.jsx)(tg.Provider,{value:f,children:e.children})}function rg(){var t=(0,e.useContext)(tg);if(!t)throw new Error("useDayPicker must be used within a DayPickerProvider.");return t}function og(e){var t=rg(),n=t.locale,r=t.classNames,o=t.styles,a=t.formatters.formatCaption;return(0,De.jsx)("div",{className:r.caption_label,style:o.caption_label,"aria-live":"polite",role:"presentation",id:e.id,children:a(e.displayMonth,{locale:n})})}function ag(e){return(0,De.jsx)("svg",Yp({width:"8px",height:"8px",viewBox:"0 0 120 120","data-testid":"iconDropdown"},e,{children:(0,De.jsx)("path",{d:"M4.22182541,48.2218254 C8.44222828,44.0014225 15.2388494,43.9273804 19.5496459,47.9996989 L19.7781746,48.2218254 L60,88.443 L100.221825,48.2218254 C104.442228,44.0014225 111.238849,43.9273804 115.549646,47.9996989 L115.778175,48.2218254 C119.998577,52.4422283 120.07262,59.2388494 116.000301,63.5496459 L115.778175,63.7781746 L67.7781746,111.778175 C63.5577717,115.998577 56.7611506,116.07262 52.4503541,112.000301 L52.2218254,111.778175 L4.22182541,63.7781746 C-0.0739418023,59.4824074 -0.0739418023,52.5175926 4.22182541,48.2218254 Z",fill:"currentColor",fillRule:"nonzero"})}))}function sg(e){var t,n,r=e.onChange,o=e.value,a=e.children,s=e.caption,i=e.className,l=e.style,c=rg(),d=null!==(n=null===(t=c.components)||void 0===t?void 0:t.IconDropdown)&&void 0!==n?n:ag;return(0,De.jsxs)("div",{className:i,style:l,children:[(0,De.jsx)("span",{className:c.classNames.vhidden,children:e["aria-label"]}),(0,De.jsx)("select",{name:e.name,"aria-label":e["aria-label"],className:c.classNames.dropdown,style:c.styles.dropdown,value:o,onChange:r,children:a}),(0,De.jsxs)("div",{className:c.classNames.caption_label,style:c.styles.caption_label,"aria-hidden":"true",children:[s,(0,De.jsx)(d,{className:c.classNames.dropdown_icon,style:c.styles.dropdown_icon})]})]})}function ig(e){var t,n=rg(),r=n.fromDate,o=n.toDate,a=n.styles,s=n.locale,i=n.formatters.formatMonthCaption,l=n.classNames,c=n.components,d=n.labels.labelMonthDropdown;if(!r)return(0,De.jsx)(De.Fragment,{});if(!o)return(0,De.jsx)(De.Fragment,{});var u=[];if(function(e,t){const n=Ye(e),r=Ye(t);return n.getFullYear()===r.getFullYear()}(r,o))for(var f=Tp(r),h=r.getMonth();h<=o.getMonth();h++)u.push(Rp(f,h));else for(f=Tp(new Date),h=0;h<=11;h++)u.push(Rp(f,h));var m=null!==(t=null==c?void 0:c.Dropdown)&&void 0!==t?t:sg;return(0,De.jsx)(m,{name:"months","aria-label":d(),className:l.dropdown_month,style:a.dropdown_month,onChange:function(t){var n=Number(t.target.value),r=Rp(Tp(e.displayMonth),n);e.onChange(r)},value:e.displayMonth.getMonth(),caption:i(e.displayMonth,{locale:s}),children:u.map((function(e){return(0,De.jsx)("option",{value:e.getMonth(),children:i(e,{locale:s})},e.getMonth())}))})}function lg(e){var t,n=e.displayMonth,r=rg(),o=r.fromDate,a=r.toDate,s=r.locale,i=r.styles,l=r.classNames,c=r.components,d=r.formatters.formatYearCaption,u=r.labels.labelYearDropdown,f=[];if(!o)return(0,De.jsx)(De.Fragment,{});if(!a)return(0,De.jsx)(De.Fragment,{});for(var h=o.getFullYear(),m=a.getFullYear(),p=h;p<=m;p++)f.push(Mp(Je(new Date),p));var g=null!==(t=null==c?void 0:c.Dropdown)&&void 0!==t?t:sg;return(0,De.jsx)(g,{name:"years","aria-label":u(),className:l.dropdown_year,style:i.dropdown_year,onChange:function(t){var r=Mp(Tp(n),Number(t.target.value));e.onChange(r)},value:n.getFullYear(),caption:d(n,{locale:s}),children:f.map((function(e){return(0,De.jsx)("option",{value:e.getFullYear(),children:d(e,{locale:s})},e.getFullYear())}))})}var cg=(0,e.createContext)(void 0);function dg(t){var n=rg(),r=function(){var t=rg(),n=function(e){var t=e.month,n=e.defaultMonth,r=e.today,o=t||n||r||new Date,a=e.toDate,s=e.fromDate,i=e.numberOfMonths,l=void 0===i?1:i;return a&&Op(a,o)<0&&(o=Ip(a,-1*(l-1))),s&&Op(o,s)<0&&(o=s),Tp(o)}(t),r=function(t,n){var r=(0,e.useState)(t),o=r[0];return[void 0===n?o:n,r[1]]}(n,t.month),o=r[0],a=r[1];return[o,function(e){var n;if(!t.disableNavigation){var r=Tp(e);a(r),null===(n=t.onMonthChange)||void 0===n||n.call(t,r)}}]}(),o=r[0],a=r[1],s=function(e,t){for(var n=t.reverseMonths,r=t.numberOfMonths,o=Tp(e),a=Op(Tp(Ip(o,r)),o),s=[],i=0;i<a;i++){var l=Ip(o,i);s.push(l)}return n&&(s=s.reverse()),s}(o,n),i=function(e,t){if(!t.disableNavigation){var n=t.toDate,r=t.pagedNavigation,o=t.numberOfMonths,a=void 0===o?1:o,s=r?a:1,i=Tp(e);if(!n)return Ip(i,s);if(!(Op(n,e)<a))return Ip(i,s)}}(o,n),l=function(e,t){if(!t.disableNavigation){var n=t.fromDate,r=t.pagedNavigation,o=t.numberOfMonths,a=r?void 0===o?1:o:1,s=Tp(e);if(!n)return Ip(s,-a);if(!(Op(s,n)<=0))return Ip(s,-a)}}(o,n),c=function(e){return s.some((function(t){return Pp(e,t)}))},d={currentMonth:o,displayMonths:s,goToMonth:a,goToDate:function(e,t){c(e)||(t&&Lp(e,t)?a(Ip(e,1+-1*n.numberOfMonths)):a(e))},previousMonth:l,nextMonth:i,isDateDisplayed:c};return(0,De.jsx)(cg.Provider,{value:d,children:t.children})}function ug(){var t=(0,e.useContext)(cg);if(!t)throw new Error("useNavigation must be used within a NavigationProvider");return t}function fg(e){var t,n=rg(),r=n.classNames,o=n.styles,a=n.components,s=ug().goToMonth,i=function(t){s(Ip(t,e.displayIndex?-e.displayIndex:0))},l=null!==(t=null==a?void 0:a.CaptionLabel)&&void 0!==t?t:og,c=(0,De.jsx)(l,{id:e.id,displayMonth:e.displayMonth});return(0,De.jsxs)("div",{className:r.caption_dropdowns,style:o.caption_dropdowns,children:[(0,De.jsx)("div",{className:r.vhidden,children:c}),(0,De.jsx)(ig,{onChange:i,displayMonth:e.displayMonth}),(0,De.jsx)(lg,{onChange:i,displayMonth:e.displayMonth})]})}function hg(e){return(0,De.jsx)("svg",Yp({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:(0,De.jsx)("path",{d:"M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z",fill:"currentColor",fillRule:"nonzero"})}))}function mg(e){return(0,De.jsx)("svg",Yp({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:(0,De.jsx)("path",{d:"M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z",fill:"currentColor"})}))}var pg=(0,e.forwardRef)((function(e,t){var n=rg(),r=n.classNames,o=n.styles,a=[r.button_reset,r.button];e.className&&a.push(e.className);var s=a.join(" "),i=Yp(Yp({},o.button_reset),o.button);return e.style&&Object.assign(i,e.style),(0,De.jsx)("button",Yp({},e,{ref:t,type:"button",className:s,style:i}))}));function gg(e){var t,n,r=rg(),o=r.dir,a=r.locale,s=r.classNames,i=r.styles,l=r.labels,c=l.labelPrevious,d=l.labelNext,u=r.components;if(!e.nextMonth&&!e.previousMonth)return(0,De.jsx)(De.Fragment,{});var f=c(e.previousMonth,{locale:a}),h=[s.nav_button,s.nav_button_previous].join(" "),m=d(e.nextMonth,{locale:a}),p=[s.nav_button,s.nav_button_next].join(" "),g=null!==(t=null==u?void 0:u.IconRight)&&void 0!==t?t:mg,v=null!==(n=null==u?void 0:u.IconLeft)&&void 0!==n?n:hg;return(0,De.jsxs)("div",{className:s.nav,style:i.nav,children:[!e.hidePrevious&&(0,De.jsx)(pg,{name:"previous-month","aria-label":f,className:h,style:i.nav_button_previous,disabled:!e.previousMonth,onClick:e.onPreviousClick,children:"rtl"===o?(0,De.jsx)(g,{className:s.nav_icon,style:i.nav_icon}):(0,De.jsx)(v,{className:s.nav_icon,style:i.nav_icon})}),!e.hideNext&&(0,De.jsx)(pg,{name:"next-month","aria-label":m,className:p,style:i.nav_button_next,disabled:!e.nextMonth,onClick:e.onNextClick,children:"rtl"===o?(0,De.jsx)(v,{className:s.nav_icon,style:i.nav_icon}):(0,De.jsx)(g,{className:s.nav_icon,style:i.nav_icon})})]})}function vg(e){var t=rg().numberOfMonths,n=ug(),r=n.previousMonth,o=n.nextMonth,a=n.goToMonth,s=n.displayMonths,i=s.findIndex((function(t){return Pp(e.displayMonth,t)})),l=0===i,c=i===s.length-1,d=t>1&&(l||!c),u=t>1&&(c||!l);return(0,De.jsx)(gg,{displayMonth:e.displayMonth,hideNext:d,hidePrevious:u,nextMonth:o,previousMonth:r,onPreviousClick:function(){r&&a(r)},onNextClick:function(){o&&a(o)}})}function yg(e){var t,n,r=rg(),o=r.classNames,a=r.disableNavigation,s=r.styles,i=r.captionLayout,l=r.components,c=null!==(t=null==l?void 0:l.CaptionLabel)&&void 0!==t?t:og;return n=a?(0,De.jsx)(c,{id:e.id,displayMonth:e.displayMonth}):"dropdown"===i?(0,De.jsx)(fg,{displayMonth:e.displayMonth,id:e.id}):"dropdown-buttons"===i?(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)(fg,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),(0,De.jsx)(vg,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)(c,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),(0,De.jsx)(vg,{displayMonth:e.displayMonth,id:e.id})]}),(0,De.jsx)("div",{className:o.caption,style:s.caption,children:n})}function bg(e){var t=rg(),n=t.footer,r=t.styles,o=t.classNames.tfoot;return n?(0,De.jsx)("tfoot",{className:o,style:r.tfoot,children:(0,De.jsx)("tr",{children:(0,De.jsx)("td",{colSpan:8,children:n})})}):(0,De.jsx)(De.Fragment,{})}function xg(){var e=rg(),t=e.classNames,n=e.styles,r=e.showWeekNumber,o=e.locale,a=e.weekStartsOn,s=e.ISOWeek,i=e.formatters.formatWeekdayName,l=e.labels.labelWeekday,c=function(e,t,n){for(var r=n?et(new Date):Xe(new Date,{locale:e,weekStartsOn:t}),o=[],a=0;a<7;a++){var s=Fp(r,a);o.push(s)}return o}(o,a,s);return(0,De.jsxs)("tr",{style:n.head_row,className:t.head_row,children:[r&&(0,De.jsx)("td",{style:n.head_cell,className:t.head_cell}),c.map((function(e,r){return(0,De.jsx)("th",{scope:"col",className:t.head_cell,style:n.head_cell,"aria-label":l(e,{locale:o}),children:i(e,{locale:o})},r)}))]})}function wg(){var e,t=rg(),n=t.classNames,r=t.styles,o=t.components,a=null!==(e=null==o?void 0:o.HeadRow)&&void 0!==e?e:xg;return(0,De.jsx)("thead",{style:r.head,className:n.head,children:(0,De.jsx)(a,{})})}function kg(e){var t=rg(),n=t.locale,r=t.formatters.formatDay;return(0,De.jsx)(De.Fragment,{children:r(e.date,{locale:n})})}var Sg=(0,e.createContext)(void 0);function Cg(e){if(!Zp(e.initialProps)){return(0,De.jsx)(Sg.Provider,{value:{selected:void 0,modifiers:{disabled:[]}},children:e.children})}return(0,De.jsx)(_g,{initialProps:e.initialProps,children:e.children})}function _g(e){var t=e.initialProps,n=e.children,r=t.selected,o=t.min,a=t.max,s={disabled:[]};r&&s.disabled.push((function(e){var t=a&&r.length>a-1,n=r.some((function(t){return zp(t,e)}));return Boolean(t&&!n)}));var i={selected:r,onDayClick:function(e,n,s){var i,l;if(!(null===(i=t.onDayClick)||void 0===i||i.call(t,e,n,s),Boolean(n.selected&&o&&(null==r?void 0:r.length)===o)||Boolean(!n.selected&&a&&(null==r?void 0:r.length)===a))){var c=r?qp([],r,!0):[];if(n.selected){var d=c.findIndex((function(t){return zp(e,t)}));c.splice(d,1)}else c.push(e);null===(l=t.onSelect)||void 0===l||l.call(t,c,e,n,s)}},modifiers:s};return(0,De.jsx)(Sg.Provider,{value:i,children:n})}function jg(){var t=(0,e.useContext)(Sg);if(!t)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return t}var Eg,Ng=(0,e.createContext)(void 0);function Dg(e){if(!Kp(e.initialProps)){return(0,De.jsx)(Ng.Provider,{value:{selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}},children:e.children})}return(0,De.jsx)(Tg,{initialProps:e.initialProps,children:e.children})}function Tg(e){var t=e.initialProps,n=e.children,r=t.selected,o=r||{},a=o.from,s=o.to,i=t.min,l=t.max,c={range_start:[],range_end:[],range_middle:[],disabled:[]};if(a?(c.range_start=[a],s?(c.range_end=[s],zp(a,s)||(c.range_middle=[{after:a,before:s}])):c.range_end=[a]):s&&(c.range_start=[s],c.range_end=[s]),i&&(a&&!s&&c.disabled.push({after:Vp(a,i-1),before:Fp(a,i-1)}),a&&s&&c.disabled.push({after:a,before:Fp(a,i-1)}),!a&&s&&c.disabled.push({after:Vp(s,i-1),before:Fp(s,i-1)})),l){if(a&&!s&&(c.disabled.push({before:Fp(a,1-l)}),c.disabled.push({after:Fp(a,l-1)})),a&&s){var d=l-(Ke(s,a)+1);c.disabled.push({before:Vp(a,d)}),c.disabled.push({after:Fp(s,d)})}!a&&s&&(c.disabled.push({before:Fp(s,1-l)}),c.disabled.push({after:Fp(s,l-1)}))}return(0,De.jsx)(Ng.Provider,{value:{selected:r,onDayClick:function(e,n,o){var a,s;null===(a=t.onDayClick)||void 0===a||a.call(t,e,n,o);var i=function(e,t){var n=t||{},r=n.from,o=n.to;if(r&&o){if(zp(o,e)&&zp(r,e))return;if(zp(o,e))return{from:o,to:void 0};if(zp(r,e))return;return Hp(r,e)?{from:e,to:o}:{from:r,to:e}}return o?Hp(e,o)?{from:o,to:e}:{from:e,to:o}:r?Lp(e,r)?{from:e,to:r}:{from:r,to:e}:{from:e,to:void 0}}(e,r);null===(s=t.onSelect)||void 0===s||s.call(t,i,e,n,o)},modifiers:c},children:n})}function Ag(){var t=(0,e.useContext)(Ng);if(!t)throw new Error("useSelectRange must be used within a SelectRangeProvider");return t}function Rg(e){return Array.isArray(e)?qp([],e,!0):void 0!==e?[e]:[]}!function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"}(Eg||(Eg={}));var Mg=Eg.Selected,Og=Eg.Disabled,Ig=Eg.Hidden,Pg=Eg.Today,Lg=Eg.RangeEnd,Fg=Eg.RangeMiddle,zg=Eg.RangeStart,Hg=Eg.Outside,Vg=(0,e.createContext)(void 0);function Bg(e){var t=rg(),n=function(e,t,n){var r,o=((r={})[Mg]=Rg(e.selected),r[Og]=Rg(e.disabled),r[Ig]=Rg(e.hidden),r[Pg]=[e.today],r[Lg]=[],r[Fg]=[],r[zg]=[],r[Hg]=[],r);return e.fromDate&&o[Og].push({before:e.fromDate}),e.toDate&&o[Og].push({after:e.toDate}),Zp(e)?o[Og]=o[Og].concat(t.modifiers[Og]):Kp(e)&&(o[Og]=o[Og].concat(n.modifiers[Og]),o[zg]=n.modifiers[zg],o[Fg]=n.modifiers[Fg],o[Lg]=n.modifiers[Lg]),o}(t,jg(),Ag()),r=function(e){var t={};return Object.entries(e).forEach((function(e){var n=e[0],r=e[1];t[n]=Rg(r)})),t}(t.modifiers),o=Yp(Yp({},n),r);return(0,De.jsx)(Vg.Provider,{value:o,children:e.children})}function Wg(){var t=(0,e.useContext)(Vg);if(!t)throw new Error("useModifiers must be used within a ModifiersProvider");return t}function Ug(e,t,n){var r=Object.keys(t).reduce((function(n,r){var o=t[r];return function(e,t){return t.some((function(t){if("boolean"==typeof t)return t;if(vt(t))return zp(e,t);if(n=t,Array.isArray(n)&&n.every(vt))return t.includes(e);var n;if(function(e){return Boolean(e&&"object"==typeof e&&"from"in e)}(t))return function(e,t){var n,r=t.from,o=t.to;return r&&o?(Ke(o,r)<0&&(r=(n=[o,r])[0],o=n[1]),Ke(e,r)>=0&&Ke(o,e)>=0):o?zp(o,e):!!r&&zp(r,e)}(e,t);if(function(e){return Boolean(e&&"object"==typeof e&&"dayOfWeek"in e)}(t))return t.dayOfWeek.includes(e.getDay());if(function(e){return Boolean(e&&"object"==typeof e&&"before"in e&&"after"in e)}(t)){var r=Ke(t.before,e)>0,o=Ke(t.after,e)<0;return Hp(t.before,t.after)?o&&r:r||o}return function(e){return Boolean(e&&"object"==typeof e&&"after"in e)}(t)?Ke(e,t.after)>0:function(e){return Boolean(e&&"object"==typeof e&&"before"in e)}(t)?Ke(t.before,e)>0:"function"==typeof t&&t(e)}))}(e,o)&&n.push(r),n}),[]),o={};return r.forEach((function(e){return o[e]=!0})),n&&!Pp(e,n)&&(o.outside=!0),o}function $g(e,t){var n=t.moveBy,r=t.direction,o=t.context,a=t.modifiers,s=t.retry,i=void 0===s?{count:0,lastFocused:e}:s,l=o.weekStartsOn,c=o.fromDate,d=o.toDate,u=o.locale,f={day:Fp,week:Bp,month:Ip,year:Wp,startOfWeek:function(e){return o.ISOWeek?et(e):Xe(e,{locale:u,weekStartsOn:l})},endOfWeek:function(e){return o.ISOWeek?$p(e):Up(e,{locale:u,weekStartsOn:l})}}[n](e,"after"===r?1:-1);"before"===r&&c?f=function(e){let t;return e.forEach((function(e){const n=Ye(e);(void 0===t||t<n||isNaN(Number(n)))&&(t=n)})),t||new Date(NaN)}([c,f]):"after"===r&&d&&(f=function(e){let t;return e.forEach((e=>{const n=Ye(e);(!t||t>n||isNaN(+n))&&(t=n)})),t||new Date(NaN)}([d,f]));var h=!0;if(a){var m=Ug(f,a);h=!m.disabled&&!m.hidden}return h?f:i.count>365?i.lastFocused:$g(f,{moveBy:n,direction:r,context:o,modifiers:a,retry:Yp(Yp({},i),{count:i.count+1})})}var Gg=(0,e.createContext)(void 0);function Yg(t){var n=ug(),r=Wg(),o=(0,e.useState)(),a=o[0],s=o[1],i=(0,e.useState)(),l=i[0],c=i[1],d=function(e,t){for(var n,r,o=Tp(e[0]),a=Ap(e[e.length-1]),s=o;s<=a;){var i=Ug(s,t);if(i.disabled||i.hidden)s=Fp(s,1);else{if(i.selected)return s;i.today&&!r&&(r=s),n||(n=s),s=Fp(s,1)}}return r||n}(n.displayMonths,r),u=(null!=a?a:l&&n.isDateDisplayed(l))?l:d,f=function(e){s(e)},h=rg(),m=function(e,t){if(a){var o=$g(a,{moveBy:e,direction:t,context:h,modifiers:r});zp(a,o)||(n.goToDate(o,a),f(o))}},p={focusedDay:a,focusTarget:u,blur:function(){c(a),s(void 0)},focus:f,focusDayAfter:function(){return m("day","after")},focusDayBefore:function(){return m("day","before")},focusWeekAfter:function(){return m("week","after")},focusWeekBefore:function(){return m("week","before")},focusMonthBefore:function(){return m("month","before")},focusMonthAfter:function(){return m("month","after")},focusYearBefore:function(){return m("year","before")},focusYearAfter:function(){return m("year","after")},focusStartOfWeek:function(){return m("startOfWeek","before")},focusEndOfWeek:function(){return m("endOfWeek","after")}};return(0,De.jsx)(Gg.Provider,{value:p,children:t.children})}function qg(){var t=(0,e.useContext)(Gg);if(!t)throw new Error("useFocusContext must be used within a FocusProvider");return t}var Zg=(0,e.createContext)(void 0);function Kg(e){if(!Qp(e.initialProps)){return(0,De.jsx)(Zg.Provider,{value:{selected:void 0},children:e.children})}return(0,De.jsx)(Qg,{initialProps:e.initialProps,children:e.children})}function Qg(e){var t=e.initialProps,n=e.children,r={selected:t.selected,onDayClick:function(e,n,r){var o,a,s;null===(o=t.onDayClick)||void 0===o||o.call(t,e,n,r),!n.selected||t.required?null===(s=t.onSelect)||void 0===s||s.call(t,e,e,n,r):null===(a=t.onSelect)||void 0===a||a.call(t,void 0,e,n,r)}};return(0,De.jsx)(Zg.Provider,{value:r,children:n})}function Jg(){var t=(0,e.useContext)(Zg);if(!t)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return t}function Xg(t,n,r){var o,a,s,i=rg(),l=qg(),c=function(e,t){return Ug(e,Wg(),t)}(t,n),d=function(e,t){var n=rg(),r=Jg(),o=jg(),a=Ag(),s=qg(),i=s.focusDayAfter,l=s.focusDayBefore,c=s.focusWeekAfter,d=s.focusWeekBefore,u=s.blur,f=s.focus,h=s.focusMonthBefore,m=s.focusMonthAfter,p=s.focusYearBefore,g=s.focusYearAfter,v=s.focusStartOfWeek,y=s.focusEndOfWeek,b={onClick:function(s){var i,l,c,d;Qp(n)?null===(i=r.onDayClick)||void 0===i||i.call(r,e,t,s):Zp(n)?null===(l=o.onDayClick)||void 0===l||l.call(o,e,t,s):Kp(n)?null===(c=a.onDayClick)||void 0===c||c.call(a,e,t,s):null===(d=n.onDayClick)||void 0===d||d.call(n,e,t,s)},onFocus:function(r){var o;f(e),null===(o=n.onDayFocus)||void 0===o||o.call(n,e,t,r)},onBlur:function(r){var o;u(),null===(o=n.onDayBlur)||void 0===o||o.call(n,e,t,r)},onKeyDown:function(r){var o;switch(r.key){case"ArrowLeft":r.preventDefault(),r.stopPropagation(),"rtl"===n.dir?i():l();break;case"ArrowRight":r.preventDefault(),r.stopPropagation(),"rtl"===n.dir?l():i();break;case"ArrowDown":r.preventDefault(),r.stopPropagation(),c();break;case"ArrowUp":r.preventDefault(),r.stopPropagation(),d();break;case"PageUp":r.preventDefault(),r.stopPropagation(),r.shiftKey?p():h();break;case"PageDown":r.preventDefault(),r.stopPropagation(),r.shiftKey?g():m();break;case"Home":r.preventDefault(),r.stopPropagation(),v();break;case"End":r.preventDefault(),r.stopPropagation(),y()}null===(o=n.onDayKeyDown)||void 0===o||o.call(n,e,t,r)},onKeyUp:function(r){var o;null===(o=n.onDayKeyUp)||void 0===o||o.call(n,e,t,r)},onMouseEnter:function(r){var o;null===(o=n.onDayMouseEnter)||void 0===o||o.call(n,e,t,r)},onMouseLeave:function(r){var o;null===(o=n.onDayMouseLeave)||void 0===o||o.call(n,e,t,r)},onPointerEnter:function(r){var o;null===(o=n.onDayPointerEnter)||void 0===o||o.call(n,e,t,r)},onPointerLeave:function(r){var o;null===(o=n.onDayPointerLeave)||void 0===o||o.call(n,e,t,r)},onTouchCancel:function(r){var o;null===(o=n.onDayTouchCancel)||void 0===o||o.call(n,e,t,r)},onTouchEnd:function(r){var o;null===(o=n.onDayTouchEnd)||void 0===o||o.call(n,e,t,r)},onTouchMove:function(r){var o;null===(o=n.onDayTouchMove)||void 0===o||o.call(n,e,t,r)},onTouchStart:function(r){var o;null===(o=n.onDayTouchStart)||void 0===o||o.call(n,e,t,r)}};return b}(t,c),u=function(){var e=rg(),t=Jg(),n=jg(),r=Ag();return Qp(e)?t.selected:Zp(e)?n.selected:Kp(e)?r.selected:void 0}(),f=Boolean(i.onDayClick||"default"!==i.mode);(0,e.useEffect)((function(){var e;c.outside||l.focusedDay&&f&&zp(l.focusedDay,t)&&(null===(e=r.current)||void 0===e||e.focus())}),[l.focusedDay,t,r,f,c.outside]);var h=function(e,t){var n=[e.classNames.day];return Object.keys(t).forEach((function(t){var r=e.modifiersClassNames[t];if(r)n.push(r);else if(function(e){return Object.values(Eg).includes(e)}(t)){var o=e.classNames["day_".concat(t)];o&&n.push(o)}})),n}(i,c).join(" "),m=function(e,t){var n=Yp({},e.styles.day);return Object.keys(t).forEach((function(t){var r;n=Yp(Yp({},n),null===(r=e.modifiersStyles)||void 0===r?void 0:r[t])})),n}(i,c),p=Boolean(c.outside&&!i.showOutsideDays||c.hidden),g=null!==(s=null===(a=i.components)||void 0===a?void 0:a.DayContent)&&void 0!==s?s:kg,v={style:m,className:h,children:(0,De.jsx)(g,{date:t,displayMonth:n,activeModifiers:c}),role:"gridcell"},y=l.focusTarget&&zp(l.focusTarget,t)&&!c.outside,b=l.focusedDay&&zp(l.focusedDay,t),x=Yp(Yp(Yp({},v),((o={disabled:c.disabled,role:"gridcell"})["aria-selected"]=c.selected,o.tabIndex=b||y?0:-1,o)),d);return{isButton:f,isHidden:p,activeModifiers:c,selectedDays:u,buttonProps:x,divProps:v}}function ev(t){var n=(0,e.useRef)(null),r=Xg(t.date,t.displayMonth,n);return r.isHidden?(0,De.jsx)("div",{role:"gridcell"}):r.isButton?(0,De.jsx)(pg,Yp({name:"day",ref:n},r.buttonProps)):(0,De.jsx)("div",Yp({},r.divProps))}function tv(e){var t=e.number,n=e.dates,r=rg(),o=r.onWeekNumberClick,a=r.styles,s=r.classNames,i=r.locale,l=r.labels.labelWeekNumber,c=(0,r.formatters.formatWeekNumber)(Number(t),{locale:i});if(!o)return(0,De.jsx)("span",{className:s.weeknumber,style:a.weeknumber,children:c});var d=l(Number(t),{locale:i});return(0,De.jsx)(pg,{name:"week-number","aria-label":d,className:s.weeknumber,style:a.weeknumber,onClick:function(e){o(t,n,e)},children:c})}function nv(e){var t,n,r,o=rg(),a=o.styles,s=o.classNames,i=o.showWeekNumber,l=o.components,c=null!==(t=null==l?void 0:l.Day)&&void 0!==t?t:ev,d=null!==(n=null==l?void 0:l.WeekNumber)&&void 0!==n?n:tv;return i&&(r=(0,De.jsx)("td",{className:s.cell,style:a.cell,children:(0,De.jsx)(d,{number:e.weekNumber,dates:e.dates})})),(0,De.jsxs)("tr",{className:s.row,style:a.row,children:[r,e.dates.map((function(t){return(0,De.jsx)("td",{className:s.cell,style:a.cell,role:"presentation",children:(0,De.jsx)(c,{displayMonth:e.displayMonth,date:t})},function(e){return Math.trunc(+Ye(e)/1e3)}(t))}))]})}function rv(e,t,n){for(var r=(null==n?void 0:n.ISOWeek)?$p(t):Up(t,n),o=(null==n?void 0:n.ISOWeek)?et(e):Xe(e,n),a=Ke(r,o),s=[],i=0;i<=a;i++)s.push(Fp(o,i));return s.reduce((function(e,t){var r=(null==n?void 0:n.ISOWeek)?nt(t):ot(t,n),o=e.find((function(e){return e.weekNumber===r}));return o?(o.dates.push(t),e):(e.push({weekNumber:r,dates:[t]}),e)}),[])}function ov(e){var t,n,r,o=rg(),a=o.locale,s=o.classNames,i=o.styles,l=o.hideHead,c=o.fixedWeeks,d=o.components,u=o.weekStartsOn,f=o.firstWeekContainsDate,h=o.ISOWeek,m=function(e,t){var n=rv(Tp(e),Ap(e),t);if(null==t?void 0:t.useFixedWeeks){var r=Gp(e,t);if(r<6){var o=n[n.length-1],a=o.dates[o.dates.length-1],s=Bp(a,6-r),i=rv(Bp(a,1),s,t);n.push.apply(n,i)}}return n}(e.displayMonth,{useFixedWeeks:Boolean(c),ISOWeek:h,locale:a,weekStartsOn:u,firstWeekContainsDate:f}),p=null!==(t=null==d?void 0:d.Head)&&void 0!==t?t:wg,g=null!==(n=null==d?void 0:d.Row)&&void 0!==n?n:nv,v=null!==(r=null==d?void 0:d.Footer)&&void 0!==r?r:bg;return(0,De.jsxs)("table",{id:e.id,className:s.table,style:i.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!l&&(0,De.jsx)(p,{}),(0,De.jsx)("tbody",{className:s.tbody,style:i.tbody,children:m.map((function(t){return(0,De.jsx)(g,{displayMonth:e.displayMonth,dates:t.dates,weekNumber:t.weekNumber},t.weekNumber)}))}),(0,De.jsx)(v,{displayMonth:e.displayMonth})]})}var av="undefined"!=typeof window&&window.document&&window.document.createElement?e.useLayoutEffect:e.useEffect,sv=!1,iv=0;function lv(){return"react-day-picker-".concat(++iv)}function cv(t){var n,r,o=rg(),a=o.dir,s=o.classNames,i=o.styles,l=o.components,c=ug().displayMonths,d=function(t){var n,r=null!=t?t:sv?lv():null,o=(0,e.useState)(r),a=o[0],s=o[1];return av((function(){null===a&&s(lv())}),[]),(0,e.useEffect)((function(){!1===sv&&(sv=!0)}),[]),null!==(n=null!=t?t:a)&&void 0!==n?n:void 0}(o.id?"".concat(o.id,"-").concat(t.displayIndex):void 0),u=o.id?"".concat(o.id,"-grid-").concat(t.displayIndex):void 0,f=[s.month],h=i.month,m=0===t.displayIndex,p=t.displayIndex===c.length-1,g=!m&&!p;"rtl"===a&&(p=(n=[m,p])[0],m=n[1]),m&&(f.push(s.caption_start),h=Yp(Yp({},h),i.caption_start)),p&&(f.push(s.caption_end),h=Yp(Yp({},h),i.caption_end)),g&&(f.push(s.caption_between),h=Yp(Yp({},h),i.caption_between));var v=null!==(r=null==l?void 0:l.Caption)&&void 0!==r?r:yg;return(0,De.jsxs)("div",{className:f.join(" "),style:h,children:[(0,De.jsx)(v,{id:d,displayMonth:t.displayMonth,displayIndex:t.displayIndex}),(0,De.jsx)(ov,{id:u,"aria-labelledby":d,displayMonth:t.displayMonth})]},t.displayIndex)}function dv(e){var t=rg(),n=t.classNames,r=t.styles;return(0,De.jsx)("div",{className:n.months,style:r.months,children:e.children})}function uv(t){var n,r,o=t.initialProps,a=rg(),s=qg(),i=ug(),l=(0,e.useState)(!1),c=l[0],d=l[1];(0,e.useEffect)((function(){a.initialFocus&&s.focusTarget&&(c||(s.focus(s.focusTarget),d(!0)))}),[a.initialFocus,c,s.focus,s.focusTarget,s]);var u=[a.classNames.root,a.className];a.numberOfMonths>1&&u.push(a.classNames.multiple_months),a.showWeekNumber&&u.push(a.classNames.with_weeknumber);var f=Yp(Yp({},a.styles.root),a.style),h=Object.keys(o).filter((function(e){return e.startsWith("data-")})).reduce((function(e,t){var n;return Yp(Yp({},e),((n={})[t]=o[t],n))}),{}),m=null!==(r=null===(n=o.components)||void 0===n?void 0:n.Months)&&void 0!==r?r:dv;return(0,De.jsx)("div",Yp({className:u.join(" "),style:f,dir:a.dir,id:a.id,nonce:o.nonce,title:o.title,lang:o.lang},h,{children:(0,De.jsx)(m,{children:i.displayMonths.map((function(e,t){return(0,De.jsx)(cv,{displayIndex:t,displayMonth:e},t)}))})}))}function fv(e){var t=e.children,n=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["children"]);return(0,De.jsx)(ng,{initialProps:n,children:(0,De.jsx)(dg,{children:(0,De.jsx)(Kg,{initialProps:n,children:(0,De.jsx)(Cg,{initialProps:n,children:(0,De.jsx)(Dg,{initialProps:n,children:(0,De.jsx)(Bg,{children:(0,De.jsx)(Yg,{children:t})})})})})})})}function hv(e){return(0,De.jsx)(fv,Yp({},e,{children:(0,De.jsx)(uv,{initialProps:e})}))}function mv({className:e,classNames:t,showOutsideDays:n=!0,...r}){return(0,De.jsx)(hv,{showOutsideDays:n,className:Ni("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:Ni("h-8 w-8 rounded-md flex items-center justify-center text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-colors","[&>svg]:h-3 [&>svg]:w-3"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:"h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",day:Ni(el({variant:"ghost"}),"h-9 w-9 p-0 font-normal aria-selected:opacity-100"),day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},...r})}mv.displayName="Calendar";const pv=(0,e.memo)(mv);var gv="Popover",[vv,yv]=Wl(gv,[Xd]),bv=Xd(),[xv,wv]=vv(gv),kv=t=>{const{__scopePopover:n,children:r,open:o,defaultOpen:a,onOpenChange:s,modal:i=!1}=t,l=bv(n),c=e.useRef(null),[d,u]=e.useState(!1),[f,h]=Yl({prop:o,defaultProp:a??!1,onChange:s,caller:gv});return(0,De.jsx)(pu,{...l,children:(0,De.jsx)(xv,{scope:n,contentId:xc(),triggerRef:c,open:f,onOpenChange:h,onOpenToggle:e.useCallback((()=>h((e=>!e))),[h]),hasCustomAnchor:d,onCustomAnchorAdd:e.useCallback((()=>u(!0)),[]),onCustomAnchorRemove:e.useCallback((()=>u(!1)),[]),modal:i,children:r})})};kv.displayName=gv;var Sv="PopoverAnchor";e.forwardRef(((t,n)=>{const{__scopePopover:r,...o}=t,a=wv(Sv,r),s=bv(r),{onCustomAnchorAdd:i,onCustomAnchorRemove:l}=a;return e.useEffect((()=>(i(),()=>l())),[i,l]),(0,De.jsx)(gu,{...s,...o,ref:n})})).displayName=Sv;var Cv="PopoverTrigger",_v=e.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,o=wv(Cv,n),a=bv(n),s=$i(t,o.triggerRef),i=(0,De.jsx)(wl.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Lv(o.open),...r,ref:s,onClick:Bl(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:(0,De.jsx)(gu,{asChild:!0,...a,children:i})}));_v.displayName=Cv;var jv="PopoverPortal",[Ev,Nv]=vv(jv,{forceMount:void 0}),Dv=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=wv(jv,t);return(0,De.jsx)(Ev,{scope:t,forceMount:n,children:(0,De.jsx)(xu,{present:n||a.open,children:(0,De.jsx)(bu,{asChild:!0,container:o,children:r})})})};Dv.displayName=jv;var Tv="PopoverContent",Av=e.forwardRef(((e,t)=>{const n=Nv(Tv,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=wv(Tv,e.__scopePopover);return(0,De.jsx)(xu,{present:r||a.open,children:a.modal?(0,De.jsx)(Mv,{...o,ref:t}):(0,De.jsx)(Ov,{...o,ref:t})})}));Av.displayName=Tv;var Rv=Gi("PopoverContent.RemoveScroll"),Mv=e.forwardRef(((t,n)=>{const r=wv(Tv,t.__scopePopover),o=e.useRef(null),a=$i(n,o),s=e.useRef(!1);return e.useEffect((()=>{const e=o.current;if(e)return $u(e)}),[]),(0,De.jsx)(Of,{as:Rv,allowPinchZoom:!0,children:(0,De.jsx)(Iv,{...t,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Bl(t.onCloseAutoFocus,(e=>{e.preventDefault(),s.current||r.triggerRef.current?.focus()})),onPointerDownOutside:Bl(t.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;s.current=r}),{checkForDefaultPrevented:!1}),onFocusOutside:Bl(t.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})})})),Ov=e.forwardRef(((t,n)=>{const r=wv(Tv,t.__scopePopover),o=e.useRef(!1),a=e.useRef(!1);return(0,De.jsx)(Iv,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(o.current||r.triggerRef.current?.focus(),e.preventDefault()),o.current=!1,a.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(o.current=!0,"pointerdown"===e.detail.originalEvent.type&&(a.current=!0));const n=e.target,s=r.triggerRef.current?.contains(n);s&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&a.current&&e.preventDefault()}})})),Iv=e.forwardRef(((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:d,...u}=e,f=wv(Tv,n),h=bv(n);return sc(),(0,De.jsx)(uc,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:(0,De.jsx)(tc,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:d,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>f.onOpenChange(!1),children:(0,De.jsx)(vu,{"data-state":Lv(f.open),role:"dialog",id:f.contentId,...h,...u,ref:t,style:{...u.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})})),Pv="PopoverClose";function Lv(e){return e?"open":"closed"}e.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,o=wv(Pv,n);return(0,De.jsx)(wl.button,{type:"button",...r,ref:t,onClick:Bl(e.onClick,(()=>o.onOpenChange(!1)))})})).displayName=Pv,e.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,o=bv(n);return(0,De.jsx)(yu,{...o,...r,ref:t})})).displayName="PopoverArrow";var Fv=Dv,zv=Av;const Hv=kv,Vv=_v,Bv=e.forwardRef((({className:e,align:t="center",sideOffset:n=4,...r},o)=>{const a="undefined"!=typeof document?document.querySelector(".eventkoi-admin")||document.body:void 0;return(0,De.jsx)(Fv,{container:a,children:(0,De.jsx)(zv,{ref:o,align:t,sideOffset:n,className:Ni("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})})}));function Wv(){const t=K(),[n,r]=je(),o=n.get("from"),a=n.get("to"),s=n.get("status"),i=n.get("event_status"),l=n.get("calendar"),[c,d]=(0,e.useState)({from:o||null,to:a||null}),u=function(t){const[n,r]=(0,e.useState)((()=>"undefined"!=typeof window&&window.matchMedia(t).matches));return(0,e.useEffect)((()=>{const e=window.matchMedia(t),n=()=>r(e.matches);return e.addEventListener?e.addEventListener("change",n):e.addListener(n),()=>e.removeEventListener?e.removeEventListener("change",n):e.removeListener(n)}),[t]),n}("(max-width: 768px)");(0,e.useEffect)((()=>{if(!c?.from&&!c?.to||c&&0===Object.keys(c).length)return void((o||a)&&f());let e={};s&&(e.status=s),i&&(e.event_status=i),l&&(e.calendar=l),c.from&&(e.from=Ct(c.from,"yyyy-MM-dd")),c.to&&(e.to=Ct(c.to,"yyyy-MM-dd")),t({pathname:"",search:`?${ve(e)}`})}),[c]);const f=()=>{let e={};s&&(e.status=s),i&&(e.event_status=i),l&&(e.calendar=l),d({}),t({pathname:"",search:`?${ve(e)}`})},{settings:h}=Re(),m=(e=>{null!=e&&""!==e||(e=0);const t=Number(e);return 6===t?0:t>=0&&t<=5?t+1:1})(h?.week_starts_on);return(0,De.jsx)("div",{className:Ni("grid"),children:(0,De.jsxs)(Hv,{children:[(0,De.jsx)(Vv,{asChild:!0,children:(0,De.jsxs)(tl,{id:"date",variant:"outline",className:Ni(c&&c.from?c.to?"w-[250px]":"w-[150px]":"w-auto","justify-start text-left font-normal",!c&&"text-muted-foreground"),children:[(0,De.jsx)(Rl,{className:"mr-2 h-4 w-4"}),c?.from?c.to?(0,De.jsxs)(De.Fragment,{children:[Ct(c.from,"LLL dd, y")," -"," ",Ct(c.to,"LLL dd, y")]}):Ct(c.from,"LLL dd, y"):(0,De.jsx)("span",{children:"Date range"})]})}),(0,De.jsxs)(Bv,{className:"w-auto p-0",align:u?"start":"end",children:[(0,De.jsx)(pv,{initialFocus:!0,mode:"range",defaultMonth:c?.from,selected:c,numberOfMonths:2,weekStartsOn:m,onSelect:function(e){e?.from&&e?.to&&e.from.getTime()===e.to.getTime()||e?.from&&!e?.to&&c?.from&&!c?.to&&e.from.getTime()===new Date(c.from).getTime()||!e?.from&&e?.to&&!c?.from&&c?.to&&e.to.getTime()===new Date(c.to).getTime()?d({}):d(e||{})}}),c&&Object.keys(c).length>0&&(0,De.jsx)("div",{className:"p-3 pt-0 flex justify-center",children:(0,De.jsx)(tl,{variant:"link",className:"p-0",onClick:()=>f(),children:"Clear date filter"})})]})]})})}Bv.displayName=zv.displayName;const Uv=e.forwardRef((({className:e,type:t,...n},r)=>(0,De.jsx)("input",{type:t,className:Ni("flex h-10 w-full rounded-md border border-input bg-background shadow-none px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:bg-secondary",e),ref:r,...n})));Uv.displayName="Input";const $v=Mi("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);function Gv(e){var t;const{table:n}=e,r=n.getAllColumns()[1].id;return(0,De.jsxs)("div",{className:"relative w-full sm:w-auto",children:[(0,De.jsx)($v,{className:"absolute left-2.5 top-3 w-4 h-4 text-muted-foreground"}),(0,De.jsx)(Uv,{type:"search",placeholder:"Search...",className:"w-full rounded-lg bg-background pl-8 w-full sm:w-[250px] placeholder:text-muted-foreground/70 shadow-sm",value:null!==(t=n.getColumn(r)?.getFilterValue())&&void 0!==t?t:"",onChange:e=>n.getColumn(r)?.setFilterValue(e.target.value)})]})}const Yv=Mi("ListFilter",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]]),qv={live:"Live",upcoming:"Upcoming",completed:"Completed",tbc:"Date not set"},Zv=eventkoi_params.calendars;function Kv({base:e,table:t,hideDateRange:n,hideCategories:r,filterName:o,queryStatus:a,eventStatus:s,calStatus:i,from:l,to:c,statusFilters:d,hideSearchBox:u=!1}){const[f,h]=je(),m=s?.split(",").filter(Boolean)||[],p=i?.split(",").filter(Boolean)||[];return(0,De.jsxs)(De.Fragment,{children:[d&&(0,De.jsxs)(zm,{children:[(0,De.jsx)(Hm,{asChild:!0,children:(0,De.jsxs)(tl,{variant:"outline",className:"flex font-normal w-full sm:w-auto justify-start sm:justify-center",children:[(0,De.jsx)(Yv,{className:"mr-2 h-4 w-4"}),"Status",m.length>0&&(0,De.jsxs)(De.Fragment,{children:[" (",m.length,")"]})]})}),(0,De.jsxs)($m,{align:"start",className:"w-[180px]",children:[(0,De.jsx)(Ym,{onClick:()=>{const e=Object.keys(qv),t={...Object.fromEntries(f.entries()),event_status:e.join(",")};h(t)},children:"Select all"}),(0,De.jsx)(Ym,{onClick:()=>{const e={...Object.fromEntries(f.entries())};delete e.event_status,h(e)},children:"Clear selected"}),(0,De.jsx)(qm,{}),Object.keys(qv).map((e=>{const t=m.includes(e);return(0,De.jsx)(Ym,{checked:t,onCheckedChange:()=>{const n=m.slice(),r=t?n.filter((t=>t!==e)):[...n,e],o={...Object.fromEntries(f.entries())};r.length>0?o.event_status=r.join(","):delete o.event_status,h(o)},children:qv[e]},e)}))]})]}),"events"===e&&(0,De.jsxs)(zm,{children:[(0,De.jsx)(Hm,{asChild:!0,children:(0,De.jsxs)(tl,{variant:"outline",className:"flex font-normal w-full sm:w-auto justify-start sm:justify-center",children:[(0,De.jsx)(Yv,{className:"mr-2 h-4 w-4"}),"Calendar",p.length>0&&(0,De.jsxs)(De.Fragment,{children:[" (",p.length,")"]})]})}),(0,De.jsxs)($m,{align:"start",className:"w-[180px]",children:[(0,De.jsx)(Ym,{onClick:()=>{const e=Zv.map((e=>e.id.toString())),t={...Object.fromEntries(f.entries()),calendar:e.join(",")};h(t)},children:"Select all"}),(0,De.jsx)(Ym,{onClick:()=>{const e={...Object.fromEntries(f.entries())};delete e.calendar,h(e)},children:"Clear selected"}),(0,De.jsx)(qm,{}),Zv.map((e=>{const t=p.includes(e.id.toString());return(0,De.jsx)(Ym,{checked:t,onCheckedChange:()=>{const n=p.slice(),r=t?n.filter((t=>t!==e.id.toString())):[...n,e.id.toString()],o={...Object.fromEntries(f.entries())};r.length>0?o.calendar=r.join(","):delete o.calendar,h(o)},children:e.name},e.id)}))]})]}),!r&&(0,De.jsxs)(zm,{children:[(0,De.jsx)(Hm,{asChild:!0,children:(0,De.jsxs)(tl,{variant:"outline",className:"flex font-normal w-full sm:w-auto justify-start sm:justify-center",children:[(0,De.jsx)(Yv,{className:"mr-2 h-4 w-4"}),o]})}),(0,De.jsx)($m,{align:"start",className:"w-[180px]"})]}),!n&&(0,De.jsx)(Wv,{}),!u&&(0,De.jsx)(Gv,{table:t})]})}function Qv(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}var Jv=["color"],Xv=(0,e.forwardRef)((function(t,n){var r=t.color,o=void 0===r?"currentColor":r,a=Qv(t,Jv);return(0,e.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a,{ref:n}),(0,e.createElement)("path",{d:"M8.84182 3.13514C9.04327 3.32401 9.05348 3.64042 8.86462 3.84188L5.43521 7.49991L8.86462 11.1579C9.05348 11.3594 9.04327 11.6758 8.84182 11.8647C8.64036 12.0535 8.32394 12.0433 8.13508 11.8419L4.38508 7.84188C4.20477 7.64955 4.20477 7.35027 4.38508 7.15794L8.13508 3.15794C8.32394 2.95648 8.64036 2.94628 8.84182 3.13514Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))})),ey=["color"],ty=(0,e.forwardRef)((function(t,n){var r=t.color,o=void 0===r?"currentColor":r,a=Qv(t,ey);return(0,e.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a,{ref:n}),(0,e.createElement)("path",{d:"M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))})),ny=["color"],ry=(0,e.forwardRef)((function(t,n){var r=t.color,o=void 0===r?"currentColor":r,a=Qv(t,ny);return(0,e.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a,{ref:n}),(0,e.createElement)("path",{d:"M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))})),oy=["color"],ay=(0,e.forwardRef)((function(t,n){var r=t.color,o=void 0===r?"currentColor":r,a=Qv(t,oy);return(0,e.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a,{ref:n}),(0,e.createElement)("path",{d:"M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))}));function sy(e){const{table:t}=e;return(0,De.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,De.jsxs)(tl,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:()=>t.setPageIndex(0),disabled:!t.getCanPreviousPage(),children:[(0,De.jsx)("span",{className:"sr-only",children:"Go to first page"}),(0,De.jsx)(ry,{className:"h-4 w-4"})]}),(0,De.jsxs)(tl,{variant:"outline",className:"h-8 w-8 p-0",onClick:()=>t.previousPage(),disabled:!t.getCanPreviousPage(),children:[(0,De.jsx)("span",{className:"sr-only",children:"Go to previous page"}),(0,De.jsx)(Xv,{className:"h-4 w-4"})]}),(0,De.jsxs)(tl,{variant:"outline",className:"h-8 w-8 p-0",onClick:()=>t.nextPage(),disabled:!t.getCanNextPage(),children:[(0,De.jsx)("span",{className:"sr-only",children:"Go to next page"}),(0,De.jsx)(ty,{className:"h-4 w-4"})]}),(0,De.jsxs)(tl,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:()=>t.setPageIndex(t.getPageCount()-1),disabled:!t.getCanNextPage(),children:[(0,De.jsx)("span",{className:"sr-only",children:"Go to last page"}),(0,De.jsx)(ay,{className:"h-4 w-4"})]})]})}var iy=e.forwardRef(((e,t)=>(0,De.jsx)(wl.label,{...e,ref:t,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}})));iy.displayName="Label";var ly=iy;const cy=Xi("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),dy=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)(ly,{ref:n,className:Ni(cy(),e),...t})));function uy(e,[t,n]){return Math.min(n,Math.max(t,e))}function fy(t){const n=e.useRef({value:t,previous:t});return e.useMemo((()=>(n.current.value!==t&&(n.current.previous=n.current.value,n.current.value=t),n.current.previous)),[t])}dy.displayName=ly.displayName;var hy=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),my=e.forwardRef(((e,t)=>(0,De.jsx)(wl.span,{...e,ref:t,style:{...hy,...e.style}})));my.displayName="VisuallyHidden";var py=my,gy=[" ","Enter","ArrowUp","ArrowDown"],vy=[" ","Enter"],yy="Select",[by,xy,wy]=ql(yy),[ky,Sy]=Wl(yy,[wy,Xd]),Cy=Xd(),[_y,jy]=ky(yy),[Ey,Ny]=ky(yy),Dy=t=>{const{__scopeSelect:n,children:r,open:o,defaultOpen:a,onOpenChange:s,value:i,defaultValue:l,onValueChange:c,dir:d,name:u,autoComplete:f,disabled:h,required:m,form:p}=t,g=Cy(n),[v,y]=e.useState(null),[b,x]=e.useState(null),[w,k]=e.useState(!1),S=Kl(d),[C,_]=Yl({prop:o,defaultProp:a??!1,onChange:s,caller:yy}),[j,E]=Yl({prop:i,defaultProp:l,onChange:c,caller:yy}),N=e.useRef(null),D=!v||p||!!v.closest("form"),[T,A]=e.useState(new Set),R=Array.from(T).map((e=>e.props.value)).join(";");return(0,De.jsx)(pu,{...g,children:(0,De.jsxs)(_y,{required:m,scope:n,trigger:v,onTriggerChange:y,valueNode:b,onValueNodeChange:x,valueNodeHasChildren:w,onValueNodeHasChildrenChange:k,contentId:xc(),value:j,onValueChange:E,open:C,onOpenChange:_,dir:S,triggerPointerDownPosRef:N,disabled:h,children:[(0,De.jsx)(by.Provider,{scope:n,children:(0,De.jsx)(Ey,{scope:t.__scopeSelect,onNativeOptionAdd:e.useCallback((e=>{A((t=>new Set(t).add(e)))}),[]),onNativeOptionRemove:e.useCallback((e=>{A((t=>{const n=new Set(t);return n.delete(e),n}))}),[]),children:r})}),D?(0,De.jsxs)(pb,{"aria-hidden":!0,required:m,tabIndex:-1,name:u,autoComplete:f,value:j,onChange:e=>E(e.target.value),disabled:h,form:p,children:[void 0===j?(0,De.jsx)("option",{value:""}):null,Array.from(T)]},R):null]})})};Dy.displayName=yy;var Ty="SelectTrigger",Ay=e.forwardRef(((t,n)=>{const{__scopeSelect:r,disabled:o=!1,...a}=t,s=Cy(r),i=jy(Ty,r),l=i.disabled||o,c=$i(n,i.onTriggerChange),d=xy(r),u=e.useRef("touch"),[f,h,m]=vb((e=>{const t=d().filter((e=>!e.disabled)),n=t.find((e=>e.value===i.value)),r=yb(t,e,n);void 0!==r&&i.onValueChange(r.value)})),p=e=>{l||(i.onOpenChange(!0),m()),e&&(i.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,De.jsx)(gu,{asChild:!0,...s,children:(0,De.jsx)(wl.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":gb(i.value)?"":void 0,...a,ref:c,onClick:Bl(a.onClick,(e=>{e.currentTarget.focus(),"mouse"!==u.current&&p(e)})),onPointerDown:Bl(a.onPointerDown,(e=>{u.current=e.pointerType;const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(p(e),e.preventDefault())})),onKeyDown:Bl(a.onKeyDown,(e=>{const t=""!==f.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||h(e.key),t&&" "===e.key||gy.includes(e.key)&&(p(),e.preventDefault())}))})})}));Ay.displayName=Ty;var Ry="SelectValue",My=e.forwardRef(((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:s="",...i}=e,l=jy(Ry,n),{onValueNodeHasChildrenChange:c}=l,d=void 0!==a,u=$i(t,l.onValueNodeChange);return $l((()=>{c(d)}),[c,d]),(0,De.jsx)(wl.span,{...i,ref:u,style:{pointerEvents:"none"},children:gb(l.value)?(0,De.jsx)(De.Fragment,{children:s}):a})}));My.displayName=Ry;var Oy=e.forwardRef(((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return(0,De.jsx)(wl.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})}));Oy.displayName="SelectIcon";var Iy=e=>(0,De.jsx)(bu,{asChild:!0,...e});Iy.displayName="SelectPortal";var Py="SelectContent",Ly=e.forwardRef(((t,n)=>{const r=jy(Py,t.__scopeSelect),[o,a]=e.useState();if($l((()=>{a(new DocumentFragment)}),[]),!r.open){const e=o;return e?pe.createPortal((0,De.jsx)(zy,{scope:t.__scopeSelect,children:(0,De.jsx)(by.Slot,{scope:t.__scopeSelect,children:(0,De.jsx)("div",{children:t.children})})}),e):null}return(0,De.jsx)(By,{...t,ref:n})}));Ly.displayName=Py;var Fy=10,[zy,Hy]=ky(Py),Vy=Gi("SelectContent.RemoveScroll"),By=e.forwardRef(((t,n)=>{const{__scopeSelect:r,position:o="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:s,onPointerDownOutside:i,side:l,sideOffset:c,align:d,alignOffset:u,arrowPadding:f,collisionBoundary:h,collisionPadding:m,sticky:p,hideWhenDetached:g,avoidCollisions:v,...y}=t,b=jy(Py,r),[x,w]=e.useState(null),[k,S]=e.useState(null),C=$i(n,(e=>w(e))),[_,j]=e.useState(null),[E,N]=e.useState(null),D=xy(r),[T,A]=e.useState(!1),R=e.useRef(!1);e.useEffect((()=>{if(x)return $u(x)}),[x]),sc();const M=e.useCallback((e=>{const[t,...n]=D().map((e=>e.ref.current)),[r]=n.slice(-1),o=document.activeElement;for(const n of e){if(n===o)return;if(n?.scrollIntoView({block:"nearest"}),n===t&&k&&(k.scrollTop=0),n===r&&k&&(k.scrollTop=k.scrollHeight),n?.focus(),document.activeElement!==o)return}}),[D,k]),O=e.useCallback((()=>M([_,x])),[M,_,x]);e.useEffect((()=>{T&&O()}),[T,O]);const{onOpenChange:I,triggerPointerDownPosRef:P}=b;e.useEffect((()=>{if(x){let e={x:0,y:0};const t=t=>{e={x:Math.abs(Math.round(t.pageX)-(P.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(P.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():x.contains(n.target)||I(!1),document.removeEventListener("pointermove",t),P.current=null};return null!==P.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}}),[x,I,P]),e.useEffect((()=>{const e=()=>I(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}}),[I]);const[L,F]=vb((e=>{const t=D().filter((e=>!e.disabled)),n=t.find((e=>e.ref.current===document.activeElement)),r=yb(t,e,n);r&&setTimeout((()=>r.ref.current.focus()))})),z=e.useCallback(((e,t,n)=>{const r=!R.current&&!n;(void 0!==b.value&&b.value===t||r)&&(j(e),r&&(R.current=!0))}),[b.value]),H=e.useCallback((()=>x?.focus()),[x]),V=e.useCallback(((e,t,n)=>{const r=!R.current&&!n;(void 0!==b.value&&b.value===t||r)&&N(e)}),[b.value]),B="popper"===o?Uy:Wy,W=B===Uy?{side:l,sideOffset:c,align:d,alignOffset:u,arrowPadding:f,collisionBoundary:h,collisionPadding:m,sticky:p,hideWhenDetached:g,avoidCollisions:v}:{};return(0,De.jsx)(zy,{scope:r,content:x,viewport:k,onViewportChange:S,itemRefCallback:z,selectedItem:_,onItemLeave:H,itemTextRefCallback:V,focusSelectedItem:O,selectedItemText:E,position:o,isPositioned:T,searchRef:L,children:(0,De.jsx)(Of,{as:Vy,allowPinchZoom:!0,children:(0,De.jsx)(uc,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:Bl(a,(e=>{b.trigger?.focus({preventScroll:!0}),e.preventDefault()})),children:(0,De.jsx)(tc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:(0,De.jsx)(B,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:e=>e.preventDefault(),...y,...W,onPlaced:()=>A(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:Bl(y.onKeyDown,(e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||F(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=D().filter((e=>!e.disabled)).map((e=>e.ref.current));if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout((()=>M(t))),e.preventDefault()}}))})})})})})}));By.displayName="SelectContentImpl";var Wy=e.forwardRef(((t,n)=>{const{__scopeSelect:r,onPlaced:o,...a}=t,s=jy(Py,r),i=Hy(Py,r),[l,c]=e.useState(null),[d,u]=e.useState(null),f=$i(n,(e=>u(e))),h=xy(r),m=e.useRef(!1),p=e.useRef(!0),{viewport:g,selectedItem:v,selectedItemText:y,focusSelectedItem:b}=i,x=e.useCallback((()=>{if(s.trigger&&s.valueNode&&l&&d&&g&&v&&y){const e=s.trigger.getBoundingClientRect(),t=d.getBoundingClientRect(),n=s.valueNode.getBoundingClientRect(),r=y.getBoundingClientRect();if("rtl"!==s.dir){const o=r.left-t.left,a=n.left-o,s=e.left-a,i=e.width+s,c=Math.max(i,t.width),d=window.innerWidth-Fy,u=uy(a,[Fy,Math.max(Fy,d-c)]);l.style.minWidth=i+"px",l.style.left=u+"px"}else{const o=t.right-r.right,a=window.innerWidth-n.right-o,s=window.innerWidth-e.right-a,i=e.width+s,c=Math.max(i,t.width),d=window.innerWidth-Fy,u=uy(a,[Fy,Math.max(Fy,d-c)]);l.style.minWidth=i+"px",l.style.right=u+"px"}const a=h(),i=window.innerHeight-2*Fy,c=g.scrollHeight,u=window.getComputedStyle(d),f=parseInt(u.borderTopWidth,10),p=parseInt(u.paddingTop,10),b=parseInt(u.borderBottomWidth,10),x=f+p+c+parseInt(u.paddingBottom,10)+b,w=Math.min(5*v.offsetHeight,x),k=window.getComputedStyle(g),S=parseInt(k.paddingTop,10),C=parseInt(k.paddingBottom,10),_=e.top+e.height/2-Fy,j=i-_,E=v.offsetHeight/2,N=f+p+(v.offsetTop+E),D=x-N;if(N<=_){const e=a.length>0&&v===a[a.length-1].ref.current;l.style.bottom="0px";const t=d.clientHeight-g.offsetTop-g.offsetHeight,n=N+Math.max(j,E+(e?C:0)+t+b);l.style.height=n+"px"}else{const e=a.length>0&&v===a[0].ref.current;l.style.top="0px";const t=Math.max(_,f+g.offsetTop+(e?S:0)+E)+D;l.style.height=t+"px",g.scrollTop=N-_+g.offsetTop}l.style.margin=`${Fy}px 0`,l.style.minHeight=w+"px",l.style.maxHeight=i+"px",o?.(),requestAnimationFrame((()=>m.current=!0))}}),[h,s.trigger,s.valueNode,l,d,g,v,y,s.dir,o]);$l((()=>x()),[x]);const[w,k]=e.useState();$l((()=>{d&&k(window.getComputedStyle(d).zIndex)}),[d]);const S=e.useCallback((e=>{e&&!0===p.current&&(x(),b?.(),p.current=!1)}),[x,b]);return(0,De.jsx)($y,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:m,onScrollButtonChange:S,children:(0,De.jsx)("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w},children:(0,De.jsx)(wl.div,{...a,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})}));Wy.displayName="SelectItemAlignedPosition";var Uy=e.forwardRef(((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Fy,...a}=e,s=Cy(n);return(0,De.jsx)(vu,{...s,...a,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})}));Uy.displayName="SelectPopperPosition";var[$y,Gy]=ky(Py,{}),Yy="SelectViewport",qy=e.forwardRef(((t,n)=>{const{__scopeSelect:r,nonce:o,...a}=t,s=Hy(Yy,r),i=Gy(Yy,r),l=$i(n,s.onViewportChange),c=e.useRef(0);return(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),(0,De.jsx)(by.Slot,{scope:r,children:(0,De.jsx)(wl.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:Bl(a.onScroll,(e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=i;if(r?.current&&n){const e=Math.abs(c.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*Fy,o=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),s=Math.max(o,a);if(s<r){const o=s+e,a=Math.min(r,o),i=o-a;n.style.height=a+"px","0px"===n.style.bottom&&(t.scrollTop=i>0?i:0,n.style.justifyContent="flex-end")}}}c.current=t.scrollTop}))})})]})}));qy.displayName=Yy;var Zy="SelectGroup",[Ky,Qy]=ky(Zy);e.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,o=xc();return(0,De.jsx)(Ky,{scope:n,id:o,children:(0,De.jsx)(wl.div,{role:"group","aria-labelledby":o,...r,ref:t})})})).displayName=Zy;var Jy="SelectLabel",Xy=e.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,o=Qy(Jy,n);return(0,De.jsx)(wl.div,{id:o.id,...r,ref:t})}));Xy.displayName=Jy;var eb="SelectItem",[tb,nb]=ky(eb),rb=e.forwardRef(((t,n)=>{const{__scopeSelect:r,value:o,disabled:a=!1,textValue:s,...i}=t,l=jy(eb,r),c=Hy(eb,r),d=l.value===o,[u,f]=e.useState(s??""),[h,m]=e.useState(!1),p=$i(n,(e=>c.itemRefCallback?.(e,o,a))),g=xc(),v=e.useRef("touch"),y=()=>{a||(l.onValueChange(o),l.onOpenChange(!1))};if(""===o)throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,De.jsx)(tb,{scope:r,value:o,disabled:a,textId:g,isSelected:d,onItemTextChange:e.useCallback((e=>{f((t=>t||(e?.textContent??"").trim()))}),[]),children:(0,De.jsx)(by.ItemSlot,{scope:r,value:o,disabled:a,textValue:u,children:(0,De.jsx)(wl.div,{role:"option","aria-labelledby":g,"data-highlighted":h?"":void 0,"aria-selected":d&&h,"data-state":d?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...i,ref:p,onFocus:Bl(i.onFocus,(()=>m(!0))),onBlur:Bl(i.onBlur,(()=>m(!1))),onClick:Bl(i.onClick,(()=>{"mouse"!==v.current&&y()})),onPointerUp:Bl(i.onPointerUp,(()=>{"mouse"===v.current&&y()})),onPointerDown:Bl(i.onPointerDown,(e=>{v.current=e.pointerType})),onPointerMove:Bl(i.onPointerMove,(e=>{v.current=e.pointerType,a?c.onItemLeave?.():"mouse"===v.current&&e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:Bl(i.onPointerLeave,(e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()})),onKeyDown:Bl(i.onKeyDown,(e=>{""!==c.searchRef?.current&&" "===e.key||(vy.includes(e.key)&&y()," "===e.key&&e.preventDefault())}))})})})}));rb.displayName=eb;var ob="SelectItemText",ab=e.forwardRef(((t,n)=>{const{__scopeSelect:r,className:o,style:a,...s}=t,i=jy(ob,r),l=Hy(ob,r),c=nb(ob,r),d=Ny(ob,r),[u,f]=e.useState(null),h=$i(n,(e=>f(e)),c.onItemTextChange,(e=>l.itemTextRefCallback?.(e,c.value,c.disabled))),m=u?.textContent,p=e.useMemo((()=>(0,De.jsx)("option",{value:c.value,disabled:c.disabled,children:m},c.value)),[c.disabled,c.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:v}=d;return $l((()=>(g(p),()=>v(p))),[g,v,p]),(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)(wl.span,{id:c.textId,...s,ref:h}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?pe.createPortal(s.children,i.valueNode):null]})}));ab.displayName=ob;var sb="SelectItemIndicator",ib=e.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e;return nb(sb,n).isSelected?(0,De.jsx)(wl.span,{"aria-hidden":!0,...r,ref:t}):null}));ib.displayName=sb;var lb="SelectScrollUpButton",cb=e.forwardRef(((t,n)=>{const r=Hy(lb,t.__scopeSelect),o=Gy(lb,t.__scopeSelect),[a,s]=e.useState(!1),i=$i(n,o.onScrollButtonChange);return $l((()=>{if(r.viewport&&r.isPositioned){let e=function(){const e=t.scrollTop>0;s(e)};const t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[r.viewport,r.isPositioned]),a?(0,De.jsx)(fb,{...t,ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null}));cb.displayName=lb;var db="SelectScrollDownButton",ub=e.forwardRef(((t,n)=>{const r=Hy(db,t.__scopeSelect),o=Gy(db,t.__scopeSelect),[a,s]=e.useState(!1),i=$i(n,o.onScrollButtonChange);return $l((()=>{if(r.viewport&&r.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;s(n)};const t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[r.viewport,r.isPositioned]),a?(0,De.jsx)(fb,{...t,ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null}));ub.displayName=db;var fb=e.forwardRef(((t,n)=>{const{__scopeSelect:r,onAutoScroll:o,...a}=t,s=Hy("SelectScrollButton",r),i=e.useRef(null),l=xy(r),c=e.useCallback((()=>{null!==i.current&&(window.clearInterval(i.current),i.current=null)}),[]);return e.useEffect((()=>()=>c()),[c]),$l((()=>{const e=l().find((e=>e.ref.current===document.activeElement));e?.ref.current?.scrollIntoView({block:"nearest"})}),[l]),(0,De.jsx)(wl.div,{"aria-hidden":!0,...a,ref:n,style:{flexShrink:0,...a.style},onPointerDown:Bl(a.onPointerDown,(()=>{null===i.current&&(i.current=window.setInterval(o,50))})),onPointerMove:Bl(a.onPointerMove,(()=>{s.onItemLeave?.(),null===i.current&&(i.current=window.setInterval(o,50))})),onPointerLeave:Bl(a.onPointerLeave,(()=>{c()}))})})),hb=e.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e;return(0,De.jsx)(wl.div,{"aria-hidden":!0,...r,ref:t})}));hb.displayName="SelectSeparator";var mb="SelectArrow";e.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,o=Cy(n),a=jy(mb,n),s=Hy(mb,n);return a.open&&"popper"===s.position?(0,De.jsx)(yu,{...o,...r,ref:t}):null})).displayName=mb;var pb=e.forwardRef((({__scopeSelect:t,value:n,...r},o)=>{const a=e.useRef(null),s=$i(o,a),i=fy(n);return e.useEffect((()=>{const e=a.current;if(!e)return;const t=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(t,"value").set;if(i!==n&&r){const t=new Event("change",{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}}),[i,n]),(0,De.jsx)(wl.select,{...r,style:{...hy,...r.style},ref:s,defaultValue:n})}));function gb(e){return""===e||void 0===e}function vb(t){const n=Ql(t),r=e.useRef(""),o=e.useRef(0),a=e.useCallback((e=>{const t=r.current+e;n(t),function e(t){r.current=t,window.clearTimeout(o.current),""!==t&&(o.current=window.setTimeout((()=>e("")),1e3))}(t)}),[n]),s=e.useCallback((()=>{r.current="",window.clearTimeout(o.current)}),[]);return e.useEffect((()=>()=>window.clearTimeout(o.current)),[]),[r,a,s]}function yb(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,o=n?e.indexOf(n):-1;let a=(s=e,i=Math.max(o,0),s.map(((e,t)=>s[(i+t)%s.length])));var s,i;1===r.length&&(a=a.filter((e=>e!==n)));const l=a.find((e=>e.textValue.toLowerCase().startsWith(r.toLowerCase())));return l!==n?l:void 0}pb.displayName="SelectBubbleInput";var bb=Dy,xb=Ay,wb=My,kb=Oy,Sb=Iy,Cb=Ly,_b=qy,jb=Xy,Eb=rb,Nb=ab,Db=ib,Tb=cb,Ab=ub,Rb=hb;const Mb=Mi("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]),Ob=Mi("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),Ib=bb,Pb=wb,Lb=e.forwardRef((({className:e,children:t,...n},r)=>(0,De.jsxs)(xb,{ref:r,className:Ni("flex h-10 w-full items-center gap-4 rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,(0,De.jsx)(kb,{asChild:!0,children:n.isalternate?(0,De.jsx)(Mb,{className:"ml-auto h-3.5 w-3.5 opacity-50"}):(0,De.jsx)(Oi,{className:"ml-auto h-4 w-4 opacity-50"})})]})));Lb.displayName=xb.displayName;const Fb=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)(Tb,{ref:n,className:Ni("flex cursor-default items-center justify-center py-1",e),...t,children:(0,De.jsx)(Ob,{className:"h-4 w-4"})})));Fb.displayName=Tb.displayName;const zb=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)(Ab,{ref:n,className:Ni("flex cursor-default items-center justify-center py-1",e),...t,children:(0,De.jsx)(Oi,{className:"h-4 w-4"})})));zb.displayName=Ab.displayName;const Hb=e.forwardRef((({className:e,children:t,position:n="popper",...r},o)=>{const a="undefined"!=typeof document?document.querySelector(".eventkoi-admin")||document.body:void 0;return(0,De.jsx)(Sb,{container:a,children:(0,De.jsxs)(Cb,{ref:o,className:Ni("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===n&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[(0,De.jsx)(Fb,{}),(0,De.jsx)(_b,{className:Ni("p-1","popper"===n&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),(0,De.jsx)(zb,{})]})})}));Hb.displayName=Cb.displayName,e.forwardRef((({className:e,...t},n)=>(0,De.jsx)(jb,{ref:n,className:Ni("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}))).displayName=jb.displayName;const Vb=e.forwardRef((({className:e,children:t,...n},r)=>(0,De.jsxs)(Eb,{ref:r,className:Ni("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[(0,De.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,De.jsx)(Db,{children:(0,De.jsx)(Lm,{className:"h-4 w-4"})})}),(0,De.jsx)(Nb,{children:t})]})));function Bb({table:e}){return(0,De.jsxs)("div",{className:"flex flex-col sm:flex-row items-start sm:items-center gap-2",children:[(0,De.jsx)(dy,{htmlFor:"rows_per_page",className:"text-sm font-normal",children:"Rows per page"}),(0,De.jsxs)(Ib,{value:`${e.getState().pagination.pageSize}`,onValueChange:t=>{e.setPageSize(Number(t))},children:[(0,De.jsx)(Lb,{id:"rows_per_page",className:"h-8 w-[70px]",isalternate:"yes",children:(0,De.jsx)(Pb,{placeholder:e.getState().pagination.pageSize})}),(0,De.jsx)(Hb,{children:[10,20,30,40,50].map((e=>(0,De.jsx)(Vb,{value:`${e}`,children:e},e)))})]})]})}function Wb({statusFilters:t,base:n,data:r}){const[o]=je(),[a,s]=(0,e.useState)({}),i=o.get("status"),l=o.get("event_status"),c=o.get("calendar"),d=o.get("from"),u=o.get("to");return(0,e.useEffect)((()=>{if("events"===n&&"undefined"!=typeof window){const e=`${window?.eventkoi_params?.api||"/wp-json/eventkoi/v1"}/get_event_counts`;Ne()({path:e,method:"GET"}).then(s).catch((e=>{console.warn("Could not fetch event counts:",e)}))}}),[n]),(0,De.jsx)(De.Fragment,{children:t?.map(((e,t)=>{var r;const o=!i&&"all"===e.key||i===e.key,s={status:e.key};l&&(s.event_status=l),c&&(s.calendar=c),d&&(s.from=d),u&&(s.to=u);const f="events"!==n||e.hideCount?"":null!==(r=a?.[e.key])&&void 0!==r?r:0;return(0,De.jsxs)(Se,{to:{pathname:"/"+n,search:ve(s).toString()},className:Ni("flex items-center hover:underline hover:decoration-dotted underline-offset-4 text-foreground",o&&"underline decoration-dotted underline-offset-4 font-medium"),children:[e.title,""!==f&&(0,De.jsxs)("span",{className:"ml-1",children:["(",f,")"]})]},`status-${t}`)}))})}function Ub(e){const{table:t}=e;return(0,De.jsxs)("div",{className:"flex items-center text-sm",children:["Page ",t.getState().pagination.pageIndex+1," of ",t.getPageCount()]})}function $b(e){const{table:t,compact:n}=e;return(0,De.jsxs)(De.Fragment,{children:[t.getFilteredSelectedRowModel().rows.length," of"," ",t.getFilteredRowModel().rows.length," ",!n&&"row(s)"," selected."]})}Vb.displayName=Eb.displayName,e.forwardRef((({className:e,...t},n)=>(0,De.jsx)(Rb,{ref:n,className:Ni("-mx-1 my-1 h-px bg-muted",e),...t}))).displayName=Rb.displayName;const Gb=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)("div",{className:"relative w-full overflow-auto",children:(0,De.jsx)("table",{ref:n,className:Ni("w-full caption-bottom text-sm",e),...t})})));Gb.displayName="Table";const Yb=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)("thead",{ref:n,className:Ni("[&_tr]:border-b",e),...t})));Yb.displayName="TableHeader";const qb=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)("tbody",{ref:n,className:Ni("[&_tr:last-child]:border-0",e),...t})));qb.displayName="TableBody",e.forwardRef((({className:e,...t},n)=>(0,De.jsx)("tfoot",{ref:n,className:Ni("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}))).displayName="TableFooter";const Zb=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)("tr",{ref:n,className:Ni("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t})));Zb.displayName="TableRow";const Kb=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)("th",{ref:n,className:Ni("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t})));Kb.displayName="TableHead";const Qb=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)("td",{ref:n,className:Ni("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t})));function Jb(e,t){return"function"==typeof e?e(t):e}function Xb(e,t){return n=>{t.setState((t=>({...t,[e]:Jb(n,t[e])})))}}function ex(e){return e instanceof Function}function tx(e,t,n){let r,o=[];return a=>{let s;n.key&&n.debug&&(s=Date.now());const i=e(a),l=i.length!==o.length||i.some(((e,t)=>o[t]!==e));if(!l)return r;let c;if(o=i,n.key&&n.debug&&(c=Date.now()),r=t(...i),null==n||null==n.onChange||n.onChange(r),n.key&&n.debug&&null!=n&&n.debug()){const e=Math.round(100*(Date.now()-s))/100,t=Math.round(100*(Date.now()-c))/100,r=t/16,o=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%c⏱ ${o(t,5)} /${o(e,5)} ms`,`\n            font-size: .6rem;\n            font-weight: bold;\n            color: hsl(${Math.max(0,Math.min(120-120*r,120))}deg 100% 31%);`,null==n?void 0:n.key)}return r}}function nx(e,t,n,r){return{debug:()=>{var n;return null!=(n=null==e?void 0:e.debugAll)?n:e[t]},key:!1,onChange:r}}Qb.displayName="TableCell",e.forwardRef((({className:e,...t},n)=>(0,De.jsx)("caption",{ref:n,className:Ni("mt-4 text-sm text-muted-foreground",e),...t}))).displayName="TableCaption";const rx="debugHeaders";function ox(e,t,n){var r;let o={id:null!=(r=n.id)?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const e=[],t=n=>{n.subHeaders&&n.subHeaders.length&&n.subHeaders.map(t),e.push(n)};return t(o),e},getContext:()=>({table:e,header:o,column:t})};return e._features.forEach((t=>{null==t.createHeader||t.createHeader(o,e)})),o}const ax={createTable:e=>{e.getHeaderGroups=tx((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,r,o)=>{var a,s;const i=null!=(a=null==r?void 0:r.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?a:[],l=null!=(s=null==o?void 0:o.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?s:[],c=n.filter((e=>!(null!=r&&r.includes(e.id)||null!=o&&o.includes(e.id))));return sx(t,[...i,...c,...l],e)}),nx(e.options,rx)),e.getCenterHeaderGroups=tx((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,r,o)=>(n=n.filter((e=>!(null!=r&&r.includes(e.id)||null!=o&&o.includes(e.id)))),sx(t,n,e,"center"))),nx(e.options,rx)),e.getLeftHeaderGroups=tx((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left]),((t,n,r)=>{var o;return sx(t,null!=(o=null==r?void 0:r.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?o:[],e,"left")}),nx(e.options,rx)),e.getRightHeaderGroups=tx((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right]),((t,n,r)=>{var o;return sx(t,null!=(o=null==r?void 0:r.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?o:[],e,"right")}),nx(e.options,rx)),e.getFooterGroups=tx((()=>[e.getHeaderGroups()]),(e=>[...e].reverse()),nx(e.options,rx)),e.getLeftFooterGroups=tx((()=>[e.getLeftHeaderGroups()]),(e=>[...e].reverse()),nx(e.options,rx)),e.getCenterFooterGroups=tx((()=>[e.getCenterHeaderGroups()]),(e=>[...e].reverse()),nx(e.options,rx)),e.getRightFooterGroups=tx((()=>[e.getRightHeaderGroups()]),(e=>[...e].reverse()),nx(e.options,rx)),e.getFlatHeaders=tx((()=>[e.getHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),nx(e.options,rx)),e.getLeftFlatHeaders=tx((()=>[e.getLeftHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),nx(e.options,rx)),e.getCenterFlatHeaders=tx((()=>[e.getCenterHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),nx(e.options,rx)),e.getRightFlatHeaders=tx((()=>[e.getRightHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),nx(e.options,rx)),e.getCenterLeafHeaders=tx((()=>[e.getCenterFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),nx(e.options,rx)),e.getLeftLeafHeaders=tx((()=>[e.getLeftFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),nx(e.options,rx)),e.getRightLeafHeaders=tx((()=>[e.getRightFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),nx(e.options,rx)),e.getLeafHeaders=tx((()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()]),((e,t,n)=>{var r,o,a,s,i,l;return[...null!=(r=null==(o=e[0])?void 0:o.headers)?r:[],...null!=(a=null==(s=t[0])?void 0:s.headers)?a:[],...null!=(i=null==(l=n[0])?void 0:l.headers)?i:[]].map((e=>e.getLeafHeaders())).flat()}),nx(e.options,rx))}};function sx(e,t,n,r){var o,a;let s=0;const i=function(e,t){void 0===t&&(t=1),s=Math.max(s,t),e.filter((e=>e.getIsVisible())).forEach((e=>{var n;null!=(n=e.columns)&&n.length&&i(e.columns,t+1)}),0)};i(e);let l=[];const c=(e,t)=>{const o={depth:t,id:[r,`${t}`].filter(Boolean).join("_"),headers:[]},a=[];e.forEach((e=>{const s=[...a].reverse()[0];let i,l=!1;if(e.column.depth===o.depth&&e.column.parent?i=e.column.parent:(i=e.column,l=!0),s&&(null==s?void 0:s.column)===i)s.subHeaders.push(e);else{const o=ox(n,i,{id:[r,t,i.id,null==e?void 0:e.id].filter(Boolean).join("_"),isPlaceholder:l,placeholderId:l?`${a.filter((e=>e.column===i)).length}`:void 0,depth:t,index:a.length});o.subHeaders.push(e),a.push(o)}o.headers.push(e),e.headerGroup=o})),l.push(o),t>0&&c(a,t-1)},d=t.map(((e,t)=>ox(n,e,{depth:s,index:t})));c(d,s-1),l.reverse();const u=e=>e.filter((e=>e.column.getIsVisible())).map((e=>{let t=0,n=0,r=[0];return e.subHeaders&&e.subHeaders.length?(r=[],u(e.subHeaders).forEach((e=>{let{colSpan:n,rowSpan:o}=e;t+=n,r.push(o)}))):t=1,n+=Math.min(...r),e.colSpan=t,e.rowSpan=n,{colSpan:t,rowSpan:n}}));return u(null!=(o=null==(a=l[0])?void 0:a.headers)?o:[]),l}const ix=(e,t,n,r,o,a,s)=>{let i={id:t,index:r,original:n,depth:o,parentId:s,_valuesCache:{},_uniqueValuesCache:{},getValue:t=>{if(i._valuesCache.hasOwnProperty(t))return i._valuesCache[t];const n=e.getColumn(t);return null!=n&&n.accessorFn?(i._valuesCache[t]=n.accessorFn(i.original,r),i._valuesCache[t]):void 0},getUniqueValues:t=>{if(i._uniqueValuesCache.hasOwnProperty(t))return i._uniqueValuesCache[t];const n=e.getColumn(t);return null!=n&&n.accessorFn?n.columnDef.getUniqueValues?(i._uniqueValuesCache[t]=n.columnDef.getUniqueValues(i.original,r),i._uniqueValuesCache[t]):(i._uniqueValuesCache[t]=[i.getValue(t)],i._uniqueValuesCache[t]):void 0},renderValue:t=>{var n;return null!=(n=i.getValue(t))?n:e.options.renderFallbackValue},subRows:null!=a?a:[],getLeafRows:()=>function(e,t){const n=[],r=e=>{e.forEach((e=>{n.push(e);const o=t(e);null!=o&&o.length&&r(o)}))};return r(e),n}(i.subRows,(e=>e.subRows)),getParentRow:()=>i.parentId?e.getRow(i.parentId,!0):void 0,getParentRows:()=>{let e=[],t=i;for(;;){const n=t.getParentRow();if(!n)break;e.push(n),t=n}return e.reverse()},getAllCells:tx((()=>[e.getAllLeafColumns()]),(t=>t.map((t=>function(e,t,n,r){const o={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:()=>{var t;return null!=(t=o.getValue())?t:e.options.renderFallbackValue},getContext:tx((()=>[e,n,t,o]),((e,t,n,r)=>({table:e,column:t,row:n,cell:r,getValue:r.getValue,renderValue:r.renderValue})),nx(e.options,"debugCells"))};return e._features.forEach((r=>{null==r.createCell||r.createCell(o,n,t,e)}),{}),o}(e,i,t,t.id)))),nx(e.options,"debugRows")),_getAllCellsByColumnId:tx((()=>[i.getAllCells()]),(e=>e.reduce(((e,t)=>(e[t.column.id]=t,e)),{})),nx(e.options,"debugRows"))};for(let t=0;t<e._features.length;t++){const n=e._features[t];null==n||null==n.createRow||n.createRow(i,e)}return i},lx={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},cx=(e,t,n)=>{var r,o;const a=null==n||null==(r=n.toString())?void 0:r.toLowerCase();return Boolean(null==(o=e.getValue(t))||null==(o=o.toString())||null==(o=o.toLowerCase())?void 0:o.includes(a))};cx.autoRemove=e=>bx(e);const dx=(e,t,n)=>{var r;return Boolean(null==(r=e.getValue(t))||null==(r=r.toString())?void 0:r.includes(n))};dx.autoRemove=e=>bx(e);const ux=(e,t,n)=>{var r;return(null==(r=e.getValue(t))||null==(r=r.toString())?void 0:r.toLowerCase())===(null==n?void 0:n.toLowerCase())};ux.autoRemove=e=>bx(e);const fx=(e,t,n)=>{var r;return null==(r=e.getValue(t))?void 0:r.includes(n)};fx.autoRemove=e=>bx(e);const hx=(e,t,n)=>!n.some((n=>{var r;return!(null!=(r=e.getValue(t))&&r.includes(n))}));hx.autoRemove=e=>bx(e)||!(null!=e&&e.length);const mx=(e,t,n)=>n.some((n=>{var r;return null==(r=e.getValue(t))?void 0:r.includes(n)}));mx.autoRemove=e=>bx(e)||!(null!=e&&e.length);const px=(e,t,n)=>e.getValue(t)===n;px.autoRemove=e=>bx(e);const gx=(e,t,n)=>e.getValue(t)==n;gx.autoRemove=e=>bx(e);const vx=(e,t,n)=>{let[r,o]=n;const a=e.getValue(t);return a>=r&&a<=o};vx.resolveFilterValue=e=>{let[t,n]=e,r="number"!=typeof t?parseFloat(t):t,o="number"!=typeof n?parseFloat(n):n,a=null===t||Number.isNaN(r)?-1/0:r,s=null===n||Number.isNaN(o)?1/0:o;if(a>s){const e=a;a=s,s=e}return[a,s]},vx.autoRemove=e=>bx(e)||bx(e[0])&&bx(e[1]);const yx={includesString:cx,includesStringSensitive:dx,equalsString:ux,arrIncludes:fx,arrIncludesAll:hx,arrIncludesSome:mx,equals:px,weakEquals:gx,inNumberRange:vx};function bx(e){return null==e||""===e}const xx={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Xb("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=null==n?void 0:n.getValue(e.id);return"string"==typeof r?yx.includesString:"number"==typeof r?yx.inNumberRange:"boolean"==typeof r||null!==r&&"object"==typeof r?yx.equals:Array.isArray(r)?yx.arrIncludes:yx.weakEquals},e.getFilterFn=()=>{var n,r;return ex(e.columnDef.filterFn)?e.columnDef.filterFn:"auto"===e.columnDef.filterFn?e.getAutoFilterFn():null!=(n=null==(r=t.options.filterFns)?void 0:r[e.columnDef.filterFn])?n:yx[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,o;return(null==(n=e.columnDef.enableColumnFilter)||n)&&(null==(r=t.options.enableColumnFilters)||r)&&(null==(o=t.options.enableFilters)||o)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return null==(n=t.getState().columnFilters)||null==(n=n.find((t=>t.id===e.id)))?void 0:n.value},e.getFilterIndex=()=>{var n,r;return null!=(n=null==(r=t.getState().columnFilters)?void 0:r.findIndex((t=>t.id===e.id)))?n:-1},e.setFilterValue=n=>{t.setColumnFilters((t=>{const r=e.getFilterFn(),o=null==t?void 0:t.find((t=>t.id===e.id)),a=Jb(n,o?o.value:void 0);var s;if(wx(r,a,e))return null!=(s=null==t?void 0:t.filter((t=>t.id!==e.id)))?s:[];const i={id:e.id,value:a};var l;return o?null!=(l=null==t?void 0:t.map((t=>t.id===e.id?i:t)))?l:[]:null!=t&&t.length?[...t,i]:[i]}))}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns();null==e.options.onColumnFiltersChange||e.options.onColumnFiltersChange((e=>{var r;return null==(r=Jb(t,e))?void 0:r.filter((e=>{const t=n.find((t=>t.id===e.id));return!t||!wx(t.getFilterFn(),e.value,t)}))}))},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.columnFilters)?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function wx(e,t,n){return!(!e||!e.autoRemove)&&e.autoRemove(t,n)||void 0===t||"string"==typeof t&&!t}const kx={sum:(e,t,n)=>n.reduce(((t,n)=>{const r=n.getValue(e);return t+("number"==typeof r?r:0)}),0),min:(e,t,n)=>{let r;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(r>n||void 0===r&&n>=n)&&(r=n)})),r},max:(e,t,n)=>{let r;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(r<n||void 0===r&&n>=n)&&(r=n)})),r},extent:(e,t,n)=>{let r,o;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(void 0===r?n>=n&&(r=o=n):(r>n&&(r=n),o<n&&(o=n)))})),[r,o]},mean:(e,t)=>{let n=0,r=0;if(t.forEach((t=>{let o=t.getValue(e);null!=o&&(o=+o)>=o&&(++n,r+=o)})),n)return r/n},median:(e,t)=>{if(!t.length)return;const n=t.map((t=>t.getValue(e)));if(r=n,!Array.isArray(r)||!r.every((e=>"number"==typeof e)))return;var r;if(1===n.length)return n[0];const o=Math.floor(n.length/2),a=n.sort(((e,t)=>e-t));return n.length%2!=0?a[o]:(a[o-1]+a[o])/2},unique:(e,t)=>Array.from(new Set(t.map((t=>t.getValue(e)))).values()),uniqueCount:(e,t)=>new Set(t.map((t=>t.getValue(e)))).size,count:(e,t)=>t.length},Sx={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return null!=(t=null==(n=e.getValue())||null==n.toString?void 0:n.toString())?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:Xb("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping((t=>null!=t&&t.includes(e.id)?t.filter((t=>t!==e.id)):[...null!=t?t:[],e.id]))},e.getCanGroup=()=>{var n,r;return(null==(n=e.columnDef.enableGrouping)||n)&&(null==(r=t.options.enableGrouping)||r)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return null==(n=t.getState().grouping)?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return null==(n=t.getState().grouping)?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=null==n?void 0:n.getValue(e.id);return"number"==typeof r?kx.sum:"[object Date]"===Object.prototype.toString.call(r)?kx.extent:void 0},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return ex(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:"auto"===e.columnDef.aggregationFn?e.getAutoAggregationFn():null!=(n=null==(r=t.options.aggregationFns)?void 0:r[e.columnDef.aggregationFn])?n:kx[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>null==e.options.onGroupingChange?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.grouping)?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return null!=r&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var t;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!(null==(t=n.subRows)||!t.length)}}},Cx={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Xb("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=tx((e=>[Rx(t,e)]),(t=>t.findIndex((t=>t.id===e.id))),nx(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return(null==(r=Rx(t,n)[0])?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const o=Rx(t,n);return(null==(r=o[o.length-1])?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>null==e.options.onColumnOrderChange?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:null!=(n=e.initialState.columnOrder)?n:[])},e._getOrderColumnsFn=tx((()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode]),((e,t,n)=>r=>{let o=[];if(null!=e&&e.length){const t=[...e],n=[...r];for(;n.length&&t.length;){const e=t.shift(),r=n.findIndex((t=>t.id===e));r>-1&&o.push(n.splice(r,1)[0])}o=[...o,...n]}else o=r;return function(e,t,n){if(null==t||!t.length||!n)return e;const r=e.filter((e=>!t.includes(e.id)));if("remove"===n)return r;const o=t.map((t=>e.find((e=>e.id===t)))).filter(Boolean);return[...o,...r]}(o,t,n)}),nx(e.options,"debugTable"))}},jx={getInitialState:e=>({columnPinning:{left:[],right:[]},...e}),getDefaultOptions:e=>({onColumnPinningChange:Xb("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map((e=>e.id)).filter(Boolean);t.setColumnPinning((e=>{var t,o,a,s,i,l;return"right"===n?{left:(null!=(a=null==e?void 0:e.left)?a:[]).filter((e=>!(null!=r&&r.includes(e)))),right:[...(null!=(s=null==e?void 0:e.right)?s:[]).filter((e=>!(null!=r&&r.includes(e)))),...r]}:"left"===n?{left:[...(null!=(i=null==e?void 0:e.left)?i:[]).filter((e=>!(null!=r&&r.includes(e)))),...r],right:(null!=(l=null==e?void 0:e.right)?l:[]).filter((e=>!(null!=r&&r.includes(e))))}:{left:(null!=(t=null==e?void 0:e.left)?t:[]).filter((e=>!(null!=r&&r.includes(e)))),right:(null!=(o=null==e?void 0:e.right)?o:[]).filter((e=>!(null!=r&&r.includes(e))))}}))},e.getCanPin=()=>e.getLeafColumns().some((e=>{var n,r,o;return(null==(n=e.columnDef.enablePinning)||n)&&(null==(r=null!=(o=t.options.enableColumnPinning)?o:t.options.enablePinning)||r)})),e.getIsPinned=()=>{const n=e.getLeafColumns().map((e=>e.id)),{left:r,right:o}=t.getState().columnPinning,a=n.some((e=>null==r?void 0:r.includes(e))),s=n.some((e=>null==o?void 0:o.includes(e)));return a?"left":!!s&&"right"},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();return o?null!=(n=null==(r=t.getState().columnPinning)||null==(r=r[o])?void 0:r.indexOf(e.id))?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=tx((()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right]),((e,t,n)=>{const r=[...null!=t?t:[],...null!=n?n:[]];return e.filter((e=>!r.includes(e.column.id)))}),nx(t.options,"debugRows")),e.getLeftVisibleCells=tx((()=>[e._getAllVisibleCells(),t.getState().columnPinning.left]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.column.id===t)))).filter(Boolean).map((e=>({...e,position:"left"})))),nx(t.options,"debugRows")),e.getRightVisibleCells=tx((()=>[e._getAllVisibleCells(),t.getState().columnPinning.right]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.column.id===t)))).filter(Boolean).map((e=>({...e,position:"right"})))),nx(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>null==e.options.onColumnPinningChange?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?{left:[],right:[]}:null!=(n=null==(r=e.initialState)?void 0:r.columnPinning)?n:{left:[],right:[]})},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;var o,a;return t?Boolean(null==(n=r[t])?void 0:n.length):Boolean((null==(o=r.left)?void 0:o.length)||(null==(a=r.right)?void 0:a.length))},e.getLeftLeafColumns=tx((()=>[e.getAllLeafColumns(),e.getState().columnPinning.left]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.id===t)))).filter(Boolean)),nx(e.options,"debugColumns")),e.getRightLeafColumns=tx((()=>[e.getAllLeafColumns(),e.getState().columnPinning.right]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.id===t)))).filter(Boolean)),nx(e.options,"debugColumns")),e.getCenterLeafColumns=tx((()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((e,t,n)=>{const r=[...null!=t?t:[],...null!=n?n:[]];return e.filter((e=>!r.includes(e.id)))}),nx(e.options,"debugColumns"))}},Ex={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Nx={getDefaultColumnDef:()=>Ex,getInitialState:e=>({columnSizing:{},columnSizingInfo:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]},...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Xb("columnSizing",e),onColumnSizingInfoChange:Xb("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,o;const a=t.getState().columnSizing[e.id];return Math.min(Math.max(null!=(n=e.columnDef.minSize)?n:Ex.minSize,null!=(r=null!=a?a:e.columnDef.size)?r:Ex.size),null!=(o=e.columnDef.maxSize)?o:Ex.maxSize)},e.getStart=tx((e=>[e,Rx(t,e),t.getState().columnSizing]),((t,n)=>n.slice(0,e.getIndex(t)).reduce(((e,t)=>e+t.getSize()),0)),nx(t.options,"debugColumns")),e.getAfter=tx((e=>[e,Rx(t,e),t.getState().columnSizing]),((t,n)=>n.slice(e.getIndex(t)+1).reduce(((e,t)=>e+t.getSize()),0)),nx(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing((t=>{let{[e.id]:n,...r}=t;return r}))},e.getCanResize=()=>{var n,r;return(null==(n=e.columnDef.enableResizing)||n)&&(null==(r=t.options.enableColumnResizing)||r)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let t=0;const n=e=>{var r;e.subHeaders.length?e.subHeaders.forEach(n):t+=null!=(r=e.column.getSize())?r:0};return n(e),t},e.getStart=()=>{if(e.index>0){const t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),o=null==r?void 0:r.getCanResize();return a=>{if(!r||!o)return;if(null==a.persist||a.persist(),Tx(a)&&a.touches&&a.touches.length>1)return;const s=e.getSize(),i=e?e.getLeafHeaders().map((e=>[e.column.id,e.column.getSize()])):[[r.id,r.getSize()]],l=Tx(a)?Math.round(a.touches[0].clientX):a.clientX,c={},d=(e,n)=>{"number"==typeof n&&(t.setColumnSizingInfo((e=>{var r,o;const a="rtl"===t.options.columnResizeDirection?-1:1,s=(n-(null!=(r=null==e?void 0:e.startOffset)?r:0))*a,i=Math.max(s/(null!=(o=null==e?void 0:e.startSize)?o:0),-.999999);return e.columnSizingStart.forEach((e=>{let[t,n]=e;c[t]=Math.round(100*Math.max(n+n*i,0))/100})),{...e,deltaOffset:s,deltaPercentage:i}})),"onChange"!==t.options.columnResizeMode&&"end"!==e||t.setColumnSizing((e=>({...e,...c}))))},u=e=>d("move",e),f=e=>{d("end",e),t.setColumnSizingInfo((e=>({...e,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]})))},h=n||("undefined"!=typeof document?document:null),m={moveHandler:e=>u(e.clientX),upHandler:e=>{null==h||h.removeEventListener("mousemove",m.moveHandler),null==h||h.removeEventListener("mouseup",m.upHandler),f(e.clientX)}},p={moveHandler:e=>(e.cancelable&&(e.preventDefault(),e.stopPropagation()),u(e.touches[0].clientX),!1),upHandler:e=>{var t;null==h||h.removeEventListener("touchmove",p.moveHandler),null==h||h.removeEventListener("touchend",p.upHandler),e.cancelable&&(e.preventDefault(),e.stopPropagation()),f(null==(t=e.touches[0])?void 0:t.clientX)}},g=!!function(){if("boolean"==typeof Dx)return Dx;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch(t){e=!1}return Dx=e,Dx}()&&{passive:!1};Tx(a)?(null==h||h.addEventListener("touchmove",p.moveHandler,g),null==h||h.addEventListener("touchend",p.upHandler,g)):(null==h||h.addEventListener("mousemove",m.moveHandler,g),null==h||h.addEventListener("mouseup",m.upHandler,g)),t.setColumnSizingInfo((e=>({...e,startOffset:l,startSize:s,deltaOffset:0,deltaPercentage:0,columnSizingStart:i,isResizingColumn:r.id})))}}},createTable:e=>{e.setColumnSizing=t=>null==e.options.onColumnSizingChange?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>null==e.options.onColumnSizingInfoChange?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:null!=(n=e.initialState.columnSizing)?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}:null!=(n=e.initialState.columnSizingInfo)?n:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]})},e.getTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},e.getLeftTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getLeftHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},e.getCenterTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getCenterHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},e.getRightTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getRightHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0}}};let Dx=null;function Tx(e){return"touchstart"===e.type}const Ax={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Xb("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility((t=>({...t,[e.id]:null!=n?n:!e.getIsVisible()})))},e.getIsVisible=()=>{var n,r;const o=e.columns;return null==(n=o.length?o.some((e=>e.getIsVisible())):null==(r=t.getState().columnVisibility)?void 0:r[e.id])||n},e.getCanHide=()=>{var n,r;return(null==(n=e.columnDef.enableHiding)||n)&&(null==(r=t.options.enableHiding)||r)},e.getToggleVisibilityHandler=()=>t=>{null==e.toggleVisibility||e.toggleVisibility(t.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=tx((()=>[e.getAllCells(),t.getState().columnVisibility]),(e=>e.filter((e=>e.column.getIsVisible()))),nx(t.options,"debugRows")),e.getVisibleCells=tx((()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()]),((e,t,n)=>[...e,...t,...n]),nx(t.options,"debugRows"))},createTable:e=>{const t=(t,n)=>tx((()=>[n(),n().filter((e=>e.getIsVisible())).map((e=>e.id)).join("_")]),(e=>e.filter((e=>null==e.getIsVisible?void 0:e.getIsVisible()))),nx(e.options,"debugColumns"));e.getVisibleFlatColumns=t(0,(()=>e.getAllFlatColumns())),e.getVisibleLeafColumns=t(0,(()=>e.getAllLeafColumns())),e.getLeftVisibleLeafColumns=t(0,(()=>e.getLeftLeafColumns())),e.getRightVisibleLeafColumns=t(0,(()=>e.getRightLeafColumns())),e.getCenterVisibleLeafColumns=t(0,(()=>e.getCenterLeafColumns())),e.setColumnVisibility=t=>null==e.options.onColumnVisibilityChange?void 0:e.options.onColumnVisibilityChange(t),e.resetColumnVisibility=t=>{var n;e.setColumnVisibility(t?{}:null!=(n=e.initialState.columnVisibility)?n:{})},e.toggleAllColumnsVisible=t=>{var n;t=null!=(n=t)?n:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce(((e,n)=>({...e,[n.id]:t||!(null!=n.getCanHide&&n.getCanHide())})),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some((e=>!(null!=e.getIsVisible&&e.getIsVisible()))),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some((e=>null==e.getIsVisible?void 0:e.getIsVisible())),e.getToggleAllColumnsVisibilityHandler=()=>t=>{var n;e.toggleAllColumnsVisible(null==(n=t.target)?void 0:n.checked)}}};function Rx(e,t){return t?"center"===t?e.getCenterVisibleLeafColumns():"left"===t?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const Mx={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Xb("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=null==(n=e.getCoreRowModel().flatRows[0])||null==(n=n._getAllCellsByColumnId()[t.id])?void 0:n.getValue();return"string"==typeof r||"number"==typeof r}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,o,a;return(null==(n=e.columnDef.enableGlobalFilter)||n)&&(null==(r=t.options.enableGlobalFilter)||r)&&(null==(o=t.options.enableFilters)||o)&&(null==(a=null==t.options.getColumnCanGlobalFilter?void 0:t.options.getColumnCanGlobalFilter(e))||a)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>yx.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return ex(r)?r:"auto"===r?e.getGlobalAutoFilterFn():null!=(t=null==(n=e.options.filterFns)?void 0:n[r])?t:yx[r]},e.setGlobalFilter=t=>{null==e.options.onGlobalFilterChange||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},Ox={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Xb("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,o;if(t){if(null!=(r=null!=(o=e.options.autoResetAll)?o:e.options.autoResetExpanded)?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue((()=>{e.resetExpanded(),n=!1}))}}else e._queue((()=>{t=!0}))},e.setExpanded=t=>null==e.options.onExpandedChange?void 0:e.options.onExpandedChange(t),e.toggleAllRowsExpanded=t=>{(null!=t?t:!e.getIsAllRowsExpanded())?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=t=>{var n,r;e.setExpanded(t?{}:null!=(n=null==(r=e.initialState)?void 0:r.expanded)?n:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some((e=>e.getCanExpand())),e.getToggleAllRowsExpandedHandler=()=>t=>{null==t.persist||t.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const t=e.getState().expanded;return!0===t||Object.values(t).some(Boolean)},e.getIsAllRowsExpanded=()=>{const t=e.getState().expanded;return"boolean"==typeof t?!0===t:!!Object.keys(t).length&&!e.getRowModel().flatRows.some((e=>!e.getIsExpanded()))},e.getExpandedDepth=()=>{let t=0;return(!0===e.getState().expanded?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach((e=>{const n=e.split(".");t=Math.max(t,n.length)})),t},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded((r=>{var o;const a=!0===r||!(null==r||!r[e.id]);let s={};if(!0===r?Object.keys(t.getRowModel().rowsById).forEach((e=>{s[e]=!0})):s=r,n=null!=(o=n)?o:!a,!a&&n)return{...s,[e.id]:!0};if(a&&!n){const{[e.id]:t,...n}=s;return n}return r}))},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!(null!=(n=null==t.options.getIsRowExpanded?void 0:t.options.getIsRowExpanded(e))?n:!0===r||(null==r?void 0:r[e.id]))},e.getCanExpand=()=>{var n,r,o;return null!=(n=null==t.options.getRowCanExpand?void 0:t.options.getRowCanExpand(e))?n:(null==(r=t.options.enableExpanding)||r)&&!(null==(o=e.subRows)||!o.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}}},Ix={getInitialState:e=>({rowPinning:{top:[],bottom:[]},...e}),getDefaultOptions:e=>({onRowPinningChange:Xb("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,o)=>{const a=r?e.getLeafRows().map((e=>{let{id:t}=e;return t})):[],s=o?e.getParentRows().map((e=>{let{id:t}=e;return t})):[],i=new Set([...s,e.id,...a]);t.setRowPinning((e=>{var t,r,o,a,s,l;return"bottom"===n?{top:(null!=(o=null==e?void 0:e.top)?o:[]).filter((e=>!(null!=i&&i.has(e)))),bottom:[...(null!=(a=null==e?void 0:e.bottom)?a:[]).filter((e=>!(null!=i&&i.has(e)))),...Array.from(i)]}:"top"===n?{top:[...(null!=(s=null==e?void 0:e.top)?s:[]).filter((e=>!(null!=i&&i.has(e)))),...Array.from(i)],bottom:(null!=(l=null==e?void 0:e.bottom)?l:[]).filter((e=>!(null!=i&&i.has(e))))}:{top:(null!=(t=null==e?void 0:e.top)?t:[]).filter((e=>!(null!=i&&i.has(e)))),bottom:(null!=(r=null==e?void 0:e.bottom)?r:[]).filter((e=>!(null!=i&&i.has(e))))}}))},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:o}=t.options;return"function"==typeof r?r(e):null==(n=null!=r?r:o)||n},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:o}=t.getState().rowPinning,a=n.some((e=>null==r?void 0:r.includes(e))),s=n.some((e=>null==o?void 0:o.includes(e)));return a?"top":!!s&&"bottom"},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();if(!o)return-1;const a=null==(n="top"===o?t.getTopRows():t.getBottomRows())?void 0:n.map((e=>{let{id:t}=e;return t}));return null!=(r=null==a?void 0:a.indexOf(e.id))?r:-1}},createTable:e=>{e.setRowPinning=t=>null==e.options.onRowPinningChange?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?{top:[],bottom:[]}:null!=(n=null==(r=e.initialState)?void 0:r.rowPinning)?n:{top:[],bottom:[]})},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;var o,a;return t?Boolean(null==(n=r[t])?void 0:n.length):Boolean((null==(o=r.top)?void 0:o.length)||(null==(a=r.bottom)?void 0:a.length))},e._getPinnedRows=(t,n,r)=>{var o;return(null==(o=e.options.keepPinnedRows)||o?(null!=n?n:[]).map((t=>{const n=e.getRow(t,!0);return n.getIsAllParentsExpanded()?n:null})):(null!=n?n:[]).map((e=>t.find((t=>t.id===e))))).filter(Boolean).map((e=>({...e,position:r})))},e.getTopRows=tx((()=>[e.getRowModel().rows,e.getState().rowPinning.top]),((t,n)=>e._getPinnedRows(t,n,"top")),nx(e.options,"debugRows")),e.getBottomRows=tx((()=>[e.getRowModel().rows,e.getState().rowPinning.bottom]),((t,n)=>e._getPinnedRows(t,n,"bottom")),nx(e.options,"debugRows")),e.getCenterRows=tx((()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom]),((e,t,n)=>{const r=new Set([...null!=t?t:[],...null!=n?n:[]]);return e.filter((e=>!r.has(e.id)))}),nx(e.options,"debugRows"))}},Px={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Xb("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>null==e.options.onRowSelectionChange?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:null!=(n=e.initialState.rowSelection)?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection((n=>{t=void 0!==t?t:!e.getIsAllRowsSelected();const r={...n},o=e.getPreGroupedRowModel().flatRows;return t?o.forEach((e=>{e.getCanSelect()&&(r[e.id]=!0)})):o.forEach((e=>{delete r[e.id]})),r}))},e.toggleAllPageRowsSelected=t=>e.setRowSelection((n=>{const r=void 0!==t?t:!e.getIsAllPageRowsSelected(),o={...n};return e.getRowModel().rows.forEach((t=>{Lx(o,t.id,r,!0,e)})),o})),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=tx((()=>[e.getState().rowSelection,e.getCoreRowModel()]),((t,n)=>Object.keys(t).length?Fx(e,n):{rows:[],flatRows:[],rowsById:{}}),nx(e.options,"debugTable")),e.getFilteredSelectedRowModel=tx((()=>[e.getState().rowSelection,e.getFilteredRowModel()]),((t,n)=>Object.keys(t).length?Fx(e,n):{rows:[],flatRows:[],rowsById:{}}),nx(e.options,"debugTable")),e.getGroupedSelectedRowModel=tx((()=>[e.getState().rowSelection,e.getSortedRowModel()]),((t,n)=>Object.keys(t).length?Fx(e,n):{rows:[],flatRows:[],rowsById:{}}),nx(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=Boolean(t.length&&Object.keys(n).length);return r&&t.some((e=>e.getCanSelect()&&!n[e.id]))&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter((e=>e.getCanSelect())),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some((e=>!n[e.id]))&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys(null!=(t=e.getState().rowSelection)?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return!e.getIsAllPageRowsSelected()&&t.filter((e=>e.getCanSelect())).some((e=>e.getIsSelected()||e.getIsSomeSelected()))},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const o=e.getIsSelected();t.setRowSelection((a=>{var s;if(n=void 0!==n?n:!o,e.getCanSelect()&&o===n)return a;const i={...a};return Lx(i,e.id,n,null==(s=null==r?void 0:r.selectChildren)||s,t),i}))},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return zx(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return"some"===Hx(e,n)},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return"all"===Hx(e,n)},e.getCanSelect=()=>{var n;return"function"==typeof t.options.enableRowSelection?t.options.enableRowSelection(e):null==(n=t.options.enableRowSelection)||n},e.getCanSelectSubRows=()=>{var n;return"function"==typeof t.options.enableSubRowSelection?t.options.enableSubRowSelection(e):null==(n=t.options.enableSubRowSelection)||n},e.getCanMultiSelect=()=>{var n;return"function"==typeof t.options.enableMultiRowSelection?t.options.enableMultiRowSelection(e):null==(n=t.options.enableMultiRowSelection)||n},e.getToggleSelectedHandler=()=>{const t=e.getCanSelect();return n=>{var r;t&&e.toggleSelected(null==(r=n.target)?void 0:r.checked)}}}},Lx=(e,t,n,r,o)=>{var a;const s=o.getRow(t,!0);n?(s.getCanMultiSelect()||Object.keys(e).forEach((t=>delete e[t])),s.getCanSelect()&&(e[t]=!0)):delete e[t],r&&null!=(a=s.subRows)&&a.length&&s.getCanSelectSubRows()&&s.subRows.forEach((t=>Lx(e,t.id,n,r,o)))};function Fx(e,t){const n=e.getState().rowSelection,r=[],o={},a=function(e,t){return e.map((e=>{var t;const s=zx(e,n);if(s&&(r.push(e),o[e.id]=e),null!=(t=e.subRows)&&t.length&&(e={...e,subRows:a(e.subRows)}),s)return e})).filter(Boolean)};return{rows:a(t.rows),flatRows:r,rowsById:o}}function zx(e,t){var n;return null!=(n=t[e.id])&&n}function Hx(e,t,n){var r;if(null==(r=e.subRows)||!r.length)return!1;let o=!0,a=!1;return e.subRows.forEach((e=>{if((!a||o)&&(e.getCanSelect()&&(zx(e,t)?a=!0:o=!1),e.subRows&&e.subRows.length)){const n=Hx(e,t);"all"===n?a=!0:"some"===n?(a=!0,o=!1):o=!1}})),o?"all":!!a&&"some"}const Vx=/([0-9]+)/gm;function Bx(e,t){return e===t?0:e>t?1:-1}function Wx(e){return"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?"":String(e):"string"==typeof e?e:""}function Ux(e,t){const n=e.split(Vx).filter(Boolean),r=t.split(Vx).filter(Boolean);for(;n.length&&r.length;){const e=n.shift(),t=r.shift(),o=parseInt(e,10),a=parseInt(t,10),s=[o,a].sort();if(isNaN(s[0])){if(e>t)return 1;if(t>e)return-1}else{if(isNaN(s[1]))return isNaN(o)?-1:1;if(o>a)return 1;if(a>o)return-1}}return n.length-r.length}const $x={alphanumeric:(e,t,n)=>Ux(Wx(e.getValue(n)).toLowerCase(),Wx(t.getValue(n)).toLowerCase()),alphanumericCaseSensitive:(e,t,n)=>Ux(Wx(e.getValue(n)),Wx(t.getValue(n))),text:(e,t,n)=>Bx(Wx(e.getValue(n)).toLowerCase(),Wx(t.getValue(n)).toLowerCase()),textCaseSensitive:(e,t,n)=>Bx(Wx(e.getValue(n)),Wx(t.getValue(n))),datetime:(e,t,n)=>{const r=e.getValue(n),o=t.getValue(n);return r>o?1:r<o?-1:0},basic:(e,t,n)=>Bx(e.getValue(n),t.getValue(n))},Gx={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Xb("sorting",e),isMultiSortEvent:e=>e.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const t of n){const n=null==t?void 0:t.getValue(e.id);if("[object Date]"===Object.prototype.toString.call(n))return $x.datetime;if("string"==typeof n&&(r=!0,n.split(Vx).length>1))return $x.alphanumeric}return r?$x.text:$x.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return"string"==typeof(null==n?void 0:n.getValue(e.id))?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return ex(e.columnDef.sortingFn)?e.columnDef.sortingFn:"auto"===e.columnDef.sortingFn?e.getAutoSortingFn():null!=(n=null==(r=t.options.sortingFns)?void 0:r[e.columnDef.sortingFn])?n:$x[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const o=e.getNextSortingOrder(),a=null!=n;t.setSorting((s=>{const i=null==s?void 0:s.find((t=>t.id===e.id)),l=null==s?void 0:s.findIndex((t=>t.id===e.id));let c,d=[],u=a?n:"desc"===o;var f;return c=null!=s&&s.length&&e.getCanMultiSort()&&r?i?"toggle":"add":null!=s&&s.length&&l!==s.length-1?"replace":i?"toggle":"replace","toggle"===c&&(a||o||(c="remove")),"add"===c?(d=[...s,{id:e.id,desc:u}],d.splice(0,d.length-(null!=(f=t.options.maxMultiSortColCount)?f:Number.MAX_SAFE_INTEGER))):d="toggle"===c?s.map((t=>t.id===e.id?{...t,desc:u}:t)):"remove"===c?s.filter((t=>t.id!==e.id)):[{id:e.id,desc:u}],d}))},e.getFirstSortDir=()=>{var n,r;return(null!=(n=null!=(r=e.columnDef.sortDescFirst)?r:t.options.sortDescFirst)?n:"desc"===e.getAutoSortDir())?"desc":"asc"},e.getNextSortingOrder=n=>{var r,o;const a=e.getFirstSortDir(),s=e.getIsSorted();return s?!!(s===a||null!=(r=t.options.enableSortingRemoval)&&!r||n&&null!=(o=t.options.enableMultiRemove)&&!o)&&("desc"===s?"asc":"desc"):a},e.getCanSort=()=>{var n,r;return(null==(n=e.columnDef.enableSorting)||n)&&(null==(r=t.options.enableSorting)||r)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return null!=(n=null!=(r=e.columnDef.enableMultiSort)?r:t.options.enableMultiSort)?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=null==(n=t.getState().sorting)?void 0:n.find((t=>t.id===e.id));return!!r&&(r.desc?"desc":"asc")},e.getSortIndex=()=>{var n,r;return null!=(n=null==(r=t.getState().sorting)?void 0:r.findIndex((t=>t.id===e.id)))?n:-1},e.clearSorting=()=>{t.setSorting((t=>null!=t&&t.length?t.filter((t=>t.id!==e.id)):[]))},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(null==r.persist||r.persist(),null==e.toggleSorting||e.toggleSorting(void 0,!!e.getCanMultiSort()&&(null==t.options.isMultiSortEvent?void 0:t.options.isMultiSortEvent(r))))}}},createTable:e=>{e.setSorting=t=>null==e.options.onSortingChange?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.sorting)?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},Yx=[ax,Ax,Cx,jx,lx,xx,{createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},Mx,Gx,Sx,Ox,{getInitialState:e=>({...e,pagination:{pageIndex:0,pageSize:10,...null==e?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:Xb("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,o;if(t){if(null!=(r=null!=(o=e.options.autoResetAll)?o:e.options.autoResetPageIndex)?r:!e.options.manualPagination){if(n)return;n=!0,e._queue((()=>{e.resetPageIndex(),n=!1}))}}else e._queue((()=>{t=!0}))},e.setPagination=t=>null==e.options.onPaginationChange?void 0:e.options.onPaginationChange((e=>Jb(t,e))),e.resetPagination=t=>{var n;e.setPagination(t?{pageIndex:0,pageSize:10}:null!=(n=e.initialState.pagination)?n:{pageIndex:0,pageSize:10})},e.setPageIndex=t=>{e.setPagination((n=>{let r=Jb(t,n.pageIndex);const o=void 0===e.options.pageCount||-1===e.options.pageCount?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return r=Math.max(0,Math.min(r,o)),{...n,pageIndex:r}}))},e.resetPageIndex=t=>{var n,r;e.setPageIndex(t?0:null!=(n=null==(r=e.initialState)||null==(r=r.pagination)?void 0:r.pageIndex)?n:0)},e.resetPageSize=t=>{var n,r;e.setPageSize(t?10:null!=(n=null==(r=e.initialState)||null==(r=r.pagination)?void 0:r.pageSize)?n:10)},e.setPageSize=t=>{e.setPagination((e=>{const n=Math.max(1,Jb(t,e.pageSize)),r=e.pageSize*e.pageIndex,o=Math.floor(r/n);return{...e,pageIndex:o,pageSize:n}}))},e.setPageCount=t=>e.setPagination((n=>{var r;let o=Jb(t,null!=(r=e.options.pageCount)?r:-1);return"number"==typeof o&&(o=Math.max(-1,o)),{...n,pageCount:o}})),e.getPageOptions=tx((()=>[e.getPageCount()]),(e=>{let t=[];return e&&e>0&&(t=[...new Array(e)].fill(null).map(((e,t)=>t))),t}),nx(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:t}=e.getState().pagination,n=e.getPageCount();return-1===n||0!==n&&t<n-1},e.previousPage=()=>e.setPageIndex((e=>e-1)),e.nextPage=()=>e.setPageIndex((e=>e+1)),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var t;return null!=(t=e.options.pageCount)?t:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var t;return null!=(t=e.options.rowCount)?t:e.getPrePaginationRowModel().rows.length}}},Ix,Px,Nx];function qx(e){var t,n;const r=[...Yx,...null!=(t=e._features)?t:[]];let o={_features:r};const a=o._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultOptions?void 0:t.getDefaultOptions(o))),{});let s={...null!=(n=e.initialState)?n:{}};o._features.forEach((e=>{var t;s=null!=(t=null==e.getInitialState?void 0:e.getInitialState(s))?t:s}));const i=[];let l=!1;const c={_features:r,options:{...a,...e},initialState:s,_queue:e=>{i.push(e),l||(l=!0,Promise.resolve().then((()=>{for(;i.length;)i.shift()();l=!1})).catch((e=>setTimeout((()=>{throw e})))))},reset:()=>{o.setState(o.initialState)},setOptions:e=>{const t=Jb(e,o.options);o.options=(e=>o.options.mergeOptions?o.options.mergeOptions(a,e):{...a,...e})(t)},getState:()=>o.options.state,setState:e=>{null==o.options.onStateChange||o.options.onStateChange(e)},_getRowId:(e,t,n)=>{var r;return null!=(r=null==o.options.getRowId?void 0:o.options.getRowId(e,t,n))?r:`${n?[n.id,t].join("."):t}`},getCoreRowModel:()=>(o._getCoreRowModel||(o._getCoreRowModel=o.options.getCoreRowModel(o)),o._getCoreRowModel()),getRowModel:()=>o.getPaginationRowModel(),getRow:(e,t)=>{let n=(t?o.getPrePaginationRowModel():o.getRowModel()).rowsById[e];if(!n&&(n=o.getCoreRowModel().rowsById[e],!n))throw new Error;return n},_getDefaultColumnDef:tx((()=>[o.options.defaultColumn]),(e=>{var t;return e=null!=(t=e)?t:{},{header:e=>{const t=e.header.column.columnDef;return t.accessorKey?t.accessorKey:t.accessorFn?t.id:null},cell:e=>{var t,n;return null!=(t=null==(n=e.renderValue())||null==n.toString?void 0:n.toString())?t:null},...o._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultColumnDef?void 0:t.getDefaultColumnDef())),{}),...e}}),nx(e,"debugColumns")),_getColumnDefs:()=>o.options.columns,getAllColumns:tx((()=>[o._getColumnDefs()]),(e=>{const t=function(e,n,r){return void 0===r&&(r=0),e.map((e=>{const a=function(e,t,n,r){var o,a;const s={...e._getDefaultColumnDef(),...t},i=s.accessorKey;let l,c=null!=(o=null!=(a=s.id)?a:i?"function"==typeof String.prototype.replaceAll?i.replaceAll(".","_"):i.replace(/\./g,"_"):void 0)?o:"string"==typeof s.header?s.header:void 0;if(s.accessorFn?l=s.accessorFn:i&&(l=i.includes(".")?e=>{let t=e;for(const e of i.split(".")){var n;t=null==(n=t)?void 0:n[e]}return t}:e=>e[s.accessorKey]),!c)throw new Error;let d={id:`${String(c)}`,accessorFn:l,parent:r,depth:n,columnDef:s,columns:[],getFlatColumns:tx((()=>[!0]),(()=>{var e;return[d,...null==(e=d.columns)?void 0:e.flatMap((e=>e.getFlatColumns()))]}),nx(e.options,"debugColumns")),getLeafColumns:tx((()=>[e._getOrderColumnsFn()]),(e=>{var t;if(null!=(t=d.columns)&&t.length){let t=d.columns.flatMap((e=>e.getLeafColumns()));return e(t)}return[d]}),nx(e.options,"debugColumns"))};for(const t of e._features)null==t.createColumn||t.createColumn(d,e);return d}(o,e,r,n),s=e;return a.columns=s.columns?t(s.columns,a,r+1):[],a}))};return t(e)}),nx(e,"debugColumns")),getAllFlatColumns:tx((()=>[o.getAllColumns()]),(e=>e.flatMap((e=>e.getFlatColumns()))),nx(e,"debugColumns")),_getAllFlatColumnsById:tx((()=>[o.getAllFlatColumns()]),(e=>e.reduce(((e,t)=>(e[t.id]=t,e)),{})),nx(e,"debugColumns")),getAllLeafColumns:tx((()=>[o.getAllColumns(),o._getOrderColumnsFn()]),((e,t)=>{let n=e.flatMap((e=>e.getLeafColumns()));return t(n)}),nx(e,"debugColumns")),getColumn:e=>o._getAllFlatColumnsById()[e]};Object.assign(o,c);for(let e=0;e<o._features.length;e++){const t=o._features[e];null==t||null==t.createTable||t.createTable(o)}return o}function Zx(t,n){return t?function(e){return"function"==typeof e&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}(r=t)||"function"==typeof r||function(e){return"object"==typeof e&&"symbol"==typeof e.$$typeof&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}(r)?e.createElement(t,n):t:null;var r}function Kx({data:t,columns:n,empty:r,hideStatusFilters:o,hideDateRange:a,hideCategories:s,hideBottomBar:i,hideBottomSelected:l,gap:c,base:d,compact:u,isLoading:f,fetchResults:h,activeId:m,statusFilters:p,filterName:g,addTo:v,queryStatus:y,eventStatus:b,calStatus:x,from:w,to:k,defaultSort:S,customTopLeft:C,hideTableBorder:_=!1,tableClassName:j="",hideSearchBox:E=!1}){const[N,D]=(0,e.useState)(S),[T,A]=(0,e.useState)([]),[R,M]=(0,e.useState)({}),[O,I]=React.useState({}),[P]=je(),L=function(t){const n={state:{},onStateChange:()=>{},renderFallbackValue:null,...t},[r]=e.useState((()=>({current:qx(n)}))),[o,a]=e.useState((()=>r.current.initialState));return r.current.setOptions((e=>({...e,...t,state:{...o,...t.state},onStateChange:e=>{a(e),null==t.onStateChange||t.onStateChange(e)}}))),r.current}({data:t,columns:n,onSortingChange:D,onColumnFiltersChange:A,getCoreRowModel:e=>tx((()=>[e.options.data]),(t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(t,o,a){void 0===o&&(o=0);const s=[];for(let l=0;l<t.length;l++){const c=ix(e,e._getRowId(t[l],l,a),t[l],l,o,void 0,null==a?void 0:a.id);var i;n.flatRows.push(c),n.rowsById[c.id]=c,s.push(c),e.options.getSubRows&&(c.originalSubRows=e.options.getSubRows(t[l],l),null!=(i=c.originalSubRows)&&i.length&&(c.subRows=r(c.originalSubRows,o+1,c)))}return s};return n.rows=r(t),n}),nx(e.options,"debugTable",0,(()=>e._autoResetPageIndex()))),getPaginationRowModel:e=>tx((()=>[e.getState().pagination,e.getPrePaginationRowModel(),e.options.paginateExpandedRows?void 0:e.getState().expanded]),((t,n)=>{if(!n.rows.length)return n;const{pageSize:r,pageIndex:o}=t;let{rows:a,flatRows:s,rowsById:i}=n;const l=r*o,c=l+r;let d;a=a.slice(l,c),d=e.options.paginateExpandedRows?{rows:a,flatRows:s,rowsById:i}:function(e){const t=[],n=e=>{var r;t.push(e),null!=(r=e.subRows)&&r.length&&e.getIsExpanded()&&e.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}({rows:a,flatRows:s,rowsById:i}),d.flatRows=[];const u=e=>{d.flatRows.push(e),e.subRows.length&&e.subRows.forEach(u)};return d.rows.forEach(u),d}),nx(e.options,"debugTable")),getSortedRowModel:e=>tx((()=>[e.getState().sorting,e.getPreSortedRowModel()]),((t,n)=>{if(!n.rows.length||null==t||!t.length)return n;const r=e.getState().sorting,o=[],a=r.filter((t=>{var n;return null==(n=e.getColumn(t.id))?void 0:n.getCanSort()})),s={};a.forEach((t=>{const n=e.getColumn(t.id);n&&(s[t.id]={sortUndefined:n.columnDef.sortUndefined,invertSorting:n.columnDef.invertSorting,sortingFn:n.getSortingFn()})}));const i=e=>{const t=e.map((e=>({...e})));return t.sort(((e,t)=>{for(let r=0;r<a.length;r+=1){var n;const o=a[r],i=s[o.id],l=i.sortUndefined,c=null!=(n=null==o?void 0:o.desc)&&n;let d=0;if(l){const n=void 0===e.getValue(o.id),r=void 0===t.getValue(o.id);if(n||r){if("first"===l)return n?-1:1;if("last"===l)return n?1:-1;d=n&&r?0:n?l:-l}}if(0===d&&(d=i.sortingFn(e,t,o.id)),0!==d)return c&&(d*=-1),i.invertSorting&&(d*=-1),d}return e.index-t.index})),t.forEach((e=>{var t;o.push(e),null!=(t=e.subRows)&&t.length&&(e.subRows=i(e.subRows))})),t};return{rows:i(n.rows),flatRows:o,rowsById:n.rowsById}}),nx(e.options,"debugTable",0,(()=>e._autoResetPageIndex()))),getFilteredRowModel:e=>tx((()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter]),((t,n,r)=>{if(!t.rows.length||(null==n||!n.length)&&!r){for(let e=0;e<t.flatRows.length;e++)t.flatRows[e].columnFilters={},t.flatRows[e].columnFiltersMeta={};return t}const o=[],a=[];(null!=n?n:[]).forEach((t=>{var n;const r=e.getColumn(t.id);if(!r)return;const a=r.getFilterFn();a&&o.push({id:t.id,filterFn:a,resolvedValue:null!=(n=null==a.resolveFilterValue?void 0:a.resolveFilterValue(t.value))?n:t.value})}));const s=(null!=n?n:[]).map((e=>e.id)),i=e.getGlobalFilterFn(),l=e.getAllLeafColumns().filter((e=>e.getCanGlobalFilter()));let c,d;r&&i&&l.length&&(s.push("__global__"),l.forEach((e=>{var t;a.push({id:e.id,filterFn:i,resolvedValue:null!=(t=null==i.resolveFilterValue?void 0:i.resolveFilterValue(r))?t:r})})));for(let e=0;e<t.flatRows.length;e++){const n=t.flatRows[e];if(n.columnFilters={},o.length)for(let e=0;e<o.length;e++){c=o[e];const t=c.id;n.columnFilters[t]=c.filterFn(n,t,c.resolvedValue,(e=>{n.columnFiltersMeta[t]=e}))}if(a.length){for(let e=0;e<a.length;e++){d=a[e];const t=d.id;if(d.filterFn(n,t,d.resolvedValue,(e=>{n.columnFiltersMeta[t]=e}))){n.columnFilters.__global__=!0;break}}!0!==n.columnFilters.__global__&&(n.columnFilters.__global__=!1)}}return function(e,t,n){return n.options.filterFromLeafRows?function(e,t,n){var r;const o=[],a={},s=null!=(r=n.options.maxLeafRowFilterDepth)?r:100,i=function(e,r){void 0===r&&(r=0);const l=[];for(let d=0;d<e.length;d++){var c;let u=e[d];const f=ix(n,u.id,u.original,u.index,u.depth,void 0,u.parentId);if(f.columnFilters=u.columnFilters,null!=(c=u.subRows)&&c.length&&r<s){if(f.subRows=i(u.subRows,r+1),u=f,t(u)&&!f.subRows.length){l.push(u),a[u.id]=u,o.push(u);continue}if(t(u)||f.subRows.length){l.push(u),a[u.id]=u,o.push(u);continue}}else u=f,t(u)&&(l.push(u),a[u.id]=u,o.push(u))}return l};return{rows:i(e),flatRows:o,rowsById:a}}(e,t,n):function(e,t,n){var r;const o=[],a={},s=null!=(r=n.options.maxLeafRowFilterDepth)?r:100,i=function(e,r){void 0===r&&(r=0);const l=[];for(let d=0;d<e.length;d++){let u=e[d];if(t(u)){var c;if(null!=(c=u.subRows)&&c.length&&r<s){const e=ix(n,u.id,u.original,u.index,u.depth,void 0,u.parentId);e.subRows=i(u.subRows,r+1),u=e}l.push(u),o.push(u),a[u.id]=u}}return l};return{rows:i(e),flatRows:o,rowsById:a}}(e,t,n)}(t.rows,(e=>{for(let t=0;t<s.length;t++)if(!1===e.columnFilters[s[t]])return!1;return!0}),e)}),nx(e.options,"debugTable",0,(()=>e._autoResetPageIndex()))),onColumnVisibilityChange:M,onRowSelectionChange:I,state:{sorting:N,columnFilters:T,columnVisibility:R,rowSelection:O}});return(0,De.jsxs)("div",{className:Ni("w-full grid self-start",c?`gap-${c}`:"gap-6"),children:[(0,De.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[(0,De.jsx)("div",{className:"flex items-center",children:C?"function"==typeof C?C(L):C:(0,De.jsx)(Dp,{table:L,base:d,fetchResults:h,addTo:v,queryStatus:y})}),(0,De.jsx)("div",{className:"flex flex-col sm:flex-row gap-3 sm:items-center sm:space-x-4",children:(0,De.jsx)(Kv,{base:d,table:L,hideDateRange:a,hideCategories:s,filterName:g,queryStatus:y,eventStatus:P.get("event_status"),calStatus:x,from:w,to:k,statusFilters:p,hideSearchBox:E})})]}),(0,De.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-2 sm:gap-0",children:[!o&&(0,De.jsx)("div",{className:"flex flex-wrap items-center text-sm gap-x-4 gap-y-2",children:(0,De.jsx)(Wb,{statusFilters:p,base:d,data:t})}),(0,De.jsx)("div",{className:"text-sm text-muted-foreground",children:(0,De.jsx)($b,{table:L,compact:u})})]}),(0,De.jsx)("div",{className:Ni("rounded-lg bg-card text-sm text-card-foreground shadow-sm w-full overflow-x-auto",!_&&"border",_&&"rounded-none shadow-none border-none",j),children:(0,De.jsxs)(Gb,{children:[(0,De.jsx)(Yb,{children:L.getHeaderGroups().map((e=>(0,De.jsx)(Zb,{children:e.headers.map((e=>(0,De.jsx)(Kb,{className:Ni("h-10","font-normal","select"===e.id&&(j.includes("no-checkbox-padding")?"w-[36px] pl-0":"w-[50px]"),["start_date","end_date","created","created_at","status","quantity","total","amount_total","calendar"].includes(e.id)&&"w-[15%]",["id"].includes(e.id)&&"w-[8%]",["created","created_at","modified_date","count"].includes(e.id)&&"text-right",["count","modified_date"].includes(e.id)&&"w-auto",["title","name","shortcode"].includes(e.id)&&"w-[30%]"),children:e.isPlaceholder?null:Zx(e.column.columnDef.header,e.getContext())},e.id)))},e.id)))}),(0,De.jsx)(qb,{children:f?[...Array(6)].map(((e,t)=>(0,De.jsx)(Zb,{children:n.map(((e,n)=>(0,De.jsx)(Qb,{children:(0,De.jsx)("div",{className:"flex items-center",children:(0,De.jsx)(_l,{className:"h-4 w-full rounded"})})},`skeleton-${t}-${n}`)))},`skeleton-${t}`))):L.getRowModel().rows?.length?L.getRowModel().rows.map((e=>(0,De.jsx)(Zb,{"data-state":e.getIsSelected()&&"selected",className:"group",children:e.getVisibleCells().map((t=>(0,De.jsx)(Qb,{className:Ni("select"===t.column.id&&j.includes("no-checkbox-padding")&&"pl-0 w-[36px]",m==e.original.id&&t.id.indexOf("name")>=1&&"font-medium underline decoration-dotted",t.id.indexOf("modified")>=1&&"text-right",t.id.indexOf("created")>=1&&"text-right"),children:Zx(t.column.columnDef.cell,t.getContext())},t.id)))},e.id))):(0,De.jsx)(Zb,{children:(0,De.jsx)(Qb,{colSpan:n.length,className:"h-40 text-center text-muted-foreground text-sm",children:r})})})]})}),!i&&L.getRowModel().rows?.length>0&&(0,De.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 sm:gap-0",children:[(0,De.jsx)("div",{className:"text-sm text-muted-foreground",children:!l&&(0,De.jsx)($b,{table:L,compact:u})}),(0,De.jsxs)("div",{className:"flex flex-col sm:flex-row items-start sm:items-center gap-4 sm:gap-12 text-foreground",children:[(0,De.jsx)(Bb,{table:L}),(0,De.jsxs)("div",{className:"flex gap-4",children:[(0,De.jsx)(Ub,{table:L}),(0,De.jsx)(sy,{table:L})]})]})]})]})}function Qx({title:e,column:t}){return(0,De.jsxs)(tl,{variant:"ghost",className:"p-0 hover:bg-[transparent] font-normal",onClick:()=>t.toggleSorting("asc"===t.getIsSorted()),children:[e,(0,De.jsx)(Mb,{className:"ml-1 h-3.5 w-3.5"})]})}var Jx="Checkbox",[Xx,ew]=Wl(Jx),[tw,nw]=Xx(Jx);function rw(t){const{__scopeCheckbox:n,checked:r,children:o,defaultChecked:a,disabled:s,form:i,name:l,onCheckedChange:c,required:d,value:u="on",internal_do_not_use_render:f}=t,[h,m]=Yl({prop:r,defaultProp:a??!1,onChange:c,caller:Jx}),[p,g]=e.useState(null),[v,y]=e.useState(null),b=e.useRef(!1),x=!p||!!i||!!p.closest("form"),w={checked:h,disabled:s,setChecked:m,control:p,setControl:g,name:l,form:i,value:u,hasConsumerStoppedPropagationRef:b,required:d,defaultChecked:!fw(a)&&a,isFormControl:x,bubbleInput:v,setBubbleInput:y};return(0,De.jsx)(tw,{scope:n,...w,children:uw(f)?f(w):o})}var ow="CheckboxTrigger",aw=e.forwardRef((({__scopeCheckbox:t,onKeyDown:n,onClick:r,...o},a)=>{const{control:s,value:i,disabled:l,checked:c,required:d,setControl:u,setChecked:f,hasConsumerStoppedPropagationRef:h,isFormControl:m,bubbleInput:p}=nw(ow,t),g=$i(a,u),v=e.useRef(c);return e.useEffect((()=>{const e=s?.form;if(e){const t=()=>f(v.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[s,f]),(0,De.jsx)(wl.button,{type:"button",role:"checkbox","aria-checked":fw(c)?"mixed":c,"aria-required":d,"data-state":hw(c),"data-disabled":l?"":void 0,disabled:l,value:i,...o,ref:g,onKeyDown:Bl(n,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:Bl(r,(e=>{f((e=>!!fw(e)||!e)),p&&m&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())}))})}));aw.displayName=ow;var sw=e.forwardRef(((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:s,disabled:i,value:l,onCheckedChange:c,form:d,...u}=e;return(0,De.jsx)(rw,{__scopeCheckbox:n,checked:o,defaultChecked:a,disabled:i,required:s,onCheckedChange:c,name:r,form:d,value:l,internal_do_not_use_render:({isFormControl:e})=>(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)(aw,{...u,ref:t,__scopeCheckbox:n}),e&&(0,De.jsx)(dw,{__scopeCheckbox:n})]})})}));sw.displayName=Jx;var iw="CheckboxIndicator",lw=e.forwardRef(((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=nw(iw,n);return(0,De.jsx)(xu,{present:r||fw(a.checked)||!0===a.checked,children:(0,De.jsx)(wl.span,{"data-state":hw(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})}));lw.displayName=iw;var cw="CheckboxBubbleInput",dw=e.forwardRef((({__scopeCheckbox:t,...n},r)=>{const{control:o,hasConsumerStoppedPropagationRef:a,checked:s,defaultChecked:i,required:l,disabled:c,name:d,value:u,form:f,bubbleInput:h,setBubbleInput:m}=nw(cw,t),p=$i(r,m),g=fy(s),v=Kd(o);e.useEffect((()=>{const e=h;if(!e)return;const t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set,r=!a.current;if(g!==s&&n){const t=new Event("click",{bubbles:r});e.indeterminate=fw(s),n.call(e,!fw(s)&&s),e.dispatchEvent(t)}}),[h,g,s,a]);const y=e.useRef(!fw(s)&&s);return(0,De.jsx)(wl.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??y.current,required:l,disabled:c,name:d,value:u,form:f,...n,tabIndex:-1,ref:p,style:{...n.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})}));function uw(e){return"function"==typeof e}function fw(e){return"indeterminate"===e}function hw(e){return fw(e)?"indeterminate":e?"checked":"unchecked"}dw.displayName=cw;const mw=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)(sw,{ref:n,className:Ni("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:(0,De.jsx)(lw,{className:Ni("flex items-center justify-center text-current"),children:(0,De.jsx)(Lm,{className:"h-4 w-4"})})})));mw.displayName=sw.displayName;const pw=Mi("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]),gw=Mi("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),vw={completed:(0,De.jsx)(hl,{className:"w-4 h-4 text-success"}),upcoming:(0,De.jsx)(pl,{className:"w-4 h-4 text-[#48BEFA]"}),tbc:(0,De.jsx)(ml,{className:"w-4 h-4 text-primary/60"}),trash:(0,De.jsx)(yl,{className:"w-4 h-4 text-primary/40"}),live:(0,De.jsx)(gl,{className:"w-4 h-4 text-destructive"})},yw=e=>({completed:"Completed",upcoming:"Upcoming",tbc:"Date not set",trash:"Trash",live:"Live"}[e]||"—");function bw({instances:t,isLoading:n,eventId:r,timezone:o}){const[a,s]=(0,e.useState)([]),[i,l]=(0,e.useState)(0),c=K(),[d,u]=je(),{setEvent:f}=Fl(),h=d.get("status")||"all",m=()=>{u((e=>new URLSearchParams(e)))},p=(0,e.useMemo)((()=>[{id:"select",header:({table:e})=>(0,De.jsx)("div",{className:"flex items-center justify-center min-h-6",children:(0,De.jsx)(mw,{checked:e.getIsAllPageRowsSelected()||e.getIsSomePageRowsSelected()&&"indeterminate",onCheckedChange:t=>e.toggleAllPageRowsSelected(!!t),"aria-label":"Select all"})}),cell:({row:e})=>(0,De.jsx)("div",{className:"flex items-center justify-center min-h-6",children:(0,De.jsx)(mw,{checked:e.getIsSelected(),onCheckedChange:t=>e.toggleSelected(!!t),"aria-label":"Select row"})}),enableSorting:!1,enableHiding:!1},{accessorKey:"title",header:({column:e})=>(0,De.jsx)(Qx,{title:"Event name",column:e}),cell:({row:e})=>{const{instance_url:t,start_date:n,override:o}=e.original,a=o?.title,s=e.getValue("title"),i=e.original.start_date,l=i.endsWith("Z")?new Date(i):new Date(i+"Z"),d=Math.floor(l.getTime()/1e3);return(0,De.jsxs)("div",{className:"group flex items-center gap-2 text-foreground",children:[(0,De.jsx)("a",{href:"#",onClick:e=>{e.preventDefault(),c(`/events/${r}/instances/edit/${d}`)},className:"font-medium hover:underline hover:decoration-dotted underline-offset-4",children:a||s}),o&&(0,De.jsx)(fl,{variant:"outline",className:"text-xs border-[#F6EFD3] text-foreground bg-[#FBF9ED] font-medium px-2 py-1",children:"Edited"}),t&&(0,De.jsx)("a",{href:t,className:"invisible group-hover:visible min-w-5 w-5 h-5 items-center justify-center",target:"_blank",rel:"noopener noreferrer",title:"View instance",children:(0,De.jsx)(pw,{className:"w-full h-full"})})]})},sortingFn:"alphanumeric"},{accessorKey:"status",header:({column:e})=>(0,De.jsx)(Qx,{title:"Status",column:e}),cell:({row:e})=>{const t=e.getValue("status");return(0,De.jsxs)("div",{className:"flex items-center space-x-2",children:[vw[t],(0,De.jsx)("div",{className:"text-foreground",children:yw(t)})]})},sortingFn:"alphanumeric"},{accessorKey:"start_date",header:({column:e})=>(0,De.jsx)(Qx,{title:"Starts",column:e}),cell:({row:e})=>{const t=e.getValue("start_date"),n=e.original.all_day;return(0,De.jsx)("div",{className:"text-foreground whitespace-pre-line",children:Ss(t,{timezone:o,format:n?"date":"date-time"})})},sortingFn:"alphanumeric"},{accessorKey:"end_date",header:({column:e})=>(0,De.jsx)(Qx,{title:"Ends",column:e}),cell:({row:e})=>{const t=e.getValue("end_date"),n=e.original.all_day;return(0,De.jsx)("div",{className:"text-foreground whitespace-pre-line",children:Ss(t,{timezone:o,format:n?"date":"date-time"})})},sortingFn:"alphanumeric"},{accessorKey:"modified_date",header:({column:e})=>(0,De.jsx)(Qx,{title:"Last modified",column:e}),cell:({row:e})=>{const t=e.original.override?.modified_at;return(0,De.jsx)("div",{className:"text-foreground whitespace-pre-line",children:Ss(t,{timezone:o})})},sortingFn:"alphanumeric"}]),[c,r]),g=r?`events/${r}/instances`:"instances";return(0,e.useEffect)((()=>{if(!t)return;const e="trash"===d.get("status"),n=d.get("event_status"),r=n?n.split(",").map((e=>e.trim().toLowerCase())).filter(Boolean):[],o=t.filter((t=>{const n=(t.status||"").trim().toLowerCase(),o="trash"===n;return e?o:r.length>0?r.includes(n):!o}));s(o)}),[t,d]),(0,De.jsx)(Kx,{data:a,columns:p,empty:"trash"===h?"No trashed instances found.":"No recurring instances found.",base:g,queryStatus:h,statusFilters:[{key:"all",title:"All",hideCount:!0,isSelected:!0},{key:"trash",title:"Trash"}],hideCategories:!0,fetchResults:()=>{},isLoading:n,hideTableBorder:!0,tableClassName:"no-checkbox-padding rounded-none border border-transparent",defaultSort:[{id:"start_date",desc:!1}],hideSearchBox:!0,customTopLeft:e=>{const t=e.getSelectedRowModel().rows,n=t.length,o="trash"===h;return(0,De.jsx)(tl,{size:"sm",variant:"ghost",className:Ni("gap-1 border border-input bg-muted",0===n&&"border-input bg-muted text-muted-foreground/50 pointer-events-none"),disabled:0===n,onClick:()=>{o?(async(e,t)=>{if(!e?.length)return;const n=(new Date).toISOString(),o=[];try{await Promise.all(e.map((e=>{const t=Math.floor(new Date(e.original.start_date).getTime()/1e3);return o.push(t),Ne()({path:`${eventkoi_params.api}/edit_instance`,method:"POST",headers:{"Content-Type":"application/json","EVENTKOI-API-KEY":eventkoi_params.api_key},body:JSON.stringify({event_id:r,timestamp:t,overrides:{modified_at:n},deleteKeys:["status"]})})}))),f((e=>{const t={...e.recurrence_overrides||{}};return o.forEach((e=>{if(t[e]){const{status:n,...r}=t[e];0===Object.keys(r).length?delete t[e]:t[e]=r}})),{...e,recurrence_overrides:t}})),gp({message:`Restored ${e.length} instance(s).`}),t.resetRowSelection(),m()}catch(e){console.error("Failed to restore instances:",e),vp("Failed to restore one or more instances.")}})(t,e):(async(e,t)=>{if(!e?.length)return;const n=(new Date).toISOString(),o={};try{await Promise.all(e.map((e=>{const t=Math.floor(new Date(e.original.start_date).getTime()/1e3);return o[t]={...e.original.override||{},status:"trash",modified_at:n},Ne()({path:`${eventkoi_params.api}/edit_instance`,method:"POST",headers:{"Content-Type":"application/json","EVENTKOI-API-KEY":eventkoi_params.api_key},body:JSON.stringify({event_id:r,timestamp:t,overrides:o[t]})})}))),f((e=>({...e,recurrence_overrides:{...e.recurrence_overrides||{},...o}}))),gp({message:`Moved ${e.length} instance(s) to trash.`}),t.resetRowSelection(),m()}catch(e){console.error("Failed to trash instances:",e),vp("Failed to trash one or more instances.")}})(t,e)},children:o?(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)(hl,{className:"w-4 h-4"}),"Restore"]}):(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)(gw,{className:"w-4 h-4"}),"Move to trash"]})})}})}function xw({variant:e,className:t,children:n}){let r="flex flex-col gap-2 px-6 py-8 w-full";return"header"===e&&(r="flex flex-col gap-2 px-6 py-4 w-full"),(0,De.jsx)("div",{className:Ni(r,t),children:n})}const ww=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)("textarea",{className:Ni("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t})));ww.displayName="Textarea";var kw=["MO","TU","WE","TH","FR","SA","SU"],Sw=function(){function e(e,t){if(0===t)throw new Error("Can't create weekday with n == 0");this.weekday=e,this.n=t}return e.fromStr=function(t){return new e(kw.indexOf(t))},e.prototype.nth=function(t){return this.n===t?this:new e(this.weekday,t)},e.prototype.equals=function(e){return this.weekday===e.weekday&&this.n===e.n},e.prototype.toString=function(){var e=kw[this.weekday];return this.n&&(e=(this.n>0?"+":"")+String(this.n)+e),e},e.prototype.getJsWeekday=function(){return 6===this.weekday?0:this.weekday+1},e}(),Cw=function(e){return null!=e},_w=function(e){return"number"==typeof e},jw=function(e){return"string"==typeof e&&kw.includes(e)},Ew=Array.isArray,Nw=function(e,t){void 0===t&&(t=e),1===arguments.length&&(t=e,e=0);for(var n=[],r=e;r<t;r++)n.push(r);return n},Dw=function(e,t){var n=0,r=[];if(Ew(e))for(;n<t;n++)r[n]=[].concat(e);else for(;n<t;n++)r[n]=e;return r};function Tw(e,t,n){void 0===n&&(n=" ");var r=String(e);return t|=0,r.length>t?String(r):((t-=r.length)>n.length&&(n+=Dw(n,t/n.length)),n.slice(0,t)+String(r))}var Aw=function(e,t){var n=e%t;return n*t<0?n+t:n},Rw=function(e,t){return{div:Math.floor(e/t),mod:Aw(e,t)}},Mw=function(e){return!Cw(e)||0===e.length},Ow=function(e){return!Mw(e)},Iw=function(e,t){return Ow(e)&&-1!==e.indexOf(t)},Pw=function(e,t,n,r,o,a){return void 0===r&&(r=0),void 0===o&&(o=0),void 0===a&&(a=0),new Date(Date.UTC(e,t-1,n,r,o,a))},Lw=[31,28,31,30,31,30,31,31,30,31,30,31],Fw=864e5,zw=Pw(1970,1,1),Hw=[6,0,1,2,3,4,5],Vw=function(e){return e%4==0&&e%100!=0||e%400==0},Bw=function(e){return e instanceof Date},Ww=function(e){return Bw(e)&&!isNaN(e.getTime())},Uw=function(e){return t=zw,n=e.getTime()-t.getTime(),Math.round(n/Fw);var t,n},$w=function(e){return new Date(zw.getTime()+e*Fw)},Gw=function(e){var t=e.getUTCMonth();return 1===t&&Vw(e.getUTCFullYear())?29:Lw[t]},Yw=function(e){return Hw[e.getUTCDay()]},qw=function(e,t){var n=Pw(e,t+1,1);return[Yw(n),Gw(n)]},Zw=function(e,t){return t=t||e,new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))},Kw=function(e){return new Date(e.getTime())},Qw=function(e){for(var t=[],n=0;n<e.length;n++)t.push(Kw(e[n]));return t},Jw=function(e){e.sort((function(e,t){return e.getTime()-t.getTime()}))},Xw=function(e,t){void 0===t&&(t=!0);var n=new Date(e);return[Tw(n.getUTCFullYear().toString(),4,"0"),Tw(n.getUTCMonth()+1,2,"0"),Tw(n.getUTCDate(),2,"0"),"T",Tw(n.getUTCHours(),2,"0"),Tw(n.getUTCMinutes(),2,"0"),Tw(n.getUTCSeconds(),2,"0"),t?"Z":""].join("")},ek=function(e){var t=/^(\d{4})(\d{2})(\d{2})(T(\d{2})(\d{2})(\d{2})Z?)?$/.exec(e);if(!t)throw new Error("Invalid UNTIL value: ".concat(e));return new Date(Date.UTC(parseInt(t[1],10),parseInt(t[2],10)-1,parseInt(t[3],10),parseInt(t[5],10)||0,parseInt(t[6],10)||0,parseInt(t[7],10)||0))},tk=function(e,t){return e.toLocaleString("sv-SE",{timeZone:t}).replace(" ","T")+"Z"},nk=function(){function e(e,t){this.minDate=null,this.maxDate=null,this._result=[],this.total=0,this.method=e,this.args=t,"between"===e?(this.maxDate=t.inc?t.before:new Date(t.before.getTime()-1),this.minDate=t.inc?t.after:new Date(t.after.getTime()+1)):"before"===e?this.maxDate=t.inc?t.dt:new Date(t.dt.getTime()-1):"after"===e&&(this.minDate=t.inc?t.dt:new Date(t.dt.getTime()+1))}return e.prototype.accept=function(e){++this.total;var t=this.minDate&&e<this.minDate,n=this.maxDate&&e>this.maxDate;if("between"===this.method){if(t)return!0;if(n)return!1}else if("before"===this.method){if(n)return!1}else if("after"===this.method)return!!t||(this.add(e),!1);return this.add(e)},e.prototype.add=function(e){return this._result.push(e),!0},e.prototype.getValue=function(){var e=this._result;switch(this.method){case"all":case"between":return e;default:return e.length?e[e.length-1]:null}},e.prototype.clone=function(){return new e(this.method,this.args)},e}();const rk=nk;var ok=function(e){function t(t,n,r){var o=e.call(this,t,n)||this;return o.iterator=r,o}return Yu(t,e),t.prototype.add=function(e){return!!this.iterator(e,this._result.length)&&(this._result.push(e),!0)},t}(rk);const ak=ok,sk={dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],tokens:{SKIP:/^[ \r\n\t]+|^\.$/,number:/^[1-9][0-9]*/,numberAsText:/^(one|two|three)/i,every:/^every/i,"day(s)":/^days?/i,"weekday(s)":/^weekdays?/i,"week(s)":/^weeks?/i,"hour(s)":/^hours?/i,"minute(s)":/^minutes?/i,"month(s)":/^months?/i,"year(s)":/^years?/i,on:/^(on|in)/i,at:/^(at)/i,the:/^the/i,first:/^first/i,second:/^second/i,third:/^third/i,nth:/^([1-9][0-9]*)(\.|th|nd|rd|st)/i,last:/^last/i,for:/^for/i,"time(s)":/^times?/i,until:/^(un)?til/i,monday:/^mo(n(day)?)?/i,tuesday:/^tu(e(s(day)?)?)?/i,wednesday:/^we(d(n(esday)?)?)?/i,thursday:/^th(u(r(sday)?)?)?/i,friday:/^fr(i(day)?)?/i,saturday:/^sa(t(urday)?)?/i,sunday:/^su(n(day)?)?/i,january:/^jan(uary)?/i,february:/^feb(ruary)?/i,march:/^mar(ch)?/i,april:/^apr(il)?/i,may:/^may/i,june:/^june?/i,july:/^july?/i,august:/^aug(ust)?/i,september:/^sep(t(ember)?)?/i,october:/^oct(ober)?/i,november:/^nov(ember)?/i,december:/^dec(ember)?/i,comma:/^(,\s*|(and|or)\s*)+/i}};var ik=function(e,t){return-1!==e.indexOf(t)},lk=function(e){return e.toString()},ck=function(e,t,n){return"".concat(t," ").concat(n,", ").concat(e)},dk=function(){function e(e,t,n,r){if(void 0===t&&(t=lk),void 0===n&&(n=sk),void 0===r&&(r=ck),this.text=[],this.language=n||sk,this.gettext=t,this.dateFormatter=r,this.rrule=e,this.options=e.options,this.origOptions=e.origOptions,this.origOptions.bymonthday){var o=[].concat(this.options.bymonthday),a=[].concat(this.options.bynmonthday);o.sort((function(e,t){return e-t})),a.sort((function(e,t){return t-e})),this.bymonthday=o.concat(a),this.bymonthday.length||(this.bymonthday=null)}if(Cw(this.origOptions.byweekday)){var s=Ew(this.origOptions.byweekday)?this.origOptions.byweekday:[this.origOptions.byweekday],i=String(s);this.byweekday={allWeeks:s.filter((function(e){return!e.n})),someWeeks:s.filter((function(e){return Boolean(e.n)})),isWeekdays:-1!==i.indexOf("MO")&&-1!==i.indexOf("TU")&&-1!==i.indexOf("WE")&&-1!==i.indexOf("TH")&&-1!==i.indexOf("FR")&&-1===i.indexOf("SA")&&-1===i.indexOf("SU"),isEveryDay:-1!==i.indexOf("MO")&&-1!==i.indexOf("TU")&&-1!==i.indexOf("WE")&&-1!==i.indexOf("TH")&&-1!==i.indexOf("FR")&&-1!==i.indexOf("SA")&&-1!==i.indexOf("SU")};var l=function(e,t){return e.weekday-t.weekday};this.byweekday.allWeeks.sort(l),this.byweekday.someWeeks.sort(l),this.byweekday.allWeeks.length||(this.byweekday.allWeeks=null),this.byweekday.someWeeks.length||(this.byweekday.someWeeks=null)}else this.byweekday=null}return e.isFullyConvertible=function(t){if(!(t.options.freq in e.IMPLEMENTED))return!1;if(t.origOptions.until&&t.origOptions.count)return!1;for(var n in t.origOptions){if(ik(["dtstart","tzid","wkst","freq"],n))return!0;if(!ik(e.IMPLEMENTED[t.options.freq],n))return!1}return!0},e.prototype.isFullyConvertible=function(){return e.isFullyConvertible(this.rrule)},e.prototype.toString=function(){var t=this.gettext;if(!(this.options.freq in e.IMPLEMENTED))return t("RRule error: Unable to fully convert this rrule to text");if(this.text=[t("every")],this[iS.FREQUENCIES[this.options.freq]](),this.options.until){this.add(t("until"));var n=this.options.until;this.add(this.dateFormatter(n.getUTCFullYear(),this.language.monthNames[n.getUTCMonth()],n.getUTCDate()))}else this.options.count&&this.add(t("for")).add(this.options.count.toString()).add(this.plural(this.options.count)?t("times"):t("time"));return this.isFullyConvertible()||this.add(t("(~ approximate)")),this.text.join("")},e.prototype.HOURLY=function(){var e=this.gettext;1!==this.options.interval&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("hours"):e("hour"))},e.prototype.MINUTELY=function(){var e=this.gettext;1!==this.options.interval&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("minutes"):e("minute"))},e.prototype.DAILY=function(){var e=this.gettext;1!==this.options.interval&&this.add(this.options.interval.toString()),this.byweekday&&this.byweekday.isWeekdays?this.add(this.plural(this.options.interval)?e("weekdays"):e("weekday")):this.add(this.plural(this.options.interval)?e("days"):e("day")),this.origOptions.bymonth&&(this.add(e("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday?this._byweekday():this.origOptions.byhour&&this._byhour()},e.prototype.WEEKLY=function(){var e=this.gettext;1!==this.options.interval&&this.add(this.options.interval.toString()).add(this.plural(this.options.interval)?e("weeks"):e("week")),this.byweekday&&this.byweekday.isWeekdays?1===this.options.interval?this.add(this.plural(this.options.interval)?e("weekdays"):e("weekday")):this.add(e("on")).add(e("weekdays")):this.byweekday&&this.byweekday.isEveryDay?this.add(this.plural(this.options.interval)?e("days"):e("day")):(1===this.options.interval&&this.add(e("week")),this.origOptions.bymonth&&(this.add(e("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday(),this.origOptions.byhour&&this._byhour())},e.prototype.MONTHLY=function(){var e=this.gettext;this.origOptions.bymonth?(1!==this.options.interval&&(this.add(this.options.interval.toString()).add(e("months")),this.plural(this.options.interval)&&this.add(e("in"))),this._bymonth()):(1!==this.options.interval&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("months"):e("month"))),this.bymonthday?this._bymonthday():this.byweekday&&this.byweekday.isWeekdays?this.add(e("on")).add(e("weekdays")):this.byweekday&&this._byweekday()},e.prototype.YEARLY=function(){var e=this.gettext;this.origOptions.bymonth?(1!==this.options.interval&&(this.add(this.options.interval.toString()),this.add(e("years"))),this._bymonth()):(1!==this.options.interval&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("years"):e("year"))),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday(),this.options.byyearday&&this.add(e("on the")).add(this.list(this.options.byyearday,this.nth,e("and"))).add(e("day")),this.options.byweekno&&this.add(e("in")).add(this.plural(this.options.byweekno.length)?e("weeks"):e("week")).add(this.list(this.options.byweekno,void 0,e("and")))},e.prototype._bymonthday=function(){var e=this.gettext;this.byweekday&&this.byweekday.allWeeks?this.add(e("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext,e("or"))).add(e("the")).add(this.list(this.bymonthday,this.nth,e("or"))):this.add(e("on the")).add(this.list(this.bymonthday,this.nth,e("and")))},e.prototype._byweekday=function(){var e=this.gettext;this.byweekday.allWeeks&&!this.byweekday.isWeekdays&&this.add(e("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext)),this.byweekday.someWeeks&&(this.byweekday.allWeeks&&this.add(e("and")),this.add(e("on the")).add(this.list(this.byweekday.someWeeks,this.weekdaytext,e("and"))))},e.prototype._byhour=function(){var e=this.gettext;this.add(e("at")).add(this.list(this.origOptions.byhour,void 0,e("and")))},e.prototype._bymonth=function(){this.add(this.list(this.options.bymonth,this.monthtext,this.gettext("and")))},e.prototype.nth=function(e){var t;e=parseInt(e.toString(),10);var n=this.gettext;if(-1===e)return n("last");var r=Math.abs(e);switch(r){case 1:case 21:case 31:t=r+n("st");break;case 2:case 22:t=r+n("nd");break;case 3:case 23:t=r+n("rd");break;default:t=r+n("th")}return e<0?t+" "+n("last"):t},e.prototype.monthtext=function(e){return this.language.monthNames[e-1]},e.prototype.weekdaytext=function(e){var t=_w(e)?(e+1)%7:e.getJsWeekday();return(e.n?this.nth(e.n)+" ":"")+this.language.dayNames[t]},e.prototype.plural=function(e){return e%100!=1},e.prototype.add=function(e){return this.text.push(" "),this.text.push(e),this},e.prototype.list=function(e,t,n,r){var o=this;void 0===r&&(r=","),Ew(e)||(e=[e]),t=t||function(e){return e.toString()};var a=function(e){return t&&t.call(o,e)};return n?function(e,t,n){for(var r="",o=0;o<e.length;o++)0!==o&&(o===e.length-1?r+=" "+n+" ":r+=t+" "),r+=e[o];return r}(e.map(a),r,n):e.map(a).join(r+" ")},e}();const uk=dk;var fk,hk=function(){function e(e){this.done=!0,this.rules=e}return e.prototype.start=function(e){return this.text=e,this.done=!1,this.nextSymbol()},e.prototype.isDone=function(){return this.done&&null===this.symbol},e.prototype.nextSymbol=function(){var e,t;this.symbol=null,this.value=null;do{if(this.done)return!1;for(var n in e=null,this.rules){var r=this.rules[n].exec(this.text);r&&(null===e||r[0].length>e[0].length)&&(e=r,t=n)}if(null!=e&&(this.text=this.text.substr(e[0].length),""===this.text&&(this.done=!0)),null==e)return this.done=!0,this.symbol=null,void(this.value=null)}while("SKIP"===t);return this.symbol=t,this.value=e,!0},e.prototype.accept=function(e){if(this.symbol===e){if(this.value){var t=this.value;return this.nextSymbol(),t}return this.nextSymbol(),!0}return!1},e.prototype.acceptNumber=function(){return this.accept("number")},e.prototype.expect=function(e){if(this.accept(e))return!0;throw new Error("expected "+e+" but found "+this.symbol)},e}();function mk(e,t){void 0===t&&(t=sk);var n={},r=new hk(t.tokens);return r.start(e)?(function(){r.expect("every");var e=r.acceptNumber();if(e&&(n.interval=parseInt(e[0],10)),r.isDone())throw new Error("Unexpected end");switch(r.symbol){case"day(s)":n.freq=iS.DAILY,r.nextSymbol()&&(a(),c());break;case"weekday(s)":n.freq=iS.WEEKLY,n.byweekday=[iS.MO,iS.TU,iS.WE,iS.TH,iS.FR],r.nextSymbol(),a(),c();break;case"week(s)":n.freq=iS.WEEKLY,r.nextSymbol()&&(o(),a(),c());break;case"hour(s)":n.freq=iS.HOURLY,r.nextSymbol()&&(o(),c());break;case"minute(s)":n.freq=iS.MINUTELY,r.nextSymbol()&&(o(),c());break;case"month(s)":n.freq=iS.MONTHLY,r.nextSymbol()&&(o(),c());break;case"year(s)":n.freq=iS.YEARLY,r.nextSymbol()&&(o(),c());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":n.freq=iS.WEEKLY;var t=r.symbol.substr(0,2).toUpperCase();if(n.byweekday=[iS[t]],!r.nextSymbol())return;for(;r.accept("comma");){if(r.isDone())throw new Error("Unexpected end");var d=i();if(!d)throw new Error("Unexpected symbol "+r.symbol+", expected weekday");n.byweekday.push(iS[d]),r.nextSymbol()}a(),function(){r.accept("on"),r.accept("the");var e=l();if(e)for(n.bymonthday=[e],r.nextSymbol();r.accept("comma");){if(!(e=l()))throw new Error("Unexpected symbol "+r.symbol+"; expected monthday");n.bymonthday.push(e),r.nextSymbol()}}(),c();break;case"january":case"february":case"march":case"april":case"may":case"june":case"july":case"august":case"september":case"october":case"november":case"december":if(n.freq=iS.YEARLY,n.bymonth=[s()],!r.nextSymbol())return;for(;r.accept("comma");){if(r.isDone())throw new Error("Unexpected end");var u=s();if(!u)throw new Error("Unexpected symbol "+r.symbol+", expected month");n.bymonth.push(u),r.nextSymbol()}o(),c();break;default:throw new Error("Unknown symbol")}}(),n):null;function o(){var e=r.accept("on"),t=r.accept("the");if(e||t)do{var o=l(),a=i(),c=s();if(o)a?(r.nextSymbol(),n.byweekday||(n.byweekday=[]),n.byweekday.push(iS[a].nth(o))):(n.bymonthday||(n.bymonthday=[]),n.bymonthday.push(o),r.accept("day(s)"));else if(a)r.nextSymbol(),n.byweekday||(n.byweekday=[]),n.byweekday.push(iS[a]);else if("weekday(s)"===r.symbol)r.nextSymbol(),n.byweekday||(n.byweekday=[iS.MO,iS.TU,iS.WE,iS.TH,iS.FR]);else if("week(s)"===r.symbol){r.nextSymbol();var d=r.acceptNumber();if(!d)throw new Error("Unexpected symbol "+r.symbol+", expected week number");for(n.byweekno=[parseInt(d[0],10)];r.accept("comma");){if(!(d=r.acceptNumber()))throw new Error("Unexpected symbol "+r.symbol+"; expected monthday");n.byweekno.push(parseInt(d[0],10))}}else{if(!c)return;r.nextSymbol(),n.bymonth||(n.bymonth=[]),n.bymonth.push(c)}}while(r.accept("comma")||r.accept("the")||r.accept("on"))}function a(){if(r.accept("at"))do{var e=r.acceptNumber();if(!e)throw new Error("Unexpected symbol "+r.symbol+", expected hour");for(n.byhour=[parseInt(e[0],10)];r.accept("comma");){if(!(e=r.acceptNumber()))throw new Error("Unexpected symbol "+r.symbol+"; expected hour");n.byhour.push(parseInt(e[0],10))}}while(r.accept("comma")||r.accept("at"))}function s(){switch(r.symbol){case"january":return 1;case"february":return 2;case"march":return 3;case"april":return 4;case"may":return 5;case"june":return 6;case"july":return 7;case"august":return 8;case"september":return 9;case"october":return 10;case"november":return 11;case"december":return 12;default:return!1}}function i(){switch(r.symbol){case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return r.symbol.substr(0,2).toUpperCase();default:return!1}}function l(){switch(r.symbol){case"last":return r.nextSymbol(),-1;case"first":return r.nextSymbol(),1;case"second":return r.nextSymbol(),r.accept("last")?-2:2;case"third":return r.nextSymbol(),r.accept("last")?-3:3;case"nth":var e=parseInt(r.value[1],10);if(e<-366||e>366)throw new Error("Nth out of range: "+e);return r.nextSymbol(),r.accept("last")?-e:e;default:return!1}}function c(){if("until"===r.symbol){var e=Date.parse(r.text);if(!e)throw new Error("Cannot parse until date:"+r.text);n.until=new Date(e)}else r.accept("for")&&(n.count=parseInt(r.value[0],10),r.expect("number"))}}function pk(e){return e<fk.HOURLY}!function(e){e[e.YEARLY=0]="YEARLY",e[e.MONTHLY=1]="MONTHLY",e[e.WEEKLY=2]="WEEKLY",e[e.DAILY=3]="DAILY",e[e.HOURLY=4]="HOURLY",e[e.MINUTELY=5]="MINUTELY",e[e.SECONDLY=6]="SECONDLY"}(fk||(fk={}));var gk=function(e,t){return void 0===t&&(t=sk),new iS(mk(e,t)||void 0)},vk=["count","until","interval","byweekday","bymonthday","bymonth"];uk.IMPLEMENTED=[],uk.IMPLEMENTED[fk.HOURLY]=vk,uk.IMPLEMENTED[fk.MINUTELY]=vk,uk.IMPLEMENTED[fk.DAILY]=["byhour"].concat(vk),uk.IMPLEMENTED[fk.WEEKLY]=vk,uk.IMPLEMENTED[fk.MONTHLY]=vk,uk.IMPLEMENTED[fk.YEARLY]=["byweekno","byyearday"].concat(vk);var yk=uk.isFullyConvertible,bk=function(){function e(e,t,n,r){this.hour=e,this.minute=t,this.second=n,this.millisecond=r||0}return e.prototype.getHours=function(){return this.hour},e.prototype.getMinutes=function(){return this.minute},e.prototype.getSeconds=function(){return this.second},e.prototype.getMilliseconds=function(){return this.millisecond},e.prototype.getTime=function(){return 1e3*(60*this.hour*60+60*this.minute+this.second)+this.millisecond},e}(),xk=function(e){function t(t,n,r,o,a,s,i){var l=e.call(this,o,a,s,i)||this;return l.year=t,l.month=n,l.day=r,l}return Yu(t,e),t.fromDate=function(e){return new this(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.valueOf()%1e3)},t.prototype.getWeekday=function(){return Yw(new Date(this.getTime()))},t.prototype.getTime=function(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second,this.millisecond)).getTime()},t.prototype.getDay=function(){return this.day},t.prototype.getMonth=function(){return this.month},t.prototype.getYear=function(){return this.year},t.prototype.addYears=function(e){this.year+=e},t.prototype.addMonths=function(e){if(this.month+=e,this.month>12){var t=Math.floor(this.month/12),n=Aw(this.month,12);this.month=n,this.year+=t,0===this.month&&(this.month=12,--this.year)}},t.prototype.addWeekly=function(e,t){t>this.getWeekday()?this.day+=-(this.getWeekday()+1+(6-t))+7*e:this.day+=-(this.getWeekday()-t)+7*e,this.fixDay()},t.prototype.addDaily=function(e){this.day+=e,this.fixDay()},t.prototype.addHours=function(e,t,n){for(t&&(this.hour+=Math.floor((23-this.hour)/e)*e);;){this.hour+=e;var r=Rw(this.hour,24),o=r.div,a=r.mod;if(o&&(this.hour=a,this.addDaily(o)),Mw(n)||Iw(n,this.hour))break}},t.prototype.addMinutes=function(e,t,n,r){for(t&&(this.minute+=Math.floor((1439-(60*this.hour+this.minute))/e)*e);;){this.minute+=e;var o=Rw(this.minute,60),a=o.div,s=o.mod;if(a&&(this.minute=s,this.addHours(a,!1,n)),(Mw(n)||Iw(n,this.hour))&&(Mw(r)||Iw(r,this.minute)))break}},t.prototype.addSeconds=function(e,t,n,r,o){for(t&&(this.second+=Math.floor((86399-(3600*this.hour+60*this.minute+this.second))/e)*e);;){this.second+=e;var a=Rw(this.second,60),s=a.div,i=a.mod;if(s&&(this.second=i,this.addMinutes(s,!1,n,r)),(Mw(n)||Iw(n,this.hour))&&(Mw(r)||Iw(r,this.minute))&&(Mw(o)||Iw(o,this.second)))break}},t.prototype.fixDay=function(){if(!(this.day<=28)){var e=qw(this.year,this.month-1)[1];if(!(this.day<=e))for(;this.day>e;){if(this.day-=e,++this.month,13===this.month&&(this.month=1,++this.year,this.year>9999))return;e=qw(this.year,this.month-1)[1]}}},t.prototype.add=function(e,t){var n=e.freq,r=e.interval,o=e.wkst,a=e.byhour,s=e.byminute,i=e.bysecond;switch(n){case fk.YEARLY:return this.addYears(r);case fk.MONTHLY:return this.addMonths(r);case fk.WEEKLY:return this.addWeekly(r,o);case fk.DAILY:return this.addDaily(r);case fk.HOURLY:return this.addHours(r,t,a);case fk.MINUTELY:return this.addMinutes(r,t,a,s);case fk.SECONDLY:return this.addSeconds(r,t,a,s,i)}},t}(bk);function wk(e){for(var t=[],n=0,r=Object.keys(e);n<r.length;n++){var o=r[n];Iw(sS,o)||t.push(o),Bw(e[o])&&!Ww(e[o])&&t.push(o)}if(t.length)throw new Error("Invalid options: "+t.join(", "));return qu({},e)}function kk(e){var t=qu(qu({},aS),wk(e));if(Cw(t.byeaster)&&(t.freq=iS.YEARLY),!Cw(t.freq)||!iS.FREQUENCIES[t.freq])throw new Error("Invalid frequency: ".concat(t.freq," ").concat(e.freq));if(t.dtstart||(t.dtstart=new Date((new Date).setMilliseconds(0))),Cw(t.wkst)?_w(t.wkst)||(t.wkst=t.wkst.weekday):t.wkst=iS.MO.weekday,Cw(t.bysetpos)){_w(t.bysetpos)&&(t.bysetpos=[t.bysetpos]);for(var n=0;n<t.bysetpos.length;n++)if(0===(a=t.bysetpos[n])||!(a>=-366&&a<=366))throw new Error("bysetpos must be between 1 and 366, or between -366 and -1")}if(!(Boolean(t.byweekno)||Ow(t.byweekno)||Ow(t.byyearday)||Boolean(t.bymonthday)||Ow(t.bymonthday)||Cw(t.byweekday)||Cw(t.byeaster)))switch(t.freq){case iS.YEARLY:t.bymonth||(t.bymonth=t.dtstart.getUTCMonth()+1),t.bymonthday=t.dtstart.getUTCDate();break;case iS.MONTHLY:t.bymonthday=t.dtstart.getUTCDate();break;case iS.WEEKLY:t.byweekday=[Yw(t.dtstart)]}if(Cw(t.bymonth)&&!Ew(t.bymonth)&&(t.bymonth=[t.bymonth]),Cw(t.byyearday)&&!Ew(t.byyearday)&&_w(t.byyearday)&&(t.byyearday=[t.byyearday]),Cw(t.bymonthday))if(Ew(t.bymonthday)){var r=[],o=[];for(n=0;n<t.bymonthday.length;n++){var a;(a=t.bymonthday[n])>0?r.push(a):a<0&&o.push(a)}t.bymonthday=r,t.bynmonthday=o}else t.bymonthday<0?(t.bynmonthday=[t.bymonthday],t.bymonthday=[]):(t.bynmonthday=[],t.bymonthday=[t.bymonthday]);else t.bymonthday=[],t.bynmonthday=[];if(Cw(t.byweekno)&&!Ew(t.byweekno)&&(t.byweekno=[t.byweekno]),Cw(t.byweekday))if(_w(t.byweekday))t.byweekday=[t.byweekday],t.bynweekday=null;else if(jw(t.byweekday))t.byweekday=[Sw.fromStr(t.byweekday).weekday],t.bynweekday=null;else if(t.byweekday instanceof Sw)!t.byweekday.n||t.freq>iS.MONTHLY?(t.byweekday=[t.byweekday.weekday],t.bynweekday=null):(t.bynweekday=[[t.byweekday.weekday,t.byweekday.n]],t.byweekday=null);else{var s=[],i=[];for(n=0;n<t.byweekday.length;n++){var l=t.byweekday[n];_w(l)?s.push(l):jw(l)?s.push(Sw.fromStr(l).weekday):!l.n||t.freq>iS.MONTHLY?s.push(l.weekday):i.push([l.weekday,l.n])}t.byweekday=Ow(s)?s:null,t.bynweekday=Ow(i)?i:null}else t.bynweekday=null;return Cw(t.byhour)?_w(t.byhour)&&(t.byhour=[t.byhour]):t.byhour=t.freq<iS.HOURLY?[t.dtstart.getUTCHours()]:null,Cw(t.byminute)?_w(t.byminute)&&(t.byminute=[t.byminute]):t.byminute=t.freq<iS.MINUTELY?[t.dtstart.getUTCMinutes()]:null,Cw(t.bysecond)?_w(t.bysecond)&&(t.bysecond=[t.bysecond]):t.bysecond=t.freq<iS.SECONDLY?[t.dtstart.getUTCSeconds()]:null,{parsedOptions:t}}function Sk(e){var t=e.split("\n").map(_k).filter((function(e){return null!==e}));return qu(qu({},t[0]),t[1])}function Ck(e){var t={},n=/DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\s]+)/i.exec(e);if(!n)return t;var r=n[1],o=n[2];return r&&(t.tzid=r),t.dtstart=ek(o),t}function _k(e){if(!(e=e.replace(/^\s+|\s+$/,"")).length)return null;var t=/^([A-Z]+?)[:;]/.exec(e.toUpperCase());if(!t)return jk(e);var n=t[1];switch(n.toUpperCase()){case"RRULE":case"EXRULE":return jk(e);case"DTSTART":return Ck(e);default:throw new Error("Unsupported RFC prop ".concat(n," in ").concat(e))}}function jk(e){var t=Ck(e.replace(/^RRULE:/i,""));return e.replace(/^(?:RRULE|EXRULE):/i,"").split(";").forEach((function(n){var r=n.split("="),o=r[0],a=r[1];switch(o.toUpperCase()){case"FREQ":t.freq=fk[a.toUpperCase()];break;case"WKST":t.wkst=oS[a.toUpperCase()];break;case"COUNT":case"INTERVAL":case"BYSETPOS":case"BYMONTH":case"BYMONTHDAY":case"BYYEARDAY":case"BYWEEKNO":case"BYHOUR":case"BYMINUTE":case"BYSECOND":var s=function(e){return-1!==e.indexOf(",")?e.split(",").map(Ek):Ek(e)}(a),i=o.toLowerCase();t[i]=s;break;case"BYWEEKDAY":case"BYDAY":t.byweekday=function(e){return e.split(",").map((function(e){if(2===e.length)return oS[e];var t=e.match(/^([+-]?\d{1,2})([A-Z]{2})$/);if(!t||t.length<3)throw new SyntaxError("Invalid weekday string: ".concat(e));var n=Number(t[1]),r=t[2],o=oS[r].weekday;return new Sw(o,n)}))}(a);break;case"DTSTART":case"TZID":var l=Ck(e);t.tzid=l.tzid,t.dtstart=l.dtstart;break;case"UNTIL":t.until=ek(a);break;case"BYEASTER":t.byeaster=Number(a);break;default:throw new Error("Unknown RRULE property '"+o+"'")}})),t}function Ek(e){return/^[+-]?\d+$/.test(e)?Number(e):e}var Nk=function(){function e(e,t){if(isNaN(e.getTime()))throw new RangeError("Invalid date passed to DateWithZone");this.date=e,this.tzid=t}return Object.defineProperty(e.prototype,"isUTC",{get:function(){return!this.tzid||"UTC"===this.tzid.toUpperCase()},enumerable:!1,configurable:!0}),e.prototype.toString=function(){var e=Xw(this.date.getTime(),this.isUTC);return this.isUTC?":".concat(e):";TZID=".concat(this.tzid,":").concat(e)},e.prototype.getTime=function(){return this.date.getTime()},e.prototype.rezonedDate=function(){return this.isUTC?this.date:(e=this.date,t=this.tzid,n=Intl.DateTimeFormat().resolvedOptions().timeZone,r=new Date(tk(e,n)),o=new Date(tk(e,null!=t?t:"UTC")).getTime()-r.getTime(),new Date(e.getTime()-o));var e,t,n,r,o},e}();function Dk(e){for(var t,n=[],r="",o=Object.keys(e),a=Object.keys(aS),s=0;s<o.length;s++)if("tzid"!==o[s]&&Iw(a,o[s])){var i=o[s].toUpperCase(),l=e[o[s]],c="";if(Cw(l)&&(!Ew(l)||l.length)){switch(i){case"FREQ":c=iS.FREQUENCIES[e.freq];break;case"WKST":c=_w(l)?new Sw(l).toString():l.toString();break;case"BYWEEKDAY":i="BYDAY",c=(t=l,Ew(t)?t:[t]).map((function(e){return e instanceof Sw?e:Ew(e)?new Sw(e[0],e[1]):new Sw(e)})).toString();break;case"DTSTART":r=Tk(l,e.tzid);break;case"UNTIL":c=Xw(l,!e.tzid);break;default:if(Ew(l)){for(var d=[],u=0;u<l.length;u++)d[u]=String(l[u]);c=d.toString()}else c=String(l)}c&&n.push([i,c])}}var f=n.map((function(e){var t=e[0],n=e[1];return"".concat(t,"=").concat(n.toString())})).join(";"),h="";return""!==f&&(h="RRULE:".concat(f)),[r,h].filter((function(e){return!!e})).join("\n")}function Tk(e,t){return e?"DTSTART"+new Nk(new Date(e),t).toString():""}function Ak(e,t){return Array.isArray(e)?!!Array.isArray(t)&&e.length===t.length&&e.every((function(e,n){return e.getTime()===t[n].getTime()})):e instanceof Date?t instanceof Date&&e.getTime()===t.getTime():e===t}var Rk=function(){function e(){this.all=!1,this.before=[],this.after=[],this.between=[]}return e.prototype._cacheAdd=function(e,t,n){t&&(t=t instanceof Date?Kw(t):Qw(t)),"all"===e?this.all=t:(n._value=t,this[e].push(n))},e.prototype._cacheGet=function(e,t){var n=!1,r=t?Object.keys(t):[],o=function(e){for(var n=0;n<r.length;n++){var o=r[n];if(!Ak(t[o],e[o]))return!0}return!1},a=this[e];if("all"===e)n=this.all;else if(Ew(a))for(var s=0;s<a.length;s++){var i=a[s];if(!r.length||!o(i)){n=i._value;break}}if(!n&&this.all){var l=new rk(e,t);for(s=0;s<this.all.length&&l.accept(this.all[s]);s++);n=l.getValue(),this._cacheAdd(e,n,t)}return Ew(n)?Qw(n):n instanceof Date?Kw(n):n},e}(),Mk=Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku([],Dw(1,31),!0),Dw(2,28),!0),Dw(3,31),!0),Dw(4,30),!0),Dw(5,31),!0),Dw(6,30),!0),Dw(7,31),!0),Dw(8,31),!0),Dw(9,30),!0),Dw(10,31),!0),Dw(11,30),!0),Dw(12,31),!0),Dw(1,7),!0),Ok=Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku([],Dw(1,31),!0),Dw(2,29),!0),Dw(3,31),!0),Dw(4,30),!0),Dw(5,31),!0),Dw(6,30),!0),Dw(7,31),!0),Dw(8,31),!0),Dw(9,30),!0),Dw(10,31),!0),Dw(11,30),!0),Dw(12,31),!0),Dw(1,7),!0),Ik=Nw(1,29),Pk=Nw(1,30),Lk=Nw(1,31),Fk=Nw(1,32),zk=Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku([],Fk,!0),Pk,!0),Fk,!0),Lk,!0),Fk,!0),Lk,!0),Fk,!0),Fk,!0),Lk,!0),Fk,!0),Lk,!0),Fk,!0),Fk.slice(0,7),!0),Hk=Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku([],Fk,!0),Ik,!0),Fk,!0),Lk,!0),Fk,!0),Lk,!0),Fk,!0),Fk,!0),Lk,!0),Fk,!0),Lk,!0),Fk,!0),Fk.slice(0,7),!0),Vk=Nw(-28,0),Bk=Nw(-29,0),Wk=Nw(-30,0),Uk=Nw(-31,0),$k=Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku([],Uk,!0),Bk,!0),Uk,!0),Wk,!0),Uk,!0),Wk,!0),Uk,!0),Uk,!0),Wk,!0),Uk,!0),Wk,!0),Uk,!0),Uk.slice(0,7),!0),Gk=Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku([],Uk,!0),Vk,!0),Uk,!0),Wk,!0),Uk,!0),Wk,!0),Uk,!0),Uk,!0),Wk,!0),Uk,!0),Wk,!0),Uk,!0),Uk.slice(0,7),!0),Yk=[0,31,60,91,121,152,182,213,244,274,305,335,366],qk=[0,31,59,90,120,151,181,212,243,273,304,334,365],Zk=function(){for(var e=[],t=0;t<55;t++)e=e.concat(Nw(7));return e}();var Kk=function(){function e(e){this.options=e}return e.prototype.rebuild=function(e,t){var n=this.options;if(e!==this.lastyear&&(this.yearinfo=function(e,t){var n,r,o=Pw(e,1,1),a=Vw(e)?366:365,s=Vw(e+1)?366:365,i=Uw(o),l=Yw(o),c=qu(qu({yearlen:a,nextyearlen:s,yearordinal:i,yearweekday:l},function(e){var t=Vw(e)?366:365,n=Pw(e,1,1),r=Yw(n);return 365===t?{mmask:Mk,mdaymask:Hk,nmdaymask:Gk,wdaymask:Zk.slice(r),mrange:qk}:{mmask:Ok,mdaymask:zk,nmdaymask:$k,wdaymask:Zk.slice(r),mrange:Yk}}(e)),{wnomask:null});if(Mw(t.byweekno))return c;c.wnomask=Dw(0,a+7);var d=n=Aw(7-l+t.wkst,7);d>=4?(d=0,r=c.yearlen+Aw(l-t.wkst,7)):r=a-d;for(var u=Math.floor(r/7),f=Aw(r,7),h=Math.floor(u+f/4),m=0;m<t.byweekno.length;m++){var p=t.byweekno[m];if(p<0&&(p+=h+1),p>0&&p<=h){var g=void 0;p>1?(g=d+7*(p-1),d!==n&&(g-=7-n)):g=d;for(var v=0;v<7&&(c.wnomask[g]=1,g++,c.wdaymask[g]!==t.wkst);v++);}}if(Iw(t.byweekno,1)&&(g=d+7*h,d!==n&&(g-=7-n),g<a))for(m=0;m<7&&(c.wnomask[g]=1,g+=1,c.wdaymask[g]!==t.wkst);m++);if(d){var y=void 0;if(Iw(t.byweekno,-1))y=-1;else{var b=Yw(Pw(e-1,1,1)),x=Aw(7-b.valueOf()+t.wkst,7),w=Vw(e-1)?366:365,k=void 0;x>=4?(x=0,k=w+Aw(b-t.wkst,7)):k=a-d,y=Math.floor(52+Aw(k,7)/4)}if(Iw(t.byweekno,y))for(g=0;g<d;g++)c.wnomask[g]=1}return c}(e,n)),Ow(n.bynweekday)&&(t!==this.lastmonth||e!==this.lastyear)){var r=this.yearinfo,o=r.yearlen,a=r.mrange,s=r.wdaymask;this.monthinfo=function(e,t,n,r,o,a){var s={lastyear:e,lastmonth:t,nwdaymask:[]},i=[];if(a.freq===iS.YEARLY)if(Mw(a.bymonth))i=[[0,n]];else for(var l=0;l<a.bymonth.length;l++)t=a.bymonth[l],i.push(r.slice(t-1,t+1));else a.freq===iS.MONTHLY&&(i=[r.slice(t-1,t+1)]);if(Mw(i))return s;for(s.nwdaymask=Dw(0,n),l=0;l<i.length;l++)for(var c=i[l],d=c[0],u=c[1]-1,f=0;f<a.bynweekday.length;f++){var h=void 0,m=a.bynweekday[f],p=m[0],g=m[1];g<0?(h=u+7*(g+1),h-=Aw(o[h]-p,7)):(h=d+7*(g-1),h+=Aw(7-o[h]+p,7)),d<=h&&h<=u&&(s.nwdaymask[h]=1)}return s}(e,t,o,a,s,n)}Cw(n.byeaster)&&(this.eastermask=function(e,t){void 0===t&&(t=0);var n=e%19,r=Math.floor(e/100),o=e%100,a=Math.floor(r/4),s=r%4,i=Math.floor((r+8)/25),l=Math.floor((r-i+1)/3),c=Math.floor(19*n+r-a-l+15)%30,d=Math.floor(o/4),u=o%4,f=Math.floor(32+2*s+2*d-c-u)%7,h=Math.floor((n+11*c+22*f)/451),m=Math.floor((c+f-7*h+114)/31),p=(c+f-7*h+114)%31+1,g=Date.UTC(e,m-1,p+t),v=Date.UTC(e,0,1);return[Math.ceil((g-v)/864e5)]}(e,n.byeaster))},Object.defineProperty(e.prototype,"lastyear",{get:function(){return this.monthinfo?this.monthinfo.lastyear:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastmonth",{get:function(){return this.monthinfo?this.monthinfo.lastmonth:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"yearlen",{get:function(){return this.yearinfo.yearlen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"yearordinal",{get:function(){return this.yearinfo.yearordinal},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mrange",{get:function(){return this.yearinfo.mrange},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"wdaymask",{get:function(){return this.yearinfo.wdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mmask",{get:function(){return this.yearinfo.mmask},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"wnomask",{get:function(){return this.yearinfo.wnomask},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nwdaymask",{get:function(){return this.monthinfo?this.monthinfo.nwdaymask:[]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextyearlen",{get:function(){return this.yearinfo.nextyearlen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mdaymask",{get:function(){return this.yearinfo.mdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nmdaymask",{get:function(){return this.yearinfo.nmdaymask},enumerable:!1,configurable:!0}),e.prototype.ydayset=function(){return[Nw(this.yearlen),0,this.yearlen]},e.prototype.mdayset=function(e,t){for(var n=this.mrange[t-1],r=this.mrange[t],o=Dw(null,this.yearlen),a=n;a<r;a++)o[a]=a;return[o,n,r]},e.prototype.wdayset=function(e,t,n){for(var r=Dw(null,this.yearlen+7),o=Uw(Pw(e,t,n))-this.yearordinal,a=o,s=0;s<7&&(r[o]=o,++o,this.wdaymask[o]!==this.options.wkst);s++);return[r,a,o]},e.prototype.ddayset=function(e,t,n){var r=Dw(null,this.yearlen),o=Uw(Pw(e,t,n))-this.yearordinal;return r[o]=o,[r,o,o+1]},e.prototype.htimeset=function(e,t,n,r){var o=this,a=[];return this.options.byminute.forEach((function(t){a=a.concat(o.mtimeset(e,t,n,r))})),Jw(a),a},e.prototype.mtimeset=function(e,t,n,r){var o=this.options.bysecond.map((function(n){return new bk(e,t,n,r)}));return Jw(o),o},e.prototype.stimeset=function(e,t,n,r){return[new bk(e,t,n,r)]},e.prototype.getdayset=function(e){switch(e){case fk.YEARLY:return this.ydayset.bind(this);case fk.MONTHLY:return this.mdayset.bind(this);case fk.WEEKLY:return this.wdayset.bind(this);case fk.DAILY:default:return this.ddayset.bind(this)}},e.prototype.gettimeset=function(e){switch(e){case fk.HOURLY:return this.htimeset.bind(this);case fk.MINUTELY:return this.mtimeset.bind(this);case fk.SECONDLY:return this.stimeset.bind(this)}},e}();const Qk=Kk;function Jk(e,t,n,r,o,a){for(var s=[],i=0;i<e.length;i++){var l=void 0,c=void 0,d=e[i];d<0?(l=Math.floor(d/t.length),c=Aw(d,t.length)):(l=Math.floor((d-1)/t.length),c=Aw(d-1,t.length));for(var u=[],f=n;f<r;f++){var h=a[f];Cw(h)&&u.push(h)}var m;m=l<0?u.slice(l)[0]:u[l];var p=t[c],g=$w(o.yearordinal+m),v=Zw(g,p);Iw(s,v)||s.push(v)}return Jw(s),s}function Xk(e,t){var n=t.dtstart,r=t.freq,o=t.interval,a=t.until,s=t.bysetpos,i=t.count;if(0===i||0===o)return nS(e);var l=xk.fromDate(n),c=new Qk(t);c.rebuild(l.year,l.month);for(var d=function(e,t,n){var r=n.freq,o=n.byhour,a=n.byminute,s=n.bysecond;return pk(r)?function(e){var t=e.dtstart.getTime()%1e3;if(!pk(e.freq))return[];var n=[];return e.byhour.forEach((function(r){e.byminute.forEach((function(o){e.bysecond.forEach((function(e){n.push(new bk(r,o,e,t))}))}))})),n}(n):r>=iS.HOURLY&&Ow(o)&&!Iw(o,t.hour)||r>=iS.MINUTELY&&Ow(a)&&!Iw(a,t.minute)||r>=iS.SECONDLY&&Ow(s)&&!Iw(s,t.second)?[]:e.gettimeset(r)(t.hour,t.minute,t.second,t.millisecond)}(c,l,t);;){var u=c.getdayset(r)(l.year,l.month,l.day),f=u[0],h=u[1],m=u[2],p=rS(f,h,m,c,t);if(Ow(s))for(var g=Jk(s,d,h,m,c,f),v=0;v<g.length;v++){var y=g[v];if(a&&y>a)return nS(e);if(y>=n){var b=tS(y,t);if(!e.accept(b))return nS(e);if(i&&! --i)return nS(e)}}else for(v=h;v<m;v++){var x=f[v];if(Cw(x))for(var w=$w(c.yearordinal+x),k=0;k<d.length;k++){var S=d[k];if(y=Zw(w,S),a&&y>a)return nS(e);if(y>=n){if(b=tS(y,t),!e.accept(b))return nS(e);if(i&&! --i)return nS(e)}}}if(0===t.interval)return nS(e);if(l.add(t,p),l.year>9999)return nS(e);pk(r)||(d=c.gettimeset(r)(l.hour,l.minute,l.second,0)),c.rebuild(l.year,l.month)}}function eS(e,t,n){var r=n.bymonth,o=n.byweekno,a=n.byweekday,s=n.byeaster,i=n.bymonthday,l=n.bynmonthday,c=n.byyearday;return Ow(r)&&!Iw(r,e.mmask[t])||Ow(o)&&!e.wnomask[t]||Ow(a)&&!Iw(a,e.wdaymask[t])||Ow(e.nwdaymask)&&!e.nwdaymask[t]||null!==s&&!Iw(e.eastermask,t)||(Ow(i)||Ow(l))&&!Iw(i,e.mdaymask[t])&&!Iw(l,e.nmdaymask[t])||Ow(c)&&(t<e.yearlen&&!Iw(c,t+1)&&!Iw(c,-e.yearlen+t)||t>=e.yearlen&&!Iw(c,t+1-e.yearlen)&&!Iw(c,-e.nextyearlen+t-e.yearlen))}function tS(e,t){return new Nk(e,t.tzid).rezonedDate()}function nS(e){return e.getValue()}function rS(e,t,n,r,o){for(var a=!1,s=t;s<n;s++){var i=e[s];(a=eS(r,i,o))&&(e[i]=null)}return a}var oS={MO:new Sw(0),TU:new Sw(1),WE:new Sw(2),TH:new Sw(3),FR:new Sw(4),SA:new Sw(5),SU:new Sw(6)},aS={freq:fk.YEARLY,dtstart:null,interval:1,wkst:oS.MO,count:null,until:null,tzid:null,bysetpos:null,bymonth:null,bymonthday:null,bynmonthday:null,byyearday:null,byweekno:null,byweekday:null,bynweekday:null,byhour:null,byminute:null,bysecond:null,byeaster:null},sS=Object.keys(aS),iS=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t=!1),this._cache=t?null:new Rk,this.origOptions=wk(e);var n=kk(e).parsedOptions;this.options=n}return e.parseText=function(e,t){return mk(e,t)},e.fromText=function(e,t){return gk(e,t)},e.fromString=function(t){return new e(e.parseString(t)||void 0)},e.prototype._iter=function(e){return Xk(e,this.options)},e.prototype._cacheGet=function(e,t){return!!this._cache&&this._cache._cacheGet(e,t)},e.prototype._cacheAdd=function(e,t,n){if(this._cache)return this._cache._cacheAdd(e,t,n)},e.prototype.all=function(e){if(e)return this._iter(new ak("all",{},e));var t=this._cacheGet("all");return!1===t&&(t=this._iter(new rk("all",{})),this._cacheAdd("all",t)),t},e.prototype.between=function(e,t,n,r){if(void 0===n&&(n=!1),!Ww(e)||!Ww(t))throw new Error("Invalid date passed in to RRule.between");var o={before:t,after:e,inc:n};if(r)return this._iter(new ak("between",o,r));var a=this._cacheGet("between",o);return!1===a&&(a=this._iter(new rk("between",o)),this._cacheAdd("between",a,o)),a},e.prototype.before=function(e,t){if(void 0===t&&(t=!1),!Ww(e))throw new Error("Invalid date passed in to RRule.before");var n={dt:e,inc:t},r=this._cacheGet("before",n);return!1===r&&(r=this._iter(new rk("before",n)),this._cacheAdd("before",r,n)),r},e.prototype.after=function(e,t){if(void 0===t&&(t=!1),!Ww(e))throw new Error("Invalid date passed in to RRule.after");var n={dt:e,inc:t},r=this._cacheGet("after",n);return!1===r&&(r=this._iter(new rk("after",n)),this._cacheAdd("after",r,n)),r},e.prototype.count=function(){return this.all().length},e.prototype.toString=function(){return Dk(this.origOptions)},e.prototype.toText=function(e,t,n){return function(e,t,n,r){return new uk(e,t,n,r).toString()}(this,e,t,n)},e.prototype.isFullyConvertibleToText=function(){return yk(this)},e.prototype.clone=function(){return new e(this.origOptions)},e.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],e.YEARLY=fk.YEARLY,e.MONTHLY=fk.MONTHLY,e.WEEKLY=fk.WEEKLY,e.DAILY=fk.DAILY,e.HOURLY=fk.HOURLY,e.MINUTELY=fk.MINUTELY,e.SECONDLY=fk.SECONDLY,e.MO=oS.MO,e.TU=oS.TU,e.WE=oS.WE,e.TH=oS.TH,e.FR=oS.FR,e.SA=oS.SA,e.SU=oS.SU,e.parseString=Sk,e.optionsToString=Dk,e}(),lS={dtstart:null,cache:!1,unfold:!1,forceset:!1,compatible:!1,tzid:null};function cS(e,t){return void 0===t&&(t={}),function(e,t){var n=function(e,t){var n=[],r=[],o=[],a=[],s=Ck(e),i=s.dtstart,l=s.tzid,c=function(e,t){if(void 0===t&&(t=!1),!(e=e&&e.trim()))throw new Error("Invalid empty string");if(!t)return e.split(/\s/);for(var n=e.split("\n"),r=0;r<n.length;){var o=n[r]=n[r].replace(/\s+$/g,"");o?r>0&&" "===o[0]?(n[r-1]+=o.slice(1),n.splice(r,1)):r+=1:n.splice(r,1)}return n}(e,t.unfold);return c.forEach((function(e){var t;if(e){var s=function(e){var t=function(e){if(-1===e.indexOf(":"))return{name:"RRULE",value:e};var t,n=(t=e.split(":")).slice(0,1).concat([t.slice(1).join(":")]);return{name:n[0],value:n[1]}}(e),n=t.name,r=t.value,o=n.split(";");if(!o)throw new Error("empty property name");return{name:o[0].toUpperCase(),parms:o.slice(1),value:r}}(e),i=s.name,c=s.parms,d=s.value;switch(i.toUpperCase()){case"RRULE":if(c.length)throw new Error("unsupported RRULE parm: ".concat(c.join(",")));n.push(Sk(e));break;case"RDATE":var u=(null!==(t=/RDATE(?:;TZID=([^:=]+))?/i.exec(e))&&void 0!==t?t:[])[1];u&&!l&&(l=u),r=r.concat(uS(d,c));break;case"EXRULE":if(c.length)throw new Error("unsupported EXRULE parm: ".concat(c.join(",")));o.push(Sk(d));break;case"EXDATE":a=a.concat(uS(d,c));break;case"DTSTART":break;default:throw new Error("unsupported property: "+i)}}})),{dtstart:i,tzid:l,rrulevals:n,rdatevals:r,exrulevals:o,exdatevals:a}}(e,t),r=n.rrulevals,o=n.rdatevals,a=n.exrulevals,s=n.exdatevals,i=n.dtstart,l=n.tzid,c=!1===t.cache;if(t.compatible&&(t.forceset=!0,t.unfold=!0),t.forceset||r.length>1||o.length||a.length||s.length){var d=new hS(c);return d.dtstart(i),d.tzid(l||void 0),r.forEach((function(e){d.rrule(new iS(dS(e,i,l),c))})),o.forEach((function(e){d.rdate(e)})),a.forEach((function(e){d.exrule(new iS(dS(e,i,l),c))})),s.forEach((function(e){d.exdate(e)})),t.compatible&&t.dtstart&&d.rdate(i),d}var u=r[0]||{};return new iS(dS(u,u.dtstart||t.dtstart||i,u.tzid||t.tzid||l),c)}(e,function(e){var t=[],n=Object.keys(e),r=Object.keys(lS);if(n.forEach((function(e){Iw(r,e)||t.push(e)})),t.length)throw new Error("Invalid options: "+t.join(", "));return qu(qu({},lS),e)}(t))}function dS(e,t,n){return qu(qu({},e),{dtstart:t,tzid:n})}function uS(e,t){return function(e){e.forEach((function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw new Error("unsupported RDATE/EXDATE parm: "+e)}))}(t),e.split(",").map((function(e){return ek(e)}))}function fS(e){var t=this;return function(n){if(void 0!==n&&(t["_".concat(e)]=n),void 0!==t["_".concat(e)])return t["_".concat(e)];for(var r=0;r<t._rrule.length;r++){var o=t._rrule[r].origOptions[e];if(o)return o}}}var hS=function(e){function t(t){void 0===t&&(t=!1);var n=e.call(this,{},t)||this;return n.dtstart=fS.apply(n,["dtstart"]),n.tzid=fS.apply(n,["tzid"]),n._rrule=[],n._rdate=[],n._exrule=[],n._exdate=[],n}return Yu(t,e),t.prototype._iter=function(e){return function(e,t,n,r,o,a){var s={},i=e.accept;function l(e,t){n.forEach((function(n){n.between(e,t,!0).forEach((function(e){s[Number(e)]=!0}))}))}o.forEach((function(e){var t=new Nk(e,a).rezonedDate();s[Number(t)]=!0})),e.accept=function(e){var t=Number(e);return isNaN(t)?i.call(this,e):!(!s[t]&&(l(new Date(t-1),new Date(t+1)),!s[t]))||(s[t]=!0,i.call(this,e))},"between"===e.method&&(l(e.args.after,e.args.before),e.accept=function(e){var t=Number(e);return!!s[t]||(s[t]=!0,i.call(this,e))});for(var c=0;c<r.length;c++){var d=new Nk(r[c],a).rezonedDate();if(!e.accept(new Date(d.getTime())))break}t.forEach((function(t){Xk(e,t.options)}));var u=e._result;switch(Jw(u),e.method){case"all":case"between":return u;case"before":return u.length&&u[u.length-1]||null;default:return u.length&&u[0]||null}}(e,this._rrule,this._exrule,this._rdate,this._exdate,this.tzid())},t.prototype.rrule=function(e){mS(e,this._rrule)},t.prototype.exrule=function(e){mS(e,this._exrule)},t.prototype.rdate=function(e){pS(e,this._rdate)},t.prototype.exdate=function(e){pS(e,this._exdate)},t.prototype.rrules=function(){return this._rrule.map((function(e){return cS(e.toString())}))},t.prototype.exrules=function(){return this._exrule.map((function(e){return cS(e.toString())}))},t.prototype.rdates=function(){return this._rdate.map((function(e){return new Date(e.getTime())}))},t.prototype.exdates=function(){return this._exdate.map((function(e){return new Date(e.getTime())}))},t.prototype.valueOf=function(){var e=[];return!this._rrule.length&&this._dtstart&&(e=e.concat(Dk({dtstart:this._dtstart}))),this._rrule.forEach((function(t){e=e.concat(t.toString().split("\n"))})),this._exrule.forEach((function(t){e=e.concat(t.toString().split("\n").map((function(e){return e.replace(/^RRULE:/,"EXRULE:")})).filter((function(e){return!/^DTSTART/.test(e)})))})),this._rdate.length&&e.push(gS("RDATE",this._rdate,this.tzid())),this._exdate.length&&e.push(gS("EXDATE",this._exdate,this.tzid())),e},t.prototype.toString=function(){return this.valueOf().join("\n")},t.prototype.clone=function(){var e=new t(!!this._cache);return this._rrule.forEach((function(t){return e.rrule(t.clone())})),this._exrule.forEach((function(t){return e.exrule(t.clone())})),this._rdate.forEach((function(t){return e.rdate(new Date(t.getTime()))})),this._exdate.forEach((function(t){return e.exdate(new Date(t.getTime()))})),e},t}(iS);function mS(e,t){if(!(e instanceof iS))throw new TypeError(String(e)+" is not RRule instance");Iw(t.map(String),String(e))||t.push(e)}function pS(e,t){if(!(e instanceof Date))throw new TypeError(String(e)+" is not Date instance");Iw(t.map(Number),Number(e))||(t.push(e),Jw(t))}function gS(e,t,n){var r=!n||"UTC"===n.toUpperCase(),o=r?"".concat(e,":"):"".concat(e,";TZID=").concat(n,":"),a=t.map((function(e){return Xw(e.valueOf(),r)})).join(",");return"".concat(o).concat(a)}function vS(){const{event:t}=Fl(),{settings:n}=Re(),r=(0,e.useRef)(null),[o]=je(),a=o.get("status")||"all",s=(0,e.useMemo)((()=>Array.isArray(n?.working_days)?n.working_days.map((e=>parseInt(e,10))):[0,1,2,3,4]),[n?.working_days]),[i,l]=(0,e.useState)([]);return(0,e.useEffect)((()=>{const e=t?.recurrence_overrides?Object.entries(t.recurrence_overrides).map((([e,t])=>({...t,timestamp:Number(e)}))):[],n="trash"===a,r=function(e=[],t="",n=[],r=[],o=null,a=!1){const s=new Date,i=[],l=[iS.MO,iS.TU,iS.WE,iS.TH,iS.FR,iS.SA,iS.SU];let c=0;for(let g=0;g<e.length;g++){const v=e[g],y=vs.fromISO(v.start_date,{zone:"utc"}),b=vs.fromISO(v.end_date,{zone:"utc"}),x=b.diff(y),w=new Date(y.year,y.month-1,y.day,y.hour,y.minute,y.second,y.millisecond),k=b.toUTC().toJSDate(),S=y.hour,C=y.minute;if(b.hour,b.minute,!w)continue;if(!k&&v.all_day&&(k=new Date(w),k.setHours(23,59,0,0)),!k)continue;const _="never"===v.ends;if("day"===v.frequency&&!0===v.working_days_only&&Array.isArray(r)&&r.length>0){const e=[],l=new Date(w),h=v.every||1;let m=0,p=0;for(;e.length<500;){const t=l.getDay();if(r.includes(t))if(0===m){if(e.push(new Date(l)),p++,m=h-1,"after"===v.ends&&p>=v.ends_after)break;if("on"===v.ends&&l>new Date(v.ends_on))break}else m--;l.setDate(l.getDate()+1)}for(let r=0;r<e.length;r++){var d,u,f;const l=e[r],h=vs.fromObject({year:null!==(d=l.getFullYear?.())&&void 0!==d?d:l.year,month:null!==(u=l.getMonth?.()+1)&&void 0!==u?u:l.month,day:null!==(f=l.getDate?.())&&void 0!==f?f:l.day,hour:S,minute:C},{zone:"utc"}),m=h.plus(x),p=Math.floor(h.toUTC().toSeconds()),g=n.find((e=>e.timestamp===p)),y=h<=s&&s<m,b=m<s;let w;if("trash"===g?.status){if(!a)continue;w="trash"}else w=y?"live":b?"completed":"upcoming";const k=o?.endsWith("/"),_=k||o?.includes("/event/"),j=o?_?`${o.replace(/\/$/,"")}/${p}`:`${o}?instance=${p}`:null;i.push({id:String(c++),title:g?.title||t||`Instance ${r+1}`,status:w,all_day:v.all_day||!1,start_date:h.toUTC().toISO({suppressMilliseconds:!1}),end_date:m.toUTC().toISO({suppressMilliseconds:!1}),modified_date:g?.modified_at||"",instance_url:j,override:g})}continue}let j;if("week"===v.frequency&&v.weekdays?.length&&(j=v.weekdays.map((e=>l[e]))),("month"===v.frequency||"year"===v.frequency)&&"weekday-of-month"===v.month_day_rule){const e=y.weekday-1,t=Math.ceil(y.day/7);j=[l[e].nth(t)]}const E={freq:"day"===v.frequency?iS.DAILY:"week"===v.frequency?iS.WEEKLY:"month"===v.frequency?iS.MONTHLY:iS.YEARLY,interval:v.every||1,dtstart:w,count:"after"===v.ends?v.ends_after:_?500:void 0,until:"on"===v.ends?new Date(v.ends_on):void 0,byweekday:j,bymonthday:"month"===v.frequency&&"day-of-month"===v.month_day_rule&&v.month_day_value?[v.month_day_value]:void 0,bymonth:"year"===v.frequency&&v.months?.length?v.months.map((e=>e+1)):void 0};try{const e=new iS(E).all();for(let r=0;r<e.length&&i.length<500;r++){var h,m,p;const l=e[r],d=vs.fromObject({year:null!==(h=l.getFullYear?.())&&void 0!==h?h:l.year,month:null!==(m=l.getMonth?.()+1)&&void 0!==m?m:l.month,day:null!==(p=l.getDate?.())&&void 0!==p?p:l.day,hour:S,minute:C},{zone:"utc"}),u=d.plus(x),f=Math.floor(d.toUTC().toSeconds()),g=n.find((e=>e.timestamp===f)),y=d<=s&&s<u,b=u<s;let w;if("trash"===g?.status){if(!a)continue;w="trash"}else w=y?"live":b?"completed":"upcoming";const k=o?.endsWith("/"),_=k||o?.includes("/event/"),j=o?_?`${o.replace(/\/$/,"")}/${f}`:`${o}?instance=${f}`:null;i.push({id:String(c++),title:t||`Instance ${r+1}`,status:w,all_day:v.all_day||!1,start_date:d.toUTC().toISO({suppressMilliseconds:!1}),end_date:u.toUTC().toISO({suppressMilliseconds:!1}),modified_date:g?.modified_at||"",instance_url:j,override:g})}}catch(e){console.error("Failed to generate recurring instances:",e)}}return a?i.filter((e=>"trash"===e.status)):i.filter((e=>"trash"!==e.status))}(t?.recurrence_rules,t?.title,e,s,t?.url,n);l(r)}),[t?.recurrence_rules,t?.title,t?.recurrence_overrides,s,t?.id,t?.url,a,o]),(0,e.useEffect)((()=>{r.current&&(r.current.style.height="auto",r.current.style.height=`${r.current.scrollHeight}px`)}),[t?.title]),console.log(i),(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)(ol,{className:"mb-8"}),(0,De.jsx)("div",{className:"flex flex-col w-full gap-8 pointer-events-none opacity-50 select-none",children:(0,De.jsxs)(Bi,{container:!0,children:[(0,De.jsx)(xw,{className:"flex gap-2 p-0",children:(0,De.jsx)("div",{className:"relative flex items-center gap-2",children:(0,De.jsx)(ww,{ref:r,id:"event-name-readonly",className:Ni("inline-flex flex-1 resize-none overflow-hidden bg-transparent border-2 border-transparent rounded-md p-2 font-medium text-2xl leading-tight min-h-0 w-auto max-w-full","text-foreground","shadow-none ring-0 focus:ring-0 focus-visible:ring-0","outline-none focus:outline-none focus-visible:outline-none","focus-visible:ring-offset-0 focus-visible:ring-transparent focus-visible:ring-offset-transparent","cursor-default select-none",!t?.title&&"text-muted-foreground"),value:t?.title||"",readOnly:!0,rows:1})})}),(0,De.jsx)(bw,{instances:i,isLoading:!1,eventId:t?.id,timezone:t?.timezone,status:a})]})})]})}function yS({isInstance:t=!1,value:n,onChange:r}){const{event:o,setEvent:a}=Fl(),s=t?null:o,i=t?null:a,l=(0,e.useRef)(),[c,d]=(0,e.useState)(!1),[u,f]=(0,e.useState)(n||s?.description||"");return(0,e.useEffect)((()=>{if(!window.tinymce||!l.current||c)return;const e="event-description";return window.tinymce.init({target:l.current,height:250,menubar:!1,branding:!1,plugins:"lists link wordpress",toolbar:"undo redo | heading1 heading2 heading3 heading4 | bold italic underline | bullist numlist | link | removeformat | htmlToggle",block_formats:"Paragraph=p; Heading 1=h1; Heading 2=h2; Heading 3=h3; Heading 4=h4",content_style:"\n          body {\n            padding: 2px 14px;\n            font-family: Inter, system-ui, sans-serif;\n            font-size: 14px;\n            line-height: 1.6;\n            color: #1f2937;\n            background: transparent;\n          }\n        ",setup:n=>{[{id:"heading1",label:"H1",block:"h1"},{id:"heading2",label:"H2",block:"h2"},{id:"heading3",label:"H3",block:"h3"},{id:"heading4",label:"H4",block:"h4"}].forEach((({id:e,label:t,block:r})=>{n.addButton(e,{text:t,tooltip:`Heading ${t}`,onclick:()=>{n.execCommand("FormatBlock",!1,r)},onPostRender:function(){const e=this;n.on("NodeChange",(function(){const t=n.formatter.match(r);e.active(t)}))}})})),n.addButton("htmlToggle",{text:c?"Visual":"Raw HTML",tooltip:"Toggle HTML view",onclick:()=>{const t=n.getContent({format:"html"});f(t),d(!0),window.tinymce.remove(`#${e}`)}}),n.on("Change Input Undo Redo",(()=>{const e=n.getContent();t&&r?r(e):i((t=>({...t,description:e})))})),n.on("init",(()=>{n.setContent(u||"")}))}}),()=>{window.tinymce&&window.tinymce.remove(`#${e}`)}}),[c]),(0,De.jsxs)(xw,{className:"p-0",children:[(0,De.jsx)(dy,{htmlFor:"event-description",children:"Event description"}),(0,De.jsx)("div",{className:"text-muted-foreground mb-2",children:"Tell people what your event is about."}),c?(0,De.jsx)("textarea",{className:"w-full min-h-[250px] rounded-md border border-input bg-background p-2 text-sm font-mono",value:u,onChange:e=>f(e.target.value),onBlur:e=>{t&&r?r(e.target.value):i((t=>({...t,description:e.target.value})))}}):(0,De.jsx)("textarea",{id:"event-description",ref:l,defaultValue:u,className:"w-full min-h-[250px] rounded-md border border-input bg-background p-2 text-sm"}),c&&(0,De.jsx)("button",{type:"button",className:"mt-2 text-sm text-primary underline",onClick:()=>d(!1),children:"Switch back to Visual"})]})}const bS=window.wp.mediaUtils,xS=Mi("Repeat2",[["path",{d:"m2 9 3-3 3 3",key:"1ltn5i"}],["path",{d:"M13 18H7a2 2 0 0 1-2-2V6",key:"1r6tfw"}],["path",{d:"m22 15-3 3-3-3",key:"4rnwn2"}],["path",{d:"M11 6h6a2 2 0 0 1 2 2v10",key:"2f72bc"}]]),wS=["image"];function kS({isInstance:t=!1,value:n,onChange:r}){const{event:o,setEvent:a}=Fl(),[s,i]=(0,e.useState)(!1),[l,c]=(0,e.useState)(!1),[d,u]=(0,e.useState)(""),[f,h]=(0,e.useState)(!1),[m,p]=(0,e.useState)(0),g=t?n?.image:o?.image,v=t?n?.image_id:o?.image_id,y=(e,n)=>{t&&r?r({image:e,image_id:n}):a((t=>({...t,image:e,image_id:n})))},b=async e=>{e?.preventDefault(),e?.stopPropagation(),i(!0),y("",""),i(!1)},x=async({file:e=null,url:n=null,attachment_id:r=null})=>{i(!0);try{let a={path:`${eventkoi_params.api}/upload_image`,method:"POST"};if(e){const n=new FormData;n.append("uploadedfile",e),n.append("post_id",o.id),n.append("set_thumbnail",t?"0":"1"),a.body=n,a.headers={"EVENTKOI-API-KEY":eventkoi_params.api_key}}else a.body=JSON.stringify({post_id:o.id,set_thumbnail:!t,...n&&{url:n},...r&&{attachment_id:r}}),a.headers={"EVENTKOI-API-KEY":eventkoi_params.api_key,"Content-Type":"application/json"};const s=await Ne()(a);s.id&&s.url?y(s.url,s.id):vp("Upload failed. Please try again.")}catch(e){vp("Upload failed. Please try again.")}finally{i(!1),u(""),c(!1)}},w=()=>{d&&d.startsWith("http")?x({url:d}):vp("Please enter a valid image URL.")},k=e=>{e.preventDefault(),e.stopPropagation(),p((e=>e+1)),h(!0)},S=e=>{e.preventDefault(),e.stopPropagation(),p((e=>{const t=e-1;return t<=0?(h(!1),0):t}))},C=e=>{var t;e.preventDefault(),e.stopPropagation(),p(0),h(!1),t=e.dataTransfer.files,t?.length&&x({file:t[0]})};return(0,De.jsxs)(xw,{className:"p-0",children:[(0,De.jsx)(dy,{htmlFor:"image",children:"Header banner image"}),(0,De.jsx)("div",{className:"text-muted-foreground",children:"Ideal size: 1600px × 600px"}),(0,De.jsx)(bS.MediaUpload,{title:"Select event image",onSelect:e=>x({attachment_id:e.id,url:e.url}),allowedTypes:wS,value:v,disabled:s,render:({open:e})=>(0,De.jsxs)("div",{className:Ni("relative group rounded overflow-hidden transition",g?"p-0":"bg-secondary hover:border-muted-foreground/60 p-8 flex flex-col items-center justify-center gap-4 cursor-pointer"),onClick:()=>{s||l||g||e()},onDragEnter:k,onDragOver:e=>e.preventDefault(),onDragLeave:S,onDrop:C,children:[f&&(0,De.jsx)("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-background/70 text-xl font-semibold text-primary rounded-2xl",children:"Drop to upload"}),s&&(0,De.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-background/60 rounded-2xl",children:(0,De.jsx)(yp,{className:"w-8 h-8 animate-spin",strokeWidth:1.5})}),l?(0,De.jsx)(CS,{urlInput:d,setUrlInput:u,onSubmit:w,onCancel:()=>{c(!1),u("")},uploading:s}):g?(0,De.jsx)(_S,{imageUrl:g,openMediaLibrary:e,deleteImage:b}):(0,De.jsx)(SS,{onUrlMode:()=>c(!0)})]})})]})}function SS({onUrlMode:e}){return(0,De.jsxs)("div",{className:"flex flex-col items-center justify-center gap-3 text-center",children:[(0,De.jsx)(Dl,{className:"w-10 h-10 text-muted-foreground",strokeWidth:1.2}),(0,De.jsx)("div",{className:"text-lg font-semibold",children:"Drag and drop an image"}),(0,De.jsx)("div",{className:"text-sm text-muted-foreground",children:"or click to upload from your media library"}),(0,De.jsxs)(tl,{variant:"link",size:"sm",className:"text-xs mt-2",onClick:t=>{t.stopPropagation(),e()},children:[(0,De.jsx)(El,{className:"w-3 h-3 mr-1"}),"Paste image URL instead"]})]})}function CS({urlInput:e,setUrlInput:t,onSubmit:n,onCancel:r,uploading:o}){return(0,De.jsxs)("div",{className:"flex flex-col items-center justify-center w-full gap-4 text-center p-4",children:[(0,De.jsx)(El,{className:"w-8 h-8 mx-auto text-muted-foreground",strokeWidth:1.2}),(0,De.jsx)("div",{className:"text-lg font-semibold",children:"Paste an image URL"}),(0,De.jsx)("div",{className:"text-sm text-muted-foreground",children:"Enter a direct link to an image (https://...)"}),(0,De.jsx)(Uv,{type:"url",placeholder:"https://example.com/banner.jpg",value:e,onChange:e=>t(e.target.value),className:"w-full",disabled:o,onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),n())}}),(0,De.jsxs)("div",{className:"flex gap-2",children:[(0,De.jsx)(tl,{size:"sm",variant:"default",onClick:n,disabled:o,children:"Set Image"}),(0,De.jsx)(tl,{size:"sm",variant:"outline",onClick:r,disabled:o,children:"Cancel"})]})]})}function _S({imageUrl:e,openMediaLibrary:t,deleteImage:n}){return(0,De.jsxs)("div",{className:"relative w-full h-auto group",children:[(0,De.jsx)("img",{src:e,alt:"",className:"w-full h-auto rounded-2xl object-cover transition duration-300 group-hover:opacity-80"}),(0,De.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-black/60 opacity-0 group-hover:opacity-100 transition-opacity duration-300 rounded-2xl",children:(0,De.jsxs)("div",{className:"flex flex-col sm:flex-row gap-3",children:[(0,De.jsxs)(tl,{variant:"secondary",size:"sm",className:"bg-white/20 text-white hover:bg-white/30",onClick:e=>{e.preventDefault(),e.stopPropagation(),t()},children:[(0,De.jsx)(xS,{className:"w-4 h-4 mr-1"}),"Replace"]}),(0,De.jsxs)(tl,{variant:"destructive",size:"sm",className:"bg-red-500/80 hover:bg-red-600 text-white",onClick:e=>{e.preventDefault(),e.stopPropagation(),n()},children:[(0,De.jsx)(gw,{className:"w-4 h-4 mr-1"}),"Delete"]})]})})]})}const jS=Mi("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),ES=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)("div",{ref:n,className:Ni("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t})));ES.displayName="Card";const NS=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)("div",{ref:n,className:Ni("flex flex-col space-y-1.5 p-6",e),...t})));NS.displayName="CardHeader";const DS=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)("h3",{ref:n,className:Ni("text-2xl font-semibold leading-none tracking-tight",e),...t})));DS.displayName="CardTitle",e.forwardRef((({className:e,...t},n)=>(0,De.jsx)("p",{ref:n,className:Ni("text-sm text-muted-foreground",e),...t}))).displayName="CardDescription";const TS=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)("div",{ref:n,className:Ni("p-6 pt-0",e),...t})));function AS({location:e,onChange:t}){return(0,De.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,De.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,De.jsx)(dy,{htmlFor:`name-${e.id}`,children:"Location name (optional)"}),(0,De.jsx)(Uv,{id:`name-${e.id}`,value:e.name,placeholder:"e.g., Zoom, Google Meet, or Webinar Host",onChange:e=>t({name:e.target.value})}),(0,De.jsx)("p",{className:"text-muted-foreground text-sm",children:"Give your location a name to help attendees identify it more easily."})]}),(0,De.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,De.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,De.jsx)(dy,{htmlFor:`link_text-${e.id}`,children:"Event link text"}),(0,De.jsx)(Uv,{id:`link_text-${e.id}`,value:e.link_text,placeholder:"e.g., Join on Zoom",onChange:e=>t({link_text:e.target.value})})]}),(0,De.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,De.jsx)(dy,{htmlFor:`virtual_url-${e.id}`,children:"Event URL"}),(0,De.jsx)(Uv,{id:`virtual_url-${e.id}`,type:"url",placeholder:"https://",value:e.virtual_url,onChange:e=>t({virtual_url:e.target.value})})]})]})]})}TS.displayName="CardContent",e.forwardRef((({className:e,...t},n)=>(0,De.jsx)("div",{ref:n,className:Ni("flex items-center p-6 pt-0",e),...t}))).displayName="CardFooter";const RS=Xi("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),MS=e.forwardRef((({className:e,variant:t,...n},r)=>(0,De.jsx)("div",{ref:r,role:"alert",className:Ni(RS({variant:t}),e),...n})));MS.displayName="Alert",e.forwardRef((({className:e,...t},n)=>(0,De.jsx)("h5",{ref:n,className:Ni("mb-1 font-medium leading-none tracking-tight",e),...t}))).displayName="AlertTitle";const OS=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)("div",{ref:n,className:Ni("text-sm [&_p]:leading-relaxed",e),...t})));OS.displayName="AlertDescription";const IS=Mi("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var PS=o(17);function LS(){return LS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},LS.apply(null,arguments)}function FS(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}function zS(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}const HS="NOT_LOADED",VS="LOADED",BS="AUTH_FAILURE";class WS{static async load(e,t){var n;const r=e.libraries?e.libraries.split(","):[],o=this.serializeParams(e);this.listeners.push(t),null!=(n=window.google)&&null!=(n=n.maps)&&n.importLibrary?(this.serializedApiParams||(this.loadingStatus=VS),this.notifyLoadingStatusListeners()):(this.serializedApiParams=o,this.initImportLibrary(e)),this.serializedApiParams&&this.serializedApiParams!==o&&console.warn("[google-maps-api-loader] The maps API has already been loaded with different parameters and will not be loaded again. Refresh the page for new values to have effect.");const a=["maps",...r];await Promise.all(a.map((e=>google.maps.importLibrary(e))))}static serializeParams(e){return[e.v,e.key,e.language,e.region,e.authReferrerPolicy,e.solutionChannel].join("/")}static initImportLibrary(e){if(window.google||(window.google={}),window.google.maps||(window.google.maps={}),window.google.maps.importLibrary)return void console.error("[google-maps-api-loader-internal]: initImportLibrary must only be called once");let t=null;const n=()=>t||(t=new Promise(((t,n)=>{var r;const o=document.createElement("script"),a=new URLSearchParams;for(const[t,n]of Object.entries(e)){const e=t.replace(/[A-Z]/g,(e=>"_"+e[0].toLowerCase()));a.set(e,String(n))}a.set("loading","async"),a.set("callback","__googleMapsCallback__"),o.async=!0,o.src="https://maps.googleapis.com/maps/api/js?"+a.toString(),o.nonce=(null==(r=document.querySelector("script[nonce]"))?void 0:r.nonce)||"",o.onerror=()=>{this.loadingStatus="FAILED",this.notifyLoadingStatusListeners(),n(new Error("The Google Maps JavaScript API could not load."))},window.__googleMapsCallback__=()=>{this.loadingStatus=VS,this.notifyLoadingStatusListeners(),t()},window.gm_authFailure=()=>{this.loadingStatus=BS,this.notifyLoadingStatusListeners()},this.loadingStatus="LOADING",this.notifyLoadingStatusListeners(),document.head.append(o)})),t);google.maps.importLibrary=e=>n().then((()=>google.maps.importLibrary(e)))}static notifyLoadingStatusListeners(){for(const e of this.listeners)e(this.loadingStatus)}}WS.loadingStatus=HS,WS.serializedApiParams=void 0,WS.listeners=[];const US=["onLoad","onError","apiKey","version","libraries"],$S=["children"],GS=e.createContext(null),YS=t=>{const{children:n}=t,r=FS(t,$S),{mapInstances:o,addMapInstance:a,removeMapInstance:s,clearMapInstances:i}=function(){const[t,n]=(0,e.useState)({});return{mapInstances:t,addMapInstance:(e,t="default")=>{n((n=>LS({},n,{[t]:e})))},removeMapInstance:(e="default")=>{n((t=>FS(t,[e].map(zS))))},clearMapInstances:()=>{n({})}}}(),{status:l,loadedLibraries:c,importLibrary:d}=function(t){const{onLoad:n,onError:r,apiKey:o,version:a,libraries:s=[]}=t,i=FS(t,US),[l,c]=(0,e.useState)(WS.loadingStatus),[d,u]=(0,e.useReducer)(((e,t)=>e[t.name]?e:LS({},e,{[t.name]:t.value})),{}),f=(0,e.useMemo)((()=>null==s?void 0:s.join(",")),[s]),h=(0,e.useMemo)((()=>JSON.stringify(LS({apiKey:o,version:a},i))),[o,a,i]),m=(0,e.useCallback)((async e=>{var t;if(d[e])return d[e];if(null==(t=google)||null==(t=t.maps)||!t.importLibrary)throw new Error("[api-provider-internal] importLibrary was called before google.maps.importLibrary was defined.");const n=await window.google.maps.importLibrary(e);return u({name:e,value:n}),n}),[d]);return(0,e.useEffect)((()=>{(async()=>{try{const e=LS({key:o},i);a&&(e.v=a),(null==f?void 0:f.length)>0&&(e.libraries=f),(void 0===e.channel||e.channel<0||e.channel>999)&&delete e.channel,void 0===e.solutionChannel?e.solutionChannel="GMP_visgl_rgmlibrary_v1_default":""===e.solutionChannel&&delete e.solutionChannel,await WS.load(e,(e=>c(e)));for(const e of["core","maps",...s])await m(e);n&&n()}catch(e){r?r(e):console.error("<ApiProvider> failed to load the Google Maps JavaScript API",e)}})()}),[o,f,h]),{status:l,loadedLibraries:d,importLibrary:m}}(r),u=(0,e.useMemo)((()=>({mapInstances:o,addMapInstance:a,removeMapInstance:s,clearMapInstances:i,status:l,loadedLibraries:c,importLibrary:d})),[o,a,s,i,l,c,d]);return e.createElement(GS.Provider,{value:u},n)};function qS(e,t,n){const r={type:e,map:t,detail:{},stoppable:!1,stop:()=>{}};if(KS.includes(e)){const e=r,n=t.getCenter(),o=t.getZoom(),a=t.getHeading()||0,s=t.getTilt()||0,i=t.getBounds();return n&&i&&Number.isFinite(o)||console.warn("[createEvent] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"),e.detail={center:(null==n?void 0:n.toJSON())||{lat:0,lng:0},zoom:o||0,heading:a,tilt:s,bounds:(null==i?void 0:i.toJSON())||{north:90,east:180,south:-90,west:-180}},e}if(QS.includes(e)){var o;if(!n)throw new Error("[createEvent] mouse events must provide a srcEvent");const e=r;return e.domEvent=n.domEvent,e.stoppable=!0,e.stop=()=>n.stop(),e.detail={latLng:(null==(o=n.latLng)?void 0:o.toJSON())||null,placeId:n.placeId},e}return r}const ZS={onBoundsChanged:"bounds_changed",onCenterChanged:"center_changed",onClick:"click",onContextmenu:"contextmenu",onDblclick:"dblclick",onDrag:"drag",onDragend:"dragend",onDragstart:"dragstart",onHeadingChanged:"heading_changed",onIdle:"idle",onIsFractionalZoomEnabledChanged:"isfractionalzoomenabled_changed",onMapCapabilitiesChanged:"mapcapabilities_changed",onMapTypeIdChanged:"maptypeid_changed",onMousemove:"mousemove",onMouseout:"mouseout",onMouseover:"mouseover",onProjectionChanged:"projection_changed",onRenderingTypeChanged:"renderingtype_changed",onTilesLoaded:"tilesloaded",onTiltChanged:"tilt_changed",onZoomChanged:"zoom_changed",onCameraChanged:"bounds_changed"},KS=["bounds_changed","center_changed","heading_changed","tilt_changed","zoom_changed"],QS=["click","contextmenu","dblclick","mousemove","mouseout","mouseover"],JS=Object.keys(ZS);const XS=new Set(["backgroundColor","clickableIcons","controlSize","disableDefaultUI","disableDoubleClickZoom","draggable","draggableCursor","draggingCursor","fullscreenControl","fullscreenControlOptions","gestureHandling","headingInteractionEnabled","isFractionalZoomEnabled","keyboardShortcuts","mapTypeControl","mapTypeControlOptions","mapTypeId","maxZoom","minZoom","noClear","panControl","panControlOptions","restriction","rotateControl","rotateControlOptions","scaleControl","scaleControlOptions","scrollwheel","streetView","streetViewControl","streetViewControlOptions","styles","tiltInteractionEnabled","zoomControl","zoomControlOptions"]);function eC(){var t;return(null==(t=(0,e.useContext)(GS))?void 0:t.status)||HS}function tC(e){return function(e){return!(!e||"object"!=typeof e)&&"lat"in e&&"lng"in e&&Number.isFinite(e.lat)&&Number.isFinite(e.lng)}(e)?e:e.toJSON()}const nC=()=>e.createElement("div",{style:{position:"absolute",top:0,left:0,bottom:0,right:0,zIndex:999,display:"flex",flexFlow:"column nowrap",textAlign:"center",justifyContent:"center",fontSize:".8rem",color:"rgba(0,0,0,0.6)",background:"#dddddd",padding:"1rem 1.5rem"}},e.createElement("h2",null,"Error: AuthFailure"),e.createElement("p",null,"A problem with your API key prevents the map from rendering correctly. Please make sure the value of the ",e.createElement("code",null,"APIProvider.apiKey")," prop is correct. Check the error-message in the console for further details."));function rC(){return eC()===VS}const oC=["id","defaultBounds","defaultCenter","defaultZoom","defaultHeading","defaultTilt","reuseMaps","renderingType","colorScheme"],aC=["padding"];class sC{static has(e){return this.entries[e]&&this.entries[e].length>0}static pop(e){return this.entries[e]&&this.entries[e].pop()||null}static push(e,t){this.entries[e]||(this.entries[e]=[]),this.entries[e].push(t)}}function iC(t,n){const r=rC(),[o,a]=(0,e.useState)(null),[s,i]=function(){const[t,n]=(0,e.useState)(null);return[t,(0,e.useCallback)((e=>n(e)),[n])]}(),l=function(t){const n=function(){const[,t]=(0,e.useReducer)((e=>e+1),0);return t}(),r=(0,e.useRef)({center:{lat:0,lng:0},heading:0,tilt:0,zoom:0});return(0,e.useEffect)((()=>{if(!t)return;const e=google.maps.event.addListener(t,"bounds_changed",(()=>{!function(e,t){const n=e.getCenter(),r=e.getZoom(),o=e.getHeading()||0,a=e.getTilt()||0,s=e.getBounds();n&&s&&Number.isFinite(r)||console.warn("[useTrackedCameraState] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"),Object.assign(t.current,{center:(null==n?void 0:n.toJSON())||{lat:0,lng:0},zoom:r||0,heading:o,tilt:a})}(t,r),n()}));return()=>e.remove()}),[t,n]),r}(o),{id:c,defaultBounds:d,defaultCenter:u,defaultZoom:f,defaultHeading:h,defaultTilt:m,reuseMaps:p,renderingType:g,colorScheme:v}=t,y=FS(t,oC),b=void 0!==t.zoom||void 0!==t.defaultZoom,x=void 0!==t.center||void 0!==t.defaultCenter;d||b&&x||console.warn("<Map> component is missing configuration. You have to provide zoom and center (via the `zoom`/`defaultZoom` and `center`/`defaultCenter` props) or specify the region to show using `defaultBounds`. See https://visgl.github.io/react-google-maps/docs/api-reference/components/map#required"),!y.center&&u&&(y.center=u),!y.zoom&&Number.isFinite(f)&&(y.zoom=f),!y.heading&&Number.isFinite(h)&&(y.heading=h),!y.tilt&&Number.isFinite(m)&&(y.tilt=m);for(const e of Object.keys(y))void 0===y[e]&&delete y[e];const w=(0,e.useRef)(void 0);return(0,e.useEffect)((()=>{if(!s||!r)return;const{addMapInstance:e,removeMapInstance:o}=n,{mapId:i}=t,u=`${i||"default"}:${g||"default"}:${v||"LIGHT"}`;let f,h;if(p&&sC.has(u)?(h=sC.pop(u),f=h.getDiv(),s.appendChild(f),h.setOptions(y),setTimeout((()=>h.setCenter(h.getCenter())),0)):(f=document.createElement("div"),f.style.height="100%",s.appendChild(f),h=new google.maps.Map(f,LS({},y,g?{renderingType:g}:{},v?{colorScheme:v}:{}))),a(h),e(h,c),d){const{padding:e}=d,t=FS(d,aC);h.fitBounds(t,e)}else b&&x||h.fitBounds({east:180,west:-180,south:-90,north:90});if(w.current){const{mapId:e,cameraState:t}=w.current;e!==i&&h.setOptions(t)}return()=>{w.current={mapId:i,cameraState:l.current},f.remove(),p?sC.push(u,h):google.maps.event.clearInstanceListeners(h),a(null),o(c)}}),[s,r,c,t.mapId,t.renderingType,t.colorScheme]),[o,i,l]}sC.entries={};const lC=e.createContext(null);(t=>{const{children:n,id:r,className:o,style:a}=t,s=(0,e.useContext)(GS),i=eC();if(!s)throw new Error("<Map> can only be used inside an <ApiProvider> component.");const[l,c,d]=iC(t,s);!function(t,n,r){const o=r.center?tC(r.center):null;let a=null,s=null;o&&Number.isFinite(o.lat)&&Number.isFinite(o.lng)&&(a=o.lat,s=o.lng);const i=Number.isFinite(r.zoom)?r.zoom:null,l=Number.isFinite(r.heading)?r.heading:null,c=Number.isFinite(r.tilt)?r.tilt:null;(0,e.useLayoutEffect)((()=>{if(!t)return;const e={};let r=!1;null===a||null===s||n.current.center.lat===a&&n.current.center.lng===s||(e.center={lat:a,lng:s},r=!0),null!==i&&n.current.zoom!==i&&(e.zoom=i,r=!0),null!==l&&n.current.heading!==l&&(e.heading=l,r=!0),null!==c&&n.current.tilt!==c&&(e.tilt=c,r=!0),r&&t.moveCamera(e)}))}(l,d,t),function(t,n){for(const r of JS){const o=n[r],a=ZS[r];(0,e.useEffect)((()=>{if(!t)return;if(!o)return;const e=google.maps.event.addListener(t,a,(e=>{o(qS(a,t,e))}));return()=>e.remove()}),[t,a,o])}}(l,t),function(t,n){const r={},o=Object.keys(n);for(const e of o)XS.has(e)&&(r[e]=n[e]);!function(t,n){const r=(0,e.useRef)(void 0);r.current&&PS(n,r.current)||(r.current=n),(0,e.useEffect)(t,r.current)}((()=>{t&&t.setOptions(r)}),[r])}(l,t);const u=function(t,n){const{viewport:r,viewState:o}=n,a=!!r;return(0,e.useLayoutEffect)((()=>{if(!t||!o)return;const{latitude:e,longitude:n,bearing:r,pitch:a,zoom:s}=o;t.moveCamera({center:{lat:e,lng:n},heading:r,tilt:a,zoom:s+1})}),[t,o]),a}(l,t),f=!!t.controlled;(0,e.useEffect)((()=>{if(l)return u&&l.setOptions({disableDefaultUI:!0}),(u||f)&&l.setOptions({gestureHandling:"none",keyboardShortcuts:!1}),()=>{l.setOptions({gestureHandling:t.gestureHandling,keyboardShortcuts:t.keyboardShortcuts})}}),[l,u,f,t.gestureHandling,t.keyboardShortcuts]);const h=t.center?tC(t.center):null;let m=null,p=null;h&&Number.isFinite(h.lat)&&Number.isFinite(h.lng)&&(m=h.lat,p=h.lng);const g=(0,e.useMemo)((()=>{var e,n,r,o,a;return{center:{lat:null!=(e=m)?e:0,lng:null!=(n=p)?n:0},zoom:null!=(r=t.zoom)?r:0,heading:null!=(o=t.heading)?o:0,tilt:null!=(a=t.tilt)?a:0}}),[m,p,t.zoom,t.heading,t.tilt]);(0,e.useLayoutEffect)((()=>{if(!l||!f)return;l.moveCamera(g);const e=l.addListener("bounds_changed",(()=>{l.moveCamera(g)}));return()=>e.remove()}),[l,f,g]);const v=(0,e.useMemo)((()=>LS({width:"100%",height:"100%",position:"relative",zIndex:u?-1:0},a)),[a,u]),y=(0,e.useMemo)((()=>({map:l})),[l]);return i===BS?e.createElement("div",{style:LS({position:"relative"},o?{}:v),className:o},e.createElement(nC,null)):e.createElement("div",LS({ref:c,"data-testid":"map",style:o?void 0:v,className:o},r?{id:r}:{}),l?e.createElement(lC.Provider,{value:y},n):null)}).deckGLViewProps=!0;const cC=new Set;const dC=(t=null)=>{const n=(0,e.useContext)(GS),{map:r}=(0,e.useContext)(lC)||{};if(null===n)return function(...e){const t=JSON.stringify(e);cC.has(t)||(cC.add(t),console.error(...e))}("useMap(): failed to retrieve APIProviderContext. Make sure that the <APIProvider> component exists and that the component you are calling `useMap()` from is a sibling of the <APIProvider>."),null;const{mapInstances:o}=n;return null!==t?o[t]||null:r||o.default||null};function uC(t){const n=rC(),r=(0,e.useContext)(GS);return(0,e.useEffect)((()=>{n&&r&&r.importLibrary(t)}),[n,r,t]),(null==r?void 0:r.loadedLibraries[t])||null}function fC(t,n,r){(0,e.useEffect)((()=>{if(!t||!n||!r)return;const e=google.maps.event.addListener(t,n,r);return()=>e.remove()}),[t,n,r])}function hC(t,n,r){(0,e.useEffect)((()=>{t&&(t[n]=r)}),[t,n,r])}function mC(t,n,r){(0,e.useEffect)((()=>{if(t&&n&&r)return t.addEventListener(n,r),()=>t.removeEventListener(n,r)}),[t,n,r])}const pC=e.createContext(null),gC={TOP_LEFT:["0%","0%"],TOP_CENTER:["50%","0%"],TOP:["50%","0%"],TOP_RIGHT:["100%","0%"],LEFT_CENTER:["0%","50%"],LEFT_TOP:["0%","0%"],LEFT:["0%","50%"],LEFT_BOTTOM:["0%","100%"],RIGHT_TOP:["100%","0%"],RIGHT:["100%","50%"],RIGHT_CENTER:["100%","50%"],RIGHT_BOTTOM:["100%","100%"],BOTTOM_LEFT:["0%","100%"],BOTTOM_CENTER:["50%","100%"],BOTTOM:["50%","100%"],BOTTOM_RIGHT:["100%","100%"],CENTER:["50%","50%"]},vC=({children:t,styles:n,className:r,anchorPoint:o})=>{const[a,s]=null!=o?o:gC.BOTTOM;let i=`-${a}`,l=`-${s}`;a.trimStart().startsWith("-")&&(i=a.substring(1)),s.trimStart().startsWith("-")&&(l=s.substring(1));const c=`translate(50%, 100%) translate(${i}, ${l})`;return e.createElement("div",{style:{transform:c}},e.createElement("div",{className:r,style:n},t))};(0,e.forwardRef)(((t,n)=>{const{children:r,style:o,className:a,anchorPoint:s}=t,[i,l]=function(t){const[n,r]=(0,e.useState)(null),[o,a]=(0,e.useState)(null),s=dC(),i=uC("marker"),{children:l,onClick:c,className:d,onMouseEnter:u,onMouseLeave:f,onDrag:h,onDragStart:m,onDragEnd:p,collisionBehavior:g,clickable:v,draggable:y,position:b,title:x,zIndex:w}=t,k=e.Children.count(l);return(0,e.useEffect)((()=>{if(!s||!i)return;const e=new i.AdvancedMarkerElement;e.map=s,r(e);let t=null;return k>0&&(t=document.createElement("div"),t.isCustomMarker=!0,e.content=t,a(t)),()=>{var n;e.map=null,null==(n=t)||n.remove(),r(null),a(null)}}),[s,i,k]),(0,e.useEffect)((()=>{!n||!n.content||k>0||(n.content.className=d||"")}),[n,d,k]),hC(n,"position",b),hC(n,"title",null!=x?x:""),hC(n,"zIndex",w),hC(n,"collisionBehavior",g),(0,e.useEffect)((()=>{n&&(n.gmpDraggable=void 0!==y?y:!!(h||m||p))}),[n,y,h,p,m]),(0,e.useEffect)((()=>{if(!n)return;const e=void 0!==v||Boolean(c)||Boolean(u)||Boolean(f);n.gmpClickable=e,e&&null!=n&&n.content&&function(e){return e.nodeType===Node.ELEMENT_NODE}(n.content)&&(n.content.style.pointerEvents="none",n.content.firstElementChild&&(n.content.firstElementChild.style.pointerEvents="all"))}),[n,v,c,u,f]),fC(n,"click",c),fC(n,"drag",h),fC(n,"dragstart",m),fC(n,"dragend",p),mC(null==n?void 0:n.element,"mouseenter",u),mC(null==n?void 0:n.element,"mouseleave",f),[n,o]}(t),c=(0,e.useMemo)((()=>i?{marker:i}:null),[i]);return(0,e.useImperativeHandle)(n,(()=>i),[i]),l?e.createElement(pC.Provider,{value:c},(0,pe.createPortal)(e.createElement(vC,{anchorPoint:s,styles:o,className:a},r),l)):null})),new Set(["animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","columns","flex","flexGrow","flexPositive","flexShrink","flexNegative","flexOrder","gridArea","gridRow","gridRowEnd","gridRowSpan","gridRowStart","gridColumn","gridColumnEnd","gridColumnSpan","gridColumnStart","fontWeight","lineClamp","lineHeight","opacity","order","orphans","scale","tabSize","widows","zIndex","zoom","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth"]);const yC=["onClick","onDrag","onDragStart","onDragEnd","onMouseOver","onMouseOut"];function bC({location:t,onChange:n}){const[r,o]=(0,e.useState)(null);return(0,De.jsx)("div",{className:"flex flex-col gap-2",children:(0,De.jsx)(xC,{onPlaceSelect:o,location:t,onChange:n})})}(0,e.forwardRef)(((t,n)=>{const r=function(t){const[n,r]=(0,e.useState)(null),o=dC(),{onClick:a,onDrag:s,onDragStart:i,onDragEnd:l,onMouseOver:c,onMouseOut:d}=t,u=FS(t,yC),{position:f,draggable:h}=u;return(0,e.useEffect)((()=>{if(!o)return void(void 0===o&&console.error("<Marker> has to be inside a Map component."));const e=new google.maps.Marker(u);return e.setMap(o),r(e),()=>{e.setMap(null),r(null)}}),[o]),(0,e.useEffect)((()=>{if(!n)return;const e=n,t=google.maps.event;return a&&t.addListener(e,"click",a),s&&t.addListener(e,"drag",s),i&&t.addListener(e,"dragstart",i),l&&t.addListener(e,"dragend",l),c&&t.addListener(e,"mouseover",c),d&&t.addListener(e,"mouseout",d),n.setDraggable(Boolean(h)),()=>{t.clearInstanceListeners(e)}}),[n,h,a,s,i,l,c,d]),(0,e.useEffect)((()=>{n&&u&&n.setOptions(u)}),[n,u]),(0,e.useEffect)((()=>{!h&&f&&n&&n.setPosition(f)}),[h,f,n]),n}(t);return(0,e.useImperativeHandle)(n,(()=>r),[r]),e.createElement(e.Fragment,null)}));const xC=({onPlaceSelect:t,location:n,onChange:r})=>{const[o,a]=(0,e.useState)(null),s=(0,e.useRef)(null),i=uC("places"),l=(0,e.useRef)(null);return(0,e.useEffect)((()=>{i&&s.current&&(a(new i.Autocomplete(s.current,{fields:["geometry","name","formatted_address","address_components"]})),l.current=new google.maps.Geocoder)}),[i]),(0,e.useEffect)((()=>{o&&o.addListener("place_changed",(()=>{const e=o.getPlace();t(e);const n=e.geometry?.location.lat().toString(),a=e.geometry?.location.lng().toString(),s=e.address_components||[];let i="",l="",c="",d="",u="",f="";s.forEach((({long_name:e,short_name:t,types:n})=>{n.includes("street_number")&&(i=e),n.includes("route")&&(l=e),n.includes("locality")&&(c=e),n.includes("administrative_area_level_1")&&(d=t),n.includes("postal_code")&&(u=e),n.includes("country")&&(f=e)}));const h=[i,l].filter(Boolean).join(" "),m=[c,d,u,f].filter(Boolean).join(", "),p=e.name||"";r({name:p,address1:h,address2:"",address3:m,city:c,state:d,zip:u,country:f,latitude:n,longitude:a})}))}),[t,o]),(0,e.useEffect)((()=>{const e=[n.address1,n.address2,n.address3].filter(Boolean).join(" ");e&&(e=>{l.current&&l.current.geocode({address:e},((e,t)=>{if("OK"===t&&e[0]){const t=e[0].geometry.location;r({latitude:t.lat().toString(),longitude:t.lng().toString()})}else console.error("Geocode was not successful for the following reason: "+t)}))})(e)}),[n.address1,n.address2,n.address3]),(0,De.jsx)(Uv,{ref:s,id:"address1",type:"text",value:n?.address1||"",placeholder:"Search address here...",onChange:e=>r({address1:e.target.value}),autoComplete:"off"})};function wC({location:t,onChange:n,settings:r}){const o=Boolean(r?.gmap_connection_status),a=(0,e.useRef)(null),[s,i]=(0,e.useState)(!1);return(0,De.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,De.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,De.jsx)(dy,{htmlFor:`name-${t.id}`,children:"Location name (optional)"}),(0,De.jsx)(Uv,{id:`name-${t.id}`,value:t.name,placeholder:"e.g., Main Hall, Room A",onChange:e=>n({name:e.target.value})}),(0,De.jsx)("p",{className:"text-muted-foreground text-sm",children:"Give your location a name to help attendees identify it more easily."})]}),(0,De.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,De.jsx)(dy,{htmlFor:`address1-${t.id}`,children:"Address"}),o?(0,De.jsx)(bC,{location:t,onChange:n}):(0,De.jsx)(Uv,{id:`address1-${t.id}`,value:t.address1,placeholder:"Street address",onChange:e=>n({address1:e.target.value})})]}),(0,De.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,De.jsx)(dy,{htmlFor:`address2-${t.id}`,children:"Apartment unit number, building name (optional)"}),(0,De.jsx)(Uv,{id:`address2-${t.id}`,value:t.address2,placeholder:"Apartment, unit, building name",onChange:e=>n({address2:e.target.value})})]}),(0,De.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,De.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,De.jsx)(dy,{htmlFor:`city-${t.id}`,children:"City"}),(0,De.jsx)(Uv,{id:`city-${t.id}`,value:t.city,placeholder:"City",onChange:e=>n({city:e.target.value})})]}),(0,De.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,De.jsx)(dy,{htmlFor:`state-${t.id}`,children:"State"}),(0,De.jsx)(Uv,{id:`state-${t.id}`,value:t.state,placeholder:"State",onChange:e=>n({state:e.target.value})})]}),(0,De.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,De.jsx)(dy,{htmlFor:`country-${t.id}`,children:"Country"}),(0,De.jsx)(Uv,{id:`country-${t.id}`,value:t.country,placeholder:"Country",onChange:e=>n({country:e.target.value})})]}),(0,De.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,De.jsx)(dy,{htmlFor:`zip-${t.id}`,children:"Postal code"}),(0,De.jsx)(Uv,{id:`zip-${t.id}`,value:t.zip,placeholder:"Postal code",onChange:e=>n({zip:e.target.value})})]})]}),(0,De.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,De.jsx)(mw,{id:`embed_gmap-${t.id}`,checked:t.embed_gmap,onCheckedChange:e=>n({embed_gmap:e})}),(0,De.jsx)("label",{htmlFor:`embed_gmap-${t.id}`,className:"text-sm",children:"Embed Google Map on page."})]}),t.embed_gmap&&!o&&(0,De.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,De.jsxs)("div",{className:"flex flex-col gap-2 max-w-[422px]",children:[(0,De.jsx)(dy,{htmlFor:`gmap_link-${t.id}`,children:"Google Maps Embed Link"}),(0,De.jsx)(Uv,{ref:a,type:"text",id:`gmap_link-${t.id}`,value:t?.gmap_link,placeholder:"https://google.com/maps/embed",onChange:e=>n({gmap_link:e.target.value}),onBlur:e=>{const r=t?.gmap_link||"",o=(e=>{const t=/^https:\/\/www\.google\.com\/maps\/embed(\?.*)?$/i,n=e.match(/<iframe[^>]+src=["']([^"']+)["']/i);if(n){const e=n[1];if(t.test(e))return e}return t.test(e)?e:""})(r);if(!r)return e.target.classList.remove("eventkoi-error"),void i(!1);o?(n({gmap_link:o}),e.target.classList.remove("eventkoi-error"),i(!1)):(e.target.classList.add("eventkoi-error"),i(!0))}}),s&&(0,De.jsx)("p",{className:"w-full text-xs text-[#d13d3d]",children:"Wrong embed URL. Follow the instructions below to get the correct URL."})]}),(0,De.jsx)(MS,{className:"flex gap-x-8 bg-gray-50",children:(0,De.jsxs)(OS,{children:[(0,De.jsx)("p",{className:"text-base font-medium mb-2",children:"How to get the Google Maps embed link:"}),(0,De.jsxs)("ol",{className:"text-sm list-decimal pl-4 mb-4",children:[(0,De.jsx)("li",{children:"Find your address in Google Maps."}),(0,De.jsxs)("li",{children:["Click on the ",(0,De.jsx)("strong",{children:"Share"})," button."]}),(0,De.jsxs)("li",{children:["Go to ",(0,De.jsx)("strong",{children:"Embed a map"})," tab."]}),(0,De.jsx)("li",{children:"Copy the entire iframe html code."}),(0,De.jsx)("li",{children:"Paste it above. We’ll extract the correct embed URL."}),(0,De.jsxs)("li",{children:["It should start with:",(0,De.jsx)("code",{className:"text-inherit ml-1",children:"https://www.google.com/maps/embed"})]})]}),(0,De.jsxs)("p",{className:"text-sm",children:["Do ",(0,De.jsx)("strong",{children:"NOT"})," paste:",(0,De.jsx)("code",{className:"text-inherit ml-1",children:"https://maps.app.goo.gl/"})]}),(0,De.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4 pt-8",children:[(0,De.jsxs)(ES,{className:"select-none relative",children:[(0,De.jsx)("div",{className:"absolute -right-2.5 top-0 rounded-full w-6 h-6 bg-red-500 text-white inline-flex items-center justify-center -translate-y-1/2",children:(0,De.jsx)(IS,{size:20})}),(0,De.jsx)(NS,{className:"py-2 px-4",children:(0,De.jsx)(DS,{className:"text-base font-normal",children:"Share"})}),(0,De.jsxs)(TS,{className:"grid gap-2 px-4 pb-4",children:[(0,De.jsxs)("ul",{className:"flex gap-x-4 font-semibold text-black whitespace-nowrap",children:[(0,De.jsx)("li",{className:"underline underline-offset-4",children:"Send a link"}),(0,De.jsx)("li",{children:"Embed a map"})]}),(0,De.jsx)("p",{className:"text-black underline underline-offset-4 decoration-gray-200 text-xs",children:"https://maps.app.goo.gl/"}),(0,De.jsx)("p",{className:"text-blue-700 font-semibold text-xs",children:"COPY TO CLIPBOARD"})]})]}),(0,De.jsxs)(ES,{className:"select-none relative",children:[(0,De.jsx)("div",{className:"absolute -right-2.5 top-0 rounded-full w-6 h-6 bg-green-500 text-white inline-flex items-center justify-center -translate-y-1/2",children:(0,De.jsx)(Lm,{size:20})}),(0,De.jsx)(NS,{className:"py-2 px-4",children:(0,De.jsx)(DS,{className:"text-base font-normal",children:"Share"})}),(0,De.jsxs)(TS,{className:"grid gap-2 px-4 pb-4",children:[(0,De.jsxs)("ul",{className:"flex gap-x-4 font-semibold text-black whitespace-nowrap",children:[(0,De.jsx)("li",{children:"Send a link"}),(0,De.jsx)("li",{className:"underline underline-offset-4",children:"Embed a map"})]}),(0,De.jsx)("p",{className:"text-black underline underline-offset-4 decoration-gray-200 text-xs truncate",children:'<iframe src="https://www.google.com/maps/embed...'}),(0,De.jsx)("p",{className:"text-blue-700 font-semibold text-xs",children:"COPY HTML"})]})]})]})]})})]})]})}function kC({location:e,expandedLocationId:t,setExpandedLocationId:n,onChange:r,onDelete:o,settings:a}){const s=t===e.id,i=t=>{t.stopPropagation(),n(s?null:e.id)};return(0,De.jsxs)(ES,{className:"border rounded-lg shadow-sm overflow-hidden",children:[(0,De.jsxs)("div",{className:"flex justify-between items-center px-4 py-3 cursor-pointer hover:bg-muted/30 transition",onClick:i,children:[(0,De.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,De.jsx)(DS,{className:"text-base font-medium",children:e.name||("physical"===e.type?"Physical location":"Online location")}),(0,De.jsx)("div",{className:"text-sm text-muted-foreground truncate max-w-[280px]",children:"physical"===e.type?e.address1||"No address yet":e.virtual_url||"No URL yet"})]}),(0,De.jsxs)("div",{className:"flex items-center gap-1 ml-4",children:[(0,De.jsx)(tl,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-foreground",onClick:i,children:s?(0,De.jsx)(Ob,{className:"h-4 w-4"}):(0,De.jsx)(Oi,{className:"h-4 w-4"})}),(0,De.jsx)(tl,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-destructive",onClick:e=>{e.stopPropagation(),o()},children:(0,De.jsx)(gw,{className:"h-4 w-4"})})]})]}),s&&(0,De.jsx)(TS,{className:"p-4",children:"physical"===e.type?(0,De.jsx)(wC,{location:e,onChange:r,settings:a}):(0,De.jsx)(AS,{location:e,onChange:r})})]})}function SC({isInstance:t=!1,value:n,onChange:r}){const o=Fl(),a=o.event,s=o.setEvent,i=o.settings,l=t?n:a,c=t?e=>{const t="function"==typeof e?e(l):e;r(t)}:s,[d,u]=(0,e.useState)("physical"),[f,h]=(0,e.useState)(null);return(0,De.jsxs)(xw,{className:"p-0",children:[(0,De.jsx)("div",{className:"flex flex-col gap-6",children:(l.locations||[]).map((e=>(0,De.jsx)(kC,{location:e,expandedLocationId:f,setExpandedLocationId:h,onChange:t=>((e,t)=>{c((n=>({...n,locations:(n.locations||[]).map((n=>n.id===e?{...n,...t}:n))})))})(e.id,t),onDelete:()=>(e=>{c((t=>({...t,locations:(t.locations||[]).filter((t=>t.id!==e))}))),f===e&&h(null)})(e.id),settings:i},e.id)))}),0===(l.locations||[]).length&&(0,De.jsx)("p",{className:"text-muted-foreground text-sm",children:"No locations added yet."}),(0,De.jsxs)("div",{className:"flex items-center gap-2 mt-4",children:[(0,De.jsxs)(Ib,{value:d,onValueChange:u,children:[(0,De.jsx)(Lb,{className:"w-[180px]",children:(0,De.jsx)(Pb,{placeholder:"Select location type"})}),(0,De.jsxs)(Hb,{children:[(0,De.jsx)(Vb,{value:"physical",children:"Physical location"}),(0,De.jsx)(Vb,{value:"online",children:"Online location"})]})]}),(0,De.jsxs)(tl,{type:"button",variant:"ghost",onClick:()=>{const e={id:crypto.randomUUID(),type:d,name:"",address1:"",address2:"",city:"",state:"",country:"",zip:"",embed_gmap:!1,gmap_link:"",virtual_url:"",latitude:"",longitude:""};c((t=>({...t,locations:[...t.locations||[],e]}))),h(e.id)},children:[(0,De.jsx)(jS,{className:"w-4 h-4 mr-2"}),"Add location"]})]})]})}const CC=Mi("PencilLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z",key:"ymcmye"}],["path",{d:"m15 5 3 3",key:"1w25hb"}]]);function _C({isInstance:t=!1,value:n,onChange:r,timestamp:o,startDate:a,endDate:s,timezone:i}){const{event:l,setEvent:c,isPublishing:d}=Fl(),[u,f]=(0,e.useState)(!1),h=(0,e.useRef)(null),m=i||l?.timezone||"UTC";function p(){h.current&&(h.current.style.height="auto",h.current.style.height=`${h.current.scrollHeight}px`)}(0,e.useEffect)((()=>{p()}),[n,l?.title]),(0,e.useEffect)((()=>{!l?.id&&h.current&&(h.current.focus(),h.current.selectionStart=h.current.value.length)}),[l?.id]);const g=t?n:l?.title||"",v="Untitled event"===g?"":g;return(0,De.jsxs)(xw,{className:Ni("flex flex-col items-start justify-between p-0",t&&"sm:flex-row"),children:[(0,De.jsxs)("div",{className:"group relative flex w-full items-center gap-2 flex-1",children:[(0,De.jsx)(ww,{ref:h,id:"event-name",className:Ni("inline-flex sm:w-full resize-none overflow-hidden bg-transparent focus:outline-none border-2 border-transparent hover:border-input focus:border-input active:border-input rounded-md p-2 font-medium text-2xl leading-tight min-h-0 w-full max-w-full",u&&"border-red-500",!v&&"text-muted-foreground"),value:v,onInput:e=>{!function(e){const n=e.target.value;f(!n.trim()),t&&r?r(n):c((e=>({...e,title:n})))}(e),p()},onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),h.current.blur())},placeholder:"Enter event name",rows:1}),(0,De.jsx)("div",{onClick:()=>{h.current.focus(),h.current.selectionStart=h.current.value.length},className:"opacity-0 group-hover:opacity-100 transition-opacity cursor-pointer",children:(0,De.jsx)(CC,{className:"w-4 h-4 text-ring"})})]}),t&&o&&(0,De.jsxs)("div",{className:"flex flex-col md:items-end md:pl-4 pt-1 md:text-right text-foreground text-xs whitespace-nowrap min-w-[140px]",children:[(0,De.jsxs)("div",{className:"text-[13px]",children:[(0,De.jsx)("span",{className:"font-medium",children:"Event ID:"})," ",o]}),a&&s&&(0,De.jsx)("div",{className:"pt-2 text-base",children:Ts(a,s,m)})]}),u&&(0,De.jsx)("p",{className:"text-xs text-red-500 font-medium",children:"Event name cannot be blank"})]})}const jC=eventkoi_params?.theme||"twentytwentyfive",EC=eventkoi_params?.custom_templates||[];function NC({isInstance:e=!1,value:t={},onChange:n}){const{event:r,setEvent:o}=Fl(),a=e?t?.template||"default":r?.template||"default",s="default"!==a&&a!==`single-event-${e?t?.slug||t?.post_name||t?.id:r?.slug||r?.post_name||r?.id}`,i=encodeURIComponent(`/wp_template/${jC}//${a}`),l=s?`${eventkoi_params.site_url}/wp-admin/site-editor.php?p=${i}&canvas=edit`:`${eventkoi_params.site_url}/wp-admin/site-editor.php?p=/template&activeView=EventKoi`;return(0,De.jsxs)(xw,{className:"p-0",children:[(0,De.jsx)(dy,{htmlFor:"template",children:"Event template"}),(0,De.jsx)("div",{className:"text-muted-foreground",children:"Select or edit the design template of your event page."}),(0,De.jsxs)("div",{className:"flex items-center gap-4 mt-2",children:[(0,De.jsxs)(Ib,{value:a,onValueChange:t=>{e&&n?n({template:t}):o((e=>({...e,template:t})))},children:[(0,De.jsx)(Lb,{id:"template",className:"w-[250px]",children:(0,De.jsx)(Pb,{placeholder:"Select a template"})}),(0,De.jsxs)(Hb,{children:[(0,De.jsx)(Vb,{value:"default",children:"Default template"}),EC.map((e=>(0,De.jsx)(Vb,{value:e.slug,children:e.title},e.slug)))]})]}),(0,De.jsx)("a",{href:l,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-primary underline hover:text-primary/80 transition",children:s?"Edit in Site Editor":"View/edit template"})]})]})}function DC(){const{id:t,timestamp:n}=X(),{instanceData:r,setInstanceData:o}=J(),[a,s]=(0,e.useState)(!0),[i,l]=(0,e.useState)({}),[c,d]=(0,e.useState)(null),[u,f]=(0,e.useState)(null);return(0,e.useEffect)((()=>{if(!n)return;const e=new Date(1e3*Number(n)).toISOString(),t=new Date(e);if(d(t),r?.recurrence_rules?.[0]?.start_date&&r?.recurrence_rules?.[0]?.end_date){const e=r.recurrence_rules[0],n=new Date(e.start_date),o=new Date(e.end_date).getTime()-n.getTime(),a=new Date(t.getTime()+o);f(a)}}),[n,r?.recurrence_rules]),(0,e.useEffect)((()=>{(async()=>{s(!0);try{const[e,r]=await Promise.all([Ne()({path:`${eventkoi_params.api}/instance_data?id=${t}&timestamp=${n}`}),Ne()({path:`${eventkoi_params.api}/settings`,method:"GET",headers:{"EVENTKOI-API-KEY":eventkoi_params.api_key}})]);o(e?.merged||{}),l(r||{})}catch(e){gp({message:"Failed to load instance."})}finally{s(!1)}})()}),[t,n,o]),a?null:(0,De.jsxs)("div",{className:"flex flex-col w-full gap-8",children:[(0,De.jsx)(Bi,{container:!0,children:(0,De.jsx)(_C,{isInstance:!0,timestamp:n,startDate:c,endDate:u,timezone:r.timezone,value:r.title,onChange:e=>o((t=>({...t,title:e})))})}),(0,De.jsxs)(Bi,{container:!0,children:[(0,De.jsx)(Vi,{level:3,children:"Location details"}),i?.gmap_api_key?(0,De.jsx)(YS,{apiKey:i.gmap_api_key,children:(0,De.jsx)(SC,{isInstance:!0,value:r,onChange:e=>o((t=>({...t,...e})))})}):(0,De.jsx)(SC,{isInstance:!0,value:r,onChange:e=>o((t=>({...t,...e})))})]}),(0,De.jsxs)(Bi,{container:!0,className:"gap-10",children:[(0,De.jsx)(Vi,{level:3,children:"Additional details"}),(0,De.jsx)(kS,{isInstance:!0,value:r,onChange:e=>o((t=>({...t,...e})))}),(0,De.jsx)(yS,{isInstance:!0,value:r.description,onChange:e=>o((t=>({...t,description:e})))}),(0,De.jsx)(NC,{isInstance:!0,value:r,onChange:e=>o((t=>({...t,...e})))})]})]})}var TC=.999,AC=/[\\\/_+.#"@\[\(\{&]/,RC=/[\\\/_+.#"@\[\(\{&]/g,MC=/[\s-]/,OC=/[\s-]/g;function IC(e,t,n,r,o,a,s){if(a===t.length)return o===e.length?1:.99;var i=`${o},${a}`;if(void 0!==s[i])return s[i];for(var l,c,d,u,f=r.charAt(a),h=n.indexOf(f,o),m=0;h>=0;)(l=IC(e,t,n,r,h+1,a+1,s))>m&&(h===o?l*=1:AC.test(e.charAt(h-1))?(l*=.8,(d=e.slice(o,h-1).match(RC))&&o>0&&(l*=Math.pow(TC,d.length))):MC.test(e.charAt(h-1))?(l*=.9,(u=e.slice(o,h-1).match(OC))&&o>0&&(l*=Math.pow(TC,u.length))):(l*=.17,o>0&&(l*=Math.pow(TC,h-o))),e.charAt(h)!==t.charAt(a)&&(l*=.9999)),(l<.1&&n.charAt(h-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(h-1)!==r.charAt(a))&&.1*(c=IC(e,t,n,r,h+1,a+2,s))>l&&(l=.1*c),l>m&&(m=l),h=n.indexOf(f,h+1);return s[i]=m,m}function PC(e){return e.toLowerCase().replace(OC," ")}function LC(e,t,n){return IC(e=n&&n.length>0?e+" "+n.join(" "):e,t,PC(e),PC(t),0,0,{})}var FC="Dialog",[zC,HC]=Wl(FC),[VC,BC]=zC(FC),WC=t=>{const{__scopeDialog:n,children:r,open:o,defaultOpen:a,onOpenChange:s,modal:i=!0}=t,l=e.useRef(null),c=e.useRef(null),[d,u]=Yl({prop:o,defaultProp:a??!1,onChange:s,caller:FC});return(0,De.jsx)(VC,{scope:n,triggerRef:l,contentRef:c,contentId:xc(),titleId:xc(),descriptionId:xc(),open:d,onOpenChange:u,onOpenToggle:e.useCallback((()=>u((e=>!e))),[u]),modal:i,children:r})};WC.displayName=FC;var UC="DialogTrigger";e.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=BC(UC,n),a=$i(t,o.triggerRef);return(0,De.jsx)(wl.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":d_(o.open),...r,ref:a,onClick:Bl(e.onClick,o.onOpenToggle)})})).displayName=UC;var $C="DialogPortal",[GC,YC]=zC($C,{forceMount:void 0}),qC=t=>{const{__scopeDialog:n,forceMount:r,children:o,container:a}=t,s=BC($C,n);return(0,De.jsx)(GC,{scope:n,forceMount:r,children:e.Children.map(o,(e=>(0,De.jsx)(xu,{present:r||s.open,children:(0,De.jsx)(bu,{asChild:!0,container:a,children:e})})))})};qC.displayName=$C;var ZC="DialogOverlay",KC=e.forwardRef(((e,t)=>{const n=YC(ZC,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=BC(ZC,e.__scopeDialog);return a.modal?(0,De.jsx)(xu,{present:r||a.open,children:(0,De.jsx)(JC,{...o,ref:t})}):null}));KC.displayName=ZC;var QC=Gi("DialogOverlay.RemoveScroll"),JC=e.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=BC(ZC,n);return(0,De.jsx)(Of,{as:QC,allowPinchZoom:!0,shards:[o.contentRef],children:(0,De.jsx)(wl.div,{"data-state":d_(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})})),XC="DialogContent",e_=e.forwardRef(((e,t)=>{const n=YC(XC,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=BC(XC,e.__scopeDialog);return(0,De.jsx)(xu,{present:r||a.open,children:a.modal?(0,De.jsx)(t_,{...o,ref:t}):(0,De.jsx)(n_,{...o,ref:t})})}));e_.displayName=XC;var t_=e.forwardRef(((t,n)=>{const r=BC(XC,t.__scopeDialog),o=e.useRef(null),a=$i(n,r.contentRef,o);return e.useEffect((()=>{const e=o.current;if(e)return $u(e)}),[]),(0,De.jsx)(r_,{...t,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Bl(t.onCloseAutoFocus,(e=>{e.preventDefault(),r.triggerRef.current?.focus()})),onPointerDownOutside:Bl(t.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()})),onFocusOutside:Bl(t.onFocusOutside,(e=>e.preventDefault()))})})),n_=e.forwardRef(((t,n)=>{const r=BC(XC,t.__scopeDialog),o=e.useRef(!1),a=e.useRef(!1);return(0,De.jsx)(r_,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(o.current||r.triggerRef.current?.focus(),e.preventDefault()),o.current=!1,a.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(o.current=!0,"pointerdown"===e.detail.originalEvent.type&&(a.current=!0));const n=e.target,s=r.triggerRef.current?.contains(n);s&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&a.current&&e.preventDefault()}})})),r_=e.forwardRef(((t,n)=>{const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:s,...i}=t,l=BC(XC,r),c=e.useRef(null),d=$i(n,c);return sc(),(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)(uc,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:a,onUnmountAutoFocus:s,children:(0,De.jsx)(tc,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":d_(l.open),...i,ref:d,onDismiss:()=>l.onOpenChange(!1)})}),(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)(m_,{titleId:l.titleId}),(0,De.jsx)(p_,{contentRef:c,descriptionId:l.descriptionId})]})]})})),o_="DialogTitle",a_=e.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=BC(o_,n);return(0,De.jsx)(wl.h2,{id:o.titleId,...r,ref:t})}));a_.displayName=o_;var s_="DialogDescription",i_=e.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=BC(s_,n);return(0,De.jsx)(wl.p,{id:o.descriptionId,...r,ref:t})}));i_.displayName=s_;var l_="DialogClose",c_=e.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=BC(l_,n);return(0,De.jsx)(wl.button,{type:"button",...r,ref:t,onClick:Bl(e.onClick,(()=>o.onOpenChange(!1)))})}));function d_(e){return e?"open":"closed"}c_.displayName=l_;var u_="DialogTitleWarning",[f_,h_]=function(t,n){const r=e.createContext(n),o=t=>{const{children:n,...o}=t,a=e.useMemo((()=>o),Object.values(o));return(0,De.jsx)(r.Provider,{value:a,children:n})};return o.displayName=t+"Provider",[o,function(o){const a=e.useContext(r);if(a)return a;if(void 0!==n)return n;throw new Error(`\`${o}\` must be used within \`${t}\``)}]}(u_,{contentName:XC,titleName:o_,docsSlug:"dialog"}),m_=({titleId:t})=>{const n=h_(u_),r=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return e.useEffect((()=>{t&&(document.getElementById(t)||console.error(r))}),[r,t]),null},p_=({contentRef:t,descriptionId:n})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${h_("DialogDescriptionWarning").contentName}}.`;return e.useEffect((()=>{const e=t.current?.getAttribute("aria-describedby");n&&e&&(document.getElementById(n)||console.warn(r))}),[r,t,n]),null},g_=WC,v_=qC,y_=KC,b_=e_,x_=a_,w_=i_,k_=c_,S_='[cmdk-group=""]',C_='[cmdk-group-items=""]',j_='[cmdk-item=""]',E_=`${j_}:not([aria-disabled="true"])`,N_="cmdk-item-select",D_="data-value",T_=(e,t,n)=>LC(e,t,n),A_=e.createContext(void 0),R_=()=>e.useContext(A_),M_=e.createContext(void 0),O_=()=>e.useContext(M_),I_=e.createContext(void 0),P_=e.forwardRef(((t,n)=>{let r=K_((()=>{var e,n;return{search:"",value:null!=(n=null!=(e=t.value)?e:t.defaultValue)?n:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}})),o=K_((()=>new Set)),a=K_((()=>new Map)),s=K_((()=>new Map)),i=K_((()=>new Set)),l=q_(t),{label:c,children:d,value:u,onValueChange:f,filter:h,shouldFilter:m,loop:p,disablePointerSelection:g=!1,vimBindings:v=!0,...y}=t,b=xc(),x=xc(),w=xc(),k=e.useRef(null),S=X_();Z_((()=>{if(void 0!==u){let e=u.trim();r.current.value=e,C.emit()}}),[u]),Z_((()=>{S(6,T)}),[]);let C=e.useMemo((()=>({subscribe:e=>(i.current.add(e),()=>i.current.delete(e)),snapshot:()=>r.current,setState:(e,t,n)=>{var o,a,s,i;if(!Object.is(r.current[e],t)){if(r.current[e]=t,"search"===e)D(),E(),S(1,N);else if("value"===e){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let e=document.getElementById(w);e?e.focus():null==(o=document.getElementById(b))||o.focus()}if(S(7,(()=>{var e;r.current.selectedItemId=null==(e=A())?void 0:e.id,C.emit()})),n||S(5,T),void 0!==(null==(a=l.current)?void 0:a.value)){let e=null!=t?t:"";return void(null==(i=(s=l.current).onValueChange)||i.call(s,e))}}C.emit()}},emit:()=>{i.current.forEach((e=>e()))}})),[]),_=e.useMemo((()=>({value:(e,t,n)=>{var o;t!==(null==(o=s.current.get(e))?void 0:o.value)&&(s.current.set(e,{value:t,keywords:n}),r.current.filtered.items.set(e,j(t,n)),S(2,(()=>{E(),C.emit()})))},item:(e,t)=>(o.current.add(e),t&&(a.current.has(t)?a.current.get(t).add(e):a.current.set(t,new Set([e]))),S(3,(()=>{D(),E(),r.current.value||N(),C.emit()})),()=>{s.current.delete(e),o.current.delete(e),r.current.filtered.items.delete(e);let t=A();S(4,(()=>{D(),(null==t?void 0:t.getAttribute("id"))===e&&N(),C.emit()}))}),group:e=>(a.current.has(e)||a.current.set(e,new Set),()=>{s.current.delete(e),a.current.delete(e)}),filter:()=>l.current.shouldFilter,label:c||t["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:b,inputId:w,labelId:x,listInnerRef:k})),[]);function j(e,t){var n,o;let a=null!=(o=null==(n=l.current)?void 0:n.filter)?o:T_;return e?a(e,r.current.search,t):0}function E(){if(!r.current.search||!1===l.current.shouldFilter)return;let e=r.current.filtered.items,t=[];r.current.filtered.groups.forEach((n=>{let r=a.current.get(n),o=0;r.forEach((t=>{let n=e.get(t);o=Math.max(n,o)})),t.push([n,o])}));let n=k.current;R().sort(((t,n)=>{var r,o;let a=t.getAttribute("id"),s=n.getAttribute("id");return(null!=(r=e.get(s))?r:0)-(null!=(o=e.get(a))?o:0)})).forEach((e=>{let t=e.closest(C_);t?t.appendChild(e.parentElement===t?e:e.closest(`${C_} > *`)):n.appendChild(e.parentElement===n?e:e.closest(`${C_} > *`))})),t.sort(((e,t)=>t[1]-e[1])).forEach((e=>{var t;let n=null==(t=k.current)?void 0:t.querySelector(`${S_}[${D_}="${encodeURIComponent(e[0])}"]`);null==n||n.parentElement.appendChild(n)}))}function N(){let e=R().find((e=>"true"!==e.getAttribute("aria-disabled"))),t=null==e?void 0:e.getAttribute(D_);C.setState("value",t||void 0)}function D(){var e,t,n,i;if(!r.current.search||!1===l.current.shouldFilter)return void(r.current.filtered.count=o.current.size);r.current.filtered.groups=new Set;let c=0;for(let a of o.current){let o=j(null!=(t=null==(e=s.current.get(a))?void 0:e.value)?t:"",null!=(i=null==(n=s.current.get(a))?void 0:n.keywords)?i:[]);r.current.filtered.items.set(a,o),o>0&&c++}for(let[e,t]of a.current)for(let n of t)if(r.current.filtered.items.get(n)>0){r.current.filtered.groups.add(e);break}r.current.filtered.count=c}function T(){var e,t,n;let r=A();r&&((null==(e=r.parentElement)?void 0:e.firstChild)===r&&(null==(n=null==(t=r.closest(S_))?void 0:t.querySelector('[cmdk-group-heading=""]'))||n.scrollIntoView({block:"nearest"})),r.scrollIntoView({block:"nearest"}))}function A(){var e;return null==(e=k.current)?void 0:e.querySelector(`${j_}[aria-selected="true"]`)}function R(){var e;return Array.from((null==(e=k.current)?void 0:e.querySelectorAll(E_))||[])}function M(e){let t=R()[e];t&&C.setState("value",t.getAttribute(D_))}function O(e){var t;let n=A(),r=R(),o=r.findIndex((e=>e===n)),a=r[o+e];null!=(t=l.current)&&t.loop&&(a=o+e<0?r[r.length-1]:o+e===r.length?r[0]:r[o+e]),a&&C.setState("value",a.getAttribute(D_))}function I(e){let t,n=A(),r=null==n?void 0:n.closest(S_);for(;r&&!t;)r=e>0?G_(r,S_):Y_(r,S_),t=null==r?void 0:r.querySelector(E_);t?C.setState("value",t.getAttribute(D_)):O(e)}let P=()=>M(R().length-1),L=e=>{e.preventDefault(),e.metaKey?P():e.altKey?I(1):O(1)},F=e=>{e.preventDefault(),e.metaKey?M(0):e.altKey?I(-1):O(-1)};return e.createElement(wl.div,{ref:n,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:e=>{var t;null==(t=y.onKeyDown)||t.call(y,e);let n=e.nativeEvent.isComposing||229===e.keyCode;if(!e.defaultPrevented&&!n)switch(e.key){case"n":case"j":v&&e.ctrlKey&&L(e);break;case"ArrowDown":L(e);break;case"p":case"k":v&&e.ctrlKey&&F(e);break;case"ArrowUp":F(e);break;case"Home":e.preventDefault(),M(0);break;case"End":e.preventDefault(),P();break;case"Enter":{e.preventDefault();let t=A();if(t){let e=new Event(N_);t.dispatchEvent(e)}}}}},e.createElement("label",{"cmdk-label":"",htmlFor:_.inputId,id:_.labelId,style:tj},c),ej(t,(t=>e.createElement(M_.Provider,{value:C},e.createElement(A_.Provider,{value:_},t)))))})),L_=e.forwardRef(((t,n)=>{var r,o;let a=xc(),s=e.useRef(null),i=e.useContext(I_),l=R_(),c=q_(t),d=null!=(o=null==(r=c.current)?void 0:r.forceMount)?o:null==i?void 0:i.forceMount;Z_((()=>{if(!d)return l.item(a,null==i?void 0:i.id)}),[d]);let u=J_(a,s,[t.value,t.children,s],t.keywords),f=O_(),h=Q_((e=>e.value&&e.value===u.current)),m=Q_((e=>!(!d&&!1!==l.filter())||!e.search||e.filtered.items.get(a)>0));function p(){var e,t;g(),null==(t=(e=c.current).onSelect)||t.call(e,u.current)}function g(){f.setState("value",u.current,!0)}if(e.useEffect((()=>{let e=s.current;if(e&&!t.disabled)return e.addEventListener(N_,p),()=>e.removeEventListener(N_,p)}),[m,t.onSelect,t.disabled]),!m)return null;let{disabled:v,value:y,onSelect:b,forceMount:x,keywords:w,...k}=t;return e.createElement(wl.div,{ref:Ui(s,n),...k,id:a,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!h,"data-disabled":!!v,"data-selected":!!h,onPointerMove:v||l.getDisablePointerSelection()?void 0:g,onClick:v?void 0:p},t.children)})),F_=e.forwardRef(((t,n)=>{let{heading:r,children:o,forceMount:a,...s}=t,i=xc(),l=e.useRef(null),c=e.useRef(null),d=xc(),u=R_(),f=Q_((e=>!(!a&&!1!==u.filter())||!e.search||e.filtered.groups.has(i)));Z_((()=>u.group(i)),[]),J_(i,l,[t.value,t.heading,c]);let h=e.useMemo((()=>({id:i,forceMount:a})),[a]);return e.createElement(wl.div,{ref:Ui(l,n),...s,"cmdk-group":"",role:"presentation",hidden:!f||void 0},r&&e.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:d},r),ej(t,(t=>e.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?d:void 0},e.createElement(I_.Provider,{value:h},t)))))})),z_=e.forwardRef(((t,n)=>{let{alwaysRender:r,...o}=t,a=e.useRef(null),s=Q_((e=>!e.search));return r||s?e.createElement(wl.div,{ref:Ui(a,n),...o,"cmdk-separator":"",role:"separator"}):null})),H_=e.forwardRef(((t,n)=>{let{onValueChange:r,...o}=t,a=null!=t.value,s=O_(),i=Q_((e=>e.search)),l=Q_((e=>e.selectedItemId)),c=R_();return e.useEffect((()=>{null!=t.value&&s.setState("search",t.value)}),[t.value]),e.createElement(wl.input,{ref:n,...o,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":l,id:c.inputId,type:"text",value:a?t.value:i,onChange:e=>{a||s.setState("search",e.target.value),null==r||r(e.target.value)}})})),V_=e.forwardRef(((t,n)=>{let{children:r,label:o="Suggestions",...a}=t,s=e.useRef(null),i=e.useRef(null),l=Q_((e=>e.selectedItemId)),c=R_();return e.useEffect((()=>{if(i.current&&s.current){let e,t=i.current,n=s.current,r=new ResizeObserver((()=>{e=requestAnimationFrame((()=>{let e=t.offsetHeight;n.style.setProperty("--cmdk-list-height",e.toFixed(1)+"px")}))}));return r.observe(t),()=>{cancelAnimationFrame(e),r.unobserve(t)}}}),[]),e.createElement(wl.div,{ref:Ui(s,n),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l,"aria-label":o,id:c.listId},ej(t,(t=>e.createElement("div",{ref:Ui(i,c.listInnerRef),"cmdk-list-sizer":""},t))))})),B_=e.forwardRef(((t,n)=>{let{open:r,onOpenChange:o,overlayClassName:a,contentClassName:s,container:i,...l}=t;return e.createElement(g_,{open:r,onOpenChange:o},e.createElement(v_,{container:i},e.createElement(y_,{"cmdk-overlay":"",className:a}),e.createElement(b_,{"aria-label":t.label,"cmdk-dialog":"",className:s},e.createElement(P_,{ref:n,...l}))))})),W_=e.forwardRef(((t,n)=>Q_((e=>0===e.filtered.count))?e.createElement(wl.div,{ref:n,...t,"cmdk-empty":"",role:"presentation"}):null)),U_=e.forwardRef(((t,n)=>{let{progress:r,children:o,label:a="Loading...",...s}=t;return e.createElement(wl.div,{ref:n,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},ej(t,(t=>e.createElement("div",{"aria-hidden":!0},t))))})),$_=Object.assign(P_,{List:V_,Item:L_,Input:H_,Group:F_,Separator:z_,Dialog:B_,Empty:W_,Loading:U_});function G_(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Y_(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function q_(t){let n=e.useRef(t);return Z_((()=>{n.current=t})),n}var Z_="undefined"==typeof window?e.useEffect:e.useLayoutEffect;function K_(t){let n=e.useRef();return void 0===n.current&&(n.current=t()),n}function Q_(t){let n=O_(),r=()=>t(n.snapshot());return e.useSyncExternalStore(n.subscribe,r,r)}function J_(t,n,r,o=[]){let a=e.useRef(),s=R_();return Z_((()=>{var e;let i=(()=>{var e;for(let t of r){if("string"==typeof t)return t.trim();if("object"==typeof t&&"current"in t)return t.current?null==(e=t.current.textContent)?void 0:e.trim():a.current}})(),l=o.map((e=>e.trim()));s.value(t,i,l),null==(e=n.current)||e.setAttribute(D_,i),a.current=i})),a}var X_=()=>{let[t,n]=e.useState(),r=K_((()=>new Map));return Z_((()=>{r.current.forEach((e=>e())),r.current=new Map}),[t]),(e,t)=>{r.current.set(e,t),n({})}};function ej({asChild:t,children:n},r){return t&&e.isValidElement(n)?e.cloneElement(function(e){let t=e.type;return"function"==typeof t?t(e.props):"render"in t?t.render(e.props):e}(n),{ref:n.ref},r(n.props.children)):r(n)}var tj={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const nj=g_,rj=v_,oj=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)(y_,{ref:n,className:Ni("fixed inset-0 z-[100000] bg-black/80  data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t})));oj.displayName=y_.displayName;const aj=e.forwardRef((({className:e,children:t,...n},r)=>(0,De.jsxs)(rj,{children:[(0,De.jsx)(oj,{}),(0,De.jsxs)(b_,{ref:r,className:Ni("fixed left-[50%] top-[50%] z-[100000] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,(0,De.jsxs)(k_,{className:Ni("absolute right-4 top-3 inline-flex items-center justify-center","rounded-full p-2 cursor-pointer bg-transparent shadow-none border-0","text-muted-foreground opacity-70 transition-opacity","hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-0","disabled:pointer-events-none"),children:[(0,De.jsx)(IS,{className:"h-5 w-5"}),(0,De.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})));aj.displayName=b_.displayName;const sj=({className:e,...t})=>(0,De.jsx)("div",{className:Ni("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});sj.displayName="DialogHeader";const ij=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)(x_,{ref:n,className:Ni("text-lg font-semibold leading-none tracking-tight",e),...t})));ij.displayName=x_.displayName,e.forwardRef((({className:e,...t},n)=>(0,De.jsx)(w_,{ref:n,className:Ni("text-sm text-muted-foreground",e),...t}))).displayName=w_.displayName;const lj=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)($_,{ref:n,className:Ni("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t})));lj.displayName=$_.displayName;const cj=e.forwardRef((({className:e,...t},n)=>(0,De.jsxs)("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[(0,De.jsx)($v,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,De.jsx)($_.Input,{ref:n,className:Ni("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]})));cj.displayName=$_.Input.displayName;const dj=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)($_.List,{ref:n,className:Ni("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t})));dj.displayName=$_.List.displayName;const uj=e.forwardRef(((e,t)=>(0,De.jsx)($_.Empty,{ref:t,className:"py-6 text-center text-sm",...e})));uj.displayName=$_.Empty.displayName;const fj=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)($_.Group,{ref:n,className:Ni("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t})));fj.displayName=$_.Group.displayName;const hj=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)($_.Separator,{ref:n,className:Ni("-mx-1 h-px bg-border",e),...t})));hj.displayName=$_.Separator.displayName;const mj=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)($_.Item,{ref:n,className:Ni("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none","data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50","aria-selected:bg-transparent aria-selected:text-accent-foreground","aria-[selected=false]:hover:bg-accent aria-[selected=true]:hover:bg-accent aria-[selected=false]:hover:text-accent-foreground",e),...t})));function pj({options:t,placeholder:n,noItems:r,value:o,onSelectionChange:a,searchPlaceholder:s="Search items..."}){const i=e.useRef(null),[l,c]=e.useState(!1),[d,u]=e.useState(null!=o?o:[]),[f,h]=e.useState(""),m=e.useCallback((e=>{u((t=>t.filter((t=>t.id!==e.id))))}),[]),p=e.useCallback((e=>{const t=i.current;t&&("Delete"!==e.key&&"Backspace"!==e.key||""!==t.value||u((e=>{const t=[...e];return t.pop(),t})),"Escape"===e.key&&t.blur())}),[]),g=t.filter((e=>!d.some((t=>e.id===t.id))));return e.useEffect((()=>{a(d)}),[d]),e.useEffect((()=>{if(!Array.isArray(o))return;const e=o.map((e=>{if(!e.name){const n=t.find((t=>t.id===e.id));return null!=n?n:e}return e}));u(e)}),[o,t]),(0,De.jsx)("div",{className:"group relative rounded-md border border-input ring-offset-background focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",children:(0,De.jsxs)(Hv,{open:l,onOpenChange:c,children:[d.length>0&&(0,De.jsx)("div",{className:"absolute top-[0px] left-[0px] px-3 py-2 border-t-0 border-l-0 border-r-0 flex space-x-2",children:d.map((e=>(0,De.jsxs)(fl,{variant:"secondary",className:"text-sm text-foreground font-normal rounded",children:[e.name,(0,De.jsx)("button",{className:"ml-1 rounded-full outline-none ring-offset-background focus:ring-2 focus:ring-ring focus:ring-offset-2",onKeyDown:t=>"Enter"===t.key&&m(e),onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},onClick:()=>m(e),children:(0,De.jsx)(IS,{className:"h-3.5 w-3.5 text-muted-foreground hover:text-foreground"})})]},`option-${e.id}`)))}),(0,De.jsx)(Vv,{asChild:!0,children:(0,De.jsx)(Uv,{ref:i,value:f||(d.length>0?"":n),onChange:e=>h(e.target.value),placeholder:n,className:"flex-1 text-left leading-none bg-transparent outline-none border-none focus:shadow-none text-muted-foreground px-3 py-3","aria-expanded":l,onKeyDown:p})}),(0,De.jsx)(Bv,{className:"w-[--radix-popover-trigger-width] max-h-[--radix-popover-content-available-height] p-0",children:(0,De.jsxs)(lj,{children:[(0,De.jsx)(cj,{placeholder:s,className:"outline-none border-none focus:shadow-none px-0"}),(0,De.jsxs)(dj,{children:[(0,De.jsx)(uj,{children:(0,De.jsx)("span",{className:"text-muted-foreground",children:r})}),(0,De.jsx)(fj,{children:g.map((e=>(0,De.jsx)(mj,{onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},onSelect:()=>{h(""),u((t=>[...t,e]))},className:"cursor-pointer",children:(0,De.jsx)("span",{children:e.name})},e.id)))})]})]})})]})})}function gj(){var t;const{event:n,setEvent:r}=Fl(),[o,a]=(0,e.useState)([]),[s,i]=(0,e.useState)(!1),l=parseInt(null!==(t=eventkoi_params?.default_cal)&&void 0!==t?t:0,10),c=e=>{const t=e.map((e=>({id:e.id,name:e.name})));JSON.stringify(n?.calendar||[])!==JSON.stringify(t)&&r((e=>({...e,calendar:t})))};(0,e.useEffect)((()=>{(async()=>{try{const e=await Ne()({path:`${eventkoi_params.api}/calendars`,method:"get"});if(Array.isArray(e)){const t=e.map((e=>({id:parseInt(e.id,10),name:e.name})));a(t);const r=!Array.isArray(n?.calendar)||0===n.calendar.length;if(!s&&l&&r&&t.length>0){const e=t.find((e=>e.id===l));e&&(c([e]),i(!0))}}}catch(e){console.error("Failed to fetch calendars:",e)}})()}),[]);const d=Array.isArray(n?.calendar)?n.calendar.map((e=>({id:e.id,name:e.name}))):[];return(0,De.jsxs)(xw,{className:"p-0",children:[(0,De.jsx)(dy,{htmlFor:"calendar",children:"Event calendar"}),(0,De.jsx)("div",{className:"text-muted-foreground mb-2",children:"Select which calendars your event will show up in."}),o.length>0&&(0,De.jsx)(pj,{options:o,placeholder:"Select calendar(s)",noItems:"No calendars are found.",searchPlaceholder:"Search calendars",value:d,onSelectionChange:c})]})}mj.displayName=$_.Item.displayName;var vj="Switch",[yj,bj]=Wl(vj),[xj,wj]=yj(vj),kj=e.forwardRef(((t,n)=>{const{__scopeSwitch:r,name:o,checked:a,defaultChecked:s,required:i,disabled:l,value:c="on",onCheckedChange:d,form:u,...f}=t,[h,m]=e.useState(null),p=$i(n,(e=>m(e))),g=e.useRef(!1),v=!h||u||!!h.closest("form"),[y,b]=Yl({prop:a,defaultProp:s??!1,onChange:d,caller:vj});return(0,De.jsxs)(xj,{scope:r,checked:y,disabled:l,children:[(0,De.jsx)(wl.button,{type:"button",role:"switch","aria-checked":y,"aria-required":i,"data-state":jj(y),"data-disabled":l?"":void 0,disabled:l,value:c,...f,ref:p,onClick:Bl(t.onClick,(e=>{b((e=>!e)),v&&(g.current=e.isPropagationStopped(),g.current||e.stopPropagation())}))}),v&&(0,De.jsx)(_j,{control:h,bubbles:!g.current,name:o,value:c,checked:y,required:i,disabled:l,form:u,style:{transform:"translateX(-100%)"}})]})}));kj.displayName=vj;var Sj="SwitchThumb",Cj=e.forwardRef(((e,t)=>{const{__scopeSwitch:n,...r}=e,o=wj(Sj,n);return(0,De.jsx)(wl.span,{"data-state":jj(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})}));Cj.displayName=Sj;var _j=e.forwardRef((({__scopeSwitch:t,control:n,checked:r,bubbles:o=!0,...a},s)=>{const i=e.useRef(null),l=$i(i,s),c=fy(r),d=Kd(n);return e.useEffect((()=>{const e=i.current;if(!e)return;const t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(c!==r&&n){const t=new Event("click",{bubbles:o});n.call(e,r),e.dispatchEvent(t)}}),[c,r,o]),(0,De.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...a,tabIndex:-1,ref:l,style:{...a.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})}));function jj(e){return e?"checked":"unchecked"}_j.displayName="SwitchBubbleInput";var Ej=kj,Nj=Cj;const Dj=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)(Ej,{className:Ni("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:(0,De.jsx)(Nj,{className:Ni("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})})));function Tj({event:e,setEvent:t,className:n}){return(0,De.jsxs)("div",{className:Ni("flex flex-col gap-4 rounded-sm border p-4",n),children:[(0,De.jsxs)("div",{className:"flex items-center justify-between",children:[(0,De.jsxs)("div",{className:"space-y-1",children:[(0,De.jsx)(dy,{className:"font-semibold",children:"Date and time not confirmed"}),(0,De.jsx)("p",{className:"text-sm text-muted-foreground",children:"Remove date and time. Show “to be confirmed” notification instead."})]}),(0,De.jsx)(Dj,{id:"tbc",checked:e?.tbc,onCheckedChange:e=>t((t=>({...t,tbc:e})))})]}),e?.tbc&&(0,De.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,De.jsx)(dy,{htmlFor:"tbc_note",children:"Notification"}),(0,De.jsx)(Uv,{type:"text",id:"tbc_note",value:e?.tbc_note,placeholder:"Date and time to be confirmed",className:"max-w-[422px]",onChange:e=>t((t=>({...t,tbc_note:e.target.value})))})]})]})}function Aj({event:e,setEvent:t,className:n}){return(0,De.jsx)("div",{className:Ni("flex flex-col gap-4 rounded-sm border p-4",n),children:(0,De.jsxs)("div",{className:"flex items-center justify-between",children:[(0,De.jsxs)("div",{className:"space-y-1",children:[(0,De.jsx)(dy,{className:"font-semibold",children:"Display timezone in event page"}),(0,De.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Your current timezone is"," ",(0,De.jsx)("a",{href:eventkoi_params.general_options_url,target:"_blank",rel:"noopener noreferrer",className:"underline font-normal",children:e?.timezone}),"."]})]}),(0,De.jsx)(Dj,{id:"timezone_display",checked:e?.timezone_display,onCheckedChange:e=>t((t=>({...t,timezone_display:e})))})]})})}Dj.displayName=Ej.displayName;var[Rj,Mj]=Wl("Tooltip",[Xd]),Oj=Xd(),Ij="TooltipProvider",Pj=700,Lj="tooltip.open",[Fj,zj]=Rj(Ij),Hj=t=>{const{__scopeTooltip:n,delayDuration:r=Pj,skipDelayDuration:o=300,disableHoverableContent:a=!1,children:s}=t,i=e.useRef(!0),l=e.useRef(!1),c=e.useRef(0);return e.useEffect((()=>{const e=c.current;return()=>window.clearTimeout(e)}),[]),(0,De.jsx)(Fj,{scope:n,isOpenDelayedRef:i,delayDuration:r,onOpen:e.useCallback((()=>{window.clearTimeout(c.current),i.current=!1}),[]),onClose:e.useCallback((()=>{window.clearTimeout(c.current),c.current=window.setTimeout((()=>i.current=!0),o)}),[o]),isPointerInTransitRef:l,onPointerInTransitChange:e.useCallback((e=>{l.current=e}),[]),disableHoverableContent:a,children:s})};Hj.displayName=Ij;var Vj="Tooltip",[Bj,Wj]=Rj(Vj),Uj=t=>{const{__scopeTooltip:n,children:r,open:o,defaultOpen:a,onOpenChange:s,disableHoverableContent:i,delayDuration:l}=t,c=zj(Vj,t.__scopeTooltip),d=Oj(n),[u,f]=e.useState(null),h=xc(),m=e.useRef(0),p=i??c.disableHoverableContent,g=l??c.delayDuration,v=e.useRef(!1),[y,b]=Yl({prop:o,defaultProp:a??!1,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(Lj))):c.onClose(),s?.(e)},caller:Vj}),x=e.useMemo((()=>y?v.current?"delayed-open":"instant-open":"closed"),[y]),w=e.useCallback((()=>{window.clearTimeout(m.current),m.current=0,v.current=!1,b(!0)}),[b]),k=e.useCallback((()=>{window.clearTimeout(m.current),m.current=0,b(!1)}),[b]),S=e.useCallback((()=>{window.clearTimeout(m.current),m.current=window.setTimeout((()=>{v.current=!0,b(!0),m.current=0}),g)}),[g,b]);return e.useEffect((()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)}),[]),(0,De.jsx)(pu,{...d,children:(0,De.jsx)(Bj,{scope:n,contentId:h,open:y,stateAttribute:x,trigger:u,onTriggerChange:f,onTriggerEnter:e.useCallback((()=>{c.isOpenDelayedRef.current?S():w()}),[c.isOpenDelayedRef,S,w]),onTriggerLeave:e.useCallback((()=>{p?k():(window.clearTimeout(m.current),m.current=0)}),[k,p]),onOpen:w,onClose:k,disableHoverableContent:p,children:r})})};Uj.displayName=Vj;var $j="TooltipTrigger",Gj=e.forwardRef(((t,n)=>{const{__scopeTooltip:r,...o}=t,a=Wj($j,r),s=zj($j,r),i=Oj(r),l=$i(n,e.useRef(null),a.onTriggerChange),c=e.useRef(!1),d=e.useRef(!1),u=e.useCallback((()=>c.current=!1),[]);return e.useEffect((()=>()=>document.removeEventListener("pointerup",u)),[u]),(0,De.jsx)(gu,{asChild:!0,...i,children:(0,De.jsx)(wl.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...o,ref:l,onPointerMove:Bl(t.onPointerMove,(e=>{"touch"!==e.pointerType&&(d.current||s.isPointerInTransitRef.current||(a.onTriggerEnter(),d.current=!0))})),onPointerLeave:Bl(t.onPointerLeave,(()=>{a.onTriggerLeave(),d.current=!1})),onPointerDown:Bl(t.onPointerDown,(()=>{a.open&&a.onClose(),c.current=!0,document.addEventListener("pointerup",u,{once:!0})})),onFocus:Bl(t.onFocus,(()=>{c.current||a.onOpen()})),onBlur:Bl(t.onBlur,a.onClose),onClick:Bl(t.onClick,a.onClose)})})}));Gj.displayName=$j;var Yj="TooltipPortal",[qj,Zj]=Rj(Yj,{forceMount:void 0}),Kj="TooltipContent",Qj=e.forwardRef(((e,t)=>{const n=Zj(Kj,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,s=Wj(Kj,e.__scopeTooltip);return(0,De.jsx)(xu,{present:r||s.open,children:s.disableHoverableContent?(0,De.jsx)(nE,{side:o,...a,ref:t}):(0,De.jsx)(Jj,{side:o,...a,ref:t})})})),Jj=e.forwardRef(((t,n)=>{const r=Wj(Kj,t.__scopeTooltip),o=zj(Kj,t.__scopeTooltip),a=e.useRef(null),s=$i(n,a),[i,l]=e.useState(null),{trigger:c,onClose:d}=r,u=a.current,{onPointerInTransitChange:f}=o,h=e.useCallback((()=>{l(null),f(!1)}),[f]),m=e.useCallback(((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},o=function(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}(r,function(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}(r,n.getBoundingClientRect())),a=function(e){const t=e.slice();return t.sort(((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0)),function(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const r=e[n];for(;t.length>=2;){const e=t[t.length-1],n=t[t.length-2];if(!((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x)))break;t.pop()}t.push(r)}t.pop();const n=[];for(let t=e.length-1;t>=0;t--){const r=e[t];for(;n.length>=2;){const e=n[n.length-1],t=n[n.length-2];if(!((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x)))break;n.pop()}n.push(r)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}(t)}([...o,...function(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}(t.getBoundingClientRect())]);l(a),f(!0)}),[f]);return e.useEffect((()=>()=>h()),[h]),e.useEffect((()=>{if(c&&u){const e=e=>m(e,u),t=e=>m(e,c);return c.addEventListener("pointerleave",e),u.addEventListener("pointerleave",t),()=>{c.removeEventListener("pointerleave",e),u.removeEventListener("pointerleave",t)}}}),[c,u,m,h]),e.useEffect((()=>{if(i){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),o=!function(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){const s=t[e],i=t[a],l=s.x,c=s.y,d=i.x,u=i.y;c>r!=u>r&&n<(d-l)*(r-c)/(u-c)+l&&(o=!o)}return o}(n,i);r?h():o&&(h(),d())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[c,u,i,d,h]),(0,De.jsx)(nE,{...t,ref:s})})),[Xj,eE]=Rj(Vj,{isInside:!1}),tE=function(e){const t=({children:e})=>(0,De.jsx)(De.Fragment,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=Zi,t}("TooltipContent"),nE=e.forwardRef(((t,n)=>{const{__scopeTooltip:r,children:o,"aria-label":a,onEscapeKeyDown:s,onPointerDownOutside:i,...l}=t,c=Wj(Kj,r),d=Oj(r),{onClose:u}=c;return e.useEffect((()=>(document.addEventListener(Lj,u),()=>document.removeEventListener(Lj,u))),[u]),e.useEffect((()=>{if(c.trigger){const e=e=>{const t=e.target;t?.contains(c.trigger)&&u()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}}),[c.trigger,u]),(0,De.jsx)(tc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:(0,De.jsxs)(vu,{"data-state":c.stateAttribute,...d,...l,ref:n,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[(0,De.jsx)(tE,{children:o}),(0,De.jsx)(Xj,{scope:r,isInside:!0,children:(0,De.jsx)(py,{id:c.contentId,role:"tooltip",children:a||o})})]})})}));Qj.displayName=Kj;var rE="TooltipArrow";e.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Oj(n);return eE(rE,n).isInside?null:(0,De.jsx)(yu,{...o,...r,ref:t})})).displayName=rE;var oE=Qj;const aE=Hj,sE=Uj,iE=Gj,lE=e.forwardRef((({className:e,sideOffset:t=4,...n},r)=>(0,De.jsx)(oE,{ref:r,sideOffset:t,className:Ni("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})));lE.displayName=oE.displayName;const cE=Mi("CheckCheck",[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]]),dE=Mi("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]),uE="w-[90px]";function fE({attribute:t,data:n,eventId:r}){const[o,a]=(0,e.useState)(""),[s,i]=(0,e.useState)(Date.now()),l=(e,t)=>{navigator.clipboard.writeText(e),a(t),i(Date.now()),setTimeout((()=>a("")),1200)},c=`[eventkoi id=${r} data=${n}]`;return(0,De.jsx)("div",{className:"inline-flex w-fit flex-col rounded-sm border bg-muted p-2 text-sm space-y-2",children:(0,De.jsxs)(aE,{delayDuration:0,children:[(0,De.jsxs)("div",{className:"flex flex-wrap items-center gap-1",children:[(0,De.jsx)("span",{className:Ni("font-normal text-[12px] text-muted-foreground",uE),children:"Block attribute:"}),(0,De.jsxs)("div",{className:"relative bg-[#eeeeee] flex items-center p-1 pt-2 py-1.5 pl-2 rounded-sm",children:[(0,De.jsx)("div",{className:"text-xs font-mono pr-8",children:t}),(0,De.jsxs)(sE,{children:[(0,De.jsx)(iE,{asChild:!0,children:(0,De.jsx)(tl,{variant:"secondary",size:"icon",className:"bg-white absolute top-[3px] right-[4px] p-0 w-6 h-6 border-none rounded-sm cursor-pointer hover:bg-white",onClick:()=>l(t,"attribute"),"aria-label":"Copy attribute",children:"attribute"===o?(0,De.jsx)(cE,{className:"h-4 w-4 transition-all duration-200"}):(0,De.jsx)(dE,{className:"h-4 w-4 transition-all duration-200"})})}),(0,De.jsx)(lE,{className:"bg-zinc-900 text-white px-3 py-1.5 text-sm rounded-md shadow-none border-none",side:"top",sideOffset:8,children:"attribute"===o?"Copied!":"Copy attribute"})]},`attr-${s}`)]})]}),(0,De.jsxs)("div",{className:"flex flex-wrap items-center gap-1",children:[(0,De.jsx)("span",{className:Ni("font-normal text-[12px] text-muted-foreground",uE),children:"Shortcode:"}),(0,De.jsxs)("div",{className:"relative bg-[#eeeeee] flex items-center p-1 pt-2 py-1.5 pl-2 rounded-sm",children:[(0,De.jsx)("div",{className:"text-xs font-mono pr-8",children:c}),(0,De.jsxs)(sE,{children:[(0,De.jsx)(iE,{asChild:!0,children:(0,De.jsx)(tl,{variant:"secondary",size:"icon",className:"bg-white absolute top-[3px] right-[4px] p-0 w-6 h-6 border-none rounded-sm cursor-pointer hover:bg-white",onClick:()=>l(c,"shortcode"),"aria-label":"Copy shortcode",children:"shortcode"===o?(0,De.jsx)(cE,{className:"h-4 w-4 transition-all duration-200"}):(0,De.jsx)(dE,{className:"h-4 w-4 transition-all duration-200"})})}),(0,De.jsx)(lE,{className:"bg-zinc-900 text-white px-3 py-1.5 text-sm rounded-md shadow-none border-none",side:"top",sideOffset:8,children:"shortcode"===o?"Copied!":"Copy shortcode"})]},`code-${s}`)]})]})]})})}function hE({date:t,setDate:n,disabled:r,wpTz:o="UTC"}){const a=e=>vs.fromJSDate(e,{zone:o}).toFormat("h:mma").toLowerCase(),s=(0,e.useMemo)((()=>Array.from({length:96},((e,t)=>vs.fromObject({hour:Math.floor(t/4),minute:t%4*15},{zone:o}).toFormat("h:mma").toLowerCase()))),[o]),[i,l]=(0,e.useState)((()=>t&&yt(t)?a(t):"")),[c,d]=(0,e.useState)(!1),[u,f]=(0,e.useState)(-1),h=(0,e.useRef)(null),m=(0,e.useRef)(null),p=(0,e.useRef)([]),g=e=>{if(!e)return null;const n=e.toLowerCase().replace(/\s/g,""),r=n.match(/^(\d{1,2}):(\d{2})(am|pm)?$/);if(r){let[,e,n,a]=r,s=parseInt(e,10),i=parseInt(n,10);return a||(a=s>=7&&s<=11?"am":"pm"),"pm"===a&&s<12&&(s+=12),"am"===a&&12===s&&(s=0),vs.fromJSDate(t||new Date,{zone:o}).set({hour:s,minute:i,second:0,millisecond:0}).setZone("utc").toJSDate()}const a=n.match(/^(\d{1,2})(\d{2})?(am|pm)?$/);if(a){let[,e,n,r]=a,s=parseInt(e,10),i=n?parseInt(n,10):0;return i>=60||s>12?null:(r||(r=s>=7&&s<=11?"am":"pm"),"pm"===r&&s<12&&(s+=12),"am"===r&&12===s&&(s=0),vs.fromJSDate(t||new Date,{zone:o}).set({hour:s,minute:i,second:0,millisecond:0}).setZone("utc").toJSDate())}return null},v=e=>{l(e);const t=g(e);t&&yt(t)&&n(t),d(!1)};return(0,e.useEffect)((()=>{const e=e=>{h.current?.contains(e.target)||d(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)}),[]),(0,e.useEffect)((()=>{-1!==u&&p.current[u]&&c&&p.current[u].scrollIntoView({block:"nearest"})}),[u,c]),(0,De.jsxs)("div",{ref:h,className:"relative w-[100px]",children:[(0,De.jsx)("input",{ref:m,type:"text",value:i,placeholder:"Set time",onChange:e=>{const t=e.target.value;l(t),d(!0);const n=g(t);if(n&&yt(n)){const e=a(vs.fromJSDate(n,{zone:"utc"}).setZone(o).toJSDate()),t=s.findIndex((t=>t===e));f(t)}else f(-1)},onBlur:()=>{const e=g(i);e&&yt(e)&&(n(e),l(a(vs.fromJSDate(e,{zone:"utc"}).setZone(o).toJSDate())))},onFocus:()=>{if(r)return;d(!0);const e=g(i);if(e&&yt(e)){const t=a(vs.fromJSDate(e,{zone:"utc"}).setZone(o).toJSDate()),n=s.findIndex((e=>e===t));f(n)}else f(-1)},onKeyDown:e=>{if(!r)if("ArrowDown"===e.key)e.preventDefault(),c||d(!0),f((e=>e<s.length-1?e+1:0));else if("ArrowUp"===e.key)e.preventDefault(),c||d(!0),f((e=>e>0?e-1:s.length-1));else if("Enter"===e.key)if(e.preventDefault(),-1!==u)v(s[u]);else{const e=g(i);e&&yt(e)&&(n(e),l(a(vs.fromJSDate(e,{zone:"utc"}).setZone(o).toJSDate())),d(!1))}else"Escape"===e.key&&d(!1)},onMouseDown:e=>{if(document.activeElement===m.current&&!c){e.preventDefault(),d(!0);const t=g(i);if(t&&yt(t)){const e=a(vs.fromJSDate(t,{zone:"utc"}).setZone(o).toJSDate()),n=s.findIndex((t=>t===e));f(n)}}},disabled:r,inputMode:"text",className:Ni("h-10 w-full rounded-md border border-input px-3 py-2 text-sm shadow-sm","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1","placeholder:text-muted-foreground",r?"bg-muted text-muted-foreground/40 cursor-not-allowed opacity-100":"bg-background")}),c&&!r&&(0,De.jsx)("div",{className:"absolute z-10 mt-1 max-h-60 w-full overflow-y-auto rounded-md border bg-popover text-sm shadow-md",children:s.map(((e,t)=>(0,De.jsx)("button",{type:"button",onClick:()=>v(e),ref:e=>p.current[t]=e,className:Ni("w-full px-3 py-2 text-left whitespace-nowrap",t===u&&"bg-muted text-foreground"),children:e},e)))})]})}const mE=Mi("ChevronsLeft",[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]]),pE=Mi("ChevronsRight",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]);function gE({displayMonth:e}){const{goToMonth:t}=ug(),n=e.getFullYear(),r=e.getMonth(),o="undefined"!=typeof eventkoi_params&&eventkoi_params.locale&&(a=eventkoi_params.locale)?a.replace("_","-"):"en";var a;const s=vs.fromJSDate(e).setLocale(o).toFormat("LLLL");return(0,De.jsx)("div",{className:"flex items-center justify-between px-2",children:(0,De.jsxs)("div",{className:"flex items-center gap-1",children:[(0,De.jsx)("button",{onClick:()=>t(new Date(n-1,r)),className:"p-1 hover:bg-muted rounded","aria-label":"Previous year",children:(0,De.jsx)(mE,{className:"h-4 w-4"})}),(0,De.jsx)("button",{onClick:()=>t(new Date(n,r-1)),className:"p-1 hover:bg-muted rounded","aria-label":"Previous month",children:(0,De.jsx)(Hl,{className:"h-4 w-4"})}),(0,De.jsxs)("span",{className:"font-medium w-32 text-center capitalize",children:[s," ",n]}),(0,De.jsx)("button",{onClick:()=>t(new Date(n,r+1)),className:"p-1 hover:bg-muted rounded","aria-label":"Next month",children:(0,De.jsx)(zl,{className:"h-4 w-4"})}),(0,De.jsx)("button",{onClick:()=>t(new Date(n+1,r)),className:"p-1 hover:bg-muted rounded","aria-label":"Next year",children:(0,De.jsx)(pE,{className:"h-4 w-4"})})]})})}const vE=(0,e.memo)((function({value:t,onChange:n,className:r}){const{settings:o}=Re(),a=(0,e.useMemo)((()=>t instanceof Date&&!isNaN(t)?t:new Date),[t?.getFullYear(),t?.getMonth()]),s=`${a.getFullYear()}-${a.getMonth()}`,i=(e=>{null!=e&&""!==e||(e=0);const t=Number(e);return 6===t?0:t>=0&&t<=5?t+1:1})(o?.week_starts_on),l="undefined"!=typeof eventkoi_params&&eventkoi_params.locale&&(c=eventkoi_params.locale)?c.replace("_","-"):"en";var c;const d=Array.from({length:7},((e,t)=>vs.now().setLocale(l).set({weekday:t+1}).toFormat("ccc")));return(0,De.jsx)("div",{children:(0,De.jsx)(pv,{mode:"single",selected:t,onSelect:n,defaultMonth:a,weekStartsOn:i,className:r,components:{Caption:gE},formatters:{formatWeekdayName:e=>d[e]}})},s)}));function yE(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function bE(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var xE=["mousedown","touchstart"];function wE({value:t,onChange:n,wpTz:r="UTC",className:o,disabled:a=!1}){const[s,i]=(0,e.useState)(!1),l=(0,e.useRef)(null);!function(t,n,r){void 0===r&&(r=xE);var o=(0,e.useRef)(n);(0,e.useEffect)((function(){o.current=n}),[n]),(0,e.useEffect)((function(){for(var e=function(e){var n=t.current;n&&!n.contains(e.target)&&o.current(e)},n=0,a=r;n<a.length;n++){var s=a[n];yE(document,s,e)}return function(){for(var t=0,n=r;t<n.length;t++){var o=n[t];bE(document,o,e)}}}),[r,t])}(l,(()=>{s&&i(!1)}));const c="undefined"!=typeof eventkoi_params&&eventkoi_params.locale&&(d=eventkoi_params.locale)?d.replace("_","-"):"en";var d;return(0,De.jsxs)("div",{className:"relative",ref:l,children:[(0,De.jsx)(tl,{type:"button",variant:"outline",onClick:()=>{a||i((e=>!e))},disabled:a,className:Ni(!t&&"text-muted-foreground font-normal","w-[116px] justify-start",o),children:t?vs.fromJSDate(t,{zone:r}).setLocale(c).toFormat("d MMM yyyy"):"Set date"}),s&&!a&&(0,De.jsx)("div",{className:"absolute z-50 mt-2 rounded-md border bg-background shadow-md",children:(0,De.jsx)(vE,{value:t?new Date(t.getFullYear(),t.getMonth(),t.getDate()):null,onChange:e=>{if(e){i(!1);const t=vs.fromObject({year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()},{zone:r});n(t)}}})})]})}const kE=Mi("MoveRight",[["path",{d:"M18 8L22 12L18 16",key:"1r0oui"}],["path",{d:"M2 12H22",key:"1m8cig"}]]),SE=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],CE=["January","February","March","April","May","June","July","August","September","October","November","December"];function _E(e){if(!(e instanceof Date)||isNaN(e))return"";const t=e.getDate(),n=Math.ceil(t/7);return["first","second","third","fourth","fifth"][n-1]||`${n}th`}function jE(e,t){const n=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],r=["January","February","March","April","May","June","July","August","September","October","November","December"],o=["first","second","third","fourth","fifth"];let a;a=e.every&&e.every>1?`Every ${e.every} ${{day:"days",week:"weeks",month:"months",year:"years"}[e.frequency]||"custom"}`:{day:"Daily",week:"Weekly",month:"Monthly",year:"Yearly"}[e.frequency]||"Custom";let s="";if("week"===e.frequency&&e.weekdays?.length&&(s=`, on ${e.weekdays.map((e=>n[e])).join(", ")}`),"month"===e.frequency&&"weekday-of-month"===e.month_day_rule){const r=vs.fromISO(e.start_date,{zone:"utc"}).setZone(t).toJSDate(),a=0===(i=r.getDay())?6:i-1,l=Math.ceil(r.getDate()/7);s=`, on the ${o[l-1]||`${l}th`} ${n[a]}`}var i;if("month"===e.frequency&&"day-of-month"===e.month_day_rule&&(s=`, on day ${vs.fromISO(e.start_date,{zone:"utc"}).setZone(t).day}`),"year"===e.frequency&&e.months?.length){const t=e.months.map((e=>r[e])).join(", ");s=`, in ${t}`}let l="";return l="after"===e.ends?`, ${e.ends_after} events`:"on"===e.ends?`, until ${vs.fromISO(e.ends_on,{zone:"utc"}).setZone(t).toFormat("d MMM yyyy")}`:", forever",`${a}${s}${l}.`}const EE=(0,e.memo)((function({showAttributes:t}){var n;const{event:r,setEvent:o}=Fl(),a=null!==(n=r?.tbc)&&void 0!==n&&n,[s,i]=(0,e.useState)(null),l=r.recurrence_rules||[],{settings:c}=Re(),d=r?.timezone||window.eventkoi_params?.timezone_string||"UTC",u=(0,e.useCallback)((()=>{const e=new Date;e.setHours(9,0,0,0),new Date(e).setHours(17,0,0,0);const t=new Date;t.setFullYear(t.getFullYear()+2);const n={start_date:vs.fromJSDate(e,{zone:d}).setZone("utc").toISO({suppressMilliseconds:!0}),end_date:null,all_day:!1,every:1,frequency:"day",working_days_only:!1,ends:"after",ends_after:30,ends_on:vs.fromJSDate(t,{zone:d}).setZone("utc").toISO({suppressMilliseconds:!0}),weekdays:[],months:[e.getMonth()],month_day_rule:"day-of-month",month_day_value:e.getDate()};o((e=>({...e,recurrence_rules:[...e.recurrence_rules||[],n]})))}),[o]),f=(0,e.useCallback)(((e,t,n)=>{const r=[...l],a={...r[e]},s={...a,[t]:n},i="start_date"===t,c=vs.fromISO(i?n:s.start_date,{zone:"utc"}).setZone(d).toJSDate(),u=c instanceof Date&&!isNaN(c);"all_day"===t&&!0===n&&(s.end_date=null);const f="frequency"===t?"week"===n:"week"===s.frequency;if(u&&f&&i&&(!s.weekdays||0===s.weekdays.length)){const e=_s(c.toISOString(),d).getDay(),t=0===e?6:e-1;s.weekdays=[t]}if(("frequency"===t&&"year"===n||i&&"year"===s.frequency)&&u&&(s.months=[c.getMonth()],s.month_day_value=c.getDate()),("frequency"===t&&"month"===n||i&&"month"===s.frequency)&&u&&(s.month_day_value=c.getDate()),i&&a.end_date){const e=vs.fromISO(a.start_date,{zone:"utc"}),t=vs.fromISO(a.end_date,{zone:"utc"});if(e.isValid&&t.isValid){const r=t.diff(e),o=vs.fromISO(n,{zone:"utc"});o.isValid&&(s.end_date=o.plus(r).toUTC().toISO({suppressMilliseconds:!0}))}}r[e]=s,o((e=>({...e,recurrence_rules:r})))}),[l,o]),h=(0,e.useCallback)(((e,t)=>{o((n=>{const r=[...n.recurrence_rules||[]],o=r[e]||{},a={...o,...t},s=vs.fromISO(t.start_date||o.start_date,{zone:"utc"}).setZone(d).toJSDate();if(s instanceof Date&&!isNaN(s)&&"week"===a.frequency&&"start_date"in t){const e=_s(s.toISOString(),d).getDay(),t=0===e?6:e-1;a.weekdays=[t]}if(t.start_date&&o.end_date){const e=vs.fromISO(o.start_date,{zone:"utc"}),n=vs.fromISO(o.end_date,{zone:"utc"});if(e.isValid&&n.isValid){const r=n.diff(e),o=vs.fromISO(t.start_date,{zone:"utc"});o.isValid&&(a.end_date=o.plus(r).toUTC().toISO({suppressMilliseconds:!0}))}}return r[e]=a,{...n,recurrence_rules:r}}))}),[o]),m=(0,e.useCallback)((e=>{const t=[...l];t.splice(e,1),o((e=>({...e,recurrence_rules:t})))}),[l,o]),p=(0,e.useCallback)(((e,t,n)=>{const r=l[e][t]||[],o=r.includes(n)?r.filter((e=>e!==n)):[...r,n];f(e,t,o)}),[l,f]);return(0,De.jsxs)("div",{className:"flex flex-col gap-6 pointer-events-none opacity-50 select-none",children:[l.map(((e,n)=>{var o;const u=_s(Cs(e.start_date),d),g=_s(Cs(e.end_date),d),v=_s(Cs(e.ends_on),d);return(0,De.jsxs)("div",{className:"border rounded-md p-4 space-y-6",children:[(0,De.jsxs)("div",{className:"flex flex-wrap items-center gap-2 md:gap-4",children:[(0,De.jsx)(wE,{value:u,wpTz:d,onChange:t=>{if(!t)return;const r=u?vs.fromJSDate(u,{zone:d}):vs.fromObject({hour:9,minute:0},{zone:d}),o=t.set({hour:r.hour,minute:r.minute,second:0,millisecond:0});let a=null;if(!e.all_day&&u&&g){const e=vs.fromJSDate(g,{zone:d}).diff(r);a=o.plus(e).toUTC().toISO({suppressMilliseconds:!0})}const s=o.toUTC().toISO({suppressMilliseconds:!0});h(n,{start_date:s,...a&&{end_date:a}})},className:Ni("disabled:bg-muted disabled:text-muted-foreground/40 disabled:cursor-not-allowed disabled:opacity-100"),disabled:a}),!e.all_day&&(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)(hE,{date:u,wpTz:d,setDate:e=>{if(!e)return;const t=vs.fromJSDate(e,{zone:"utc"}).setZone(d),r=g?vs.fromJSDate(g,{zone:"utc"}).setZone(d):null;let o={start_date:t.toUTC().toISO({suppressMilliseconds:!0})};if(r){const e=r.diff(vs.fromJSDate(u,{zone:"utc"}).setZone(d)),n=t.plus(e);o.end_date=n.toUTC().toISO({suppressMilliseconds:!0})}h(n,o)},disabled:a}),(0,De.jsx)(kE,{className:"w-6 h-6 text-muted-foreground",strokeWidth:1.5}),(0,De.jsx)(hE,{date:g,wpTz:d,setDate:e=>{if(!e)return;const t=vs.fromISO(l[n].start_date,{zone:"utc"}).setZone(d),r=vs.fromJSDate(e,{zone:d}),o=t.set({hour:r.hour,minute:r.minute,second:0,millisecond:0}).toUTC().toISO({suppressMilliseconds:!0});console.log("Rule end_date =>",o),h(n,{end_date:o})},disabled:a})]}),(0,De.jsxs)("div",{className:"flex items-center gap-2",children:[(0,De.jsx)(Dj,{checked:e.all_day,onCheckedChange:e=>f(n,"all_day",e),disabled:a}),(0,De.jsx)("span",{className:"text-sm text-muted-foreground",children:"All day"})]}),(0,De.jsx)(tl,{type:"button",size:"icon",variant:"ghost",onClick:()=>m(n),className:"h-7 w-7 ml-auto p-0",children:(0,De.jsx)(gw,{className:"h-4 w-4 text-muted-foreground"})})]}),t&&(0,De.jsx)(fE,{attribute:`event_datetime_${n+1}`,data:`datetime_${n+1}`,eventId:r?.id}),(0,De.jsxs)("div",{className:"flex items-center gap-2",children:[(0,De.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Repeats every"}),(0,De.jsx)(Uv,{type:"number",min:1,value:e.every,onChange:e=>f(n,"every",parseInt(e.target.value)),className:"w-16 h-9"}),(0,De.jsxs)(Ib,{value:e.frequency,onValueChange:e=>f(n,"frequency",e),children:[(0,De.jsx)(Lb,{className:"w-[100px] h-9",children:(0,De.jsx)(Pb,{})}),(0,De.jsxs)(Hb,{children:[(0,De.jsx)(Vb,{value:"day",children:"Day"}),(0,De.jsx)(Vb,{value:"week",children:"Week"}),(0,De.jsx)(Vb,{value:"month",children:"Month"}),(0,De.jsx)(Vb,{value:"year",children:"Year"})]})]})]}),"day"===e.frequency&&(0,De.jsxs)("div",{className:"flex items-center gap-2",children:[(0,De.jsx)(mw,{checked:e.working_days_only,onCheckedChange:e=>f(n,"working_days_only",e),id:`working-days-${n}`}),(0,De.jsxs)("label",{htmlFor:`working-days-${n}`,className:"text-sm text-muted-foreground",children:["Only count"," ",(0,De.jsx)(Se,{to:"/settings",className:"underline text-muted-foreground hover:text-primary/80",onClick:e=>e.stopPropagation(),children:"working days"}),"."]})]}),"week"===e.frequency&&(0,De.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,De.jsx)("span",{className:"text-sm font-medium text-foreground",children:"On"}),Ds(parseInt(null!==(o=c?.week_starts_on)&&void 0!==o?o:"0",10)).map((({key:t,short:r})=>(0,De.jsx)(tl,{type:"button",size:"sm",variant:e.weekdays.includes(t)?"default":"secondary",className:Ni("rounded-full w-8 h-8 p-0 transition-none",e.weekdays.includes(t)?"bg-foreground":"bg-secondary border border-input"),onClick:()=>p(n,"weekdays",t),children:r},t)))]}),"month"===e.frequency&&(0,De.jsxs)("div",{className:"flex items-center gap-2",children:[(0,De.jsx)("span",{className:"text-sm font-medium text-foreground",children:"On"}),(0,De.jsxs)(Ib,{value:e.month_day_rule,onValueChange:e=>f(n,"month_day_rule",e),children:[(0,De.jsx)(Lb,{className:"w-[220px] h-9",children:(0,De.jsx)(Pb,{placeholder:"Pick rule"})}),(0,De.jsxs)(Hb,{children:[(0,De.jsxs)(Vb,{value:"day-of-month",children:["day ",u?.getDate()]}),(0,De.jsxs)(Vb,{value:"weekday-of-month",children:["the ",_E(u)," ",SE[0===u?.getDay()?6:u?.getDay()-1]]})]})]})]}),"year"===e.frequency&&(0,De.jsxs)("div",{className:"space-y-6",children:[(0,De.jsxs)("div",{className:"flex items-center gap-2",children:[(0,De.jsx)("span",{className:"text-sm font-medium text-foreground",children:"In"}),(0,De.jsxs)(Hv,{children:[(0,De.jsx)(Vv,{asChild:!0,children:(0,De.jsx)(tl,{variant:"outline",role:"combobox",className:Ni("min-w-[260px] w-full px-2 h-9 justify-start items-center overflow-x-auto whitespace-nowrap","scrollbar-hide appearance-none","hover:bg-transparent hover:text-foreground"),children:0===e.months.length?(0,De.jsx)("span",{className:"text-muted-foreground",children:"Select months"}):(0,De.jsx)("div",{className:"flex gap-1.5 items-center",children:[...e.months].sort(((e,t)=>e-t)).map((e=>(0,De.jsxs)("div",{className:"flex items-center px-2 py-0.5 text-sm rounded-sm bg-[#eeeeee] text-foreground",children:[CE[e],(0,De.jsx)("span",{role:"button",tabIndex:0,onClick:t=>{t.stopPropagation(),p(n,"months",e)},onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),p(n,"months",e))},className:"ml-1 hover:text-foreground focus:outline-none",children:(0,De.jsx)(IS,{className:"h-3 w-3"})})]},e)))})})}),(0,De.jsx)(Bv,{align:"start",className:"w-[260px] p-0",children:(0,De.jsx)(lj,{children:(0,De.jsx)(fj,{children:CE.map(((t,r)=>{const o=e.months.includes(r);return(0,De.jsxs)(mj,{value:t,onSelect:()=>p(n,"months",r),className:Ni("cursor-pointer px-3 py-2"),children:[(0,De.jsx)("span",{className:"flex-1",children:t}),o&&(0,De.jsx)("span",{children:"✓"})]},r)}))})})})]})]}),(0,De.jsxs)("div",{className:"flex items-center gap-2",children:[(0,De.jsx)("span",{className:"text-sm font-medium text-foreground",children:"On"}),(0,De.jsxs)(Ib,{value:e.month_day_rule,onValueChange:e=>f(n,"month_day_rule",e),children:[(0,De.jsx)(Lb,{className:"w-[220px] h-9",children:(0,De.jsx)(Pb,{placeholder:"Pick rule"})}),(0,De.jsxs)(Hb,{children:[(0,De.jsxs)(Vb,{value:"day-of-month",children:["day ",u?.getDate()]}),(0,De.jsxs)(Vb,{value:"weekday-of-month",children:["the ",_E(u)," ",SE[0===u?.getDay()?6:u?.getDay()-1]]})]})]})]})]}),(0,De.jsxs)("div",{className:"flex items-center gap-2",children:[(0,De.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Ends"}),(0,De.jsxs)(Ib,{value:e.ends,onValueChange:e=>f(n,"ends",e),children:[(0,De.jsx)(Lb,{className:"w-[100px] h-9",children:(0,De.jsx)(Pb,{})}),(0,De.jsxs)(Hb,{children:[(0,De.jsx)(Vb,{value:"never",children:"Never"}),(0,De.jsx)(Vb,{value:"after",children:"After"}),(0,De.jsx)(Vb,{value:"on",children:"On"})]})]}),"after"===e.ends&&(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)(Uv,{type:"number",min:1,value:e.ends_after,onChange:e=>f(n,"ends_after",parseInt(e.target.value)),className:"w-20 h-9"}),(0,De.jsx)("span",{className:"text-sm text-muted-foreground",children:"events"})]}),"on"===e.ends&&(0,De.jsx)(wE,{value:v,wpTz:d,onChange:e=>{if(!e)return;const t=vs.fromJSDate(null!=v?v:new Date,{zone:d}),r=vs.fromJSDate(e,{zone:d}).set({hour:t.hour,minute:t.minute,second:0,millisecond:0}).setZone("utc").toISO({suppressMilliseconds:!0});f(n,"ends_on",r)}})]}),(0,De.jsxs)("div",{className:"space-y-1",children:[(0,De.jsx)("label",{className:"text-sm font-medium text-foreground",children:"Recurring rule summary"}),(0,De.jsxs)("div",{className:"relative max-w-[450px]",children:[(0,De.jsx)(Uv,{type:"text",readOnly:!0,value:jE(e,d),className:"w-full text-sm pr-[100px]"}),(0,De.jsxs)(tl,{variant:"secondary",type:"button",className:"absolute h-8 px-2 right-[5px] top-[4px] border-none cursor-pointer hover:bg-input text-sm",onClick:()=>{i(n),navigator.clipboard.writeText(jE(e,d)),setTimeout((()=>i(null)),1200)},children:[s===n?(0,De.jsx)(cE,{className:"mr-2 h-4 w-4"}):(0,De.jsx)(dE,{className:"mr-2 h-4 w-4"}),s===n?"Copied!":"Copy"]})]})]}),t&&(0,De.jsx)(fE,{attribute:`event_rulesummary_${n+1}`,data:`rulesummary_${n+1}`,eventId:r?.id})]},n)})),(0,De.jsx)("div",{children:(0,De.jsxs)(tl,{type:"button",variant:"ghost",size:"sm",onClick:u,className:"w-auto justify-start text-sm",children:[(0,De.jsx)(jS,{className:"w-4 h-4 mr-2"}),"Add recurring rule"]})}),(0,De.jsx)(Tj,{event:r,setEvent:o}),(0,De.jsx)(Aj,{event:r,setEvent:o})]})}));function NE({event:e,updateDay:t,updateEvent:n,tbc:r}){const o=e?.timezone||"UTC",a=Array.isArray(e.event_days)?e.event_days.length:0,s=Math.max(0,a-1),i=e.start_date?_s(Cs(e.start_date),o):void 0,l=e.end_date?_s(Cs(e.end_date),o):void 0,c=(e,n)=>{if(!a&&0===e){const e=js((new Date).toISOString(),o);"start"===n&&t(0,"start_date",e),"end"===n&&t(0,"end_date",e)}},d=(e,r)=>{const a=js(vs.fromJSDate(r,{zone:o}).toISO(),o);"start"===e?(c(0,"start"),t(0,"start_date",a),n("start_date",a)):(c(s,"end"),t(s,"end_date",a),n("end_date",a))};return(0,De.jsxs)("div",{className:"flex flex-wrap items-center gap-4",children:[(0,De.jsx)(wE,{value:i,wpTz:o,onChange:e=>{if(!e)return;const t=i?vs.fromJSDate(i,{zone:o}):vs.fromObject({hour:9,minute:0},{zone:o}),n=e.set({hour:t.hour,minute:t.minute,second:0,millisecond:0});d("start",n.toJSDate())},disabled:r}),(0,De.jsx)(hE,{date:i,setDate:e=>{if(!e)return;const t=i||new Date,n=new Date(t);n.setHours(e.getHours(),e.getMinutes(),0,0),d("start",n)},wpTz:o}),(0,De.jsx)(kE,{className:"w-6 h-6 text-muted-foreground",strokeWidth:1.5}),(0,De.jsx)(wE,{value:l,wpTz:o,onChange:e=>{if(!e)return;const t=l?vs.fromJSDate(l,{zone:o}):i?vs.fromJSDate(i,{zone:o}):vs.fromObject({hour:17,minute:0},{zone:o}),n=e.set({hour:t.hour,minute:t.minute,second:0,millisecond:0});d("end",n.toJSDate())},disabled:r}),(0,De.jsx)(hE,{date:l,setDate:e=>{if(!e)return;const t=l||i||new Date,n=new Date(t);n.setHours(e.getHours(),e.getMinutes(),0,0),d("end",n)},wpTz:o})]})}var DE="Radio",[TE,AE]=Wl(DE),[RE,ME]=TE(DE),OE=e.forwardRef(((t,n)=>{const{__scopeRadio:r,name:o,checked:a=!1,required:s,disabled:i,value:l="on",onCheck:c,form:d,...u}=t,[f,h]=e.useState(null),m=$i(n,(e=>h(e))),p=e.useRef(!1),g=!f||d||!!f.closest("form");return(0,De.jsxs)(RE,{scope:r,checked:a,disabled:i,children:[(0,De.jsx)(wl.button,{type:"button",role:"radio","aria-checked":a,"data-state":FE(a),"data-disabled":i?"":void 0,disabled:i,value:l,...u,ref:m,onClick:Bl(t.onClick,(e=>{a||c?.(),g&&(p.current=e.isPropagationStopped(),p.current||e.stopPropagation())}))}),g&&(0,De.jsx)(LE,{control:f,bubbles:!p.current,name:o,value:l,checked:a,required:s,disabled:i,form:d,style:{transform:"translateX(-100%)"}})]})}));OE.displayName=DE;var IE="RadioIndicator",PE=e.forwardRef(((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=ME(IE,n);return(0,De.jsx)(xu,{present:r||a.checked,children:(0,De.jsx)(wl.span,{"data-state":FE(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})}));PE.displayName=IE;var LE=e.forwardRef((({__scopeRadio:t,control:n,checked:r,bubbles:o=!0,...a},s)=>{const i=e.useRef(null),l=$i(i,s),c=fy(r),d=Kd(n);return e.useEffect((()=>{const e=i.current;if(!e)return;const t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(c!==r&&n){const t=new Event("click",{bubbles:o});n.call(e,r),e.dispatchEvent(t)}}),[c,r,o]),(0,De.jsx)(wl.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...a,tabIndex:-1,ref:l,style:{...a.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})}));function FE(e){return e?"checked":"unchecked"}LE.displayName="RadioBubbleInput";var zE=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],HE="RadioGroup",[VE,BE]=Wl(HE,[Du,AE]),WE=Du(),UE=AE(),[$E,GE]=VE(HE),YE=e.forwardRef(((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:a,required:s=!1,disabled:i=!1,orientation:l,dir:c,loop:d=!0,onValueChange:u,...f}=e,h=WE(n),m=Kl(c),[p,g]=Yl({prop:a,defaultProp:o??null,onChange:u,caller:HE});return(0,De.jsx)($E,{scope:n,name:r,required:s,disabled:i,value:p,onValueChange:g,children:(0,De.jsx)(Fu,{asChild:!0,...h,orientation:l,dir:m,loop:d,children:(0,De.jsx)(wl.div,{role:"radiogroup","aria-required":s,"aria-orientation":l,"data-disabled":i?"":void 0,dir:m,...f,ref:t})})})}));YE.displayName=HE;var qE="RadioGroupItem",ZE=e.forwardRef(((t,n)=>{const{__scopeRadioGroup:r,disabled:o,...a}=t,s=GE(qE,r),i=s.disabled||o,l=WE(r),c=UE(r),d=e.useRef(null),u=$i(n,d),f=s.value===a.value,h=e.useRef(!1);return e.useEffect((()=>{const e=e=>{zE.includes(e.key)&&(h.current=!0)},t=()=>h.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}}),[]),(0,De.jsx)(zu,{asChild:!0,...l,focusable:!i,active:f,children:(0,De.jsx)(OE,{disabled:i,required:s.required,checked:f,...c,...a,name:s.name,ref:u,onCheck:()=>s.onValueChange(a.value),onKeyDown:Bl((e=>{"Enter"===e.key&&e.preventDefault()})),onFocus:Bl(a.onFocus,(()=>{h.current&&d.current?.click()}))})})}));ZE.displayName=qE;var KE=e.forwardRef(((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=UE(n);return(0,De.jsx)(PE,{...o,...r,ref:t})}));KE.displayName="RadioGroupIndicator";var QE=YE,JE=ZE,XE=KE;const eN=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)(QE,{className:Ni("grid gap-2",e),...t,ref:n})));eN.displayName=QE.displayName;const tN=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)(JE,{ref:n,className:Ni("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:(0,De.jsx)(XE,{className:"flex items-center justify-center",children:(0,De.jsx)(Fm,{className:"h-2.5 w-2.5 fill-current text-current"})})})));function nN({value:e,onChange:t}){return(0,De.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,De.jsx)(dy,{className:"font-medium text-sm",children:"Event Type:"}),(0,De.jsxs)(eN,{value:e||"selected",onValueChange:t,className:"flex flex-col gap-2",children:[(0,De.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,De.jsx)(tN,{value:"continuous",id:"continuous"}),(0,De.jsx)(dy,{htmlFor:"continuous",className:"text-sm font-medium cursor-pointer",children:"Consecutive Days"})]}),(0,De.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,De.jsx)(tN,{value:"selected",id:"selected"}),(0,De.jsxs)(dy,{htmlFor:"selected",className:"text-sm font-medium cursor-pointer",children:["Selected Days"," ",(0,De.jsx)("span",{className:"font-normal",children:"(non-consecutive or varied times)"})]})]})]})]})}function rN({showAttributes:t}){var n;const{event:r,setEvent:o}=Fl(),a=r.event_days?.length?r.event_days:[{start_date:null,end_date:null,all_day:!1}],s=null!==(n=r?.tbc)&&void 0!==n&&n,i=r?.timezone||window.eventkoi_params?.timezone_string||"UTC",[l,c]=(0,e.useState)({}),d=(e,t,n)=>{const s=[...a],d={...s[e]},u={...l},f=((e=>{if(0===e)return null;const t=a[e-1];t?.end_date&&vs.fromISO(t.end_date,{zone:"utc"}).setZone(i)})(e),d.start_date?vs.fromISO(d.start_date,{zone:"utc"}).setZone(i):null),h=d.end_date?vs.fromISO(d.end_date,{zone:"utc"}).setZone(i):null;if("all_day"===t&&(d.all_day=n,f&&h)){let e=f,t=h;n?(e=e.set({hour:0,minute:0,second:0,millisecond:0}),t=t.set({hour:23,minute:59,second:59,millisecond:999})):(0===e.hour&&(e=e.set({hour:9,minute:0})),t.hour>=23&&(t=t.set({hour:17,minute:0}))),d.start_date=e.setZone("utc").toISO({suppressMilliseconds:!0}),d.end_date=t.setZone("utc").toISO({suppressMilliseconds:!0})}if("start_date"===t){if(/[+-]\d\d:\d\d|Z$/.test(n))d.start_date=vs.fromISO(n).toUTC().toISO({suppressMilliseconds:!0});else{const e=vs.fromISO(n,{zone:i});d.start_date=e.toUTC().toISO({suppressMilliseconds:!0})}if(h&&vs.fromISO(d.start_date)>h){const e=vs.fromISO(d.start_date).plus({hours:8});d.end_date=e.toUTC().toISO({suppressMilliseconds:!0})}delete u[e]}if("end_date"===t){const t=vs.fromISO(n,{zone:i});f&&t<f?u[e]="End must be after start.":(d.end_date=t.setZone("utc").toISO({suppressMilliseconds:!0}),"continuous"===r.standard_type&&e===a.length-1&&o((e=>({...e,end_date:d.end_date}))),delete u[e])}s[e]=d,o((e=>({...e,event_days:s}))),c(u)},u=r.standard_type||"continuous";return(0,De.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,De.jsx)(nN,{value:u,onChange:e=>{o((t=>{if("continuous"===e)return{...t,standard_type:"continuous",start_date:null,end_date:null,event_days:[]};if("selected"===e){const e=[{start_date:null,end_date:null,all_day:!1}];return{...t,standard_type:"selected",start_date:null,end_date:null,event_days:e}}return t}))}}),"selected"===u&&(0,De.jsx)(De.Fragment,{children:a.map(((e,t)=>{const n=e.start_date?_s(Cs(e.start_date),i):void 0,r=e.end_date?_s(Cs(e.end_date),i):void 0;return(0,De.jsxs)("div",{className:"flex flex-wrap items-center gap-2 md:gap-4 group",children:[(0,De.jsx)(wE,{value:n,wpTz:i,onChange:e=>{if(!e)return;const s=n?{h:n.getHours(),m:n.getMinutes()}:{h:9,m:0},i=r?{h:r.getHours(),m:r.getMinutes()}:{h:17,m:0},l=e.set({hour:s.h,minute:s.m,second:0,millisecond:0}),c=e.set({hour:i.h,minute:i.m,second:0,millisecond:0});((e,t,n)=>{const r=[...a],s={...r[e]};s.start_date=t,s.end_date=n,r[e]=s,o((e=>({...e,event_days:r})))})(t,l.toUTC().toISO({suppressMilliseconds:!0}),c.toUTC().toISO({suppressMilliseconds:!0}))},className:Ni("disabled:bg-muted disabled:text-muted-foreground/40 disabled:cursor-not-allowed disabled:opacity-100"),disabled:s}),!e.all_day&&(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)(hE,{date:n,wpTz:i,setDate:e=>{if(!e||!n)return;const r=vs.fromJSDate(e,{zone:"utc"}).setZone(i),o=vs.fromJSDate(n,{zone:i}).set({hour:r.hour,minute:r.minute,second:0,millisecond:0});d(t,"start_date",o.toISO({suppressMilliseconds:!0}))},disabled:s}),(0,De.jsx)(kE,{className:"w-6 h-6 text-muted-foreground",strokeWidth:1.5}),(0,De.jsx)(hE,{date:r,wpTz:i,setDate:e=>{if(!e||!n)return;const r=vs.fromJSDate(e,{zone:"utc"}).setZone(i),o=vs.fromJSDate(n,{zone:i}).set({hour:r.hour,minute:r.minute,second:0,millisecond:0});d(t,"end_date",o.toISO({suppressMilliseconds:!0}))},disabled:s})]}),(0,De.jsxs)("div",{className:"flex items-center gap-2",children:[(0,De.jsx)(Dj,{checked:e.all_day,onCheckedChange:e=>d(t,"all_day",e),disabled:s}),(0,De.jsx)("span",{className:"text-sm text-muted-foreground",children:"All day"}),0!==t&&(0,De.jsx)(tl,{type:"button",size:"icon",variant:"ghost",onClick:()=>(e=>{if(a.length<=1)return;const t=[...a];t.splice(e,1),o((e=>({...e,event_days:t})))})(t),className:"h-7 w-7 p-0 opacity-0 group-hover:opacity-100 transition-opacity duration-200",disabled:a.length<=1,children:(0,De.jsx)(gw,{className:"h-4 w-4 text-muted-foreground"})})]})]},t)}))}),"continuous"===u&&(0,De.jsx)(NE,{event:r,updateDay:d,updateEvent:(e,t)=>o((n=>({...n,[e]:t})))}),t&&(0,De.jsx)(fE,{attribute:"event_datetime",data:"datetime",eventId:r?.id}),"selected"===u&&(0,De.jsx)("div",{className:"flex",children:(0,De.jsxs)(tl,{type:"button",variant:"ghost",size:"sm",onClick:()=>{const e=a[a.length-1],t=_s(e?.end_date?e.end_date:(new Date).toISOString(),i),n=new Date(t);n.setDate(n.getDate()+1),n.setHours(9,0,0,0),new Date(n).setHours(17,0,0,0);const r={start_date:null,end_date:null,all_day:!1};o((e=>({...e,event_days:[...e.event_days||[],r]})))},className:"w-auto justify-start text-sm",disabled:s,children:[(0,De.jsx)(jS,{className:"w-4 h-4 mr-2"}),"Add day"]})})]})}function oN({event:e,setEvent:t,showAttributes:n}){return(0,De.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,De.jsx)(rN,{showAttributes:n}),(0,De.jsx)(Tj,{event:e,setEvent:t}),(0,De.jsx)(Aj,{event:e,setEvent:t})]})}tN.displayName=JE.displayName;var aN="Tabs",[sN,iN]=Wl(aN,[Du]),lN=Du(),[cN,dN]=sN(aN),uN=e.forwardRef(((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:s="horizontal",dir:i,activationMode:l="automatic",...c}=e,d=Kl(i),[u,f]=Yl({prop:r,onChange:o,defaultProp:a??"",caller:aN});return(0,De.jsx)(cN,{scope:n,baseId:xc(),value:u,onValueChange:f,orientation:s,dir:d,activationMode:l,children:(0,De.jsx)(wl.div,{dir:d,"data-orientation":s,...c,ref:t})})}));uN.displayName=aN;var fN="TabsList",hN=e.forwardRef(((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=dN(fN,n),s=lN(n);return(0,De.jsx)(Fu,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:r,children:(0,De.jsx)(wl.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})}));hN.displayName=fN;var mN="TabsTrigger",pN=e.forwardRef(((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,s=dN(mN,n),i=lN(n),l=yN(s.baseId,r),c=bN(s.baseId,r),d=r===s.value;return(0,De.jsx)(zu,{asChild:!0,...i,focusable:!o,active:d,children:(0,De.jsx)(wl.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":c,"data-state":d?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...a,ref:t,onMouseDown:Bl(e.onMouseDown,(e=>{o||0!==e.button||!1!==e.ctrlKey?e.preventDefault():s.onValueChange(r)})),onKeyDown:Bl(e.onKeyDown,(e=>{[" ","Enter"].includes(e.key)&&s.onValueChange(r)})),onFocus:Bl(e.onFocus,(()=>{const e="manual"!==s.activationMode;d||o||!e||s.onValueChange(r)}))})})}));pN.displayName=mN;var gN="TabsContent",vN=e.forwardRef(((t,n)=>{const{__scopeTabs:r,value:o,forceMount:a,children:s,...i}=t,l=dN(gN,r),c=yN(l.baseId,o),d=bN(l.baseId,o),u=o===l.value,f=e.useRef(u);return e.useEffect((()=>{const e=requestAnimationFrame((()=>f.current=!1));return()=>cancelAnimationFrame(e)}),[]),(0,De.jsx)(xu,{present:a||u,children:({present:e})=>(0,De.jsx)(wl.div,{"data-state":u?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!e,id:d,tabIndex:0,...i,ref:n,style:{...t.style,animationDuration:f.current?"0s":void 0},children:e&&s})})}));function yN(e,t){return`${e}-trigger-${t}`}function bN(e,t){return`${e}-content-${t}`}vN.displayName=gN;var xN=hN,wN=pN,kN=vN;const SN=uN,CN=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)(xN,{ref:n,className:Ni("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t})));CN.displayName=xN.displayName;const _N=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)(wN,{ref:n,className:Ni("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t})));_N.displayName=wN.displayName;const jN=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)(kN,{ref:n,className:Ni("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t})));function EN({showAttributes:t}){const{event:n,setEvent:r}=Fl(),o=n?.date_type||"standard";return(0,e.useEffect)((()=>{if("standard"!==o||n.event_days&&0!==n.event_days.length||r((e=>({...e,event_days:[{start_date:null,end_date:null,all_day:!1}]}))),"recurring"===o&&(!n.recurrence_rules||0===n.recurrence_rules.length)){const e=new Date;e.setHours(9,0,0,0),new Date(e).setHours(17,0,0,0);const t=new Date;t.setFullYear(t.getFullYear()+2);const n={start_date:null,end_date:null,all_day:!1,every:1,frequency:"day",working_days_only:!1,ends:"after",ends_after:30,ends_on:t.toISOString(),weekdays:[],months:[],month_day_rule:"day-of-month",month_day_value:e.getDate()};r((e=>({...e,recurrence_rules:[n]})))}}),[o]),(0,De.jsx)(xw,{className:"gap-3 p-0",children:(0,De.jsxs)(SN,{value:o,onValueChange:e=>{r((t=>({...t,date_type:e})))},className:"w-full",children:[(0,De.jsxs)(CN,{className:"border border-input rounded-lg mb-4",children:[(0,De.jsx)(_N,{value:"standard",className:"rounded-lg",children:"Standard"}),(0,De.jsxs)(_N,{value:"recurring",className:"rounded-lg",children:["Recurring",(0,De.jsx)(Sp,{})]})]}),(0,De.jsx)(jN,{value:"standard",children:(0,De.jsx)(oN,{event:n,setEvent:r,showAttributes:t})}),(0,De.jsxs)(jN,{value:"recurring",children:[(0,De.jsx)(ol,{headline:"Upgrade to access Recurring Events",minimal:!0,className:"mb-8 mt-6"}),(0,De.jsx)(EE,{showAttributes:t})]})]})})}function NN(){const{event:t,settings:n}=Fl(),r=n?.gmap_api_key,[o,a]=(0,e.useState)(!1);return(0,De.jsxs)("div",{className:"flex flex-col w-full gap-8",children:[(0,De.jsxs)(Bi,{container:!0,className:"flex flex-col md:flex-row items-start justify-between gap-4",children:[(0,De.jsx)(_C,{}),(0,De.jsxs)("div",{className:"flex items-center min-w-[170px] justify-between gap-[10px]",children:[(0,De.jsx)(dy,{htmlFor:"show-attrs",className:"font-normal text-[12px]",children:(0,De.jsxs)("div",{className:"leading-[15px] flex md:block",children:[(0,De.jsx)("div",{children:"Show block attributes"}),(0,De.jsx)("div",{children:"and shortcodes"})]})}),(0,De.jsx)(Dj,{id:"show-attrs",checked:o,onCheckedChange:a})]})]}),(0,De.jsx)(Bi,{container:!0,children:(0,De.jsx)(EN,{showAttributes:o})}),(0,De.jsxs)(Bi,{container:!0,children:[(0,De.jsx)(Vi,{level:3,children:"Location details"}),r?(0,De.jsx)(YS,{apiKey:r,children:(0,De.jsx)(SC,{})}):(0,De.jsx)(SC,{}),o&&(0,De.jsx)(fE,{attribute:"event_location",data:"location",eventId:t?.id})]}),(0,De.jsxs)(Bi,{container:!0,className:"gap-10",children:[(0,De.jsx)(Vi,{level:3,children:"Additional details"}),(0,De.jsx)(kS,{}),o&&(0,De.jsx)("div",{className:"text-sm text-muted-foreground -mt-6",children:(0,De.jsx)(fE,{attribute:"event_image",data:"image",eventId:t?.id})}),(0,De.jsx)(yS,{}),o&&(0,De.jsx)("div",{className:"text-sm text-muted-foreground -mt-6",children:(0,De.jsx)(fE,{attribute:"event_details",data:"details",eventId:t?.id})}),(0,De.jsx)(NC,{}),(0,De.jsx)(gj,{}),o&&(0,De.jsx)("div",{className:"text-sm text-muted-foreground -mt-6",children:(0,De.jsx)(fE,{attribute:"event_calendar",data:"calendar",eventId:t?.id})})]})]})}function DN({title:e,type:t="link",url:n,locked:r=!1,Icon:o=jS}){const a=(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)(o,{className:"mr-2 h-5 w-5"}),e,r&&(0,De.jsx)(Sp,{})]});return(0,De.jsx)(tl,{className:Ni("bg-foreground border border-foreground font-normal hover:bg-accent hover:border-card-foreground hover:text-accent-foreground",r&&"cursor-default border-[#e9e9e9] bg-[#e9e9e9] text-muted-foreground hover:border-[#e9e9e9] hover:bg-[#e9e9e9] hover:text-muted-foreground"),asChild:!0,children:"link"===t?(0,De.jsx)(Se,{to:r?"#":n,children:a}):(0,De.jsx)("a",{href:r?"#":n,children:a})})}jN.displayName=kN.displayName;const TN={live:"Live",completed:"Completed",tbc:"Date not set",upcoming:"Upcoming",publish:"Upcoming",draft:"Draft",trash:"Trash",recurring:"Recurring"},AN=(e,t,n)=>`${e.original.title} ${e.original.status}`.toLowerCase().includes(n.toLowerCase()),RN=(e,t)=>{const n=["live","upcoming","publish","tbc","draft","completed","trash"];return n.indexOf(e.original.status)-n.indexOf(t.original.status)};function MN(){const[t,n]=(0,e.useState)(!0),[r,o]=(0,e.useState)([]),[a]=je(),s=a.get("status")||"",i=a.get("event_status")||"",l=a.get("calendar")||"",c=a.get("from")||"",d=a.get("to")||"",u=(0,e.useCallback)((async(e=null)=>{n(!0);try{const n=new URLSearchParams({status:s,event_status:i,calendar:l,from:c,to:d}),r=`${eventkoi_params.api}/events?${n.toString()}`,a=await Ne()({path:r,method:"get"});o(a),(t=e)&&sp.custom((e=>(0,De.jsx)(pp,{message:t,variant:"default"})),{duration:4e3})}catch(e){console.error("Failed to load events:",e)}finally{n(!1)}var t}),[s,i,l,c,d]);(0,e.useEffect)((()=>{u()}),[u]);const f=(0,e.useMemo)((()=>[{id:"select",header:({table:e})=>(0,De.jsx)("div",{className:"flex items-center justify-center min-h-6",children:(0,De.jsx)(mw,{checked:e.getIsAllPageRowsSelected()||e.getIsSomePageRowsSelected()&&"indeterminate",onCheckedChange:t=>e.toggleAllPageRowsSelected(!!t),"aria-label":"Select all"})}),cell:({row:e})=>(0,De.jsx)("div",{className:"flex items-center justify-center min-h-6",children:(0,De.jsx)(mw,{checked:e.getIsSelected(),onCheckedChange:t=>e.toggleSelected(!!t),"aria-label":"Select row"})}),enableSorting:!1,enableHiding:!1},{accessorKey:"title",header:({column:e})=>(0,De.jsx)(Qx,{title:"Event name",column:e}),cell:({row:e})=>{const{id:t,wp_status:n,url:r}=e.original;return(0,De.jsx)("div",{className:"grid space-y-1",children:(0,De.jsxs)("div",{className:"flex items-center gap-2 text-foreground",children:[(0,De.jsxs)("span",{className:"inline",children:[(0,De.jsx)("a",{href:`#/events/${parseInt(t)}/main`,className:"inline font-medium hover:underline hover:decoration-dotted underline-offset-4 break-words",children:e.getValue("title")}),r&&(0,De.jsx)("a",{href:r,className:"ms-2 text-muted-foreground hover:text-foreground shrink-0",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,De.jsx)(pw,{className:"w-5 h-5 inline-block"})})]}),["draft","trash"].includes(n)&&(0,De.jsx)(fl,{variant:"outline",className:"font-normal",children:n.charAt(0).toUpperCase()+n.slice(1)}),"recurring"===e.original.date_type&&(0,De.jsx)("span",{className:"text-xs font-normal px-2 py-0.5 rounded-full border border-[#D0E6FB] bg-[#F0F8FF] text-foreground",children:"Recurring"})]})})},filterFn:AN,sortingFn:"alphanumeric"},{accessorKey:"status",header:({column:e})=>(0,De.jsx)(Qx,{title:"Status",column:e}),cell:({row:e})=>{const t=e.getValue("status"),n={completed:(0,De.jsx)(hl,{className:"w-4 h-4 text-success"}),draft:(0,De.jsx)(ml,{className:"w-4 h-4 text-primary/60"}),tbc:(0,De.jsx)(ml,{className:"w-4 h-4 text-primary/60"}),upcoming:(0,De.jsx)(pl,{className:"w-4 h-4 text-[#48BEFA]"}),publish:(0,De.jsx)(pl,{className:"w-4 h-4 text-[#48BEFA]"}),live:(0,De.jsx)(gl,{className:"w-4 h-4 text-destructive"}),trash:(0,De.jsx)(yl,{className:"w-4 h-4 text-primary/40"}),recurring:(0,De.jsx)(vl,{className:"w-4 h-4 text-primary/60"})};return(0,De.jsxs)("div",{className:"flex items-center space-x-2",children:[n[t],(0,De.jsx)("div",{className:"text-foreground",children:TN[t]})]})},filterFn:AN,sortingFn:RN},{accessorKey:"start_date_iso",header:({column:e})=>(0,De.jsx)(Qx,{title:"Starts",column:e}),cell:({row:e})=>{const{start_date_iso:t,timezone:n,recurrence_rules:r,event_days:o,date_type:a}=e.original,s="recurring"===a&&!0===r?.[0]?.all_day||["standard","multi"].includes(a)&&!0===o?.[0]?.all_day;return(0,De.jsx)("div",{className:"text-foreground whitespace-pre-line",children:Ss(t,{timezone:n,format:s?"date":"date-time"})})},filterFn:AN,sortingFn:"alphanumeric",sortUndefined:"last",invertSorting:!0},{accessorKey:"end_date_iso",header:({column:e})=>(0,De.jsx)(Qx,{title:"Ends",column:e}),cell:({row:e})=>{const{end_date_iso:t,timezone:n,recurrence_rules:r,event_days:o,date_type:a}=e.original,s="recurring"===a&&!0===r?.[0]?.all_day||["standard","multi"].includes(a)&&!0===o?.[o.length-1]?.all_day,i="recurring"===a&&"never"===r?.[0]?.ends&&!t;return(0,De.jsx)("div",{className:"text-foreground whitespace-pre-line",children:i?"Never":Ss(t,{timezone:n,format:s?"date":"date-time"})})},filterFn:AN,sortingFn:"alphanumeric",sortUndefined:"last",invertSorting:!0},{accessorKey:"calendar",header:()=>(0,De.jsx)(De.Fragment,{children:"Calendar"}),cell:({row:e})=>{const t=e.original.calendar||[];return(0,De.jsx)("div",{className:"text-foreground",children:t.map(((e,n)=>(0,De.jsxs)("span",{children:[e.name,n<t.length-1&&", "]},`calendar-${n}`)))})},filterFn:AN},{accessorKey:"modified_date",header:({column:e})=>(0,De.jsx)(Qx,{title:"Last modified",column:e}),cell:({row:e})=>{const t=e.getValue("modified_date"),{timezone:n}=e.original;return(0,De.jsx)("div",{className:"text-foreground whitespace-pre-line",children:Ss(t,{timezone:n})})},filterFn:AN,sortingFn:(e,t,n)=>(Date.parse(e.getValue(n))||0)-(Date.parse(t.getValue(n))||0),sortUndefined:"last"}]),[]);return(0,De.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,De.jsxs)("div",{className:"mx-auto flex w-full gap-2 justify-between",children:[(0,De.jsx)(Vi,{children:"Events"}),(0,De.jsx)(DN,{title:"Add event",url:"/events/add"})]}),(0,De.jsx)(Kx,{data:r,columns:f,empty:"No events are found.",base:"events",statusFilters:[{key:"all",title:"All",hideCount:!0,isSelected:!0},{key:"publish",title:"Published"},{key:"draft",title:"Draft"},{key:"future",title:"Scheduled"},{key:"recurring",title:"Recurring"},{key:"trash",title:"Trash"}],isLoading:t,fetchResults:u,queryStatus:s,eventStatus:i,calStatus:l,from:c,to:d,hideCategories:!0,defaultSort:[{id:"modified_date",desc:!0}]}),(0,De.jsx)(ol,{className:"my-8 max-w-2xl"})]})}function ON(){return(0,De.jsx)(De.Fragment,{children:"List of event templates"})}function IN(){return q("/calendars/:id/*")||q("/calendars/add")?(0,De.jsx)(de,{}):(0,De.jsx)(Fi,{children:(0,De.jsx)(de,{})})}function PN({calendar:e,setCalendar:t}){const n=e?.id>0?"Edit calendar":"Add calendar";return(0,De.jsxs)("div",{className:"space-y-[1px]",children:[(0,De.jsx)(tl,{variant:"link",className:"p-0 h-auto text-muted-foreground font-normal",asChild:!0,children:(0,De.jsxs)(Se,{to:"/calendars",children:[(0,De.jsx)(Hl,{className:"mr-2 h-4 w-4"}),"Back to all calendars"]})}),(0,De.jsx)(Vi,{level:3,className:"pl-6",children:n})]})}function LN({loading:t,setLoading:n,calendar:r,setCalendar:o}){const a=K(),[s,i]=(0,e.useState)(!1),[l,c]=(0,e.useState)(!1);let d=!r?.id&&!r?.name||s;return(0,De.jsxs)("div",{className:"flex gap-1 md:gap-2",children:[(0,De.jsx)(tl,{variant:"link",disabled:d||!r.url,onClick:()=>window.open(r?.url,"_blank"),children:"Preview"}),(0,De.jsxs)("div",{className:"flex items-center gap-[1px]",children:[(0,De.jsx)(tl,{variant:"default",className:"rounded-r-none",disabled:d,onClick:()=>{(async()=>{if(!r.name)return c(!0),document.getElementById("calendar-name").focus(),void document.getElementById("calendar-name").classList.add("eventkoi-error");i(!0),await Ne()({path:`${eventkoi_params.api}/update_calendar`,method:"post",data:{calendar:r,status:"publish"},headers:{"EVENTKOI-API-KEY":eventkoi_params.api_key}}).then((e=>{i(!1),e.error?vp(e.error):(o(e),gp(e),e.update_endpoint&&(window.location.hash=window.location.hash.replace("add",e.id)))})).catch((e=>{i(!1)}))})()},children:r?.id?"Save":"Publish"}),(0,De.jsxs)(zm,{modal:!1,children:[(0,De.jsx)(Hm,{asChild:!0,children:(0,De.jsx)(tl,{variant:"default",size:"icon",className:"rounded-l-none",disabled:d,children:(0,De.jsx)(Oi,{className:"w-4 h-4"})})}),(0,De.jsxs)($m,{className:"w-56 z-[510000]",align:"end",children:[(0,De.jsx)(Gm,{disabled:!r?.id,onClick:()=>{(async()=>{i(!0),n(!0);const e=r?.id;await Ne()({path:`${eventkoi_params.api}/duplicate_calendar`,method:"post",data:{calendar_id:r?.id},headers:{"EVENTKOI-API-KEY":eventkoi_params.api_key}}).then((t=>{i(!1),n(!1),o(t),gp(t),t.update_endpoint&&(window.location.hash=window.location.hash.replace(e,t.id))})).catch((()=>{i(!1),n(!1)}))})()},children:"Create duplicate calendar"}),(0,De.jsx)(qm,{}),(0,De.jsx)(Gm,{className:"text-destructive focus:text-destructive",disabled:r?.id===parseInt(eventkoi_params.default_cal),onClick:()=>{(async()=>{n(!0),await Ne()({path:`${eventkoi_params.api}/delete_calendar`,method:"post",data:{calendar_id:r?.id},headers:{"EVENTKOI-API-KEY":eventkoi_params.api_key}}).then((e=>{n(!1),a("/calendars"),gp(e)})).catch((()=>{n(!1)}))})()},children:"Delete calendar"})]})]})]})]})}function FN({loading:e,setLoading:t,calendar:n,setCalendar:r}){return(0,De.jsxs)("header",{className:Ni("flex text-sm h-12 items-center border-b gap-2 md:gap-6 px-4 md:px-8","sticky top-[0px] z-[100000] bg-white md:bg-muted h-20 shadow-sm border-b"),children:[(0,De.jsx)(Ai,{}),(0,De.jsx)(PN,{calendar:n,setCalendar:r}),(0,De.jsx)("div",{className:"flex w-full justify-end",children:(0,De.jsx)(LN,{loading:e,setLoading:t,calendar:n,setCalendar:r})})]})}const zN=[{name:"main",title:"Main"},{name:"embed",title:"Embed"}];function HN({calendar:e,setCalendar:t,location:n}){var r=n.pathname?.split("/"),o=r[3];const a="font-medium px-3 py-3 rounded-lg text-foreground bg-foreground/5";return(0,De.jsx)("nav",{className:"grid gap-1 text-sm text-muted-foreground",children:zN.map((function(e,t){let n="font-medium px-3 py-3 rounded-lg";return r&&o&&o===e.name&&(n=a),r&&!o&&"main"===e.name&&(n=a),(0,De.jsx)(Se,{to:e.name,className:n,children:e.title},`setting-tab-${t}`)}))})}function VN({type:e="order",title:t,message:n,actionTo:r,actionLabel:o}){const a=K(),s={order:(0,Ms.__)("Order","eventkoi"),event:(0,Ms.__)("Event","eventkoi"),calendar:(0,Ms.__)("Calendar","eventkoi"),ticket:(0,Ms.__)("Ticket","eventkoi"),item:(0,Ms.__)("Item","eventkoi")}[e]||(0,Ms.__)("Item","eventkoi"),i={order:"/tickets/orders",event:"/events",calendar:"/calendars",ticket:"/tickets",item:"/"}[e]||"/";return(0,De.jsx)(Fi,{children:(0,De.jsxs)("div",{className:"flex flex-col items-center justify-center text-center py-24 max-w-md mx-auto",children:[(0,De.jsx)("div",{className:"mb-4 rounded-full bg-red-100 text-red-600 p-4",children:(0,De.jsx)(gl,{className:"w-8 h-8"})}),(0,De.jsx)("h2",{className:"text-xl font-semibold mb-2 text-foreground",children:t||sprintf((0,Ms.__)("%s not found","eventkoi"),s)}),(0,De.jsx)("p",{className:"text-muted-foreground text-sm mb-6",children:n||sprintf((0,Ms.__)("This %s may have been deleted, or the link you followed is invalid.","eventkoi"),s.toLowerCase())}),(0,De.jsx)(tl,{onClick:()=>a(r||i),variant:"default",children:o||sprintf((0,Ms.__)("Back to all %s","eventkoi"),`${e}s`)})]})})}function BN(){const t=K(),n=Y(),{settings:r,refreshSettings:o}=Re(),{id:a}=X(),[s,i]=(0,e.useState)(!0),[l,c]=(0,e.useState)(null),[d,u]=(0,e.useState)(!1),f=n.pathname?.split("/"),h=f[3],m=parseInt(a)||0;return(0,e.useEffect)((()=>{h||t("main")}),[n]),(0,e.useEffect)((()=>{m?(async()=>{try{const e=await Ne()({path:`${eventkoi_params.api}/calendar?id=${m}`,method:"get"});c(e)}catch(e){u(!0)}finally{i(!1)}})():(async()=>{const e=await o(),t=null!==(r=["monday","tuesday","wednesday","thursday","friday","saturday","sunday"][parseInt(null!==(n=e?.week_starts_on)&&void 0!==n?n:"0",10)])&&void 0!==r?r:"monday";var n,r;c({...eventkoi_params.new_calendar,startday:t}),i(!1)})()}),[]),s||!r||!l&&!m?null:d||m&&!l?.id?(0,De.jsx)(VN,{type:"calendar"}):(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)(FN,{loading:s,setLoading:i,calendar:l,setCalendar:c}),(0,De.jsxs)(Fi,{className:"max-w-[1180px]",children:[(0,De.jsxs)("div",{className:Ni("w-full mx-auto items-start gap-6","grid grid-cols-1 md:grid-cols-[180px_1fr]"),children:[(0,De.jsx)(HN,{calendar:l,setCalendar:c,location:n}),(0,De.jsx)("div",{className:"grid",children:(0,De.jsx)(de,{context:[l,c]})})]}),(0,De.jsx)("div",{className:"h-10"})]})]})}var WN="horizontal",UN=["horizontal","vertical"],$N=e.forwardRef(((e,t)=>{const{decorative:n,orientation:r=WN,...o}=e,a=function(e){return UN.includes(e)}(r)?r:WN,s=n?{role:"none"}:{"aria-orientation":"vertical"===a?a:void 0,role:"separator"};return(0,De.jsx)(wl.div,{"data-orientation":a,...s,...o,ref:t})}));$N.displayName="Separator";var GN=$N;const YN=e.forwardRef((({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>(0,De.jsx)(GN,{ref:o,decorative:n,orientation:t,className:Ni("shrink-0 bg-border","horizontal"===t?"h-[1px] w-full":"h-full w-[1px]",e),...r})));function qN({calendar:e,setCalendar:t}){return(0,De.jsxs)(xw,{className:"p-0",children:[(0,De.jsx)(dy,{children:"Default calendar display"}),(0,De.jsx)(SN,{defaultValue:e?.display,onValueChange:e=>{t((t=>({...t,display:e})))},className:"pt-1",children:(0,De.jsxs)(CN,{className:"border border-input rounded-lg",children:[(0,De.jsx)(_N,{value:"calendar",className:"rounded-lg",children:"Calendar"}),(0,De.jsx)(_N,{value:"list",className:"rounded-lg",children:"List"})]})}),(0,De.jsx)("div",{className:"text-muted-foreground",children:"Choose the default view visitors see."})]})}YN.displayName=GN.displayName;const ZN=Mi("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),KN={monday:"Monday",tuesday:"Tuesday",wednesday:"Wednesday",thursday:"Thursday",friday:"Friday",saturday:"Saturday",sunday:"Sunday"},QN=["monday","tuesday","wednesday","thursday","friday","saturday","sunday"];function JN({calendar:t,setCalendar:n}){var r,o;const a="list"===t?.display,{settings:s}=Re(),i=null!==(r=QN[parseInt(null!==(o=s?.week_starts_on)&&void 0!==o?o:"0",10)])&&void 0!==r?r:"monday";(0,e.useEffect)((()=>{t?.startday||n((e=>({...e,startday:i})))}),[t?.startday,i,n]);const l=t?.startday||i;return(0,De.jsxs)(xw,{className:"p-0",children:[(0,De.jsx)(dy,{htmlFor:"startday",children:"Week starts on"}),(0,De.jsxs)(Ib,{value:l,onValueChange:e=>{a||n((t=>({...t,startday:e})))},disabled:a,children:[(0,De.jsx)(Lb,{id:"startday",className:"w-[250px]",children:(0,De.jsx)(Pb,{placeholder:"Select a day"})}),(0,De.jsx)(Hb,{children:Object.entries(KN).map((([e,t])=>(0,De.jsx)(Vb,{value:e,children:t},e)))})]}),!a&&(0,De.jsxs)("div",{className:"text-muted-foreground",children:["Select the day calendar use as the start of the week."," ",(0,De.jsx)(Se,{to:"/settings",className:"underline hover:text-primary transition-colors",children:"Edit global settings"}),"."]}),a&&(0,De.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground mt-2",children:[(0,De.jsx)(ZN,{className:"w-4 h-4"}),"This setting is only available in calendar view."]})]})}function XN({calendar:e,setCalendar:t}){const n="list"===e?.display;return(0,De.jsxs)(xw,{className:"p-0",children:[(0,De.jsx)(dy,{children:"Default time frame to display"}),(0,De.jsx)(SN,{defaultValue:e?.timeframe,onValueChange:e=>{n||(e=>{t((t=>({...t,timeframe:e})))})(e)},className:"pt-1",children:(0,De.jsxs)(CN,{className:"border border-input rounded-lg opacity-100",children:[(0,De.jsx)(_N,{value:"month",className:"rounded-lg",disabled:n,children:"Month"}),(0,De.jsx)(_N,{value:"week",className:"rounded-lg",disabled:n,children:"Week"})]})}),n&&(0,De.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground mt-2",children:[(0,De.jsx)(ZN,{className:"w-4 h-4"}),"This setting is only available in calendar view."]})]})}function eD(){const[e,t]=J();return(0,De.jsx)(Bi,{children:(0,De.jsxs)("div",{className:"grid w-full",children:[(0,De.jsx)(xw,{variant:"header",children:(0,De.jsx)(Vi,{level:3,children:"Additional details"})}),(0,De.jsx)(YN,{}),(0,De.jsx)(qN,{calendar:e,setCalendar:t}),(0,De.jsx)(YN,{}),(0,De.jsx)(XN,{calendar:e,setCalendar:t}),(0,De.jsx)(YN,{}),(0,De.jsx)(JN,{calendar:e,setCalendar:t})]})})}function tD({calendar:e,setCalendar:t}){return(0,De.jsxs)(xw,{className:"p-0",children:[(0,De.jsx)(dy,{children:"Block"}),(0,De.jsxs)("div",{className:"relative max-w-[422px] space-y-4",children:[(0,De.jsxs)("div",{className:"text-base text-muted-foreground",children:["1. In the block editor, add"," ",(0,De.jsx)("code",{className:"relative rounded bg-muted px-[0.3rem] py-[0.2rem] text-sm font-mono font-semibold",children:"/EK Calendar"})," ","block."]}),(0,De.jsx)("div",{className:"text-base text-muted-foreground",children:"2. In the right hand side Settings panel, select the relevant calendar from the dropdown menu."})]})]})}function nD({calendar:t,setCalendar:n}){const[r,o]=(0,e.useState)(!1);return(0,De.jsxs)(xw,{className:"p-0",children:[(0,De.jsx)(dy,{children:"Calendar link"}),(0,De.jsxs)("div",{className:"relative max-w-[422px]",children:[(0,De.jsx)(Uv,{type:"text",value:t?.url,className:"w-full",readOnly:!0,disabled:!t.url}),(0,De.jsxs)(tl,{variant:"secondary",type:"submit",className:"absolute h-8 px-2 right-[5px] top-[4px] border-none cursor-pointer hover:bg-input",disabled:!t.url,onClick:()=>{o(!0),navigator.clipboard.writeText(t?.url),setTimeout((()=>{o(!1)}),1200)},children:[r?(0,De.jsx)(cE,{className:"mr-2 h-4 w-4"}):(0,De.jsx)(dE,{className:"mr-2 h-4 w-4"}),r?"Copied!":"Copy"]})]})]})}function rD({calendar:t,setCalendar:n}){const[r,o]=(0,e.useState)(!1);return(0,De.jsxs)(xw,{className:"p-0",children:[(0,De.jsx)(dy,{children:"Shortcode"}),(0,De.jsxs)("div",{className:"relative max-w-[260px]",children:[(0,De.jsx)(Uv,{type:"text",value:t?.shortcode,className:"w-full",readOnly:!0,disabled:!t.url}),(0,De.jsxs)(tl,{variant:"secondary",type:"submit",className:"absolute h-8 px-2 right-[5px] top-[4px] border-none cursor-pointer hover:bg-input",disabled:!t.url,onClick:()=>{o(!0),navigator.clipboard.writeText(t?.shortcode),setTimeout((()=>{o(!1)}),1200)},children:[r?(0,De.jsx)(cE,{className:"mr-2 h-4 w-4"}):(0,De.jsx)(dE,{className:"mr-2 h-4 w-4"}),r?"Copied!":"Copy"]})]})]})}function oD(){const[e,t]=J();return(0,De.jsx)(Bi,{children:(0,De.jsxs)("div",{className:"grid w-full",children:[(0,De.jsx)(xw,{variant:"header",children:(0,De.jsx)(Vi,{level:3,children:"Embed"})}),(0,De.jsx)(YN,{}),(0,De.jsxs)("div",{className:"flex flex-col px-6 py-8 w-full gap-10",children:[(0,De.jsx)(nD,{calendar:e,setCalendar:t}),(0,De.jsx)(rD,{calendar:e,setCalendar:t}),(0,De.jsx)(tD,{calendar:e,setCalendar:t})]})]})})}const aD=window.wp.components;function sD({calendar:t,setCalendar:n}){const[r,o]=(0,e.useState)();return(0,De.jsxs)(xw,{className:"p-0",children:[(0,De.jsx)(dy,{htmlFor:"color",children:"Color"}),(0,De.jsxs)(Hv,{children:[(0,De.jsxs)(Vv,{className:"flex gap-4 items-center h-10 w-[150px] rounded-md border border-input bg-background shadow-none px-3 py-2 text-sm ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",children:[(0,De.jsx)("div",{style:{backgroundColor:t?.color},className:"flex rounded-full w-5 h-5"}),t?.color]}),(0,De.jsx)(Bv,{align:"start",className:"w-[250px] z-[900]",children:(0,De.jsx)(aD.ColorPicker,{color:t?.color,onChange:e=>{n((t=>({...t,color:e})))},enableAlpha:!1,defaultValue:eventkoi_params.default_color})})]}),(0,De.jsx)("div",{className:"text-muted-foreground",children:"Used for accent colors in your calendar."})]})}eventkoi_params.default_color;const iD=[{value:"current",label:"Current month"},{value:"january",label:"January"},{value:"february",label:"February"},{value:"march",label:"March"},{value:"april",label:"April"},{value:"may",label:"May"},{value:"june",label:"June"},{value:"july",label:"July"},{value:"august",label:"August"},{value:"september",label:"September"},{value:"october",label:"October"},{value:"november",label:"November"},{value:"december",label:"December"}];function lD({calendar:e,setCalendar:t}){const{settings:n}=Re(),r=(e,n)=>{t((t=>({...t,[e]:n})))},o=(new Date).getFullYear(),a=[{value:"current",label:`Current year (${o})`},...Array.from({length:10},((e,t)=>{const n=o+t+1;return{value:String(n),label:String(n)}}))];return"list"===e?.display?null:(0,De.jsx)(xw,{className:"p-0",children:(0,De.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-10",children:[(0,De.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,De.jsx)(dy,{htmlFor:"default_month",children:"Default month to display"}),(0,De.jsxs)(Ib,{value:e?.default_month||"current",onValueChange:e=>r("default_month",e),children:[(0,De.jsx)(Lb,{id:"default_month",className:"w-full max-w-[250px]",children:(0,De.jsx)(Pb,{placeholder:"Select a month"})}),(0,De.jsx)(Hb,{children:iD.map((e=>(0,De.jsx)(Vb,{value:e.value,children:e.label},e.value)))})]}),(0,De.jsx)("p",{className:"text-sm text-muted-foreground",children:"Select the month visitors see when they first view the calendar."})]}),(0,De.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,De.jsx)(dy,{htmlFor:"default_year",children:"Default year to display"}),(0,De.jsxs)(Ib,{value:e?.default_year||"current",onValueChange:e=>r("default_year",e),children:[(0,De.jsx)(Lb,{id:"default_year",className:"w-full max-w-[250px]",children:(0,De.jsx)(Pb,{placeholder:"Select a year"})}),(0,De.jsx)(Hb,{children:a.map((e=>(0,De.jsx)(Vb,{value:e.value,children:e.label},e.value)))})]}),(0,De.jsx)("p",{className:"text-sm text-muted-foreground",children:"Select the year visitors see when they first view the calendar."})]})]})})}function cD({calendar:t,setCalendar:n}){const r=(0,e.useRef)(null),[o,a]=(0,e.useState)(!1),s=e=>{var t=e.currentTarget.textContent.trim();n((e=>({...e,name:t}))),t?(e.currentTarget.classList.remove("eventkoi-error"),a(!1)):(e.currentTarget.classList.add("eventkoi-error"),a(!0))};return(0,e.useEffect)((()=>{r.current&&0===t.name?.length&&r.current.focus()}),[]),(0,De.jsxs)(xw,{className:"flex-row items-center flex-wrap gap-y-1",children:[(0,De.jsx)("div",{ref:r,id:"calendar-name",className:"inline-flex rounded-md items-center px-2 py-1 cursor-pointer font-medium text-lg border-2 border-transparent hover:border-input focus:border-input active:border-input",contentEditable:!0,spellCheck:!1,placeholder:"Enter calendar name",dangerouslySetInnerHTML:{__html:t?.name},onBlur:e=>s(e),onKeyDown:e=>"Enter"===e.key&&s(e)}),(0,De.jsxs)("div",{onClick:()=>{(e=>{var t,n;document.createRange?((t=document.createRange()).selectNodeContents(e),t.collapse(!1),(n=window.getSelection()).removeAllRanges(),n.addRange(t)):document.selection&&((t=document.body.createTextRange()).moveToElementText(e),t.collapse(!1),t.select())})(document.getElementById("calendar-name")),r.current.focus()},className:"cursor-pointer inline-flex items-center gap-x-1",children:[(0,De.jsx)(CC,{className:"w-3.5 h-3.5 text-ring"}),(0,De.jsx)("span",{className:"text-xs",children:"Click to edit"})]}),o&&(0,De.jsx)("p",{className:"w-full text-xs text-[#d13d3d]",children:"Calendar name cannot be blank"})]})}function dD({calendar:e,setCalendar:t}){let n=e.name?e.name.replace(/\s+/g,"-").toLowerCase():"";return(0,De.jsxs)(xw,{className:"p-0",children:[(0,De.jsx)(dy,{htmlFor:"slug",children:"Slug"}),(0,De.jsx)(Uv,{type:"text",id:"slug",value:e.slug?e.slug:n,placeholder:"Address",className:"max-w-[422px]",onChange:e=>{t((t=>({...t,slug:e.target.value})))}}),(0,De.jsxs)("div",{className:"text-muted-foreground",children:["Define the URL of your calendar",(0,De.jsx)("br",{}),(0,De.jsxs)(De.Fragment,{children:["(e.g. ",eventkoi_params.default_cal_url,e.slug?e.slug:n,")"]})]})]})}function uD(){const[e,t]=J();return(0,De.jsx)(Bi,{children:(0,De.jsxs)("div",{className:"grid w-full",children:[(0,De.jsx)(cD,{calendar:e,setCalendar:t}),(0,De.jsx)(YN,{}),(0,De.jsxs)("div",{className:"flex flex-col px-6 py-8 w-full gap-10",children:[(0,De.jsx)(dD,{calendar:e,setCalendar:t}),(0,De.jsx)(sD,{calendar:e,setCalendar:t}),(0,De.jsx)(qN,{calendar:e,setCalendar:t}),(0,De.jsx)(XN,{calendar:e,setCalendar:t}),(0,De.jsx)(lD,{calendar:e,setCalendar:t}),(0,De.jsx)(JN,{calendar:e,setCalendar:t})]})]})})}const fD=(e,t,n)=>`${e.original.name} ${e.original.slug}`.toLowerCase().includes(n.toLowerCase()),hD=[{id:"select",header:({table:e})=>(0,De.jsx)("div",{className:"flex items-center justify-center min-h-6",children:(0,De.jsx)(mw,{checked:e.getIsAllPageRowsSelected()||e.getIsSomePageRowsSelected()&&"indeterminate",onCheckedChange:t=>e.toggleAllPageRowsSelected(!!t),"aria-label":"Select all rows"})}),cell:({row:e})=>(0,De.jsx)("div",{className:"flex items-center justify-center min-h-6",children:(0,De.jsx)(mw,{checked:e.getIsSelected(),onCheckedChange:t=>e.toggleSelected(!!t),"aria-label":"Select row"})}),enableSorting:!1,enableHiding:!1},{accessorKey:"name",header:({column:e})=>(0,De.jsx)(Qx,{title:"Calendar name",column:e}),cell:function({row:e}){const t=parseInt(e.original.id)===parseInt(eventkoi_params.default_cal),n=`#/calendars/${e.original.id}/main`;return(0,De.jsx)("div",{className:"grid space-y-1",children:(0,De.jsxs)("div",{className:"flex gap-2 items-start text-foreground",children:[(0,De.jsxs)("span",{className:"inline",children:[(0,De.jsx)("a",{href:n,className:"inline font-medium hover:underline hover:decoration-dotted underline-offset-4",children:e.getValue("name")}),(0,De.jsx)("a",{href:e.original.url,target:"_blank",rel:"noopener noreferrer",className:"ms-2 text-muted-foreground hover:text-foreground shrink-0","aria-label":"View public calendar",children:(0,De.jsx)(pw,{className:"w-5 h-5 inline-block"})})]}),t&&(0,De.jsx)(fl,{variant:"outline",className:"font-normal",children:"Default"})]})})},filterFn:fD,sortingFn:"alphanumeric"},{accessorKey:"slug",header:({column:e})=>(0,De.jsx)(Qx,{title:"Slug",column:e}),cell:({row:e})=>(0,De.jsx)("div",{className:"text-foreground",children:e.getValue("slug")}),filterFn:fD,sortingFn:"alphanumeric"},{accessorKey:"shortcode",header:({column:e})=>(0,De.jsx)(Qx,{title:"Shortcode",column:e}),cell:function({row:t}){const n=t.getValue("shortcode"),[r,o]=(0,e.useState)(!1),[a,s]=(0,e.useState)(0);return(0,De.jsxs)("div",{className:"relative text-foreground w-full max-w-[220px]",children:[(0,De.jsx)(Uv,{type:"text",value:n,readOnly:!0,className:"w-full pr-10"}),(0,De.jsx)(aE,{delayDuration:0,children:(0,De.jsxs)(sE,{children:[(0,De.jsx)(iE,{asChild:!0,children:(0,De.jsx)(tl,{variant:"secondary",size:"icon",className:"absolute h-8 right-[5px] top-[4px] border-none cursor-pointer hover:bg-input",onClick:()=>{navigator.clipboard.writeText(n),o(!0),s((e=>e+1)),setTimeout((()=>{o(!1),s((e=>e+1))}),1500)},"aria-label":"Copy shortcode",children:r?(0,De.jsx)(cE,{className:"h-4 w-4 transition-all duration-200"}):(0,De.jsx)(dE,{className:"h-4 w-4 transition-all duration-200"})})}),(0,De.jsx)(lE,{className:"bg-zinc-900 text-white px-3 py-1.5 text-sm rounded-md shadow-lg",side:"top",sideOffset:8,children:r?"Copied!":"Copy shortcode"})]},a)})]})},filterFn:fD,sortingFn:"alphanumeric"},{accessorKey:"count",header:({column:e})=>(0,De.jsx)(Qx,{title:"Events count",column:e}),cell:({row:e})=>(0,De.jsx)("div",{className:"text-foreground text-right",children:e.getValue("count")}),filterFn:fD,sortingFn:"alphanumeric"}];function mD(){const[t,n]=(0,e.useState)([]),[r,o]=(0,e.useState)(!1),[a]=je(),s=async()=>{try{const e=await Ne()({path:`${eventkoi_params.api}/calendars`,method:"get"});n(e)}catch(e){console.error("Failed to load calendars:",e)}finally{o(!1)}};return(0,e.useEffect)((()=>{o(!0),s()}),[a]),(0,De.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,De.jsxs)("div",{className:"mx-auto flex w-full gap-2 justify-between",children:[(0,De.jsx)(Vi,{children:"Calendars"}),(0,De.jsx)(DN,{title:"Add calendar",url:"#",locked:!0})]}),(0,De.jsx)(Kx,{data:t,columns:hD,empty:"No calendars are found.",base:"calendars",hideStatusFilters:!0,isLoading:r,fetchResults:s,hideCategories:!0,hideDateRange:!0}),(0,De.jsx)(ol,{headline:"Upgrade now to add multiple calendars",className:"my-8 max-w-2xl"})]})}const pD=[{name:"default",title:"Default settings"},{name:"integrations",title:"API & integrations"}];function gD({settings:e,setSettings:t,location:n}){var r=n.pathname?.split("/"),o=r[2];const a="font-medium px-3 py-3 rounded-lg text-foreground bg-foreground/5";return(0,De.jsx)("nav",{className:"grid gap-1 text-sm text-muted-foreground",children:pD.map((function(e,t){let n="font-medium px-3 py-3 rounded-lg";return r&&o&&o===e.name&&(n=a),r&&!o&&"default"===e.name&&(n=a),(0,De.jsx)(Se,{to:e.name,className:n,children:e.title},`setting-tab-${t}`)}))})}function vD(){const t=Y(),[n,r]=(0,e.useState)(null);(0,e.useEffect)((()=>{(async()=>{try{const e=await Ne()({path:`${eventkoi_params.api}/settings`,method:"get",headers:{"EVENTKOI-API-KEY":eventkoi_params.api_key}});r(e),console.log(e)}catch(e){console.error("Failed to load settings:",e)}})()}),[]);const o=(0,e.useMemo)((()=>[n,r]),[n]);return(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)(Li,{root:"settings"}),(0,De.jsxs)(Fi,{className:"max-w-[1180px]",children:[(0,De.jsxs)("div",{className:Ni("w-full mx-auto items-start gap-6","grid grid-cols-1 md:grid-cols-[180px_1fr]"),children:[(0,De.jsx)(gD,{settings:n,setSettings:r,location:t}),(0,De.jsx)("div",{className:"grid",children:n?(0,De.jsx)(de,{context:o}):(0,De.jsx)("div",{className:"p-8 text-muted-foreground",children:"Loading settings…"})})]}),(0,De.jsx)("div",{className:"h-10"})]})]})}function yD(){const[t,n]=(0,e.useState)(!1),[r,o]=(0,e.useState)(null);return(0,De.jsx)(Bi,{children:(0,De.jsxs)("div",{className:"grid w-full",children:[(0,De.jsx)(xw,{variant:"header",children:(0,De.jsx)(Vi,{level:3,children:"EventKoi API"})}),(0,De.jsx)(YN,{}),(0,De.jsxs)(xw,{className:"gap-6",children:[(0,De.jsxs)("div",{className:"space-y-2",children:[(0,De.jsx)(dy,{children:"Developer API key"}),(0,De.jsxs)("p",{className:"text-sm text-muted-foreground",children:["This key is kept private and is not displayed. You may regenerate it below if needed. The new key will be shown"," ",(0,De.jsx)("strong",{children:"only once"}),", so please copy it immediately."]})]}),r&&(0,De.jsx)("div",{className:"bg-muted/40 border border-muted rounded px-3 py-2",children:(0,De.jsx)("code",{className:"bg-transparent text-sm break-all",children:r})}),(0,De.jsx)("div",{className:"inline-flex",children:(0,De.jsx)(tl,{variant:"default",onClick:async()=>{try{n(!0);const e=await Ne()({path:`${eventkoi_params.api}/settings`,method:"POST",data:{api_key:"refresh"},headers:{"EVENTKOI-API-KEY":eventkoi_params.api_key}});e?.api_key?(o(e.api_key),gp({message:"API key regenerated successfully."})):vp("Unexpected response.")}catch(t){var e;vp(null!==(e=t?.message)&&void 0!==e?e:"Something went wrong.")}finally{n(!1)}},disabled:t,className:"w-48",children:t?"Regenerating...":"Regenerate API key"})})]})]})})}function bD({settings:t,setSettings:n}){var r;const[o,a]=(0,e.useState)(!1),[s,i]=(0,e.useState)(!1);let l;return l=t?.gmap_connection_status?s?"Testing...":"Test connection":s?"Connecting...":"Connect",(0,De.jsx)(Bi,{children:(0,De.jsxs)("div",{className:"grid w-full",children:[(0,De.jsx)(xw,{variant:"header",children:(0,De.jsx)(Vi,{level:3,children:"Google maps"})}),(0,De.jsx)(YN,{}),(0,De.jsxs)(xw,{className:"gap-6",children:[(0,De.jsxs)(MS,{className:"flex gap-x-8 bg-gray-50",children:[(0,De.jsx)(OS,{children:"You need an API key from Google to integrate Google maps. Follow this doc to generate API key."}),(0,De.jsx)(tl,{variant:"outline",onClick:()=>{window.open("https://developers.google.com/maps/documentation/javascript/get-api-key","_blank")},children:"View doc"})]}),(0,De.jsxs)("div",{className:"flex flex-col items-start gap-1.5",children:[(0,De.jsx)(dy,{htmlFor:"ek-gmap-api-key",children:"Google API key"}),(0,De.jsx)(Uv,{type:"password",id:"ek-gmap-api-key",value:null!==(r=t?.gmap_api_key)&&void 0!==r?r:"",placeholder:"Enter your API key",disabled:t?.gmap_connection_status,className:"",onChange:e=>{n((t=>({...t,gmap_api_key:e.target.value})))}})]}),(0,De.jsxs)("div",{className:"inline-flex gap-2",children:[(0,De.jsx)(tl,{variant:"default",onClick:async()=>{try{i(!0),await(async e=>{const t=`https://maps.googleapis.com/maps/api/geocode/json?address=New+York&key=${e}`,n=await fetch(t),r=await n.json();var o;if("OK"!==r.status)throw new Error(null!==(o=r?.error_message)&&void 0!==o?o:"Invalid API Key.");return r})(t?.gmap_api_key);const e=await Ne()({path:`${eventkoi_params.api}/settings`,method:"post",data:{gmap_api_key:t?.gmap_api_key,gmap_connection_status:!0},headers:{"EVENTKOI-API-KEY":t?.api_key}});n(e.settings),i(!1),gp({...e,message:"API successfully connected."})}catch(t){var e;vp(null!==(e=t?.message)&&void 0!==e?e:"Something wrong.")}finally{i(!1)}},disabled:s||!t?.gmap_api_key||o,className:"w-40",children:l}),t?.gmap_connection_status&&(0,De.jsx)(tl,{variant:"link",onClick:async()=>{try{a(!0);const e=await Ne()({path:`${eventkoi_params.api}/settings`,method:"post",data:{gmap_api_key:null,gmap_connection_status:!1},headers:{"EVENTKOI-API-KEY":eventkoi_params.api_key}});n(e.settings),a(!1),gp({...e,message:"API key removed."})}catch(t){var e;vp(null!==(e=t?.message)&&void 0!==e?e:"Something wrong.")}finally{a(!1)}},disabled:o||s,className:"w-40",children:o?"Removing...":"Remove API Key"})]})]})]})})}function xD(){const[e,t]=J();return(0,De.jsxs)("div",{className:"grid gap-8",children:[(0,De.jsx)(yD,{settings:e,setSettings:t}),(0,De.jsx)(bD,{settings:e,setSettings:t})]})}const wD=["Mo","Tu","We","Th","Fr","Sa","Su"],kD={0:"Monday",1:"Tuesday",2:"Wednesday",3:"Thursday",4:"Friday",5:"Saturday",6:"Sunday"};function SD(){const{settings:t,refreshSettings:n}=Re(),[r,o]=(0,e.useState)(!1),[a,s]=(0,e.useState)(t?.time_format||"12");(0,e.useEffect)((()=>{t?.time_format&&t.time_format!==a&&s(t.time_format)}),[t?.time_format]);const i=(0,e.useMemo)((()=>Array.isArray(t?.working_days)?t.working_days.map((e=>parseInt(e,10))):[0,1,2,3,4]),[t?.working_days]),l=(0,e.useMemo)((()=>void 0!==t?.week_starts_on?parseInt(t.week_starts_on,10):0),[t?.week_starts_on]),c=(0,e.useMemo)((()=>[...wD.slice(l),...wD.slice(0,l)]),[l]),d=async e=>{try{o(!0);const t=await Ne()({path:`${eventkoi_params.api}/settings`,method:"post",data:e,headers:{"EVENTKOI-API-KEY":eventkoi_params.api_key}});await n(),gp({...t,message:"Settings updated."})}catch(e){var t;vp(null!==(t=e?.message)&&void 0!==t?t:"Failed to update setting.")}finally{o(!1)}};return(0,De.jsx)("div",{className:"grid gap-8",children:(0,De.jsx)(Bi,{children:(0,De.jsxs)("div",{className:"grid w-full",children:[(0,De.jsx)(xw,{variant:"header",children:(0,De.jsx)(Vi,{level:3,children:"General Settings"})}),(0,De.jsx)(YN,{}),(0,De.jsxs)(xw,{className:"gap-10",children:[(0,De.jsxs)("div",{className:"grid gap-2",children:[(0,De.jsx)(dy,{htmlFor:"week-start",children:"Week starts on"}),(0,De.jsxs)(Ib,{value:String(l),onValueChange:e=>{const t=parseInt(e,10);isNaN(t)||d({week_starts_on:t})},disabled:r,children:[(0,De.jsx)(Lb,{id:"week-start",className:"w-[250px]",children:(0,De.jsx)(Pb,{placeholder:"Select a day"})}),(0,De.jsx)(Hb,{children:Object.entries(kD).map((([e,t])=>(0,De.jsx)(Vb,{value:e,children:t},`option-${e}`)))})]}),(0,De.jsx)("div",{className:"text-muted-foreground",children:"Select the day calendars use as the start of the week."})]}),(0,De.jsxs)("div",{className:"grid gap-2",children:[(0,De.jsx)(dy,{className:"text-sm font-medium",children:"Working days"}),(0,De.jsx)("div",{className:"flex items-center gap-4 flex-wrap",children:c.map(((e,t)=>{const n=(l+t)%7;return(0,De.jsx)(tl,{type:"button",size:"sm",variant:i.includes(n)?"default":"secondary",className:Ni("rounded-full w-9 h-9 p-0 transition-none text-smm font-medium",i.includes(n)?"bg-foreground text-background":"bg-secondary border border-input text-foreground/80"),onClick:()=>(e=>{const t=i.includes(e)?i.filter((t=>t!==e)):[...i,e].sort();d({working_days:t})})(n),children:e},e)}))}),(0,De.jsx)("div",{className:"text-muted-foreground",children:"Select your working days. These are used for recurring event rules."})]}),(0,De.jsxs)("div",{className:"grid gap-2",children:[(0,De.jsx)(dy,{className:"text-sm font-medium",children:"Time format"}),(0,De.jsx)(SN,{value:a,onValueChange:e=>{s(e),e!==t?.time_format&&d({time_format:e})},className:"w-[350px]",children:(0,De.jsxs)(CN,{className:"border border-input rounded-lg w-full flex",children:[(0,De.jsx)(_N,{value:"12",className:"flex-1 rounded-lg text-center",children:"12-hour (AM/PM) clock"}),(0,De.jsx)(_N,{value:"24",className:"flex-1 rounded-lg text-center",children:"24-hour clock"})]})}),(0,De.jsx)("div",{className:"text-muted-foreground",children:"Select how event times are displayed (e.g. 2:00 PM or 14:00)."})]})]})]})})})}const CD=Mi("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);function _D({isEvent:t=!1,isCalendar:n=!1}){const r=Y(),[o,a]=(0,e.useState)(!1),s=r.pathname.split("events/");if(s[1]&&(parseInt(s[1])>0||s[1].includes("add"))&&(t=!0),t)return null;const i=r.pathname.split("calendars/");return i[1]&&(parseInt(i[1])>0||i[1].includes("add"))&&(n=!0),n?null:(0,De.jsxs)("header",{className:Ni("relative bg-white shadow-sm md:shadow-none md:bg-transparent border-b px-4 py-4 md:py-2 text-sm",t&&"sticky top-8 z-[500] bg-muted h-20 shadow-sm border-none"),children:[(0,De.jsxs)("div",{className:"flex items-center justify-between md:justify-start gap-6",children:[(0,De.jsx)(Ai,{}),(0,De.jsx)("button",{onClick:()=>a(!o),className:"md:hidden text-muted-foreground focus:outline-none",children:o?(0,De.jsx)(IS,{className:"w-6 h-6"}):(0,De.jsx)(CD,{className:"w-6 h-6"})}),(0,De.jsx)("div",{className:"hidden md:flex",children:(0,De.jsx)(Ii,{tabs:Pi.main})}),(0,De.jsxs)("div",{className:"hidden md:flex ml-auto items-center gap-2",children:[(0,De.jsxs)("a",{href:"https://eventkoi.com/docs/",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-3 py-1.5 text-muted-foreground hover:text-foreground transition-colors",children:[(0,De.jsx)(il,{className:"w-4 h-4"}),(0,De.jsx)("span",{children:"Read docs"})]}),(0,De.jsxs)("a",{href:"https://eventkoi.com/docs/request-support/",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-3 py-1.5 text-muted-foreground hover:text-foreground transition-colors",children:[(0,De.jsx)(ll,{className:"w-4 h-4"}),(0,De.jsx)("span",{children:"Request support"})]})]})]}),o&&(0,De.jsxs)("div",{className:"md:hidden mt-4 space-y-4",children:[(0,De.jsx)(Ii,{tabs:Pi.main}),(0,De.jsxs)("div",{className:"flex flex-col gap-2 pt-4 border-t",children:[(0,De.jsxs)("a",{href:"https://eventkoi.com/docs/",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-0 md:px-3 py-1.5 text-muted-foreground hover:text-foreground transition-colors",children:[(0,De.jsx)(il,{className:"w-4 h-4"}),(0,De.jsx)("span",{children:"Read docs"})]}),(0,De.jsxs)("a",{href:"https://eventkoi.com/docs/request-support/",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-0 md:px-3 py-1.5 text-muted-foreground hover:text-foreground transition-colors",children:[(0,De.jsx)(ll,{className:"w-4 h-4"}),(0,De.jsx)("span",{children:"Request support"})]})]})]})]})}var jD=["light","dark"],ED=e.createContext(void 0),ND={setTheme:e=>{},themes:[]};e.memo((({forcedTheme:t,storageKey:n,attribute:r,enableSystem:o,enableColorScheme:a,defaultTheme:s,value:i,attrs:l,nonce:c})=>{let d="system"===s,u="class"===r?`var d=document.documentElement,c=d.classList;c.remove(${l.map((e=>`'${e}'`)).join(",")});`:`var d=document.documentElement,n='${r}',s='setAttribute';`,f=a?jD.includes(s)&&s?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${s}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",h=(e,t=!1,n=!0)=>{let o=i?i[e]:e,s=t?e+"|| ''":`'${o}'`,l="";return a&&n&&!t&&jD.includes(e)&&(l+=`d.style.colorScheme = '${e}';`),"class"===r?l+=t||o?`c.add(${s})`:"null":o&&(l+=`d[s](n,${s})`),l},m=t?`!function(){${u}${h(t)}}()`:o?`!function(){try{${u}var e=localStorage.getItem('${n}');if('system'===e||(!e&&${d})){var t='(prefers-color-scheme: dark)',m=window.matchMedia(t);if(m.media!==t||m.matches){${h("dark")}}else{${h("light")}}}else if(e){${i?`var x=${JSON.stringify(i)};`:""}${h(i?"x[e]":"e",!0)}}${d?"":"else{"+h(s,!1,!1)+"}"}${f}}catch(e){}}()`:`!function(){try{${u}var e=localStorage.getItem('${n}');if(e){${i?`var x=${JSON.stringify(i)};`:""}${h(i?"x[e]":"e",!0)}}else{${h(s,!1,!1)};}${f}}catch(t){}}();`;return e.createElement("script",{nonce:c,dangerouslySetInnerHTML:{__html:m}})}));const DD=({...t})=>{const{theme:n="system"}=null!=(r=e.useContext(ED))?r:ND;var r;return(0,De.jsx)(mp,{theme:n,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...t})};function TD(){const{innerWidth:e,innerHeight:t}=window;return{width:e,height:t}}function AD(){const t=Y(),{width:n}=function(){const[t,n]=(0,e.useState)(TD());return(0,e.useEffect)((()=>{function e(){n(TD())}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]),t}(),r=/^\/tickets\/orders\/[0-9a-fA-F-]{36}$/.test(t.pathname)||/^\/events\/\d+/.test(t.pathname)||/^\/calendars\/\d+/.test(t.pathname);let o=0;return n>=960&&(o=160),n<960&&n>780&&(o=32),(0,e.useEffect)((()=>{jQuery(".wp-toolbar").css({backgroundColor:"inherit"});const e=t.pathname?.split("/")?.[1];jQuery("#toplevel_page_eventkoi ul.wp-submenu-wrap li").removeClass("current"),jQuery('#toplevel_page_eventkoi ul.wp-submenu-wrap li a[href*="eventkoi#/'+e+'"]').parent().addClass("current")}),[t]),(0,De.jsxs)("div",{className:"w-full flex flex-col min-h-[calc(100vh-46px)] md:min-h-[calc(100vh-32px)]",children:[(0,De.jsx)(DD,{expand:!0,position:"bottom-right",visibleToasts:2,toastOptions:{unstyled:!0,className:"",style:{right:"1rem",bottom:"1rem"}}}),!r&&(0,De.jsx)(_D,{}),(0,De.jsxs)(he,{children:[(0,De.jsx)(ue,{index:!0,element:(0,De.jsx)(Il,{})}),(0,De.jsxs)(ue,{path:"dashboard",element:(0,De.jsx)(zi,{}),children:[(0,De.jsx)(ue,{index:!0,element:(0,De.jsx)(Ol,{})}),(0,De.jsx)(ue,{path:"overview",element:(0,De.jsx)(Ol,{})}),(0,De.jsx)(ue,{path:"*",element:(0,De.jsx)(Il,{})})]}),(0,De.jsxs)(ue,{path:"events",element:(0,De.jsx)(Pl,{}),children:[(0,De.jsx)(ue,{index:!0,element:(0,De.jsx)(MN,{})}),(0,De.jsx)(ue,{path:"",element:(0,De.jsx)(MN,{})}),(0,De.jsx)(ue,{path:"templates",element:(0,De.jsx)(ON,{})})]}),(0,De.jsxs)(ue,{path:"events/:id",element:(0,De.jsx)(Ep,{}),children:[(0,De.jsx)(ue,{path:"main",element:(0,De.jsx)(NN,{})}),(0,De.jsx)(ue,{path:"instances",element:(0,De.jsx)(vS,{})}),(0,De.jsx)(ue,{path:"instances/edit/:timestamp",element:(0,De.jsx)(DC,{})})]}),(0,De.jsxs)(ue,{path:"calendars",element:(0,De.jsx)(IN,{}),children:[(0,De.jsx)(ue,{index:!0,element:(0,De.jsx)(mD,{})}),(0,De.jsx)(ue,{path:"",element:(0,De.jsx)(mD,{})})]}),(0,De.jsxs)(ue,{path:"calendars/:id",element:(0,De.jsx)(BN,{}),children:[(0,De.jsx)(ue,{path:"main",element:(0,De.jsx)(uD,{})}),(0,De.jsx)(ue,{path:"details",element:(0,De.jsx)(eD,{})}),(0,De.jsx)(ue,{path:"embed",element:(0,De.jsx)(oD,{})})]}),(0,De.jsxs)(ue,{path:"settings",element:(0,De.jsx)(vD,{}),children:[(0,De.jsx)(ue,{index:!0,element:(0,De.jsx)(SD,{})}),(0,De.jsx)(ue,{path:"default",element:(0,De.jsx)(SD,{})}),(0,De.jsx)(ue,{path:"integrations",element:(0,De.jsx)(xD,{})})]}),(0,De.jsx)(ue,{path:"*",element:(0,De.jsx)(Il,{})})]})]})}const RD=document.getElementById("eventkoi-admin");RD&&(0,a.H)(RD).render((0,De.jsx)(xe,{children:(0,De.jsx)(Me,{children:(0,De.jsx)(AD,{})})}));const MD=window.wp.blocks,OD=("undefined"!=typeof window&&window.eventkoi_params?window.eventkoi_params.locale:"en").split("_")[0],ID=Array.from({length:12},((e,t)=>new Intl.DateTimeFormat(OD,{month:"short"}).format(new Date(2e3,t,1))));function PD({calendarApi:t,currentDate:n,setCurrentDate:r}){const[o,a]=(0,e.useState)(!1),s=t?.view?.calendar?.getOption("timeZone")||"UTC";let i=n instanceof Date?n:new Date(n);isNaN(i)&&(i=new Date);const l=vs.fromJSDate(i,{zone:s}),c=l.year,d=l.month-1;return(0,De.jsxs)(Hv,{open:o,onOpenChange:a,children:[(0,De.jsx)(Vv,{asChild:!0,children:(0,De.jsxs)(tl,{variant:"ghost",className:"text-sm box-border text-foreground bg-background shadow-none rounded border-[1px] border-border border-solid px-3 py-1 pr-2 gap-2 h-10 justify-between hover:bg-muted cursor-pointer font-normal",children:[`${ID[d]} ${c}`,(0,De.jsx)(Oi,{className:"h-4 w-4 min-w-4"})]})}),(0,De.jsxs)(Bv,{side:"bottom",align:"start",sideOffset:20,className:"w-[240px] rounded border bg-white shadow-[0_0_4px_#bbb] text-sm overflow-hidden",children:[(0,De.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,De.jsx)(tl,{variant:"ghost",size:"icon",onClick:()=>{const e=l.minus({years:1}).startOf("month").toJSDate();t.gotoDate(e),r(e)},className:"bg-transparent p-0 text-[1px] text-foreground border-none shadow-none cursor-pointer hover:bg-muted h-8",children:(0,De.jsx)(Hl,{className:"w-4 h-4"})}),(0,De.jsx)("div",{className:"text-sm font-medium",children:c}),(0,De.jsx)(tl,{variant:"ghost",size:"icon",onClick:()=>{const e=l.plus({years:1}).startOf("month").toJSDate();t.gotoDate(e),r(e)},className:"bg-transparent p-0 text-[1px] text-foreground border-none shadow-none cursor-pointer hover:bg-muted h-8",children:(0,De.jsx)(zl,{className:"w-4 h-4"})})]}),(0,De.jsx)("div",{className:"grid grid-cols-4 gap-2",children:ID.map(((e,n)=>(0,De.jsx)(tl,{variant:"ghost",className:Ni("text-sm font-medium bg-transparent text-foreground border-none shadow-none cursor-pointer hover:bg-muted",n===d&&"bg-muted text-foreground font-semibold"),onClick:()=>(e=>{const n=vs.fromObject({year:c,month:e+1,day:1},{zone:s}).toJSDate();t.gotoDate(n),r(n),a(!1)})(n),children:e},e)))})]})]})}function LD({calendarApi:e,currentDate:t,setCurrentDate:n}){return(0,De.jsxs)("div",{className:"flex items-center gap-2",children:[(0,De.jsx)(tl,{variant:"outline",size:"icon",className:"text-[1px] box-border p-0 w-10 h-10 border-solid shadow-none cursor-pointer rounded",onClick:()=>e?.prev(),children:(0,De.jsx)(Hl,{className:"w-4 h-4"})}),(0,De.jsx)(tl,{variant:"outline",size:"icon",className:"text-[1px] box-border p-0 w-10 h-10 border-solid shadow-none cursor-pointer rounded",onClick:()=>e?.next(),children:(0,De.jsx)(zl,{className:"w-4 h-4"})})]})}function FD({inputRef:e,search:t,setSearch:n,open:r,setOpen:o,filteredResults:a,paginatedResults:s,totalPages:i,page:l,setPage:c,timezone:d,timeFormat:u,setSearchOpen:f}){return(0,De.jsxs)("div",{className:"relative w-full lg:min-w-[350px]",children:[(0,De.jsx)(Uv,{ref:e,placeholder:"Search events…",value:t,onFocus:()=>o(!0),onBlur:()=>{setTimeout((()=>{o(!1),f?.(!1)}),150)},onChange:e=>n(e.target.value),className:"pl-9 h-10 w-full shadow-none border border-solid box-border rounded",autoComplete:"off"}),(0,De.jsx)("span",{className:"absolute inset-y-0 left-3 flex items-center text-muted-foreground pointer-events-none",children:(0,De.jsx)($v,{className:"w-4 h-4"})}),r&&t&&(0,De.jsx)(lj,{className:Ni("absolute z-50 left-0 top-12 w-full rounded-md border bg-popover text-popover-foreground shadow-md border-border border-solid","max-h-[400px] h-auto"),children:(0,De.jsx)(dj,{className:"p-2 max-h-[400px] overflow-y-auto",children:0===a.length?(0,De.jsx)(uj,{className:"p-4 text-muted-foreground text-sm",children:"No events found."}):(0,De.jsxs)(De.Fragment,{children:[s.map((e=>(0,De.jsxs)(mj,{value:e.title,onMouseDown:t=>{t.preventDefault(),window.open(e.url,"_blank","noopener,noreferrer"),o(!1),f?.(!1)},className:"grid gap-1 p-2 cursor-pointer text-sm text-foreground rounded-md hover:!bg-accent",children:[(0,De.jsx)("span",{className:"font-normal block",children:vs.fromISO(e.start_date||e.start,{zone:"utc"}).setZone(d).toFormat("24"===u?"d MMM yyyy, EEE • HH:mm":"d MMM yyyy, EEE • h:mma").replace("AM","am").replace("PM","pm")}),(0,De.jsx)("span",{className:"font-medium",children:e.title})]},e.id))),i>1&&(0,De.jsxs)("div",{className:"flex justify-between items-center px-2 pt-2 text-xs text-muted-foreground",children:[(0,De.jsx)(tl,{variant:"ghost",size:"sm",onMouseDown:e=>{e.preventDefault(),c((e=>Math.max(0,e-1)))},disabled:0===l,className:"cursor-pointer box-border border-none text-foreground bg-transparent shadow-none",children:"Prev"}),(0,De.jsxs)("span",{children:["Page ",l+1," of ",i]}),(0,De.jsx)(tl,{variant:"ghost",size:"sm",onMouseDown:e=>{e.preventDefault(),c((e=>Math.min(i-1,e+1)))},disabled:l>=i-1,className:"cursor-pointer box-border border-none text-foreground bg-transparent shadow-none",children:"Next"})]})]})})})]})}function zD({calendarApi:e,setCurrentDate:t,isTodayInRange:n}){return(0,De.jsx)(tl,{variant:"outline",className:Ni("border-solid box-border font-normal shadow-none cursor-pointer","rounded disabled:opacity-100 disabled:bg-background disabled:text-muted-foreground/50 text-foreground"),disabled:n,onClick:()=>{e&&(e.today(),t(e.getDate()))},children:"Today"})}var HD="Toggle",VD=e.forwardRef(((e,t)=>{const{pressed:n,defaultPressed:r,onPressedChange:o,...a}=e,[s,i]=Yl({prop:n,onChange:o,defaultProp:r??!1,caller:HD});return(0,De.jsx)(wl.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:t,onClick:Bl(e.onClick,(()=>{e.disabled||i(!s)}))})}));VD.displayName=HD;var BD=VD,WD="ToggleGroup",[UD,$D]=Wl(WD,[Du]),GD=Du(),YD=e.forwardRef(((e,t)=>{const{type:n,...r}=e;if("single"===n){const e=r;return(0,De.jsx)(KD,{...e,ref:t})}if("multiple"===n){const e=r;return(0,De.jsx)(QD,{...e,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${WD}\``)}));YD.displayName=WD;var[qD,ZD]=UD(WD),KD=e.forwardRef(((t,n)=>{const{value:r,defaultValue:o,onValueChange:a=()=>{},...s}=t,[i,l]=Yl({prop:r,defaultProp:o??"",onChange:a,caller:WD});return(0,De.jsx)(qD,{scope:t.__scopeToggleGroup,type:"single",value:e.useMemo((()=>i?[i]:[]),[i]),onItemActivate:l,onItemDeactivate:e.useCallback((()=>l("")),[l]),children:(0,De.jsx)(eT,{...s,ref:n})})})),QD=e.forwardRef(((t,n)=>{const{value:r,defaultValue:o,onValueChange:a=()=>{},...s}=t,[i,l]=Yl({prop:r,defaultProp:o??[],onChange:a,caller:WD}),c=e.useCallback((e=>l(((t=[])=>[...t,e]))),[l]),d=e.useCallback((e=>l(((t=[])=>t.filter((t=>t!==e))))),[l]);return(0,De.jsx)(qD,{scope:t.__scopeToggleGroup,type:"multiple",value:i,onItemActivate:c,onItemDeactivate:d,children:(0,De.jsx)(eT,{...s,ref:n})})}));YD.displayName=WD;var[JD,XD]=UD(WD),eT=e.forwardRef(((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:o=!0,orientation:a,dir:s,loop:i=!0,...l}=e,c=GD(n),d=Kl(s),u={role:"group",dir:d,...l};return(0,De.jsx)(JD,{scope:n,rovingFocus:o,disabled:r,children:o?(0,De.jsx)(Fu,{asChild:!0,...c,orientation:a,dir:d,loop:i,children:(0,De.jsx)(wl.div,{...u,ref:t})}):(0,De.jsx)(wl.div,{...u,ref:t})})})),tT="ToggleGroupItem",nT=e.forwardRef(((t,n)=>{const r=ZD(tT,t.__scopeToggleGroup),o=XD(tT,t.__scopeToggleGroup),a=GD(t.__scopeToggleGroup),s=r.value.includes(t.value),i=o.disabled||t.disabled,l={...t,pressed:s,disabled:i},c=e.useRef(null);return o.rovingFocus?(0,De.jsx)(zu,{asChild:!0,...a,focusable:!i,active:s,ref:c,children:(0,De.jsx)(rT,{...l,ref:n})}):(0,De.jsx)(rT,{...l,ref:n})}));nT.displayName=tT;var rT=e.forwardRef(((e,t)=>{const{__scopeToggleGroup:n,value:r,...o}=e,a=ZD(tT,n),s={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},i="single"===a.type?s:void 0;return(0,De.jsx)(VD,{...i,...o,ref:t,onPressedChange:e=>{e?a.onItemActivate(r):a.onItemDeactivate(r)}})})),oT=YD,aT=nT;const sT=Xi("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-3",sm:"h-9 px-2.5",lg:"h-11 px-5"}},defaultVariants:{variant:"default",size:"default"}});e.forwardRef((({className:e,variant:t,size:n,...r},o)=>(0,De.jsx)(BD,{ref:o,className:Ni(sT({variant:t,size:n,className:e})),...r}))).displayName=BD.displayName;const iT=e.createContext({size:"default",variant:"default"}),lT=e.forwardRef((({className:e,variant:t,size:n,children:r,...o},a)=>(0,De.jsx)(oT,{ref:a,className:Ni("flex items-center justify-center gap-1",e),...o,children:(0,De.jsx)(iT.Provider,{value:{variant:t,size:n},children:r})})));lT.displayName=oT.displayName;const cT=e.forwardRef((({className:t,children:n,variant:r,size:o,...a},s)=>{const i=e.useContext(iT);return(0,De.jsx)(aT,{ref:s,className:Ni(sT({variant:i.variant||r,size:i.size||o}),t),...a,children:n})}));function dT({calendarApi:e,view:t,setView:n}){return(0,De.jsxs)(lT,{type:"single",className:"bg-muted text-foreground gap-2 border border-solid border-border p-[4px] h-10 box-border rounded shadow-none",value:t,onValueChange:t=>{t&&(e?.changeView(t),n(t))},children:[(0,De.jsx)(cT,{value:"dayGridMonth",className:"border-none transition-none cursor-pointer shadow-none h-full rounded-sm text-foreground hover:text-foreground data-[state=on]:bg-white data-[state=on]:font-semibold",children:"Month"}),(0,De.jsx)(cT,{value:"timeGridWeek",className:"border-none transition-none cursor-pointer shadow-none h-full rounded-sm text-foreground hover:text-foreground data-[state=on]:bg-white data-[state=on]:font-semibold",children:"Week"})]})}cT.displayName=aT.displayName;const uT={0:"sunday",1:"monday",2:"tuesday",3:"wednesday",4:"thursday",5:"friday",6:"saturday"};function fT({calendarApi:t,currentDate:n,setCurrentDate:r}){const{startday:o}=eventkoi_params,a=function(e,t){const n=Object.entries(e).find((([e,n])=>n===t));return n?Number(n[0]):void 0}(uT,o),[s,i]=(0,e.useState)(n?new Date(n):new Date),[l,c]=(0,e.useState)(n?new Date(n):new Date);(0,e.useEffect)((()=>{if(n){const e=new Date(n);i(e),c(e)}}),[n]);const d={from:Xe(s,{weekStartsOn:a}),to:Up(s,{weekStartsOn:a})};return(0,De.jsx)(mv,{mode:"single",selected:d,month:l,weekStartsOn:a,onSelect:e=>{e&&e.getTime()!==s.getTime()&&(i(e),c(e),t&&t.gotoDate(e),r&&r(e))},onMonthChange:e=>{const n=e>l,o=Rp(s,e.getMonth());c(e),i(o),t&&t.gotoDate(o),r&&r(o),console.log(n?"➡️ Next button clicked":"⬅️ Prev button clicked"),console.log("Selected new date:",o)},classNames:{day_range_end:"",day_range_middle:"",day_today:"",day_outside:"text-muted-foreground",day_disabled:"",row:"flex w-full mt-2 justify-between [&>*]:flex-1 [&>td:first-child>button]:rounded-l-md [&>td:last-child>button]:rounded-r-md",head_cell:"text-muted-foreground w-9 font-bold text-sm transition-colors",day_selected:"!bg-accent !text-black",cell:"h-9 w-9 p-0",day:"h-9 w-full border-0 [&:not([aria-selected='true'])]:bg-white hover:[&:not([aria-selected='true'])]:bg-accent [&:not([aria-selected='true'])]:rounded-md transition-colors",button:"cursor-pointer",nav_button:"bg-white border-0 h-8 w-10 hover:bg-accent rounded-md transition-colors",nav_icon:"w-2.5 h-2.5"}})}function hT({calendarApi:t,currentDate:n,setCurrentDate:r}){const[o,a]=(0,e.useState)(!1);return(0,De.jsxs)(Hv,{open:o,onOpenChange:a,children:[(0,De.jsx)(Vv,{asChild:!0,children:(0,De.jsxs)(tl,{variant:"ghost",className:"text-sm box-border text-foreground bg-background shadow-none rounded border-[1px] border-border border-solid px-3 py-1 pr-2 gap-2 h-10 justify-between hover:bg-muted cursor-pointer font-normal",children:[t?.view?.title||"",(0,De.jsx)(Oi,{className:"h-4 w-4 min-w-4"})]})}),(0,De.jsx)(Bv,{side:"bottom",align:"start",sideOffset:20,className:"w-auto rounded border bg-white shadow-[0_0_4px_#bbb] text-sm overflow-hidden p-1",children:(0,De.jsx)(fT,{calendarApi:t,currentDate:n,setCurrentDate:r})})]})}function mT(e){const{calendarApi:t,currentDate:n,setCurrentDate:r,view:o,setView:a,isTodayInRange:s,search:i,setSearch:l,open:c,setOpen:d,filteredResults:u,paginatedResults:f,totalPages:h,page:m,setPage:p,timezone:g,timeFormat:v,inputRef:y}=e;return(0,De.jsxs)("div",{className:"hidden lg:flex flex-wrap items-center justify-between text-sm gap-3 w-full",children:[(0,De.jsxs)("div",{className:"flex items-center gap-2",children:[(0,De.jsx)(LD,{calendarApi:t,currentDate:n,setCurrentDate:r}),"timeGridWeek"===o||"week"===o?(0,De.jsx)(hT,{calendarApi:t,currentDate:n,setCurrentDate:r}):(0,De.jsx)(PD,{calendarApi:t,currentDate:n,setCurrentDate:r}),(0,De.jsx)(zD,{calendarApi:t,setCurrentDate:r,isTodayInRange:s}),(0,De.jsx)(FD,{inputRef:y,search:i,setSearch:l,open:c,setOpen:d,filteredResults:u,paginatedResults:f,totalPages:h,page:m,setPage:p,timezone:g,timeFormat:v})]}),(0,De.jsx)(dT,{calendarApi:t,view:o,setView:a})]})}function pT(t){const{calendarApi:n,currentDate:r,setCurrentDate:o,view:a,setView:s,isTodayInRange:i,search:l,setSearch:c,open:d,setOpen:u,filteredResults:f,paginatedResults:h,totalPages:m,page:p,setPage:g,timezone:v,timeFormat:y}=t,[b,x]=(0,e.useState)(!1),w=(0,e.useRef)(null);return(0,De.jsxs)("div",{className:"flex flex-col w-full gap-4 lg:hidden",children:[(0,De.jsxs)("div",{className:"flex justify-between items-center",children:[(0,De.jsx)(zD,{calendarApi:n,setCurrentDate:o,isTodayInRange:i}),(0,De.jsx)(dT,{calendarApi:n,view:a,setView:s})]}),b?(0,De.jsx)("div",{className:"w-full",children:(0,De.jsx)(FD,{inputRef:w,search:l,setSearch:c,open:d,setOpen:u,filteredResults:f,paginatedResults:h,totalPages:m,page:p,setPage:g,timezone:v,timeFormat:y,setSearchOpen:x})}):(0,De.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,De.jsxs)("div",{className:"flex items-center gap-2",children:[(0,De.jsx)(LD,{calendarApi:n,currentDate:r,setCurrentDate:o}),"timeGridWeek"===a||"week"===a?(0,De.jsx)(hT,{calendarApi:n,currentDate:r,setCurrentDate:o}):(0,De.jsx)(PD,{calendarApi:n,currentDate:r,setCurrentDate:o})]}),(0,De.jsx)(tl,{variant:"outline",size:"icon",className:"rounded shadow-sm border border-solid border-border cursor-pointer",onClick:()=>{x(!0),setTimeout((()=>w.current?.focus()),50)},children:(0,De.jsx)($v,{className:"w-4 h-4"})})]})]})}function gT({calendarApi:t,currentDate:n,setCurrentDate:r,view:o,setView:a,search:s,setSearch:i,events:l,timezone:c,timeFormat:d}){const[u,f]=(0,e.useState)(!1),[h,m]=(0,e.useState)(0),p=(0,e.useRef)(null),g=s?l.filter((e=>{const t=s.toLowerCase();return e.title?.toLowerCase().includes(t)||e.description?.toLowerCase().includes(t)||e.location?.toLowerCase().includes(t)})):[],v=Math.ceil(g.length/10),y=g.slice(10*h,10*(h+1));(0,e.useEffect)((()=>m(0)),[s]);const b=(()=>{if(!t)return!1;const e=t.view?.currentStart,n=t.view?.currentEnd,r=new Date;return e<=r&&r<=n})(),x={calendarApi:t,currentDate:n,setCurrentDate:r,view:o,setView:a,isTodayInRange:b,search:s,setSearch:i,open:u,setOpen:f,filteredResults:g,paginatedResults:y,totalPages:v,page:h,setPage:m,timezone:c,timeFormat:d,inputRef:p};return(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)(pT,{...x}),(0,De.jsx)(mT,{...x})]})}function vT({event:e,icon:t,title:n,name:r}){return(0,De.jsxs)("a",{href:"#",className:"flex flex-col gap-1 items-center justify-center no-underline text-sm text-foreground/90 hover:text-foreground group",onClick:t=>{t.preventDefault(),(()=>{const t=encodeURIComponent(e?.url),n=encodeURIComponent(e?.title),o=`RE: ${n}`;"whatsapp"===r&&window.open(`https://api.whatsapp.com/send?text=${n} ${t}`,"_blank"),"x"===r&&window.open(`https://x.com/intent/post?url=${t}&text=${n}`,"_blank"),"facebook"===r&&window.open(`https://www.facebook.com/sharer/sharer.php?u=${t}`,"_blank"),"linkedin"===r&&window.open(`https://www.linkedin.com/shareArticle/?mini=true&url=${t}&text=${n}`,"_blank"),"instagram"===r&&window.open(`https://www.instagram.com/?url=${t}`,"_blank"),"email"===r&&window.open(`mailto:?&subject=${o}&cc=&bcc=&body=${t}`,"_self")})()},children:[(0,De.jsx)("span",{className:"rounded-full bg-accent group-hover:bg-input flex items-center justify-center w-16 h-16",children:t}),(0,De.jsx)("span",{children:n})]})}function yT({width:e=26,height:t=20,className:n,...r}){return(0,De.jsx)(Di.SVG,{xmlns:"http://www.w3.org/2000/svg",width:e,height:t,viewBox:"0 0 29.025 22.935",children:(0,De.jsxs)("g",{transform:"translate(1.741 1.25)",children:[(0,De.jsx)(Di.Path,{d:"M5.554,6H25.989a2.562,2.562,0,0,1,2.554,2.554V23.88a2.562,2.562,0,0,1-2.554,2.554H5.554A2.562,2.562,0,0,1,3,23.88V8.554A2.562,2.562,0,0,1,5.554,6Z",transform:"translate(-3 -6)",fill:"none",stroke:"#000",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2.5"}),(0,De.jsx)(Di.Path,{d:"M28.543,9,15.771,17.94,3,9",transform:"translate(-3 -6.446)",fill:"none",stroke:"#000",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2.5"})]})})}function bT({width:e=30,height:t=30,className:n,...r}){return(0,De.jsx)(Di.SVG,{xmlns:"http://www.w3.org/2000/svg",width:e,height:t,viewBox:"0 0 30.421 30.421",children:(0,De.jsx)(Di.Path,{d:"M30.419,15.3A15.211,15.211,0,1,0,12.83,30.42V19.727H8.971V15.3h3.863V11.93c0-3.835,2.272-5.952,5.745-5.952a23.263,23.263,0,0,1,3.4.3v3.764H20.066a2.206,2.206,0,0,0-2.477,2.392V15.3h4.217l-.673,4.422H17.587V30.418A15.279,15.279,0,0,0,30.419,15.3",transform:"translate(0.002 0.001)"})})}function xT({width:e=28,height:t=28,className:n,...r}){return(0,De.jsx)(Di.SVG,{xmlns:"http://www.w3.org/2000/svg",width:e,height:t,viewBox:"0 0 27.748 27.742",children:(0,De.jsx)(Di.Path,{d:"M13.872,9a7.113,7.113,0,1,0,7.113,7.113A7.1,7.1,0,0,0,13.872,9Zm0,11.737A4.624,4.624,0,1,1,18.5,16.109a4.633,4.633,0,0,1-4.624,4.624ZM22.934,8.705a1.659,1.659,0,1,1-1.659-1.659A1.655,1.655,0,0,1,22.934,8.705Zm4.711,1.684A8.21,8.21,0,0,0,25.4,4.576a8.264,8.264,0,0,0-5.813-2.241c-2.29-.13-9.155-.13-11.446,0A8.252,8.252,0,0,0,2.333,4.57,8.237,8.237,0,0,0,.092,10.383c-.13,2.29-.13,9.155,0,11.446a8.21,8.21,0,0,0,2.241,5.813,8.274,8.274,0,0,0,5.813,2.241c2.29.13,9.155.13,11.446,0A8.21,8.21,0,0,0,25.4,27.641a8.264,8.264,0,0,0,2.241-5.813c.13-2.29.13-9.149,0-11.44Zm-2.959,13.9a4.682,4.682,0,0,1-2.637,2.637c-1.826.724-6.159.557-8.177.557s-6.357.161-8.177-.557a4.682,4.682,0,0,1-2.637-2.637C2.333,22.46,2.5,18.127,2.5,16.109s-.161-6.357.557-8.177A4.682,4.682,0,0,1,5.694,5.294c1.826-.724,6.159-.557,8.177-.557s6.357-.161,8.177.557a4.682,4.682,0,0,1,2.637,2.637c.724,1.826.557,6.159.557,8.177S25.41,22.466,24.686,24.286Z",transform:"translate(0.005 -2.238)"})})}function wT({width:e=25,height:t=25,className:n,...r}){return(0,De.jsx)(Di.SVG,{xmlns:"http://www.w3.org/2000/svg",width:e,height:t,viewBox:"0 0 24.627 24.627",children:(0,De.jsx)(Di.Path,{d:"M5.513,24.627H.407V8.185H5.513ZM2.957,5.943A2.971,2.971,0,1,1,5.914,2.958,2.982,2.982,0,0,1,2.957,5.943ZM24.622,24.627H19.527v-8c0-1.908-.038-4.354-2.655-4.354-2.655,0-3.061,2.072-3.061,4.216v8.141h-5.1V8.185h4.9v2.243h.071A5.365,5.365,0,0,1,18.51,7.773c5.167,0,6.117,3.4,6.117,7.822v9.032Z",transform:"translate(0 -0.001)"})})}function kT({width:e=29,height:t=29,className:n,...r}){return(0,De.jsx)(Di.SVG,{xmlns:"http://www.w3.org/2000/svg",width:e,height:t,viewBox:"0 0 28.555 28.555",children:(0,De.jsx)(Di.Path,{d:"M24.278,6.4A14.155,14.155,0,0,0,2.008,23.475L0,30.805l7.5-1.97a14.107,14.107,0,0,0,6.763,1.721h.006a14.286,14.286,0,0,0,14.284-14.15A14.206,14.206,0,0,0,24.278,6.4ZM14.271,28.173A11.74,11.74,0,0,1,8.28,26.535l-.427-.255L3.4,27.446l1.186-4.341-.28-.446a11.784,11.784,0,1,1,21.856-6.253A11.892,11.892,0,0,1,14.271,28.173Zm6.45-8.809c-.351-.178-2.091-1.033-2.416-1.147s-.561-.178-.8.178-.911,1.147-1.122,1.39-.414.268-.765.089a9.624,9.624,0,0,1-4.812-4.207c-.363-.625.363-.58,1.039-1.931a.655.655,0,0,0-.032-.618c-.089-.178-.8-1.919-1.09-2.626-.287-.688-.58-.593-.8-.606s-.44-.013-.676-.013a1.31,1.31,0,0,0-.943.44,3.973,3.973,0,0,0-1.237,2.951,6.927,6.927,0,0,0,1.44,3.659,15.8,15.8,0,0,0,6.042,5.341c2.244.969,3.123,1.052,4.245.886a3.621,3.621,0,0,0,2.384-1.683,2.957,2.957,0,0,0,.2-1.683C21.308,19.625,21.072,19.536,20.721,19.364Z",transform:"translate(0 -2.25)"})})}function ST({width:e=23,height:t=21,className:n,...r}){return(0,De.jsx)(Di.SVG,{xmlns:"http://www.w3.org/2000/svg",width:e,height:t,viewBox:"0 0 23.006 20.85",children:(0,De.jsx)(Di.Path,{d:"M18.118.75h3.529L13.939,9.582,23.006,21.6h-7.1l-5.56-7.29L3.984,21.6H.454L8.7,12.153,0,.75H7.28l5.025,6.662L18.119.75ZM16.881,19.483h1.956L6.216,2.756H4.12Z",transform:"translate(0 -0.75)"})})}const CT=Mi("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]),_T=Mi("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);function jT(e,t="utc",n,r){const o=n||eventkoi_params?.locale?.replace("_","-")||"en",a=r||eventkoi_params?.time_format||"12",s=vs.fromISO(e,{zone:"utc"===t?"UTC":Ns(t)}).setLocale(o);return"24"===a?s.toFormat("HH:mm"):s.toFormat("h:mma").toLowerCase().replace(":00","")}function ET(e,t="utc",n){const r=n||eventkoi_params?.locale?.replace("_","-")||"en";return vs.fromISO(e,{zone:"utc"===t?"UTC":Ns(t)}).setLocale(r).toLocaleString(vs.DATE_MED)}const NT=(e,t)=>{const n=new Date(e);return t?n.toISOString().split("T")[0].replace(/-/g,""):n.toISOString().replace(/[-:]/g,"").split(".")[0]+"Z"},DT=e=>window.open(e,"_blank","noopener,noreferrer");function TT({event:t,anchor:n,onClose:r,ignoreNextOutsideClick:o,timezone:a="UTC"}){const[s,i]=(0,e.useState)(!1),[l,c]=(0,e.useState)(!1),[d,u]=(0,e.useState)(!1),[f]=(0,e.useState)(n),h=t.location_line,m=(()=>{const e=Ns(a),n=eventkoi_params?.locale?.replace("_","-")||"en",r=eventkoi_params?.time_format||"12",o="standard"===t.date_type&&"continuous"===t.standard_type,s=t.allDay&&!o;if(o||t.start_time&&t.end_time){const o=t.start_real||t.start,a=t.end_real||t.end;return o!==a?`${ET(o,e,n)}, ${jT(o,e,n,r)} – ${ET(a,e,n)}, ${jT(a,e,n,r)}`:`${ET(o,e,n)} – ${jT(a,e,n,r)}`}return s?t.start.split("T")[0]!==t.end.split("T")[0]?`${ET(t.start,e,n)} – ${ET(t.end_real,e,n)}`:ET(t.start,e,n):vs.fromISO(t.start,{zone:e}).hasSame(vs.fromISO(t.end,{zone:e}),"day")?`${ET(t.start,e,n)}, ${jT(t.start,e,n,r)} – ${jT(t.end,e,n,r)}`:`${ET(t.start,e,n)}, ${jT(t.start,e,n,r)} – ${ET(t.end,e,n)}, ${jT(t.end,e,n,r)}`})(),p=()=>{const e=new URL("https://www.google.com/calendar/render");e.searchParams.set("action","TEMPLATE"),e.searchParams.set("text",t.title||""),e.searchParams.set("dates",`${NT(t.start,t.allDay)}/${NT(t.end,t.allDay)}`),e.searchParams.set("details",t.description||""),e.searchParams.set("location",h||""),e.searchParams.set("output","xml"),DT(e.toString())};if((0,e.useEffect)((()=>(document.body.setAttribute("data-calendar-menu-open",d?"true":"false"),()=>{document.body.removeAttribute("data-calendar-menu-open")})),[d]),(0,e.useEffect)((()=>{const e=e=>{"Escape"===e.key&&(e.stopPropagation(),r())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[r]),!t||!f)return null;const g=document.querySelector(".fc");return(0,pe.createPortal)((0,De.jsxs)(De.Fragment,{children:[(0,De.jsxs)("div",{"data-event-popover":!0,className:"absolute z-50 rounded-lg border bg-white shadow-[0_0_4px_#bbb] text-sm overflow-hidden w-[370px] max-w-full",style:{left:`${f.x}px`,top:`${f.y}px`},onMouseDown:e=>{e.target.closest("[data-event-popover]")&&e.stopPropagation()},onClick:e=>{e.target.closest("[data-event-popover]")&&e.stopPropagation()},onPointerDownCapture:e=>{s&&e.stopPropagation()},children:[(0,De.jsxs)("div",{className:"px-4 py-4 pb-0 relative",children:[(0,De.jsxs)("div",{className:"flex absolute right-1 top-1 gap-1",children:[(0,De.jsx)(tl,{size:"icon",variant:"ghost",className:"h-8 w-8 p-0 shadow-none border-none bg-transparent hover:bg-muted/20 cursor-pointer",onClick:()=>window.open(t.url,"_self"),children:(0,De.jsx)(CT,{className:"h-4 w-4"})}),(0,De.jsx)(tl,{size:"icon",variant:"ghost",className:"h-8 w-8 p-0 shadow-none border-none bg-transparent hover:bg-muted/20 cursor-pointer",onClick:r,children:(0,De.jsx)(IS,{className:"h-4 w-4"})})]}),(0,De.jsxs)("div",{className:"flex flex-col gap-2 pe-[58px]",children:[(0,De.jsx)("a",{href:t.url,className:"text-base font-semibold leading-snug text-foreground no-underline hover:underline line-clamp-2 block",children:t.title}),"recurring"===t.date_type&&(0,De.jsx)(fl,{variant:"secondary",className:"w-fit bg-[#eeeeee] hover:bg-[#eeeeee] font-normal",children:"Recurring"})]})]}),(0,De.jsxs)("div",{className:"p-4 flex flex-col gap-3",children:[(0,De.jsxs)("div",{className:"flex items-start gap-2 text-foreground text-sm leading-snug",children:[(0,De.jsx)(Rl,{className:"h-4 w-4 mt-0.5 shrink-0 text-muted-foreground"}),(0,De.jsx)("div",{className:"flex-1",children:m})]}),h&&(0,De.jsxs)("div",{className:"flex items-start gap-2 text-foreground text-sm leading-snug",children:[(0,De.jsx)(Nl,{className:"h-4 w-4 mt-0.5 shrink-0 text-muted-foreground"}),(0,De.jsx)("div",{className:"flex-1",children:h})]}),t.thumbnail&&(0,De.jsx)("img",{src:t.thumbnail,alt:"",className:"w-full h-auto rounded-none border object-cover max-h-48"}),t.description&&(0,De.jsx)("div",{className:"text-sm text-muted-foreground leading-snug line-clamp-3",children:t.description})]}),(0,De.jsxs)("div",{className:"flex justify-between items-center px-4 pb-4 gap-2",children:[(0,De.jsxs)(zm,{open:d,onOpenChange:e=>{u(e),e||(o.current=!0)},children:[(0,De.jsx)(Hm,{asChild:!0,children:(0,De.jsxs)(tl,{size:"sm",variant:"outline",className:"text-[13px] justify-between gap-2 bg-transparent border border-solid border-[#ddd] rounded-sm shadow-none cursor-pointer h-8 min-h-0",onMouseDown:e=>e.stopPropagation(),children:["Add to calendar",(0,De.jsx)(Oi,{className:"w-3.5 h-3.5"})]})}),(0,De.jsxs)($m,{align:"start",className:"w-44",onMouseDown:e=>e.stopPropagation(),children:[(0,De.jsx)(Gm,{onClick:()=>requestAnimationFrame(p),children:"Google Calendar"}),(0,De.jsx)(Gm,{onClick:()=>requestAnimationFrame((()=>DT(eventkoi_params.ical))),children:"iCalendar"}),(0,De.jsx)(Gm,{onClick:()=>requestAnimationFrame((()=>DT("https://outlook.office.com/owa/"))),children:"Outlook 365"}),(0,De.jsx)(Gm,{onClick:()=>requestAnimationFrame((()=>DT("https://outlook.live.com/owa/"))),children:"Outlook Live"})]})]}),(0,De.jsxs)(tl,{size:"sm",variant:"secondary",onClick:()=>i(!0),className:"text-[13px] gap-2 bg-transparent border border-solid border-[#ddd] rounded-sm shadow-none cursor-pointer h-8 min-h-0",children:[(0,De.jsx)(_T,{className:"w-3.5 h-3.5"}),"Share"]})]})]}),(0,De.jsx)(nj,{open:s,onOpenChange:e=>{i(e),document.body.dataset.shareModalOpen=e?"true":"false",e||(o.current=!0)},children:(0,De.jsxs)(aj,{"data-event-share-modal":!0,className:"w-full max-w-[685px] p-0",onOpenAutoFocus:e=>e.preventDefault(),onMouseDown:e=>e.stopPropagation(),onPointerDownOutside:e=>{e.preventDefault(),i(!1),o.current=!0},children:[(0,De.jsx)(sj,{className:"flex items-center justify-center p-4 border-0 border-solid border-b-2 border-input",children:(0,De.jsx)(ij,{className:"font-sans text-xl m-0 text-foreground",children:"Share this event"})}),(0,De.jsxs)("div",{className:"flex flex-col pt-[30px] pb-[60px] px-[60px]",children:[(0,De.jsxs)("div",{className:"flex gap-4 items-center flex-wrap justify-center pb-[60px]",children:[(0,De.jsx)(vT,{event:t,name:"whatsapp",title:"Whatsapp",icon:(0,De.jsx)(kT,{})}),(0,De.jsx)(vT,{event:t,name:"instagram",title:"Instagram",icon:(0,De.jsx)(xT,{})}),(0,De.jsx)(vT,{event:t,name:"email",title:"Email",icon:(0,De.jsx)(yT,{})}),(0,De.jsx)(vT,{event:t,name:"facebook",title:"Facebook",icon:(0,De.jsx)(bT,{})}),(0,De.jsx)(vT,{event:t,name:"x",title:"X",icon:(0,De.jsx)(ST,{})}),(0,De.jsx)(vT,{event:t,name:"linkedin",title:"Linkedin",icon:(0,De.jsx)(wT,{})})]}),(0,De.jsxs)("div",{className:"flex flex-col gap-3 pb-[10px]",children:[(0,De.jsx)(dy,{className:"text-base",children:"Event link"}),(0,De.jsxs)("div",{className:"relative",children:[(0,De.jsx)(Uv,{id:"link",defaultValue:t?.url,readOnly:!0,className:"min-h-[66px] border border-input border-solid border-primary/30 box-border text-lg text-foreground"}),(0,De.jsxs)(tl,{variant:"secondary",type:"button",className:"absolute h-12 right-[9px] top-[9px] border-none cursor-pointer hover:bg-input",onMouseDown:e=>e.stopPropagation(),onClick:()=>{requestAnimationFrame((()=>{navigator.clipboard.writeText(t?.url),c(!0),setTimeout((()=>c(!1)),1200)}))},children:[l?(0,De.jsx)(cE,{className:"mr-2 h-5 w-5"}):(0,De.jsx)(dE,{className:"mr-2 h-5 w-5"}),l?"Copied!":"Copy"]})]})]})]})]})})]}),g||document.body)}function AT({timezone:t,setTimezone:n,timeFormat:r,setTimeFormat:o}){const[a,s]=(0,e.useState)(!1),i=function(){const e=eventkoi_params?.timezone_override||eventkoi_params?.timezone||"UTC",t=[{value:e,label:`Site Default (${xs(e,"24",!1)})`},{value:"local",label:`Local Time (${Intl.DateTimeFormat().resolvedOptions().timeZone})`},{value:"UTC",label:"UTC"}],n=("function"==typeof Intl.supportedValuesOf?Intl.supportedValuesOf("timeZone").map((e=>({value:e,label:e}))):[]).filter((t=>"UTC"!==t.value&&"local"!==t.value&&t.value!==e)).reduce(((e,t)=>{const[n]=t.value.split("/");return e[n]||(e[n]=[]),e[n].push(t),e}),{});Object.keys(n).forEach((e=>{n[e].sort(((e,t)=>e.label.localeCompare(t.label)))}));const r=Object.fromEntries(Object.entries(n).sort((([e],[t])=>e.localeCompare(t))));return{Popular:t,...r}}(),l=function(t=768){const[n,r]=(0,e.useState)(!1);return(0,e.useEffect)((()=>{function e(){r(window.innerWidth<t)}return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[t]),n}();return(0,De.jsxs)(Hv,{open:a,onOpenChange:s,children:[(0,De.jsx)(Vv,{asChild:!0,children:(0,De.jsx)(tl,{variant:"ghost","aria-haspopup":"listbox","aria-expanded":a,"aria-controls":"timezone-listbox","aria-label":`Current timezone: ${xs(t,r)}. Press Enter or Space to change.`,className:"inline-flex bg-transparent border-none cursor-pointer w-auto h-auto p-0 font-normal text-foreground underline",children:xs(t,r)})}),(0,De.jsxs)(Bv,{align:l?"start":"end",className:"p-0 w-[280px] border border-border border-solid border-[1px]",children:[(0,De.jsxs)(lj,{children:[(0,De.jsx)("div",{className:"",children:(0,De.jsx)(SN,{value:r,onValueChange:o,"aria-label":"Time format selection",className:"w-full bg-muted",children:(0,De.jsxs)(CN,{className:"flex bg-muted px-2 gap-2 shadow-none rounded-none",children:[(0,De.jsx)(_N,{value:"12",className:"rounded-sm bg-muted text-foreground hover:text-foreground flex-1 data-[state=active]:font-semibold shadow-none border-none cursor-pointer",children:"12hr (AM/PM)"}),(0,De.jsx)(_N,{value:"24",className:"rounded-sm bg-muted text-foreground hover:text-foreground flex-1 data-[state=active]:font-semibold shadow-none border-none cursor-pointer",children:"24hr"})]})})}),(0,De.jsx)(cj,{placeholder:"Search timezone...",className:"h-auto border-none focus:border-none focus:border-transparent focus:border-[0px] focus:shadow-none"}),(0,De.jsxs)(dj,{id:"timezone-listbox",role:"listbox","aria-label":"Select a timezone",className:"max-h-[300px] overflow-y-auto border-t border-border border-t-[1px] border-solid border-b-0 border-l-0 border-r-0",children:[(0,De.jsx)(uj,{children:"No timezone found."}),Object.entries(i).map((([e,r],o,a)=>(0,De.jsxs)("div",{children:[(0,De.jsx)(fj,{heading:(0,De.jsx)("span",{className:"py-1 text-sm font-medium text-foreground",children:e}),children:r.map((e=>(0,De.jsx)(mj,{role:"option","aria-selected":t===e.value,onSelect:()=>{const t=As(e.value);n(t);const r=new URLSearchParams(window.location.search);r.set("tz",e.value),window.history.replaceState({},"",`?${r}`),s(!1)},className:"cursor-pointer aria-selected:bg-accent aria-selected:text-accent-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none rounded-sm",children:e.label},e.value)))}),o<a.length-1&&(0,De.jsx)(hj,{})]},e)))]})]}),(0,De.jsxs)("span",{className:"sr-only","aria-live":"polite",children:["Selected timezone: ",xs(t,r)]})]})]})}const RT=window.wp.blockEditor;function MT(e){return"Tag"===e||"Monat"===e?"r":"Jahr"===e?"s":""}var OT={code:"de-at",week:{dow:1,doy:4},buttonText:{prev:"Zurück",next:"Vor",today:"Heute",year:"Jahr",month:"Monat",week:"Woche",day:"Tag",list:"Terminübersicht"},weekText:"KW",weekTextLong:"Woche",allDayText:"Ganztägig",moreLinkText:e=>"+ weitere "+e,noEventsText:"Keine Ereignisse anzuzeigen",buttonHints:{prev:e=>`Vorherige${MT(e)} ${e}`,next:e=>`Nächste${MT(e)} ${e}`,today:e=>"Tag"===e?"Heute":`Diese${MT(e)} ${e}`},viewHint:e=>e+("Woche"===e?"n":"Monat"===e?"s":"es")+"ansicht",navLinkHint:"Gehe zu $0",moreLinkHint:e=>"Zeige "+(1===e?"ein weiteres Ereignis":e+" weitere Ereignisse"),closeHint:"Schließen",timeHint:"Uhrzeit",eventHint:"Ereignis"};function IT(e){return"Tag"===e||"Monat"===e?"r":"Jahr"===e?"s":""}var PT,LT,FT,zT,HT,VT,BT,WT,UT,$T={code:"de",week:{dow:1,doy:4},buttonText:{prev:"Zurück",next:"Vor",today:"Heute",year:"Jahr",month:"Monat",week:"Woche",day:"Tag",list:"Terminübersicht"},weekText:"KW",weekTextLong:"Woche",allDayText:"Ganztägig",moreLinkText:e=>"+ weitere "+e,noEventsText:"Keine Ereignisse anzuzeigen",buttonHints:{prev:e=>`Vorherige${IT(e)} ${e}`,next:e=>`Nächste${IT(e)} ${e}`,today:e=>"Tag"===e?"Heute":`Diese${IT(e)} ${e}`},viewHint:e=>e+("Woche"===e?"n":"Monat"===e?"s":"es")+"ansicht",navLinkHint:"Gehe zu $0",moreLinkHint:e=>"Zeige "+(1===e?"ein weiteres Ereignis":e+" weitere Ereignisse"),closeHint:"Schließen",timeHint:"Uhrzeit",eventHint:"Ereignis"},GT=[{code:"af",week:{dow:1,doy:4},buttonText:{prev:"Vorige",next:"Volgende",today:"Vandag",year:"Jaar",month:"Maand",week:"Week",day:"Dag",list:"Agenda"},allDayText:"Heeldag",moreLinkText:"Addisionele",noEventsText:"Daar is geen gebeurtenisse nie"},{code:"ar-dz",week:{dow:0,doy:4},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",year:"سنة",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"},{code:"ar-kw",week:{dow:0,doy:12},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",year:"سنة",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"},{code:"ar-ly",week:{dow:6,doy:12},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",year:"سنة",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"},{code:"ar-ma",week:{dow:6,doy:12},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",year:"سنة",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"},{code:"ar-sa",week:{dow:0,doy:6},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",year:"سنة",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"},{code:"ar-tn",week:{dow:1,doy:4},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",year:"سنة",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"},{code:"ar",week:{dow:6,doy:12},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",year:"سنة",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"},{code:"az",week:{dow:1,doy:4},buttonText:{prev:"Əvvəl",next:"Sonra",today:"Bu Gün",year:"Il",month:"Ay",week:"Həftə",day:"Gün",list:"Gündəm"},weekText:"Həftə",allDayText:"Bütün Gün",moreLinkText:e=>"+ daha çox "+e,noEventsText:"Göstərmək üçün hadisə yoxdur"},{code:"bg",week:{dow:1,doy:4},buttonText:{prev:"назад",next:"напред",today:"днес",year:"година",month:"Месец",week:"Седмица",day:"Ден",list:"График"},allDayText:"Цял ден",moreLinkText:e=>"+още "+e,noEventsText:"Няма събития за показване"},{code:"bn",week:{dow:0,doy:6},buttonText:{prev:"পেছনে",next:"সামনে",today:"আজ",year:"বছর",month:"মাস",week:"সপ্তাহ",day:"দিন",list:"তালিকা"},weekText:"সপ্তাহ",allDayText:"সারাদিন",moreLinkText:e=>"+অন্যান্য "+e,noEventsText:"কোনো ইভেন্ট নেই"},{code:"bs",week:{dow:1,doy:7},buttonText:{prev:"Prošli",next:"Sljedeći",today:"Danas",year:"Godina",month:"Mjesec",week:"Sedmica",day:"Dan",list:"Raspored"},weekText:"Sed",allDayText:"Cijeli dan",moreLinkText:e=>"+ još "+e,noEventsText:"Nema događaja za prikazivanje"},{code:"ca",week:{dow:1,doy:4},buttonText:{prev:"Anterior",next:"Següent",today:"Avui",year:"Any",month:"Mes",week:"Setmana",day:"Dia",list:"Agenda"},weekText:"Set",allDayText:"Tot el dia",moreLinkText:"més",noEventsText:"No hi ha esdeveniments per mostrar"},{code:"cs",week:{dow:1,doy:4},buttonText:{prev:"Dříve",next:"Později",today:"Nyní",year:"Rok",month:"Měsíc",week:"Týden",day:"Den",list:"Agenda"},weekText:"Týd",allDayText:"Celý den",moreLinkText:e=>"+další: "+e,noEventsText:"Žádné akce k zobrazení"},{code:"cy",week:{dow:1,doy:4},buttonText:{prev:"Blaenorol",next:"Nesaf",today:"Heddiw",year:"Blwyddyn",month:"Mis",week:"Wythnos",day:"Dydd",list:"Rhestr"},weekText:"Wythnos",allDayText:"Trwy'r dydd",moreLinkText:"Mwy",noEventsText:"Dim digwyddiadau"},{code:"da",week:{dow:1,doy:4},buttonText:{prev:"Forrige",next:"Næste",today:"I dag",year:"År",month:"Måned",week:"Uge",day:"Dag",list:"Agenda"},weekText:"Uge",allDayText:"Hele dagen",moreLinkText:"flere",noEventsText:"Ingen arrangementer at vise"},OT,$T,{code:"el",week:{dow:1,doy:4},buttonText:{prev:"Προηγούμενος",next:"Επόμενος",today:"Σήμερα",year:"Ετος",month:"Μήνας",week:"Εβδομάδα",day:"Ημέρα",list:"Ατζέντα"},weekText:"Εβδ",allDayText:"Ολοήμερο",moreLinkText:"περισσότερα",noEventsText:"Δεν υπάρχουν γεγονότα προς εμφάνιση"},{code:"en-au",week:{dow:1,doy:4},buttonHints:{prev:"Previous $0",next:"Next $0",today:"This $0"},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint:e=>`Show ${e} more event${1===e?"":"s"}`},{code:"en-gb",week:{dow:1,doy:4},buttonHints:{prev:"Previous $0",next:"Next $0",today:"This $0"},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint:e=>`Show ${e} more event${1===e?"":"s"}`},{code:"en-nz",week:{dow:1,doy:4},buttonHints:{prev:"Previous $0",next:"Next $0",today:"This $0"},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint:e=>`Show ${e} more event${1===e?"":"s"}`},{code:"eo",week:{dow:1,doy:4},buttonText:{prev:"Antaŭa",next:"Sekva",today:"Hodiaŭ",year:"Jaro",month:"Monato",week:"Semajno",day:"Tago",list:"Tagordo"},weekText:"Sm",allDayText:"Tuta tago",moreLinkText:"pli",noEventsText:"Neniuj eventoj por montri"},{code:"es",week:{dow:0,doy:6},buttonText:{prev:"Ant",next:"Sig",today:"Hoy",year:"Año",month:"Mes",week:"Semana",day:"Día",list:"Agenda"},weekText:"Sm",allDayText:"Todo el día",moreLinkText:"más",noEventsText:"No hay eventos para mostrar"},{code:"es",week:{dow:1,doy:4},buttonText:{prev:"Ant",next:"Sig",today:"Hoy",year:"Año",month:"Mes",week:"Semana",day:"Día",list:"Agenda"},buttonHints:{prev:"$0 antes",next:"$0 siguiente",today:e=>"Día"===e?"Hoy":("Semana"===e?"Esta":"Este")+" "+e.toLocaleLowerCase()},viewHint:e=>"Vista "+("Semana"===e?"de la":"del")+" "+e.toLocaleLowerCase(),weekText:"Sm",weekTextLong:"Semana",allDayText:"Todo el día",moreLinkText:"más",moreLinkHint:e=>`Mostrar ${e} eventos más`,noEventsText:"No hay eventos para mostrar",navLinkHint:"Ir al $0",closeHint:"Cerrar",timeHint:"La hora",eventHint:"Evento"},{code:"et",week:{dow:1,doy:4},buttonText:{prev:"Eelnev",next:"Järgnev",today:"Täna",year:"Aasta",month:"Kuu",week:"Nädal",day:"Päev",list:"Päevakord"},weekText:"näd",allDayText:"Kogu päev",moreLinkText:e=>"+ veel "+e,noEventsText:"Kuvamiseks puuduvad sündmused"},{code:"eu",week:{dow:1,doy:7},buttonText:{prev:"Aur",next:"Hur",today:"Gaur",year:"Urtea",month:"Hilabetea",week:"Astea",day:"Eguna",list:"Agenda"},weekText:"As",allDayText:"Egun osoa",moreLinkText:"gehiago",noEventsText:"Ez dago ekitaldirik erakusteko"},{code:"fa",week:{dow:6,doy:12},direction:"rtl",buttonText:{prev:"قبلی",next:"بعدی",today:"امروز",year:"سال",month:"ماه",week:"هفته",day:"روز",list:"برنامه"},weekText:"هف",allDayText:"تمام روز",moreLinkText:e=>"بیش از "+e,noEventsText:"هیچ رویدادی به نمایش"},{code:"fi",week:{dow:1,doy:4},buttonText:{prev:"Edellinen",next:"Seuraava",today:"Tänään",year:"Vuosi",month:"Kuukausi",week:"Viikko",day:"Päivä",list:"Tapahtumat"},weekText:"Vk",allDayText:"Koko päivä",moreLinkText:"lisää",noEventsText:"Ei näytettäviä tapahtumia"},{code:"fr",buttonText:{prev:"Précédent",next:"Suivant",today:"Aujourd'hui",year:"Année",month:"Mois",week:"Semaine",day:"Jour",list:"Mon planning"},weekText:"Sem.",allDayText:"Toute la journée",moreLinkText:"en plus",noEventsText:"Aucun évènement à afficher"},{code:"fr-ch",week:{dow:1,doy:4},buttonText:{prev:"Précédent",next:"Suivant",today:"Courant",year:"Année",month:"Mois",week:"Semaine",day:"Jour",list:"Mon planning"},weekText:"Sm",allDayText:"Toute la journée",moreLinkText:"en plus",noEventsText:"Aucun évènement à afficher"},{code:"fr",week:{dow:1,doy:4},buttonText:{prev:"Précédent",next:"Suivant",today:"Aujourd'hui",year:"Année",month:"Mois",week:"Semaine",day:"Jour",list:"Planning"},weekText:"Sem.",weekTextLong:"Semaine",allDayText:"Toute la journée",moreLinkText:"en plus",noEventsText:"Aucun évènement à afficher"},{code:"gl",week:{dow:1,doy:4},buttonText:{prev:"Ant",next:"Seg",today:"Hoxe",year:"Ano",month:"Mes",week:"Semana",day:"Día",list:"Axenda"},buttonHints:{prev:"$0 antes",next:"$0 seguinte",today:e=>"Día"===e?"Hoxe":("Semana"===e?"Esta":"Este")+" "+e.toLocaleLowerCase()},viewHint:e=>"Vista "+("Semana"===e?"da":"do")+" "+e.toLocaleLowerCase(),weekText:"Sm",weekTextLong:"Semana",allDayText:"Todo o día",moreLinkText:"máis",moreLinkHint:e=>`Amosar ${e} eventos máis`,noEventsText:"Non hai eventos para amosar",navLinkHint:"Ir ao $0",closeHint:"Pechar",timeHint:"A hora",eventHint:"Evento"},{code:"he",direction:"rtl",buttonText:{prev:"הקודם",next:"הבא",today:"היום",year:"שנה",month:"חודש",week:"שבוע",day:"יום",list:"סדר יום"},allDayText:"כל היום",moreLinkText:"נוספים",noEventsText:"אין אירועים להצגה",weekText:"שבוע"},{code:"hi",week:{dow:0,doy:6},buttonText:{prev:"पिछला",next:"अगला",today:"आज",year:"वर्ष",month:"महीना",week:"सप्ताह",day:"दिन",list:"कार्यसूची"},weekText:"हफ्ता",allDayText:"सभी दिन",moreLinkText:e=>"+अधिक "+e,noEventsText:"कोई घटनाओं को प्रदर्शित करने के लिए"},{code:"hr",week:{dow:1,doy:7},buttonText:{prev:"Prijašnji",next:"Sljedeći",today:"Danas",year:"Godina",month:"Mjesec",week:"Tjedan",day:"Dan",list:"Raspored"},weekText:"Tje",allDayText:"Cijeli dan",moreLinkText:e=>"+ još "+e,noEventsText:"Nema događaja za prikaz"},{code:"hu",week:{dow:1,doy:4},buttonText:{prev:"vissza",next:"előre",today:"ma",year:"Év",month:"Hónap",week:"Hét",day:"Nap",list:"Lista"},weekText:"Hét",allDayText:"Egész nap",moreLinkText:"további",noEventsText:"Nincs megjeleníthető esemény"},{code:"hy-am",week:{dow:1,doy:4},buttonText:{prev:"Նախորդ",next:"Հաջորդ",today:"Այսօր",year:"Տարի",month:"Ամիս",week:"Շաբաթ",day:"Օր",list:"Օրվա ցուցակ"},weekText:"Շաբ",allDayText:"Ամբողջ օր",moreLinkText:e=>"+ ևս "+e,noEventsText:"Բացակայում է իրադարձությունը ցուցադրելու"},{code:"id",week:{dow:1,doy:7},buttonText:{prev:"mundur",next:"maju",today:"hari ini",year:"Tahun",month:"Bulan",week:"Minggu",day:"Hari",list:"Agenda"},weekText:"Mg",allDayText:"Sehari penuh",moreLinkText:"lebih",noEventsText:"Tidak ada acara untuk ditampilkan"},{code:"is",week:{dow:1,doy:4},buttonText:{prev:"Fyrri",next:"Næsti",today:"Í dag",year:"Ár",month:"Mánuður",week:"Vika",day:"Dagur",list:"Dagskrá"},weekText:"Vika",allDayText:"Allan daginn",moreLinkText:"meira",noEventsText:"Engir viðburðir til að sýna"},{code:"it",week:{dow:1,doy:4},buttonText:{prev:"Prec",next:"Succ",today:"Oggi",year:"Anno",month:"Mese",week:"Settimana",day:"Giorno",list:"Agenda"},weekText:"Sm",allDayText:"Tutto il giorno",moreLinkText:e=>"+altri "+e,noEventsText:"Non ci sono eventi da visualizzare"},{code:"ja",buttonText:{prev:"前",next:"次",today:"今日",year:"年",month:"月",week:"週",day:"日",list:"予定リスト"},weekText:"週",allDayText:"終日",moreLinkText:e=>"他 "+e+" 件",noEventsText:"表示する予定はありません"},{code:"ka",week:{dow:1,doy:7},buttonText:{prev:"წინა",next:"შემდეგი",today:"დღეს",year:"წელიწადი",month:"თვე",week:"კვირა",day:"დღე",list:"დღის წესრიგი"},weekText:"კვ",allDayText:"მთელი დღე",moreLinkText:e=>"+ კიდევ "+e,noEventsText:"ღონისძიებები არ არის"},{code:"kk",week:{dow:1,doy:7},buttonText:{prev:"Алдыңғы",next:"Келесі",today:"Бүгін",year:"Жыл",month:"Ай",week:"Апта",day:"Күн",list:"Күн тәртібі"},weekText:"Не",allDayText:"Күні бойы",moreLinkText:e=>"+ тағы "+e,noEventsText:"Көрсету үшін оқиғалар жоқ"},{code:"km",week:{dow:1,doy:4},buttonText:{prev:"មុន",next:"បន្ទាប់",today:"ថ្ងៃនេះ",year:"ឆ្នាំ",month:"ខែ",week:"សប្តាហ៍",day:"ថ្ងៃ",list:"បញ្ជី"},weekText:"សប្តាហ៍",allDayText:"ពេញមួយថ្ងៃ",moreLinkText:"ច្រើនទៀត",noEventsText:"គ្មានព្រឹត្តិការណ៍ត្រូវបង្ហាញ"},{code:"ko",buttonText:{prev:"이전달",next:"다음달",today:"오늘",year:"년도",month:"월",week:"주",day:"일",list:"일정목록"},weekText:"주",allDayText:"종일",moreLinkText:"개",noEventsText:"일정이 없습니다"},{code:"ku",week:{dow:6,doy:12},direction:"rtl",buttonText:{prev:"پێشتر",next:"دواتر",today:"ئەمڕو",year:"ساڵ",month:"مانگ",week:"هەفتە",day:"ڕۆژ",list:"بەرنامە"},weekText:"هەفتە",allDayText:"هەموو ڕۆژەکە",moreLinkText:"زیاتر",noEventsText:"هیچ ڕووداوێك نیە"},{code:"lb",week:{dow:1,doy:4},buttonText:{prev:"Zréck",next:"Weider",today:"Haut",year:"Joer",month:"Mount",week:"Woch",day:"Dag",list:"Terminiwwersiicht"},weekText:"W",allDayText:"Ganzen Dag",moreLinkText:"méi",noEventsText:"Nee Evenementer ze affichéieren"},{code:"lt",week:{dow:1,doy:4},buttonText:{prev:"Atgal",next:"Pirmyn",today:"Šiandien",year:"Metai",month:"Mėnuo",week:"Savaitė",day:"Diena",list:"Darbotvarkė"},weekText:"SAV",allDayText:"Visą dieną",moreLinkText:"daugiau",noEventsText:"Nėra įvykių rodyti"},{code:"lv",week:{dow:1,doy:4},buttonText:{prev:"Iepr.",next:"Nāk.",today:"Šodien",year:"Gads",month:"Mēnesis",week:"Nedēļa",day:"Diena",list:"Dienas kārtība"},weekText:"Ned.",allDayText:"Visu dienu",moreLinkText:e=>"+vēl "+e,noEventsText:"Nav notikumu"},{code:"mk",buttonText:{prev:"претходно",next:"следно",today:"Денес",year:"година",month:"Месец",week:"Недела",day:"Ден",list:"График"},weekText:"Сед",allDayText:"Цел ден",moreLinkText:e=>"+повеќе "+e,noEventsText:"Нема настани за прикажување"},{code:"ms",week:{dow:1,doy:7},buttonText:{prev:"Sebelum",next:"Selepas",today:"hari ini",year:"Tahun",month:"Bulan",week:"Minggu",day:"Hari",list:"Agenda"},weekText:"Mg",allDayText:"Sepanjang hari",moreLinkText:e=>"masih ada "+e+" acara",noEventsText:"Tiada peristiwa untuk dipaparkan"},{code:"nb",week:{dow:1,doy:4},buttonText:{prev:"Forrige",next:"Neste",today:"I dag",year:"År",month:"Måned",week:"Uke",day:"Dag",list:"Agenda"},weekText:"Uke",weekTextLong:"Uke",allDayText:"Hele dagen",moreLinkText:"til",noEventsText:"Ingen hendelser å vise",buttonHints:{prev:"Forrige $0",next:"Neste $0",today:"Nåværende $0"},viewHint:"$0 visning",navLinkHint:"Gå til $0",moreLinkHint:e=>`Vis ${e} flere hendelse${1===e?"":"r"}`},{code:"ne",week:{dow:7,doy:1},buttonText:{prev:"अघिल्लो",next:"अर्को",today:"आज",year:"वर्ष",month:"महिना",week:"हप्ता",day:"दिन",list:"सूची"},weekText:"हप्ता",allDayText:"दिनभरि",moreLinkText:"थप लिंक",noEventsText:"देखाउनको लागि कुनै घटनाहरू छैनन्"},{code:"nl",week:{dow:1,doy:4},buttonText:{prev:"Vorige",next:"Volgende",today:"Vandaag",year:"Jaar",month:"Maand",week:"Week",day:"Dag",list:"Lijst"},allDayText:"Hele dag",moreLinkText:"extra",noEventsText:"Geen evenementen om te laten zien"},{code:"nn",week:{dow:1,doy:4},buttonText:{prev:"Førre",next:"Neste",today:"I dag",year:"År",month:"Månad",week:"Veke",day:"Dag",list:"Agenda"},weekText:"Veke",allDayText:"Heile dagen",moreLinkText:"til",noEventsText:"Ingen hendelser å vise"},{code:"pl",week:{dow:1,doy:4},buttonText:{prev:"Poprzedni",next:"Następny",today:"Dziś",year:"Rok",month:"Miesiąc",week:"Tydzień",day:"Dzień",list:"Plan dnia"},weekText:"Tydz",allDayText:"Cały dzień",moreLinkText:"więcej",noEventsText:"Brak wydarzeń do wyświetlenia"},{code:"pt-br",buttonText:{prev:"Anterior",next:"Próximo",prevYear:"Ano anterior",nextYear:"Próximo ano",year:"Ano",today:"Hoje",month:"Mês",week:"Semana",day:"Dia",list:"Lista"},buttonHints:{prev:"$0 Anterior",next:"Próximo $0",today:e=>"Dia"===e?"Hoje":("Semana"===e?"Esta":"Este")+" "+e.toLocaleLowerCase()},viewHint:e=>"Visualizar "+("Semana"===e?"a":"o")+" "+e.toLocaleLowerCase(),weekText:"Sm",weekTextLong:"Semana",allDayText:"dia inteiro",moreLinkText:e=>"mais +"+e,moreLinkHint:e=>`Mostrar mais ${e} eventos`,noEventsText:"Não há eventos para mostrar",navLinkHint:"Ir para $0",closeHint:"Fechar",timeHint:"A hora",eventHint:"Evento"},{code:"pt",week:{dow:1,doy:4},buttonText:{prev:"Anterior",next:"Seguinte",today:"Hoje",year:"Ano",month:"Mês",week:"Semana",day:"Dia",list:"Agenda"},weekText:"Sem",allDayText:"Todo o dia",moreLinkText:"mais",noEventsText:"Não há eventos para mostrar"},{code:"ro",week:{dow:1,doy:7},buttonText:{prev:"precedentă",next:"următoare",today:"Azi",year:"An",month:"Lună",week:"Săptămână",day:"Zi",list:"Agendă"},weekText:"Săpt",allDayText:"Toată ziua",moreLinkText:e=>"+alte "+e,noEventsText:"Nu există evenimente de afișat"},{code:"ru",week:{dow:1,doy:4},buttonText:{prev:"Пред",next:"След",today:"Сегодня",year:"Год",month:"Месяц",week:"Неделя",day:"День",list:"Повестка дня"},weekText:"Нед",allDayText:"Весь день",moreLinkText:e=>"+ ещё "+e,noEventsText:"Нет событий для отображения"},{code:"si-lk",week:{dow:1,doy:4},buttonText:{prev:"පෙර",next:"පසු",today:"අද",year:"අවුරුදු",month:"මාසය",week:"සතිය",day:"දවස",list:"ලැයිස්තුව"},weekText:"සති",allDayText:"සියලු",moreLinkText:"තවත්",noEventsText:"මුකුත් නැත"},{code:"sk",week:{dow:1,doy:4},buttonText:{prev:"Predchádzajúci",next:"Nasledujúci",today:"Dnes",year:"Rok",month:"Mesiac",week:"Týždeň",day:"Deň",list:"Rozvrh"},weekText:"Ty",allDayText:"Celý deň",moreLinkText:e=>"+ďalšie: "+e,noEventsText:"Žiadne akcie na zobrazenie"},{code:"sl",week:{dow:1,doy:7},buttonText:{prev:"Prejšnji",next:"Naslednji",today:"Trenutni",year:"Leto",month:"Mesec",week:"Teden",day:"Dan",list:"Dnevni red"},weekText:"Teden",allDayText:"Ves dan",moreLinkText:"več",noEventsText:"Ni dogodkov za prikaz"},{code:"sm",buttonText:{prev:"Talu ai",next:"Mulimuli atu",today:"Aso nei",year:"Tausaga",month:"Masina",week:"Vaiaso",day:"Aso",list:"Faasologa"},weekText:"Vaiaso",allDayText:"Aso atoa",moreLinkText:"sili atu",noEventsText:"Leai ni mea na tutupu"},{code:"sq",week:{dow:1,doy:4},buttonText:{prev:"mbrapa",next:"Përpara",today:"Sot",year:"Viti",month:"Muaj",week:"Javë",day:"Ditë",list:"Listë"},weekText:"Ja",allDayText:"Gjithë ditën",moreLinkText:e=>"+më tepër "+e,noEventsText:"Nuk ka evente për të shfaqur"},{code:"sr-cyrl",week:{dow:1,doy:7},buttonText:{prev:"Претходна",next:"следећи",today:"Данас",year:"Година",month:"Месец",week:"Недеља",day:"Дан",list:"Планер"},weekText:"Сед",allDayText:"Цео дан",moreLinkText:e=>"+ још "+e,noEventsText:"Нема догађаја за приказ"},{code:"sr",week:{dow:1,doy:7},buttonText:{prev:"Prethodna",next:"Sledeći",today:"Danas",year:"Godina",month:"Mеsеc",week:"Nеdеlja",day:"Dan",list:"Planеr"},weekText:"Sed",allDayText:"Cеo dan",moreLinkText:e=>"+ još "+e,noEventsText:"Nеma događaja za prikaz"},{code:"sv",week:{dow:1,doy:4},buttonText:{prev:"Förra",next:"Nästa",today:"Idag",year:"År",month:"Månad",week:"Vecka",day:"Dag",list:"Program"},buttonHints:{prev:e=>`Föregående ${e.toLocaleLowerCase()}`,next:e=>`Nästa ${e.toLocaleLowerCase()}`,today:e=>("Program"===e?"Detta":"Denna")+" "+e.toLocaleLowerCase()},viewHint:"$0 vy",navLinkHint:"Gå till $0",moreLinkHint:e=>`Visa ytterligare ${e} händelse${1===e?"":"r"}`,weekText:"v.",weekTextLong:"Vecka",allDayText:"Heldag",moreLinkText:"till",noEventsText:"Inga händelser att visa",closeHint:"Stäng",timeHint:"Klockan",eventHint:"Händelse"},{code:"ta-in",week:{dow:1,doy:4},buttonText:{prev:"முந்தைய",next:"அடுத்தது",today:"இன்று",year:"ஆண்டு",month:"மாதம்",week:"வாரம்",day:"நாள்",list:"தினசரி அட்டவணை"},weekText:"வாரம்",allDayText:"நாள் முழுவதும்",moreLinkText:e=>"+ மேலும் "+e,noEventsText:"காண்பிக்க நிகழ்வுகள் இல்லை"},{code:"th",week:{dow:1,doy:4},buttonText:{prev:"ก่อนหน้า",next:"ถัดไป",prevYear:"ปีก่อนหน้า",nextYear:"ปีถัดไป",year:"ปี",today:"วันนี้",month:"เดือน",week:"สัปดาห์",day:"วัน",list:"กำหนดการ"},weekText:"สัปดาห์",allDayText:"ตลอดวัน",moreLinkText:"เพิ่มเติม",noEventsText:"ไม่มีกิจกรรมที่จะแสดง"},{code:"tr",week:{dow:1,doy:7},buttonText:{prev:"geri",next:"ileri",today:"bugün",year:"Yıl",month:"Ay",week:"Hafta",day:"Gün",list:"Ajanda"},weekText:"Hf",allDayText:"Tüm gün",moreLinkText:"daha fazla",noEventsText:"Gösterilecek etkinlik yok"},{code:"ug",buttonText:{prev:"ئالدىنقى",next:"كېيىنكى",today:"بۈگۈن",year:"يىل",month:"ئاي",week:"ھەپتە",day:"كۈن",list:"كۈنتەرتىپ"},allDayText:"پۈتۈن كۈن"},{code:"uk",week:{dow:1,doy:7},buttonText:{prev:"Попередній",next:"далі",today:"Сьогодні",year:"рік",month:"Місяць",week:"Тиждень",day:"День",list:"Порядок денний"},weekText:"Тиж",allDayText:"Увесь день",moreLinkText:e=>"+ще "+e+"...",noEventsText:"Немає подій для відображення"},{code:"uz-cy",week:{dow:1,doy:4},buttonText:{prev:"Олин",next:"Кейин",today:"Бугун",month:"Ой",week:"Ҳафта",day:"Кун",list:"Кун тартиби"},weekText:"Ҳафта",allDayText:"Кун бўйича",moreLinkText:e=>"+ яна "+e,noEventsText:"Кўрсатиш учун воқеалар йўқ"},{code:"uz",week:{dow:1,doy:4},buttonText:{prev:"Oldingi",next:"Keyingi",today:"Bugun",year:"Yil",month:"Oy",week:"Xafta",day:"Kun",list:"Kun tartibi"},allDayText:"Kun bo'yi",moreLinkText:e=>"+ yana "+e,noEventsText:"Ko'rsatish uchun voqealar yo'q"},{code:"vi",week:{dow:1,doy:4},buttonText:{prev:"Trước",next:"Tiếp",today:"Hôm nay",year:"Năm",month:"Tháng",week:"Tuần",day:"Ngày",list:"Lịch biểu"},weekText:"Tu",allDayText:"Cả ngày",moreLinkText:e=>"+ thêm "+e,noEventsText:"Không có sự kiện để hiển thị"},{code:"zh-cn",week:{dow:1,doy:4},buttonText:{prev:"上月",next:"下月",today:"今天",year:"年",month:"月",week:"周",day:"日",list:"日程"},weekText:"周",allDayText:"全天",moreLinkText:e=>"另外 "+e+" 个",noEventsText:"没有事件显示"},{code:"zh-tw",buttonText:{prev:"上個",next:"下個",today:"今天",year:"年",month:"月",week:"週",day:"天",list:"活動列表"},weekText:"週",allDayText:"整天",moreLinkText:"顯示更多",noEventsText:"沒有任何活動"}],YT={},qT=[],ZT=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function KT(e,t){for(var n in t)e[n]=t[n];return e}function QT(e){var t=e.parentNode;t&&t.removeChild(e)}function JT(e,t,n){var r,o,a,s={};for(a in t)"key"==a?r=t[a]:"ref"==a?o=t[a]:s[a]=t[a];if(arguments.length>2&&(s.children=arguments.length>3?PT.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===s[a]&&(s[a]=e.defaultProps[a]);return XT(e,s,r,o,null)}function XT(e,t,n,r,o){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++FT:o};return null==o&&null!=LT.vnode&&LT.vnode(a),a}function eA(e){return e.children}function tA(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||ZT.test(t)?n:n+"px"}function nA(e,t,n,r,o){var a;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||tA(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||tA(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])a=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=n,n?r||e.addEventListener(t,a?oA:rA,a):e.removeEventListener(t,a?oA:rA,a);else if("dangerouslySetInnerHTML"!==t){if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&-1==t.indexOf("-")?e.removeAttribute(t):e.setAttribute(t,n))}}function rA(e){HT=!0;try{return this.l[e.type+!1](LT.event?LT.event(e):e)}finally{HT=!1}}function oA(e){HT=!0;try{return this.l[e.type+!0](LT.event?LT.event(e):e)}finally{HT=!1}}function aA(e,t){this.props=e,this.context=t}function sA(e,t){if(null==t)return e.__?sA(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?sA(e):null}function iA(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return iA(e)}}function lA(e){HT?setTimeout(e):WT(e)}function cA(e){(!e.__d&&(e.__d=!0)&&VT.push(e)&&!dA.__r++||BT!==LT.debounceRendering)&&((BT=LT.debounceRendering)||lA)(dA)}function dA(){var e,t,n,r,o,a,s,i;for(VT.sort((function(e,t){return e.__v.__b-t.__v.__b}));e=VT.shift();)e.__d&&(t=VT.length,r=void 0,o=void 0,s=(a=(n=e).__v).__e,(i=n.__P)&&(r=[],(o=KT({},a)).__v=a.__v+1,gA(i,a,o,n.__n,void 0!==i.ownerSVGElement,null!=a.__h?[s]:null,r,null==s?sA(a):s,a.__h),vA(r,a),a.__e!=s&&iA(a)),VT.length>t&&VT.sort((function(e,t){return e.__v.__b-t.__v.__b})));dA.__r=0}function uA(e,t,n,r,o,a,s,i,l,c){var d,u,f,h,m,p,g,v=r&&r.__k||qT,y=v.length;for(n.__k=[],d=0;d<t.length;d++)if(null!=(h=n.__k[d]=null==(h=t[d])||"boolean"==typeof h?null:"string"==typeof h||"number"==typeof h||"bigint"==typeof h?XT(null,h,null,null,h):Array.isArray(h)?XT(eA,{children:h},null,null,null):h.__b>0?XT(h.type,h.props,h.key,h.ref?h.ref:null,h.__v):h)){if(h.__=n,h.__b=n.__b+1,null===(f=v[d])||f&&h.key==f.key&&h.type===f.type)v[d]=void 0;else for(u=0;u<y;u++){if((f=v[u])&&h.key==f.key&&h.type===f.type){v[u]=void 0;break}f=null}gA(e,h,f=f||YT,o,a,s,i,l,c),m=h.__e,(u=h.ref)&&f.ref!=u&&(g||(g=[]),f.ref&&g.push(f.ref,null,h),g.push(u,h.__c||m,h)),null!=m?(null==p&&(p=m),"function"==typeof h.type&&h.__k===f.__k?h.__d=l=fA(h,l,e):l=mA(e,h,f,v,m,l),"function"==typeof n.type&&(n.__d=l)):l&&f.__e==l&&l.parentNode!=e&&(l=sA(f))}for(n.__e=p,d=y;d--;)null!=v[d]&&("function"==typeof n.type&&null!=v[d].__e&&v[d].__e==n.__d&&(n.__d=pA(r).nextSibling),xA(v[d],v[d]));if(g)for(d=0;d<g.length;d++)bA(g[d],g[++d],g[++d])}function fA(e,t,n){for(var r,o=e.__k,a=0;o&&a<o.length;a++)(r=o[a])&&(r.__=e,t="function"==typeof r.type?fA(r,t,n):mA(n,r,r,o,r.__e,t));return t}function hA(e,t){return t=t||[],null==e||"boolean"==typeof e||(Array.isArray(e)?e.some((function(e){hA(e,t)})):t.push(e)),t}function mA(e,t,n,r,o,a){var s,i,l;if(void 0!==t.__d)s=t.__d,t.__d=void 0;else if(null==n||o!=a||null==o.parentNode)e:if(null==a||a.parentNode!==e)e.appendChild(o),s=null;else{for(i=a,l=0;(i=i.nextSibling)&&l<r.length;l+=1)if(i==o)break e;e.insertBefore(o,a),s=a}return void 0!==s?s:o.nextSibling}function pA(e){var t,n,r;if(null==e.type||"string"==typeof e.type)return e.__e;if(e.__k)for(t=e.__k.length-1;t>=0;t--)if((n=e.__k[t])&&(r=pA(n)))return r;return null}function gA(e,t,n,r,o,a,s,i,l){var c,d,u,f,h,m,p,g,v,y,b,x,w,k,S,C=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(l=n.__h,i=t.__e=n.__e,t.__h=null,a=[i]),(c=LT.__b)&&c(t);try{e:if("function"==typeof C){if(g=t.props,v=(c=C.contextType)&&r[c.__c],y=c?v?v.props.value:c.__:r,n.__c?p=(d=t.__c=n.__c).__=d.__E:("prototype"in C&&C.prototype.render?t.__c=d=new C(g,y):(t.__c=d=new aA(g,y),d.constructor=C,d.render=wA),v&&v.sub(d),d.props=g,d.state||(d.state={}),d.context=y,d.__n=r,u=d.__d=!0,d.__h=[],d._sb=[]),null==d.__s&&(d.__s=d.state),null!=C.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=KT({},d.__s)),KT(d.__s,C.getDerivedStateFromProps(g,d.__s))),f=d.props,h=d.state,d.__v=t,u)null==C.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==C.getDerivedStateFromProps&&g!==f&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(g,y),!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(g,d.__s,y)||t.__v===n.__v){for(t.__v!==n.__v&&(d.props=g,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),b=0;b<d._sb.length;b++)d.__h.push(d._sb[b]);d._sb=[],d.__h.length&&s.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(g,d.__s,y),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(f,h,m)}))}if(d.context=y,d.props=g,d.__P=e,x=LT.__r,w=0,"prototype"in C&&C.prototype.render){for(d.state=d.__s,d.__d=!1,x&&x(t),c=d.render(d.props,d.state,d.context),k=0;k<d._sb.length;k++)d.__h.push(d._sb[k]);d._sb=[]}else do{d.__d=!1,x&&x(t),c=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&++w<25);d.state=d.__s,null!=d.getChildContext&&(r=KT(KT({},r),d.getChildContext())),u||null==d.getSnapshotBeforeUpdate||(m=d.getSnapshotBeforeUpdate(f,h)),S=null!=c&&c.type===eA&&null==c.key?c.props.children:c,uA(e,Array.isArray(S)?S:[S],t,n,r,o,a,s,i,l),d.base=t.__e,t.__h=null,d.__h.length&&s.push(d),p&&(d.__E=d.__=null),d.__e=!1}else null==a&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=yA(n.__e,t,n,r,o,a,s,l);(c=LT.diffed)&&c(t)}catch(e){t.__v=null,(l||null!=a)&&(t.__e=i,t.__h=!!l,a[a.indexOf(i)]=null),LT.__e(e,t,n)}}function vA(e,t){LT.__c&&LT.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){LT.__e(e,t.__v)}}))}function yA(e,t,n,r,o,a,s,i){var l,c,d,u=n.props,f=t.props,h=t.type,m=0;if("svg"===h&&(o=!0),null!=a)for(;m<a.length;m++)if((l=a[m])&&"setAttribute"in l==!!h&&(h?l.localName===h:3===l.nodeType)){e=l,a[m]=null;break}if(null==e){if(null===h)return document.createTextNode(f);e=o?document.createElementNS("http://www.w3.org/2000/svg",h):document.createElement(h,f.is&&f),a=null,i=!1}if(null===h)u===f||i&&e.data===f||(e.data=f);else{if(a=a&&PT.call(e.childNodes),c=(u=n.props||YT).dangerouslySetInnerHTML,d=f.dangerouslySetInnerHTML,!i){if(null!=a)for(u={},m=0;m<e.attributes.length;m++)u[e.attributes[m].name]=e.attributes[m].value;(d||c)&&(d&&(c&&d.__html==c.__html||d.__html===e.innerHTML)||(e.innerHTML=d&&d.__html||""))}if(function(e,t,n,r,o){var a;for(a in n)"children"===a||"key"===a||a in t||nA(e,a,null,n[a],r);for(a in t)o&&"function"!=typeof t[a]||"children"===a||"key"===a||"value"===a||"checked"===a||n[a]===t[a]||nA(e,a,t[a],n[a],r)}(e,f,u,o,i),d)t.__k=[];else if(m=t.props.children,uA(e,Array.isArray(m)?m:[m],t,n,r,o&&"foreignObject"!==h,a,s,a?a[0]:n.__k&&sA(n,0),i),null!=a)for(m=a.length;m--;)null!=a[m]&&QT(a[m]);i||("value"in f&&void 0!==(m=f.value)&&(m!==e.value||"progress"===h&&!m||"option"===h&&m!==u.value)&&nA(e,"value",m,u.value,!1),"checked"in f&&void 0!==(m=f.checked)&&m!==e.checked&&nA(e,"checked",m,u.checked,!1))}return e}function bA(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){LT.__e(e,n)}}function xA(e,t,n){var r,o;if(LT.unmount&&LT.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||bA(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){LT.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&xA(r[o],t,n||"function"!=typeof e.type);n||null==e.__e||QT(e.__e),e.__=e.__e=e.__d=void 0}function wA(e,t,n){return this.constructor(e,n)}function kA(e,t,n){var r,o,a;LT.__&&LT.__(e,t),o=(r="function"==typeof n)?null:n&&n.__k||t.__k,a=[],gA(t,e=(!r&&n||t).__k=JT(eA,null,[e]),o||YT,YT,void 0!==t.ownerSVGElement,!r&&n?[n]:o?null:t.firstChild?PT.call(t.childNodes):null,a,!r&&n?n:o?o.__e:t.firstChild,r),vA(a,e)}PT=qT.slice,LT={__e:function(e,t,n,r){for(var o,a,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((a=o.constructor)&&null!=a.getDerivedStateFromError&&(o.setState(a.getDerivedStateFromError(e)),s=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),s=o.__d),s)return o.__E=o}catch(t){e=t}throw e}},FT=0,zT=function(e){return null!=e&&void 0===e.constructor},HT=!1,aA.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=KT({},this.state),"function"==typeof e&&(e=e(KT({},n),this.props)),e&&KT(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),cA(this))},aA.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),cA(this))},aA.prototype.render=eA,VT=[],WT="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,dA.__r=0,UT=0;var SA,CA,_A,jA=[],EA=[],NA=LT.__b,DA=LT.__r,TA=LT.diffed,AA=LT.__c,RA=LT.unmount;function MA(){for(var e;e=jA.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(PA),e.__H.__h.forEach(LA),e.__H.__h=[]}catch(t){e.__H.__h=[],LT.__e(t,e.__v)}}LT.__b=function(e){SA=null,NA&&NA(e)},LT.__r=function(e){DA&&DA(e);var t=(SA=e.__c).__H;t&&(CA===SA?(t.__h=[],SA.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=EA,e.__N=e.i=void 0}))):(t.__h.forEach(PA),t.__h.forEach(LA),t.__h=[])),CA=SA},LT.diffed=function(e){TA&&TA(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==jA.push(t)&&_A===LT.requestAnimationFrame||((_A=LT.requestAnimationFrame)||IA)(MA)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==EA&&(e.__=e.__V),e.i=void 0,e.__V=EA}))),CA=SA=null},LT.__c=function(e,t){t.some((function(e){try{e.__h.forEach(PA),e.__h=e.__h.filter((function(e){return!e.__||LA(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],LT.__e(n,e.__v)}})),AA&&AA(e,t)},LT.unmount=function(e){RA&&RA(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{PA(e)}catch(e){t=e}})),n.__H=void 0,t&&LT.__e(t,n.__v))};var OA="function"==typeof requestAnimationFrame;function IA(e){var t,n=function(){clearTimeout(r),OA&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);OA&&(t=requestAnimationFrame(n))}function PA(e){var t=SA,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),SA=t}function LA(e){var t=SA;e.__c=e.__(),SA=t}function FA(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function zA(e){this.props=e}(zA.prototype=new aA).isPureReactComponent=!0,zA.prototype.shouldComponentUpdate=function(e,t){return FA(this.props,e)||FA(this.state,t)};var HA=LT.__b;LT.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),HA&&HA(e)},"undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref");var VA=LT.__e;LT.__e=function(e,t,n,r){if(e.then)for(var o,a=t;a=a.__;)if((o=a.__c)&&o.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t);VA(e,t,n,r)};var BA=LT.unmount;function WA(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=function(e,t){for(var n in t)e[n]=t[n];return e}({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return WA(e,t,n)}))),e}function UA(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return UA(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function $A(){this.__u=0,this.t=null,this.__b=null}function GA(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function YA(){this.u=null,this.o=null}LT.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),BA&&BA(e)},($A.prototype=new aA).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var o=GA(r.__v),a=!1,s=function(){a||(a=!0,n.__R=null,o?o(i):i())};n.__R=s;var i=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=UA(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},l=!0===t.__h;r.__u++||l||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},$A.prototype.componentWillUnmount=function(){this.t=[]},$A.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=WA(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&JT(eA,null,e.fallback);return o&&(o.__h=null),[JT(eA,null,t.__a?null:e.children),o]};var qA=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function ZA(e){return this.getChildContext=function(){return e.context},e.children}function KA(e){var t=this,n=e.i;t.componentWillUnmount=function(){kA(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),e.__v?(t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(e){this.childNodes.push(e),t.i.appendChild(e)},insertBefore:function(e,n){this.childNodes.push(e),t.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.i.removeChild(e)}}),kA(JT(ZA,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}(YA.prototype=new aA).__a=function(e){var t=this,n=GA(t.__v),r=t.o.get(e);return r[0]++,function(o){var a=function(){t.props.revealOrder?(r.push(o),qA(t,e,r)):o()};n?n(a):a()}},YA.prototype.render=function(e){this.u=null,this.o=new Map;var t=hA(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},YA.prototype.componentDidUpdate=YA.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){qA(e,n,t)}))};var QA="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,JA=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,XA="undefined"!=typeof document,eR=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};aA.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(aA.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var tR=LT.event;function nR(){}function rR(){return this.cancelBubble}function oR(){return this.defaultPrevented}LT.event=function(e){return tR&&(e=tR(e)),e.persist=nR,e.isPropagationStopped=rR,e.isDefaultPrevented=oR,e.nativeEvent=e};var aR={configurable:!0,get:function(){return this.class}},sR=LT.vnode;LT.vnode=function(e){var t=e.type,n=e.props,r=n;if("string"==typeof t){var o=-1===t.indexOf("-");for(var a in r={},n){var s=n[a];XA&&"children"===a&&"noscript"===t||"value"===a&&"defaultValue"in n&&null==s||("defaultValue"===a&&"value"in n&&null==n.value?a="value":"download"===a&&!0===s?s="":/ondoubleclick/i.test(a)?a="ondblclick":/^onchange(textarea|input)/i.test(a+t)&&!eR(n.type)?a="oninput":/^onfocus$/i.test(a)?a="onfocusin":/^onblur$/i.test(a)?a="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(a)?a=a.toLowerCase():o&&JA.test(a)?a=a.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===s&&(s=void 0),/^oninput$/i.test(a)&&(a=a.toLowerCase(),r[a]&&(a="oninputCapture")),r[a]=s)}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=hA(n.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==t&&null!=r.defaultValue&&(r.value=hA(n.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r,n.class!=n.className&&(aR.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",aR))}e.$$typeof=QA,sR&&sR(e)};var iR=LT.__r;LT.__r=function(e){iR&&iR(e),e.__c};const lR=[],cR=new Map;function dR(e){lR.push(e),cR.forEach((t=>{fR(t,e)}))}function uR(e){let t=cR.get(e);if(!t||!t.isConnected){if(t=e.querySelector("style[data-fullcalendar]"),!t){t=document.createElement("style"),t.setAttribute("data-fullcalendar","");const n=(void 0===hR&&(hR=function(){const e=document.querySelector('meta[name="csp-nonce"]');if(e&&e.hasAttribute("content"))return e.getAttribute("content");const t=document.querySelector("script[nonce]");return t&&t.nonce||""}()),hR);n&&(t.nonce=n);const r=e===document?document.head:e,o=e===document?r.querySelector("script,link[rel=stylesheet],link[as=style],style"):r.firstChild;r.insertBefore(t,o)}cR.set(e,t),function(e){for(const t of lR)fR(e,t)}(t)}}function fR(e,t){const{sheet:n}=e,r=n.cssRules.length;t.split("}").forEach(((e,t)=>{(e=e.trim())&&n.insertRule(e+"}",r+t)}))}let hR;"undefined"!=typeof document&&uR(document),dR(':root{--fc-small-font-size:.85em;--fc-page-bg-color:#fff;--fc-neutral-bg-color:hsla(0,0%,82%,.3);--fc-neutral-text-color:grey;--fc-border-color:#ddd;--fc-button-text-color:#fff;--fc-button-bg-color:#2c3e50;--fc-button-border-color:#2c3e50;--fc-button-hover-bg-color:#1e2b37;--fc-button-hover-border-color:#1a252f;--fc-button-active-bg-color:#1a252f;--fc-button-active-border-color:#151e27;--fc-event-bg-color:#3788d8;--fc-event-border-color:#3788d8;--fc-event-text-color:#fff;--fc-event-selected-overlay-color:rgba(0,0,0,.25);--fc-more-link-bg-color:#d0d0d0;--fc-more-link-text-color:inherit;--fc-event-resizer-thickness:8px;--fc-event-resizer-dot-total-width:8px;--fc-event-resizer-dot-border-width:1px;--fc-non-business-color:hsla(0,0%,84%,.3);--fc-bg-event-color:#8fdf82;--fc-bg-event-opacity:0.3;--fc-highlight-color:rgba(188,232,241,.3);--fc-today-bg-color:rgba(255,220,40,.15);--fc-now-indicator-color:red}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc{display:flex;flex-direction:column;font-size:1em}.fc,.fc *,.fc :after,.fc :before{box-sizing:border-box}.fc table{border-collapse:collapse;border-spacing:0;font-size:1em}.fc th{text-align:center}.fc td,.fc th{padding:0;vertical-align:top}.fc a[data-navlink]{cursor:pointer}.fc a[data-navlink]:hover{text-decoration:underline}.fc-direction-ltr{direction:ltr;text-align:left}.fc-direction-rtl{direction:rtl;text-align:right}.fc-theme-standard td,.fc-theme-standard th{border:1px solid var(--fc-border-color)}.fc-liquid-hack td,.fc-liquid-hack th{position:relative}@font-face{font-family:fcicons;font-style:normal;font-weight:400;src:url("data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAXVtKNAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZgYydxIAAAF4AAAFNGhlYWQUJ7cIAAAGrAAAADZoaGVhB20DzAAABuQAAAAkaG10eCIABhQAAAcIAAAALGxvY2ED4AU6AAAHNAAAABhtYXhwAA8AjAAAB0wAAAAgbmFtZXsr690AAAdsAAABhnBvc3QAAwAAAAAI9AAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpBgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6Qb//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAWIAjQKeAskAEwAAJSc3NjQnJiIHAQYUFwEWMjc2NCcCnuLiDQ0MJAz/AA0NAQAMJAwNDcni4gwjDQwM/wANIwz/AA0NDCMNAAAAAQFiAI0CngLJABMAACUBNjQnASYiBwYUHwEHBhQXFjI3AZ4BAA0N/wAMJAwNDeLiDQ0MJAyNAQAMIw0BAAwMDSMM4uINIwwNDQAAAAIA4gC3Ax4CngATACcAACUnNzY0JyYiDwEGFB8BFjI3NjQnISc3NjQnJiIPAQYUHwEWMjc2NCcB87e3DQ0MIw3VDQ3VDSMMDQ0BK7e3DQ0MJAzVDQ3VDCQMDQ3zuLcMJAwNDdUNIwzWDAwNIwy4twwkDA0N1Q0jDNYMDA0jDAAAAgDiALcDHgKeABMAJwAAJTc2NC8BJiIHBhQfAQcGFBcWMjchNzY0LwEmIgcGFB8BBwYUFxYyNwJJ1Q0N1Q0jDA0Nt7cNDQwjDf7V1Q0N1QwkDA0Nt7cNDQwkDLfWDCMN1Q0NDCQMt7gMIw0MDNYMIw3VDQ0MJAy3uAwjDQwMAAADAFUAAAOrA1UAMwBoAHcAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMhMjY1NCYjISIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAAVYRGRkR/qoRGRkRA1UFBAUOCQkVDAsZDf2rDRkLDBUJCA4FBQUFBQUOCQgVDAsZDQJVDRkLDBUJCQ4FBAVVAgECBQMCBwQECAX9qwQJAwQHAwMFAQICAgIBBQMDBwQDCQQCVQUIBAQHAgMFAgEC/oAZEhEZGRESGQAAAAADAFUAAAOrA1UAMwBoAIkAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMzFRQWMzI2PQEzMjY1NCYrATU0JiMiBh0BIyIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAgBkSEhmAERkZEYAZEhIZgBEZGREDVQUEBQ4JCRUMCxkN/asNGQsMFQkIDgUFBQUFBQ4JCBUMCxkNAlUNGQsMFQkJDgUEBVUCAQIFAwIHBAQIBf2rBAkDBAcDAwUBAgICAgEFAwMHBAMJBAJVBQgEBAcCAwUCAQL+gIASGRkSgBkSERmAEhkZEoAZERIZAAABAOIAjQMeAskAIAAAExcHBhQXFjI/ARcWMjc2NC8BNzY0JyYiDwEnJiIHBhQX4uLiDQ0MJAzi4gwkDA0N4uINDQwkDOLiDCQMDQ0CjeLiDSMMDQ3h4Q0NDCMN4uIMIw0MDOLiDAwNIwwAAAABAAAAAQAAa5n0y18PPPUACwQAAAAAANivOVsAAAAA2K85WwAAAAADqwNVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOrAAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWIEAAFiBAAA4gQAAOIEAABVBAAAVQQAAOIAAAAAAAoAFAAeAEQAagCqAOoBngJkApoAAQAAAAsAigADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=") format("truetype")}.fc-icon{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font-family:fcicons!important;font-style:normal;font-variant:normal;font-weight:400;height:1em;line-height:1;text-align:center;text-transform:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:1em}.fc-icon-chevron-left:before{content:"\\e900"}.fc-icon-chevron-right:before{content:"\\e901"}.fc-icon-chevrons-left:before{content:"\\e902"}.fc-icon-chevrons-right:before{content:"\\e903"}.fc-icon-minus-square:before{content:"\\e904"}.fc-icon-plus-square:before{content:"\\e905"}.fc-icon-x:before{content:"\\e906"}.fc .fc-button{border-radius:0;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none}.fc .fc-button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.fc .fc-button{-webkit-appearance:button}.fc .fc-button:not(:disabled){cursor:pointer}.fc .fc-button{background-color:transparent;border:1px solid transparent;border-radius:.25em;display:inline-block;font-size:1em;font-weight:400;line-height:1.5;padding:.4em .65em;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle}.fc .fc-button:hover{text-decoration:none}.fc .fc-button:focus{box-shadow:0 0 0 .2rem rgba(44,62,80,.25);outline:0}.fc .fc-button:disabled{opacity:.65}.fc .fc-button-primary{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:hover{background-color:var(--fc-button-hover-bg-color);border-color:var(--fc-button-hover-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:disabled{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button-primary:not(:disabled).fc-button-active,.fc .fc-button-primary:not(:disabled):active{background-color:var(--fc-button-active-bg-color);border-color:var(--fc-button-active-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:not(:disabled).fc-button-active:focus,.fc .fc-button-primary:not(:disabled):active:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button .fc-icon{font-size:1.5em;vertical-align:middle}.fc .fc-button-group{display:inline-flex;position:relative;vertical-align:middle}.fc .fc-button-group>.fc-button{flex:1 1 auto;position:relative}.fc .fc-button-group>.fc-button.fc-button-active,.fc .fc-button-group>.fc-button:active,.fc .fc-button-group>.fc-button:focus,.fc .fc-button-group>.fc-button:hover{z-index:1}.fc-direction-ltr .fc-button-group>.fc-button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0;margin-left:-1px}.fc-direction-ltr .fc-button-group>.fc-button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.fc-direction-rtl .fc-button-group>.fc-button:not(:first-child){border-bottom-right-radius:0;border-top-right-radius:0;margin-right:-1px}.fc-direction-rtl .fc-button-group>.fc-button:not(:last-child){border-bottom-left-radius:0;border-top-left-radius:0}.fc .fc-toolbar{align-items:center;display:flex;justify-content:space-between}.fc .fc-toolbar.fc-header-toolbar{margin-bottom:1.5em}.fc .fc-toolbar.fc-footer-toolbar{margin-top:1.5em}.fc .fc-toolbar-title{font-size:1.75em;margin:0}.fc-direction-ltr .fc-toolbar>*>:not(:first-child){margin-left:.75em}.fc-direction-rtl .fc-toolbar>*>:not(:first-child){margin-right:.75em}.fc-direction-rtl .fc-toolbar-ltr{flex-direction:row-reverse}.fc .fc-scroller{-webkit-overflow-scrolling:touch;position:relative}.fc .fc-scroller-liquid{height:100%}.fc .fc-scroller-liquid-absolute{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-scroller-harness{direction:ltr;overflow:hidden;position:relative}.fc .fc-scroller-harness-liquid{height:100%}.fc-direction-rtl .fc-scroller-harness>.fc-scroller{direction:rtl}.fc-theme-standard .fc-scrollgrid{border:1px solid var(--fc-border-color)}.fc .fc-scrollgrid,.fc .fc-scrollgrid table{table-layout:fixed;width:100%}.fc .fc-scrollgrid table{border-left-style:hidden;border-right-style:hidden;border-top-style:hidden}.fc .fc-scrollgrid{border-bottom-width:0;border-collapse:separate;border-right-width:0}.fc .fc-scrollgrid-liquid{height:100%}.fc .fc-scrollgrid-section,.fc .fc-scrollgrid-section table,.fc .fc-scrollgrid-section>td{height:1px}.fc .fc-scrollgrid-section-liquid>td{height:100%}.fc .fc-scrollgrid-section>*{border-left-width:0;border-top-width:0}.fc .fc-scrollgrid-section-footer>*,.fc .fc-scrollgrid-section-header>*{border-bottom-width:0}.fc .fc-scrollgrid-section-body table,.fc .fc-scrollgrid-section-footer table{border-bottom-style:hidden}.fc .fc-scrollgrid-section-sticky>*{background:var(--fc-page-bg-color);position:sticky;z-index:3}.fc .fc-scrollgrid-section-header.fc-scrollgrid-section-sticky>*{top:0}.fc .fc-scrollgrid-section-footer.fc-scrollgrid-section-sticky>*{bottom:0}.fc .fc-scrollgrid-sticky-shim{height:1px;margin-bottom:-1px}.fc-sticky{position:sticky}.fc .fc-view-harness{flex-grow:1;position:relative}.fc .fc-view-harness-active>.fc-view{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-col-header-cell-cushion{display:inline-block;padding:2px 4px}.fc .fc-bg-event,.fc .fc-highlight,.fc .fc-non-business{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-non-business{background:var(--fc-non-business-color)}.fc .fc-bg-event{background:var(--fc-bg-event-color);opacity:var(--fc-bg-event-opacity)}.fc .fc-bg-event .fc-event-title{font-size:var(--fc-small-font-size);font-style:italic;margin:.5em}.fc .fc-highlight{background:var(--fc-highlight-color)}.fc .fc-cell-shaded,.fc .fc-day-disabled{background:var(--fc-neutral-bg-color)}a.fc-event,a.fc-event:hover{text-decoration:none}.fc-event.fc-event-draggable,.fc-event[href]{cursor:pointer}.fc-event .fc-event-main{position:relative;z-index:2}.fc-event-dragging:not(.fc-event-selected){opacity:.75}.fc-event-dragging.fc-event-selected{box-shadow:0 2px 7px rgba(0,0,0,.3)}.fc-event .fc-event-resizer{display:none;position:absolute;z-index:4}.fc-event-selected .fc-event-resizer,.fc-event:hover .fc-event-resizer{display:block}.fc-event-selected .fc-event-resizer{background:var(--fc-page-bg-color);border-color:inherit;border-radius:calc(var(--fc-event-resizer-dot-total-width)/2);border-style:solid;border-width:var(--fc-event-resizer-dot-border-width);height:var(--fc-event-resizer-dot-total-width);width:var(--fc-event-resizer-dot-total-width)}.fc-event-selected .fc-event-resizer:before{bottom:-20px;content:"";left:-20px;position:absolute;right:-20px;top:-20px}.fc-event-selected,.fc-event:focus{box-shadow:0 2px 5px rgba(0,0,0,.2)}.fc-event-selected:before,.fc-event:focus:before{bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:3}.fc-event-selected:after,.fc-event:focus:after{background:var(--fc-event-selected-overlay-color);bottom:-1px;content:"";left:-1px;position:absolute;right:-1px;top:-1px;z-index:1}.fc-h-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-h-event .fc-event-main{color:var(--fc-event-text-color)}.fc-h-event .fc-event-main-frame{display:flex}.fc-h-event .fc-event-time{max-width:100%;overflow:hidden}.fc-h-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-width:0}.fc-h-event .fc-event-title{display:inline-block;left:0;max-width:100%;overflow:hidden;right:0;vertical-align:top}.fc-h-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-start),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-end){border-bottom-left-radius:0;border-left-width:0;border-top-left-radius:0}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-end),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-start){border-bottom-right-radius:0;border-right-width:0;border-top-right-radius:0}.fc-h-event:not(.fc-event-selected) .fc-event-resizer{bottom:0;top:0;width:var(--fc-event-resizer-thickness)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end{cursor:w-resize;left:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start{cursor:e-resize;right:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-h-event.fc-event-selected .fc-event-resizer{margin-top:calc(var(--fc-event-resizer-dot-total-width)*-.5);top:50%}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end{left:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start{right:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc .fc-popover{box-shadow:0 2px 6px rgba(0,0,0,.15);position:absolute;z-index:9999}.fc .fc-popover-header{align-items:center;display:flex;flex-direction:row;justify-content:space-between;padding:3px 4px}.fc .fc-popover-title{margin:0 2px}.fc .fc-popover-close{cursor:pointer;font-size:1.1em;opacity:.65}.fc-theme-standard .fc-popover{background:var(--fc-page-bg-color);border:1px solid var(--fc-border-color)}.fc-theme-standard .fc-popover-header{background:var(--fc-neutral-bg-color)}');class mR{constructor(e){this.drainedOption=e,this.isRunning=!1,this.isDirty=!1,this.pauseDepths={},this.timeoutId=0}request(e){this.isDirty=!0,this.isPaused()||(this.clearTimeout(),null==e?this.tryDrain():this.timeoutId=setTimeout(this.tryDrain.bind(this),e))}pause(e=""){let{pauseDepths:t}=this;t[e]=(t[e]||0)+1,this.clearTimeout()}resume(e="",t){let{pauseDepths:n}=this;e in n&&(t?delete n[e]:(n[e]-=1,n[e]<=0&&delete n[e]),this.tryDrain())}isPaused(){return Object.keys(this.pauseDepths).length}tryDrain(){if(!this.isRunning&&!this.isPaused()){for(this.isRunning=!0;this.isDirty;)this.isDirty=!1,this.drained();this.isRunning=!1}}clear(){this.clearTimeout(),this.isDirty=!1,this.pauseDepths={}}clearTimeout(){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=0)}drained(){this.drainedOption&&this.drainedOption()}}function pR(e){e.parentNode&&e.parentNode.removeChild(e)}function gR(e,t){if(e.closest)return e.closest(t);if(!document.documentElement.contains(e))return null;do{if(vR(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}function vR(e,t){return(e.matches||e.matchesSelector||e.msMatchesSelector).call(e,t)}const yR=/(top|left|right|bottom|width|height)$/i;function bR(e,t,n){null==n?e.style[t]="":"number"==typeof n&&yR.test(t)?e.style[t]=`${n}px`:e.style[t]=n}let xR=0;function wR(){return xR+=1,"fc-dom-"+xR}function kR(e,t,n,r){let o=function(e,t){return n=>{let r=gR(n.target,e);r&&t.call(r,n,r)}}(n,r);return e.addEventListener(t,o),()=>{e.removeEventListener(t,o)}}function SR(e){return Object.assign({onClick:e},CR(e))}function CR(e){return{tabIndex:0,onKeyDown(t){"Enter"!==t.key&&" "!==t.key||(e(t),t.preventDefault())}}}let _R=0;function jR(){return _R+=1,String(_R)}function ER(e,t,n){return n.func?n.func(e,t):function(e,t){return e||t?null==t?-1:null==e?1:"string"==typeof e||"string"==typeof t?String(e).localeCompare(String(t)):e-t:0}(e[n.field],t[n.field])*(n.order||1)}function NR(e,t){let n=String(e);return"000".substr(0,t-n.length)+n}function DR(e,t,n){return"function"==typeof e?e(...t):"string"==typeof e?t.reduce(((e,t,n)=>e.replace("$"+n,t||"")),e):n}function TR(e){return e%1==0}function AR(e){let t=e.querySelector(".fc-scrollgrid-shrink-frame"),n=e.querySelector(".fc-scrollgrid-shrink-cushion");if(!t)throw new Error("needs fc-scrollgrid-shrink-frame className");if(!n)throw new Error("needs fc-scrollgrid-shrink-cushion className");return e.getBoundingClientRect().width-t.getBoundingClientRect().width+n.getBoundingClientRect().width}const RR=["years","months","days","milliseconds"],MR=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function OR(e,t){return"string"==typeof e?function(e){let t=MR.exec(e);if(t){let e=t[1]?-1:1;return{years:0,months:0,days:e*(t[2]?parseInt(t[2],10):0),milliseconds:e*(60*(t[3]?parseInt(t[3],10):0)*60*1e3+60*(t[4]?parseInt(t[4],10):0)*1e3+1e3*(t[5]?parseInt(t[5],10):0)+(t[6]?parseInt(t[6],10):0))}}return null}(e):"object"==typeof e&&e?IR(e):"number"==typeof e?IR({[t||"milliseconds"]:e}):null}function IR(e){let t={years:e.years||e.year||0,months:e.months||e.month||0,days:e.days||e.day||0,milliseconds:60*(e.hours||e.hour||0)*60*1e3+60*(e.minutes||e.minute||0)*1e3+1e3*(e.seconds||e.second||0)+(e.milliseconds||e.millisecond||e.ms||0)},n=e.weeks||e.week;return n&&(t.days+=7*n,t.specifiedWeeks=!0),t}function PR(e,t){return{years:e.years+t.years,months:e.months+t.months,days:e.days+t.days,milliseconds:e.milliseconds+t.milliseconds}}function LR(e){return FR(e)/864e5}function FR(e){return 31536e6*e.years+2592e6*e.months+864e5*e.days+e.milliseconds}function zR(e,t){let n=null;for(let r=0;r<RR.length;r+=1){let o=RR[r];if(t[o]){let r=e[o]/t[o];if(!TR(r)||null!==n&&n!==r)return null;n=r}else if(e[o])return null}return n}function HR(e){let t=e.milliseconds;if(t){if(t%1e3!=0)return{unit:"millisecond",value:t};if(t%6e4!=0)return{unit:"second",value:t/1e3};if(t%36e5!=0)return{unit:"minute",value:t/6e4};if(t)return{unit:"hour",value:t/36e5}}return e.days?e.specifiedWeeks&&e.days%7==0?{unit:"week",value:e.days/7}:{unit:"day",value:e.days}:e.months?{unit:"month",value:e.months}:e.years?{unit:"year",value:e.years}:{unit:"millisecond",value:0}}function VR(e,t,n){if(e===t)return!0;let r,o=e.length;if(o!==t.length)return!1;for(r=0;r<o;r+=1)if(!(n?n(e[r],t[r]):e[r]===t[r]))return!1;return!0}const BR=["sun","mon","tue","wed","thu","fri","sat"];function WR(e,t){let n=XR(e);return n[2]+=7*t,eM(n)}function UR(e,t){let n=XR(e);return n[2]+=t,eM(n)}function $R(e,t){let n=XR(e);return n[6]+=t,eM(n)}function GR(e,t){return(t.valueOf()-e.valueOf())/864e5}function YR(e,t){return nM(e)===nM(t)?Math.round(GR(e,t)):null}function qR(e){return eM([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()])}function ZR(e,t,n,r){let o=eM([t,0,1+KR(t,n,r)]),a=qR(e),s=Math.round(GR(o,a));return Math.floor(s/7)+1}function KR(e,t,n){let r=7+t-n;return-(7+eM([e,0,r]).getUTCDay()-t)%7+r-1}function QR(e){return[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()]}function JR(e){return new Date(e[0],e[1]||0,null==e[2]?1:e[2],e[3]||0,e[4]||0,e[5]||0)}function XR(e){return[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()]}function eM(e){return 1===e.length&&(e=e.concat([0])),new Date(Date.UTC(...e))}function tM(e){return!isNaN(e.valueOf())}function nM(e){return 1e3*e.getUTCHours()*60*60+1e3*e.getUTCMinutes()*60+1e3*e.getUTCSeconds()+e.getUTCMilliseconds()}function rM(e,t,n=!1){let r=e.toISOString();return r=r.replace(".000",""),n&&(r=r.replace("T00:00:00Z","")),r.length>10&&(null==t?r=r.replace("Z",""):0!==t&&(r=r.replace("Z",aM(t,!0)))),r}function oM(e){return e.toISOString().replace(/T.*$/,"")}function aM(e,t=!1){let n=e<0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),a=Math.round(r%60);return t?`${n+NR(o,2)}:${NR(a,2)}`:`GMT${n}${o}${a?`:${NR(a,2)}`:""}`}function sM(e,t,n){let r,o;return function(...a){if(r){if(!VR(r,a)){n&&n(o);let r=e.apply(this,a);t&&t(r,o)||(o=r)}}else o=e.apply(this,a);return r=a,o}}function iM(e,t,n){let r,o;return a=>{if(r){if(!zM(r,a)){n&&n(o);let r=e.call(this,a);t&&t(r,o)||(o=r)}}else o=e.call(this,a);return r=a,o}}const lM={week:3,separator:9,omitZeroMinute:9,meridiem:9,omitCommas:9},cM={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},dM=/\s*([ap])\.?m\.?/i,uM=/,/g,fM=/\s+/g,hM=/\u200e/g,mM=/UTC|GMT/;class pM{constructor(e){let t={},n={},r=9;for(let o in e)o in lM?(n[o]=e[o],lM[o]<9&&(r=Math.min(lM[o],r))):(t[o]=e[o],o in cM&&(r=Math.min(cM[o],r)));this.standardDateProps=t,this.extendedSettings=n,this.smallestUnitNum=r,this.buildFormattingFunc=sM(gM)}format(e,t){return this.buildFormattingFunc(this.standardDateProps,this.extendedSettings,t)(e)}formatRange(e,t,n,r){let{standardDateProps:o,extendedSettings:a}=this,s=(i=e.marker,l=t.marker,(c=n.calendarSystem).getMarkerYear(i)!==c.getMarkerYear(l)?5:c.getMarkerMonth(i)!==c.getMarkerMonth(l)?4:c.getMarkerDay(i)!==c.getMarkerDay(l)?2:nM(i)!==nM(l)?1:0);var i,l,c;if(!s)return this.format(e,n);let d=s;!(d>1)||"numeric"!==o.year&&"2-digit"!==o.year||"numeric"!==o.month&&"2-digit"!==o.month||"numeric"!==o.day&&"2-digit"!==o.day||(d=1);let u=this.format(e,n),f=this.format(t,n);if(u===f)return u;let h=function(e,t){let n={};for(let r in e)(!(r in cM)||cM[r]<=t)&&(n[r]=e[r]);return n}(o,d),m=gM(h,a,n),p=m(e),g=m(t),v=function(e,t,n,r){let o=0;for(;o<e.length;){let a=e.indexOf(t,o);if(-1===a)break;let s=e.substr(0,a);o=a+t.length;let i=e.substr(o),l=0;for(;l<n.length;){let e=n.indexOf(r,l);if(-1===e)break;let t=n.substr(0,e);l=e+r.length;let o=n.substr(l);if(s===t&&i===o)return{before:s,after:i}}}return null}(u,p,f,g),y=a.separator||r||n.defaultSeparator||"";return v?v.before+p+y+g+v.after:u+y+f}getSmallestUnit(){switch(this.smallestUnitNum){case 7:case 6:case 5:return"year";case 4:return"month";case 3:return"week";case 2:return"day";default:return"time"}}}function gM(e,t,n){let r=Object.keys(e).length;return 1===r&&"short"===e.timeZoneName?e=>aM(e.timeZoneOffset):0===r&&t.week?e=>function(e,t,n,r,o){let a=[];return"long"===o?a.push(n):"short"!==o&&"narrow"!==o||a.push(t),"long"!==o&&"short"!==o||a.push(" "),a.push(r.simpleNumberFormat.format(e)),"rtl"===r.options.direction&&a.reverse(),a.join("")}(n.computeWeekNumber(e.marker),n.weekText,n.weekTextLong,n.locale,t.week):function(e,t,n){e=Object.assign({},e),t=Object.assign({},t),function(e,t){e.timeZoneName&&(e.hour||(e.hour="2-digit"),e.minute||(e.minute="2-digit")),"long"===e.timeZoneName&&(e.timeZoneName="short"),t.omitZeroMinute&&(e.second||e.millisecond)&&delete t.omitZeroMinute}(e,t),e.timeZone="UTC";let r,o=new Intl.DateTimeFormat(n.locale.codes,e);if(t.omitZeroMinute){let t=Object.assign({},e);delete t.minute,r=new Intl.DateTimeFormat(n.locale.codes,t)}return a=>{let s,{marker:i}=a;return s=r&&!i.getUTCMinutes()?r:o,function(e,t,n,r,o){return e=e.replace(hM,""),"short"===n.timeZoneName&&(e=function(e,t){let n=!1;return e=e.replace(mM,(()=>(n=!0,t))),n||(e+=` ${t}`),e}(e,"UTC"===o.timeZone||null==t.timeZoneOffset?"UTC":aM(t.timeZoneOffset))),r.omitCommas&&(e=e.replace(uM,"").trim()),r.omitZeroMinute&&(e=e.replace(":00","")),!1===r.meridiem?e=e.replace(dM,"").trim():"narrow"===r.meridiem?e=e.replace(dM,((e,t)=>t.toLocaleLowerCase())):"short"===r.meridiem?e=e.replace(dM,((e,t)=>`${t.toLocaleLowerCase()}m`)):"lowercase"===r.meridiem&&(e=e.replace(dM,(e=>e.toLocaleLowerCase()))),e=(e=e.replace(fM," ")).trim()}(s.format(i),a,e,t,n)}}(e,t,n)}function vM(e,t){let n=t.markerToArray(e.marker);return{marker:e.marker,timeZoneOffset:e.timeZoneOffset,array:n,year:n[0],month:n[1],day:n[2],hour:n[3],minute:n[4],second:n[5],millisecond:n[6]}}function yM(e,t,n,r){let o=vM(e,n.calendarSystem);return{date:o,start:o,end:t?vM(t,n.calendarSystem):null,timeZone:n.timeZone,localeCodes:n.locale.codes,defaultSeparator:r||n.defaultSeparator}}class bM{constructor(e){this.cmdStr=e}format(e,t,n){return t.cmdFormatter(this.cmdStr,yM(e,null,t,n))}formatRange(e,t,n,r){return n.cmdFormatter(this.cmdStr,yM(e,t,n,r))}}class xM{constructor(e){this.func=e}format(e,t,n){return this.func(yM(e,null,t,n))}formatRange(e,t,n,r){return this.func(yM(e,t,n,r))}}function wM(e){return"object"==typeof e&&e?new pM(e):"string"==typeof e?new bM(e):"function"==typeof e?new xM(e):null}const kM={navLinkDayClick:RM,navLinkWeekClick:RM,duration:OR,bootstrapFontAwesome:RM,buttonIcons:RM,customButtons:RM,defaultAllDayEventDuration:OR,defaultTimedEventDuration:OR,nextDayThreshold:OR,scrollTime:OR,scrollTimeReset:Boolean,slotMinTime:OR,slotMaxTime:OR,dayPopoverFormat:wM,slotDuration:OR,snapDuration:OR,headerToolbar:RM,footerToolbar:RM,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:wM,dayHeaderClassNames:RM,dayHeaderContent:RM,dayHeaderDidMount:RM,dayHeaderWillUnmount:RM,dayCellClassNames:RM,dayCellContent:RM,dayCellDidMount:RM,dayCellWillUnmount:RM,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:RM,weekNumbers:Boolean,weekNumberClassNames:RM,weekNumberContent:RM,weekNumberDidMount:RM,weekNumberWillUnmount:RM,editable:Boolean,viewClassNames:RM,viewDidMount:RM,viewWillUnmount:RM,nowIndicator:Boolean,nowIndicatorSnap:RM,nowIndicatorClassNames:RM,nowIndicatorContent:RM,nowIndicatorDidMount:RM,nowIndicatorWillUnmount:RM,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:RM,locale:RM,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:RM,eventOrder:function(e){let t,n,r=[],o=[];for("string"==typeof e?o=e.split(/\s*,\s*/):"function"==typeof e?o=[e]:Array.isArray(e)&&(o=e),t=0;t<o.length;t+=1)n=o[t],"string"==typeof n?r.push("-"===n.charAt(0)?{field:n.substring(1),order:-1}:{field:n,order:1}):"function"==typeof n&&r.push({func:n});return r},eventOrderStrict:Boolean,handleWindowResize:Boolean,windowResizeDelay:Number,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:RM,contentHeight:RM,direction:String,weekNumberFormat:wM,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,weekText:String,weekTextLong:String,progressiveEventRendering:Boolean,businessHours:RM,initialDate:RM,now:RM,eventDataTransform:RM,stickyHeaderDates:RM,stickyFooterScrollbar:RM,viewHeight:RM,defaultAllDay:Boolean,eventSourceFailure:RM,eventSourceSuccess:RM,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:RM,eventConstraint:RM,eventAllow:RM,eventBackgroundColor:String,eventBorderColor:String,eventTextColor:String,eventColor:String,eventClassNames:RM,eventContent:RM,eventDidMount:RM,eventWillUnmount:RM,selectConstraint:RM,selectOverlap:RM,selectAllow:RM,droppable:Boolean,unselectCancel:String,slotLabelFormat:RM,slotLaneClassNames:RM,slotLaneContent:RM,slotLaneDidMount:RM,slotLaneWillUnmount:RM,slotLabelClassNames:RM,slotLabelContent:RM,slotLabelDidMount:RM,slotLabelWillUnmount:RM,dayMaxEvents:RM,dayMaxEventRows:RM,dayMinWidth:Number,slotLabelInterval:OR,allDayText:String,allDayClassNames:RM,allDayContent:RM,allDayDidMount:RM,allDayWillUnmount:RM,slotMinWidth:Number,navLinks:Boolean,eventTimeFormat:wM,rerenderDelay:Number,moreLinkText:RM,moreLinkHint:RM,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMaxStack:Number,eventMinHeight:Number,eventMinWidth:Number,eventShortHeight:Number,slotEventOverlap:Boolean,plugins:RM,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:OR,hiddenDays:RM,fixedWeekCount:Boolean,validRange:RM,visibleRange:RM,titleFormat:RM,eventInteractive:Boolean,noEventsText:String,viewHint:RM,navLinkHint:RM,closeHint:String,timeHint:String,eventHint:String,moreLinkClick:RM,moreLinkClassNames:RM,moreLinkContent:RM,moreLinkDidMount:RM,moreLinkWillUnmount:RM,monthStartFormat:wM,handleCustomRendering:RM,customRenderingMetaMap:RM,customRenderingReplaces:Boolean},SM={eventDisplay:"auto",defaultRangeSeparator:" - ",titleRangeSeparator:" – ",defaultTimedEventDuration:"01:00:00",defaultAllDayEventDuration:{day:1},forceEventDuration:!1,nextDayThreshold:"00:00:00",dayHeaders:!0,initialView:"",aspectRatio:1.35,headerToolbar:{start:"title",center:"",end:"today prev,next"},weekends:!0,weekNumbers:!1,weekNumberCalculation:"local",editable:!1,nowIndicator:!1,scrollTime:"06:00:00",scrollTimeReset:!0,slotMinTime:"00:00:00",slotMaxTime:"24:00:00",showNonCurrentDates:!0,lazyFetching:!0,startParam:"start",endParam:"end",timeZoneParam:"timeZone",timeZone:"local",locales:[],locale:"",themeSystem:"standard",dragRevertDuration:500,dragScroll:!0,allDayMaintainDuration:!1,unselectAuto:!0,dropAccept:"*",eventOrder:"start,-duration,allDay,title",dayPopoverFormat:{month:"long",day:"numeric",year:"numeric"},handleWindowResize:!0,windowResizeDelay:100,longPressDelay:1e3,eventDragMinDistance:5,expandRows:!1,navLinks:!1,selectable:!1,eventMinHeight:15,eventMinWidth:30,eventShortHeight:30,monthStartFormat:{month:"long",day:"numeric"},nowIndicatorSnap:"auto"},CM={datesSet:RM,eventsSet:RM,eventAdd:RM,eventChange:RM,eventRemove:RM,windowResize:RM,eventClick:RM,eventMouseEnter:RM,eventMouseLeave:RM,select:RM,unselect:RM,loading:RM,_unmount:RM,_beforeprint:RM,_afterprint:RM,_noEventDrop:RM,_noEventResize:RM,_resize:RM,_scrollRequest:RM},_M={buttonText:RM,buttonHints:RM,views:RM,plugins:RM,initialEvents:RM,events:RM,eventSources:RM},jM={headerToolbar:EM,footerToolbar:EM,buttonText:EM,buttonHints:EM,buttonIcons:EM,dateIncrement:EM,plugins:NM,events:NM,eventSources:NM,resources:NM};function EM(e,t){return"object"==typeof e&&"object"==typeof t&&e&&t?zM(e,t):e===t}function NM(e,t){return Array.isArray(e)&&Array.isArray(t)?VR(e,t):e===t}const DM={type:String,component:RM,buttonText:String,buttonTextKey:String,dateProfileGeneratorClass:RM,usesMinMaxTime:Boolean,classNames:RM,content:RM,didMount:RM,willUnmount:RM};function TM(e){return OM(e,jM)}function AM(e,t){let n={},r={};for(let r in t)r in e&&(n[r]=t[r](e[r]));for(let n in e)n in t||(r[n]=e[n]);return{refined:n,extra:r}}function RM(e){return e}const{hasOwnProperty:MM}=Object.prototype;function OM(e,t){let n={};if(t)for(let r in t)if(t[r]===EM){let t=[];for(let o=e.length-1;o>=0;o-=1){let a=e[o][r];if("object"==typeof a&&a)t.unshift(a);else if(void 0!==a){n[r]=a;break}}t.length&&(n[r]=OM(t))}for(let t=e.length-1;t>=0;t-=1){let r=e[t];for(let e in r)e in n||(n[e]=r[e])}return n}function IM(e,t){let n={};for(let r in e)t(e[r],r)&&(n[r]=e[r]);return n}function PM(e,t){let n={};for(let r in e)n[r]=t(e[r],r);return n}function LM(e){let t={};for(let n of e)t[n]=!0;return t}function FM(e){let t=[];for(let n in e)t.push(e[n]);return t}function zM(e,t){if(e===t)return!0;for(let n in e)if(MM.call(e,n)&&!(n in t))return!1;for(let n in t)if(MM.call(t,n)&&e[n]!==t[n])return!1;return!0}const HM=/^on[A-Z]/;function VM(e,t,n={}){if(e===t)return!0;for(let s in t)if(!(s in e&&(r=e[s],o=t[s],a=n[s],r===o||!0===a||a&&a(r,o))))return!1;var r,o,a;for(let n in e)if(!(n in t))return!1;return!0}let BM={};var WM;WM=class{getMarkerYear(e){return e.getUTCFullYear()}getMarkerMonth(e){return e.getUTCMonth()}getMarkerDay(e){return e.getUTCDate()}arrayToMarker(e){return eM(e)}markerToArray(e){return XR(e)}},BM.gregory=WM;const UM=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;class $M{constructor(e){let t=this.timeZone=e.timeZone,n="local"!==t&&"UTC"!==t;e.namedTimeZoneImpl&&n&&(this.namedTimeZoneImpl=new e.namedTimeZoneImpl(t)),this.canComputeOffset=Boolean(!n||this.namedTimeZoneImpl),this.calendarSystem=function(e){return new BM[e]}(e.calendarSystem),this.locale=e.locale,this.weekDow=e.locale.week.dow,this.weekDoy=e.locale.week.doy,"ISO"===e.weekNumberCalculation&&(this.weekDow=1,this.weekDoy=4),"number"==typeof e.firstDay&&(this.weekDow=e.firstDay),"function"==typeof e.weekNumberCalculation&&(this.weekNumberFunc=e.weekNumberCalculation),this.weekText=null!=e.weekText?e.weekText:e.locale.options.weekText,this.weekTextLong=(null!=e.weekTextLong?e.weekTextLong:e.locale.options.weekTextLong)||this.weekText,this.cmdFormatter=e.cmdFormatter,this.defaultSeparator=e.defaultSeparator}createMarker(e){let t=this.createMarkerMeta(e);return null===t?null:t.marker}createNowMarker(){return this.canComputeOffset?this.timestampToMarker((new Date).valueOf()):eM(QR(new Date))}createMarkerMeta(e){if("string"==typeof e)return this.parse(e);let t=null;return"number"==typeof e?t=this.timestampToMarker(e):e instanceof Date?(e=e.valueOf(),isNaN(e)||(t=this.timestampToMarker(e))):Array.isArray(e)&&(t=eM(e)),null!==t&&tM(t)?{marker:t,isTimeUnspecified:!1,forcedTzo:null}:null}parse(e){let t=function(e){let t=UM.exec(e);if(t){let e=new Date(Date.UTC(Number(t[1]),t[3]?Number(t[3])-1:0,Number(t[5]||1),Number(t[7]||0),Number(t[8]||0),Number(t[10]||0),t[12]?1e3*Number(`0.${t[12]}`):0));if(tM(e)){let n=null;return t[13]&&(n=("-"===t[15]?-1:1)*(60*Number(t[16]||0)+Number(t[18]||0))),{marker:e,isTimeUnspecified:!t[6],timeZoneOffset:n}}}return null}(e);if(null===t)return null;let{marker:n}=t,r=null;return null!==t.timeZoneOffset&&(this.canComputeOffset?n=this.timestampToMarker(n.valueOf()-60*t.timeZoneOffset*1e3):r=t.timeZoneOffset),{marker:n,isTimeUnspecified:t.isTimeUnspecified,forcedTzo:r}}getYear(e){return this.calendarSystem.getMarkerYear(e)}getMonth(e){return this.calendarSystem.getMarkerMonth(e)}getDay(e){return this.calendarSystem.getMarkerDay(e)}add(e,t){let n=this.calendarSystem.markerToArray(e);return n[0]+=t.years,n[1]+=t.months,n[2]+=t.days,n[6]+=t.milliseconds,this.calendarSystem.arrayToMarker(n)}subtract(e,t){let n=this.calendarSystem.markerToArray(e);return n[0]-=t.years,n[1]-=t.months,n[2]-=t.days,n[6]-=t.milliseconds,this.calendarSystem.arrayToMarker(n)}addYears(e,t){let n=this.calendarSystem.markerToArray(e);return n[0]+=t,this.calendarSystem.arrayToMarker(n)}addMonths(e,t){let n=this.calendarSystem.markerToArray(e);return n[1]+=t,this.calendarSystem.arrayToMarker(n)}diffWholeYears(e,t){let{calendarSystem:n}=this;return nM(e)===nM(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)&&n.getMarkerMonth(e)===n.getMarkerMonth(t)?n.getMarkerYear(t)-n.getMarkerYear(e):null}diffWholeMonths(e,t){let{calendarSystem:n}=this;return nM(e)===nM(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)?n.getMarkerMonth(t)-n.getMarkerMonth(e)+12*(n.getMarkerYear(t)-n.getMarkerYear(e)):null}greatestWholeUnit(e,t){let n=this.diffWholeYears(e,t);return null!==n?{unit:"year",value:n}:(n=this.diffWholeMonths(e,t),null!==n?{unit:"month",value:n}:(n=function(e,t){let n=YR(e,t);return null!==n&&n%7==0?n/7:null}(e,t),null!==n?{unit:"week",value:n}:(n=YR(e,t),null!==n?{unit:"day",value:n}:(n=function(e,t){return(t.valueOf()-e.valueOf())/36e5}(e,t),TR(n)?{unit:"hour",value:n}:(n=function(e,t){return(t.valueOf()-e.valueOf())/6e4}(e,t),TR(n)?{unit:"minute",value:n}:(n=function(e,t){return(t.valueOf()-e.valueOf())/1e3}(e,t),TR(n)?{unit:"second",value:n}:{unit:"millisecond",value:t.valueOf()-e.valueOf()}))))))}countDurationsBetween(e,t,n){let r;return n.years&&(r=this.diffWholeYears(e,t),null!==r)?r/(LR(n)/365):n.months&&(r=this.diffWholeMonths(e,t),null!==r)?r/(LR(n)/30):n.days&&(r=YR(e,t),null!==r)?r/LR(n):(t.valueOf()-e.valueOf())/FR(n)}startOf(e,t){return"year"===t?this.startOfYear(e):"month"===t?this.startOfMonth(e):"week"===t?this.startOfWeek(e):"day"===t?qR(e):"hour"===t?function(e){return eM([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours()])}(e):"minute"===t?function(e){return eM([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes()])}(e):"second"===t?function(e){return eM([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds()])}(e):null}startOfYear(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e)])}startOfMonth(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e)])}startOfWeek(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e),e.getUTCDate()-(e.getUTCDay()-this.weekDow+7)%7])}computeWeekNumber(e){return this.weekNumberFunc?this.weekNumberFunc(this.toDate(e)):function(e,t,n){let r=e.getUTCFullYear(),o=ZR(e,r,t,n);if(o<1)return ZR(e,r-1,t,n);let a=ZR(e,r+1,t,n);return a>=1?Math.min(o,a):o}(e,this.weekDow,this.weekDoy)}format(e,t,n={}){return t.format({marker:e,timeZoneOffset:null!=n.forcedTzo?n.forcedTzo:this.offsetForMarker(e)},this)}formatRange(e,t,n,r={}){return r.isEndExclusive&&(t=$R(t,-1)),n.formatRange({marker:e,timeZoneOffset:null!=r.forcedStartTzo?r.forcedStartTzo:this.offsetForMarker(e)},{marker:t,timeZoneOffset:null!=r.forcedEndTzo?r.forcedEndTzo:this.offsetForMarker(t)},this,r.defaultSeparator)}formatIso(e,t={}){let n=null;return t.omitTimeZoneOffset||(n=null!=t.forcedTzo?t.forcedTzo:this.offsetForMarker(e)),rM(e,n,t.omitTime)}timestampToMarker(e){return"local"===this.timeZone?eM(QR(new Date(e))):"UTC"!==this.timeZone&&this.namedTimeZoneImpl?eM(this.namedTimeZoneImpl.timestampToArray(e)):new Date(e)}offsetForMarker(e){return"local"===this.timeZone?-JR(XR(e)).getTimezoneOffset():"UTC"===this.timeZone?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(XR(e)):null}toDate(e,t){return"local"===this.timeZone?JR(XR(e)):"UTC"===this.timeZone?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-1e3*this.namedTimeZoneImpl.offsetForArray(XR(e))*60):new Date(e.valueOf()-(t||0))}}class GM{constructor(e){this.iconOverrideOption&&this.setIconOverride(e[this.iconOverrideOption])}setIconOverride(e){let t,n;if("object"==typeof e&&e){for(n in t=Object.assign({},this.iconClasses),e)t[n]=this.applyIconOverridePrefix(e[n]);this.iconClasses=t}else!1===e&&(this.iconClasses={})}applyIconOverridePrefix(e){let t=this.iconOverridePrefix;return t&&0!==e.indexOf(t)&&(e=t+e),e}getClass(e){return this.classes[e]||""}getIconClass(e,t){let n;return n=t&&this.rtlIconClasses&&this.rtlIconClasses[e]||this.iconClasses[e],n?`${this.baseIconClass} ${n}`:""}getCustomButtonIconClass(e){let t;return this.iconOverrideCustomButtonOption&&(t=e[this.iconOverrideCustomButtonOption],t)?`${this.baseIconClass} ${this.applyIconOverridePrefix(t)}`:""}}function YM(e){e();let t=LT.debounceRendering,n=[];for(LT.debounceRendering=function(e){n.push(e)},kA(JT(qM,{}),document.createElement("div"));n.length;)n.shift()();LT.debounceRendering=t}GM.prototype.classes={},GM.prototype.iconClasses={},GM.prototype.baseIconClass="",GM.prototype.iconOverridePrefix="";class qM extends aA{render(){return JT("div",{})}componentDidMount(){this.setState({})}}function ZM(e){let t=function(e,t){var n={__c:t="__cC"+UT++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,cA(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}(e),n=t.Provider;return t.Provider=function(){let e=!this.getChildContext,t=n.apply(this,arguments);if(e){let e=[];this.shouldComponentUpdate=t=>{this.props.value!==t.value&&e.forEach((e=>{e.context=t.value,e.forceUpdate()}))},this.sub=t=>{e.push(t);let n=t.componentWillUnmount;t.componentWillUnmount=()=>{e.splice(e.indexOf(t),1),n&&n.call(t)}}}return t},t}class KM{constructor(e,t,n,r){this.execFunc=e,this.emitter=t,this.scrollTime=n,this.scrollTimeReset=r,this.handleScrollRequest=e=>{this.queuedRequest=Object.assign({},this.queuedRequest||{},e),this.drain()},t.on("_scrollRequest",this.handleScrollRequest),this.fireInitialScroll()}detach(){this.emitter.off("_scrollRequest",this.handleScrollRequest)}update(e){e&&this.scrollTimeReset?this.fireInitialScroll():this.drain()}fireInitialScroll(){this.handleScrollRequest({time:this.scrollTime})}drain(){this.queuedRequest&&this.execFunc(this.queuedRequest)&&(this.queuedRequest=null)}}const QM=ZM({});function JM(e,t,n,r,o,a,s,i,l,c,d,u,f,h){return{dateEnv:o,nowManager:a,options:n,pluginHooks:i,emitter:d,dispatch:l,getCurrentData:c,calendarApi:u,viewSpec:e,viewApi:t,dateProfileGenerator:r,theme:s,isRtl:"rtl"===n.direction,addResizeHandler(e){d.on("_resize",e)},removeResizeHandler(e){d.off("_resize",e)},createScrollResponder:e=>new KM(e,d,OR(n.scrollTime),n.scrollTimeReset),registerInteractiveComponent:f,unregisterInteractiveComponent:h}}class XM extends aA{shouldComponentUpdate(e,t){return!VM(this.props,e,this.propEquality)||!VM(this.state,t,this.stateEquality)}safeSetState(e){VM(this.state,Object.assign(Object.assign({},this.state),e),this.stateEquality)||this.setState(e)}}XM.addPropsEquality=function(e){let t=Object.create(this.prototype.propEquality);Object.assign(t,e),this.prototype.propEquality=t},XM.addStateEquality=function(e){let t=Object.create(this.prototype.stateEquality);Object.assign(t,e),this.prototype.stateEquality=t},XM.contextType=QM,XM.prototype.propEquality={},XM.prototype.stateEquality={};class eO extends XM{}function tO(e,t){"function"==typeof e?e(t):e&&(e.current=t)}eO.contextType=QM;class nO extends eO{constructor(){super(...arguments),this.id=jR(),this.queuedDomNodes=[],this.currentDomNodes=[],this.handleEl=e=>{const{options:t}=this.context,{generatorName:n}=this.props;t.customRenderingReplaces&&rO(n,t)||this.updateElRef(e)},this.updateElRef=e=>{this.props.elRef&&tO(this.props.elRef,e)}}render(){const{props:e,context:t}=this,{options:n}=t,{customGenerator:r,defaultGenerator:o,renderProps:a}=e,s=oO(e,[],this.handleEl);let i,l,c=!1,d=[];if(null!=r){const e="function"==typeof r?r(a,JT):r;if(!0===e)c=!0;else{const t=e&&"object"==typeof e;t&&"html"in e?s.dangerouslySetInnerHTML={__html:e.html}:t&&"domNodes"in e?d=Array.prototype.slice.call(e.domNodes):(t?zT(e):"function"!=typeof e)?i=e:l=e}}else c=!rO(e.generatorName,n);return c&&o&&(i=o(a)),this.queuedDomNodes=d,this.currentGeneratorMeta=l,JT(e.elTag,s,i)}componentDidMount(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentDidUpdate(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentWillUnmount(){this.triggerCustomRendering(!1)}triggerCustomRendering(e){var t;const{props:n,context:r}=this,{handleCustomRendering:o,customRenderingMetaMap:a}=r.options;if(o){const r=null!==(t=this.currentGeneratorMeta)&&void 0!==t?t:null==a?void 0:a[n.generatorName];r&&o(Object.assign(Object.assign({id:this.id,isActive:e,containerEl:this.base,reportNewContainerEl:this.updateElRef,generatorMeta:r},n),{elClasses:(n.elClasses||[]).filter(aO)}))}}applyQueueudDomNodes(){const{queuedDomNodes:e,currentDomNodes:t}=this,n=this.base;if(!VR(e,t)){t.forEach(pR);for(let t of e)n.appendChild(t);this.currentDomNodes=e}}}function rO(e,t){var n;return Boolean(t.handleCustomRendering&&e&&(null===(n=t.customRenderingMetaMap)||void 0===n?void 0:n[e]))}function oO(e,t,n){const r=Object.assign(Object.assign({},e.elAttrs),{ref:n});return(e.elClasses||t)&&(r.className=(e.elClasses||[]).concat(t||[]).concat(r.className||[]).filter(Boolean).join(" ")),e.elStyle&&(r.style=e.elStyle),r}function aO(e){return Boolean(e)}nO.addPropsEquality({elClasses:VR,elStyle:zM,elAttrs:function(e,t){const n=function(e,t){let n=[];for(let r in e)MM.call(e,r)&&(r in t||n.push(r));for(let r in t)MM.call(t,r)&&e[r]!==t[r]&&n.push(r);return n}(e,t);for(let e of n)if(!HM.test(e))return!1;return!0},renderProps:zM});const sO=ZM(0);class iO extends aA{constructor(){super(...arguments),this.InnerContent=lO.bind(void 0,this),this.handleEl=e=>{this.el=e,this.props.elRef&&(tO(this.props.elRef,e),e&&this.didMountMisfire&&this.componentDidMount())}}render(){const{props:e}=this,t=function(e,t){const n="function"==typeof e?e(t):e||[];return"string"==typeof n?[n]:n}(e.classNameGenerator,e.renderProps);if(e.children){const n=oO(e,t,this.handleEl),r=e.children(this.InnerContent,e.renderProps,n);return e.elTag?JT(e.elTag,n,r):r}return JT(nO,Object.assign(Object.assign({},e),{elRef:this.handleEl,elTag:e.elTag||"div",elClasses:(e.elClasses||[]).concat(t),renderId:this.context}))}componentDidMount(){var e,t;this.el?null===(t=(e=this.props).didMount)||void 0===t||t.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.el})):this.didMountMisfire=!0}componentWillUnmount(){var e,t;null===(t=(e=this.props).willUnmount)||void 0===t||t.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.el}))}}function lO(e,t){const n=e.props;return JT(nO,Object.assign({renderProps:n.renderProps,generatorName:n.generatorName,customGenerator:n.customGenerator,defaultGenerator:n.defaultGenerator,renderId:e.context},t))}iO.contextType=sO;class cO extends eO{render(){let{props:e,context:t}=this,{options:n}=t,r={view:t.viewApi};return JT(iO,{elRef:e.elRef,elTag:e.elTag||"div",elAttrs:e.elAttrs,elClasses:[...dO(e.viewSpec),...e.elClasses||[]],elStyle:e.elStyle,renderProps:r,classNameGenerator:n.viewClassNames,generatorName:void 0,didMount:n.viewDidMount,willUnmount:n.viewWillUnmount},(()=>e.children))}}function dO(e){return[`fc-${e.type}-view`,"fc-view"]}function uO(e,t){let n,r,o=[],{start:a}=t;for(e.sort(fO),n=0;n<e.length;n+=1)r=e[n],r.start>a&&o.push({start:a,end:r.start}),r.end>a&&(a=r.end);return a<t.end&&o.push({start:a,end:t.end}),o}function fO(e,t){return e.start.valueOf()-t.start.valueOf()}function hO(e,t){let{start:n,end:r}=e,o=null;return null!==t.start&&(n=null===n?t.start:new Date(Math.max(n.valueOf(),t.start.valueOf()))),null!=t.end&&(r=null===r?t.end:new Date(Math.min(r.valueOf(),t.end.valueOf()))),(null===n||null===r||n<r)&&(o={start:n,end:r}),o}function mO(e,t){return(null===e.start||t>=e.start)&&(null===e.end||t<e.end)}function pO(e){let t=Math.floor(GR(e.start,e.end))||1,n=qR(e.start);return{start:n,end:UR(n,t)}}function gO(e,t=OR(0)){let n=null,r=null;if(e.end){r=qR(e.end);let n=e.end.valueOf()-r.valueOf();n&&n>=FR(t)&&(r=UR(r,1))}return e.start&&(n=qR(e.start),r&&r<=n&&(r=UR(n,1))),{start:n,end:r}}function vO(e,t,n,r){return"year"===r?OR(n.diffWholeYears(e,t),"year"):"month"===r?OR(n.diffWholeMonths(e,t),"month"):function(e,t){let n=qR(e),r=qR(t);return{years:0,months:0,days:Math.round(GR(n,r)),milliseconds:t.valueOf()-r.valueOf()-(e.valueOf()-n.valueOf())}}(e,t)}class yO{constructor(e){this.props=e,this.initHiddenDays()}buildPrev(e,t,n){let{dateEnv:r}=this.props,o=r.subtract(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(o,-1,n)}buildNext(e,t,n){let{dateEnv:r}=this.props,o=r.add(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(o,1,n)}build(e,t,n=!0){let r,o,a,s,i,l,{props:c}=this;return r=this.buildValidRange(),r=this.trimHiddenDays(r),n&&(e=function(e,t){return null!=t.start&&e<t.start?t.start:null!=t.end&&e>=t.end?new Date(t.end.valueOf()-1):e}(e,r)),o=this.buildCurrentRangeInfo(e,t),a=/^(year|month|week|day)$/.test(o.unit),s=this.buildRenderRange(this.trimHiddenDays(o.range),o.unit,a),s=this.trimHiddenDays(s),i=s,c.showNonCurrentDates||(i=hO(i,o.range)),i=this.adjustActiveRange(i),i=hO(i,r),d=o.range,u=r,l=(null===d.end||null===u.start||d.end>u.start)&&(null===d.start||null===u.end||d.start<u.end),mO(s,e)||(e=s.start),{currentDate:e,validRange:r,currentRange:o.range,currentRangeUnit:o.unit,isRangeAllDay:a,activeRange:i,renderRange:s,slotMinTime:c.slotMinTime,slotMaxTime:c.slotMaxTime,isValid:l,dateIncrement:this.buildDateIncrement(o.duration)};var d,u}buildValidRange(){let e=this.props.validRangeInput,t="function"==typeof e?e.call(this.props.calendarApi,this.props.dateEnv.toDate(this.props.nowManager.getDateMarker())):e;return this.refineRange(t)||{start:null,end:null}}buildCurrentRangeInfo(e,t){let n,{props:r}=this,o=null,a=null,s=null;return r.duration?(o=r.duration,a=r.durationUnit,s=this.buildRangeFromDuration(e,t,o,a)):(n=this.props.dayCount)?(a="day",s=this.buildRangeFromDayCount(e,t,n)):(s=this.buildCustomVisibleRange(e))?a=r.dateEnv.greatestWholeUnit(s.start,s.end).unit:(o=this.getFallbackDuration(),a=HR(o).unit,s=this.buildRangeFromDuration(e,t,o,a)),{duration:o,unit:a,range:s}}getFallbackDuration(){return OR({day:1})}adjustActiveRange(e){let{dateEnv:t,usesMinMaxTime:n,slotMinTime:r,slotMaxTime:o}=this.props,{start:a,end:s}=e;return n&&(LR(r)<0&&(a=qR(a),a=t.add(a,r)),LR(o)>1&&(s=qR(s),s=UR(s,-1),s=t.add(s,o))),{start:a,end:s}}buildRangeFromDuration(e,t,n,r){let o,a,s,{dateEnv:i,dateAlignment:l}=this.props;if(!l){let{dateIncrement:e}=this.props;l=e&&FR(e)<FR(n)?HR(e).unit:r}function c(){o=i.startOf(e,l),a=i.add(o,n),s={start:o,end:a}}return LR(n)<=1&&this.isHiddenDay(o)&&(o=this.skipHiddenDays(o,t),o=qR(o)),c(),this.trimHiddenDays(s)||(e=this.skipHiddenDays(e,t),c()),s}buildRangeFromDayCount(e,t,n){let r,{dateEnv:o,dateAlignment:a}=this.props,s=0,i=e;a&&(i=o.startOf(i,a)),i=qR(i),i=this.skipHiddenDays(i,t),r=i;do{r=UR(r,1),this.isHiddenDay(r)||(s+=1)}while(s<n);return{start:i,end:r}}buildCustomVisibleRange(e){let{props:t}=this,n=t.visibleRangeInput,r="function"==typeof n?n.call(t.calendarApi,t.dateEnv.toDate(e)):n,o=this.refineRange(r);return!o||null!=o.start&&null!=o.end?o:null}buildRenderRange(e,t,n){return e}buildDateIncrement(e){let t,{dateIncrement:n}=this.props;return n||((t=this.props.dateAlignment)?OR(1,t):e||OR({days:1}))}refineRange(e){if(e){let t=function(e,t){let n=null,r=null;return e.start&&(n=t.createMarker(e.start)),e.end&&(r=t.createMarker(e.end)),n||r?n&&r&&r<n?null:{start:n,end:r}:null}(e,this.props.dateEnv);return t&&(t=gO(t)),t}return null}initHiddenDays(){let e,t=this.props.hiddenDays||[],n=[],r=0;for(!1===this.props.weekends&&t.push(0,6),e=0;e<7;e+=1)(n[e]=-1!==t.indexOf(e))||(r+=1);if(!r)throw new Error("invalid hiddenDays");this.isHiddenDayHash=n}trimHiddenDays(e){let{start:t,end:n}=e;return t&&(t=this.skipHiddenDays(t)),n&&(n=this.skipHiddenDays(n,-1,!0)),null==t||null==n||t<n?{start:t,end:n}:null}isHiddenDay(e){return e instanceof Date&&(e=e.getUTCDay()),this.isHiddenDayHash[e]}skipHiddenDays(e,t=1,n=!1){for(;this.isHiddenDayHash[(e.getUTCDay()+(n?t:0)+7)%7];)e=UR(e,t);return e}}function bO(e,t,n,r){return{instanceId:jR(),defId:e,range:t,forcedStartTzo:null==n?null:n,forcedEndTzo:null==r?null:r}}function xO(e,t,n){let{dateEnv:r,pluginHooks:o,options:a}=n,{defs:s,instances:i}=e;i=IM(i,(e=>!s[e.defId].recurringDef));for(let e in s){let n=s[e];if(n.recurringDef){let{duration:s}=n.recurringDef;s||(s=n.allDay?a.defaultAllDayEventDuration:a.defaultTimedEventDuration);let l=wO(n,s,t,r,o.recurringTypes);for(let t of l){let n=bO(e,{start:t,end:r.add(t,s)});i[n.instanceId]=n}}}return{defs:s,instances:i}}function wO(e,t,n,r,o){let a=o[e.recurringDef.typeId].expand(e.recurringDef.typeData,{start:r.subtract(n.start,t),end:n.end},r);return e.allDay&&(a=a.map(qR)),a}const kO={id:String,groupId:String,title:String,url:String,interactive:Boolean},SO={start:RM,end:RM,date:RM,allDay:Boolean},CO=Object.assign(Object.assign(Object.assign({},kO),SO),{extendedProps:RM});function _O(e,t,n,r,o=EO(n),a,s){let{refined:i,extra:l}=jO(e,n,o),c=function(e,t){let n=null;return e&&(n=e.defaultAllDay),null==n&&(n=t.options.defaultAllDay),n}(t,n),d=function(e,t,n,r){for(let o=0;o<r.length;o+=1){let a=r[o].parse(e,n);if(a){let{allDay:n}=e;return null==n&&(n=t,null==n&&(n=a.allDayGuess,null==n&&(n=!1))),{allDay:n,duration:a.duration,typeData:a.typeData,typeId:o}}}return null}(i,c,n.dateEnv,n.pluginHooks.recurringTypes);if(d){let e=NO(i,l,t?t.sourceId:"",d.allDay,Boolean(d.duration),n,a);return e.recurringDef={typeId:d.typeId,typeData:d.typeData,duration:d.duration},{def:e,instance:null}}let u=function(e,t,n,r){let o,a,{allDay:s}=e,i=null,l=!1,c=null,d=null!=e.start?e.start:e.date;if(o=n.dateEnv.createMarkerMeta(d),o)i=o.marker;else if(!r)return null;return null!=e.end&&(a=n.dateEnv.createMarkerMeta(e.end)),null==s&&(s=null!=t?t:(!o||o.isTimeUnspecified)&&(!a||a.isTimeUnspecified)),s&&i&&(i=qR(i)),a&&(c=a.marker,s&&(c=qR(c)),i&&c<=i&&(c=null)),c?l=!0:r||(l=n.options.forceEventDuration||!1,c=n.dateEnv.add(i,s?n.options.defaultAllDayEventDuration:n.options.defaultTimedEventDuration)),{allDay:s,hasEnd:l,range:{start:i,end:c},forcedStartTzo:o?o.forcedTzo:null,forcedEndTzo:a?a.forcedTzo:null}}(i,c,n,r);if(u){let e=NO(i,l,t?t.sourceId:"",u.allDay,u.hasEnd,n,a),r=bO(e.defId,u.range,u.forcedStartTzo,u.forcedEndTzo);return s&&e.publicId&&s[e.publicId]&&(r.instanceId=s[e.publicId]),{def:e,instance:r}}return null}function jO(e,t,n=EO(t)){return AM(e,n)}function EO(e){return Object.assign(Object.assign(Object.assign({},OO),CO),e.pluginHooks.eventRefiners)}function NO(e,t,n,r,o,a,s){let i={title:e.title||"",groupId:e.groupId||"",publicId:e.id||"",url:e.url||"",recurringDef:null,defId:(s&&e.id?s[e.id]:"")||jR(),sourceId:n,allDay:r,hasEnd:o,interactive:e.interactive,ui:PO(e,a),extendedProps:Object.assign(Object.assign({},e.extendedProps||{}),t)};for(let t of a.pluginHooks.eventDefMemberAdders)Object.assign(i,t(e));return Object.freeze(i.ui.classNames),Object.freeze(i.extendedProps),i}function DO(e,t,n,r,o,a){let s={defs:{},instances:{}},i=EO(n);for(let l of e){let e=_O(l,t,n,r,i,o,a);e&&TO(e,s)}return s}function TO(e,t={defs:{},instances:{}}){return t.defs[e.def.defId]=e.def,e.instance&&(t.instances[e.instance.instanceId]=e.instance),t}function AO(e,t){return{defs:Object.assign(Object.assign({},e.defs),t.defs),instances:Object.assign(Object.assign({},e.instances),t.instances)}}function RO(e,t){let n=IM(e.defs,t),r=IM(e.instances,(e=>n[e.defId]));return{defs:n,instances:r}}function MO(e){return Array.isArray(e)?e:"string"==typeof e?e.split(/\s+/):[]}const OO={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:RM,overlap:RM,allow:RM,className:MO,classNames:MO,color:String,backgroundColor:String,borderColor:String,textColor:String},IO={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]};function PO(e,t){let n=function(e,t){return Array.isArray(e)?DO(e,null,t,!0):"object"==typeof e&&e?DO([e],null,t,!0):null!=e?String(e):null}(e.constraint,t);return{display:e.display||null,startEditable:null!=e.startEditable?e.startEditable:e.editable,durationEditable:null!=e.durationEditable?e.durationEditable:e.editable,constraints:null!=n?[n]:[],overlap:null!=e.overlap?e.overlap:null,allows:null!=e.allow?[e.allow]:[],backgroundColor:e.backgroundColor||e.color||"",borderColor:e.borderColor||e.color||"",textColor:e.textColor||"",classNames:(e.className||[]).concat(e.classNames||[])}}function LO(e){return e.reduce(FO,IO)}function FO(e,t){return{display:null!=t.display?t.display:e.display,startEditable:null!=t.startEditable?t.startEditable:e.startEditable,durationEditable:null!=t.durationEditable?t.durationEditable:e.durationEditable,constraints:e.constraints.concat(t.constraints),overlap:"boolean"==typeof t.overlap?t.overlap:e.overlap,allows:e.allows.concat(t.allows),backgroundColor:t.backgroundColor||e.backgroundColor,borderColor:t.borderColor||e.borderColor,textColor:t.textColor||e.textColor,classNames:e.classNames.concat(t.classNames)}}const zO={id:String,defaultAllDay:Boolean,url:String,format:String,events:RM,eventDataTransform:RM,success:RM,failure:RM};function HO(e,t,n=VO(t)){let r;if("string"==typeof e?r={url:e}:"function"==typeof e||Array.isArray(e)?r={events:e}:"object"==typeof e&&e&&(r=e),r){let{refined:o,extra:a}=AM(r,n),s=function(e,t){let n=t.pluginHooks.eventSourceDefs;for(let t=n.length-1;t>=0;t-=1){let r=n[t].parseMeta(e);if(r)return{sourceDefId:t,meta:r}}return null}(o,t);if(s)return{_raw:e,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:o.defaultAllDay,eventDataTransform:o.eventDataTransform,success:o.success,failure:o.failure,publicId:o.id||"",sourceId:jR(),sourceDefId:s.sourceDefId,meta:s.meta,ui:PO(o,t),extendedProps:a}}return null}function VO(e){return Object.assign(Object.assign(Object.assign({},OO),zO),e.pluginHooks.eventSourceRefiners)}function BO(e,t,n){let r=n.options.eventDataTransform,o=t?t.eventDataTransform:null;return o&&(e=WO(e,o)),r&&(e=WO(e,r)),e}function WO(e,t){let n;if(t){n=[];for(let r of e){let e=t(r);e?n.push(e):null==e&&n.push(r)}}else n=e;return n}function UO(e,t,n){let{defs:r}=e,o=PM(e.instances,(e=>r[e.defId].allDay?e:Object.assign(Object.assign({},e),{range:{start:n.createMarker(t.toDate(e.range.start,e.forcedStartTzo)),end:n.createMarker(t.toDate(e.range.end,e.forcedEndTzo))},forcedStartTzo:n.canComputeOffset?null:e.forcedStartTzo,forcedEndTzo:n.canComputeOffset?null:e.forcedEndTzo})));return{defs:r,instances:o}}function $O(e,t){return RO(e,(e=>e.sourceId!==t))}class GO{constructor(){this.handlers={},this.thisContext=null}setThisContext(e){this.thisContext=e}setOptions(e){this.options=e}on(e,t){!function(e,t,n){(e[t]||(e[t]=[])).push(n)}(this.handlers,e,t)}off(e,t){!function(e,t,n){n?e[t]&&(e[t]=e[t].filter((e=>e!==n))):delete e[t]}(this.handlers,e,t)}trigger(e,...t){let n=this.handlers[e]||[],r=this.options&&this.options[e],o=[].concat(r||[],n);for(let e of o)e.apply(this.thisContext,t)}hasHandlers(e){return Boolean(this.handlers[e]&&this.handlers[e].length||this.options&&this.options[e])}}const YO={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",classNames:"fc-non-business",groupId:"_businessHours"};function qO(e,t,n){let{dateEnv:r,options:o}=n,a=t;return e?(a=qR(a),a=r.add(a,o.defaultAllDayEventDuration)):a=r.add(a,o.defaultTimedEventDuration),a}function ZO(e,t,n,r){let o=n.standardProps||{};null==o.hasEnd&&t.durationEditable&&(n.startDelta||n.endDelta)&&(o.hasEnd=!0);let a=Object.assign(Object.assign(Object.assign({},e),o),{ui:Object.assign(Object.assign({},e.ui),o.ui)});n.extendedProps&&(a.extendedProps=Object.assign(Object.assign({},a.extendedProps),n.extendedProps));for(let e of r.pluginHooks.eventDefMutationAppliers)e(a,n,r);return!a.hasEnd&&r.options.forceEventDuration&&(a.hasEnd=!0),a}function KO(e,t,n,r,o){let{dateEnv:a}=o,s=r.standardProps&&!0===r.standardProps.allDay,i=r.standardProps&&!1===r.standardProps.hasEnd,l=Object.assign({},e);return s&&(l.range=pO(l.range)),r.datesDelta&&n.startEditable&&(l.range={start:a.add(l.range.start,r.datesDelta),end:a.add(l.range.end,r.datesDelta)}),r.startDelta&&n.durationEditable&&(l.range={start:a.add(l.range.start,r.startDelta),end:l.range.end}),r.endDelta&&n.durationEditable&&(l.range={start:l.range.start,end:a.add(l.range.end,r.endDelta)}),i&&(l.range={start:l.range.start,end:qO(t.allDay,l.range.start,o)}),t.allDay&&(l.range={start:qR(l.range.start),end:qR(l.range.end)}),l.range.end<l.range.start&&(l.range.end=qO(t.allDay,l.range.start,o)),l}class QO{constructor(e,t){this.context=e,this.internalEventSource=t}remove(){this.context.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:this.internalEventSource.sourceId})}refetch(){this.context.dispatch({type:"FETCH_EVENT_SOURCES",sourceIds:[this.internalEventSource.sourceId],isRefetch:!0})}get id(){return this.internalEventSource.publicId}get url(){return this.internalEventSource.meta.url}get format(){return this.internalEventSource.meta.format}}class JO{constructor(e,t,n){this._context=e,this._def=t,this._instance=n||null}setProp(e,t){if(e in SO)console.warn("Could not set date-related prop 'name'. Use one of the date-related methods instead.");else if("id"===e)t=kO[e](t),this.mutate({standardProps:{publicId:t}});else if(e in kO)t=kO[e](t),this.mutate({standardProps:{[e]:t}});else if(e in OO){let n=OO[e](t);n="color"===e?{backgroundColor:t,borderColor:t}:"editable"===e?{startEditable:t,durationEditable:t}:{[e]:t},this.mutate({standardProps:{ui:n}})}else console.warn(`Could not set prop '${e}'. Use setExtendedProp instead.`)}setExtendedProp(e,t){this.mutate({extendedProps:{[e]:t}})}setStart(e,t={}){let{dateEnv:n}=this._context,r=n.createMarker(e);if(r&&this._instance){let e=vO(this._instance.range.start,r,n,t.granularity);t.maintainDuration?this.mutate({datesDelta:e}):this.mutate({startDelta:e})}}setEnd(e,t={}){let n,{dateEnv:r}=this._context;if((null==e||(n=r.createMarker(e),n))&&this._instance)if(n){let e=vO(this._instance.range.end,n,r,t.granularity);this.mutate({endDelta:e})}else this.mutate({standardProps:{hasEnd:!1}})}setDates(e,t,n={}){let r,{dateEnv:o}=this._context,a={allDay:n.allDay},s=o.createMarker(e);var i,l;if(s&&(null==t||(r=o.createMarker(t),r))&&this._instance){let e=this._instance.range;!0===n.allDay&&(e=pO(e));let t=vO(e.start,s,o,n.granularity);if(r){let s=vO(e.end,r,o,n.granularity);l=s,(i=t).years===l.years&&i.months===l.months&&i.days===l.days&&i.milliseconds===l.milliseconds?this.mutate({datesDelta:t,standardProps:a}):this.mutate({startDelta:t,endDelta:s,standardProps:a})}else a.hasEnd=!1,this.mutate({datesDelta:t,standardProps:a})}}moveStart(e){let t=OR(e);t&&this.mutate({startDelta:t})}moveEnd(e){let t=OR(e);t&&this.mutate({endDelta:t})}moveDates(e){let t=OR(e);t&&this.mutate({datesDelta:t})}setAllDay(e,t={}){let n={allDay:e},{maintainDuration:r}=t;null==r&&(r=this._context.options.allDayMaintainDuration),this._def.allDay!==e&&(n.hasEnd=r),this.mutate({standardProps:n})}formatRange(e){let{dateEnv:t}=this._context,n=this._instance,r=wM(e);return this._def.hasEnd?t.formatRange(n.range.start,n.range.end,r,{forcedStartTzo:n.forcedStartTzo,forcedEndTzo:n.forcedEndTzo}):t.format(n.range.start,r,{forcedTzo:n.forcedStartTzo})}mutate(e){let t=this._instance;if(t){let n=this._def,r=this._context,{eventStore:o}=r.getCurrentData(),a=function(e,t){let n=e.instances[t];if(n){let t=e.defs[n.defId],r=RO(e,(e=>{return n=t,r=e,Boolean(n.groupId&&n.groupId===r.groupId);var n,r}));return r.defs[t.defId]=t,r.instances[n.instanceId]=n,r}return{defs:{},instances:{}}}(o,t.instanceId);a=function(e,t,n,r){let o=oI(e.defs,{"":{display:"",startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]}}),a={defs:{},instances:{}};for(let t in e.defs){let s=e.defs[t];a.defs[t]=ZO(s,o[t],n,r)}for(let t in e.instances){let s=e.instances[t],i=a.defs[s.defId];a.instances[t]=KO(s,i,o[s.defId],n,r)}return a}(a,0,e,r);let s=new JO(r,n,t);this._def=a.defs[n.defId],this._instance=a.instances[t.instanceId],r.dispatch({type:"MERGE_EVENTS",eventStore:a}),r.emitter.trigger("eventChange",{oldEvent:s,event:this,relatedEvents:eI(a,r,t),revert(){r.dispatch({type:"RESET_EVENTS",eventStore:o})}})}}remove(){let e=this._context,t=XO(this);e.dispatch({type:"REMOVE_EVENTS",eventStore:t}),e.emitter.trigger("eventRemove",{event:this,relatedEvents:[],revert(){e.dispatch({type:"MERGE_EVENTS",eventStore:t})}})}get source(){let{sourceId:e}=this._def;return e?new QO(this._context,this._context.getCurrentData().eventSources[e]):null}get start(){return this._instance?this._context.dateEnv.toDate(this._instance.range.start):null}get end(){return this._instance&&this._def.hasEnd?this._context.dateEnv.toDate(this._instance.range.end):null}get startStr(){let e=this._instance;return e?this._context.dateEnv.formatIso(e.range.start,{omitTime:this._def.allDay,forcedTzo:e.forcedStartTzo}):""}get endStr(){let e=this._instance;return e&&this._def.hasEnd?this._context.dateEnv.formatIso(e.range.end,{omitTime:this._def.allDay,forcedTzo:e.forcedEndTzo}):""}get id(){return this._def.publicId}get groupId(){return this._def.groupId}get allDay(){return this._def.allDay}get title(){return this._def.title}get url(){return this._def.url}get display(){return this._def.ui.display||"auto"}get startEditable(){return this._def.ui.startEditable}get durationEditable(){return this._def.ui.durationEditable}get constraint(){return this._def.ui.constraints[0]||null}get overlap(){return this._def.ui.overlap}get allow(){return this._def.ui.allows[0]||null}get backgroundColor(){return this._def.ui.backgroundColor}get borderColor(){return this._def.ui.borderColor}get textColor(){return this._def.ui.textColor}get classNames(){return this._def.ui.classNames}get extendedProps(){return this._def.extendedProps}toPlainObject(e={}){let t=this._def,{ui:n}=t,{startStr:r,endStr:o}=this,a={allDay:t.allDay};return t.title&&(a.title=t.title),r&&(a.start=r),o&&(a.end=o),t.publicId&&(a.id=t.publicId),t.groupId&&(a.groupId=t.groupId),t.url&&(a.url=t.url),n.display&&"auto"!==n.display&&(a.display=n.display),e.collapseColor&&n.backgroundColor&&n.backgroundColor===n.borderColor?a.color=n.backgroundColor:(n.backgroundColor&&(a.backgroundColor=n.backgroundColor),n.borderColor&&(a.borderColor=n.borderColor)),n.textColor&&(a.textColor=n.textColor),n.classNames.length&&(a.classNames=n.classNames),Object.keys(t.extendedProps).length&&(e.collapseExtendedProps?Object.assign(a,t.extendedProps):a.extendedProps=t.extendedProps),a}toJSON(){return this.toPlainObject()}}function XO(e){let t=e._def,n=e._instance;return{defs:{[t.defId]:t},instances:n?{[n.instanceId]:n}:{}}}function eI(e,t,n){let{defs:r,instances:o}=e,a=[],s=n?n.instanceId:"";for(let e in o){let n=o[e],i=r[n.defId];n.instanceId!==s&&a.push(new JO(t,i,n))}return a}function tI(e,t,n,r){let o={},a={},s={},i=[],l=[],c=oI(e.defs,t);for(let t in e.defs){let n=e.defs[t];"inverse-background"===c[n.defId].display&&(n.groupId?(o[n.groupId]=[],s[n.groupId]||(s[n.groupId]=n)):a[t]=[])}for(let t in e.instances){let s=e.instances[t],d=e.defs[s.defId],u=c[d.defId],f=s.range,h=!d.allDay&&r?gO(f,r):f,m=hO(h,n);m&&("inverse-background"===u.display?d.groupId?o[d.groupId].push(m):a[s.defId].push(m):"none"!==u.display&&("background"===u.display?i:l).push({def:d,ui:u,instance:s,range:m,isStart:h.start&&h.start.valueOf()===m.start.valueOf(),isEnd:h.end&&h.end.valueOf()===m.end.valueOf()}))}for(let e in o){let t=uO(o[e],n);for(let n of t){let t=s[e],r=c[t.defId];i.push({def:t,ui:r,instance:null,range:n,isStart:!1,isEnd:!1})}}for(let t in a){let r=uO(a[t],n);for(let n of r)i.push({def:e.defs[t],ui:c[t],instance:null,range:n,isStart:!1,isEnd:!1})}return{bg:i,fg:l}}function nI(e,t){e.fcSeg=t}function rI(e){return e.fcSeg||e.parentNode.fcSeg||null}function oI(e,t){return PM(e,(e=>aI(e,t)))}function aI(e,t){let n=[];return t[""]&&n.push(t[""]),t[e.defId]&&n.push(t[e.defId]),n.push(e.ui),LO(n)}function sI(e,t){let n=e.map(iI);return n.sort(((e,n)=>function(e,t,n){let r,o;for(r=0;r<n.length;r+=1)if(o=ER(e,t,n[r]),o)return o;return 0}(e,n,t))),n.map((e=>e._seg))}function iI(e){let{eventRange:t}=e,n=t.def,r=t.instance?t.instance.range:t.range,o=r.start?r.start.valueOf():0,a=r.end?r.end.valueOf():0;return Object.assign(Object.assign(Object.assign({},n.extendedProps),n),{id:n.publicId,start:o,end:a,duration:a-o,allDay:Number(n.allDay),_seg:e})}function lI(e,t){let{pluginHooks:n}=t,r=n.isDraggableTransformers,{def:o,ui:a}=e.eventRange,s=a.startEditable;for(let e of r)s=e(s,o,a,t);return s}function cI(e,t){return e.isStart&&e.eventRange.ui.durationEditable&&t.options.eventResizableFromStart}function dI(e,t){return e.isEnd&&e.eventRange.ui.durationEditable}function uI(e,t,n,r,o,a,s){let{dateEnv:i,options:l}=n,{displayEventTime:c,displayEventEnd:d}=l,u=e.eventRange.def,f=e.eventRange.instance;null==c&&(c=!1!==r),null==d&&(d=!1!==o);let h=f.range.start,m=f.range.end,p=a||e.start||e.eventRange.range.start,g=s||e.end||e.eventRange.range.end,v=qR(h).valueOf()===qR(p).valueOf(),y=qR($R(m,-1)).valueOf()===qR($R(g,-1)).valueOf();return c&&!u.allDay&&(v||y)?(p=v?h:p,g=y?m:g,d&&u.hasEnd?i.formatRange(p,g,t,{forcedStartTzo:a?null:f.forcedStartTzo,forcedEndTzo:s?null:f.forcedEndTzo}):i.format(p,t,{forcedTzo:a?null:f.forcedStartTzo})):""}function fI(e,t,n){let r=e.eventRange.range;return{isPast:r.end<=(n||t.start),isFuture:r.start>=(n||t.end),isToday:t&&mO(t,r.start)}}function hI(e){let t=["fc-event"];return e.isMirror&&t.push("fc-event-mirror"),e.isDraggable&&t.push("fc-event-draggable"),(e.isStartResizable||e.isEndResizable)&&t.push("fc-event-resizable"),e.isDragging&&t.push("fc-event-dragging"),e.isResizing&&t.push("fc-event-resizing"),e.isSelected&&t.push("fc-event-selected"),e.isStart&&t.push("fc-event-start"),e.isEnd&&t.push("fc-event-end"),e.isPast&&t.push("fc-event-past"),e.isToday&&t.push("fc-event-today"),e.isFuture&&t.push("fc-event-future"),t}function mI(e){return e.instance?e.instance.instanceId:`${e.def.defId}:${e.range.start.toISOString()}`}function pI(e,t){let{def:n,instance:r}=e.eventRange,{url:o}=n;if(o)return{href:o};let{emitter:a,options:s}=t,{eventInteractive:i}=s;return null==i&&(i=n.interactive,null==i&&(i=Boolean(a.hasHandlers("eventClick")))),i?CR((e=>{a.trigger("eventClick",{el:e.target,event:new JO(t,n,r),jsEvent:e,view:t.viewApi})})):{}}const gI={start:RM,end:RM,allDay:Boolean};function vI(e,t,n){return Object.assign(Object.assign({},yI(e,t,n)),{timeZone:t.timeZone})}function yI(e,t,n){return{start:t.toDate(e.start),end:t.toDate(e.end),startStr:t.formatIso(e.start,{omitTime:n}),endStr:t.formatIso(e.end,{omitTime:n})}}class bI extends Error{constructor(e,t){super(e),this.response=t}}let xI;function wI(){return null==xI&&(xI=function(){if("undefined"==typeof document)return!0;let e=document.createElement("div");e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.innerHTML="<table><tr><td><div></div></td></tr></table>",e.querySelector("table").style.height="100px",e.querySelector("div").style.height="100%",document.body.appendChild(e);let t=e.querySelector("div").offsetHeight>0;return document.body.removeChild(e),t}()),xI}class kI extends eO{constructor(){super(...arguments),this.state={forPrint:!1},this.handleBeforePrint=()=>{YM((()=>{this.setState({forPrint:!0})}))},this.handleAfterPrint=()=>{YM((()=>{this.setState({forPrint:!1})}))}}render(){let{props:e}=this,{options:t}=e,{forPrint:n}=this.state,r=n||"auto"===t.height||"auto"===t.contentHeight,o=r||null==t.height?"":t.height,a=["fc",n?"fc-media-print":"fc-media-screen",`fc-direction-${t.direction}`,e.theme.getClass("root")];return wI()||a.push("fc-liquid-hack"),e.children(a,o,r,n)}componentDidMount(){let{emitter:e}=this.props;e.on("_beforeprint",this.handleBeforePrint),e.on("_afterprint",this.handleAfterPrint)}componentWillUnmount(){let{emitter:e}=this.props;e.off("_beforeprint",this.handleBeforePrint),e.off("_afterprint",this.handleAfterPrint)}}class SI{constructor(e){this.component=e.component,this.isHitComboAllowed=e.isHitComboAllowed||null}destroy(){}}const CI={};class _I extends aA{constructor(e,t){super(e,t),this.handleRefresh=()=>{let e=this.computeTiming();e.state.nowDate.valueOf()!==this.state.nowDate.valueOf()&&this.setState(e.state),this.clearTimeout(),this.setTimeout(e.waitMs)},this.handleVisibilityChange=()=>{document.hidden||this.handleRefresh()},this.state=this.computeTiming().state}render(){let{props:e,state:t}=this;return e.children(t.nowDate,t.todayRange)}componentDidMount(){this.setTimeout(),this.context.nowManager.addResetListener(this.handleRefresh),document.addEventListener("visibilitychange",this.handleVisibilityChange)}componentDidUpdate(e){e.unit!==this.props.unit&&(this.clearTimeout(),this.setTimeout())}componentWillUnmount(){this.clearTimeout(),this.context.nowManager.removeResetListener(this.handleRefresh),document.removeEventListener("visibilitychange",this.handleVisibilityChange)}computeTiming(){let e,t,{props:n,context:r}=this,o=r.nowManager.getDateMarker(),{nowIndicatorSnap:a}=r.options;return"auto"===a&&(a=/year|month|week|day/.test(n.unit)||1===(n.unitValue||1)),a?(e=r.dateEnv.startOf(o,n.unit),t=r.dateEnv.add(e,OR(1,n.unit)).valueOf()-o.valueOf()):(e=o,t=6e4),t=Math.min(864e5,t),{state:{nowDate:e,todayRange:jI(e)},waitMs:t}}setTimeout(e=this.computeTiming().waitMs){this.timeoutId=setTimeout((()=>{const e=this.computeTiming();this.setState(e.state,(()=>{this.setTimeout(e.waitMs)}))}),e)}clearTimeout(){this.timeoutId&&clearTimeout(this.timeoutId)}}function jI(e){let t=qR(e);return{start:t,end:UR(t,1)}}_I.contextType=QM;class EI{getCurrentData(){return this.currentDataManager.getCurrentData()}dispatch(e){this.currentDataManager.dispatch(e)}get view(){return this.getCurrentData().viewApi}batchRendering(e){e()}updateSize(){this.trigger("_resize",!0)}setOption(e,t){this.dispatch({type:"SET_OPTION",optionName:e,rawOptionValue:t})}getOption(e){return this.currentDataManager.currentCalendarOptionsInput[e]}getAvailableLocaleCodes(){return Object.keys(this.getCurrentData().availableRawLocales)}on(e,t){let{currentDataManager:n}=this;n.currentCalendarOptionsRefiners[e]?n.emitter.on(e,t):console.warn(`Unknown listener name '${e}'`)}off(e,t){this.currentDataManager.emitter.off(e,t)}trigger(e,...t){this.currentDataManager.emitter.trigger(e,...t)}changeView(e,t){this.batchRendering((()=>{if(this.unselect(),t)if(t.start&&t.end)this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e}),this.dispatch({type:"SET_OPTION",optionName:"visibleRange",rawOptionValue:t});else{let{dateEnv:n}=this.getCurrentData();this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e,dateMarker:n.createMarker(t)})}else this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e})}))}zoomTo(e,t){let n;t=t||"day",n=this.getCurrentData().viewSpecs[t]||this.getUnitViewSpec(t),this.unselect(),n?this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:n.type,dateMarker:e}):this.dispatch({type:"CHANGE_DATE",dateMarker:e})}getUnitViewSpec(e){let t,n,{viewSpecs:r,toolbarConfig:o}=this.getCurrentData(),a=[].concat(o.header?o.header.viewsWithButtons:[],o.footer?o.footer.viewsWithButtons:[]);for(let e in r)a.push(e);for(t=0;t<a.length;t+=1)if(n=r[a[t]],n&&n.singleUnit===e)return n;return null}prev(){this.unselect(),this.dispatch({type:"PREV"})}next(){this.unselect(),this.dispatch({type:"NEXT"})}prevYear(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,-1)})}nextYear(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,1)})}today(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.nowManager.getDateMarker()})}gotoDate(e){let t=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:t.dateEnv.createMarker(e)})}incrementDate(e){let t=this.getCurrentData(),n=OR(e);n&&(this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:t.dateEnv.add(t.currentDate,n)}))}getDate(){let e=this.getCurrentData();return e.dateEnv.toDate(e.currentDate)}formatDate(e,t){let{dateEnv:n}=this.getCurrentData();return n.format(n.createMarker(e),wM(t))}formatRange(e,t,n){let{dateEnv:r}=this.getCurrentData();return r.formatRange(r.createMarker(e),r.createMarker(t),wM(n),n)}formatIso(e,t){let{dateEnv:n}=this.getCurrentData();return n.formatIso(n.createMarker(e),{omitTime:t})}select(e,t){let n;n=null==t?null!=e.start?e:{start:e,end:null}:{start:e,end:t};let r=this.getCurrentData(),o=function(e,t,n){let r=function(e,t){let{refined:n,extra:r}=AM(e,gI),o=n.start?t.createMarkerMeta(n.start):null,a=n.end?t.createMarkerMeta(n.end):null,{allDay:s}=n;return null==s&&(s=o&&o.isTimeUnspecified&&(!a||a.isTimeUnspecified)),Object.assign({range:{start:o?o.marker:null,end:a?a.marker:null},allDay:s},r)}(e,t),{range:o}=r;if(!o.start)return null;if(!o.end){if(null==n)return null;o.end=t.add(o.start,n)}return r}(n,r.dateEnv,OR({days:1}));o&&(this.dispatch({type:"SELECT_DATES",selection:o}),function(e,t,n){n.emitter.trigger("select",Object.assign(Object.assign({},function(e,t){let n={};for(let r of t.pluginHooks.dateSpanTransforms)Object.assign(n,r(e,t));var r,o;return Object.assign(n,(r=e,o=t.dateEnv,Object.assign(Object.assign({},yI(r.range,o,r.allDay)),{allDay:r.allDay}))),n}(e,n)),{jsEvent:null,view:n.viewApi||n.calendarApi.view}))}(o,0,r))}unselect(e){let t=this.getCurrentData();t.dateSelection&&(this.dispatch({type:"UNSELECT_DATES"}),function(e,t){t.emitter.trigger("unselect",{jsEvent:e?e.origEvent:null,view:t.viewApi||t.calendarApi.view})}(e,t))}addEvent(e,t){if(e instanceof JO){let t=e._def,n=e._instance;return this.getCurrentData().eventStore.defs[t.defId]||(this.dispatch({type:"ADD_EVENTS",eventStore:TO({def:t,instance:n})}),this.triggerEventAdd(e)),e}let n,r=this.getCurrentData();if(t instanceof QO)n=t.internalEventSource;else if("boolean"==typeof t)t&&([n]=FM(r.eventSources));else if(null!=t){let e=this.getEventSourceById(t);if(!e)return console.warn(`Could not find an event source with ID "${t}"`),null;n=e.internalEventSource}let o=_O(e,n,r,!1);if(o){let e=new JO(r,o.def,o.def.recurringDef?null:o.instance);return this.dispatch({type:"ADD_EVENTS",eventStore:TO(o)}),this.triggerEventAdd(e),e}return null}triggerEventAdd(e){let{emitter:t}=this.getCurrentData();t.trigger("eventAdd",{event:e,relatedEvents:[],revert:()=>{this.dispatch({type:"REMOVE_EVENTS",eventStore:XO(e)})}})}getEventById(e){let t=this.getCurrentData(),{defs:n,instances:r}=t.eventStore;e=String(e);for(let o in n){let a=n[o];if(a.publicId===e){if(a.recurringDef)return new JO(t,a,null);for(let e in r){let n=r[e];if(n.defId===a.defId)return new JO(t,a,n)}}}return null}getEvents(){let e=this.getCurrentData();return eI(e.eventStore,e)}removeAllEvents(){this.dispatch({type:"REMOVE_ALL_EVENTS"})}getEventSources(){let e=this.getCurrentData(),t=e.eventSources,n=[];for(let r in t)n.push(new QO(e,t[r]));return n}getEventSourceById(e){let t=this.getCurrentData(),n=t.eventSources;e=String(e);for(let r in n)if(n[r].publicId===e)return new QO(t,n[r]);return null}addEventSource(e){let t=this.getCurrentData();if(e instanceof QO)return t.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[e.internalEventSource]}),e;let n=HO(e,t);return n?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[n]}),new QO(t,n)):null}removeAllEventSources(){this.dispatch({type:"REMOVE_ALL_EVENT_SOURCES"})}refetchEvents(){this.dispatch({type:"FETCH_EVENT_SOURCES",isRefetch:!0})}scrollToTime(e){let t=OR(e);t&&this.trigger("_scrollRequest",{time:t})}}function NI(e,t){let n={left:Math.max(e.left,t.left),right:Math.min(e.right,t.right),top:Math.max(e.top,t.top),bottom:Math.min(e.bottom,t.bottom)};return n.left<n.right&&n.top<n.bottom&&n}const DI={defs:{},instances:{}};class TI{constructor(){this.getKeysForEventDefs=sM(this._getKeysForEventDefs),this.splitDateSelection=sM(this._splitDateSpan),this.splitEventStore=sM(this._splitEventStore),this.splitIndividualUi=sM(this._splitIndividualUi),this.splitEventDrag=sM(this._splitInteraction),this.splitEventResize=sM(this._splitInteraction),this.eventUiBuilders={}}splitProps(e){let t=this.getKeyInfo(e),n=this.getKeysForEventDefs(e.eventStore),r=this.splitDateSelection(e.dateSelection),o=this.splitIndividualUi(e.eventUiBases,n),a=this.splitEventStore(e.eventStore,n),s=this.splitEventDrag(e.eventDrag),i=this.splitEventResize(e.eventResize),l={};this.eventUiBuilders=PM(t,((e,t)=>this.eventUiBuilders[t]||sM(AI)));for(let n in t){let c=t[n],d=a[n]||DI,u=this.eventUiBuilders[n];l[n]={businessHours:c.businessHours||e.businessHours,dateSelection:r[n]||null,eventStore:d,eventUiBases:u(e.eventUiBases[""],c.ui,o[n]),eventSelection:d.instances[e.eventSelection]?e.eventSelection:"",eventDrag:s[n]||null,eventResize:i[n]||null}}return l}_splitDateSpan(e){let t={};if(e){let n=this.getKeysForDateSpan(e);for(let r of n)t[r]=e}return t}_getKeysForEventDefs(e){return PM(e.defs,(e=>this.getKeysForEventDef(e)))}_splitEventStore(e,t){let{defs:n,instances:r}=e,o={};for(let e in n)for(let r of t[e])o[r]||(o[r]={defs:{},instances:{}}),o[r].defs[e]=n[e];for(let e in r){let n=r[e];for(let r of t[n.defId])o[r]&&(o[r].instances[e]=n)}return o}_splitIndividualUi(e,t){let n={};for(let r in e)if(r)for(let o of t[r])n[o]||(n[o]={}),n[o][r]=e[r];return n}_splitInteraction(e){let t={};if(e){let n=this._splitEventStore(e.affectedEvents,this._getKeysForEventDefs(e.affectedEvents)),r=this._getKeysForEventDefs(e.mutatedEvents),o=this._splitEventStore(e.mutatedEvents,r),a=r=>{t[r]||(t[r]={affectedEvents:n[r]||DI,mutatedEvents:o[r]||DI,isEvent:e.isEvent})};for(let e in n)a(e);for(let e in o)a(e)}return t}}function AI(e,t,n){let r=[];e&&r.push(e),t&&r.push(t);let o={"":LO(r)};return n&&Object.assign(o,n),o}function RI(e,t,n,r){return{dow:e.getUTCDay(),isDisabled:Boolean(r&&(!r.activeRange||!mO(r.activeRange,e))),isOther:Boolean(r&&!mO(r.currentRange,e)),isToday:Boolean(t&&mO(t,e)),isPast:Boolean(n?e<n:!!t&&e<t.start),isFuture:Boolean(n?e>n:!!t&&e>=t.end)}}function MI(e,t){let n=["fc-day",`fc-day-${BR[e.dow]}`];return e.isDisabled?n.push("fc-day-disabled"):(e.isToday&&(n.push("fc-day-today"),n.push(t.getClass("today"))),e.isPast&&n.push("fc-day-past"),e.isFuture&&n.push("fc-day-future"),e.isOther&&n.push("fc-day-other")),n}const OI=wM({year:"numeric",month:"long",day:"numeric"}),II=wM({week:"long"});function PI(e,t,n="day",r=!0){const{dateEnv:o,options:a,calendarApi:s}=e;let i=o.format(t,"week"===n?II:OI);if(a.navLinks){let e=o.toDate(t);const l=e=>{let r="day"===n?a.navLinkDayClick:"week"===n?a.navLinkWeekClick:null;"function"==typeof r?r.call(s,o.toDate(t),e):("string"==typeof r&&(n=r),s.zoomTo(t,n))};return Object.assign({title:DR(a.navLinkHint,[i,e],i),"data-navlink":""},r?SR(l):{onClick:l})}return{"aria-label":i}}let LI;class FI{constructor(e,t,n,r){this.els=t;let o=this.originClientRect=e.getBoundingClientRect();n&&this.buildElHorizontals(o.left),r&&this.buildElVerticals(o.top)}buildElHorizontals(e){let t=[],n=[];for(let r of this.els){let o=r.getBoundingClientRect();t.push(o.left-e),n.push(o.right-e)}this.lefts=t,this.rights=n}buildElVerticals(e){let t=[],n=[];for(let r of this.els){let o=r.getBoundingClientRect();t.push(o.top-e),n.push(o.bottom-e)}this.tops=t,this.bottoms=n}leftToIndex(e){let t,{lefts:n,rights:r}=this,o=n.length;for(t=0;t<o;t+=1)if(e>=n[t]&&e<r[t])return t}topToIndex(e){let t,{tops:n,bottoms:r}=this,o=n.length;for(t=0;t<o;t+=1)if(e>=n[t]&&e<r[t])return t}getWidth(e){return this.rights[e]-this.lefts[e]}getHeight(e){return this.bottoms[e]-this.tops[e]}similarTo(e){return zI(this.tops||[],e.tops||[])&&zI(this.bottoms||[],e.bottoms||[])&&zI(this.lefts||[],e.lefts||[])&&zI(this.rights||[],e.rights||[])}}function zI(e,t){const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(Math.round(e[r])!==Math.round(t[r]))return!1;return!0}class HI extends eO{constructor(){super(...arguments),this.uid=jR()}prepareHits(){}queryHit(e,t,n,r){return null}isValidSegDownEl(e){return!this.props.eventDrag&&!this.props.eventResize&&!gR(e,".fc-event-mirror")}isValidDateDownEl(e){return!(gR(e,".fc-event:not(.fc-bg-event)")||gR(e,".fc-more-link")||gR(e,"a[data-navlink]")||gR(e,".fc-popover"))}}class VI{constructor(e){this.timeZoneName=e}}class BI{constructor(e=e=>e.thickness||1){this.getEntryThickness=e,this.strictOrder=!1,this.allowReslicing=!1,this.maxCoord=-1,this.maxStackCnt=-1,this.levelCoords=[],this.entriesByLevel=[],this.stackCnts={}}addSegs(e){let t=[];for(let n of e)this.insertEntry(n,t);return t}insertEntry(e,t){let n=this.findInsertion(e);this.isInsertionValid(n,e)?this.insertEntryAt(e,n):this.handleInvalidInsertion(n,e,t)}isInsertionValid(e,t){return(-1===this.maxCoord||e.levelCoord+this.getEntryThickness(t)<=this.maxCoord)&&(-1===this.maxStackCnt||e.stackCnt<this.maxStackCnt)}handleInvalidInsertion(e,t,n){if(this.allowReslicing&&e.touchingEntry){const r=Object.assign(Object.assign({},t),{span:$I(t.span,e.touchingEntry.span)});n.push(r),this.splitEntry(t,e.touchingEntry,n)}else n.push(t)}splitEntry(e,t,n){let r=e.span,o=t.span;r.start<o.start&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:r.start,end:o.start}},n),r.end>o.end&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:o.end,end:r.end}},n)}insertEntryAt(e,t){let{entriesByLevel:n,levelCoords:r}=this;-1===t.lateral?(GI(r,t.level,t.levelCoord),GI(n,t.level,[e])):GI(n[t.level],t.lateral,e),this.stackCnts[UI(e)]=t.stackCnt}findInsertion(e){let{levelCoords:t,entriesByLevel:n,strictOrder:r,stackCnts:o}=this,a=t.length,s=0,i=-1,l=-1,c=null,d=0;for(let u=0;u<a;u+=1){const a=t[u];if(!r&&a>=s+this.getEntryThickness(e))break;let f,h=n[u],m=YI(h,e.span.start,WI),p=m[0]+m[1];for(;(f=h[p])&&f.span.start<e.span.end;){let e=a+this.getEntryThickness(f);e>s&&(s=e,c=f,i=u,l=p),e===s&&(d=Math.max(d,o[UI(f)]+1)),p+=1}}let u=0;if(c)for(u=i+1;u<a&&t[u]<s;)u+=1;let f=-1;return u<a&&t[u]===s&&(f=YI(n[u],e.span.end,WI)[0]),{touchingLevel:i,touchingLateral:l,touchingEntry:c,stackCnt:d,levelCoord:s,level:u,lateral:f}}toRects(){let{entriesByLevel:e,levelCoords:t}=this,n=e.length,r=[];for(let o=0;o<n;o+=1){let n=e[o],a=t[o];for(let e of n)r.push(Object.assign(Object.assign({},e),{thickness:this.getEntryThickness(e),levelCoord:a}))}return r}}function WI(e){return e.span.end}function UI(e){return e.index+":"+e.span.start}function $I(e,t){let n=Math.max(e.start,t.start),r=Math.min(e.end,t.end);return n<r?{start:n,end:r}:null}function GI(e,t,n){e.splice(t,0,n)}function YI(e,t,n){let r=0,o=e.length;if(!o||t<n(e[r]))return[0,0];if(t>n(e[o-1]))return[o,0];for(;r<o;){let a=Math.floor(r+(o-r)/2),s=n(e[a]);if(t<s)o=a;else{if(!(t>s))return[a,1];r=a+1}}return[r,0]}Boolean;const qI="fc-col-header-cell";function ZI(e){return e.text}class KI extends eO{render(){let{dateEnv:e,options:t,theme:n,viewApi:r}=this.context,{props:o}=this,{date:a,dateProfile:s}=o,i=RI(a,o.todayRange,null,s),l=[qI].concat(MI(i,n)),c=e.format(a,o.dayHeaderFormat),d=!i.isDisabled&&o.colCnt>1?PI(this.context,a):{},u=e.toDate(a);e.namedTimeZoneImpl&&(u=$R(u,36e5));let f=Object.assign(Object.assign(Object.assign({date:u,view:r},o.extraRenderProps),{text:c}),i);return JT(iO,{elTag:"th",elClasses:l,elAttrs:Object.assign({role:"columnheader",colSpan:o.colSpan,"data-date":i.isDisabled?void 0:oM(a)},o.extraDataAttrs),renderProps:f,generatorName:"dayHeaderContent",customGenerator:t.dayHeaderContent,defaultGenerator:ZI,classNameGenerator:t.dayHeaderClassNames,didMount:t.dayHeaderDidMount,willUnmount:t.dayHeaderWillUnmount},(e=>JT("div",{className:"fc-scrollgrid-sync-inner"},!i.isDisabled&&JT(e,{elTag:"a",elAttrs:d,elClasses:["fc-col-header-cell-cushion",o.isSticky&&"fc-sticky"]}))))}}const QI=wM({weekday:"long"});class JI extends eO{render(){let{props:e}=this,{dateEnv:t,theme:n,viewApi:r,options:o}=this.context,a=UR(new Date(2592e5),e.dow),s={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},i=t.format(a,e.dayHeaderFormat),l=Object.assign(Object.assign(Object.assign(Object.assign({date:a},s),{view:r}),e.extraRenderProps),{text:i});return JT(iO,{elTag:"th",elClasses:[qI,...MI(s,n),...e.extraClassNames||[]],elAttrs:Object.assign({role:"columnheader",colSpan:e.colSpan},e.extraDataAttrs),renderProps:l,generatorName:"dayHeaderContent",customGenerator:o.dayHeaderContent,defaultGenerator:ZI,classNameGenerator:o.dayHeaderClassNames,didMount:o.dayHeaderDidMount,willUnmount:o.dayHeaderWillUnmount},(n=>JT("div",{className:"fc-scrollgrid-sync-inner"},JT(n,{elTag:"a",elClasses:["fc-col-header-cell-cushion",e.isSticky&&"fc-sticky"],elAttrs:{"aria-label":t.format(a,QI)}}))))}}class XI extends eO{constructor(){super(...arguments),this.createDayHeaderFormatter=sM(eP)}render(){let{context:e}=this,{dates:t,dateProfile:n,datesRepDistinctDays:r,renderIntro:o}=this.props,a=this.createDayHeaderFormatter(e.options.dayHeaderFormat,r,t.length);return JT(_I,{unit:"day"},((e,s)=>JT("tr",{role:"row"},o&&o("day"),t.map((e=>r?JT(KI,{key:e.toISOString(),date:e,dateProfile:n,todayRange:s,colCnt:t.length,dayHeaderFormat:a}):JT(JI,{key:e.getUTCDay(),dow:e.getUTCDay(),dayHeaderFormat:a}))))))}}function eP(e,t,n){return e||function(e,t){return wM(!e||t>10?{weekday:"short"}:t>1?{weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}:{weekday:"long"})}(t,n)}class tP{constructor(e,t){let n=e.start,{end:r}=e,o=[],a=[],s=-1;for(;n<r;)t.isHiddenDay(n)?o.push(s+.5):(s+=1,o.push(s),a.push(n)),n=UR(n,1);this.dates=a,this.indices=o,this.cnt=a.length}sliceRange(e){let t=this.getDateDayIndex(e.start),n=this.getDateDayIndex(UR(e.end,-1)),r=Math.max(0,t),o=Math.min(this.cnt-1,n);return r=Math.ceil(r),o=Math.floor(o),r<=o?{firstIndex:r,lastIndex:o,isStart:t===r,isEnd:n===o}:null}getDateDayIndex(e){let{indices:t}=this,n=Math.floor(GR(this.dates[0],e));return n<0?t[0]-1:n>=t.length?t[t.length-1]+1:t[n]}}class nP{constructor(e,t){let n,r,o,{dates:a}=e;if(t){for(r=a[0].getUTCDay(),n=1;n<a.length&&a[n].getUTCDay()!==r;n+=1);o=Math.ceil(a.length/n)}else o=1,n=a.length;this.rowCnt=o,this.colCnt=n,this.daySeries=e,this.cells=this.buildCells(),this.headerDates=this.buildHeaderDates()}buildCells(){let e=[];for(let t=0;t<this.rowCnt;t+=1){let n=[];for(let e=0;e<this.colCnt;e+=1)n.push(this.buildCell(t,e));e.push(n)}return e}buildCell(e,t){let n=this.daySeries.dates[e*this.colCnt+t];return{key:n.toISOString(),date:n}}buildHeaderDates(){let e=[];for(let t=0;t<this.colCnt;t+=1)e.push(this.cells[0][t].date);return e}sliceRange(e){let{colCnt:t}=this,n=this.daySeries.sliceRange(e),r=[];if(n){let{firstIndex:e,lastIndex:o}=n,a=e;for(;a<=o;){let s=Math.floor(a/t),i=Math.min((s+1)*t,o+1);r.push({row:s,firstCol:a%t,lastCol:(i-1)%t,isStart:n.isStart&&a===e,isEnd:n.isEnd&&i-1===o}),a=i}}return r}}class rP{constructor(){this.sliceBusinessHours=sM(this._sliceBusinessHours),this.sliceDateSelection=sM(this._sliceDateSpan),this.sliceEventStore=sM(this._sliceEventStore),this.sliceEventDrag=sM(this._sliceInteraction),this.sliceEventResize=sM(this._sliceInteraction),this.forceDayIfListItem=!1}sliceProps(e,t,n,r,...o){let{eventUiBases:a}=e,s=this.sliceEventStore(e.eventStore,a,t,n,...o);return{dateSelectionSegs:this.sliceDateSelection(e.dateSelection,t,n,a,r,...o),businessHourSegs:this.sliceBusinessHours(e.businessHours,t,n,r,...o),fgEventSegs:s.fg,bgEventSegs:s.bg,eventDrag:this.sliceEventDrag(e.eventDrag,a,t,n,...o),eventResize:this.sliceEventResize(e.eventResize,a,t,n,...o),eventSelection:e.eventSelection}}sliceNowDate(e,t,n,r,...o){return this._sliceDateSpan({range:{start:e,end:$R(e,1)},allDay:!1},t,n,{},r,...o)}_sliceBusinessHours(e,t,n,r,...o){return e?this._sliceEventStore(xO(e,oP(t,Boolean(n)),r),{},t,n,...o).bg:[]}_sliceEventStore(e,t,n,r,...o){if(e){let a=tI(e,t,oP(n,Boolean(r)),r);return{bg:this.sliceEventRanges(a.bg,o),fg:this.sliceEventRanges(a.fg,o)}}return{bg:[],fg:[]}}_sliceInteraction(e,t,n,r,...o){if(!e)return null;let a=tI(e.mutatedEvents,t,oP(n,Boolean(r)),r);return{segs:this.sliceEventRanges(a.fg,o),affectedInstances:e.affectedEvents.instances,isEvent:e.isEvent}}_sliceDateSpan(e,t,n,r,o,...a){if(!e)return[];let s=oP(t,Boolean(n)),i=hO(e.range,s);if(i){let t=function(e,t,n){let r=jO({editable:!1},n),o=NO(r.refined,r.extra,"",e.allDay,!0,n);return{def:o,ui:aI(o,t),instance:bO(o.defId,e.range),range:e.range,isStart:!0,isEnd:!0}}(e=Object.assign(Object.assign({},e),{range:i}),r,o),n=this.sliceRange(e.range,...a);for(let e of n)e.eventRange=t;return n}return[]}sliceEventRanges(e,t){let n=[];for(let r of e)n.push(...this.sliceEventRange(r,t));return n}sliceEventRange(e,t){let n=e.range;this.forceDayIfListItem&&"list-item"===e.ui.display&&(n={start:n.start,end:UR(n.start,1)});let r=this.sliceRange(n,...t);for(let t of r)t.eventRange=e,t.isStart=e.isStart&&t.isStart,t.isEnd=e.isEnd&&t.isEnd;return r}}function oP(e,t){let n=e.activeRange;return t?n:{start:$R(n.start,e.slotMinTime.milliseconds),end:$R(n.end,e.slotMaxTime.milliseconds-864e5)}}const aP=/^(visible|hidden)$/;class sP extends eO{constructor(){super(...arguments),this.handleEl=e=>{this.el=e,tO(this.props.elRef,e)}}render(){let{props:e}=this,{liquid:t,liquidIsAbsolute:n}=e,r=t&&n,o=["fc-scroller"];return t&&(n?o.push("fc-scroller-liquid-absolute"):o.push("fc-scroller-liquid")),JT("div",{ref:this.handleEl,className:o.join(" "),style:{overflowX:e.overflowX,overflowY:e.overflowY,left:r&&-(e.overcomeLeft||0)||"",right:r&&-(e.overcomeRight||0)||"",bottom:r&&-(e.overcomeBottom||0)||"",marginLeft:!r&&-(e.overcomeLeft||0)||"",marginRight:!r&&-(e.overcomeRight||0)||"",marginBottom:!r&&-(e.overcomeBottom||0)||"",maxHeight:e.maxHeight||""}},e.children)}needsXScrolling(){if(aP.test(this.props.overflowX))return!1;let{el:e}=this,t=this.el.getBoundingClientRect().width-this.getYScrollbarWidth(),{children:n}=e;for(let e=0;e<n.length;e+=1)if(n[e].getBoundingClientRect().width>t)return!0;return!1}needsYScrolling(){if(aP.test(this.props.overflowY))return!1;let{el:e}=this,t=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),{children:n}=e;for(let e=0;e<n.length;e+=1)if(n[e].getBoundingClientRect().height>t)return!0;return!1}getXScrollbarWidth(){return aP.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight}getYScrollbarWidth(){return aP.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth}}class iP{constructor(e){this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=(e,t)=>{let{depths:n,currentMap:r}=this,o=!1,a=!1;null!==e?(o=t in r,r[t]=e,n[t]=(n[t]||0)+1,a=!0):(n[t]-=1,n[t]||(delete r[t],delete this.callbackMap[t],o=!0)),this.masterCallback&&(o&&this.masterCallback(null,String(t)),a&&this.masterCallback(e,String(t)))}}createRef(e){let t=this.callbackMap[e];return t||(t=this.callbackMap[e]=t=>{this.handleValue(t,String(e))}),t}collect(e,t,n){return function(e,t=0,n,r=1){let o=[];null==n&&(n=Object.keys(e).length);for(let a=t;a<n;a+=r){let t=e[a];void 0!==t&&o.push(t)}return o}(this.currentMap,e,t,n)}getAll(){return FM(this.currentMap)}}function lP(e,t){return e.liquid&&t.liquid}function cP(e,t){return VR(e,t,zM)}function dP(e,t){let n=[];for(let r of e){let e=r.span||1;for(let o=0;o<e;o+=1)n.push(JT("col",{style:{width:"shrink"===r.width?uP(t):r.width||"",minWidth:r.minWidth||""}}))}return JT("colgroup",{},...n)}function uP(e){return null==e?4:e}function fP(e,t){let n=["fc-scrollgrid-section",`fc-scrollgrid-section-${e.type}`,e.className];return t&&e.liquid&&null==e.maxHeight&&n.push("fc-scrollgrid-section-liquid"),e.isSticky&&n.push("fc-scrollgrid-section-sticky"),n}function hP(e){return JT("div",{className:"fc-scrollgrid-sticky-shim",style:{width:e.clientWidth,minWidth:e.tableMinWidth}})}function mP(e){let{stickyHeaderDates:t}=e;return null!=t&&"auto"!==t||(t="auto"===e.height||"auto"===e.viewHeight),t}function pP(e){let{stickyFooterScrollbar:t}=e;return null!=t&&"auto"!==t||(t="auto"===e.height||"auto"===e.viewHeight),t}class gP extends eO{constructor(){super(...arguments),this.processCols=sM((e=>e),cP),this.renderMicroColGroup=sM(dP),this.scrollerRefs=new iP,this.scrollerElRefs=new iP(this._handleScrollerEl.bind(this)),this.state={shrinkWidth:null,forceYScrollbars:!1,scrollerClientWidths:{},scrollerClientHeights:{}},this.handleSizing=()=>{this.safeSetState(Object.assign({shrinkWidth:this.computeShrinkWidth()},this.computeScrollerDims()))}}render(){let{props:e,state:t,context:n}=this,r=e.sections||[],o=this.processCols(e.cols),a=this.renderMicroColGroup(o,t.shrinkWidth),s=function(e,t){let n=["fc-scrollgrid",t.theme.getClass("table")];return e&&n.push("fc-scrollgrid-liquid"),n}(e.liquid,n);e.collapsibleWidth&&s.push("fc-scrollgrid-collapsible");let i,l=r.length,c=0,d=[],u=[],f=[];for(;c<l&&"header"===(i=r[c]).type;)d.push(this.renderSection(i,a,!0)),c+=1;for(;c<l&&"body"===(i=r[c]).type;)u.push(this.renderSection(i,a,!1)),c+=1;for(;c<l&&"footer"===(i=r[c]).type;)f.push(this.renderSection(i,a,!0)),c+=1;let h=!wI();const m={role:"rowgroup"};return JT("table",{role:"grid",className:s.join(" "),style:{height:e.height}},Boolean(!h&&d.length)&&JT("thead",m,...d),Boolean(!h&&u.length)&&JT("tbody",m,...u),Boolean(!h&&f.length)&&JT("tfoot",m,...f),h&&JT("tbody",m,...d,...u,...f))}renderSection(e,t,n){return"outerContent"in e?JT(eA,{key:e.key},e.outerContent):JT("tr",{key:e.key,role:"presentation",className:fP(e,this.props.liquid).join(" ")},this.renderChunkTd(e,t,e.chunk,n))}renderChunkTd(e,t,n,r){if("outerContent"in n)return n.outerContent;let{props:o}=this,{forceYScrollbars:a,scrollerClientWidths:s,scrollerClientHeights:i}=this.state,l=function(e,t){return null!=t.maxHeight||lP(e,t)}(o,e),c=lP(o,e),d=o.liquid?a?"scroll":l?"auto":"hidden":"visible",u=e.key,f=function(e,t,n,r){let{expandRows:o}=n;return"function"==typeof t.content?t.content(n):JT("table",{role:"presentation",className:[t.tableClassName,e.syncRowHeights?"fc-scrollgrid-sync-table":""].join(" "),style:{minWidth:n.tableMinWidth,width:n.clientWidth,height:o?n.clientHeight:""}},n.tableColGroupNode,JT(r?"thead":"tbody",{role:"presentation"},"function"==typeof t.rowContent?t.rowContent(n):t.rowContent))}(e,n,{tableColGroupNode:t,tableMinWidth:"",clientWidth:o.collapsibleWidth||void 0===s[u]?null:s[u],clientHeight:void 0!==i[u]?i[u]:null,expandRows:e.expandRows,syncRowHeights:!1,rowSyncHeights:[],reportRowHeightChange:()=>{}},r);return JT(r?"th":"td",{ref:n.elRef,role:"presentation"},JT("div",{className:"fc-scroller-harness"+(c?" fc-scroller-harness-liquid":"")},JT(sP,{ref:this.scrollerRefs.createRef(u),elRef:this.scrollerElRefs.createRef(u),overflowY:d,overflowX:o.liquid?"hidden":"visible",maxHeight:e.maxHeight,liquid:c,liquidIsAbsolute:!0},f)))}_handleScrollerEl(e,t){let n=function(e,t){for(let n of e)if(n.key===t)return n;return null}(this.props.sections,t);n&&tO(n.chunk.scrollerElRef,e)}componentDidMount(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)}componentDidUpdate(){this.handleSizing()}componentWillUnmount(){this.context.removeResizeHandler(this.handleSizing)}computeShrinkWidth(){return function(e){for(let t of e)if("shrink"===t.width)return!0;return!1}(this.props.cols)?function(e){let t=function(e){let t=e instanceof HTMLElement?[e]:e,n=[];for(let e=0;e<t.length;e+=1){let r=t[e].querySelectorAll(".fc-scrollgrid-shrink");for(let e=0;e<r.length;e+=1)n.push(r[e])}return n}(e),n=0;for(let e of t)n=Math.max(n,AR(e));return Math.ceil(n)}(this.scrollerElRefs.getAll()):0}computeScrollerDims(){let e=(LI||(LI=function(){let e=document.createElement("div");e.style.overflow="scroll",e.style.position="absolute",e.style.top="-9999px",e.style.left="-9999px",document.body.appendChild(e);let t=function(e){return{x:e.offsetHeight-e.clientHeight,y:e.offsetWidth-e.clientWidth}}(e);return document.body.removeChild(e),t}()),LI),{scrollerRefs:t,scrollerElRefs:n}=this,r=!1,o={},a={};for(let e in t.currentMap){let n=t.currentMap[e];if(n&&n.needsYScrolling()){r=!0;break}}for(let t of this.props.sections){let s=t.key,i=n.currentMap[s];if(i){let t=i.parentNode;o[s]=Math.floor(t.getBoundingClientRect().width-(r?e.y:0)),a[s]=Math.floor(t.getBoundingClientRect().height)}}return{forceYScrollbars:r,scrollerClientWidths:o,scrollerClientHeights:a}}}gP.addStateEquality({scrollerClientWidths:zM,scrollerClientHeights:zM});class vP extends eO{constructor(){super(...arguments),this.buildPublicEvent=sM(((e,t,n)=>new JO(e,t,n))),this.handleEl=e=>{this.el=e,tO(this.props.elRef,e),e&&nI(e,this.props.seg)}}render(){const{props:e,context:t}=this,{options:n}=t,{seg:r}=e,{eventRange:o}=r,{ui:a}=o,s={event:this.buildPublicEvent(t,o.def,o.instance),view:t.viewApi,timeText:e.timeText,textColor:a.textColor,backgroundColor:a.backgroundColor,borderColor:a.borderColor,isDraggable:!e.disableDragging&&lI(r,t),isStartResizable:!e.disableResizing&&cI(r,t),isEndResizable:!e.disableResizing&&dI(r),isMirror:Boolean(e.isDragging||e.isResizing||e.isDateSelecting),isStart:Boolean(r.isStart),isEnd:Boolean(r.isEnd),isPast:Boolean(e.isPast),isFuture:Boolean(e.isFuture),isToday:Boolean(e.isToday),isSelected:Boolean(e.isSelected),isDragging:Boolean(e.isDragging),isResizing:Boolean(e.isResizing)};return JT(iO,{elRef:this.handleEl,elTag:e.elTag,elAttrs:e.elAttrs,elClasses:[...hI(s),...r.eventRange.ui.classNames,...e.elClasses||[]],elStyle:e.elStyle,renderProps:s,generatorName:"eventContent",customGenerator:n.eventContent,defaultGenerator:e.defaultGenerator,classNameGenerator:n.eventClassNames,didMount:n.eventDidMount,willUnmount:n.eventWillUnmount},e.children)}componentDidUpdate(e){this.el&&this.props.seg!==e.seg&&nI(this.el,this.props.seg)}}class yP extends eO{render(){let{props:e,context:t}=this,{options:n}=t,{seg:r}=e,{ui:o}=r.eventRange,a=uI(r,n.eventTimeFormat||e.defaultTimeFormat,t,e.defaultDisplayEventTime,e.defaultDisplayEventEnd);return JT(vP,Object.assign({},e,{elTag:"a",elStyle:{borderColor:o.borderColor,backgroundColor:o.backgroundColor},elAttrs:pI(r,t),defaultGenerator:bP,timeText:a}),((e,t)=>JT(eA,null,JT(e,{elTag:"div",elClasses:["fc-event-main"],elStyle:{color:t.textColor}}),Boolean(t.isStartResizable)&&JT("div",{className:"fc-event-resizer fc-event-resizer-start"}),Boolean(t.isEndResizable)&&JT("div",{className:"fc-event-resizer fc-event-resizer-end"}))))}}function bP(e){return JT("div",{className:"fc-event-main-frame"},e.timeText&&JT("div",{className:"fc-event-time"},e.timeText),JT("div",{className:"fc-event-title-container"},JT("div",{className:"fc-event-title fc-sticky"},e.event.title||JT(eA,null," "))))}yP.addPropsEquality({seg:zM});const xP=e=>JT(QM.Consumer,null,(t=>{let{options:n}=t,r={isAxis:e.isAxis,date:t.dateEnv.toDate(e.date),view:t.viewApi};return JT(iO,{elRef:e.elRef,elTag:e.elTag||"div",elAttrs:e.elAttrs,elClasses:e.elClasses,elStyle:e.elStyle,renderProps:r,generatorName:"nowIndicatorContent",customGenerator:n.nowIndicatorContent,classNameGenerator:n.nowIndicatorClassNames,didMount:n.nowIndicatorDidMount,willUnmount:n.nowIndicatorWillUnmount},e.children)})),wP=wM({day:"numeric"});class kP extends eO{constructor(){super(...arguments),this.refineRenderProps=iM(CP)}render(){let{props:e,context:t}=this,{options:n}=t,r=this.refineRenderProps({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,isMonthStart:e.isMonthStart||!1,showDayNumber:e.showDayNumber,extraRenderProps:e.extraRenderProps,viewApi:t.viewApi,dateEnv:t.dateEnv,monthStartFormat:n.monthStartFormat});return JT(iO,{elRef:e.elRef,elTag:e.elTag,elAttrs:Object.assign(Object.assign({},e.elAttrs),r.isDisabled?{}:{"data-date":oM(e.date)}),elClasses:[...MI(r,t.theme),...e.elClasses||[]],elStyle:e.elStyle,renderProps:r,generatorName:"dayCellContent",customGenerator:n.dayCellContent,defaultGenerator:e.defaultGenerator,classNameGenerator:r.isDisabled?void 0:n.dayCellClassNames,didMount:n.dayCellDidMount,willUnmount:n.dayCellWillUnmount},e.children)}}function SP(e){return Boolean(e.dayCellContent||rO("dayCellContent",e))}function CP(e){let{date:t,dateEnv:n,dateProfile:r,isMonthStart:o}=e,a=RI(t,e.todayRange,null,r),s=e.showDayNumber?n.format(t,o?e.monthStartFormat:wP):"";return Object.assign(Object.assign(Object.assign({date:n.toDate(t),view:e.viewApi},a),{isMonthStart:o,dayNumberText:s}),e.extraRenderProps)}class _P extends eO{render(){let{props:e}=this,{seg:t}=e;return JT(vP,{elTag:"div",elClasses:["fc-bg-event"],elStyle:{backgroundColor:t.eventRange.ui.backgroundColor},defaultGenerator:jP,seg:t,timeText:"",isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday,disableDragging:!0,disableResizing:!0})}}function jP(e){let{title:t}=e.event;return t&&JT("div",{className:"fc-event-title"},e.event.title)}function EP(e){return JT("div",{className:`fc-${e}`})}const NP=e=>JT(QM.Consumer,null,(t=>{let{dateEnv:n,options:r}=t,{date:o}=e,a=r.weekNumberFormat||e.defaultFormat,s={num:n.computeWeekNumber(o),text:n.format(o,a),date:o};return JT(iO,{elRef:e.elRef,elTag:e.elTag,elAttrs:e.elAttrs,elClasses:e.elClasses,elStyle:e.elStyle,renderProps:s,generatorName:"weekNumberContent",customGenerator:r.weekNumberContent,defaultGenerator:DP,classNameGenerator:r.weekNumberClassNames,didMount:r.weekNumberDidMount,willUnmount:r.weekNumberWillUnmount},e.children)}));function DP(e){return e.text}class TP extends eO{constructor(){super(...arguments),this.state={titleId:wR()},this.handleRootEl=e=>{this.rootEl=e,this.props.elRef&&tO(this.props.elRef,e)},this.handleDocumentMouseDown=e=>{const t=function(e){var t,n;return null!==(n=null===(t=e.composedPath)||void 0===t?void 0:t.call(e)[0])&&void 0!==n?n:e.target}(e);this.rootEl.contains(t)||this.handleCloseClick()},this.handleDocumentKeyDown=e=>{"Escape"===e.key&&this.handleCloseClick()},this.handleCloseClick=()=>{let{onClose:e}=this.props;e&&e()}}render(){let{theme:e,options:t}=this.context,{props:n,state:r}=this,o=["fc-popover",e.getClass("popover")].concat(n.extraClassNames||[]);return function(e,t){var n=JT(KA,{__v:e,i:t});return n.containerInfo=t,n}(JT("div",Object.assign({},n.extraAttrs,{id:n.id,className:o.join(" "),"aria-labelledby":r.titleId,ref:this.handleRootEl}),JT("div",{className:"fc-popover-header "+e.getClass("popoverHeader")},JT("span",{className:"fc-popover-title",id:r.titleId},n.title),JT("span",{className:"fc-popover-close "+e.getIconClass("close"),title:t.closeHint,onClick:this.handleCloseClick})),JT("div",{className:"fc-popover-body "+e.getClass("popoverContent")},n.children)),n.parentEl)}componentDidMount(){document.addEventListener("mousedown",this.handleDocumentMouseDown),document.addEventListener("keydown",this.handleDocumentKeyDown),this.updateSize()}componentWillUnmount(){document.removeEventListener("mousedown",this.handleDocumentMouseDown),document.removeEventListener("keydown",this.handleDocumentKeyDown)}updateSize(){let{isRtl:e}=this.context,{alignmentEl:t,alignGridTop:n}=this.props,{rootEl:r}=this,o=function(e){let t=function(e){let t=[];for(;e instanceof HTMLElement;){let n=window.getComputedStyle(e);if("fixed"===n.position)break;/(auto|scroll)/.test(n.overflow+n.overflowY+n.overflowX)&&t.push(e),e=e.parentNode}return t}(e),n=e.getBoundingClientRect();for(let e of t){let t=NI(n,e.getBoundingClientRect());if(!t)return null;n=t}return n}(t);if(o){let a=r.getBoundingClientRect(),s=n?gR(t,".fc-scrollgrid").getBoundingClientRect().top:o.top,i=e?o.right-a.width:o.left;s=Math.max(s,10),i=Math.min(i,document.documentElement.clientWidth-10-a.width),i=Math.max(i,10);let l=r.offsetParent.getBoundingClientRect();!function(e,t){for(let n in t)bR(e,n,t[n])}(r,{top:s-l.top,left:i-l.left})}}}class AP extends HI{constructor(){super(...arguments),this.handleRootEl=e=>{this.rootEl=e,e?this.context.registerInteractiveComponent(this,{el:e,useEventCenter:!1}):this.context.unregisterInteractiveComponent(this)}}render(){let{options:e,dateEnv:t}=this.context,{props:n}=this,{startDate:r,todayRange:o,dateProfile:a}=n,s=t.format(r,e.dayPopoverFormat);return JT(kP,{elRef:this.handleRootEl,date:r,dateProfile:a,todayRange:o},((t,r,o)=>JT(TP,{elRef:o.ref,id:n.id,title:s,extraClassNames:["fc-more-popover"].concat(o.className||[]),extraAttrs:o,parentEl:n.parentEl,alignmentEl:n.alignmentEl,alignGridTop:n.alignGridTop,onClose:n.onClose},SP(e)&&JT(t,{elTag:"div",elClasses:["fc-more-popover-misc"]}),n.children)))}queryHit(e,t,n,r){let{rootEl:o,props:a}=this;return e>=0&&e<n&&t>=0&&t<r?{dateProfile:a.dateProfile,dateSpan:Object.assign({allDay:!a.forceTimed,range:{start:a.startDate,end:a.endDate}},a.extraDateSpan),dayEl:o,rect:{left:0,top:0,right:n,bottom:r},layer:1}:null}}class RP extends eO{constructor(){super(...arguments),this.state={isPopoverOpen:!1,popoverId:wR()},this.handleLinkEl=e=>{this.linkEl=e,this.props.elRef&&tO(this.props.elRef,e)},this.handleClick=e=>{let{props:t,context:n}=this,{moreLinkClick:r}=n.options,o=OP(t).start;function a(e){let{def:t,instance:r,range:o}=e.eventRange;return{event:new JO(n,t,r),start:n.dateEnv.toDate(o.start),end:n.dateEnv.toDate(o.end),isStart:e.isStart,isEnd:e.isEnd}}"function"==typeof r&&(r=r({date:o,allDay:Boolean(t.allDayDate),allSegs:t.allSegs.map(a),hiddenSegs:t.hiddenSegs.map(a),jsEvent:e,view:n.viewApi})),r&&"popover"!==r?"string"==typeof r&&n.calendarApi.zoomTo(o,r):this.setState({isPopoverOpen:!0})},this.handlePopoverClose=()=>{this.setState({isPopoverOpen:!1})}}render(){let{props:e,state:t}=this;return JT(QM.Consumer,null,(n=>{let{viewApi:r,options:o,calendarApi:a}=n,{moreLinkText:s}=o,{moreCnt:i}=e,l=OP(e),c="function"==typeof s?s.call(a,i):`+${i} ${s}`,d=DR(o.moreLinkHint,[i],c),u={num:i,shortText:`+${i}`,text:c,view:r};return JT(eA,null,Boolean(e.moreCnt)&&JT(iO,{elTag:e.elTag||"a",elRef:this.handleLinkEl,elClasses:[...e.elClasses||[],"fc-more-link"],elStyle:e.elStyle,elAttrs:Object.assign(Object.assign(Object.assign({},e.elAttrs),SR(this.handleClick)),{title:d,"aria-expanded":t.isPopoverOpen,"aria-controls":t.isPopoverOpen?t.popoverId:""}),renderProps:u,generatorName:"moreLinkContent",customGenerator:o.moreLinkContent,defaultGenerator:e.defaultGenerator||MP,classNameGenerator:o.moreLinkClassNames,didMount:o.moreLinkDidMount,willUnmount:o.moreLinkWillUnmount},e.children),t.isPopoverOpen&&JT(AP,{id:t.popoverId,startDate:l.start,endDate:l.end,dateProfile:e.dateProfile,todayRange:e.todayRange,extraDateSpan:e.extraDateSpan,parentEl:this.parentEl,alignmentEl:e.alignmentElRef?e.alignmentElRef.current:this.linkEl,alignGridTop:e.alignGridTop,forceTimed:e.forceTimed,onClose:this.handlePopoverClose},e.popoverContent()))}))}componentDidMount(){this.updateParentEl()}componentDidUpdate(){this.updateParentEl()}updateParentEl(){this.linkEl&&(this.parentEl=gR(this.linkEl,".fc-view-harness"))}}function MP(e){return e.text}function OP(e){if(e.allDayDate)return{start:e.allDayDate,end:UR(e.allDayDate,1)};let{hiddenSegs:t}=e;return{start:IP(t),end:(n=t,n.reduce(LP).eventRange.range.end)};var n}function IP(e){return e.reduce(PP).eventRange.range.start}function PP(e,t){return e.eventRange.range.start<t.eventRange.range.start?e:t}function LP(e,t){return e.eventRange.range.end>t.eventRange.range.end?e:t}class FP{constructor(){this.handlers=[]}set(e){this.currentValue=e;for(let t of this.handlers)t(e)}subscribe(e){this.handlers.push(e),void 0!==this.currentValue&&e(this.currentValue)}}class zP extends FP{constructor(){super(...arguments),this.map=new Map}handle(e){const{map:t}=this;let n=!1;e.isActive?(t.set(e.id,e),n=!0):t.has(e.id)&&(t.delete(e.id),n=!0),n&&this.set(t)}}const HP=[],VP={code:"en",week:{dow:0,doy:4},direction:"ltr",buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day",list:"list"},weekText:"W",weekTextLong:"Week",closeHint:"Close",timeHint:"Time",eventHint:"Event",allDayText:"all-day",moreLinkText:"more",noEventsText:"No events to display"},BP=Object.assign(Object.assign({},VP),{buttonHints:{prev:"Previous $0",next:"Next $0",today:(e,t)=>"day"===t?"Today":`This ${e}`},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint:e=>`Show ${e} more event${1===e?"":"s"}`});function WP(e){let t=e.length>0?e[0].code:"en",n=HP.concat(e),r={en:BP};for(let e of n)r[e.code]=e;return{map:r,defaultCode:t}}function UP(e,t){return"object"!=typeof e||Array.isArray(e)?function(e,t){let n=[].concat(e||[]),r=function(e,t){for(let n=0;n<e.length;n+=1){let r=e[n].toLocaleLowerCase().split("-");for(let e=r.length;e>0;e-=1){let n=r.slice(0,e).join("-");if(t[n])return t[n]}}return null}(n,t)||BP;return $P(e,n,r)}(e,t):$P(e.code,[e.code],e)}function $P(e,t,n){let r=OM([VP,n],["buttonText"]);delete r.code;let{week:o}=r;return delete r.week,{codeArg:e,codes:t,week:o,simpleNumberFormat:new Intl.NumberFormat(e),options:r}}function GP(e){return{id:jR(),name:e.name,premiumReleaseDate:e.premiumReleaseDate?new Date(e.premiumReleaseDate):void 0,deps:e.deps||[],reducers:e.reducers||[],isLoadingFuncs:e.isLoadingFuncs||[],contextInit:[].concat(e.contextInit||[]),eventRefiners:e.eventRefiners||{},eventDefMemberAdders:e.eventDefMemberAdders||[],eventSourceRefiners:e.eventSourceRefiners||{},isDraggableTransformers:e.isDraggableTransformers||[],eventDragMutationMassagers:e.eventDragMutationMassagers||[],eventDefMutationAppliers:e.eventDefMutationAppliers||[],dateSelectionTransformers:e.dateSelectionTransformers||[],datePointTransforms:e.datePointTransforms||[],dateSpanTransforms:e.dateSpanTransforms||[],views:e.views||{},viewPropsTransformers:e.viewPropsTransformers||[],isPropsValid:e.isPropsValid||null,externalDefTransforms:e.externalDefTransforms||[],viewContainerAppends:e.viewContainerAppends||[],eventDropTransformers:e.eventDropTransformers||[],componentInteractions:e.componentInteractions||[],calendarInteractions:e.calendarInteractions||[],themeClasses:e.themeClasses||{},eventSourceDefs:e.eventSourceDefs||[],cmdFormatter:e.cmdFormatter,recurringTypes:e.recurringTypes||[],namedTimeZonedImpl:e.namedTimeZonedImpl,initialView:e.initialView||"",elementDraggingImpl:e.elementDraggingImpl,optionChangeHandlers:e.optionChangeHandlers||{},scrollGridImpl:e.scrollGridImpl||null,listenerRefiners:e.listenerRefiners||{},optionRefiners:e.optionRefiners||{},propSetHandlers:e.propSetHandlers||{}}}class YP extends GM{}function qP(e,t,n,r){if(t[e])return t[e];let o=function(e,t,n,r){let o=n[e],a=r[e],s=e=>o&&null!==o[e]?o[e]:a&&null!==a[e]?a[e]:null,i=s("component"),l=s("superType"),c=null;if(l){if(l===e)throw new Error("Can't have a custom view type that references itself");c=qP(l,t,n,r)}return!i&&c&&(i=c.component),i?{type:e,component:i,defaults:Object.assign(Object.assign({},c?c.defaults:{}),o?o.rawOptions:{}),overrides:Object.assign(Object.assign({},c?c.overrides:{}),a?a.rawOptions:{})}:null}(e,t,n,r);return o&&(t[e]=o),o}function ZP(e){return PM(e,KP)}function KP(e){let t="function"==typeof e?{component:e}:e,{component:n}=t;return t.content?n=QP(t):!n||n.prototype instanceof eO||(n=QP(Object.assign(Object.assign({},t),{content:n}))),{superType:t.type,component:n,rawOptions:t}}function QP(e){return t=>JT(QM.Consumer,null,(n=>JT(iO,{elTag:"div",elClasses:dO(n.viewSpec),renderProps:Object.assign(Object.assign({},t),{nextDayThreshold:n.options.nextDayThreshold}),generatorName:void 0,customGenerator:e.content,classNameGenerator:e.classNames,didMount:e.didMount,willUnmount:e.willUnmount})))}function JP(e,t,n,r){let o=ZP(e),a=ZP(t.views),s=function(e,t){let n,r={};for(n in e)qP(n,r,e,t);for(n in t)qP(n,r,e,t);return r}(o,a);return PM(s,(e=>function(e,t,n,r,o){let a=e.overrides.duration||e.defaults.duration||r.duration||n.duration,s=null,i="",l="",c={};if(a&&(s=function(e){let t=JSON.stringify(e),n=XP[t];return void 0===n&&(n=OR(e),XP[t]=n),n}(a),s)){let e=HR(s);i=e.unit,1===e.value&&(l=i,c=t[i]?t[i].rawOptions:{})}let d=t=>{let n=t.buttonText||{},r=e.defaults.buttonTextKey;return null!=r&&null!=n[r]?n[r]:null!=n[e.type]?n[e.type]:null!=n[l]?n[l]:null},u=t=>{let n=t.buttonHints||{},r=e.defaults.buttonTextKey;return null!=r&&null!=n[r]?n[r]:null!=n[e.type]?n[e.type]:null!=n[l]?n[l]:null};return{type:e.type,component:e.component,duration:s,durationUnit:i,singleUnit:l,optionDefaults:e.defaults,optionOverrides:Object.assign(Object.assign({},c),e.overrides),buttonTextOverride:d(r)||d(n)||e.overrides.buttonText,buttonTextDefault:d(o)||e.defaults.buttonText||d(SM)||e.type,buttonTitleOverride:u(r)||u(n)||e.overrides.buttonHint,buttonTitleDefault:u(o)||e.defaults.buttonHint||u(SM)}}(e,a,t,n,r)))}YP.prototype.classes={root:"fc-theme-standard",tableCellShaded:"fc-cell-shaded",buttonGroup:"fc-button-group",button:"fc-button fc-button-primary",buttonActive:"fc-button-active"},YP.prototype.baseIconClass="fc-icon",YP.prototype.iconClasses={close:"fc-icon-x",prev:"fc-icon-chevron-left",next:"fc-icon-chevron-right",prevYear:"fc-icon-chevrons-left",nextYear:"fc-icon-chevrons-right"},YP.prototype.rtlIconClasses={prev:"fc-icon-chevron-right",next:"fc-icon-chevron-left",prevYear:"fc-icon-chevrons-right",nextYear:"fc-icon-chevrons-left"},YP.prototype.iconOverrideOption="buttonIcons",YP.prototype.iconOverrideCustomButtonOption="icon",YP.prototype.iconOverridePrefix="fc-icon-";let XP={};function eL(e){for(let t in e)if(e[t].isFetching)return!0;return!1}function tL(e,t,n,r){let o={};for(let e of t)o[e.sourceId]=e;return n&&(o=nL(o,n,r)),Object.assign(Object.assign({},e),o)}function nL(e,t,n){return rL(e,IM(e,(e=>function(e,t,n){return sL(e,n)?!n.options.lazyFetching||!e.fetchRange||e.isFetching||t.start<e.fetchRange.start||t.end>e.fetchRange.end:!e.latestFetchId}(e,t,n))),t,!1,n)}function rL(e,t,n,r,o){let a={};for(let s in e){let i=e[s];t[s]?a[s]=oL(i,n,r,o):a[s]=i}return a}function oL(e,t,n,r){let{options:o,calendarApi:a}=r,s=r.pluginHooks.eventSourceDefs[e.sourceDefId],i=jR();return s.fetch({eventSource:e,range:t,isRefetch:n,context:r},(n=>{let{rawEvents:s}=n;o.eventSourceSuccess&&(s=o.eventSourceSuccess.call(a,s,n.response)||s),e.success&&(s=e.success.call(a,s,n.response)||s),r.dispatch({type:"RECEIVE_EVENTS",sourceId:e.sourceId,fetchId:i,fetchRange:t,rawEvents:s})}),(n=>{let s=!1;o.eventSourceFailure&&(o.eventSourceFailure.call(a,n),s=!0),e.failure&&(e.failure(n),s=!0),s||console.warn(n.message,n),r.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:e.sourceId,fetchId:i,fetchRange:t,error:n})})),Object.assign(Object.assign({},e),{isFetching:!0,latestFetchId:i})}function aL(e,t){return IM(e,(e=>sL(e,t)))}function sL(e,t){return!t.pluginHooks.eventSourceDefs[e.sourceDefId].ignoreRange}function iL(e,t){switch(t.type){case"UNSELECT_DATES":return null;case"SELECT_DATES":return t.selection;default:return e}}function lL(e,t){switch(t.type){case"UNSELECT_EVENT":return"";case"SELECT_EVENT":return t.eventInstanceId;default:return e}}function cL(e,t){let n;switch(t.type){case"UNSET_EVENT_DRAG":return null;case"SET_EVENT_DRAG":return n=t.state,{affectedEvents:n.affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function dL(e,t){let n;switch(t.type){case"UNSET_EVENT_RESIZE":return null;case"SET_EVENT_RESIZE":return n=t.state,{affectedEvents:n.affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function uL(e,t,n,r,o){return{header:e.headerToolbar?fL(e.headerToolbar,e,t,n,r,o):null,footer:e.footerToolbar?fL(e.footerToolbar,e,t,n,r,o):null}}function fL(e,t,n,r,o,a){let s={},i=[],l=!1;for(let c in e){let d=hL(e[c],t,n,r,o,a);s[c]=d.widgets,i.push(...d.viewsWithButtons),l=l||d.hasTitle}return{sectionWidgets:s,viewsWithButtons:i,hasTitle:l}}function hL(e,t,n,r,o,a){let s="rtl"===t.direction,i=t.customButtons||{},l=n.buttonText||{},c=t.buttonText||{},d=n.buttonHints||{},u=t.buttonHints||{},f=e?e.split(" "):[],h=[],m=!1;return{widgets:f.map((e=>e.split(",").map((e=>{if("title"===e)return m=!0,{buttonName:e};let n,f,p,g,v,y;if(n=i[e])p=e=>{n.click&&n.click.call(e.target,e,e.target)},(g=r.getCustomButtonIconClass(n))||(g=r.getIconClass(e,s))||(v=n.text),y=n.hint||n.text;else if(f=o[e]){h.push(e),p=()=>{a.changeView(e)},(v=f.buttonTextOverride)||(g=r.getIconClass(e,s))||(v=f.buttonTextDefault);let n=f.buttonTextOverride||f.buttonTextDefault;y=DR(f.buttonTitleOverride||f.buttonTitleDefault||t.viewHint,[n,e],n)}else if(a[e])if(p=()=>{a[e]()},(v=l[e])||(g=r.getIconClass(e,s))||(v=c[e]),"prevYear"===e||"nextYear"===e){let t="prevYear"===e?"prev":"next";y=DR(d[t]||u[t],[c.year||"year","year"],c[e])}else y=t=>DR(d[e]||u[e],[c[t]||t,t],c[e]);return{buttonName:e,buttonClick:p,buttonIcon:g,buttonText:v,buttonHint:y}})))),viewsWithButtons:h,hasTitle:m}}class mL{constructor(e,t,n){this.type=e,this.getCurrentData=t,this.dateEnv=n}get calendar(){return this.getCurrentData().calendarApi}get title(){return this.getCurrentData().viewTitle}get activeStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.start)}get activeEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.end)}get currentStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.start)}get currentEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.end)}getOption(e){return this.getCurrentData().options[e]}}const pL=GP({name:"array-event-source",eventSourceDefs:[{ignoreRange:!0,parseMeta:e=>Array.isArray(e.events)?e.events:null,fetch(e,t){t({rawEvents:e.eventSource.meta})}}]}),gL=GP({name:"func-event-source",eventSourceDefs:[{parseMeta:e=>"function"==typeof e.events?e.events:null,fetch(e,t,n){const{dateEnv:r}=e.context;!function(e,n,r){let o=!1,a=function(e){o||(o=!0,t({rawEvents:e}))},s=function(e){o||(o=!0,r(e))},i=e(a,s);i&&"function"==typeof i.then&&i.then(a,s)}(e.eventSource.meta.bind(null,vI(e.range,r)),0,n)}}]}),vL={method:String,extraParams:RM,startParam:String,endParam:String,timeZoneParam:String};let yL={parseMeta:e=>!e.url||"json"!==e.format&&e.format?null:{url:e.url,format:"json",method:(e.method||"GET").toUpperCase(),extraParams:e.extraParams,startParam:e.startParam,endParam:e.endParam,timeZoneParam:e.timeZoneParam},fetch(e,t,n){const{meta:r}=e.eventSource,o=function(e,t,n){let r,o,a,s,{dateEnv:i,options:l}=n,c={};return r=e.startParam,null==r&&(r=l.startParam),o=e.endParam,null==o&&(o=l.endParam),a=e.timeZoneParam,null==a&&(a=l.timeZoneParam),s="function"==typeof e.extraParams?e.extraParams():e.extraParams||{},Object.assign(c,s),c[r]=i.formatIso(t.start),c[o]=i.formatIso(t.end),"local"!==i.timeZone&&(c[a]=i.timeZone),c}(r,e.range,e.context);(function(e,t,n){const r={method:e=e.toUpperCase()};return"GET"===e?t+=(-1===t.indexOf("?")?"?":"&")+new URLSearchParams(n):(r.body=new URLSearchParams(n),r.headers={"Content-Type":"application/x-www-form-urlencoded"}),fetch(t,r).then((e=>{if(e.ok)return e.json().then((t=>[t,e]),(()=>{throw new bI("Failure parsing JSON",e)}));throw new bI("Request failed",e)}))})(r.method,r.url,o).then((([e,n])=>{t({rawEvents:e,response:n})}),n)}};const bL={daysOfWeek:RM,startTime:OR,endTime:OR,duration:OR,startRecur:RM,endRecur:RM};function xL(e,t){let n=FM(t.getCurrentData().eventSources);if(1===n.length&&1===e.length&&Array.isArray(n[0]._raw)&&Array.isArray(e[0]))return void t.dispatch({type:"RESET_RAW_EVENTS",sourceId:n[0].sourceId,rawEvents:e[0]});let r=[];for(let t of e){let e=!1;for(let r=0;r<n.length;r+=1)if(n[r]._raw===t){n.splice(r,1),e=!0;break}e||r.push(t)}for(let e of n)t.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:e.sourceId});for(let e of r)t.calendarApi.addEventSource(e)}const wL=[pL,gL,GP({name:"json-event-source",eventSourceRefiners:vL,eventSourceDefs:[yL]}),GP({name:"simple-recurring-event",recurringTypes:[{parse(e,t){if(e.daysOfWeek||e.startTime||e.endTime||e.startRecur||e.endRecur){let o,a={daysOfWeek:e.daysOfWeek||null,startTime:e.startTime||null,endTime:e.endTime||null,startRecur:e.startRecur?t.createMarker(e.startRecur):null,endRecur:e.endRecur?t.createMarker(e.endRecur):null,dateEnv:t};return e.duration&&(o=e.duration),!o&&e.startTime&&e.endTime&&(n=e.endTime,r=e.startTime,o={years:n.years-r.years,months:n.months-r.months,days:n.days-r.days,milliseconds:n.milliseconds-r.milliseconds}),{allDayGuess:Boolean(!e.startTime&&!e.endTime),duration:o,typeData:a}}var n,r;return null},expand(e,t,n){let r=hO(t,{start:e.startRecur,end:e.endRecur});return r?function(e,t,n,r,o){let a=e?LM(e):null,s=qR(o.start),i=o.end,l=[];for(t&&(t.milliseconds<0?i=UR(i,1):t.milliseconds>=864e5&&(s=UR(s,-1)));s<i;){let e;a&&!a[s.getUTCDay()]||(e=t?r.add(s,t):s,l.push(r.createMarker(n.toDate(e)))),s=UR(s,1)}return l}(e.daysOfWeek,e.startTime,e.dateEnv,n,r):[]}}],eventRefiners:bL}),GP({name:"change-handler",optionChangeHandlers:{events(e,t){xL([e],t)},eventSources:xL}}),GP({name:"misc",isLoadingFuncs:[e=>eL(e.eventSources)],propSetHandlers:{dateProfile:function(e,t){t.emitter.trigger("datesSet",Object.assign(Object.assign({},vI(e.activeRange,t.dateEnv)),{view:t.viewApi}))},eventStore:function(e,t){let{emitter:n}=t;n.hasHandlers("eventsSet")&&n.trigger("eventsSet",eI(e,t))}}})];class kL{constructor(e,t){this.runTaskOption=e,this.drainedOption=t,this.queue=[],this.delayedRunner=new mR(this.drain.bind(this))}request(e,t){this.queue.push(e),this.delayedRunner.request(t)}pause(e){this.delayedRunner.pause(e)}resume(e,t){this.delayedRunner.resume(e,t)}drain(){let{queue:e}=this;for(;e.length;){let t,n=[];for(;t=e.shift();)this.runTask(t),n.push(t);this.drained(n)}}runTask(e){this.runTaskOption&&this.runTaskOption(e)}drained(e){this.drainedOption&&this.drainedOption(e)}}function SL(e,t,n){let r;return r=/^(year|month)$/.test(e.currentRangeUnit)?e.currentRange:e.activeRange,n.formatRange(r.start,r.end,wM(t.titleFormat||function(e){let{currentRangeUnit:t}=e;if("year"===t)return{year:"numeric"};if("month"===t)return{year:"numeric",month:"long"};let n=YR(e.currentRange.start,e.currentRange.end);return null!==n&&n>1?{year:"numeric",month:"short",day:"numeric"}:{year:"numeric",month:"long",day:"numeric"}}(e)),{isEndExclusive:e.isRangeAllDay,defaultSeparator:t.titleRangeSeparator})}class CL{constructor(){this.resetListeners=new Set}handleInput(e,t){const n=this.dateEnv;if(e!==n&&("function"==typeof t?this.nowFn=t:n||(this.nowAnchorDate=e.toDate(t?e.createMarker(t):e.createNowMarker()),this.nowAnchorQueried=Date.now()),this.dateEnv=e,n))for(const e of this.resetListeners.values())e()}getDateMarker(){return this.nowAnchorDate?this.dateEnv.timestampToMarker(this.nowAnchorDate.valueOf()+(Date.now()-this.nowAnchorQueried)):this.dateEnv.createMarker(this.nowFn())}addResetListener(e){this.resetListeners.add(e)}removeResetListener(e){this.resetListeners.delete(e)}}class _L{constructor(e){this.computeCurrentViewData=sM(this._computeCurrentViewData),this.organizeRawLocales=sM(WP),this.buildLocale=sM(UP),this.buildPluginHooks=function(){let e,t=[],n=[];return(r,o)=>(e&&VR(r,t)&&VR(o,n)||(e=function(e,t){let n={},r={premiumReleaseDate:void 0,reducers:[],isLoadingFuncs:[],contextInit:[],eventRefiners:{},eventDefMemberAdders:[],eventSourceRefiners:{},isDraggableTransformers:[],eventDragMutationMassagers:[],eventDefMutationAppliers:[],dateSelectionTransformers:[],datePointTransforms:[],dateSpanTransforms:[],views:{},viewPropsTransformers:[],isPropsValid:null,externalDefTransforms:[],viewContainerAppends:[],eventDropTransformers:[],componentInteractions:[],calendarInteractions:[],themeClasses:{},eventSourceDefs:[],cmdFormatter:null,recurringTypes:[],namedTimeZonedImpl:null,initialView:"",elementDraggingImpl:null,optionChangeHandlers:{},scrollGridImpl:null,listenerRefiners:{},optionRefiners:{},propSetHandlers:{}};function o(e){for(let l of e){const e=l.name,c=n[e];void 0===c?(n[e]=l.id,o(l.deps),i=l,r={premiumReleaseDate:(t=(s=r).premiumReleaseDate,a=i.premiumReleaseDate,void 0===t?a:void 0===a?t:new Date(Math.max(t.valueOf(),a.valueOf()))),reducers:s.reducers.concat(i.reducers),isLoadingFuncs:s.isLoadingFuncs.concat(i.isLoadingFuncs),contextInit:s.contextInit.concat(i.contextInit),eventRefiners:Object.assign(Object.assign({},s.eventRefiners),i.eventRefiners),eventDefMemberAdders:s.eventDefMemberAdders.concat(i.eventDefMemberAdders),eventSourceRefiners:Object.assign(Object.assign({},s.eventSourceRefiners),i.eventSourceRefiners),isDraggableTransformers:s.isDraggableTransformers.concat(i.isDraggableTransformers),eventDragMutationMassagers:s.eventDragMutationMassagers.concat(i.eventDragMutationMassagers),eventDefMutationAppliers:s.eventDefMutationAppliers.concat(i.eventDefMutationAppliers),dateSelectionTransformers:s.dateSelectionTransformers.concat(i.dateSelectionTransformers),datePointTransforms:s.datePointTransforms.concat(i.datePointTransforms),dateSpanTransforms:s.dateSpanTransforms.concat(i.dateSpanTransforms),views:Object.assign(Object.assign({},s.views),i.views),viewPropsTransformers:s.viewPropsTransformers.concat(i.viewPropsTransformers),isPropsValid:i.isPropsValid||s.isPropsValid,externalDefTransforms:s.externalDefTransforms.concat(i.externalDefTransforms),viewContainerAppends:s.viewContainerAppends.concat(i.viewContainerAppends),eventDropTransformers:s.eventDropTransformers.concat(i.eventDropTransformers),calendarInteractions:s.calendarInteractions.concat(i.calendarInteractions),componentInteractions:s.componentInteractions.concat(i.componentInteractions),themeClasses:Object.assign(Object.assign({},s.themeClasses),i.themeClasses),eventSourceDefs:s.eventSourceDefs.concat(i.eventSourceDefs),cmdFormatter:i.cmdFormatter||s.cmdFormatter,recurringTypes:s.recurringTypes.concat(i.recurringTypes),namedTimeZonedImpl:i.namedTimeZonedImpl||s.namedTimeZonedImpl,initialView:s.initialView||i.initialView,elementDraggingImpl:s.elementDraggingImpl||i.elementDraggingImpl,optionChangeHandlers:Object.assign(Object.assign({},s.optionChangeHandlers),i.optionChangeHandlers),scrollGridImpl:i.scrollGridImpl||s.scrollGridImpl,listenerRefiners:Object.assign(Object.assign({},s.listenerRefiners),i.listenerRefiners),optionRefiners:Object.assign(Object.assign({},s.optionRefiners),i.optionRefiners),propSetHandlers:Object.assign(Object.assign({},s.propSetHandlers),i.propSetHandlers)}):c!==l.id&&console.warn(`Duplicate plugin '${e}'`)}var t,a,s,i}return e&&o(e),o(t),r}(r,o)),t=r,n=o,e)}(),this.buildDateEnv=sM(jL),this.buildTheme=sM(EL),this.parseToolbars=sM(uL),this.buildViewSpecs=sM(JP),this.buildDateProfileGenerator=iM(NL),this.buildViewApi=sM(DL),this.buildViewUiProps=iM(RL),this.buildEventUiBySource=sM(TL,zM),this.buildEventUiBases=sM(AL),this.parseContextBusinessHours=iM(OL),this.buildTitle=sM(SL),this.nowManager=new CL,this.emitter=new GO,this.actionRunner=new kL(this._handleAction.bind(this),this.updateData.bind(this)),this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.currentCalendarOptionsRefiners={},this.optionsForRefining=[],this.optionsForHandling=[],this.getCurrentData=()=>this.data,this.dispatch=e=>{this.actionRunner.request(e)},this.props=e,this.actionRunner.pause(),this.nowManager=new CL;let t={},n=this.computeOptionsData(e.optionOverrides,t,e.calendarApi),r=n.calendarOptions.initialView||n.pluginHooks.initialView,o=this.computeCurrentViewData(r,n,e.optionOverrides,t);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(o.options);let a={nowManager:this.nowManager,dateEnv:n.dateEnv,options:n.calendarOptions,pluginHooks:n.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},s=function(e,t,n){let r=e.initialDate;return null!=r?t.createMarker(r):n.getDateMarker()}(n.calendarOptions,n.dateEnv,this.nowManager),i=o.dateProfileGenerator.build(s);mO(i.activeRange,s)||(s=i.currentRange.start);for(let e of n.pluginHooks.contextInit)e(a);let l=function(e,t,n){let r=t?t.activeRange:null;return tL({},function(e,t){let n=VO(t),r=[].concat(e.eventSources||[]),o=[];e.initialEvents&&r.unshift(e.initialEvents),e.events&&r.unshift(e.events);for(let e of r){let r=HO(e,t,n);r&&o.push(r)}return o}(e,n),r,n)}(n.calendarOptions,i,a),c={dynamicOptionOverrides:t,currentViewType:r,currentDate:s,dateProfile:i,businessHours:this.parseContextBusinessHours(a),eventSources:l,eventUiBases:{},eventStore:{defs:{},instances:{}},renderableEventStore:{defs:{},instances:{}},dateSelection:null,eventSelection:"",eventDrag:null,eventResize:null,selectionConfig:this.buildViewUiProps(a).selectionConfig},d=Object.assign(Object.assign({},a),c);for(let e of n.pluginHooks.reducers)Object.assign(c,e(null,null,d));ML(c,a)&&this.emitter.trigger("loading",!0),this.state=c,this.updateData(),this.actionRunner.resume()}resetOptions(e,t){let{props:n}=this;void 0===t?n.optionOverrides=e:(n.optionOverrides=Object.assign(Object.assign({},n.optionOverrides||{}),e),this.optionsForRefining.push(...t)),(void 0===t||t.length)&&this.actionRunner.request({type:"NOTHING"})}_handleAction(e){let{props:t,state:n,emitter:r}=this,o=function(e,t){return"SET_OPTION"===t.type?Object.assign(Object.assign({},e),{[t.optionName]:t.rawOptionValue}):e}(n.dynamicOptionOverrides,e),a=this.computeOptionsData(t.optionOverrides,o,t.calendarApi),s=function(e,t){return"CHANGE_VIEW_TYPE"===t.type&&(e=t.viewType),e}(n.currentViewType,e),i=this.computeCurrentViewData(s,a,t.optionOverrides,o);t.calendarApi.currentDataManager=this,r.setThisContext(t.calendarApi),r.setOptions(i.options);let l={nowManager:this.nowManager,dateEnv:a.dateEnv,options:a.calendarOptions,pluginHooks:a.pluginHooks,calendarApi:t.calendarApi,dispatch:this.dispatch,emitter:r,getCurrentData:this.getCurrentData},{currentDate:c,dateProfile:d}=n;this.data&&this.data.dateProfileGenerator!==i.dateProfileGenerator&&(d=i.dateProfileGenerator.build(c)),c=function(e,t){return"CHANGE_DATE"===t.type?t.dateMarker:e}(c,e),d=function(e,t,n,r){let o;switch(t.type){case"CHANGE_VIEW_TYPE":return r.build(t.dateMarker||n);case"CHANGE_DATE":return r.build(t.dateMarker);case"PREV":if(o=r.buildPrev(e,n),o.isValid)return o;break;case"NEXT":if(o=r.buildNext(e,n),o.isValid)return o}return e}(d,e,c,i.dateProfileGenerator),"PREV"!==e.type&&"NEXT"!==e.type&&mO(d.currentRange,c)||(c=d.currentRange.start);let u=function(e,t,n,r){let o=n?n.activeRange:null;switch(t.type){case"ADD_EVENT_SOURCES":return tL(e,t.sources,o,r);case"REMOVE_EVENT_SOURCE":return a=e,s=t.sourceId,IM(a,(e=>e.sourceId!==s));case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return n?nL(e,o,r):e;case"FETCH_EVENT_SOURCES":return rL(e,t.sourceIds?LM(t.sourceIds):aL(e,r),o,t.isRefetch||!1,r);case"RECEIVE_EVENTS":case"RECEIVE_EVENT_ERROR":return function(e,t,n,r){let o=e[t];return o&&n===o.latestFetchId?Object.assign(Object.assign({},e),{[t]:Object.assign(Object.assign({},o),{isFetching:!1,fetchRange:r})}):e}(e,t.sourceId,t.fetchId,t.fetchRange);case"REMOVE_ALL_EVENT_SOURCES":return{};default:return e}var a,s}(n.eventSources,e,d,l),f=function(e,t,n,r,o){switch(t.type){case"RECEIVE_EVENTS":return function(e,t,n,r,o,a){if(t&&n===t.latestFetchId){let n=DO(BO(o,t,a),t,a);return r&&(n=xO(n,r,a)),AO($O(e,t.sourceId),n)}return e}(e,n[t.sourceId],t.fetchId,t.fetchRange,t.rawEvents,o);case"RESET_RAW_EVENTS":return function(e,t,n,r,o){const{defIdMap:a,instanceIdMap:s}=function(e){const{defs:t,instances:n}=e,r={},o={};for(let e in t){const n=t[e],{publicId:o}=n;o&&(r[o]=e)}for(let e in n){const r=t[n[e].defId],{publicId:a}=r;a&&(o[a]=e)}return{defIdMap:r,instanceIdMap:o}}(e);return xO(DO(BO(n,t,o),t,o,!1,a,s),r,o)}(e,n[t.sourceId],t.rawEvents,r.activeRange,o);case"ADD_EVENTS":return function(e,t,n,r){return n&&(t=xO(t,n,r)),AO(e,t)}(e,t.eventStore,r?r.activeRange:null,o);case"RESET_EVENTS":return t.eventStore;case"MERGE_EVENTS":return AO(e,t.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return r?xO(e,r.activeRange,o):e;case"REMOVE_EVENTS":return function(e,t){let{defs:n,instances:r}=e,o={},a={};for(let e in n)t.defs[e]||(o[e]=n[e]);for(let e in r)!t.instances[e]&&o[r[e].defId]&&(a[e]=r[e]);return{defs:o,instances:a}}(e,t.eventStore);case"REMOVE_EVENT_SOURCE":return $O(e,t.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return RO(e,(e=>!e.sourceId));case"REMOVE_ALL_EVENTS":return{defs:{},instances:{}};default:return e}}(n.eventStore,e,u,d,l),h=eL(u)&&!i.options.progressiveEventRendering&&n.renderableEventStore||f,{eventUiSingleBase:m,selectionConfig:p}=this.buildViewUiProps(l),g=this.buildEventUiBySource(u),v={dynamicOptionOverrides:o,currentViewType:s,currentDate:c,dateProfile:d,eventSources:u,eventStore:f,renderableEventStore:h,selectionConfig:p,eventUiBases:this.buildEventUiBases(h.defs,m,g),businessHours:this.parseContextBusinessHours(l),dateSelection:iL(n.dateSelection,e),eventSelection:lL(n.eventSelection,e),eventDrag:cL(n.eventDrag,e),eventResize:dL(n.eventResize,e)},y=Object.assign(Object.assign({},l),v);for(let t of a.pluginHooks.reducers)Object.assign(v,t(n,e,y));let b=ML(n,l),x=ML(v,l);!b&&x?r.trigger("loading",!0):b&&!x&&r.trigger("loading",!1),this.state=v,t.onAction&&t.onAction(e)}updateData(){let{props:e,state:t}=this,n=this.data,r=this.computeOptionsData(e.optionOverrides,t.dynamicOptionOverrides,e.calendarApi),o=this.computeCurrentViewData(t.currentViewType,r,e.optionOverrides,t.dynamicOptionOverrides),a=this.data=Object.assign(Object.assign(Object.assign({nowManager:this.nowManager,viewTitle:this.buildTitle(t.dateProfile,o.options,r.dateEnv),calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},r),o),t),s=r.pluginHooks.optionChangeHandlers,i=n&&n.calendarOptions,l=r.calendarOptions;if(i&&i!==l){i.timeZone!==l.timeZone&&(t.eventSources=a.eventSources=function(e,t,n){let r=t?t.activeRange:null;return rL(e,aL(e,n),r,!0,n)}(a.eventSources,t.dateProfile,a),t.eventStore=a.eventStore=UO(a.eventStore,n.dateEnv,a.dateEnv),t.renderableEventStore=a.renderableEventStore=UO(a.renderableEventStore,n.dateEnv,a.dateEnv));for(let e in s)-1===this.optionsForHandling.indexOf(e)&&i[e]===l[e]||s[e](l[e],a)}this.optionsForHandling=[],e.onData&&e.onData(a)}computeOptionsData(e,t,n){if(!this.optionsForRefining.length&&e===this.stableOptionOverrides&&t===this.stableDynamicOptionOverrides)return this.stableCalendarOptionsData;let{refinedOptions:r,pluginHooks:o,localeDefaults:a,availableLocaleData:s,extra:i}=this.processRawCalendarOptions(e,t);IL(i);let l=this.buildDateEnv(r.timeZone,r.locale,r.weekNumberCalculation,r.firstDay,r.weekText,o,s,r.defaultRangeSeparator),c=this.buildViewSpecs(o.views,this.stableOptionOverrides,this.stableDynamicOptionOverrides,a),d=this.buildTheme(r,o),u=this.parseToolbars(r,this.stableOptionOverrides,d,c,n);return this.stableCalendarOptionsData={calendarOptions:r,pluginHooks:o,dateEnv:l,viewSpecs:c,theme:d,toolbarConfig:u,localeDefaults:a,availableRawLocales:s.map}}processRawCalendarOptions(e,t){let{locales:n,locale:r}=TM([SM,e,t]),o=this.organizeRawLocales(n),a=o.map,s=this.buildLocale(r||o.defaultCode,a).options,i=this.buildPluginHooks(e.plugins||[],wL),l=this.currentCalendarOptionsRefiners=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},kM),CM),_M),i.listenerRefiners),i.optionRefiners),c={},d=TM([SM,s,e,t]),u={},f=this.currentCalendarOptionsInput,h=this.currentCalendarOptionsRefined,m=!1;for(let e in d)-1===this.optionsForRefining.indexOf(e)&&(d[e]===f[e]||jM[e]&&e in f&&jM[e](f[e],d[e]))?u[e]=h[e]:l[e]?(u[e]=l[e](d[e]),m=!0):c[e]=f[e];return m&&(this.currentCalendarOptionsInput=d,this.currentCalendarOptionsRefined=u,this.stableOptionOverrides=e,this.stableDynamicOptionOverrides=t),this.optionsForHandling.push(...this.optionsForRefining),this.optionsForRefining=[],{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:i,availableLocaleData:o,localeDefaults:s,extra:c}}_computeCurrentViewData(e,t,n,r){let o=t.viewSpecs[e];if(!o)throw new Error(`viewType "${e}" is not available. Please make sure you've loaded all neccessary plugins`);let{refinedOptions:a,extra:s}=this.processRawViewOptions(o,t.pluginHooks,t.localeDefaults,n,r);return IL(s),this.nowManager.handleInput(t.dateEnv,a.now),{viewSpec:o,options:a,dateProfileGenerator:this.buildDateProfileGenerator({dateProfileGeneratorClass:o.optionDefaults.dateProfileGeneratorClass,nowManager:this.nowManager,duration:o.duration,durationUnit:o.durationUnit,usesMinMaxTime:o.optionDefaults.usesMinMaxTime,dateEnv:t.dateEnv,calendarApi:this.props.calendarApi,slotMinTime:a.slotMinTime,slotMaxTime:a.slotMaxTime,showNonCurrentDates:a.showNonCurrentDates,dayCount:a.dayCount,dateAlignment:a.dateAlignment,dateIncrement:a.dateIncrement,hiddenDays:a.hiddenDays,weekends:a.weekends,validRangeInput:a.validRange,visibleRangeInput:a.visibleRange,fixedWeekCount:a.fixedWeekCount}),viewApi:this.buildViewApi(e,this.getCurrentData,t.dateEnv)}}processRawViewOptions(e,t,n,r,o){let a=TM([SM,e.optionDefaults,n,r,e.optionOverrides,o]),s=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},kM),CM),_M),DM),t.listenerRefiners),t.optionRefiners),i={},l=this.currentViewOptionsInput,c=this.currentViewOptionsRefined,d=!1,u={};for(let e in a)a[e]===l[e]||jM[e]&&jM[e](a[e],l[e])?i[e]=c[e]:(a[e]===this.currentCalendarOptionsInput[e]||jM[e]&&jM[e](a[e],this.currentCalendarOptionsInput[e])?e in this.currentCalendarOptionsRefined&&(i[e]=this.currentCalendarOptionsRefined[e]):s[e]?i[e]=s[e](a[e]):u[e]=a[e],d=!0);return d&&(this.currentViewOptionsInput=a,this.currentViewOptionsRefined=i),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined,extra:u}}}function jL(e,t,n,r,o,a,s,i){let l=UP(t||s.defaultCode,s.map);return new $M({calendarSystem:"gregory",timeZone:e,namedTimeZoneImpl:a.namedTimeZonedImpl,locale:l,weekNumberCalculation:n,firstDay:r,weekText:o,cmdFormatter:a.cmdFormatter,defaultSeparator:i})}function EL(e,t){return new(t.themeClasses[e.themeSystem]||YP)(e)}function NL(e){return new(e.dateProfileGeneratorClass||yO)(e)}function DL(e,t,n){return new mL(e,t,n)}function TL(e){return PM(e,(e=>e.ui))}function AL(e,t,n){let r={"":t};for(let t in e){let o=e[t];o.sourceId&&n[o.sourceId]&&(r[t]=n[o.sourceId])}return r}function RL(e){let{options:t}=e;return{eventUiSingleBase:PO({display:t.eventDisplay,editable:t.editable,startEditable:t.eventStartEditable,durationEditable:t.eventDurationEditable,constraint:t.eventConstraint,overlap:"boolean"==typeof t.eventOverlap?t.eventOverlap:void 0,allow:t.eventAllow,backgroundColor:t.eventBackgroundColor,borderColor:t.eventBorderColor,textColor:t.eventTextColor,color:t.eventColor},e),selectionConfig:PO({constraint:t.selectConstraint,overlap:"boolean"==typeof t.selectOverlap?t.selectOverlap:void 0,allow:t.selectAllow},e)}}function ML(e,t){for(let n of t.pluginHooks.isLoadingFuncs)if(n(e))return!0;return!1}function OL(e){return t=e.options.businessHours,n=e,DO(function(e){let t;return t=!0===e?[{}]:Array.isArray(e)?e.filter((e=>e.daysOfWeek)):"object"==typeof e&&e?[e]:[],t=t.map((e=>Object.assign(Object.assign({},YO),e))),t}(t),null,n);var t,n}function IL(e,t){for(let n in e)console.warn(`Unknown option '${n}'`+(t?` for view '${t}'`:""))}class PL extends eO{render(){return JT("div",{className:"fc-toolbar-chunk"},...this.props.widgetGroups.map((e=>this.renderWidgetGroup(e))))}renderWidgetGroup(e){let{props:t}=this,{theme:n}=this.context,r=[],o=!0;for(let a of e){let{buttonName:e,buttonClick:s,buttonText:i,buttonIcon:l,buttonHint:c}=a;if("title"===e)o=!1,r.push(JT("h2",{className:"fc-toolbar-title",id:t.titleId},t.title));else{let o=e===t.activeButton,a=!t.isTodayEnabled&&"today"===e||!t.isPrevEnabled&&"prev"===e||!t.isNextEnabled&&"next"===e,d=[`fc-${e}-button`,n.getClass("button")];o&&d.push(n.getClass("buttonActive")),r.push(JT("button",{type:"button",title:"function"==typeof c?c(t.navUnit):c,disabled:a,"aria-pressed":o,className:d.join(" "),onClick:s},i||(l?JT("span",{className:l,role:"img"}):"")))}}return r.length>1?JT("div",{className:o&&n.getClass("buttonGroup")||""},...r):r[0]}}class LL extends eO{render(){let e,t,{model:n,extraClassName:r}=this.props,o=!1,a=n.sectionWidgets,s=a.center;return a.left?(o=!0,e=a.left):e=a.start,a.right?(o=!0,t=a.right):t=a.end,JT("div",{className:[r||"","fc-toolbar",o?"fc-toolbar-ltr":""].join(" ")},this.renderSection("start",e||[]),this.renderSection("center",s||[]),this.renderSection("end",t||[]))}renderSection(e,t){let{props:n}=this;return JT(PL,{key:e,widgetGroups:t,title:n.title,navUnit:n.navUnit,activeButton:n.activeButton,isTodayEnabled:n.isTodayEnabled,isPrevEnabled:n.isPrevEnabled,isNextEnabled:n.isNextEnabled,titleId:n.titleId})}}class FL extends eO{constructor(){super(...arguments),this.state={availableWidth:null},this.handleEl=e=>{this.el=e,tO(this.props.elRef,e),this.updateAvailableWidth()},this.handleResize=()=>{this.updateAvailableWidth()}}render(){let{props:e,state:t}=this,{aspectRatio:n}=e,r=["fc-view-harness",n||e.liquid||e.height?"fc-view-harness-active":"fc-view-harness-passive"],o="",a="";return n?null!==t.availableWidth?o=t.availableWidth/n:a=1/n*100+"%":o=e.height||"",JT("div",{"aria-labelledby":e.labeledById,ref:this.handleEl,className:r.join(" "),style:{height:o,paddingBottom:a}},e.children)}componentDidMount(){this.context.addResizeHandler(this.handleResize)}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}updateAvailableWidth(){this.el&&this.props.aspectRatio&&this.setState({availableWidth:this.el.offsetWidth})}}class zL extends SI{constructor(e){super(e),this.handleSegClick=(e,t)=>{let{component:n}=this,{context:r}=n,o=rI(t);if(o&&n.isValidSegDownEl(e.target)){let a=gR(e.target,".fc-event-forced-url"),s=a?a.querySelector("a[href]").href:"";r.emitter.trigger("eventClick",{el:t,event:new JO(n.context,o.eventRange.def,o.eventRange.instance),jsEvent:e,view:r.viewApi}),s&&!e.defaultPrevented&&(window.location.href=s)}},this.destroy=kR(e.el,"click",".fc-event",this.handleSegClick)}}class HL extends SI{constructor(e){super(e),this.handleEventElRemove=e=>{e===this.currentSegEl&&this.handleSegLeave(null,this.currentSegEl)},this.handleSegEnter=(e,t)=>{rI(t)&&(this.currentSegEl=t,this.triggerEvent("eventMouseEnter",e,t))},this.handleSegLeave=(e,t)=>{this.currentSegEl&&(this.currentSegEl=null,this.triggerEvent("eventMouseLeave",e,t))},this.removeHoverListeners=function(e,t,n,r){let o;return kR(e,"mouseover",".fc-event",((e,t)=>{if(t!==o){o=t,n(e,t);let a=e=>{o=null,r(e,t),t.removeEventListener("mouseleave",a)};t.addEventListener("mouseleave",a)}}))}(e.el,0,this.handleSegEnter,this.handleSegLeave)}destroy(){this.removeHoverListeners()}triggerEvent(e,t,n){let{component:r}=this,{context:o}=r,a=rI(n);t&&!r.isValidSegDownEl(t.target)||o.emitter.trigger(e,{el:n,event:new JO(o,a.eventRange.def,a.eventRange.instance),jsEvent:t,view:o.viewApi})}}class VL extends XM{constructor(){super(...arguments),this.buildViewContext=sM(JM),this.buildViewPropTransformers=sM(WL),this.buildToolbarProps=sM(BL),this.headerRef={current:null},this.footerRef={current:null},this.interactionsStore={},this.state={viewLabelId:wR()},this.registerInteractiveComponent=(e,t)=>{let n=function(e,t){return{component:e,el:t.el,useEventCenter:null==t.useEventCenter||t.useEventCenter,isHitComboAllowed:t.isHitComboAllowed||null}}(e,t),r=[zL,HL].concat(this.props.pluginHooks.componentInteractions).map((e=>new e(n)));this.interactionsStore[e.uid]=r,CI[e.uid]=n},this.unregisterInteractiveComponent=e=>{let t=this.interactionsStore[e.uid];if(t){for(let e of t)e.destroy();delete this.interactionsStore[e.uid]}delete CI[e.uid]},this.resizeRunner=new mR((()=>{this.props.emitter.trigger("_resize",!0),this.props.emitter.trigger("windowResize",{view:this.props.viewApi})})),this.handleWindowResize=e=>{let{options:t}=this.props;t.handleWindowResize&&e.target===window&&this.resizeRunner.request(t.windowResizeDelay)}}render(){let e,{props:t}=this,{toolbarConfig:n,options:r}=t,o=!1,a="";t.isHeightAuto||t.forPrint?a="":null!=r.height?o=!0:null!=r.contentHeight?a=r.contentHeight:e=Math.max(r.aspectRatio,.5);let s=this.buildViewContext(t.viewSpec,t.viewApi,t.options,t.dateProfileGenerator,t.dateEnv,t.nowManager,t.theme,t.pluginHooks,t.dispatch,t.getCurrentData,t.emitter,t.calendarApi,this.registerInteractiveComponent,this.unregisterInteractiveComponent),i=n.header&&n.header.hasTitle?this.state.viewLabelId:void 0;return JT(QM.Provider,{value:s},JT(_I,{unit:"day"},(r=>{let s=this.buildToolbarProps(t.viewSpec,t.dateProfile,t.dateProfileGenerator,t.currentDate,r,t.viewTitle);return JT(eA,null,n.header&&JT(LL,Object.assign({ref:this.headerRef,extraClassName:"fc-header-toolbar",model:n.header,titleId:i},s)),JT(FL,{liquid:o,height:a,aspectRatio:e,labeledById:i},this.renderView(t),this.buildAppendContent()),n.footer&&JT(LL,Object.assign({ref:this.footerRef,extraClassName:"fc-footer-toolbar",model:n.footer,titleId:""},s)))})))}componentDidMount(){let{props:e}=this;this.calendarInteractions=e.pluginHooks.calendarInteractions.map((t=>new t(e))),window.addEventListener("resize",this.handleWindowResize);let{propSetHandlers:t}=e.pluginHooks;for(let n in t)t[n](e[n],e)}componentDidUpdate(e){let{props:t}=this,{propSetHandlers:n}=t.pluginHooks;for(let r in n)t[r]!==e[r]&&n[r](t[r],t)}componentWillUnmount(){window.removeEventListener("resize",this.handleWindowResize),this.resizeRunner.clear();for(let e of this.calendarInteractions)e.destroy();this.props.emitter.trigger("_unmount")}buildAppendContent(){let{props:e}=this;return JT(eA,{},...e.pluginHooks.viewContainerAppends.map((t=>t(e))))}renderView(e){let{pluginHooks:t}=e,{viewSpec:n}=e,r={dateProfile:e.dateProfile,businessHours:e.businessHours,eventStore:e.renderableEventStore,eventUiBases:e.eventUiBases,dateSelection:e.dateSelection,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,isHeightAuto:e.isHeightAuto,forPrint:e.forPrint},o=this.buildViewPropTransformers(t.viewPropsTransformers);for(let t of o)Object.assign(r,t.transform(r,e));return JT(n.component,Object.assign({},r))}}function BL(e,t,n,r,o,a){let s=n.build(o,void 0,!1),i=n.buildPrev(t,r,!1),l=n.buildNext(t,r,!1);return{title:a,activeButton:e.type,navUnit:e.singleUnit,isTodayEnabled:s.isValid&&!mO(t.currentRange,o),isPrevEnabled:i.isValid,isNextEnabled:l.isValid}}function WL(e){return e.map((e=>new e))}class UL extends EI{constructor(e,t={}){super(),this.isRendering=!1,this.isRendered=!1,this.currentClassNames=[],this.customContentRenderId=0,this.handleAction=e=>{switch(e.type){case"SET_EVENT_DRAG":case"SET_EVENT_RESIZE":this.renderRunner.tryDrain()}},this.handleData=e=>{this.currentData=e,this.renderRunner.request(e.calendarOptions.rerenderDelay)},this.handleRenderRequest=()=>{if(this.isRendering){this.isRendered=!0;let{currentData:e}=this;YM((()=>{kA(JT(kI,{options:e.calendarOptions,theme:e.theme,emitter:e.emitter},((t,n,r,o)=>(this.setClassNames(t),this.setHeight(n),JT(sO.Provider,{value:this.customContentRenderId},JT(VL,Object.assign({isHeightAuto:r,forPrint:o},e)))))),this.el)}))}else this.isRendered&&(this.isRendered=!1,kA(null,this.el),this.setClassNames([]),this.setHeight(""))},function(e){e.isConnected&&e.getRootNode&&uR(e.getRootNode())}(e),this.el=e,this.renderRunner=new mR(this.handleRenderRequest),new _L({optionOverrides:t,calendarApi:this,onAction:this.handleAction,onData:this.handleData})}render(){let e=this.isRendering;e?this.customContentRenderId+=1:this.isRendering=!0,this.renderRunner.request(),e&&this.updateSize()}destroy(){this.isRendering&&(this.isRendering=!1,this.renderRunner.request())}updateSize(){YM((()=>{super.updateSize()}))}batchRendering(e){this.renderRunner.pause("batchRendering"),e(),this.renderRunner.resume("batchRendering")}pauseRendering(){this.renderRunner.pause("pauseRendering")}resumeRendering(){this.renderRunner.resume("pauseRendering",!0)}resetOptions(e,t){this.currentDataManager.resetOptions(e,t)}setClassNames(e){if(!VR(e,this.currentClassNames)){let{classList:t}=this.el;for(let e of this.currentClassNames)t.remove(e);for(let n of e)t.add(n);this.currentClassNames=e}}setHeight(e){bR(this.el,"height",e)}}class $L extends HI{constructor(){super(...arguments),this.headerElRef={current:null}}renderSimpleLayout(e,t){let{props:n,context:r}=this,o=[],a=mP(r.options);return e&&o.push({type:"header",key:"header",isSticky:a,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),o.push({type:"body",key:"body",liquid:!0,chunk:{content:t}}),JT(cO,{elClasses:["fc-daygrid"],viewSpec:r.viewSpec},JT(gP,{liquid:!n.isHeightAuto&&!n.forPrint,collapsibleWidth:n.forPrint,cols:[],sections:o}))}renderHScrollLayout(e,t,n,r){let o=this.context.pluginHooks.scrollGridImpl;if(!o)throw new Error("No ScrollGrid implementation");let{props:a,context:s}=this,i=!a.forPrint&&mP(s.options),l=!a.forPrint&&pP(s.options),c=[];return e&&c.push({type:"header",key:"header",isSticky:i,chunks:[{key:"main",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),c.push({type:"body",key:"body",liquid:!0,chunks:[{key:"main",content:t}]}),l&&c.push({type:"footer",key:"footer",isSticky:!0,chunks:[{key:"main",content:hP}]}),JT(cO,{elClasses:["fc-daygrid"],viewSpec:s.viewSpec},JT(o,{liquid:!a.isHeightAuto&&!a.forPrint,forPrint:a.forPrint,collapsibleWidth:a.forPrint,colGroups:[{cols:[{span:n,minWidth:r}]}],sections:c}))}}function GL(e,t){let n=[];for(let e=0;e<t;e+=1)n[e]=[];for(let t of e)n[t.row].push(t);return n}function YL(e,t){let n=[];for(let e=0;e<t;e+=1)n[e]=[];for(let t of e)n[t.firstCol].push(t);return n}function qL(e,t){let n=[];if(e){for(let r=0;r<t;r+=1)n[r]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(let t of e.segs)n[t.row].segs.push(t)}else for(let e=0;e<t;e+=1)n[e]=null;return n}const ZL=wM({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});function KL(e){let{display:t}=e.eventRange.ui;return"list-item"===t||"auto"===t&&!e.eventRange.def.allDay&&e.firstCol===e.lastCol&&e.isStart&&e.isEnd}class QL extends eO{render(){let{props:e}=this;return JT(yP,Object.assign({},e,{elClasses:["fc-daygrid-event","fc-daygrid-block-event","fc-h-event"],defaultTimeFormat:ZL,defaultDisplayEventEnd:e.defaultDisplayEventEnd,disableResizing:!e.seg.eventRange.def.allDay}))}}class JL extends eO{render(){let{props:e,context:t}=this,{options:n}=t,{seg:r}=e,o=uI(r,n.eventTimeFormat||ZL,t,!0,e.defaultDisplayEventEnd);return JT(vP,Object.assign({},e,{elTag:"a",elClasses:["fc-daygrid-event","fc-daygrid-dot-event"],elAttrs:pI(e.seg,t),defaultGenerator:XL,timeText:o,isResizing:!1,isDateSelecting:!1}))}}function XL(e){return JT(eA,null,JT("div",{className:"fc-daygrid-event-dot",style:{borderColor:e.borderColor||e.backgroundColor}}),e.timeText&&JT("div",{className:"fc-event-time"},e.timeText),JT("div",{className:"fc-event-title"},e.event.title||JT(eA,null," ")))}class eF extends eO{constructor(){super(...arguments),this.compileSegs=sM(tF)}render(){let{props:e}=this,{allSegs:t,invisibleSegs:n}=this.compileSegs(e.singlePlacements);return JT(RP,{elClasses:["fc-daygrid-more-link"],dateProfile:e.dateProfile,todayRange:e.todayRange,allDayDate:e.allDayDate,moreCnt:e.moreCnt,allSegs:t,hiddenSegs:n,alignmentElRef:e.alignmentElRef,alignGridTop:e.alignGridTop,extraDateSpan:e.extraDateSpan,popoverContent:()=>{let n=(e.eventDrag?e.eventDrag.affectedInstances:null)||(e.eventResize?e.eventResize.affectedInstances:null)||{};return JT(eA,null,t.map((t=>{let r=t.eventRange.instance.instanceId;return JT("div",{className:"fc-daygrid-event-harness",key:r,style:{visibility:n[r]?"hidden":""}},KL(t)?JT(JL,Object.assign({seg:t,isDragging:!1,isSelected:r===e.eventSelection,defaultDisplayEventEnd:!1},fI(t,e.todayRange))):JT(QL,Object.assign({seg:t,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:r===e.eventSelection,defaultDisplayEventEnd:!1},fI(t,e.todayRange))))})))}})}}function tF(e){let t=[],n=[];for(let r of e)t.push(r.seg),r.isVisible||n.push(r.seg);return{allSegs:t,invisibleSegs:n}}const nF=wM({week:"narrow"});class rF extends HI{constructor(){super(...arguments),this.rootElRef={current:null},this.state={dayNumberId:wR()},this.handleRootEl=e=>{tO(this.rootElRef,e),tO(this.props.elRef,e)}}render(){let{context:e,props:t,state:n,rootElRef:r}=this,{options:o,dateEnv:a}=e,{date:s,dateProfile:i}=t;const l=t.showDayNumber&&function(e,t,n){const{start:r,end:o}=t,a=$R(o,-1),s=n.getYear(r),i=n.getMonth(r),l=n.getYear(a),c=n.getMonth(a);return!(s===l&&i===c)&&Boolean(e.valueOf()===r.valueOf()||1===n.getDay(e)&&e.valueOf()<o.valueOf())}(s,i.currentRange,a);return JT(kP,{elTag:"td",elRef:this.handleRootEl,elClasses:["fc-daygrid-day",...t.extraClassNames||[]],elAttrs:Object.assign(Object.assign(Object.assign({},t.extraDataAttrs),t.showDayNumber?{"aria-labelledby":n.dayNumberId}:{}),{role:"gridcell"}),defaultGenerator:oF,date:s,dateProfile:i,todayRange:t.todayRange,showDayNumber:t.showDayNumber,isMonthStart:l,extraRenderProps:t.extraRenderProps},((a,i)=>JT("div",{ref:t.innerElRef,className:"fc-daygrid-day-frame fc-scrollgrid-sync-inner",style:{minHeight:t.minHeight}},t.showWeekNumber&&JT(NP,{elTag:"a",elClasses:["fc-daygrid-week-number"],elAttrs:PI(e,s,"week"),date:s,defaultFormat:nF}),!i.isDisabled&&(t.showDayNumber||SP(o)||t.forceDayTop)?JT("div",{className:"fc-daygrid-day-top"},JT(a,{elTag:"a",elClasses:["fc-daygrid-day-number",l&&"fc-daygrid-month-start"],elAttrs:Object.assign(Object.assign({},PI(e,s)),{id:n.dayNumberId})})):t.showDayNumber?JT("div",{className:"fc-daygrid-day-top",style:{visibility:"hidden"}},JT("a",{className:"fc-daygrid-day-number"}," ")):void 0,JT("div",{className:"fc-daygrid-day-events",ref:t.fgContentElRef},t.fgContent,JT("div",{className:"fc-daygrid-day-bottom",style:{marginTop:t.moreMarginTop}},JT(eF,{allDayDate:s,singlePlacements:t.singlePlacements,moreCnt:t.moreCnt,alignmentElRef:r,alignGridTop:!t.showDayNumber,extraDateSpan:t.extraDateSpan,dateProfile:t.dateProfile,eventSelection:t.eventSelection,eventDrag:t.eventDrag,eventResize:t.eventResize,todayRange:t.todayRange}))),JT("div",{className:"fc-daygrid-day-bg"},t.bgContent))))}}function oF(e){return e.dayNumberText||JT(eA,null," ")}function aF(e){return e.eventRange.instance.instanceId+":"+e.firstCol}function sF(e){return aF(e)+":"+e.lastCol}function iF(e,t,n,r){if(e.firstCol===t&&e.lastCol===n-1)return e;let o=e.eventRange,a=o.range,s=hO(a,{start:r[t].date,end:UR(r[n-1].date,1)});return Object.assign(Object.assign({},e),{firstCol:t,lastCol:n-1,eventRange:{def:o.def,ui:Object.assign(Object.assign({},o.ui),{durationEditable:!1}),instance:o.instance,range:s},isStart:e.isStart&&s.start.valueOf()===a.start.valueOf(),isEnd:e.isEnd&&s.end.valueOf()===a.end.valueOf()})}class lF extends BI{constructor(){super(...arguments),this.hiddenConsumes=!1,this.forceHidden={}}addSegs(e){const t=super.addSegs(e),{entriesByLevel:n}=this,r=e=>!this.forceHidden[UI(e)];for(let e=0;e<n.length;e+=1)n[e]=n[e].filter(r);return t}handleInvalidInsertion(e,t,n){const{entriesByLevel:r,forceHidden:o}=this,{touchingEntry:a,touchingLevel:s,touchingLateral:i}=e;if(this.hiddenConsumes&&a){const e=UI(a);if(!o[e])if(this.allowReslicing){const e=Object.assign(Object.assign({},a),{span:$I(a.span,t.span)});o[UI(e)]=!0,r[s][i]=e,n.push(e),this.splitEntry(a,t,n)}else o[e]=!0,n.push(a)}super.handleInvalidInsertion(e,t,n)}}class cF extends HI{constructor(){super(...arguments),this.cellElRefs=new iP,this.frameElRefs=new iP,this.fgElRefs=new iP,this.segHarnessRefs=new iP,this.rootElRef={current:null},this.state={framePositions:null,maxContentHeight:null,segHeights:{}},this.handleResize=e=>{e&&this.updateSizing(!0)}}render(){let{props:e,state:t,context:n}=this,{options:r}=n,o=e.cells.length,a=YL(e.businessHourSegs,o),s=YL(e.bgEventSegs,o),i=YL(this.getHighlightSegs(),o),l=YL(this.getMirrorSegs(),o),{singleColPlacements:c,multiColPlacements:d,moreCnts:u,moreMarginTops:f}=function(e,t,n,r,o,a,s){let i=new lF((t=>{let n=e[t.index].eventRange.instance.instanceId+":"+t.span.start+":"+(t.span.end-1);return o[n]||1}));i.allowReslicing=!0,i.strictOrder=r,!0===t||!0===n?(i.maxCoord=a,i.hiddenConsumes=!0):"number"==typeof t?i.maxStackCnt=t:"number"==typeof n&&(i.maxStackCnt=n,i.hiddenConsumes=!0);let l=[],c=[];for(let t=0;t<e.length;t+=1){let n=e[t],r=sF(n);null!=o[r]?l.push({index:t,span:{start:n.firstCol,end:n.lastCol+1}}):c.push(n)}let d=i.addSegs(l),u=i.toRects(),{singleColPlacements:f,multiColPlacements:h,leftoverMargins:m}=function(e,t,n){let r=function(e,t){let n=[];for(let e=0;e<t;e+=1)n.push([]);for(let t of e)for(let e=t.span.start;e<t.span.end;e+=1)n[e].push(t);return n}(e,n.length),o=[],a=[],s=[];for(let e=0;e<n.length;e+=1){let i=r[e],l=[],c=0,d=0;for(let r of i){let o=t[r.index];l.push({seg:iF(o,e,e+1,n),isVisible:!0,isAbsolute:!1,absoluteTop:r.levelCoord,marginTop:r.levelCoord-c}),c=r.levelCoord+r.thickness}let u=[];c=0,d=0;for(let r of i){let o=t[r.index],a=r.span.end-r.span.start>1,s=r.span.start===e;d+=r.levelCoord-c,c=r.levelCoord+r.thickness,a?(d+=r.thickness,s&&u.push({seg:iF(o,r.span.start,r.span.end,n),isVisible:!0,isAbsolute:!0,absoluteTop:r.levelCoord,marginTop:0})):s&&(u.push({seg:iF(o,r.span.start,r.span.end,n),isVisible:!0,isAbsolute:!1,absoluteTop:r.levelCoord,marginTop:d}),d=0)}o.push(l),a.push(u),s.push(d)}return{singleColPlacements:o,multiColPlacements:a,leftoverMargins:s}}(u,e,s),p=[],g=[];for(let e of c){h[e.firstCol].push({seg:e,isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let t=e.firstCol;t<=e.lastCol;t+=1)f[t].push({seg:iF(e,t,t+1,s),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let e=0;e<s.length;e+=1)p.push(0);for(let t of d){let n=e[t.index],r=t.span;h[r.start].push({seg:iF(n,r.start,r.end,s),isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let e=r.start;e<r.end;e+=1)p[e]+=1,f[e].push({seg:iF(n,e,e+1,s),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let e=0;e<s.length;e+=1)g.push(m[e]);return{singleColPlacements:f,multiColPlacements:h,moreCnts:p,moreMarginTops:g}}(sI(e.fgEventSegs,r.eventOrder),e.dayMaxEvents,e.dayMaxEventRows,r.eventOrderStrict,t.segHeights,t.maxContentHeight,e.cells),h=e.eventDrag&&e.eventDrag.affectedInstances||e.eventResize&&e.eventResize.affectedInstances||{};return JT("tr",{ref:this.rootElRef,role:"row"},e.renderIntro&&e.renderIntro(),e.cells.map(((t,n)=>{let r=this.renderFgSegs(n,e.forPrint?c[n]:d[n],e.todayRange,h),o=this.renderFgSegs(n,function(e,t){if(!e.length)return[];let n=function(e){let t={};for(let n of e)for(let e of n)t[e.seg.eventRange.instance.instanceId]=e.absoluteTop;return t}(t);return e.map((e=>({seg:e,isVisible:!0,isAbsolute:!0,absoluteTop:n[e.eventRange.instance.instanceId],marginTop:0})))}(l[n],d),e.todayRange,{},Boolean(e.eventDrag),Boolean(e.eventResize),!1);return JT(rF,{key:t.key,elRef:this.cellElRefs.createRef(t.key),innerElRef:this.frameElRefs.createRef(t.key),dateProfile:e.dateProfile,date:t.date,showDayNumber:e.showDayNumbers,showWeekNumber:e.showWeekNumbers&&0===n,forceDayTop:e.showWeekNumbers,todayRange:e.todayRange,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,extraRenderProps:t.extraRenderProps,extraDataAttrs:t.extraDataAttrs,extraClassNames:t.extraClassNames,extraDateSpan:t.extraDateSpan,moreCnt:u[n],moreMarginTop:f[n],singlePlacements:c[n],fgContentElRef:this.fgElRefs.createRef(t.key),fgContent:JT(eA,null,JT(eA,null,r),JT(eA,null,o)),bgContent:JT(eA,null,this.renderFillSegs(i[n],"highlight"),this.renderFillSegs(a[n],"non-business"),this.renderFillSegs(s[n],"bg-event")),minHeight:e.cellMinHeight})})))}componentDidMount(){this.updateSizing(!0),this.context.addResizeHandler(this.handleResize)}componentDidUpdate(e,t){let n=this.props;this.updateSizing(!zM(e,n))}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}getHighlightSegs(){let{props:e}=this;return e.eventDrag&&e.eventDrag.segs.length?e.eventDrag.segs:e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:e.dateSelectionSegs}getMirrorSegs(){let{props:e}=this;return e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:[]}renderFgSegs(e,t,n,r,o,a,s){let{context:i}=this,{eventSelection:l}=this.props,{framePositions:c}=this.state,d=1===this.props.cells.length,u=o||a||s,f=[];if(c)for(let e of t){let{seg:t}=e,{instanceId:h}=t.eventRange.instance,m=e.isVisible&&!r[h],p=e.isAbsolute,g="",v="";p&&(i.isRtl?(v=0,g=c.lefts[t.lastCol]-c.lefts[t.firstCol]):(g=0,v=c.rights[t.firstCol]-c.rights[t.lastCol])),f.push(JT("div",{className:"fc-daygrid-event-harness"+(p?" fc-daygrid-event-harness-abs":""),key:aF(t),ref:u?null:this.segHarnessRefs.createRef(sF(t)),style:{visibility:m?"":"hidden",marginTop:p?"":e.marginTop,top:p?e.absoluteTop:"",left:g,right:v}},KL(t)?JT(JL,Object.assign({seg:t,isDragging:o,isSelected:h===l,defaultDisplayEventEnd:d},fI(t,n))):JT(QL,Object.assign({seg:t,isDragging:o,isResizing:a,isDateSelecting:s,isSelected:h===l,defaultDisplayEventEnd:d},fI(t,n)))))}return f}renderFillSegs(e,t){let{isRtl:n}=this.context,{todayRange:r}=this.props,{framePositions:o}=this.state,a=[];if(o)for(let s of e){let e=n?{right:0,left:o.lefts[s.lastCol]-o.lefts[s.firstCol]}:{left:0,right:o.rights[s.firstCol]-o.rights[s.lastCol]};a.push(JT("div",{key:mI(s.eventRange),className:"fc-daygrid-bg-harness",style:e},"bg-event"===t?JT(_P,Object.assign({seg:s},fI(s,r))):EP(t)))}return JT(eA,{},...a)}updateSizing(e){let{props:t,state:n,frameElRefs:r}=this;if(!t.forPrint&&null!==t.clientWidth){if(e){let e=t.cells.map((e=>r.currentMap[e.key]));if(e.length){let t=this.rootElRef.current,r=new FI(t,e,!0,!1);n.framePositions&&n.framePositions.similarTo(r)||this.setState({framePositions:new FI(t,e,!0,!1)})}}const o=this.state.segHeights,a=this.querySegHeights(),s=!0===t.dayMaxEvents||!0===t.dayMaxEventRows;this.safeSetState({segHeights:Object.assign(Object.assign({},o),a),maxContentHeight:s?this.computeMaxContentHeight():null})}}querySegHeights(){let e=this.segHarnessRefs.currentMap,t={};for(let n in e){let r=Math.round(e[n].getBoundingClientRect().height);t[n]=Math.max(t[n]||0,r)}return t}computeMaxContentHeight(){let e=this.props.cells[0].key,t=this.cellElRefs.currentMap[e],n=this.fgElRefs.currentMap[e];return t.getBoundingClientRect().bottom-n.getBoundingClientRect().top}getCellEls(){let e=this.cellElRefs.currentMap;return this.props.cells.map((t=>e[t.key]))}}cF.addStateEquality({segHeights:zM});class dF extends HI{constructor(){super(...arguments),this.splitBusinessHourSegs=sM(GL),this.splitBgEventSegs=sM(GL),this.splitFgEventSegs=sM(GL),this.splitDateSelectionSegs=sM(GL),this.splitEventDrag=sM(qL),this.splitEventResize=sM(qL),this.rowRefs=new iP}render(){let{props:e,context:t}=this,n=e.cells.length,r=this.splitBusinessHourSegs(e.businessHourSegs,n),o=this.splitBgEventSegs(e.bgEventSegs,n),a=this.splitFgEventSegs(e.fgEventSegs,n),s=this.splitDateSelectionSegs(e.dateSelectionSegs,n),i=this.splitEventDrag(e.eventDrag,n),l=this.splitEventResize(e.eventResize,n),c=n>=7&&e.clientWidth?e.clientWidth/t.options.aspectRatio/6:null;return JT(_I,{unit:"day"},((t,d)=>JT(eA,null,e.cells.map(((t,u)=>JT(cF,{ref:this.rowRefs.createRef(u),key:t.length?t[0].date.toISOString():u,showDayNumbers:n>1,showWeekNumbers:e.showWeekNumbers,todayRange:d,dateProfile:e.dateProfile,cells:t,renderIntro:e.renderRowIntro,businessHourSegs:r[u],eventSelection:e.eventSelection,bgEventSegs:o[u].filter(uF),fgEventSegs:a[u],dateSelectionSegs:s[u],eventDrag:i[u],eventResize:l[u],dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,clientWidth:e.clientWidth,clientHeight:e.clientHeight,cellMinHeight:c,forPrint:e.forPrint}))))))}componentDidMount(){this.registerInteractiveComponent()}componentDidUpdate(){this.registerInteractiveComponent()}registerInteractiveComponent(){if(!this.rootEl){const e=this.rowRefs.currentMap[0].getCellEls()[0],t=e?e.closest(".fc-daygrid-body"):null;t&&(this.rootEl=t,this.context.registerInteractiveComponent(this,{el:t,isHitComboAllowed:this.props.isHitComboAllowed}))}}componentWillUnmount(){this.rootEl&&(this.context.unregisterInteractiveComponent(this),this.rootEl=null)}prepareHits(){this.rowPositions=new FI(this.rootEl,this.rowRefs.collect().map((e=>e.getCellEls()[0])),!1,!0),this.colPositions=new FI(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)}queryHit(e,t){let{colPositions:n,rowPositions:r}=this,o=n.leftToIndex(e),a=r.topToIndex(t);if(null!=a&&null!=o){let e=this.props.cells[a][o];return{dateProfile:this.props.dateProfile,dateSpan:Object.assign({range:this.getCellRange(a,o),allDay:!0},e.extraDateSpan),dayEl:this.getCellEl(a,o),rect:{left:n.lefts[o],right:n.rights[o],top:r.tops[a],bottom:r.bottoms[a]},layer:0}}return null}getCellEl(e,t){return this.rowRefs.currentMap[e].getCellEls()[t]}getCellRange(e,t){let n=this.props.cells[e][t].date;return{start:n,end:UR(n,1)}}}function uF(e){return e.eventRange.def.allDay}class fF extends HI{constructor(){super(...arguments),this.elRef={current:null},this.needsScrollReset=!1}render(){let{props:e}=this,{dayMaxEventRows:t,dayMaxEvents:n,expandRows:r}=e,o=!0===n||!0===t;o&&!r&&(o=!1,t=null,n=null);let a=["fc-daygrid-body",o?"fc-daygrid-body-balanced":"fc-daygrid-body-unbalanced",r?"":"fc-daygrid-body-natural"];return JT("div",{ref:this.elRef,className:a.join(" "),style:{width:e.clientWidth,minWidth:e.tableMinWidth}},JT("table",{role:"presentation",className:"fc-scrollgrid-sync-table",style:{width:e.clientWidth,minWidth:e.tableMinWidth,height:r?e.clientHeight:""}},e.colGroupNode,JT("tbody",{role:"presentation"},JT(dF,{dateProfile:e.dateProfile,cells:e.cells,renderRowIntro:e.renderRowIntro,showWeekNumbers:e.showWeekNumbers,clientWidth:e.clientWidth,clientHeight:e.clientHeight,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,dayMaxEvents:n,dayMaxEventRows:t,forPrint:e.forPrint,isHitComboAllowed:e.isHitComboAllowed}))))}componentDidMount(){this.requestScrollReset()}componentDidUpdate(e){e.dateProfile!==this.props.dateProfile?this.requestScrollReset():this.flushScrollReset()}requestScrollReset(){this.needsScrollReset=!0,this.flushScrollReset()}flushScrollReset(){if(this.needsScrollReset&&this.props.clientWidth){const e=function(e,t){let n;var r;return t.currentRangeUnit.match(/year|month/)&&(n=e.querySelector(`[data-date="${r=t.currentDate,r.toISOString().match(/^\d{4}-\d{2}/)[0]}-01"]`)),n||(n=e.querySelector(`[data-date="${oM(t.currentDate)}"]`)),n}(this.elRef.current,this.props.dateProfile);if(e){const t=e.closest(".fc-daygrid-body"),n=t.closest(".fc-scroller"),r=e.getBoundingClientRect().top-t.getBoundingClientRect().top;n.scrollTop=r?r+1:0}this.needsScrollReset=!1}}}class hF extends rP{constructor(){super(...arguments),this.forceDayIfListItem=!0}sliceRange(e,t){return t.sliceRange(e)}}class mF extends HI{constructor(){super(...arguments),this.slicer=new hF,this.tableRef={current:null}}render(){let{props:e,context:t}=this;return JT(fF,Object.assign({ref:this.tableRef},this.slicer.sliceProps(e,e.dateProfile,e.nextDayThreshold,t,e.dayTableModel),{dateProfile:e.dateProfile,cells:e.dayTableModel.cells,colGroupNode:e.colGroupNode,tableMinWidth:e.tableMinWidth,renderRowIntro:e.renderRowIntro,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.showWeekNumbers,expandRows:e.expandRows,headerAlignElRef:e.headerAlignElRef,clientWidth:e.clientWidth,clientHeight:e.clientHeight,forPrint:e.forPrint}))}}function pF(e,t){let n=new tP(e.renderRange,t);return new nP(n,/year|month|week/.test(e.currentRangeUnit))}dR(':root{--fc-daygrid-event-dot-width:8px}.fc-daygrid-day-events:after,.fc-daygrid-day-events:before,.fc-daygrid-day-frame:after,.fc-daygrid-day-frame:before,.fc-daygrid-event-harness:after,.fc-daygrid-event-harness:before{clear:both;content:"";display:table}.fc .fc-daygrid-body{position:relative;z-index:1}.fc .fc-daygrid-day.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-daygrid-day-frame{min-height:100%;position:relative}.fc .fc-daygrid-day-top{display:flex;flex-direction:row-reverse}.fc .fc-day-other .fc-daygrid-day-top{opacity:.3}.fc .fc-daygrid-day-number{padding:4px;position:relative;z-index:4}.fc .fc-daygrid-month-start{font-size:1.1em;font-weight:700}.fc .fc-daygrid-day-events{margin-top:1px}.fc .fc-daygrid-body-balanced .fc-daygrid-day-events{left:0;position:absolute;right:0}.fc .fc-daygrid-body-unbalanced .fc-daygrid-day-events{min-height:2em;position:relative}.fc .fc-daygrid-body-natural .fc-daygrid-day-events{margin-bottom:1em}.fc .fc-daygrid-event-harness{position:relative}.fc .fc-daygrid-event-harness-abs{left:0;position:absolute;right:0;top:0}.fc .fc-daygrid-bg-harness{bottom:0;position:absolute;top:0}.fc .fc-daygrid-day-bg .fc-non-business{z-index:1}.fc .fc-daygrid-day-bg .fc-bg-event{z-index:2}.fc .fc-daygrid-day-bg .fc-highlight{z-index:3}.fc .fc-daygrid-event{margin-top:1px;z-index:6}.fc .fc-daygrid-event.fc-event-mirror{z-index:7}.fc .fc-daygrid-day-bottom{font-size:.85em;margin:0 2px}.fc .fc-daygrid-day-bottom:after,.fc .fc-daygrid-day-bottom:before{clear:both;content:"";display:table}.fc .fc-daygrid-more-link{border-radius:3px;cursor:pointer;line-height:1;margin-top:1px;max-width:100%;overflow:hidden;padding:2px;position:relative;white-space:nowrap;z-index:4}.fc .fc-daygrid-more-link:hover{background-color:rgba(0,0,0,.1)}.fc .fc-daygrid-week-number{background-color:var(--fc-neutral-bg-color);color:var(--fc-neutral-text-color);min-width:1.5em;padding:2px;position:absolute;text-align:center;top:0;z-index:5}.fc .fc-more-popover .fc-popover-body{min-width:220px;padding:10px}.fc-direction-ltr .fc-daygrid-event.fc-event-start,.fc-direction-rtl .fc-daygrid-event.fc-event-end{margin-left:2px}.fc-direction-ltr .fc-daygrid-event.fc-event-end,.fc-direction-rtl .fc-daygrid-event.fc-event-start{margin-right:2px}.fc-direction-ltr .fc-daygrid-more-link{float:left}.fc-direction-ltr .fc-daygrid-week-number{border-radius:0 0 3px 0;left:0}.fc-direction-rtl .fc-daygrid-more-link{float:right}.fc-direction-rtl .fc-daygrid-week-number{border-radius:0 0 0 3px;right:0}.fc-liquid-hack .fc-daygrid-day-frame{position:static}.fc-daygrid-event{border-radius:3px;font-size:var(--fc-small-font-size);position:relative;white-space:nowrap}.fc-daygrid-block-event .fc-event-time{font-weight:700}.fc-daygrid-block-event .fc-event-time,.fc-daygrid-block-event .fc-event-title{padding:1px}.fc-daygrid-dot-event{align-items:center;display:flex;padding:2px 0}.fc-daygrid-dot-event .fc-event-title{flex-grow:1;flex-shrink:1;font-weight:700;min-width:0;overflow:hidden}.fc-daygrid-dot-event.fc-event-mirror,.fc-daygrid-dot-event:hover{background:rgba(0,0,0,.1)}.fc-daygrid-dot-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-daygrid-event-dot{border:calc(var(--fc-daygrid-event-dot-width)/2) solid var(--fc-event-border-color);border-radius:calc(var(--fc-daygrid-event-dot-width)/2);box-sizing:content-box;height:0;margin:0 4px;width:0}.fc-direction-ltr .fc-daygrid-event .fc-event-time{margin-right:3px}.fc-direction-rtl .fc-daygrid-event .fc-event-time{margin-left:3px}');var gF=GP({name:"@fullcalendar/daygrid",initialView:"dayGridMonth",views:{dayGrid:{component:class extends $L{constructor(){super(...arguments),this.buildDayTableModel=sM(pF),this.headerRef={current:null},this.tableRef={current:null}}render(){let{options:e,dateProfileGenerator:t}=this.context,{props:n}=this,r=this.buildDayTableModel(n.dateProfile,t),o=e.dayHeaders&&JT(XI,{ref:this.headerRef,dateProfile:n.dateProfile,dates:r.headerDates,datesRepDistinctDays:1===r.rowCnt}),a=t=>JT(mF,{ref:this.tableRef,dateProfile:n.dateProfile,dayTableModel:r,businessHours:n.businessHours,dateSelection:n.dateSelection,eventStore:n.eventStore,eventUiBases:n.eventUiBases,eventSelection:n.eventSelection,eventDrag:n.eventDrag,eventResize:n.eventResize,nextDayThreshold:e.nextDayThreshold,colGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.weekNumbers,expandRows:!n.isHeightAuto,headerAlignElRef:this.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:n.forPrint});return e.dayMinWidth?this.renderHScrollLayout(o,a,r.colCnt,e.dayMinWidth):this.renderSimpleLayout(o,a)}},dateProfileGeneratorClass:class extends yO{buildRenderRange(e,t,n){let r=super.buildRenderRange(e,t,n),{props:o}=this;return function(e){let t,{dateEnv:n,currentRange:r}=e,{start:o,end:a}=r;if(e.snapToWeek&&(o=n.startOfWeek(o),t=n.startOfWeek(a),t.valueOf()!==a.valueOf()&&(a=WR(t,1))),e.fixedWeekCount){let e=n.startOfWeek(n.startOfMonth(UR(r.end,-1)));a=WR(a,6-Math.ceil(GR(e,a)/7))}return{start:o,end:a}}({currentRange:r,snapToWeek:/^(year|month)$/.test(t),fixedWeekCount:o.fixedWeekCount,dateEnv:o.dateEnv})}}},dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},fixedWeekCount:!0},dayGridYear:{type:"dayGrid",duration:{years:1}}}});class vF extends eO{constructor(){super(...arguments),this.state={textId:wR()}}render(){let{theme:e,dateEnv:t,options:n,viewApi:r}=this.context,{cellId:o,dayDate:a,todayRange:s}=this.props,{textId:i}=this.state,l=RI(a,s),c=n.listDayFormat?t.format(a,n.listDayFormat):"",d=n.listDaySideFormat?t.format(a,n.listDaySideFormat):"",u=Object.assign({date:t.toDate(a),view:r,textId:i,text:c,sideText:d,navLinkAttrs:PI(this.context,a),sideNavLinkAttrs:PI(this.context,a,"day",!1)},l);return JT(iO,{elTag:"tr",elClasses:["fc-list-day",...MI(l,e)],elAttrs:{"data-date":oM(a)},renderProps:u,generatorName:"dayHeaderContent",customGenerator:n.dayHeaderContent,defaultGenerator:yF,classNameGenerator:n.dayHeaderClassNames,didMount:n.dayHeaderDidMount,willUnmount:n.dayHeaderWillUnmount},(t=>JT("th",{scope:"colgroup",colSpan:3,id:o,"aria-labelledby":i},JT(t,{elTag:"div",elClasses:["fc-list-day-cushion",e.getClass("tableCellShaded")]}))))}}function yF(e){return JT(eA,null,e.text&&JT("a",Object.assign({id:e.textId,className:"fc-list-day-text"},e.navLinkAttrs),e.text),e.sideText&&JT("a",Object.assign({"aria-hidden":!0,className:"fc-list-day-side-text"},e.sideNavLinkAttrs),e.sideText))}const bF=wM({hour:"numeric",minute:"2-digit",meridiem:"short"});class xF extends eO{render(){let{props:e,context:t}=this,{options:n}=t,{seg:r,timeHeaderId:o,eventHeaderId:a,dateHeaderId:s}=e,i=n.eventTimeFormat||bF;return JT(vP,Object.assign({},e,{elTag:"tr",elClasses:["fc-list-event",r.eventRange.def.url&&"fc-event-forced-url"],defaultGenerator:()=>function(e,t){let n=pI(e,t);return JT("a",Object.assign({},n),e.eventRange.def.title)}(r,t),seg:r,timeText:"",disableDragging:!0,disableResizing:!0}),((e,n)=>JT(eA,null,function(e,t,n,r,o){let{options:a}=n;if(!1!==a.displayEventTime){let s,i=e.eventRange.def,l=e.eventRange.instance,c=!1;if(i.allDay?c=!0:function(e){let t=gO(e);return GR(t.start,t.end)>1}(e.eventRange.range)?e.isStart?s=uI(e,t,n,null,null,l.range.start,e.end):e.isEnd?s=uI(e,t,n,null,null,e.start,l.range.end):c=!0:s=uI(e,t,n),c){let e={text:n.options.allDayText,view:n.viewApi};return JT(iO,{elTag:"td",elClasses:["fc-list-event-time"],elAttrs:{headers:`${r} ${o}`},renderProps:e,generatorName:"allDayContent",customGenerator:a.allDayContent,defaultGenerator:wF,classNameGenerator:a.allDayClassNames,didMount:a.allDayDidMount,willUnmount:a.allDayWillUnmount})}return JT("td",{className:"fc-list-event-time"},s)}return null}(r,i,t,o,s),JT("td",{"aria-hidden":!0,className:"fc-list-event-graphic"},JT("span",{className:"fc-list-event-dot",style:{borderColor:n.borderColor||n.backgroundColor}})),JT(e,{elTag:"td",elClasses:["fc-list-event-title"],elAttrs:{headers:`${a} ${s}`}}))))}}function wF(e){return e.text}function kF(e){return e.text}function SF(e){let t=qR(e.renderRange.start),n=e.renderRange.end,r=[],o=[];for(;t<n;)r.push(t),o.push({start:t,end:UR(t,1)}),t=UR(t,1);return{dayDates:r,dayRanges:o}}function CF(e){return!1===e?null:wM(e)}dR(':root{--fc-list-event-dot-width:10px;--fc-list-event-hover-bg-color:#f5f5f5}.fc-theme-standard .fc-list{border:1px solid var(--fc-border-color)}.fc .fc-list-empty{align-items:center;background-color:var(--fc-neutral-bg-color);display:flex;height:100%;justify-content:center}.fc .fc-list-empty-cushion{margin:5em 0}.fc .fc-list-table{border-style:hidden;width:100%}.fc .fc-list-table tr>*{border-left:0;border-right:0}.fc .fc-list-sticky .fc-list-day>*{background:var(--fc-page-bg-color);position:sticky;top:0}.fc .fc-list-table thead{left:-10000px;position:absolute}.fc .fc-list-table tbody>tr:first-child th{border-top:0}.fc .fc-list-table th{padding:0}.fc .fc-list-day-cushion,.fc .fc-list-table td{padding:8px 14px}.fc .fc-list-day-cushion:after{clear:both;content:"";display:table}.fc-theme-standard .fc-list-day-cushion{background-color:var(--fc-neutral-bg-color)}.fc-direction-ltr .fc-list-day-text,.fc-direction-rtl .fc-list-day-side-text{float:left}.fc-direction-ltr .fc-list-day-side-text,.fc-direction-rtl .fc-list-day-text{float:right}.fc-direction-ltr .fc-list-table .fc-list-event-graphic{padding-right:0}.fc-direction-rtl .fc-list-table .fc-list-event-graphic{padding-left:0}.fc .fc-list-event.fc-event-forced-url{cursor:pointer}.fc .fc-list-event:hover td{background-color:var(--fc-list-event-hover-bg-color)}.fc .fc-list-event-graphic,.fc .fc-list-event-time{white-space:nowrap;width:1px}.fc .fc-list-event-dot{border:calc(var(--fc-list-event-dot-width)/2) solid var(--fc-event-border-color);border-radius:calc(var(--fc-list-event-dot-width)/2);box-sizing:content-box;display:inline-block;height:0;width:0}.fc .fc-list-event-title a{color:inherit;text-decoration:none}.fc .fc-list-event.fc-event-forced-url:hover a{text-decoration:underline}');var _F=GP({name:"@fullcalendar/list",optionRefiners:{listDayFormat:CF,listDaySideFormat:CF,noEventsClassNames:RM,noEventsContent:RM,noEventsDidMount:RM,noEventsWillUnmount:RM},views:{list:{component:class extends HI{constructor(){super(...arguments),this.computeDateVars=sM(SF),this.eventStoreToSegs=sM(this._eventStoreToSegs),this.state={timeHeaderId:wR(),eventHeaderId:wR(),dateHeaderIdRoot:wR()},this.setRootEl=e=>{e?this.context.registerInteractiveComponent(this,{el:e}):this.context.unregisterInteractiveComponent(this)}}render(){let{props:e,context:t}=this,{dayDates:n,dayRanges:r}=this.computeDateVars(e.dateProfile),o=this.eventStoreToSegs(e.eventStore,e.eventUiBases,r);return JT(cO,{elRef:this.setRootEl,elClasses:["fc-list",t.theme.getClass("table"),!1!==t.options.stickyHeaderDates?"fc-list-sticky":""],viewSpec:t.viewSpec},JT(sP,{liquid:!e.isHeightAuto,overflowX:e.isHeightAuto?"visible":"hidden",overflowY:e.isHeightAuto?"visible":"auto"},o.length>0?this.renderSegList(o,n):this.renderEmptyMessage()))}renderEmptyMessage(){let{options:e,viewApi:t}=this.context,n={text:e.noEventsText,view:t};return JT(iO,{elTag:"div",elClasses:["fc-list-empty"],renderProps:n,generatorName:"noEventsContent",customGenerator:e.noEventsContent,defaultGenerator:kF,classNameGenerator:e.noEventsClassNames,didMount:e.noEventsDidMount,willUnmount:e.noEventsWillUnmount},(e=>JT(e,{elTag:"div",elClasses:["fc-list-empty-cushion"]})))}renderSegList(e,t){let{theme:n,options:r}=this.context,{timeHeaderId:o,eventHeaderId:a,dateHeaderIdRoot:s}=this.state,i=function(e){let t,n,r=[];for(t=0;t<e.length;t+=1)n=e[t],(r[n.dayIndex]||(r[n.dayIndex]=[])).push(n);return r}(e);return JT(_I,{unit:"day"},((e,l)=>{let c=[];for(let n=0;n<i.length;n+=1){let d=i[n];if(d){let i=oM(t[n]),u=s+"-"+i;c.push(JT(vF,{key:i,cellId:u,dayDate:t[n],todayRange:l})),d=sI(d,r.eventOrder);for(let t of d)c.push(JT(xF,Object.assign({key:i+":"+t.eventRange.instance.instanceId,seg:t,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,timeHeaderId:o,eventHeaderId:a,dateHeaderId:u},fI(t,l,e))))}}return JT("table",{className:"fc-list-table "+n.getClass("table")},JT("thead",null,JT("tr",null,JT("th",{scope:"col",id:o},r.timeHint),JT("th",{scope:"col","aria-hidden":!0}),JT("th",{scope:"col",id:a},r.eventHint))),JT("tbody",null,c))}))}_eventStoreToSegs(e,t,n){return this.eventRangesToSegs(tI(e,t,this.props.dateProfile.activeRange,this.context.options.nextDayThreshold).fg,n)}eventRangesToSegs(e,t){let n=[];for(let r of e)n.push(...this.eventRangeToSegs(r,t));return n}eventRangeToSegs(e,t){let n,r,o,{dateEnv:a}=this.context,{nextDayThreshold:s}=this.context.options,i=e.range,l=e.def.allDay,c=[];for(n=0;n<t.length;n+=1)if(r=hO(i,t[n]),r&&(o={component:this,eventRange:e,start:r.start,end:r.end,isStart:e.isStart&&r.start.valueOf()===i.start.valueOf(),isEnd:e.isEnd&&r.end.valueOf()===i.end.valueOf(),dayIndex:n},c.push(o),!o.isEnd&&!l&&n+1<t.length&&i.end<a.add(t[n+1].start,s))){o.end=i.end,o.isEnd=!0;break}return c}},buttonTextKey:"list",listDayFormat:{month:"long",day:"numeric",year:"numeric"}},listDay:{type:"list",duration:{days:1},listDayFormat:{weekday:"long"}},listWeek:{type:"list",duration:{weeks:1},listDayFormat:{weekday:"long"},listDaySideFormat:{month:"long",day:"numeric",year:"numeric"}},listMonth:{type:"list",duration:{month:1},listDaySideFormat:{weekday:"long"}},listYear:{type:"list",duration:{year:1},listDaySideFormat:{weekday:"long"}}}});function jF(e,t,n){return vs.fromObject({year:e[0],month:e[1]+1,day:e[2],hour:e[3],minute:e[4],second:e[5],millisecond:e[6]},{locale:n,zone:t})}function EF(e){let t=e.match(/^(.*?)\{(.*)\}(.*)$/);if(t){let e=EF(t[2]);return{head:t[1],middle:e,tail:t[3],whole:t[1]+e.whole+t[3]}}return{head:null,middle:null,tail:null,whole:e}}function NF(e,t,n,r){if(e.middle){let o=t(e.head),a=NF(e.middle,t,n,r),s=t(e.tail),i=n(e.head),l=NF(e.middle,t,n,r),c=n(e.tail);if(o===i&&s===c)return o+(a===l?a:a+r+l)+s}let o=t(e.whole),a=n(e.whole);return o===a?o:o+r+a}var DF=GP({name:"@fullcalendar/luxon3",cmdFormatter:function(e,t){let n=EF(e);if(t.end){let e=jF(t.start.array,t.timeZone,t.localeCodes[0]),r=jF(t.end.array,t.timeZone,t.localeCodes[0]);return NF(n,e.toFormat.bind(e),r.toFormat.bind(r),t.defaultSeparator)}return jF(t.date.array,t.timeZone,t.localeCodes[0]).toFormat(n.whole)},namedTimeZonedImpl:class extends VI{offsetForArray(e){return jF(e,this.timeZoneName).offset}timestampToArray(e){return[(t=vs.fromMillis(e,{zone:this.timeZoneName})).year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond];var t}}});const TF=parseInt(String(e.version).split(".")[0])<18;class AF extends e.Component{constructor(){super(...arguments),this.elRef=(0,e.createRef)(),this.isUpdating=!1,this.isUnmounting=!1,this.state={customRenderingMap:new Map},this.requestResize=()=>{this.isUnmounting||(this.cancelResize(),this.resizeId=requestAnimationFrame((()=>{this.doResize()})))}}render(){const t=[];for(const n of this.state.customRenderingMap.values())t.push(e.createElement(RF,{key:n.id,customRendering:n}));return e.createElement("div",{ref:this.elRef},t)}componentDidMount(){this.isUnmounting=!1;const e=new zP;let t;this.handleCustomRendering=e.handle.bind(e),this.calendar=new UL(this.elRef.current,Object.assign(Object.assign({},this.props),{handleCustomRendering:this.handleCustomRendering})),this.calendar.render(),this.calendar.on("_beforeprint",(()=>{(0,pe.flushSync)((()=>{}))})),e.subscribe((e=>{const n=Date.now(),r=!t;(TF||r||this.isUpdating||this.isUnmounting||n-t<100?MF:pe.flushSync)((()=>{this.setState({customRenderingMap:e},(()=>{t=n,r?this.doResize():this.requestResize()}))}))}))}componentDidUpdate(){this.isUpdating=!0,this.calendar.resetOptions(Object.assign(Object.assign({},this.props),{handleCustomRendering:this.handleCustomRendering})),this.isUpdating=!1}componentWillUnmount(){this.isUnmounting=!0,this.cancelResize(),this.calendar.destroy()}doResize(){this.calendar.updateSize()}cancelResize(){void 0!==this.resizeId&&(cancelAnimationFrame(this.resizeId),this.resizeId=void 0)}getApi(){return this.calendar}}AF.act=MF;class RF extends e.PureComponent{render(){const{customRendering:e}=this.props,{generatorMeta:t}=e,n="function"==typeof t?t(e.renderProps):t;return(0,pe.createPortal)(n,e.containerEl)}}function MF(e){e()}class OF extends TI{getKeyInfo(){return{allDay:{},timed:{}}}getKeysForDateSpan(e){return e.allDay?["allDay"]:["timed"]}getKeysForEventDef(e){return e.allDay?"background"===(t=e).ui.display||"inverse-background"===t.ui.display?["timed","allDay"]:["allDay"]:["timed"];var t}}const IF=wM({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"});function PF(e){let t=["fc-timegrid-slot","fc-timegrid-slot-label",e.isLabeled?"fc-scrollgrid-shrink":"fc-timegrid-slot-minor"];return JT(QM.Consumer,null,(n=>{if(!e.isLabeled)return JT("td",{className:t.join(" "),"data-time":e.isoTimeStr});let{dateEnv:r,options:o,viewApi:a}=n,s=null==o.slotLabelFormat?IF:Array.isArray(o.slotLabelFormat)?wM(o.slotLabelFormat[0]):wM(o.slotLabelFormat),i={level:0,time:e.time,date:r.toDate(e.date),view:a,text:r.format(e.date,s)};return JT(iO,{elTag:"td",elClasses:t,elAttrs:{"data-time":e.isoTimeStr},renderProps:i,generatorName:"slotLabelContent",customGenerator:o.slotLabelContent,defaultGenerator:LF,classNameGenerator:o.slotLabelClassNames,didMount:o.slotLabelDidMount,willUnmount:o.slotLabelWillUnmount},(e=>JT("div",{className:"fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame"},JT(e,{elTag:"div",elClasses:["fc-timegrid-slot-label-cushion","fc-scrollgrid-shrink-cushion"]}))))}))}function LF(e){return e.text}class FF extends eO{render(){return this.props.slatMetas.map((e=>JT("tr",{key:e.key},JT(PF,Object.assign({},e)))))}}const zF=wM({week:"short"});class HF extends HI{constructor(){super(...arguments),this.allDaySplitter=new OF,this.headerElRef={current:null},this.rootElRef={current:null},this.scrollerElRef={current:null},this.state={slatCoords:null},this.handleScrollTopRequest=e=>{let t=this.scrollerElRef.current;t&&(t.scrollTop=e)},this.renderHeadAxis=(e,t="")=>{let{options:n}=this.context,{dateProfile:r}=this.props,o=r.renderRange,a=1===GR(o.start,o.end)?PI(this.context,o.start,"week"):{};return n.weekNumbers&&"day"===e?JT(NP,{elTag:"th",elClasses:["fc-timegrid-axis","fc-scrollgrid-shrink"],elAttrs:{"aria-hidden":!0},date:o.start,defaultFormat:zF},(e=>JT("div",{className:["fc-timegrid-axis-frame","fc-scrollgrid-shrink-frame","fc-timegrid-axis-frame-liquid"].join(" "),style:{height:t}},JT(e,{elTag:"a",elClasses:["fc-timegrid-axis-cushion","fc-scrollgrid-shrink-cushion","fc-scrollgrid-sync-inner"],elAttrs:a})))):JT("th",{"aria-hidden":!0,className:"fc-timegrid-axis"},JT("div",{className:"fc-timegrid-axis-frame",style:{height:t}}))},this.renderTableRowAxis=e=>{let{options:t,viewApi:n}=this.context,r={text:t.allDayText,view:n};return JT(iO,{elTag:"td",elClasses:["fc-timegrid-axis","fc-scrollgrid-shrink"],elAttrs:{"aria-hidden":!0},renderProps:r,generatorName:"allDayContent",customGenerator:t.allDayContent,defaultGenerator:VF,classNameGenerator:t.allDayClassNames,didMount:t.allDayDidMount,willUnmount:t.allDayWillUnmount},(t=>JT("div",{className:["fc-timegrid-axis-frame","fc-scrollgrid-shrink-frame",null==e?" fc-timegrid-axis-frame-liquid":""].join(" "),style:{height:e}},JT(t,{elTag:"span",elClasses:["fc-timegrid-axis-cushion","fc-scrollgrid-shrink-cushion","fc-scrollgrid-sync-inner"]}))))},this.handleSlatCoords=e=>{this.setState({slatCoords:e})}}renderSimpleLayout(e,t,n){let{context:r,props:o}=this,a=[],s=mP(r.options);return e&&a.push({type:"header",key:"header",isSticky:s,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),t&&(a.push({type:"body",key:"all-day",chunk:{content:t}}),a.push({type:"body",key:"all-day-divider",outerContent:JT("tr",{role:"presentation",className:"fc-scrollgrid-section"},JT("td",{className:"fc-timegrid-divider "+r.theme.getClass("tableCellShaded")}))})),a.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(r.options.expandRows),chunk:{scrollerElRef:this.scrollerElRef,content:n}}),JT(cO,{elRef:this.rootElRef,elClasses:["fc-timegrid"],viewSpec:r.viewSpec},JT(gP,{liquid:!o.isHeightAuto&&!o.forPrint,collapsibleWidth:o.forPrint,cols:[{width:"shrink"}],sections:a}))}renderHScrollLayout(e,t,n,r,o,a,s){let i=this.context.pluginHooks.scrollGridImpl;if(!i)throw new Error("No ScrollGrid implementation");let{context:l,props:c}=this,d=!c.forPrint&&mP(l.options),u=!c.forPrint&&pP(l.options),f=[];e&&f.push({type:"header",key:"header",isSticky:d,syncRowHeights:!0,chunks:[{key:"axis",rowContent:e=>JT("tr",{role:"presentation"},this.renderHeadAxis("day",e.rowSyncHeights[0]))},{key:"cols",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),t&&(f.push({type:"body",key:"all-day",syncRowHeights:!0,chunks:[{key:"axis",rowContent:e=>JT("tr",{role:"presentation"},this.renderTableRowAxis(e.rowSyncHeights[0]))},{key:"cols",content:t}]}),f.push({key:"all-day-divider",type:"body",outerContent:JT("tr",{role:"presentation",className:"fc-scrollgrid-section"},JT("td",{colSpan:2,className:"fc-timegrid-divider "+l.theme.getClass("tableCellShaded")}))}));let h=l.options.nowIndicator;return f.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(l.options.expandRows),chunks:[{key:"axis",content:e=>JT("div",{className:"fc-timegrid-axis-chunk"},JT("table",{"aria-hidden":!0,style:{height:e.expandRows?e.clientHeight:""}},e.tableColGroupNode,JT("tbody",null,JT(FF,{slatMetas:a}))),JT("div",{className:"fc-timegrid-now-indicator-container"},JT(_I,{unit:h?"minute":"day"},(e=>{let t=h&&s&&s.safeComputeTop(e);return"number"==typeof t?JT(xP,{elClasses:["fc-timegrid-now-indicator-arrow"],elStyle:{top:t},isAxis:!0,date:e}):null}))))},{key:"cols",scrollerElRef:this.scrollerElRef,content:n}]}),u&&f.push({key:"footer",type:"footer",isSticky:!0,chunks:[{key:"axis",content:hP},{key:"cols",content:hP}]}),JT(cO,{elRef:this.rootElRef,elClasses:["fc-timegrid"],viewSpec:l.viewSpec},JT(i,{liquid:!c.isHeightAuto&&!c.forPrint,forPrint:c.forPrint,collapsibleWidth:!1,colGroups:[{width:"shrink",cols:[{width:"shrink"}]},{cols:[{span:r,minWidth:o}]}],sections:f}))}getAllDayMaxEventProps(){let{dayMaxEvents:e,dayMaxEventRows:t}=this.context.options;return!0!==e&&!0!==t||(e=void 0,t=5),{dayMaxEvents:e,dayMaxEventRows:t}}}function VF(e){return e.text}class BF{constructor(e,t,n){this.positions=e,this.dateProfile=t,this.slotDuration=n}safeComputeTop(e){let{dateProfile:t}=this;if(mO(t.currentRange,e)){let n=qR(e),r=e.valueOf()-n.valueOf();if(r>=FR(t.slotMinTime)&&r<FR(t.slotMaxTime))return this.computeTimeTop(OR(r))}return null}computeDateTop(e,t){return t||(t=qR(e)),this.computeTimeTop(OR(e.valueOf()-t.valueOf()))}computeTimeTop(e){let t,n,{positions:r,dateProfile:o}=this,a=r.els.length,s=(e.milliseconds-FR(o.slotMinTime))/FR(this.slotDuration);return s=Math.max(0,s),s=Math.min(a,s),t=Math.floor(s),t=Math.min(t,a-1),n=s-t,r.tops[t]+r.getHeight(t)*n}}class WF extends eO{render(){let{props:e,context:t}=this,{options:n}=t,{slatElRefs:r}=e;return JT("tbody",null,e.slatMetas.map(((o,a)=>{let s={time:o.time,date:t.dateEnv.toDate(o.date),view:t.viewApi};return JT("tr",{key:o.key,ref:r.createRef(o.key)},e.axis&&JT(PF,Object.assign({},o)),JT(iO,{elTag:"td",elClasses:["fc-timegrid-slot","fc-timegrid-slot-lane",!o.isLabeled&&"fc-timegrid-slot-minor"],elAttrs:{"data-time":o.isoTimeStr},renderProps:s,generatorName:"slotLaneContent",customGenerator:n.slotLaneContent,classNameGenerator:n.slotLaneClassNames,didMount:n.slotLaneDidMount,willUnmount:n.slotLaneWillUnmount}))})))}}class UF extends eO{constructor(){super(...arguments),this.rootElRef={current:null},this.slatElRefs=new iP}render(){let{props:e,context:t}=this;return JT("div",{ref:this.rootElRef,className:"fc-timegrid-slots"},JT("table",{"aria-hidden":!0,className:t.theme.getClass("table"),style:{minWidth:e.tableMinWidth,width:e.clientWidth,height:e.minHeight}},e.tableColGroupNode,JT(WF,{slatElRefs:this.slatElRefs,axis:e.axis,slatMetas:e.slatMetas})))}componentDidMount(){this.updateSizing()}componentDidUpdate(){this.updateSizing()}componentWillUnmount(){this.props.onCoords&&this.props.onCoords(null)}updateSizing(){let{context:e,props:t}=this;var n;t.onCoords&&null!==t.clientWidth&&this.rootElRef.current.offsetHeight&&t.onCoords(new BF(new FI(this.rootElRef.current,(n=this.slatElRefs.currentMap,t.slatMetas.map((e=>n[e.key]))),!1,!0),this.props.dateProfile,e.options.slotDuration))}}function $F(e,t){let n,r=[];for(n=0;n<t;n+=1)r.push([]);if(e)for(n=0;n<e.length;n+=1)r[e[n].col].push(e[n]);return r}function GF(e,t){let n=[];if(e){for(let r=0;r<t;r+=1)n[r]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(let t of e.segs)n[t.col].segs.push(t)}else for(let e=0;e<t;e+=1)n[e]=null;return n}class YF extends eO{render(){let{props:e}=this;return JT(RP,{elClasses:["fc-timegrid-more-link"],elStyle:{top:e.top,bottom:e.bottom},allDayDate:null,moreCnt:e.hiddenSegs.length,allSegs:e.hiddenSegs,hiddenSegs:e.hiddenSegs,extraDateSpan:e.extraDateSpan,dateProfile:e.dateProfile,todayRange:e.todayRange,popoverContent:()=>rz(e.hiddenSegs,e),defaultGenerator:qF,forceTimed:!0},(e=>JT(e,{elTag:"div",elClasses:["fc-timegrid-more-link-inner","fc-sticky"]})))}}function qF(e){return e.shortText}function ZF(e,t){if(!e)return[[],0];let{level:n,lateralStart:r,lateralEnd:o}=e,a=r,s=[];for(;a<o;)s.push(t(n,a)),a+=1;return s.sort(KF),[s.map(QF),s[0][1]]}function KF(e,t){return t[1]-e[1]}function QF(e){return e[0]}function JF(e,t){const n={};return(...r)=>{let o=e(...r);return o in n?n[o]:n[o]=t(...r)}}function XF(e,t,n=null,r=0){let o=[];if(n)for(let a=0;a<e.length;a+=1){let s=e[a],i=n.computeDateTop(s.start,t),l=Math.max(i+(r||0),n.computeDateTop(s.end,t));o.push({start:Math.round(i),end:Math.round(l)})}return o}const ez=wM({hour:"numeric",minute:"2-digit",meridiem:!1});class tz extends eO{render(){return JT(yP,Object.assign({},this.props,{elClasses:["fc-timegrid-event","fc-v-event",this.props.isShort&&"fc-timegrid-event-short"],defaultTimeFormat:ez}))}}class nz extends eO{constructor(){super(...arguments),this.sortEventSegs=sM(sI)}render(){let{props:e,context:t}=this,{options:n}=t,r=n.selectMirror,o=e.eventDrag&&e.eventDrag.segs||e.eventResize&&e.eventResize.segs||r&&e.dateSelectionSegs||[],a=e.eventDrag&&e.eventDrag.affectedInstances||e.eventResize&&e.eventResize.affectedInstances||{},s=this.sortEventSegs(e.fgEventSegs,n.eventOrder);return JT(kP,{elTag:"td",elRef:e.elRef,elClasses:["fc-timegrid-col",...e.extraClassNames||[]],elAttrs:Object.assign({role:"gridcell"},e.extraDataAttrs),date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,extraRenderProps:e.extraRenderProps},(t=>JT("div",{className:"fc-timegrid-col-frame"},JT("div",{className:"fc-timegrid-col-bg"},this.renderFillSegs(e.businessHourSegs,"non-business"),this.renderFillSegs(e.bgEventSegs,"bg-event"),this.renderFillSegs(e.dateSelectionSegs,"highlight")),JT("div",{className:"fc-timegrid-col-events"},this.renderFgSegs(s,a,!1,!1,!1)),JT("div",{className:"fc-timegrid-col-events"},this.renderFgSegs(o,{},Boolean(e.eventDrag),Boolean(e.eventResize),Boolean(r),"mirror")),JT("div",{className:"fc-timegrid-now-indicator-container"},this.renderNowIndicator(e.nowIndicatorSegs)),SP(n)&&JT(t,{elTag:"div",elClasses:["fc-timegrid-col-misc"]}))))}renderFgSegs(e,t,n,r,o,a){let{props:s}=this;return s.forPrint?rz(e,s):this.renderPositionedFgSegs(e,t,n,r,o,a)}renderPositionedFgSegs(e,t,n,r,o,a){let{eventMaxStack:s,eventShortHeight:i,eventOrderStrict:l,eventMinHeight:c}=this.context.options,{date:d,slatCoords:u,eventSelection:f,todayRange:h,nowDate:m}=this.props,p=n||r||o,g=XF(e,d,u,c),{segPlacements:v,hiddenGroups:y}=function(e,t,n,r){let o=[],a=[];for(let n=0;n<e.length;n+=1){let r=t[n];r?o.push({index:n,thickness:1,span:r}):a.push(e[n])}let{segRects:s,hiddenGroups:i}=function(e,t,n){let r=new BI;null!=t&&(r.strictOrder=t),null!=n&&(r.maxStackCnt=n);let o=function(e){let t=[];for(let o of e){let e=[],a={span:o.span,entries:[o]};for(let o of t)$I(o.span,a.span)?a={entries:o.entries.concat(a.entries),span:(n=o.span,r=a.span,{start:Math.min(n.start,r.start),end:Math.max(n.end,r.end)})}:e.push(o);e.push(a),t=e}var n,r;return t}(r.addSegs(e)),a=function(e){const{entriesByLevel:t}=e,n=JF(((e,t)=>e+":"+t),((r,o)=>{let a=function(e,t,n){let{levelCoords:r,entriesByLevel:o}=e,a=o[t][n],s=r[t]+a.thickness,i=r.length,l=t;for(;l<i&&r[l]<s;l+=1);for(;l<i;l+=1){let e,t=o[l],n=YI(t,a.span.start,WI),r=n[0]+n[1],s=r;for(;(e=t[s])&&e.span.start<a.span.end;)s+=1;if(r<s)return{level:l,lateralStart:r,lateralEnd:s}}return null}(e,r,o),s=ZF(a,n),i=t[r][o];return[Object.assign(Object.assign({},i),{nextLevelNodes:s[0]}),i.thickness+s[1]]}));return ZF(t.length?{level:0,lateralStart:0,lateralEnd:t[0].length}:null,n)[0]}(r);a=function(e){const t=JF(((e,t,n)=>UI(e)),((e,n,r)=>{let o,{nextLevelNodes:a,thickness:s}=e,i=s+r,l=s/i,c=[];if(a.length)for(let e of a)if(void 0===o){let r=t(e,n,i);o=r[0],c.push(r[1])}else{let n=t(e,o,0);c.push(n[1])}else o=1;let d=(o-n)*l;return[o-d,Object.assign(Object.assign({},e),{thickness:d,nextLevelNodes:c})]}));return e.map((e=>t(e,0,0)[1]))}(a);let s=function(e){let t=[];const n=JF(((e,t,n)=>UI(e)),((e,n,o)=>{let a=Object.assign(Object.assign({},e),{levelCoord:n,stackDepth:o,stackForward:0});return t.push(a),a.stackForward=r(e.nextLevelNodes,n+e.thickness,o+1)+1}));function r(e,t,r){let o=0;for(let a of e)o=Math.max(n(a,t,r),o);return o}return r(e,0,0),t}(a);return{segRects:s,hiddenGroups:o}}(o,n,r),l=[];for(let t of s)l.push({seg:e[t.index],rect:t});for(let e of a)l.push({seg:e,rect:null});return{segPlacements:l,hiddenGroups:i}}(e,g,l,s);return JT(eA,null,this.renderHiddenGroups(y,e),v.map((e=>{let{seg:s,rect:l}=e,c=s.eventRange.instance.instanceId,d=p||Boolean(!t[c]&&l),u=oz(l&&l.span),g=!p&&l?this.computeSegHStyle(l):{left:0,right:0},v=Boolean(l)&&l.stackForward>0,y=Boolean(l)&&l.span.end-l.span.start<i;return JT("div",{className:"fc-timegrid-event-harness"+(v?" fc-timegrid-event-harness-inset":""),key:a||c,style:Object.assign(Object.assign({visibility:d?"":"hidden"},u),g)},JT(tz,Object.assign({seg:s,isDragging:n,isResizing:r,isDateSelecting:o,isSelected:c===f,isShort:y},fI(s,h,m))))})))}renderHiddenGroups(e,t){let{extraDateSpan:n,dateProfile:r,todayRange:o,nowDate:a,eventSelection:s,eventDrag:i,eventResize:l}=this.props;return JT(eA,null,e.map((e=>{let c=oz(e.span),d=(u=e.entries,f=t,u.map((e=>f[e.index])));var u,f;return JT(YF,{key:rM(IP(d)),hiddenSegs:d,top:c.top,bottom:c.bottom,extraDateSpan:n,dateProfile:r,todayRange:o,nowDate:a,eventSelection:s,eventDrag:i,eventResize:l})})))}renderFillSegs(e,t){let{props:n,context:r}=this,o=XF(e,n.date,n.slatCoords,r.options.eventMinHeight).map(((r,o)=>{let a=e[o];return JT("div",{key:mI(a.eventRange),className:"fc-timegrid-bg-harness",style:oz(r)},"bg-event"===t?JT(_P,Object.assign({seg:a},fI(a,n.todayRange,n.nowDate))):EP(t))}));return JT(eA,null,o)}renderNowIndicator(e){let{slatCoords:t,date:n}=this.props;return t?e.map(((e,r)=>JT(xP,{key:r,elClasses:["fc-timegrid-now-indicator-line"],elStyle:{top:t.computeDateTop(e.start,n)},isAxis:!1,date:n}))):null}computeSegHStyle(e){let t,n,{isRtl:r,options:o}=this.context,a=o.slotEventOverlap,s=e.levelCoord,i=e.levelCoord+e.thickness;a&&(i=Math.min(1,s+2*(i-s))),r?(t=1-i,n=s):(t=s,n=1-i);let l={zIndex:e.stackDepth+1,left:100*t+"%",right:100*n+"%"};return a&&!e.stackForward&&(l[r?"marginLeft":"marginRight"]=20),l}}function rz(e,{todayRange:t,nowDate:n,eventSelection:r,eventDrag:o,eventResize:a}){let s=(o?o.affectedInstances:null)||(a?a.affectedInstances:null)||{};return JT(eA,null,e.map((e=>{let o=e.eventRange.instance.instanceId;return JT("div",{key:o,style:{visibility:s[o]?"hidden":""}},JT(tz,Object.assign({seg:e,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:o===r,isShort:!1},fI(e,t,n))))})))}function oz(e){return e?{top:e.start,bottom:-e.end}:{top:"",bottom:""}}class az extends eO{constructor(){super(...arguments),this.splitFgEventSegs=sM($F),this.splitBgEventSegs=sM($F),this.splitBusinessHourSegs=sM($F),this.splitNowIndicatorSegs=sM($F),this.splitDateSelectionSegs=sM($F),this.splitEventDrag=sM(GF),this.splitEventResize=sM(GF),this.rootElRef={current:null},this.cellElRefs=new iP}render(){let{props:e,context:t}=this,n=t.options.nowIndicator&&e.slatCoords&&e.slatCoords.safeComputeTop(e.nowDate),r=e.cells.length,o=this.splitFgEventSegs(e.fgEventSegs,r),a=this.splitBgEventSegs(e.bgEventSegs,r),s=this.splitBusinessHourSegs(e.businessHourSegs,r),i=this.splitNowIndicatorSegs(e.nowIndicatorSegs,r),l=this.splitDateSelectionSegs(e.dateSelectionSegs,r),c=this.splitEventDrag(e.eventDrag,r),d=this.splitEventResize(e.eventResize,r);return JT("div",{className:"fc-timegrid-cols",ref:this.rootElRef},JT("table",{role:"presentation",style:{minWidth:e.tableMinWidth,width:e.clientWidth}},e.tableColGroupNode,JT("tbody",{role:"presentation"},JT("tr",{role:"row"},e.axis&&JT("td",{"aria-hidden":!0,className:"fc-timegrid-col fc-timegrid-axis"},JT("div",{className:"fc-timegrid-col-frame"},JT("div",{className:"fc-timegrid-now-indicator-container"},"number"==typeof n&&JT(xP,{elClasses:["fc-timegrid-now-indicator-arrow"],elStyle:{top:n},isAxis:!0,date:e.nowDate})))),e.cells.map(((t,n)=>JT(nz,{key:t.key,elRef:this.cellElRefs.createRef(t.key),dateProfile:e.dateProfile,date:t.date,nowDate:e.nowDate,todayRange:e.todayRange,extraRenderProps:t.extraRenderProps,extraDataAttrs:t.extraDataAttrs,extraClassNames:t.extraClassNames,extraDateSpan:t.extraDateSpan,fgEventSegs:o[n],bgEventSegs:a[n],businessHourSegs:s[n],nowIndicatorSegs:i[n],dateSelectionSegs:l[n],eventDrag:c[n],eventResize:d[n],slatCoords:e.slatCoords,eventSelection:e.eventSelection,forPrint:e.forPrint})))))))}componentDidMount(){this.updateCoords()}componentDidUpdate(){this.updateCoords()}updateCoords(){let{props:e}=this;var t;e.onColCoords&&null!==e.clientWidth&&e.onColCoords(new FI(this.rootElRef.current,(t=this.cellElRefs.currentMap,e.cells.map((e=>t[e.key]))),!0,!1))}}class sz extends HI{constructor(){super(...arguments),this.processSlotOptions=sM(iz),this.state={slatCoords:null},this.handleRootEl=e=>{e?this.context.registerInteractiveComponent(this,{el:e,isHitComboAllowed:this.props.isHitComboAllowed}):this.context.unregisterInteractiveComponent(this)},this.handleScrollRequest=e=>{let{onScrollTopRequest:t}=this.props,{slatCoords:n}=this.state;if(t&&n){if(e.time){let r=n.computeTimeTop(e.time);r=Math.ceil(r),r&&(r+=1),t(r)}return!0}return!1},this.handleColCoords=e=>{this.colCoords=e},this.handleSlatCoords=e=>{this.setState({slatCoords:e}),this.props.onSlatCoords&&this.props.onSlatCoords(e)}}render(){let{props:e,state:t}=this;return JT("div",{className:"fc-timegrid-body",ref:this.handleRootEl,style:{width:e.clientWidth,minWidth:e.tableMinWidth}},JT(UF,{axis:e.axis,dateProfile:e.dateProfile,slatMetas:e.slatMetas,clientWidth:e.clientWidth,minHeight:e.expandRows?e.clientHeight:"",tableMinWidth:e.tableMinWidth,tableColGroupNode:e.axis?e.tableColGroupNode:null,onCoords:this.handleSlatCoords}),JT(az,{cells:e.cells,axis:e.axis,dateProfile:e.dateProfile,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,todayRange:e.todayRange,nowDate:e.nowDate,nowIndicatorSegs:e.nowIndicatorSegs,clientWidth:e.clientWidth,tableMinWidth:e.tableMinWidth,tableColGroupNode:e.tableColGroupNode,slatCoords:t.slatCoords,onColCoords:this.handleColCoords,forPrint:e.forPrint}))}componentDidMount(){this.scrollResponder=this.context.createScrollResponder(this.handleScrollRequest)}componentDidUpdate(e){this.scrollResponder.update(e.dateProfile!==this.props.dateProfile)}componentWillUnmount(){this.scrollResponder.detach()}queryHit(e,t){let{dateEnv:n,options:r}=this.context,{colCoords:o}=this,{dateProfile:a}=this.props,{slatCoords:s}=this.state,{snapDuration:i,snapsPerSlot:l}=this.processSlotOptions(this.props.slotDuration,r.snapDuration),c=o.leftToIndex(e),d=s.positions.topToIndex(t);if(null!=c&&null!=d){let e=this.props.cells[c],r=s.positions.tops[d],u=s.positions.getHeight(d),f=(t-r)/u,h=d*l+Math.floor(f*l),m=this.props.cells[c].date,p=PR(a.slotMinTime,function(e,t){return{years:e.years*t,months:e.months*t,days:e.days*t,milliseconds:e.milliseconds*t}}(i,h)),g=n.add(m,p),v=n.add(g,i);return{dateProfile:a,dateSpan:Object.assign({range:{start:g,end:v},allDay:!1},e.extraDateSpan),dayEl:o.els[c],rect:{left:o.lefts[c],right:o.rights[c],top:r,bottom:r+u},layer:0}}return null}}function iz(e,t){let n=t||e,r=zR(e,n);return null===r&&(n=e,r=1),{snapDuration:n,snapsPerSlot:r}}class lz extends rP{sliceRange(e,t){let n=[];for(let r=0;r<t.length;r+=1){let o=hO(e,t[r]);o&&n.push({start:o.start,end:o.end,isStart:o.start.valueOf()===e.start.valueOf(),isEnd:o.end.valueOf()===e.end.valueOf(),col:r})}return n}}class cz extends HI{constructor(){super(...arguments),this.buildDayRanges=sM(dz),this.slicer=new lz,this.timeColsRef={current:null}}render(){let{props:e,context:t}=this,{dateProfile:n,dayTableModel:r}=e,{nowIndicator:o,nextDayThreshold:a}=t.options,s=this.buildDayRanges(r,n,t.dateEnv);return JT(_I,{unit:o?"minute":"day"},((i,l)=>JT(sz,Object.assign({ref:this.timeColsRef},this.slicer.sliceProps(e,n,null,t,s),{forPrint:e.forPrint,axis:e.axis,dateProfile:n,slatMetas:e.slatMetas,slotDuration:e.slotDuration,cells:r.cells[0],tableColGroupNode:e.tableColGroupNode,tableMinWidth:e.tableMinWidth,clientWidth:e.clientWidth,clientHeight:e.clientHeight,expandRows:e.expandRows,nowDate:i,nowIndicatorSegs:o&&this.slicer.sliceNowDate(i,n,a,t,s),todayRange:l,onScrollTopRequest:e.onScrollTopRequest,onSlatCoords:e.onSlatCoords}))))}}function dz(e,t,n){let r=[];for(let o of e.headerDates)r.push({start:n.add(o,t.slotMinTime),end:n.add(o,t.slotMaxTime)});return r}const uz=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}];function fz(e,t,n,r,o){let a=new Date(0),s=e,i=OR(0),l=n||function(e){let t,n,r;for(t=uz.length-1;t>=0;t-=1)if(n=OR(uz[t]),r=zR(n,e),null!==r&&r>1)return n;return e}(r),c=[];for(;FR(s)<FR(t);){let e=o.add(a,s),t=null!==zR(i,l);c.push({date:e,time:s,key:e.toISOString(),isoTimeStr:(d=e,NR(d.getUTCHours(),2)+":"+NR(d.getUTCMinutes(),2)+":"+NR(d.getUTCSeconds(),2)),isLabeled:t}),s=PR(s,r),i=PR(i,r)}var d;return c}function hz(e,t){let n=new tP(e.renderRange,t);return new nP(n,!1)}dR('.fc-v-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-v-event .fc-event-main{color:var(--fc-event-text-color);height:100%}.fc-v-event .fc-event-main-frame{display:flex;flex-direction:column;height:100%}.fc-v-event .fc-event-time{flex-grow:0;flex-shrink:0;max-height:100%;overflow:hidden}.fc-v-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-height:0}.fc-v-event .fc-event-title{bottom:0;max-height:100%;overflow:hidden;top:0}.fc-v-event:not(.fc-event-start){border-top-left-radius:0;border-top-right-radius:0;border-top-width:0}.fc-v-event:not(.fc-event-end){border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-width:0}.fc-v-event.fc-event-selected:before{left:-10px;right:-10px}.fc-v-event .fc-event-resizer-start{cursor:n-resize}.fc-v-event .fc-event-resizer-end{cursor:s-resize}.fc-v-event:not(.fc-event-selected) .fc-event-resizer{height:var(--fc-event-resizer-thickness);left:0;right:0}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-start{top:calc(var(--fc-event-resizer-thickness)/-2)}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-end{bottom:calc(var(--fc-event-resizer-thickness)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer{left:50%;margin-left:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer-start{top:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer-end{bottom:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc .fc-timegrid .fc-daygrid-body{z-index:2}.fc .fc-timegrid-divider{padding:0 0 2px}.fc .fc-timegrid-body{min-height:100%;position:relative;z-index:1}.fc .fc-timegrid-axis-chunk{position:relative}.fc .fc-timegrid-axis-chunk>table,.fc .fc-timegrid-slots{position:relative;z-index:1}.fc .fc-timegrid-slot{border-bottom:0;height:1.5em}.fc .fc-timegrid-slot:empty:before{content:"\\00a0"}.fc .fc-timegrid-slot-minor{border-top-style:dotted}.fc .fc-timegrid-slot-label-cushion{display:inline-block;white-space:nowrap}.fc .fc-timegrid-slot-label{vertical-align:middle}.fc .fc-timegrid-axis-cushion,.fc .fc-timegrid-slot-label-cushion{padding:0 4px}.fc .fc-timegrid-axis-frame-liquid{height:100%}.fc .fc-timegrid-axis-frame{align-items:center;display:flex;justify-content:flex-end;overflow:hidden}.fc .fc-timegrid-axis-cushion{flex-shrink:0;max-width:60px}.fc-direction-ltr .fc-timegrid-slot-label-frame{text-align:right}.fc-direction-rtl .fc-timegrid-slot-label-frame{text-align:left}.fc-liquid-hack .fc-timegrid-axis-frame-liquid{bottom:0;height:auto;left:0;position:absolute;right:0;top:0}.fc .fc-timegrid-col.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-timegrid-col-frame{min-height:100%;position:relative}.fc-media-screen.fc-liquid-hack .fc-timegrid-col-frame{bottom:0;height:auto;left:0;position:absolute;right:0;top:0}.fc-media-screen .fc-timegrid-cols{bottom:0;left:0;position:absolute;right:0;top:0}.fc-media-screen .fc-timegrid-cols>table{height:100%}.fc-media-screen .fc-timegrid-col-bg,.fc-media-screen .fc-timegrid-col-events,.fc-media-screen .fc-timegrid-now-indicator-container{left:0;position:absolute;right:0;top:0}.fc .fc-timegrid-col-bg{z-index:2}.fc .fc-timegrid-col-bg .fc-non-business{z-index:1}.fc .fc-timegrid-col-bg .fc-bg-event{z-index:2}.fc .fc-timegrid-col-bg .fc-highlight{z-index:3}.fc .fc-timegrid-bg-harness{left:0;position:absolute;right:0}.fc .fc-timegrid-col-events{z-index:3}.fc .fc-timegrid-now-indicator-container{bottom:0;overflow:hidden}.fc-direction-ltr .fc-timegrid-col-events{margin:0 2.5% 0 2px}.fc-direction-rtl .fc-timegrid-col-events{margin:0 2px 0 2.5%}.fc-timegrid-event-harness{position:absolute}.fc-timegrid-event-harness>.fc-timegrid-event{bottom:0;left:0;position:absolute;right:0;top:0}.fc-timegrid-event-harness-inset .fc-timegrid-event,.fc-timegrid-event.fc-event-mirror,.fc-timegrid-more-link{box-shadow:0 0 0 1px var(--fc-page-bg-color)}.fc-timegrid-event,.fc-timegrid-more-link{border-radius:3px;font-size:var(--fc-small-font-size)}.fc-timegrid-event{margin-bottom:1px}.fc-timegrid-event .fc-event-main{padding:1px 1px 0}.fc-timegrid-event .fc-event-time{font-size:var(--fc-small-font-size);margin-bottom:1px;white-space:nowrap}.fc-timegrid-event-short .fc-event-main-frame{flex-direction:row;overflow:hidden}.fc-timegrid-event-short .fc-event-time:after{content:"\\00a0-\\00a0"}.fc-timegrid-event-short .fc-event-title{font-size:var(--fc-small-font-size)}.fc-timegrid-more-link{background:var(--fc-more-link-bg-color);color:var(--fc-more-link-text-color);cursor:pointer;margin-bottom:1px;position:absolute;z-index:9999}.fc-timegrid-more-link-inner{padding:3px 2px;top:0}.fc-direction-ltr .fc-timegrid-more-link{right:0}.fc-direction-rtl .fc-timegrid-more-link{left:0}.fc .fc-timegrid-now-indicator-arrow,.fc .fc-timegrid-now-indicator-line{pointer-events:none}.fc .fc-timegrid-now-indicator-line{border-color:var(--fc-now-indicator-color);border-style:solid;border-width:1px 0 0;left:0;position:absolute;right:0;z-index:4}.fc .fc-timegrid-now-indicator-arrow{border-color:var(--fc-now-indicator-color);border-style:solid;margin-top:-5px;position:absolute;z-index:4}.fc-direction-ltr .fc-timegrid-now-indicator-arrow{border-bottom-color:transparent;border-top-color:transparent;border-width:5px 0 5px 6px;left:0}.fc-direction-rtl .fc-timegrid-now-indicator-arrow{border-bottom-color:transparent;border-top-color:transparent;border-width:5px 6px 5px 0;right:0}');var mz=GP({name:"@fullcalendar/timegrid",initialView:"timeGridWeek",optionRefiners:{allDaySlot:Boolean},views:{timeGrid:{component:class extends HF{constructor(){super(...arguments),this.buildTimeColsModel=sM(hz),this.buildSlatMetas=sM(fz)}render(){let{options:e,dateEnv:t,dateProfileGenerator:n}=this.context,{props:r}=this,{dateProfile:o}=r,a=this.buildTimeColsModel(o,n),s=this.allDaySplitter.splitProps(r),i=this.buildSlatMetas(o.slotMinTime,o.slotMaxTime,e.slotLabelInterval,e.slotDuration,t),{dayMinWidth:l}=e,c=!l,d=l,u=e.dayHeaders&&JT(XI,{dates:a.headerDates,dateProfile:o,datesRepDistinctDays:!0,renderIntro:c?this.renderHeadAxis:null}),f=!1!==e.allDaySlot&&(t=>JT(mF,Object.assign({},s.allDay,{dateProfile:o,dayTableModel:a,nextDayThreshold:e.nextDayThreshold,tableMinWidth:t.tableMinWidth,colGroupNode:t.tableColGroupNode,renderRowIntro:c?this.renderTableRowAxis:null,showWeekNumbers:!1,expandRows:!1,headerAlignElRef:this.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:r.forPrint},this.getAllDayMaxEventProps()))),h=t=>JT(cz,Object.assign({},s.timed,{dayTableModel:a,dateProfile:o,axis:c,slotDuration:e.slotDuration,slatMetas:i,forPrint:r.forPrint,tableColGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,clientWidth:t.clientWidth,clientHeight:t.clientHeight,onSlatCoords:this.handleSlatCoords,expandRows:t.expandRows,onScrollTopRequest:this.handleScrollTopRequest}));return d?this.renderHScrollLayout(u,f,h,a.colCnt,l,i,this.state.slatCoords):this.renderSimpleLayout(u,f,h)}},usesMinMaxTime:!0,allDaySlot:!0,slotDuration:"00:30:00",slotEventOverlap:!0},timeGridDay:{type:"timeGrid",duration:{days:1}},timeGridWeek:{type:"timeGrid",duration:{weeks:1}}}});const pz=e=>{const{colors:t,attributes:n,setAttributes:r}=e;return(0,De.jsx)("div",{className:"color-block-support-panel__inner-wrapper",children:t.map((function(e,t){var o=e.default?e.default:void 0;return e.label?(0,De.jsx)(aD.__experimentalToolsPanelItem,{hasValue:()=>n[e.value]!=o,label:e.label,onDeselect:()=>r({[e.value]:o}),isShownByDefault:!0,className:`block-editor-tools-panel-color-gradient-settings__item ${0==t&&"first"}`,children:(0,De.jsx)(aD.Dropdown,{className:"block-editor-tools-panel-color-gradient-settings__dropdown",contentClassName:"my-popover-content-classname",popoverProps:{placement:"left-start",offset:36},renderToggle:({isOpen:t,onToggle:r})=>(0,De.jsx)(aD.Button,{onClick:r,"aria-expanded":t,className:t?"block-editor-panel-color-gradient-settings__dropdown is-open":"block-editor-panel-color-gradient-settings__dropdown",children:(0,De.jsxs)(aD.__experimentalHStack,{justify:"flex-start",children:[(0,De.jsx)(aD.ColorIndicator,{className:"block-editor-panel-color-gradient-settings__color-indicator",colorValue:n[e.value]}),(0,De.jsx)(aD.FlexItem,{children:e.label})]})}),renderContent:()=>(0,De.jsx)("div",{className:"components-dropdown-content-wrapper",children:(0,De.jsxs)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content",children:[(0,De.jsx)(aD.ColorPicker,{color:n[e.value]?n[e.value]:"",onChange:t=>r({[e.value]:t})}),n[e.value]&&(0,De.jsx)(aD.Button,{variant:"link",className:"ng-clear-color",onClick:()=>{e.required?r({[e.value]:""}):r({[e.value]:void 0})},children:(0,Ms.__)("Clear","newsletter-glue")})]})})})},`panelItem-${t}`):null}))})};var gz=o(106);const vz=t=>{const[n,r]=(0,e.useState)([]),{attributes:o,setAttributes:a,calendar:s,setView:i}=t,l=o?.startday?o.startday:s?.startday,c=o?.timeframe?o.timeframe:s?.timeframe,d=[{value:"color",label:(0,Ms.__)("Accent","eventkoi")}];return(0,e.useEffect)((()=>{(async()=>{await Ne()({path:`${eventkoi_params.api}/calendars`,method:"get"}).then((e=>{if(e){let t=[];e.map(((e,n)=>{t.push({label:e.name,value:e.id})})),r(t)}})).catch((e=>{}))})()}),[]),(0,e.useEffect)((()=>{n.length>0&&(!o.calendars||0===o.calendars.length)&&a({calendars:[Number(eventkoi_params.default_cal)]})}),[n,o.calendars]),(0,De.jsxs)(De.Fragment,{children:[(0,De.jsxs)(aD.PanelBody,{title:(0,Ms.__)("Display options","eventkoi"),initialOpen:!0,children:[n&&n.length>0&&(0,De.jsx)(gz.MultiSelectControl,{label:(0,Ms.__)("Select calendar(s)","eventkoi"),value:o.calendars||[],options:n,onChange:e=>{a({calendars:e})},__nextHasNoMarginBottom:!0}),(0,De.jsxs)(aD.__experimentalToggleGroupControl,{label:(0,Ms.__)("Timeframe defaults to","eventkoi"),value:c,isBlock:!0,onChange:e=>{a({timeframe:e}),i("week"===e?"timeGridWeek":"dayGridMonth")},__nextHasNoMarginBottom:!0,children:[(0,De.jsx)(aD.__experimentalToggleGroupControlOption,{value:"month",label:"Month"}),(0,De.jsx)(aD.__experimentalToggleGroupControlOption,{value:"week",label:"Week"})]}),(0,De.jsx)(aD.SelectControl,{label:(0,Ms.__)("Default month to display","eventkoi"),value:o.default_month||"",options:[{label:(0,Ms.__)("Current month","eventkoi"),value:""},{label:(0,Ms.__)("January","eventkoi"),value:"january"},{label:(0,Ms.__)("February","eventkoi"),value:"february"},{label:(0,Ms.__)("March","eventkoi"),value:"march"},{label:(0,Ms.__)("April","eventkoi"),value:"april"},{label:(0,Ms.__)("May","eventkoi"),value:"may"},{label:(0,Ms.__)("June","eventkoi"),value:"june"},{label:(0,Ms.__)("July","eventkoi"),value:"july"},{label:(0,Ms.__)("August","eventkoi"),value:"august"},{label:(0,Ms.__)("September","eventkoi"),value:"september"},{label:(0,Ms.__)("October","eventkoi"),value:"october"},{label:(0,Ms.__)("November","eventkoi"),value:"november"},{label:(0,Ms.__)("December","eventkoi"),value:"december"}],onChange:e=>a({default_month:e}),__nextHasNoMarginBottom:!0}),(0,De.jsx)(aD.SelectControl,{label:(0,Ms.__)("Default year to display","eventkoi"),value:o.default_year||"",options:[{label:(0,Ms.__)("Current year","eventkoi"),value:""},...Array.from({length:10},((e,t)=>{const n=(new Date).getFullYear()+t+1;return{label:String(n),value:String(n)}}))],onChange:e=>a({default_year:e}),__nextHasNoMarginBottom:!0}),(0,De.jsx)(aD.SelectControl,{label:(0,Ms.__)("Week starts on","eventkoi"),value:l,options:[{label:"Monday",value:"monday"},{label:"Tuesday",value:"tuesday"},{label:"Wednesday",value:"wednesday"},{label:"Thursday",value:"thursday"},{label:"Friday",value:"friday"},{label:"Saturday",value:"saturday"},{label:"Sunday",value:"sunday"}],onChange:e=>a({startday:e}),__nextHasNoMarginBottom:!0})]}),(0,De.jsx)(aD.__experimentalToolsPanel,{label:(0,Ms.__)("Colors"),resetAll:()=>{a({color:void 0})},hasInnerWrapper:!0,className:"color-block-support-panel",children:(0,De.jsx)(pz,{attributes:o,setAttributes:a,colors:d})})]})},yz={sunday:0,monday:1,tuesday:2,wednesday:3,thursday:4,friday:5,saturday:6},bz=(("undefined"!=typeof window&&window.eventkoi_params?window.eventkoi_params.locale:"en")||"").split("_")[0]||"en",xz=GT.some((e=>e.code===bz));let wz=xz?bz:"en";try{new Intl.DateTimeFormat(wz)}catch{wz="en"}(0,MD.registerBlockType)("eventkoi/calendar",{apiVersion:2,title:(0,Ms.__)("EK Events Calendar","eventkoi"),category:"eventkoi-blocks",icon:function({width:e="16.918",height:t="21.89"}){return(0,De.jsx)(Di.SVG,{xmlns:"http://www.w3.org/2000/svg",width:e,height:t,viewBox:"0 0 16.918 21.89",children:(0,De.jsxs)("g",{transform:"translate(0 -13.696)",children:[(0,De.jsx)("g",{transform:"translate(0 13.696)",children:(0,De.jsx)(Di.Path,{d:"M6.19-72.725A3.818,3.818,0,0,0,4.837-75.38a3.359,3.359,0,0,0-2.484-.876A1.885,1.885,0,0,0,.611-74.9a1.612,1.612,0,0,0-.092,1.06,6.23,6.23,0,0,0,.518,1.178,8.55,8.55,0,0,1,.4.832,4.387,4.387,0,0,1,.224.775,7.582,7.582,0,0,0,.984,2.5,4.542,4.542,0,0,0,1.52,1.613,1.022,1.022,0,0,0,1.363-.107q.563-.391.693-2.332A18.33,18.33,0,0,0,6.19-72.725Zm-.09,7.2q-1.034,0-1.242,2.7a18.162,18.162,0,0,0,.413,5.442q.622,2.739,1.677,2.878,2.3.313,2.729-2.422a10.636,10.636,0,0,0-.736-5.668Q7.773-65.521,6.1-65.521Zm2.05-1.52a.88.88,0,0,0,.941.487,2.49,2.49,0,0,0,1.12-.657q.583-.539,1.389-1.4.481-.627.9-1.091a5.462,5.462,0,0,1,.805-.754,4.378,4.378,0,0,0,2.051-2.931,2.483,2.483,0,0,0-.917-2.533,2.674,2.674,0,0,0-2.914-.028A5.715,5.715,0,0,0,9.343-73.55,12.509,12.509,0,0,0,7.9-69.78,3.422,3.422,0,0,0,8.149-67.041Z",transform:"translate(-0.467 76.356)"})}),(0,De.jsx)("g",{transform:"translate(7.301 20.061)",children:(0,De.jsx)(Di.Path,{d:"M34.564-32.511a2.816,2.816,0,0,0-.269,1.24,1.461,1.461,0,0,0,.269.913c.535.852.818,1.139,1.1,1.59a15.006,15.006,0,0,0,3.8,4.125q2.223,1.635,3.58.774a1.555,1.555,0,0,0,.865-1.448,3.235,3.235,0,0,0-.619-1.622A17.131,17.131,0,0,0,41.85-28.67l-.332-.386a20.805,20.805,0,0,0-2.5-2.265,10.6,10.6,0,0,0-2.8-1.656Q34.936-33.447,34.564-32.511Z",transform:"translate(-34.295 33.134)"})})]})})},example:{attributes:{}},description:(0,Ms.__)("Add an EventKoi calendar.","newsletter-glue"),keywords:["eventkoi","events"],attributes:{calendars:{type:"array"},startday:{type:"string"},timeframe:{type:"string"},default_month:{type:"string",default:""},default_year:{type:"string",default:""},color:{type:"string"}},supports:{layout:{type:"constrained",allowJustification:!1,allowWide:!1}},edit:function({attributes:t,setAttributes:n,className:r,isSelected:o,clientId:a}){(0,e.useEffect)((()=>{o?document.body.classList.add("eventkoi-active"):document.body.classList.remove("eventkoi-active")}),[o]);const s="calendar",i=t?.timeframe||"month",[l,c]=(0,e.useState)(null),[d,u]=(0,e.useState)(Rs(t)),[f,h]=(0,e.useState)(""),[m,p]=(0,e.useState)(null),[g,v]=(0,e.useState)(null),[y,b]=(0,e.useState)(!1),[x,w]=(0,e.useState)(Rs(t)),k=(0,e.useRef)(null),S=new URLSearchParams(window.location.search).get("tz"),[C,_]=(0,e.useState)("24"===eventkoi_params?.time_format?"24":"12"),j=S||eventkoi_params?.timezone_override||eventkoi_params?.timezone||"UTC",[E,N]=(0,e.useState)(As(j)),D=(0,e.useRef)(null),T=(0,e.useRef)(!1),A=(0,e.useRef)(null),R=(0,e.useRef)(null),{layout:M}=t,O=(0,RT.useBlockProps)({className:"eventkoi-admin",style:{marginLeft:"auto",marginRight:"auto"}}),[I,P]=(0,e.useState)({}),[L,F]=(0,e.useState)([]),[z,H]=(0,e.useState)([]),[V,B]=(0,e.useState)(),W=t.calendars&&t.calendars.length>0?t.calendars.map(String).join(","):null;let U=t.calendar_id;U||(U=eventkoi_params.default_cal),W&&(U=W);const $=async(e,t,n=U)=>{try{b(!0);const r=new URLSearchParams({id:n,display:s});e&&r.set("start",e.toISOString()),t&&r.set("end",t.toISOString());const o=`${eventkoi_params.api}/calendar_events?${r.toString()}`,a=await Ne()({path:o,method:"get"});F(a.events),P(a.calendar)}catch(e){console.error("Failed to load events",e)}finally{b(!1)}};(0,e.useEffect)((()=>{const e=Rs(t);l?(l.gotoDate(e),u(new Date(e))):w(e)}),[t.default_year,t.default_month]),(0,e.useEffect)((()=>{(async()=>{W&&(U=W);try{const e=await Ne()({path:`${eventkoi_params.api}/calendar_events?id=${U}&display=${s}&initial=true`,method:"get"});P(e.calendar);const t="week"===i||"week"===e.calendar.timeframe?"timeGridWeek":"dayGridMonth";B(t)}catch(e){console.error("Failed to load calendar info",e)}})(),(async()=>{try{const e=new URLSearchParams({id:U,display:s}),t=await Ne()({path:`${eventkoi_params.api}/calendar_events?${e.toString()}`,method:"get"});H(t.events)}catch(e){console.error("Failed to load all events",e)}})()}),[U]),(0,e.useEffect)((()=>{if(!l)return;const{activeStart:e,activeEnd:t}=l.view;k.current=null,$(e,t,U)}),[U,l]),(0,e.useEffect)((()=>{if(D.current&&V){const e=D.current.getApi();e.changeView(V),c(e);const{activeStart:t,activeEnd:n}=e.view,r=`${t.toISOString()}_${n.toISOString()}`;k.current||(k.current=r,$(t,n))}}),[V]),(0,e.useEffect)((()=>{document.body.style.position="relative"}),[]),(0,e.useEffect)((()=>{function e(e){if(T.current)return void(T.current=!1);const t=e.target.closest("[data-event-popover]"),n=e.target.closest("[data-radix-popper-content-wrapper]"),r="true"===document.body.getAttribute("data-calendar-menu-open"),o="true"===document.body.getAttribute("data-share-modal-open");t||n||o||r||(p(null),v(null))}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[]),(0,e.useEffect)((()=>{if(!l||!d)return;const e=setInterval((()=>{const t=document.querySelector(".fc-today-button");if(t&&!document.getElementById("eventkoi-month-portal")){const n=document.createElement("div");n.id="eventkoi-month-portal",n.className="flex m-0",t.parentNode.insertBefore(n,t),R.current=n,A.current=createRoot(n),A.current.render((0,De.jsx)(CalendarHeaderPopover,{calendarApi:l,currentDate:d,setCurrentDate:u})),clearInterval(e)}}),100);return()=>clearInterval(e)}),[l]);const G=t?.startday?t.startday:I?.startday,Y=t?.color?t.color:eventkoi_params.default_color,q={hour:"24"===C?"2-digit":"numeric",minute:"2-digit",hour12:"24"!==C,..."24"!==C&&{omitZeroMinute:!0,meridiem:"short"}};return(0,De.jsxs)("div",{...O,children:[(0,De.jsx)(RT.InspectorControls,{children:(0,De.jsx)(vz,{calendar:I,attributes:t,setAttributes:n,className:r,isSelected:o,clientId:a,setView:B})}),(0,De.jsx)("div",{id:"dayGridMonth"===V?"month":"timeGridWeek"===V?"week":"day",children:(0,De.jsxs)("div",{className:"relative",children:[(0,De.jsx)(gT,{calendarApi:l,currentDate:d,setCurrentDate:u,view:V,setView:B,search:f,setSearch:h,events:z,timezone:E||void 0,timeFormat:C}),(0,De.jsx)("div",{className:"flex justify-start md:justify-end py-4 text-sm text-foreground",children:(0,De.jsx)(AT,{timezone:E,setTimezone:N,timeFormat:C,setTimeFormat:_})}),(0,De.jsx)(AF,{ref:D,locales:GT,locale:wz,plugins:[gF,mz,_F,DF],events:L,initialView:V,initialDate:x,weekends:!0,timeZone:E,firstDay:yz[G],eventColor:Y,headerToolbar:!1,contentHeight:"auto",expandRows:!0,height:"auto",eventTimeFormat:q,dayHeaderContent:e=>{const{date:t,view:n}=e,r=t.toLocaleDateString(wz,{weekday:"short"});if(n.type.startsWith("timeGrid")){const e=t.getDate();return(0,De.jsxs)("div",{className:"flex flex-col items-center leading-tight",children:[(0,De.jsx)("span",{children:r}),(0,De.jsx)("span",{className:"font-semibold text-base",children:e})]})}return(0,De.jsx)("span",{children:r})},datesSet:({start:e,end:t,view:n})=>{const r=`${e.toISOString()}_${t.toISOString()}`;k.current!==r&&(k.current=r,$(e,t,U),u(n.currentStart),A.current&&R.current&&A.current.render((0,De.jsx)(CalendarHeaderPopover,{calendarApi:l,currentDate:n.currentStart,setCurrentDate:u})))},eventClick:e=>{e.jsEvent.preventDefault(),e.jsEvent.stopPropagation();const t={...e.event.extendedProps,title:e.event.title,start:e.event.startStr,end:e.event.endStr,allDay:e.event.allDay,url:e.event.url},n=e.el;n&&(requestAnimationFrame((()=>{setTimeout((()=>{const e=document.querySelector(".fc").getBoundingClientRect(),t=n.getBoundingClientRect(),r=t.bottom-e.top+6;let o;o=t.right-e.left+370>e.width?t.right-e.left-370:t.left-e.left,window.innerWidth<768?v({x:0,y:r}):v({x:Math.max(0,o),y:r})}),0)})),p(t))}}),m&&g&&(0,De.jsx)(TT,{event:m,anchor:g,onClose:()=>{p(null),v(null)},ignoreNextOutsideClick:T,timezone:E||void 0})]})})]})},save:function(){return null}});var kz=function(){return kz=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},kz.apply(this,arguments)};function Sz(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var Cz=o(833),_z=o.n(Cz),jz="-ms-",Ez="-moz-",Nz="-webkit-",Dz="comm",Tz="rule",Az="decl",Rz="@keyframes",Mz=Math.abs,Oz=String.fromCharCode,Iz=Object.assign;function Pz(e){return e.trim()}function Lz(e,t){return(e=t.exec(e))?e[0]:e}function Fz(e,t,n){return e.replace(t,n)}function zz(e,t,n){return e.indexOf(t,n)}function Hz(e,t){return 0|e.charCodeAt(t)}function Vz(e,t,n){return e.slice(t,n)}function Bz(e){return e.length}function Wz(e){return e.length}function Uz(e,t){return t.push(e),e}function $z(e,t){return e.filter((function(e){return!Lz(e,t)}))}var Gz=1,Yz=1,qz=0,Zz=0,Kz=0,Qz="";function Jz(e,t,n,r,o,a,s,i){return{value:e,root:t,parent:n,type:r,props:o,children:a,line:Gz,column:Yz,length:s,return:"",siblings:i}}function Xz(e,t){return Iz(Jz("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function eH(e){for(;e.root;)e=Xz(e.root,{children:[e]});Uz(e,e.siblings)}function tH(){return Kz=Zz>0?Hz(Qz,--Zz):0,Yz--,10===Kz&&(Yz=1,Gz--),Kz}function nH(){return Kz=Zz<qz?Hz(Qz,Zz++):0,Yz++,10===Kz&&(Yz=1,Gz++),Kz}function rH(){return Hz(Qz,Zz)}function oH(){return Zz}function aH(e,t){return Vz(Qz,e,t)}function sH(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function iH(e){return Pz(aH(Zz-1,dH(91===e?e+2:40===e?e+1:e)))}function lH(e){for(;(Kz=rH())&&Kz<33;)nH();return sH(e)>2||sH(Kz)>3?"":" "}function cH(e,t){for(;--t&&nH()&&!(Kz<48||Kz>102||Kz>57&&Kz<65||Kz>70&&Kz<97););return aH(e,oH()+(t<6&&32==rH()&&32==nH()))}function dH(e){for(;nH();)switch(Kz){case e:return Zz;case 34:case 39:34!==e&&39!==e&&dH(Kz);break;case 40:41===e&&dH(e);break;case 92:nH()}return Zz}function uH(e,t){for(;nH()&&e+Kz!==57&&(e+Kz!==84||47!==rH()););return"/*"+aH(t,Zz-1)+"*"+Oz(47===e?e:nH())}function fH(e){for(;!sH(rH());)nH();return aH(e,Zz)}function hH(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function mH(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case Az:return e.return=e.return||e.value;case Dz:return"";case Rz:return e.return=e.value+"{"+hH(e.children,r)+"}";case Tz:if(!Bz(e.value=e.props.join(",")))return""}return Bz(n=hH(e.children,r))?e.return=e.value+"{"+n+"}":""}function pH(e,t,n){switch(function(e,t){return 45^Hz(e,0)?(((t<<2^Hz(e,0))<<2^Hz(e,1))<<2^Hz(e,2))<<2^Hz(e,3):0}(e,t)){case 5103:return Nz+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Nz+e+e;case 4789:return Ez+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Nz+e+Ez+e+jz+e+e;case 5936:switch(Hz(e,t+11)){case 114:return Nz+e+jz+Fz(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Nz+e+jz+Fz(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Nz+e+jz+Fz(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return Nz+e+jz+e+e;case 6165:return Nz+e+jz+"flex-"+e+e;case 5187:return Nz+e+Fz(e,/(\w+).+(:[^]+)/,Nz+"box-$1$2"+jz+"flex-$1$2")+e;case 5443:return Nz+e+jz+"flex-item-"+Fz(e,/flex-|-self/g,"")+(Lz(e,/flex-|baseline/)?"":jz+"grid-row-"+Fz(e,/flex-|-self/g,""))+e;case 4675:return Nz+e+jz+"flex-line-pack"+Fz(e,/align-content|flex-|-self/g,"")+e;case 5548:return Nz+e+jz+Fz(e,"shrink","negative")+e;case 5292:return Nz+e+jz+Fz(e,"basis","preferred-size")+e;case 6060:return Nz+"box-"+Fz(e,"-grow","")+Nz+e+jz+Fz(e,"grow","positive")+e;case 4554:return Nz+Fz(e,/([^-])(transform)/g,"$1"+Nz+"$2")+e;case 6187:return Fz(Fz(Fz(e,/(zoom-|grab)/,Nz+"$1"),/(image-set)/,Nz+"$1"),e,"")+e;case 5495:case 3959:return Fz(e,/(image-set\([^]*)/,Nz+"$1$`$1");case 4968:return Fz(Fz(e,/(.+:)(flex-)?(.*)/,Nz+"box-pack:$3"+jz+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Nz+e+e;case 4200:if(!Lz(e,/flex-|baseline/))return jz+"grid-column-align"+Vz(e,t)+e;break;case 2592:case 3360:return jz+Fz(e,"template-","")+e;case 4384:case 3616:return n&&n.some((function(e,n){return t=n,Lz(e.props,/grid-\w+-end/)}))?~zz(e+(n=n[t].value),"span",0)?e:jz+Fz(e,"-start","")+e+jz+"grid-row-span:"+(~zz(n,"span",0)?Lz(n,/\d+/):+Lz(n,/\d+/)-+Lz(e,/\d+/))+";":jz+Fz(e,"-start","")+e;case 4896:case 4128:return n&&n.some((function(e){return Lz(e.props,/grid-\w+-start/)}))?e:jz+Fz(Fz(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return Fz(e,/(.+)-inline(.+)/,Nz+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Bz(e)-1-t>6)switch(Hz(e,t+1)){case 109:if(45!==Hz(e,t+4))break;case 102:return Fz(e,/(.+:)(.+)-([^]+)/,"$1"+Nz+"$2-$3$1"+Ez+(108==Hz(e,t+3)?"$3":"$2-$3"))+e;case 115:return~zz(e,"stretch",0)?pH(Fz(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return Fz(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,(function(t,n,r,o,a,s,i){return jz+n+":"+r+i+(o?jz+n+"-span:"+(a?s:+s-+r)+i:"")+e}));case 4949:if(121===Hz(e,t+6))return Fz(e,":",":"+Nz)+e;break;case 6444:switch(Hz(e,45===Hz(e,14)?18:11)){case 120:return Fz(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+Nz+(45===Hz(e,14)?"inline-":"")+"box$3$1"+Nz+"$2$3$1"+jz+"$2box$3")+e;case 100:return Fz(e,":",":"+jz)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Fz(e,"scroll-","scroll-snap-")+e}return e}function gH(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Az:return void(e.return=pH(e.value,e.length,n));case Rz:return hH([Xz(e,{value:Fz(e.value,"@","@"+Nz)})],r);case Tz:if(e.length)return function(e,t){return e.map(t).join("")}(n=e.props,(function(t){switch(Lz(t,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":eH(Xz(e,{props:[Fz(t,/:(read-\w+)/,":-moz-$1")]})),eH(Xz(e,{props:[t]})),Iz(e,{props:$z(n,r)});break;case"::placeholder":eH(Xz(e,{props:[Fz(t,/:(plac\w+)/,":"+Nz+"input-$1")]})),eH(Xz(e,{props:[Fz(t,/:(plac\w+)/,":-moz-$1")]})),eH(Xz(e,{props:[Fz(t,/:(plac\w+)/,jz+"input-$1")]})),eH(Xz(e,{props:[t]})),Iz(e,{props:$z(n,r)})}return""}))}}function vH(e){return function(e){return Qz="",e}(yH("",null,null,null,[""],e=function(e){return Gz=Yz=1,qz=Bz(Qz=e),Zz=0,[]}(e),0,[0],e))}function yH(e,t,n,r,o,a,s,i,l){for(var c=0,d=0,u=s,f=0,h=0,m=0,p=1,g=1,v=1,y=0,b="",x=o,w=a,k=r,S=b;g;)switch(m=y,y=nH()){case 40:if(108!=m&&58==Hz(S,u-1)){-1!=zz(S+=Fz(iH(y),"&","&\f"),"&\f",Mz(c?i[c-1]:0))&&(v=-1);break}case 34:case 39:case 91:S+=iH(y);break;case 9:case 10:case 13:case 32:S+=lH(m);break;case 92:S+=cH(oH()-1,7);continue;case 47:switch(rH()){case 42:case 47:Uz(xH(uH(nH(),oH()),t,n,l),l);break;default:S+="/"}break;case 123*p:i[c++]=Bz(S)*v;case 125*p:case 59:case 0:switch(y){case 0:case 125:g=0;case 59+d:-1==v&&(S=Fz(S,/\f/g,"")),h>0&&Bz(S)-u&&Uz(h>32?wH(S+";",r,n,u-1,l):wH(Fz(S," ","")+";",r,n,u-2,l),l);break;case 59:S+=";";default:if(Uz(k=bH(S,t,n,c,d,o,i,b,x=[],w=[],u,a),a),123===y)if(0===d)yH(S,t,k,k,x,a,u,i,w);else switch(99===f&&110===Hz(S,3)?100:f){case 100:case 108:case 109:case 115:yH(e,k,k,r&&Uz(bH(e,k,k,0,0,o,i,b,o,x=[],u,w),w),o,w,u,i,r?x:w);break;default:yH(S,k,k,k,[""],w,0,i,w)}}c=d=h=0,p=v=1,b=S="",u=s;break;case 58:u=1+Bz(S),h=m;default:if(p<1)if(123==y)--p;else if(125==y&&0==p++&&125==tH())continue;switch(S+=Oz(y),y*p){case 38:v=d>0?1:(S+="\f",-1);break;case 44:i[c++]=(Bz(S)-1)*v,v=1;break;case 64:45===rH()&&(S+=iH(nH())),f=rH(),d=u=Bz(b=S+=fH(oH())),y++;break;case 45:45===m&&2==Bz(S)&&(p=0)}}return a}function bH(e,t,n,r,o,a,s,i,l,c,d,u){for(var f=o-1,h=0===o?a:[""],m=Wz(h),p=0,g=0,v=0;p<r;++p)for(var y=0,b=Vz(e,f+1,f=Mz(g=s[p])),x=e;y<m;++y)(x=Pz(g>0?h[y]+" "+b:Fz(b,/&\f/g,h[y])))&&(l[v++]=x);return Jz(e,t,n,0===o?Tz:i,l,c,d,u)}function xH(e,t,n,r){return Jz(e,t,n,Dz,Oz(Kz),Vz(e,2,-2),0,r)}function wH(e,t,n,r,o){return Jz(e,t,n,Az,Vz(e,0,r),Vz(e,r+1,-1),r,o)}var kH={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},SH="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",CH="active",_H="data-styled-version",jH="6.1.18",EH="/*!sc*/\n",NH="undefined"!=typeof window&&"undefined"!=typeof document,DH=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY&&"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY),TH=(new Set,Object.freeze([])),AH=Object.freeze({});var RH=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),MH=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,OH=/(^-|-$)/g;function IH(e){return e.replace(MH,"-").replace(OH,"")}var PH=/(a)(d)/gi,LH=function(e){return String.fromCharCode(e+(e>25?39:97))};function FH(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=LH(t%52)+n;return(LH(t%52)+n).replace(PH,"$1-$2")}var zH,HH=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},VH=function(e){return HH(5381,e)};function BH(e){return"string"==typeof e&&!0}var WH="function"==typeof Symbol&&Symbol.for,UH=WH?Symbol.for("react.memo"):60115,$H=WH?Symbol.for("react.forward_ref"):60112,GH={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},YH={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},qH={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},ZH=((zH={})[$H]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},zH[UH]=qH,zH);function KH(e){return("type"in(t=e)&&t.type.$$typeof)===UH?qH:"$$typeof"in e?ZH[e.$$typeof]:GH;var t}var QH=Object.defineProperty,JH=Object.getOwnPropertyNames,XH=Object.getOwnPropertySymbols,eV=Object.getOwnPropertyDescriptor,tV=Object.getPrototypeOf,nV=Object.prototype;function rV(e,t,n){if("string"!=typeof t){if(nV){var r=tV(t);r&&r!==nV&&rV(e,r,n)}var o=JH(t);XH&&(o=o.concat(XH(t)));for(var a=KH(e),s=KH(t),i=0;i<o.length;++i){var l=o[i];if(!(l in YH||n&&n[l]||s&&l in s||a&&l in a)){var c=eV(t,l);try{QH(e,l,c)}catch(e){}}}}return e}function oV(e){return"function"==typeof e}function aV(e){return"object"==typeof e&&"styledComponentId"in e}function sV(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function iV(e,t){if(0===e.length)return"";for(var n=e[0],r=1;r<e.length;r++)n+=t?t+e[r]:e[r];return n}function lV(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function cV(e,t,n){if(void 0===n&&(n=!1),!n&&!lV(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=cV(e[r],t[r]);else if(lV(t))for(var r in t)e[r]=cV(e[r],t[r]);return e}function dV(e,t){Object.defineProperty(e,"toString",{value:t})}function uV(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):""))}var fV=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)if((o<<=1)<0)throw uV(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var a=r;a<o;a++)this.groupSizes[a]=0}for(var s=this.indexOfGroup(e+1),i=(a=0,t.length);a<i;a++)this.tag.insertRule(s,t[a])&&(this.groupSizes[e]++,s++)},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,a=r;a<o;a++)t+="".concat(this.tag.getRule(a)).concat(EH);return t},e}(),hV=new Map,mV=new Map,pV=1,gV=function(e){if(hV.has(e))return hV.get(e);for(;mV.has(pV);)pV++;var t=pV++;return hV.set(e,t),mV.set(t,e),t},vV=function(e,t){pV=t+1,hV.set(e,t),mV.set(t,e)},yV="style[".concat(SH,"][").concat(_H,'="').concat(jH,'"]'),bV=new RegExp("^".concat(SH,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),xV=function(e,t,n){for(var r,o=n.split(","),a=0,s=o.length;a<s;a++)(r=o[a])&&e.registerName(t,r)},wV=function(e,t){for(var n,r=(null!==(n=t.textContent)&&void 0!==n?n:"").split(EH),o=[],a=0,s=r.length;a<s;a++){var i=r[a].trim();if(i){var l=i.match(bV);if(l){var c=0|parseInt(l[1],10),d=l[2];0!==c&&(vV(d,c),xV(e,d,l[3]),e.getTag().insertRules(c,o)),o.length=0}else o.push(i)}}},kV=function(e){for(var t=document.querySelectorAll(yV),n=0,r=t.length;n<r;n++){var o=t[n];o&&o.getAttribute(SH)!==CH&&(wV(e,o),o.parentNode&&o.parentNode.removeChild(o))}};function SV(){return o.nc}var CV=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){var t=Array.from(e.querySelectorAll("style[".concat(SH,"]")));return t[t.length-1]}(n),a=void 0!==o?o.nextSibling:null;r.setAttribute(SH,CH),r.setAttribute(_H,jH);var s=SV();return s&&r.setAttribute("nonce",s),n.insertBefore(r,a),r},_V=function(){function e(e){this.element=CV(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}throw uV(17)}(this.element),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""},e}(),jV=function(){function e(e){this.element=CV(e),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),EV=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),NV=NH,DV={isServer:!NH,useCSSOMInjection:!DH},TV=function(){function e(e,t,n){void 0===e&&(e=AH),void 0===t&&(t={});var r=this;this.options=kz(kz({},DV),e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&NH&&NV&&(NV=!1,kV(this)),dV(this,(function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=function(n){var o=function(e){return mV.get(e)}(n);if(void 0===o)return"continue";var a=e.names.get(o),s=t.getGroup(n);if(void 0===a||!a.size||0===s.length)return"continue";var i="".concat(SH,".g").concat(n,'[id="').concat(o,'"]'),l="";void 0!==a&&a.forEach((function(e){e.length>0&&(l+="".concat(e,","))})),r+="".concat(s).concat(i,'{content:"').concat(l,'"}').concat(EH)},a=0;a<n;a++)o(a);return r}(r)}))}return e.registerId=function(e){return gV(e)},e.prototype.rehydrate=function(){!this.server&&NH&&kV(this)},e.prototype.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(kz(kz({},this.options),t),this.gs,n&&this.names||void 0)},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.useCSSOMInjection,n=e.target;return e.isServer?new EV(n):t?new _V(n):new jV(n)}(this.options),new fV(e)));var e},e.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},e.prototype.registerName=function(e,t){if(gV(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},e.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(gV(e),n)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(gV(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e}(),AV=/&/g,RV=/^\s*\/\/.*$/gm;function MV(e,t){return e.map((function(e){return"rule"===e.type&&(e.value="".concat(t," ").concat(e.value),e.value=e.value.replaceAll(",",",".concat(t," ")),e.props=e.props.map((function(e){return"".concat(t," ").concat(e)}))),Array.isArray(e.children)&&"@keyframes"!==e.type&&(e.children=MV(e.children,t)),e}))}function OV(e){var t,n,r,o=void 0===e?AH:e,a=o.options,s=void 0===a?AH:a,i=o.plugins,l=void 0===i?TH:i,c=function(e,r,o){return o.startsWith(n)&&o.endsWith(n)&&o.replaceAll(n,"").length>0?".".concat(t):e},d=l.slice();d.push((function(e){e.type===Tz&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(AV,n).replace(r,c))})),s.prefix&&d.push(gH),d.push(mH);var u=function(e,o,a,i){void 0===o&&(o=""),void 0===a&&(a=""),void 0===i&&(i="&"),t=i,n=o,r=new RegExp("\\".concat(n,"\\b"),"g");var l=e.replace(RV,""),c=vH(a||o?"".concat(a," ").concat(o," { ").concat(l," }"):l);s.namespace&&(c=MV(c,s.namespace));var u,f,h,m=[];return hH(c,(u=d.concat((h=function(e){return m.push(e)},function(e){e.root||(e=e.return)&&h(e)})),f=Wz(u),function(e,t,n,r){for(var o="",a=0;a<f;a++)o+=u[a](e,t,n,r)||"";return o})),m};return u.hash=l.length?l.reduce((function(e,t){return t.name||uV(15),HH(e,t.name)}),5381).toString():"",u}var IV=new TV,PV=OV(),LV=r().createContext({shouldForwardProp:void 0,styleSheet:IV,stylis:PV}),FV=(LV.Consumer,r().createContext(void 0));function zV(){return(0,e.useContext)(LV)}function HV(t){var n=(0,e.useState)(t.stylisPlugins),o=n[0],a=n[1],s=zV().styleSheet,i=(0,e.useMemo)((function(){var e=s;return t.sheet?e=t.sheet:t.target&&(e=e.reconstructWithOptions({target:t.target},!1)),t.disableCSSOMInjection&&(e=e.reconstructWithOptions({useCSSOMInjection:!1})),e}),[t.disableCSSOMInjection,t.sheet,t.target,s]),l=(0,e.useMemo)((function(){return OV({options:{namespace:t.namespace,prefix:t.enableVendorPrefixes},plugins:o})}),[t.enableVendorPrefixes,t.namespace,o]);(0,e.useEffect)((function(){_z()(o,t.stylisPlugins)||a(t.stylisPlugins)}),[t.stylisPlugins]);var c=(0,e.useMemo)((function(){return{shouldForwardProp:t.shouldForwardProp,styleSheet:i,stylis:l}}),[t.shouldForwardProp,i,l]);return r().createElement(LV.Provider,{value:c},r().createElement(FV.Provider,{value:l},t.children))}var VV=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=PV);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t,dV(this,(function(){throw uV(12,String(n.name))}))}return e.prototype.getName=function(e){return void 0===e&&(e=PV),this.name+e.hash},e}(),BV=function(e){return e>="A"&&e<="Z"};function WV(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(1===n&&"-"===r&&"-"===e[0])return e;BV(r)?t+="-"+r.toLowerCase():t+=r}return t.startsWith("ms-")?"-"+t:t}var UV=function(e){return null==e||!1===e||""===e},$V=function(e){var t,n,r=[];for(var o in e){var a=e[o];e.hasOwnProperty(o)&&!UV(a)&&(Array.isArray(a)&&a.isCss||oV(a)?r.push("".concat(WV(o),":"),a,";"):lV(a)?r.push.apply(r,Sz(Sz(["".concat(o," {")],$V(a),!1),["}"],!1)):r.push("".concat(WV(o),": ").concat((t=o,null==(n=a)||"boolean"==typeof n||""===n?"":"number"!=typeof n||0===n||t in kH||t.startsWith("--")?String(n).trim():"".concat(n,"px")),";")))}return r};function GV(e,t,n,r){return UV(e)?[]:aV(e)?[".".concat(e.styledComponentId)]:oV(e)?!oV(o=e)||o.prototype&&o.prototype.isReactComponent||!t?[e]:GV(e(t),t,n,r):e instanceof VV?n?(e.inject(n,r),[e.getName(r)]):[e]:lV(e)?$V(e):Array.isArray(e)?Array.prototype.concat.apply(TH,e.map((function(e){return GV(e,t,n,r)}))):[e.toString()];var o}function YV(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(oV(n)&&!aV(n))return!1}return!0}var qV=VH(jH),ZV=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===n||n.isStatic)&&YV(e),this.componentId=t,this.baseHash=HH(qV,t),this.baseStyle=n,TV.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n):"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))r=sV(r,this.staticRulesId);else{var o=iV(GV(this.rules,e,t,n)),a=FH(HH(this.baseHash,o)>>>0);if(!t.hasNameForId(this.componentId,a)){var s=n(o,".".concat(a),void 0,this.componentId);t.insertRules(this.componentId,a,s)}r=sV(r,a),this.staticRulesId=a}else{for(var i=HH(this.baseHash,n.hash),l="",c=0;c<this.rules.length;c++){var d=this.rules[c];if("string"==typeof d)l+=d;else if(d){var u=iV(GV(d,e,t,n));i=HH(i,u+c),l+=u}}if(l){var f=FH(i>>>0);t.hasNameForId(this.componentId,f)||t.insertRules(this.componentId,f,n(l,".".concat(f),void 0,this.componentId)),r=sV(r,f)}}return r},e}(),KV=r().createContext(void 0);KV.Consumer;var QV={};function JV(t,n,o){var a=aV(t),s=t,i=!BH(t),l=n.attrs,c=void 0===l?TH:l,d=n.componentId,u=void 0===d?function(e,t){var n="string"!=typeof e?"sc":IH(e);QV[n]=(QV[n]||0)+1;var r="".concat(n,"-").concat(function(e){return FH(VH(e)>>>0)}(jH+n+QV[n]));return t?"".concat(t,"-").concat(r):r}(n.displayName,n.parentComponentId):d,f=n.displayName,h=void 0===f?function(e){return BH(e)?"styled.".concat(e):"Styled(".concat(function(e){return e.displayName||e.name||"Component"}(e),")")}(t):f,m=n.displayName&&n.componentId?"".concat(IH(n.displayName),"-").concat(n.componentId):n.componentId||u,p=a&&s.attrs?s.attrs.concat(c).filter(Boolean):c,g=n.shouldForwardProp;if(a&&s.shouldForwardProp){var v=s.shouldForwardProp;if(n.shouldForwardProp){var y=n.shouldForwardProp;g=function(e,t){return v(e,t)&&y(e,t)}}else g=v}var b=new ZV(o,m,a?s.componentStyle:void 0);function x(t,n){return function(t,n,o){var a=t.attrs,s=t.componentStyle,i=t.defaultProps,l=t.foldedComponentIds,c=t.styledComponentId,d=t.target,u=r().useContext(KV),f=zV(),h=t.shouldForwardProp||f.shouldForwardProp,m=function(e,t,n){return void 0===n&&(n=AH),e.theme!==n.theme&&e.theme||t||n.theme}(n,u,i)||AH,p=function(e,t,n){for(var r,o=kz(kz({},t),{className:void 0,theme:n}),a=0;a<e.length;a+=1){var s=oV(r=e[a])?r(o):r;for(var i in s)o[i]="className"===i?sV(o[i],s[i]):"style"===i?kz(kz({},o[i]),s[i]):s[i]}return t.className&&(o.className=sV(o.className,t.className)),o}(a,n,m),g=p.as||d,v={};for(var y in p)void 0===p[y]||"$"===y[0]||"as"===y||"theme"===y&&p.theme===m||("forwardedAs"===y?v.as=p.forwardedAs:h&&!h(y,g)||(v[y]=p[y]));var b=function(e,t){var n=zV();return e.generateAndInjectStyles(t,n.styleSheet,n.stylis)}(s,p),x=sV(l,c);return b&&(x+=" "+b),p.className&&(x+=" "+p.className),v[BH(g)&&!RH.has(g)?"class":"className"]=x,o&&(v.ref=o),(0,e.createElement)(g,v)}(w,t,n)}x.displayName=h;var w=r().forwardRef(x);return w.attrs=p,w.componentStyle=b,w.displayName=h,w.shouldForwardProp=g,w.foldedComponentIds=a?sV(s.foldedComponentIds,s.styledComponentId):"",w.styledComponentId=m,w.target=a?s.target:t,Object.defineProperty(w,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=a?function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0,o=t;r<o.length;r++)cV(e,o[r],!0);return e}({},s.defaultProps,e):e}}),dV(w,(function(){return".".concat(w.styledComponentId)})),i&&rV(w,t,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),w}function XV(e,t){for(var n=[e[0]],r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n}new Set;var eB=function(e){return Object.assign(e,{isCss:!0})};function tB(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(oV(e)||lV(e))return eB(GV(XV(TH,Sz([e],t,!0))));var r=e;return 0===t.length&&1===r.length&&"string"==typeof r[0]?GV(r):eB(GV(XV(r,t)))}function nB(e,t,n){if(void 0===n&&(n=AH),!t)throw uV(1,t);var r=function(r){for(var o=[],a=1;a<arguments.length;a++)o[a-1]=arguments[a];return e(t,n,tB.apply(void 0,Sz([r],o,!1)))};return r.attrs=function(r){return nB(e,t,kz(kz({},n),{attrs:Array.prototype.concat(n.attrs,r).filter(Boolean)}))},r.withConfig=function(r){return nB(e,t,kz(kz({},n),r))},r}var rB=function(e){return nB(JV,e)},oB=rB;function aB({children:e}){const t=oB.div`
     1(()=>{var e,t,n={17:e=>{"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,o,a;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(o=r;0!==o--;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(a=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(o=r;0!==o--;)if(!Object.prototype.hasOwnProperty.call(n,a[o]))return!1;for(o=r;0!==o--;){var s=a[o];if(!e(t[s],n[s]))return!1}return!0}return t!=t&&n!=n}},106:(e,t)=>{!function(){var e={814:function(e,t,n){var r;function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}!function(){"use strict";var a={}.hasOwnProperty;function s(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var r=o(n);if("string"===r||"number"===r)e.push(n);else if(Array.isArray(n)){if(n.length){var i=s.apply(null,n);i&&e.push(i)}}else if("object"===r){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var l in n)a.call(n,l)&&n[l]&&e.push(l)}}}return e.join(" ")}e.exports?(s.default=s,e.exports=s):"object"===o(n.amdO)&&n.amdO?void 0===(r=function(){return s}.apply(t,[]))||(e.exports=r):window.classNames=s}()},922:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,a){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(r)for(var i=0;i<this.length;i++){var l=this[i][0];null!=l&&(s[l]=!0)}for(var c=0;c<e.length;c++){var d=[].concat(e[c]);r&&s[d[0]]||(void 0!==a&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=a),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),o&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=o):d[4]="".concat(o)),t.push(d))}},t}},499:function(e){"use strict";e.exports=function(e){return e[1]}},245:function(e,t,n){"use strict";var r=n(499),o=n.n(r),a=n(922),s=n.n(a)()(o());s.push([e.id,':root{--wp-admin-theme-color: #007cba;--wp-admin-theme-color--rgb: 0,124,186;--wp-admin-theme-color-darker-10: #006ba1;--wp-admin-theme-color-darker-10--rgb: 0,107,160.5;--wp-admin-theme-color-darker-20: #005a87;--wp-admin-theme-color-darker-20--rgb: 0,90,135;--wp-admin-border-width-focus: 2px}@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi){:root{--wp-admin-border-width-focus: 1.5px}}.codeamp-components-multi-select-control__input-container{font-size:13px;line-height:normal}.codeamp-components-multi-select-control__input-container{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;padding:6px 8px;box-shadow:0 0 0 transparent;transition:box-shadow 0.1s linear;border-radius:2px;border:1px solid #757575;font-size:16px;line-height:normal;width:100%;margin:0 0 8px 0;padding:0;cursor:text}@media (prefers-reduced-motion: reduce){.codeamp-components-multi-select-control__input-container{transition-duration:0s;transition-delay:0s}}@media (min-width: 600px){.codeamp-components-multi-select-control__input-container{font-size:13px;line-height:normal}}.codeamp-components-multi-select-control__input-container:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid transparent}.codeamp-components-multi-select-control__input-container::-webkit-input-placeholder{color:rgba(30,30,30,0.62)}.codeamp-components-multi-select-control__input-container::-moz-placeholder{opacity:1;color:rgba(30,30,30,0.62)}.codeamp-components-multi-select-control__input-container:-ms-input-placeholder{color:rgba(30,30,30,0.62)}.codeamp-components-multi-select-control__input-container.is-disabled{background:#ddd;border-color:#ddd}.codeamp-components-multi-select-control__input-container.is-active{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid transparent}.codeamp-components-multi-select-control__input-container input[type="text"].codeamp-components-multi-select-control__input{display:inline-block;flex:1;font-family:inherit;font-size:16px;width:100%;max-width:100%;margin-left:4px;padding:0;min-height:24px;min-width:50px;background:inherit;border:0;color:#1e1e1e;box-shadow:none}@media (min-width: 600px){.codeamp-components-multi-select-control__input-container input[type="text"].codeamp-components-multi-select-control__input{font-size:13px}}.codeamp-components-multi-select-control__input-container input[type="text"].codeamp-components-multi-select-control__input:focus,.codeamp-components-multi-select-control.is-active .codeamp-components-multi-select-control__input-container input[type="text"].codeamp-components-multi-select-control__input{outline:none;box-shadow:none}.codeamp-components-multi-select-control__input-container .codeamp-components-multi-select-control__token+input[type="text"].codeamp-components-multi-select-control__input{width:auto}.codeamp-components-multi-select-control__help{font-size:12px;font-style:normal;color:#757575}.codeamp-components-multi-select-control__tokens-container{padding:4px}.codeamp-components-multi-select-control__token{font-size:13px;display:flex;color:#1e1e1e;max-width:100%}.codeamp-components-multi-select-control__token.is-borderless{position:relative;padding:0 24px 0 0}.codeamp-components-multi-select-control__token.is-borderless .codeamp-components-multi-select-control__token-text{background:transparent;color:var(--wp-admin-theme-color)}.codeamp-components-multi-select-control__token.is-borderless .codeamp-components-multi-select-control__remove-token{background:transparent;color:#757575;position:absolute;top:1px;right:0;padding:0}.codeamp-components-multi-select-control__token.is-borderless.is-success .codeamp-components-multi-select-control__token-text{color:#4ab866}.codeamp-components-multi-select-control__token.is-borderless.is-error .codeamp-components-multi-select-control__token-text{color:#cc1818;border-radius:4px 0 0 4px;padding:0 4px 0 6px}.codeamp-components-multi-select-control__token.is-borderless.is-validating .codeamp-components-multi-select-control__token-text{color:#1e1e1e}.codeamp-components-multi-select-control__token.is-disabled .codeamp-components-multi-select-control__remove-token{cursor:default}.codeamp-components-multi-select-control__token-text,.codeamp-components-multi-select-control__remove-token.components-button{display:inline-block;line-height:24px;height:auto;background:#ddd;min-width:unset;transition:all 0.2s cubic-bezier(0.4, 1, 0.4, 1)}@media (prefers-reduced-motion: reduce){.codeamp-components-multi-select-control__token-text,.codeamp-components-multi-select-control__remove-token.components-button{transition-duration:0s;transition-delay:0s;animation-duration:1ms;animation-delay:0s}}.codeamp-components-multi-select-control__token-text{border-radius:2px 0 0 2px;padding:0 0 0 8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.codeamp-components-multi-select-control__remove-token.components-button{cursor:pointer;border-radius:0 2px 2px 0;padding:0 2px;color:#1e1e1e;line-height:10px;overflow:initial}.codeamp-components-multi-select-control__remove-token.components-button:hover{color:#1e1e1e}.codeamp-components-multi-select-control__suggestions-list{flex:1 0 100%;min-width:100%;max-height:9em;overflow-y:auto;transition:all 0.15s ease-in-out;list-style:none;border-top:1px solid #757575;margin:0;padding:0}@media (prefers-reduced-motion: reduce){.codeamp-components-multi-select-control__suggestions-list{transition-duration:0s;transition-delay:0s}}.codeamp-components-multi-select-control__no-suggestions{color:#757575;font-size:13px;margin:0;display:block;padding:4px 8px}.codeamp-components-multi-select-control__suggestion{color:#757575;display:block;font-size:13px;padding:4px 8px;margin:0;cursor:pointer}.codeamp-components-multi-select-control__suggestion.is-selected{background:var(--wp-admin-theme-color);color:#fff}.codeamp-components-multi-select-control__suggestion-match{text-decoration:underline}\n',""]),t.Z=s},313:function(e,t,n){"use strict";var r=n(499),o=n.n(r),a=n(922),s=n.n(a)()(o());s.push([e.id,".codeamp-components-resource-select-control>.components-base-control__field{position:relative;display:flex;flex-wrap:wrap}.codeamp-components-resource-select-control>.components-base-control__field>.components-base-control__label{flex:2}.codeamp-components-resource-select-control__label{margin-bottom:8px}.codeamp-components-resource-select-control__add_button{padding:0;margin:0;min-height:revert;height:auto;color:var(--wp-admin-theme-color);align-self:center;justify-content:right;margin-bottom:8px}.codeamp-components-resource-select-control__add_button:hover{text-decoration:underline}.codeamp-components-resource-select-control__edit_button.components-button.is-secondary{height:auto;margin-bottom:0}.codeamp-components-resource-select-control__select{width:auto;flex:1}.codeamp-components-resource-select-control .components-base-control{margin-bottom:0}.codeamp-components-resource-select-control .components-base-control__field{margin-bottom:0}.codeamp-components-resource-select-control .components-base-control{flex:1}\n",""]),t.Z=s},379:function(e){"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var a={},s=[],i=0;i<e.length;i++){var l=e[i],c=r.base?l[0]+r.base:l[0],d=a[c]||0,u="".concat(c," ").concat(d);a[c]=d+1;var f=n(u),h={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==f)t[f].references++,t[f].updater(h);else{var m=o(h,r);r.byIndex=i,t.splice(i,0,{identifier:u,updater:m,references:1})}s.push(u)}return s}function o(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,o){var a=r(e=e||[],o=o||{});return function(e){e=e||[];for(var s=0;s<a.length;s++){var i=n(a[s]);t[i].references--}for(var l=r(e,o),c=0;c<a.length;c++){var d=n(a[c]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}a=l}}},569:function(e){"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},216:function(e){"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},565:function(e,t,n){"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},795:function(e){"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var a=n.sourceMap;a&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},589:function(e){"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var a=n[t]={id:t,exports:{}};return e[t](a,a.exports,r),a.exports}r.amdO={},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nc=void 0;var o={};!function(){"use strict";r.r(o),r.d(o,{MultiSelectControl:function(){return xe},ResourceSelectControl:function(){return C}});var e=window.wp.i18n,t=window.wp.components,n=window.wp.compose,a=r(379),s=r.n(a),i=r(795),l=r.n(i),c=r(569),d=r.n(c),u=r(565),f=r.n(u),h=r(216),m=r.n(h),p=r(589),g=r.n(p),v=r(313),y={};y.styleTagTransform=g(),y.setAttributes=f(),y.insert=d().bind(null,"head"),y.domAPI=l(),y.insertStyleElement=m(),s()(v.Z,y),v.Z&&v.Z.locals&&v.Z.locals;var b=r(814),x=r.n(b);function w(){return w=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},w.apply(this,arguments)}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var S=function(){},C=function r(o){var a,s,i,l,c=o.onChange,d=void 0===c?S:c,u=o.onPrimaryAction,f=void 0===u?S:u,h=o.onSecondaryAction,m=void 0===h?S:h,p=o.label,g=void 0===p?"":p,v=o.primaryActionLabel,y=void 0===v?(0,e.__)("Edit","codeamp-block-components"):v,b=o.secondaryActionLabel,C=void 0===b?(0,e.__)("Add new","codeamp-block-components"):b,_=o.loadingLabel,j=void 0===_?(0,e.__)("Loading","codeamp-block-components"):_,E=o.showPrimaryAction,N=void 0===E||E,D=o.disabled,T=void 0!==D&&D,A=o.showSecondaryAction,R=void 0===A||A,M=o.defaultOption,O=o.options,I=o.value,P=o.help,L=o.primaryActionProps,F=o.secondaryActionProps,z=o.id,H=o.className,V=[];j&&(V=[{value:"loading",label:j}]),O&&(V=[],M&&V.push(M),(i=V).push.apply(i,function(e){if(Array.isArray(e))return k(e)}(l=O)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(l)||function(e,t){if(e){if("string"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k(e,t):void 0}}(l)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()));var B=(0,n.useInstanceId)(r,"codeamp-components-resource-select-control");return z&&(B=z),React.createElement(t.BaseControl,{id:B,className:x()("components-base-control codeamp-components-resource-select-control",H),help:P,label:g,__nextHasNoMarginBottom:!0},R&&React.createElement(t.Button,w({className:"codeamp-components-resource-select-control__add_button",disabled:T,onClick:m},F),null!==(a=null==F?void 0:F.label)&&void 0!==a?a:C),React.createElement(t.__experimentalHStack,null,React.createElement(t.SelectControl,{id:B,value:I,options:V,className:"codeamp-components-resource-select-control__select",onChange:d,disabled:T,__nextHasNoMarginBottom:!0}),N&&React.createElement(t.Button,w({onClick:f,variant:"secondary",disabled:T,className:"codeamp-components-resource-select-control__edit_button"},L),null!==(s=null==L?void 0:L.label)&&void 0!==s?s:y)))},_=window.wp.element,j=window.wp.a11y,E=window.wp.isShallowEqual,N=r.n(E),D=window.wp.primitives,T=(0,_.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,_.createElement)(D.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})),A=function(){};function R(r){var o=r.value,a=r.label,s=r.title,i=r.isBorderless,l=void 0!==i&&i,c=r.disabled,d=void 0!==c&&c,u=r.onClickRemove,f=void 0===u?A:u,h=r.onMouseEnter,m=r.onMouseLeave,p=r.messages,g=r.termPosition,v=r.termsCount,y=(0,n.useInstanceId)(R),b=x()("codeamp-components-multi-select-control__token",{"is-borderless":l,"is-disabled":d}),w=(0,e.sprintf)((0,e.__)("%1$s (%2$s of %3$s)"),a,g,v);return React.createElement("span",{className:b,onMouseEnter:h,onMouseLeave:m,title:s,style:{margin:"0"}},React.createElement("span",{className:"codeamp-components-multi-select-control__token-text",id:"codeamp-components-multi-select-control__token-text-".concat(y)},React.createElement(t.VisuallyHidden,{as:"span"},w),React.createElement("span",{"aria-hidden":"true"},a)),React.createElement(t.Button,{className:"codeamp-components-multi-select-control__remove-token",icon:T,onClick:d?A:function(){return f({value:o})},label:p.remove,"aria-describedby":"codeamp-components-multi-select-control__token-text-".concat(y)}))}var M=["value","isExpanded","instanceId","selectedSuggestionIndex","className","onChange","onFocus","onBlur"];function O(){return O=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},O.apply(this,arguments)}function I(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var P=(0,_.forwardRef)((function(e,t){var n=e.value,r=e.isExpanded,o=e.instanceId,a=e.selectedSuggestionIndex,s=e.className,i=e.onChange,l=e.onFocus,c=e.onBlur,d=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,M),u=function(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,o=[],a=!0,s=!1;try{for(t=t.call(e);!(a=(n=t.next()).done)&&(o.push(n.value),2!==o.length);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==t.return||t.return()}finally{if(s)throw r}}return o}}(e)||function(e){if(e){if("string"==typeof e)return I(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?I(e,2):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,_.useState)(!1)),f=u[0],h=u[1],m=n?n.length+1:0;return React.createElement("input",O({ref:t,id:o,type:"text"},d,{value:n||"",onChange:function(e){i&&i({value:e.target.value})},onFocus:function(e){h(!0),null==l||l(e)},onBlur:function(e){h(!1),null==c||c(e)},size:m,className:x()(s,"codeamp-components-multi-select-control__input"),autoComplete:"off",role:"combobox","aria-expanded":r,"aria-autocomplete":"list","aria-owns":r?"".concat(o,"-suggestions"):void 0,"aria-activedescendant":f&&-1!==a&&r?"".concat(o,"-suggestions-").concat(a):void 0,"aria-describedby":"".concat(o,"-howto"),"data-lpignore":"true"}))}));function L(e){return L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},L(e)}function F(e){return F="function"==typeof Symbol&&"symbol"===L(Symbol.iterator)?function(e){return L(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":L(e)},F(e)}function z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function H(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function V(e,t){var n=e["page".concat(t?"Y":"X","Offset")],r="scroll".concat(t?"Top":"Left");if("number"!=typeof n){var o=e.document;"number"!=typeof(n=o.documentElement[r])&&(n=o.body[r])}return n}function B(e){return V(e)}function W(e){return V(e,!0)}function U(e){var t=function(e){var t,n,r,o=e.ownerDocument,a=o.body,s=o&&o.documentElement;return n=(t=e.getBoundingClientRect()).left,r=t.top,{left:n-=s.clientLeft||a.clientLeft||0,top:r-=s.clientTop||a.clientTop||0}}(e),n=e.ownerDocument,r=n.defaultView||n.parentWindow;return t.left+=B(r),t.top+=W(r),t}var $,G=new RegExp("^(".concat(/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,")(?!px)[a-z%]+$"),"i"),Y=/^(top|right|bottom|left)$/;function q(e,t){for(var n=0;n<e.length;n++)t(e[n])}function Z(e){return"border-box"===$(e,"boxSizing")}"undefined"!=typeof window&&($=window.getComputedStyle?function(e,t,n){var r="",o=e.ownerDocument,a=n||o.defaultView.getComputedStyle(e,null);return a&&(r=a.getPropertyValue(t)||a[t]),r}:function(e,t){var n=e.currentStyle&&e.currentStyle[t];if(G.test(n)&&!Y.test(t)){var r=e.style,o=r.left,a=e.runtimeStyle.left;e.runtimeStyle.left=e.currentStyle.left,r.left="fontSize"===t?"1em":n||0,n=r.pixelLeft+"px",r.left=o,e.runtimeStyle.left=a}return""===n?"auto":n});var K=["margin","border","padding"];function Q(e,t,n){var r,o,a,s=0;for(o=0;o<t.length;o++)if(r=t[o])for(a=0;a<n.length;a++){var i;i="border"===r?"".concat(r+n[a],"Width"):r+n[a],s+=parseFloat($(e,i))||0}return s}function J(e){return null!=e&&e==e.window}var X={};function ee(e,t,n){if(J(e))return"width"===t?X.viewportWidth(e):X.viewportHeight(e);if(9===e.nodeType)return"width"===t?X.docWidth(e):X.docHeight(e);var r="width"===t?["Left","Right"]:["Top","Bottom"],o="width"===t?e.offsetWidth:e.offsetHeight,a=($(e),Z(e)),s=0;(null==o||o<=0)&&(o=void 0,(null==(s=$(e,t))||Number(s)<0)&&(s=e.style[t]||0),s=parseFloat(s)||0),void 0===n&&(n=a?1:-1);var i=void 0!==o||a,l=o||s;if(-1===n)return i?l-Q(e,["border","padding"],r):s;if(i){var c=2===n?-Q(e,["border"],r):Q(e,["margin"],r);return l+(1===n?0:c)}return s+Q(e,K.slice(n),r)}q(["Width","Height"],(function(e){X["doc".concat(e)]=function(t){var n=t.document;return Math.max(n.documentElement["scroll".concat(e)],n.body["scroll".concat(e)],X["viewport".concat(e)](n))},X["viewport".concat(e)]=function(t){var n="client".concat(e),r=t.document,o=r.body,a=r.documentElement[n];return"CSS1Compat"===r.compatMode&&a||o&&o[n]||a}}));var te={position:"absolute",visibility:"hidden",display:"block"};function ne(e){var t,n=arguments;return 0!==e.offsetWidth?t=ee.apply(void 0,n):function(e,t,n){var r,o={},a=e.style;for(r in t)t.hasOwnProperty(r)&&(o[r]=a[r],a[r]=t[r]);for(r in n.call(e),t)t.hasOwnProperty(r)&&(a[r]=o[r])}(e,te,(function(){t=ee.apply(void 0,n)})),t}function re(e,t,n){var r=n;if("object"!==F(t))return void 0!==r?("number"==typeof r&&(r+="px"),void(e.style[t]=r)):$(e,t);for(var o in t)t.hasOwnProperty(o)&&re(e,o,t[o])}q(["width","height"],(function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);X["outer".concat(t)]=function(t,n){return t&&ne(t,e,n?0:1)};var n="width"===e?["Left","Right"]:["Top","Bottom"];X[e]=function(t,r){return void 0===r?t&&ne(t,e,-1):t?($(t),Z(t)&&(r+=Q(t,["padding","border"],n)),re(t,e,r)):void 0}}));var oe=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?H(n,!0).forEach((function(t){z(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({getWindow:function(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow},offset:function(e,t){if(void 0===t)return U(e);!function(e,t){"static"===re(e,"position")&&(e.style.position="relative");var n,r,o=U(e),a={};for(r in t)t.hasOwnProperty(r)&&(n=parseFloat(re(e,r))||0,a[r]=n+t[r]-o[r]);re(e,a)}(e,t)},isWindow:J,each:q,css:re,clone:function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);if(e.overflow)for(var r in e)e.hasOwnProperty(r)&&(t.overflow[r]=e.overflow[r]);return t},scrollLeft:function(e,t){if(J(e)){if(void 0===t)return B(e);window.scrollTo(t,W(e))}else{if(void 0===t)return e.scrollLeft;e.scrollLeft=t}},scrollTop:function(e,t){if(J(e)){if(void 0===t)return W(e);window.scrollTo(B(e),t)}else{if(void 0===t)return e.scrollTop;e.scrollTop=t}},viewportWidth:0,viewportHeight:0},X);function ae(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var se=function(e){e.preventDefault()},ie=function(t){var r=t.selectedIndex,o=t.scrollIntoView,a=t.searchValue,s=t.onHover,i=t.onSelect,l=t.suggestions,c=void 0===l?[]:l,d=t.instanceId,u=t.__experimentalRenderItem,f=function(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,o=[],a=!0,s=!1;try{for(t=t.call(e);!(a=(n=t.next()).done)&&(o.push(n.value),2!==o.length);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==t.return||t.return()}finally{if(s)throw r}}return o}}(e)||function(e){if(e){if("string"==typeof e)return ae(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ae(e,2):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,_.useState)(!1)),h=f[0],m=f[1],p=(0,n.useRefEffect)((function(e){var t;return r>-1&&o&&e.children[r]&&(m(!0),function(e,t,n){n=n||{},9===t.nodeType&&(t=oe.getWindow(t));var r=n.allowHorizontalScroll,o=n.onlyScrollIfNeeded,a=n.alignWithTop,s=n.alignWithLeft,i=n.offsetTop||0,l=n.offsetLeft||0,c=n.offsetBottom||0,d=n.offsetRight||0;r=void 0===r||r;var u,f,h,m,p,g,v,y,b,x,w=oe.isWindow(t),k=oe.offset(e),S=oe.outerHeight(e),C=oe.outerWidth(e);w?(v=t,x=oe.height(v),b=oe.width(v),y={left:oe.scrollLeft(v),top:oe.scrollTop(v)},p={left:k.left-y.left-l,top:k.top-y.top-i},g={left:k.left+C-(y.left+b)+d,top:k.top+S-(y.top+x)+c},m=y):(u=oe.offset(t),f=t.clientHeight,h=t.clientWidth,m={left:t.scrollLeft,top:t.scrollTop},p={left:k.left-(u.left+(parseFloat(oe.css(t,"borderLeftWidth"))||0))-l,top:k.top-(u.top+(parseFloat(oe.css(t,"borderTopWidth"))||0))-i},g={left:k.left+C-(u.left+h+(parseFloat(oe.css(t,"borderRightWidth"))||0))+d,top:k.top+S-(u.top+f+(parseFloat(oe.css(t,"borderBottomWidth"))||0))+c}),p.top<0||g.top>0?!0===a?oe.scrollTop(t,m.top+p.top):!1===a?oe.scrollTop(t,m.top+g.top):p.top<0?oe.scrollTop(t,m.top+p.top):oe.scrollTop(t,m.top+g.top):o||((a=void 0===a||!!a)?oe.scrollTop(t,m.top+p.top):oe.scrollTop(t,m.top+g.top)),r&&(p.left<0||g.left>0?!0===s?oe.scrollLeft(t,m.left+p.left):!1===s?oe.scrollLeft(t,m.left+g.left):p.left<0?oe.scrollLeft(t,m.left+p.left):oe.scrollLeft(t,m.left+g.left):o||((s=void 0===s||!!s)?oe.scrollLeft(t,m.left+p.left):oe.scrollLeft(t,m.left+g.left)))}(e.children[r],e,{onlyScrollIfNeeded:!0}),t=requestAnimationFrame((function(){m(!1)}))),function(){void 0!==t&&cancelAnimationFrame(t)}}),[r,o]),g=function(e){return function(){h||null==s||s(e)}},v=function(e){return function(){null==i||i(e)}};return React.createElement("ul",{ref:p,className:"codeamp-components-multi-select-control__suggestions-list",id:"".concat(d,"-suggestions"),role:"listbox"},0===c.length&&React.createElement("li",{className:"codeamp-components-multi-select-control__no-suggestions",role:"option"},(0,e.__)("No results found.","codeamp-block-components")),c.map((function(e,t){var n,o=function(e){var t=e.label.toLocaleLowerCase().indexOf(a);return{suggestionBeforeMatch:e.label.substring(0,t),suggestionMatch:e.label.substring(t,t+a.length),suggestionAfterMatch:e.label.substring(t+a.length)}}(e),s=x()("codeamp-components-multi-select-control__suggestion",{"is-selected":t===r});return n="function"==typeof u?u({item:e}):o?React.createElement("span",{"aria-label":e.label},o.suggestionBeforeMatch,React.createElement("strong",{className:"codeamp-components-multi-select-control__suggestion-match"},o.suggestionMatch),o.suggestionAfterMatch):e.label,React.createElement("li",{id:"".concat(d,"-suggestions-").concat(t),role:"option",className:s,key:e.value,onMouseDown:se,onClick:v(e),onMouseEnter:g(e),"aria-selected":t===r},n)})))},le=r(245),ce={};function de(){return de=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},de.apply(this,arguments)}function ue(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function he(e){return he="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},he(e)}function me(e){return function(e){if(Array.isArray(e))return ve(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ge(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],s=!0,i=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);s=!0);}catch(e){i=!0,o=e}finally{try{s||null==n.return||n.return()}finally{if(i)throw o}}return a}}(e,t)||ge(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ge(e,t){if(e){if("string"==typeof e)return ve(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ve(e,t):void 0}}function ve(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ye(e){if(""===e)return null;var t=null!=e?e:"",n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).find((function(e){return-1!==e.label.toLocaleLowerCase().indexOf(t.trim().toLocaleLowerCase())}));return n}ce.styleTagTransform=g(),ce.setAttributes=f(),ce.insert=d().bind(null,"head"),ce.domAPI=l(),ce.insertStyleElement=m(),s()(le.Z,ce),le.Z&&le.Z.locals&&le.Z.locals;var be=function(){};function xe(r){var o=r.autoCapitalize,a=r.autoComplete,s=r.maxLength,i=r.placeholder,l=r.label,c=void 0===l?(0,e.__)("Add item"):l,d=r.help,u=r.className,f=r.suggestions,h=void 0===f?[]:f,m=r.options,p=void 0===m?[]:m,g=r.maxSuggestions,v=void 0===g?100:g,y=r.value,b=void 0===y?[]:y,w=r.onChange,k=void 0===w?function(){}:w,S=r.onInputChange,C=void 0===S?function(){}:S,E=r.onFocus,D=void 0===E?void 0:E,T=(r.isBorderless,r.id),A=r.disabled,M=void 0!==A&&A,O=r.messages,I=void 0===O?{added:(0,e.__)("Item added."),removed:(0,e.__)("Item removed."),remove:(0,e.__)("Remove item"),__experimentalInvalid:(0,e.__)("Invalid item")}:O,L=r.__experimentalRenderItem,F=r.__experimentalAutoSelectFirstMatch,z=void 0===F||F,H=r.__experimentalValidateInput,V=void 0===H?function(){return!0}:H,B=r.__experimentalCloseSuggestionsOnSelect,W=void 0===B||B,U=r.__next36pxDefaultSize,$=void 0!==U&&U,G=(0,n.useInstanceId)(xe,"codeamp-components-multi-select-control");T&&(G=T);var Y=pe((0,_.useState)(""),2),q=Y[0],Z=Y[1],K=pe((0,_.useState)(0),2),Q=K[0],J=K[1],X=pe((0,_.useState)(!1),2),ee=X[0],te=X[1],ne=pe((0,_.useState)(!1),2),re=ne[0],oe=ne[1],ae=pe((0,_.useState)(-1),2),se=ae[0],le=ae[1],ce=pe((0,_.useState)(!1),2),ge=ce[0],ve=ce[1],we=(0,n.usePrevious)(h),ke=(0,n.usePrevious)(b),Se=(0,_.useRef)(null),Ce=(0,_.useRef)(null),_e=(0,n.useDebounce)(j.speak,500);function je(){var e;null===(e=Se.current)||void 0===e||e.focus()}function Ee(){var e;return Se.current===(null===(e=Se.current)||void 0===e?void 0:e.ownerDocument.activeElement)}function Ne(e){Ee()||e.target===Ce.current?(te(!0),oe(!0)):te(!1),"function"==typeof D&&D(e)}function De(e){e.target===Ce.current&&ee&&e.preventDefault()}function Te(e){Ie(e.value),je()}function Ae(e){var t=!1;return Ee()&&He()&&(e(),t=!0),t}function Re(){var e=ze()-1;e>-1&&Ie(b[e])}function Me(){var e=ze();e<b.length&&(Ie(b[e]),function(e){J(b.length-Math.max(e,-1)-1)}(e))}function Oe(e){V(e.label)?(function(e){if(me(new Set(e.filter((function(e){return!function(e){return b.some((function(t){return Pe(e)===Pe(t)}))}(e)})))),e.length>0){var t=me(b);t.splice.apply(t,[ze(),0].concat(me(e))),k(t)}}([e.value]),(0,j.speak)(I.added,"assertive"),Z(""),ve(!1),le(-1),W&&oe(!1),ee&&je()):(0,j.speak)(I.__experimentalInvalid,"assertive")}function Ie(e){var t=b.filter((function(t){return Pe(t)!==Pe(e)}));k(t),(0,j.speak)(I.removed,"assertive")}function Pe(e){return"object"===he(e)?e.value:e}function Le(){return p.filter((function(e){return-1===b.indexOf(e.value)}))}function Fe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:q,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Le(),n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:v;if(""!==e.trim()){var r=[],o=[];t.forEach((function(t){var n=t.label.toLocaleLowerCase().indexOf(e.trim().toLocaleLowerCase());0===n?r.push(t):n>0&&o.push(t)})),t=r.concat(o)}return t.slice(0,n)}function ze(){return b.length-Q}function He(){return 0===q.length}function Ve(){var e,t;return(null===(e=ye(q))||void 0===e||null===(t=e.label)||void 0===t?void 0:t.length)>0}function Be(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=Fe(q),r=n.length>0;t&&(z&&r?(le(0),ve(!0)):(le(-1),ve(!1))),le(0);var o=r?(0,e.sprintf)((0,e._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",n.length),n.length):(0,e.__)("No results.");_e(o,"assertive")}(0,_.useEffect)((function(){ee&&!Ee()&&je()}),[ee]),(0,_.useEffect)((function(){var e=!N()(h,we||[]);(e||b!==ke)&&Be(e)}),[h,we,b,ke]),(0,_.useEffect)((function(){Be()}),[q]),M&&ee&&(te(!1),Z(""));var We,Ue,$e=x()(u,"codeamp-components-multi-select-control__input-container",{"is-active":ee,"is-disabled":M}),Ge={className:"components-base-control codeamp-components-multi-select-control",tabIndex:-1},Ye=Fe();return M||(Ge=Object.assign({},Ge,{onKeyDown:function(e){var t=!1;if(!e.defaultPrevented){switch(e.code){case"Backspace":t=Ae(Re);break;case"Enter":case"Space":t=function(){var e=!1,t=function(){if(-1!==se)return Fe()[se]}();return t&&re?(Oe(t),e=!0):Ve()&&""!==q.trim()&&(Oe(q),e=!0),e}();break;case"ArrowLeft":t=function(){var e=!1;return He()&&(J((function(e){return Math.min(e+1,b.length)})),e=!0),e}();break;case"ArrowUp":t=re?(le((function(e){return(0===e?Fe(q,Le(),b,v).length:e)-1})),ve(!0),!0):(oe(!0),le(0),ve(!0),!0);break;case"ArrowRight":t=function(){var e=!1;return He()&&(J((function(e){return Math.max(e-1,0)})),e=!0),e}();break;case"ArrowDown":t=re?(le((function(e){return(e+1)%Fe(q,Le(),b,v).length})),ve(!0),!0):(oe(!0),le(0),ve(!0),!0);break;case"Delete":t=Ae(Me);break;case"Escape":t=function(e){return e.target instanceof HTMLInputElement&&(Z(e.target.value),oe(!1),le(-1),ve(!1)),!0}(e)}t&&e.preventDefault()}},onKeyPress:function(e){var t=!1;44===e.charCode&&(Ve()&&Oe(q),t=!0),t&&e.preventDefault()},onFocus:Ne})),React.createElement(t.BaseControl,{id:G,label:c,help:d},React.createElement("div",Ge,React.createElement("div",{ref:Ce,className:$e,tabIndex:-1,onMouseDown:De,onTouchStart:De},React.createElement(t.Flex,{className:"codeamp-components-multi-select-control__tokens-container",justify:"flex-start",align:"flex-start",gap:"4px",wrap:!0,__next36pxDefaultSize:$,hasTokens:!!b.length},(Ue=b.map((function(e){return p.find((function(t){return t.value===e}))||null})).map((function(e,n){return function(e,n){var r=e.value,o=e.label,a=e.onMouseEnter,s=void 0===a?be:a,i=e.onMouseLeave,l=void 0===i?be:i,c=e.isBorderless,d=void 0!==c&&c,u=r,f=n+1;return React.createElement(t.FlexItem,{key:"token-"+u},React.createElement(R,{value:u,label:o,title:"string"!=typeof token?o:void 0,onClickRemove:Te,isBorderless:d,onMouseEnter:s,onMouseLeave:l,disabled:M,messages:I,termPosition:f,termsCount:b.length}))}(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ue(Object(n),!0).forEach((function(t){fe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ue(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e),n)})),Ue.splice(ze(),0,(We={instanceId:G,autoCapitalize:o,autoComplete:a,placeholder:0===b.length?i:"",key:"input",disabled:M,value:q,onBlur:function(){Ve()?te(!1):(Z(""),J(0),te(!1),oe(!1),le(-1),ve(!1))},isExpanded:re,selectedSuggestionIndex:se,style:{lineHeight:"24px"},onClick:Ne},React.createElement(P,de({},We,{onChange:s&&b.length>=s?void 0:function(e){var t=e.value;Z(t),oe(!0),C(t)},ref:Se})))),Ue)),re&&React.createElement(ie,{instanceId:G,match:ye(q,p),searchValue:q.trim(),suggestions:Ye,selectedIndex:se,scrollIntoView:ge,onHover:function(e){var t=Fe().indexOf(e);t>=0&&(le(t),ve(!1))},onSelect:function(e){Oe(e)},__experimentalRenderItem:L}))))}}();var a=t;for(var s in o)a[s]=o[s];o.__esModule&&Object.defineProperty(a,"__esModule",{value:!0})}()},338:(e,t,n)=>{"use strict";var r=n(795);t.H=r.createRoot,r.hydrateRoot},795:e=>{"use strict";e.exports=window.ReactDOM},833:e=>{e.exports=function(e,t,n,r){var o=n?n.call(r,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var a=Object.keys(e),s=Object.keys(t);if(a.length!==s.length)return!1;for(var i=Object.prototype.hasOwnProperty.bind(t),l=0;l<a.length;l++){var c=a[l];if(!i(c))return!1;var d=e[c],u=t[c];if(!1===(o=n?n.call(r,d,u,c):void 0)||void 0===o&&d!==u)return!1}return!0}}},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var a=r[e]={exports:{}};return n[e](a,a.exports,o),a.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var a=Object.create(null);o.r(a);var s={};e=e||[null,t({}),t([]),t(t)];for(var i=2&r&&n;"object"==typeof i&&!~e.indexOf(i);i=t(i))Object.getOwnPropertyNames(i).forEach((e=>s[e]=()=>n[e]));return s.default=()=>n,o.d(a,s),a},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nc=void 0,(()=>{"use strict";const e=window.React;var t,n=o.t(e,2),r=o.n(e),a=o(338);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(t||(t={}));const i="popstate";function l(e,t){if(!1===e||null==e)throw new Error(t)}function c(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function d(e,t){return{usr:e.state,key:e.key,idx:t}}function u(e,t,n,r){return void 0===n&&(n=null),s({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?h(t):t,{state:n,key:t&&t.key||r||Math.random().toString(36).substr(2,8)})}function f(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function h(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}var m;function p(e,t,n){return void 0===n&&(n="/"),function(e,t,n,r){let o=D(("string"==typeof t?h(t):t).pathname||"/",n);if(null==o)return null;let a=g(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(a);let s=null;for(let e=0;null==s&&e<a.length;++e){let t=N(o);s=j(a[e],t,r)}return s}(e,t,n,!1)}function g(e,t,n,r){void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r="");let o=(e,o,a)=>{let s={relativePath:void 0===a?e.path||"":a,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};s.relativePath.startsWith("/")&&(l(s.relativePath.startsWith(r),'Absolute route path "'+s.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),s.relativePath=s.relativePath.slice(r.length));let i=M([r,s.relativePath]),c=n.concat(s);e.children&&e.children.length>0&&(l(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+i+'".'),g(e.children,t,c,i)),(null!=e.path||e.index)&&t.push({path:i,score:_(i,e.index),routesMeta:c})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let n of v(e.path))o(e,t,n);else o(e,t)})),t}function v(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,o=n.endsWith("?"),a=n.replace(/\?$/,"");if(0===r.length)return o?[a,""]:[a];let s=v(r.join("/")),i=[];return i.push(...s.map((e=>""===e?a:[a,e].join("/")))),o&&i.push(...s),i.map((t=>e.startsWith("/")&&""===t?"/":t))}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(m||(m={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const y=/^:[\w-]+$/,b=3,x=2,w=1,k=10,S=-2,C=e=>"*"===e;function _(e,t){let n=e.split("/"),r=n.length;return n.some(C)&&(r+=S),t&&(r+=x),n.filter((e=>!C(e))).reduce(((e,t)=>e+(y.test(t)?b:""===t?w:k)),r)}function j(e,t,n){void 0===n&&(n=!1);let{routesMeta:r}=e,o={},a="/",s=[];for(let e=0;e<r.length;++e){let i=r[e],l=e===r.length-1,c="/"===a?t:t.slice(a.length)||"/",d=E({path:i.relativePath,caseSensitive:i.caseSensitive,end:l},c),u=i.route;if(!d&&l&&n&&!r[r.length-1].route.index&&(d=E({path:i.relativePath,caseSensitive:i.caseSensitive,end:!1},c)),!d)return null;Object.assign(o,d.params),s.push({params:o,pathname:M([a,d.pathname]),pathnameBase:O(M([a,d.pathnameBase])),route:u}),"/"!==d.pathnameBase&&(a=M([a,d.pathnameBase]))}return s}function E(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!0),c("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));return e.endsWith("*")?(r.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let a=o[0],s=a.replace(/(.)\/+$/,"$1"),i=o.slice(1),l=r.reduce(((e,t,n)=>{let{paramName:r,isOptional:o}=t;if("*"===r){let e=i[n]||"";s=a.slice(0,a.length-e.length).replace(/(.)\/+$/,"$1")}const l=i[n];return e[r]=o&&!l?void 0:(l||"").replace(/%2F/g,"/"),e}),{});return{params:l,pathname:a,pathnameBase:s,pattern:e}}function N(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return c(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function D(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function T(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"].  Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function A(e,t){let n=function(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}(e);return t?n.map(((e,t)=>t===n.length-1?e.pathname:e.pathnameBase)):n.map((e=>e.pathnameBase))}function R(e,t,n,r){let o;void 0===r&&(r=!1),"string"==typeof e?o=h(e):(o=s({},e),l(!o.pathname||!o.pathname.includes("?"),T("?","pathname","search",o)),l(!o.pathname||!o.pathname.includes("#"),T("#","pathname","hash",o)),l(!o.search||!o.search.includes("#"),T("#","search","hash",o)));let a,i=""===e||""===o.pathname,c=i?"/":o.pathname;if(null==c)a=n;else{let e=t.length-1;if(!r&&c.startsWith("..")){let t=c.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}a=e>=0?t[e]:"/"}let d=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:o=""}="string"==typeof e?h(e):e,a=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:a,search:I(r),hash:P(o)}}(o,a),u=c&&"/"!==c&&c.endsWith("/"),f=(i||"."===c)&&n.endsWith("/");return d.pathname.endsWith("/")||!u&&!f||(d.pathname+="/"),d}const M=e=>e.join("/").replace(/\/\/+/g,"/"),O=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),I=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",P=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;const L=["post","put","patch","delete"],F=(new Set(L),["get",...L]);function z(){return z=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},z.apply(this,arguments)}new Set(F),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const H=e.createContext(null),V=e.createContext(null),B=e.createContext(null),W=e.createContext(null),U=e.createContext({outlet:null,matches:[],isDataRoute:!1}),$=e.createContext(null);function G(){return null!=e.useContext(W)}function Y(){return G()||l(!1),e.useContext(W).location}function q(t){G()||l(!1);let{pathname:n}=Y();return e.useMemo((()=>E(t,N(n))),[n,t])}function Z(t){e.useContext(B).static||e.useLayoutEffect(t)}function K(){let{isDataRoute:t}=e.useContext(U);return t?function(){let{router:t}=function(){let t=e.useContext(H);return t||l(!1),t}(se.UseNavigateStable),n=le(ie.UseNavigateStable),r=e.useRef(!1);Z((()=>{r.current=!0}));let o=e.useCallback((function(e,o){void 0===o&&(o={}),r.current&&("number"==typeof e?t.navigate(e):t.navigate(e,z({fromRouteId:n},o)))}),[t,n]);return o}():function(){G()||l(!1);let t=e.useContext(H),{basename:n,future:r,navigator:o}=e.useContext(B),{matches:a}=e.useContext(U),{pathname:s}=Y(),i=JSON.stringify(A(a,r.v7_relativeSplatPath)),c=e.useRef(!1);Z((()=>{c.current=!0}));let d=e.useCallback((function(e,r){if(void 0===r&&(r={}),!c.current)return;if("number"==typeof e)return void o.go(e);let a=R(e,JSON.parse(i),s,"path"===r.relative);null==t&&"/"!==n&&(a.pathname="/"===a.pathname?n:M([n,a.pathname])),(r.replace?o.replace:o.push)(a,r.state,r)}),[n,o,i,s,t]);return d}()}const Q=e.createContext(null);function J(){return e.useContext(Q)}function X(){let{matches:t}=e.useContext(U),n=t[t.length-1];return n?n.params:{}}function ee(t,n){let{relative:r}=void 0===n?{}:n,{future:o}=e.useContext(B),{matches:a}=e.useContext(U),{pathname:s}=Y(),i=JSON.stringify(A(a,o.v7_relativeSplatPath));return e.useMemo((()=>R(t,JSON.parse(i),s,"path"===r)),[t,i,s,r])}function te(n,r,o,a){G()||l(!1);let{navigator:s,static:i}=e.useContext(B),{matches:c}=e.useContext(U),d=c[c.length-1],u=d?d.params:{},f=(d&&d.pathname,d?d.pathnameBase:"/");d&&d.route;let m,g=Y();if(r){var v;let e="string"==typeof r?h(r):r;"/"===f||(null==(v=e.pathname)?void 0:v.startsWith(f))||l(!1),m=e}else m=g;let y=m.pathname||"/",b=y;if("/"!==f){let e=f.replace(/^\//,"").split("/");b="/"+y.replace(/^\//,"").split("/").slice(e.length).join("/")}let x=!i&&o&&o.matches&&o.matches.length>0?o.matches:p(n,{pathname:b}),w=function(t,n,r,o){var a;if(void 0===n&&(n=[]),void 0===r&&(r=null),void 0===o&&(o=null),null==t){var s;if(!r)return null;if(r.errors)t=r.matches;else{if(!(null!=(s=o)&&s.v7_partialHydration&&0===n.length&&!r.initialized&&r.matches.length>0))return null;t=r.matches}}let i=t,c=null==(a=r)?void 0:a.errors;if(null!=c){let e=i.findIndex((e=>e.route.id&&void 0!==(null==c?void 0:c[e.route.id])));e>=0||l(!1),i=i.slice(0,Math.min(i.length,e+1))}let d=!1,u=-1;if(r&&o&&o.v7_partialHydration)for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(u=e),t.route.id){let{loaderData:e,errors:n}=r,o=t.route.loader&&void 0===e[t.route.id]&&(!n||void 0===n[t.route.id]);if(t.route.lazy||o){d=!0,i=u>=0?i.slice(0,u+1):[i[0]];break}}}return i.reduceRight(((t,o,a)=>{let s,l=!1,f=null,h=null;var m;r&&(s=c&&o.route.id?c[o.route.id]:void 0,f=o.route.errorElement||re,d&&(u<0&&0===a?(ce[m="route-fallback"]||(ce[m]=!0),l=!0,h=null):u===a&&(l=!0,h=o.route.hydrateFallbackElement||null)));let p=n.concat(i.slice(0,a+1)),g=()=>{let n;return n=s?f:l?h:o.route.Component?e.createElement(o.route.Component,null):o.route.element?o.route.element:t,e.createElement(ae,{match:o,routeContext:{outlet:t,matches:p,isDataRoute:null!=r},children:n})};return r&&(o.route.ErrorBoundary||o.route.errorElement||0===a)?e.createElement(oe,{location:r.location,revalidation:r.revalidation,component:f,error:s,children:g(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):g()}),null)}(x&&x.map((e=>Object.assign({},e,{params:Object.assign({},u,e.params),pathname:M([f,s.encodeLocation?s.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?f:M([f,s.encodeLocation?s.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),c,o,a);return r&&w?e.createElement(W.Provider,{value:{location:z({pathname:"/",search:"",hash:"",state:null,key:"default"},m),navigationType:t.Pop}},w):w}function ne(){let t=function(){var t;let n=e.useContext($),r=function(){let t=e.useContext(V);return t||l(!1),t}(ie.UseRouteError),o=le(ie.UseRouteError);return void 0!==n?n:null==(t=r.errors)?void 0:t[o]}(),n=function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return e.createElement(e.Fragment,null,e.createElement("h2",null,"Unexpected Application Error!"),e.createElement("h3",{style:{fontStyle:"italic"}},n),r?e.createElement("pre",{style:o},r):null,null)}const re=e.createElement(ne,null);class oe extends e.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?e.createElement(U.Provider,{value:this.props.routeContext},e.createElement($.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ae(t){let{routeContext:n,match:r,children:o}=t,a=e.useContext(H);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),e.createElement(U.Provider,{value:n},o)}var se=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(se||{}),ie=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(ie||{});function le(t){let n=function(){let t=e.useContext(U);return t||l(!1),t}(),r=n.matches[n.matches.length-1];return r.route.id||l(!1),r.route.id}const ce={};function de(t){return function(t){let n=e.useContext(U).outlet;return n?e.createElement(Q.Provider,{value:t},n):n}(t.context)}function ue(e){l(!1)}function fe(n){let{basename:r="/",children:o=null,location:a,navigationType:s=t.Pop,navigator:i,static:c=!1,future:d}=n;G()&&l(!1);let u=r.replace(/^\/*/,"/"),f=e.useMemo((()=>({basename:u,navigator:i,static:c,future:z({v7_relativeSplatPath:!1},d)})),[u,d,i,c]);"string"==typeof a&&(a=h(a));let{pathname:m="/",search:p="",hash:g="",state:v=null,key:y="default"}=a,b=e.useMemo((()=>{let e=D(m,u);return null==e?null:{location:{pathname:e,search:p,hash:g,state:v,key:y},navigationType:s}}),[u,m,p,g,v,y,s]);return null==b?null:e.createElement(B.Provider,{value:f},e.createElement(W.Provider,{children:o,value:b}))}function he(e){let{children:t,location:n}=e;return te(me(t),n)}function me(t,n){void 0===n&&(n=[]);let r=[];return e.Children.forEach(t,((t,o)=>{if(!e.isValidElement(t))return;let a=[...n,o];if(t.type===e.Fragment)return void r.push.apply(r,me(t.props.children,a));t.type!==ue&&l(!1),t.props.index&&t.props.children&&l(!1);let s={id:t.props.id||a.join("-"),caseSensitive:t.props.caseSensitive,element:t.props.element,Component:t.props.Component,index:t.props.index,path:t.props.path,loader:t.props.loader,action:t.props.action,errorElement:t.props.errorElement,ErrorBoundary:t.props.ErrorBoundary,hasErrorBoundary:null!=t.props.ErrorBoundary||null!=t.props.errorElement,shouldRevalidate:t.props.shouldRevalidate,handle:t.props.handle,lazy:t.props.lazy};t.props.children&&(s.children=me(t.props.children,a)),r.push(s)})),r}e.startTransition,new Promise((()=>{})),e.Component;var pe=o(795);function ge(){return ge=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ge.apply(this,arguments)}function ve(e){return void 0===e&&(e=""),new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map((e=>[n,e])):[[n,r]])}),[]))}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const ye=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"];try{window.__reactRouterVersion="6"}catch(e){}new Map;const be=e.startTransition;function xe(n){let{basename:r,children:o,future:a,window:m}=n,p=e.useRef();null==p.current&&(p.current=function(e){return void 0===e&&(e={}),function(e,n,r,o){void 0===o&&(o={});let{window:a=document.defaultView,v5Compat:c=!1}=o,h=a.history,m=t.Pop,p=null,g=v();function v(){return(h.state||{idx:null}).idx}function y(){m=t.Pop;let e=v(),n=null==e?null:e-g;g=e,p&&p({action:m,location:x.location,delta:n})}function b(e){let t="null"!==a.location.origin?a.location.origin:a.location.href,n="string"==typeof e?e:f(e);return n=n.replace(/ $/,"%20"),l(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==g&&(g=0,h.replaceState(s({},h.state,{idx:g}),""));let x={get action(){return m},get location(){return e(a,h)},listen(e){if(p)throw new Error("A history only accepts one active listener");return a.addEventListener(i,y),p=e,()=>{a.removeEventListener(i,y),p=null}},createHref:e=>n(a,e),createURL:b,encodeLocation(e){let t=b(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,n){m=t.Push;let o=u(x.location,e,n);r&&r(o,e),g=v()+1;let s=d(o,g),i=x.createHref(o);try{h.pushState(s,"",i)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;a.location.assign(i)}c&&p&&p({action:m,location:x.location,delta:1})},replace:function(e,n){m=t.Replace;let o=u(x.location,e,n);r&&r(o,e),g=v();let a=d(o,g),s=x.createHref(o);h.replaceState(a,"",s),c&&p&&p({action:m,location:x.location,delta:0})},go:e=>h.go(e)};return x}((function(e,t){let{pathname:n="/",search:r="",hash:o=""}=h(e.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),u("",{pathname:n,search:r,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"==typeof t?t:f(t))}),(function(e,t){c("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}({window:m,v5Compat:!0}));let g=p.current,[v,y]=e.useState({action:g.action,location:g.location}),{v7_startTransition:b}=a||{},x=e.useCallback((e=>{b&&be?be((()=>y(e))):y(e)}),[y,b]);return e.useLayoutEffect((()=>g.listen(x)),[g,x]),e.useEffect((()=>{return null==(e=a)||e.v7_startTransition,void 0!==(null==e?void 0:e.v7_relativeSplatPath)||t&&t.v7_relativeSplatPath,void(t&&(t.v7_fetcherPersist,t.v7_normalizeFormMethod,t.v7_partialHydration,t.v7_skipActionErrorRevalidation));var e,t}),[a]),e.createElement(fe,{basename:r,children:o,location:v.location,navigationType:v.action,navigator:g,future:a})}pe.flushSync,e.useId;const we="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,ke=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Se=e.forwardRef((function(t,n){let r,{onClick:o,relative:a,reloadDocument:s,replace:i,state:c,target:d,to:u,preventScrollReset:h,viewTransition:m}=t,p=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(t,ye),{basename:g}=e.useContext(B),v=!1;if("string"==typeof u&&ke.test(u)&&(r=u,we))try{let e=new URL(window.location.href),t=u.startsWith("//")?new URL(e.protocol+u):new URL(u),n=D(t.pathname,g);t.origin===e.origin&&null!=n?u=n+t.search+t.hash:v=!0}catch(e){}let y=function(t,n){let{relative:r}=void 0===n?{}:n;G()||l(!1);let{basename:o,navigator:a}=e.useContext(B),{hash:s,pathname:i,search:c}=ee(t,{relative:r}),d=i;return"/"!==o&&(d="/"===i?o:M([o,i])),a.createHref({pathname:d,search:c,hash:s})}(u,{relative:a}),b=function(t,n){let{target:r,replace:o,state:a,preventScrollReset:s,relative:i,viewTransition:l}=void 0===n?{}:n,c=K(),d=Y(),u=ee(t,{relative:i});return e.useCallback((e=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(e,r)){e.preventDefault();let n=void 0!==o?o:f(d)===f(u);c(t,{replace:n,state:a,preventScrollReset:s,relative:i,viewTransition:l})}}),[d,c,u,o,a,r,t,s,i,l])}(u,{replace:i,state:c,target:d,preventScrollReset:h,relative:a,viewTransition:m});return e.createElement("a",ge({},p,{href:r||y,onClick:v||s?o:function(e){o&&o(e),e.defaultPrevented||b(e)},ref:n,target:d}))}));var Ce,_e;function je(t){let n=e.useRef(ve(t)),r=e.useRef(!1),o=Y(),a=e.useMemo((()=>function(e,t){let n=ve(e);return t&&t.forEach(((e,r)=>{n.has(r)||t.getAll(r).forEach((e=>{n.append(r,e)}))})),n}(o.search,r.current?null:n.current)),[o.search]),s=K(),i=e.useCallback(((e,t)=>{const n=ve("function"==typeof e?e(a):e);r.current=!0,s("?"+n,t)}),[s,a]);return[a,i]}(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Ce||(Ce={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(_e||(_e={}));const Ee=window.wp.apiFetch;var Ne=o.n(Ee);const De=window.ReactJSXRuntime;let Te=null;const Ae=(0,e.createContext)({settings:null,refreshSettings:()=>Promise.resolve(null)}),Re=()=>(0,e.useContext)(Ae);function Me({children:t}){const[n,r]=(0,e.useState)(null),o=(0,e.useCallback)((async()=>{try{const e=await Ne()({path:`${eventkoi_params.api}/settings`,method:"get",headers:{"EVENTKOI-API-KEY":eventkoi_params.api_key}});return r(e),Te=e,e}catch(e){return console.error("Failed to load settings:",e),null}}),[]);return(0,e.useEffect)((()=>{o()}),[o]),(0,De.jsx)(Ae.Provider,{value:{settings:n,refreshSettings:o},children:t})}const Oe={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function Ie(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Pe={date:Ie({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Ie({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Ie({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Le={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Fe(e){return(t,n)=>{let r;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,o=n?.width?String(n.width):t;r=e.formattingValues[o]||e.formattingValues[t]}else{const t=e.defaultWidth,o=n?.width?String(n.width):e.defaultWidth;r=e.values[o]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}const ze={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Fe({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Fe({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Fe({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Fe({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Fe({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function He(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;const s=a[0],i=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(i)?function(e){for(let t=0;t<e.length;t++)if(e[t].test(s))return t}(i):function(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&e[t].test(s))return t}(i);let c;return c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c,{value:c,rest:t.slice(s.length)}}}const Ve={ordinalNumber:(Be={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const n=e.match(Be.matchPattern);if(!n)return null;const r=n[0],o=e.match(Be.parsePattern);if(!o)return null;let a=Be.valueCallback?Be.valueCallback(o[0]):o[0];return a=t.valueCallback?t.valueCallback(a):a,{value:a,rest:e.slice(r.length)}}),era:He({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:He({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:He({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:He({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:He({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};var Be;const We={code:"en-US",formatDistance:(e,t,n)=>{let r;const o=Oe[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:Pe,formatRelative:(e,t,n,r)=>Le[e],localize:ze,match:Ve,options:{weekStartsOn:0,firstWeekContainsDate:1}};let Ue={};function $e(){return Ue}Math.pow(10,8);const Ge=6048e5;function Ye(e){const t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):"number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?new Date(e):new Date(NaN)}function qe(e){const t=Ye(e);return t.setHours(0,0,0,0),t}function Ze(e){const t=Ye(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Ke(e,t){const n=qe(e),r=qe(t),o=+n-Ze(n),a=+r-Ze(r);return Math.round((o-a)/864e5)}function Qe(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function Je(e){const t=Ye(e),n=Qe(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Xe(e,t){const n=$e(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Ye(e),a=o.getDay(),s=(a<r?7:0)+a-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function et(e){return Xe(e,{weekStartsOn:1})}function tt(e){const t=Ye(e),n=t.getFullYear(),r=Qe(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const o=et(r),a=Qe(e,0);a.setFullYear(n,0,4),a.setHours(0,0,0,0);const s=et(a);return t.getTime()>=o.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function nt(e){const t=Ye(e),n=+et(t)-+function(e){const t=tt(e),n=Qe(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),et(n)}(t);return Math.round(n/Ge)+1}function rt(e,t){const n=Ye(e),r=n.getFullYear(),o=$e(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,s=Qe(e,0);s.setFullYear(r+1,0,a),s.setHours(0,0,0,0);const i=Xe(s,t),l=Qe(e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);const c=Xe(l,t);return n.getTime()>=i.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function ot(e,t){const n=Ye(e),r=+Xe(n,t)-+function(e,t){const n=$e(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=rt(e,t),a=Qe(e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),Xe(a,t)}(n,t);return Math.round(r/Ge)+1}function at(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const st={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return at("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):at(n+1,2)},d:(e,t)=>at(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>at(e.getHours()%12||12,t.length),H:(e,t)=>at(e.getHours(),t.length),m:(e,t)=>at(e.getMinutes(),t.length),s:(e,t)=>at(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return at(Math.trunc(r*Math.pow(10,n-3)),t.length)}},it={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:"year"})}return st.y(e,t)},Y:function(e,t,n,r){const o=rt(e,r),a=o>0?o:1-o;return"YY"===t?at(a%100,2):"Yo"===t?n.ordinalNumber(a,{unit:"year"}):at(a,t.length)},R:function(e,t){return at(tt(e),t.length)},u:function(e,t){return at(e.getFullYear(),t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return at(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return at(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return st.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return at(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=ot(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):at(o,t.length)},I:function(e,t,n){const r=nt(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):at(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):st.d(e,t)},D:function(e,t,n){const r=function(e){const t=Ye(e);return Ke(t,Je(t))+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):at(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return at(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return at(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return at(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(o=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(o=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return st.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):st.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):at(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):at(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):st.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):st.s(e,t)},S:function(e,t){return st.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return ct(r);case"XXXX":case"XX":return dt(r);default:return dt(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return ct(r);case"xxxx":case"xx":return dt(r);default:return dt(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+lt(r,":");default:return"GMT"+dt(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+lt(r,":");default:return"GMT"+dt(r,":")}},t:function(e,t,n){return at(Math.trunc(e.getTime()/1e3),t.length)},T:function(e,t,n){return at(e.getTime(),t.length)}};function lt(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),a=r%60;return 0===a?n+String(o):n+String(o)+t+at(a,2)}function ct(e,t){return e%60==0?(e>0?"-":"+")+at(Math.abs(e)/60,2):dt(e,t)}function dt(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+at(Math.trunc(r/60),2)+t+at(r%60,2)}const ut=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},ft=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},ht={p:ft,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return ut(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;default:a=t.dateTime({width:"full"})}return a.replace("{{date}}",ut(r,t)).replace("{{time}}",ft(o,t))}},mt=/^D+$/,pt=/^Y+$/,gt=["D","DD","YY","YYYY"];function vt(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}function yt(e){if(!vt(e)&&"number"!=typeof e)return!1;const t=Ye(e);return!isNaN(Number(t))}const bt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,xt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,wt=/^'([^]*?)'?$/,kt=/''/g,St=/[a-zA-Z]/;function Ct(e,t,n){const r=$e(),o=n?.locale??r.locale??We,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,s=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=Ye(e);if(!yt(i))throw new RangeError("Invalid time value");let l=t.match(xt).map((e=>{const t=e[0];return"p"===t||"P"===t?(0,ht[t])(e,o.formatLong):e})).join("").match(bt).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:_t(e)};if(it[t])return{isToken:!0,value:e};if(t.match(St))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));o.localize.preprocessor&&(l=o.localize.preprocessor(i,l));const c={firstWeekContainsDate:a,weekStartsOn:s,locale:o};return l.map((r=>{if(!r.isToken)return r.value;const a=r.value;return(!n?.useAdditionalWeekYearTokens&&function(e){return pt.test(e)}(a)||!n?.useAdditionalDayOfYearTokens&&function(e){return mt.test(e)}(a))&&function(e,t,n){const r=function(e,t,n){const r="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,n);if(console.warn(r),gt.includes(e))throw new RangeError(r)}(a,t,String(e)),(0,it[a[0]])(i,a,o.localize,c)})).join("")}function _t(e){const t=e.match(wt);return t?t[1].replace(kt,"'"):e}function jt(e,t,n){const r=Object.assign({},$e()),o=function(e,t,n){return new Intl.DateTimeFormat(n?[n.code,"en-US"]:void 0,{timeZone:t,timeZoneName:e})}(e,n.timeZone,n.locale??r.locale);return"formatToParts"in o?function(e,t){const n=e.formatToParts(t);for(let e=n.length-1;e>=0;--e)if("timeZoneName"===n[e].type)return n[e].value}(o,t):function(e,t){const n=e.format(t).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(n);return r?r[0].substr(1):""}(o,t)}const Et={year:0,month:1,day:2,hour:3,minute:4,second:5},Nt={},Dt=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),Tt="06/25/2014, 00:00:00"===Dt||"‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00"===Dt;function At(e,t,n,r,o,a,s){const i=new Date(0);return i.setUTCFullYear(e,t,n),i.setUTCHours(r,o,a,s),i}const Rt=36e5,Mt={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function Ot(e,t,n){if(!e)return 0;let r,o,a=Mt.timezoneZ.exec(e);if(a)return 0;if(a=Mt.timezoneHH.exec(e),a)return r=parseInt(a[1],10),Pt(r)?-r*Rt:NaN;if(a=Mt.timezoneHHMM.exec(e),a){r=parseInt(a[2],10);const e=parseInt(a[3],10);return Pt(r,e)?(o=Math.abs(r)*Rt+6e4*e,"+"===a[1]?-o:o):NaN}if(function(e){if(Lt[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),Lt[e]=!0,!0}catch(e){return!1}}(e)){t=new Date(t||Date.now());const r=n?t:function(e){return At(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}(t),o=It(r,e),a=n?o:function(e,t,n){let r=e.getTime()-t;const o=It(new Date(r),n);if(t===o)return t;r-=o-t;const a=It(new Date(r),n);return o===a?o:Math.max(o,a)}(t,o,e);return-a}return NaN}function It(e,t){const n=function(e,t){const n=function(e){return Nt[e]||(Nt[e]=Tt?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),Nt[e]}(t);return"formatToParts"in n?function(e,t){try{const n=e.formatToParts(t),r=[];for(let e=0;e<n.length;e++){const t=Et[n[e].type];void 0!==t&&(r[t]=parseInt(n[e].value,10))}return r}catch(e){if(e instanceof RangeError)return[NaN];throw e}}(n,e):function(e,t){const n=e.format(t),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[parseInt(r[3],10),parseInt(r[1],10),parseInt(r[2],10),parseInt(r[4],10),parseInt(r[5],10),parseInt(r[6],10)]}(n,e)}(e,t),r=At(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime();let o=e.getTime();const a=o%1e3;return o-=a>=0?a:1e3+a,r-o}function Pt(e,t){return-23<=e&&e<=23&&(null==t||0<=t&&t<=59)}const Lt={},Ft={X:function(e,t,n){const r=zt(n.timeZone,e);if(0===r)return"Z";switch(t){case"X":return Bt(r);case"XXXX":case"XX":return Vt(r);default:return Vt(r,":")}},x:function(e,t,n){const r=zt(n.timeZone,e);switch(t){case"x":return Bt(r);case"xxxx":case"xx":return Vt(r);default:return Vt(r,":")}},O:function(e,t,n){const r=zt(n.timeZone,e);switch(t){case"O":case"OO":case"OOO":return"GMT"+function(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),a=r%60;return 0===a?n+String(o):n+String(o)+t+Ht(a,2)}(r,":");default:return"GMT"+Vt(r,":")}},z:function(e,t,n){switch(t){case"z":case"zz":case"zzz":return jt("short",e,n);default:return jt("long",e,n)}}};function zt(e,t){const n=e?Ot(e,t,!0)/6e4:t?.getTimezoneOffset()??0;if(Number.isNaN(n))throw new RangeError("Invalid time zone specified: "+e);return n}function Ht(e,t){const n=e<0?"-":"";let r=Math.abs(e).toString();for(;r.length<t;)r="0"+r;return n+r}function Vt(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+Ht(Math.floor(r/60),2)+t+Ht(Math.floor(r%60),2)}function Bt(e,t){return e%60==0?(e>0?"-":"+")+Ht(Math.abs(e)/60,2):Vt(e,t)}function Wt(e){const t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+e-+t}const Ut=36e5,$t={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/};function Gt(e,t={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(null===e)return new Date(NaN);const n=null==t.additionalDigits?2:Number(t.additionalDigits);if(2!==n&&1!==n&&0!==n)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e))return new Date(e.getTime());if("number"==typeof e||"[object Number]"===Object.prototype.toString.call(e))return new Date(e);if("[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);const r=function(e){const t={};let n,r=$t.dateTimePattern.exec(e);if(r?(t.date=r[1],n=r[3]):(r=$t.datePattern.exec(e),r?(t.date=r[1],n=r[2]):(t.date=null,n=e)),n){const e=$t.timeZone.exec(n);e?(t.time=n.replace(e[1],""),t.timeZone=e[1].trim()):t.time=n}return t}(e),{year:o,restDateString:a}=function(e,t){if(e){const n=$t.YYY[t],r=$t.YYYYY[t];let o=$t.YYYY.exec(e)||r.exec(e);if(o){const t=o[1];return{year:parseInt(t,10),restDateString:e.slice(t.length)}}if(o=$t.YY.exec(e)||n.exec(e),o){const t=o[1];return{year:100*parseInt(t,10),restDateString:e.slice(t.length)}}}return{year:null}}(r.date,n),s=function(e,t){if(null===t)return null;let n,r,o;if(!e||!e.length)return n=new Date(0),n.setUTCFullYear(t),n;let a=$t.MM.exec(e);if(a)return n=new Date(0),r=parseInt(a[1],10)-1,Qt(t,r)?(n.setUTCFullYear(t,r),n):new Date(NaN);if(a=$t.DDD.exec(e),a){n=new Date(0);const e=parseInt(a[1],10);return function(e,t){if(t<1)return!1;const n=Kt(e);return!(n&&t>366)&&!(!n&&t>365)}(t,e)?(n.setUTCFullYear(t,0,e),n):new Date(NaN)}if(a=$t.MMDD.exec(e),a){n=new Date(0),r=parseInt(a[1],10)-1;const e=parseInt(a[2],10);return Qt(t,r,e)?(n.setUTCFullYear(t,r,e),n):new Date(NaN)}if(a=$t.Www.exec(e),a)return o=parseInt(a[1],10)-1,Jt(o)?Yt(t,o):new Date(NaN);if(a=$t.WwwD.exec(e),a){o=parseInt(a[1],10)-1;const e=parseInt(a[2],10)-1;return Jt(o,e)?Yt(t,o,e):new Date(NaN)}return null}(a,o);if(null===s||isNaN(s.getTime()))return new Date(NaN);if(s){const e=s.getTime();let n,o=0;if(r.time&&(o=function(e){let t,n,r=$t.HH.exec(e);if(r)return t=parseFloat(r[1].replace(",",".")),Xt(t)?t%24*Ut:NaN;if(r=$t.HHMM.exec(e),r)return t=parseInt(r[1],10),n=parseFloat(r[2].replace(",",".")),Xt(t,n)?t%24*Ut+6e4*n:NaN;if(r=$t.HHMMSS.exec(e),r){t=parseInt(r[1],10),n=parseInt(r[2],10);const e=parseFloat(r[3].replace(",","."));return Xt(t,n,e)?t%24*Ut+6e4*n+1e3*e:NaN}return null}(r.time),null===o||isNaN(o)))return new Date(NaN);if(r.timeZone||t.timeZone){if(n=Ot(r.timeZone||t.timeZone,new Date(e+o)),isNaN(n))return new Date(NaN)}else n=Wt(new Date(e+o)),n=Wt(new Date(e+o+n));return new Date(e+o+n)}return new Date(NaN)}function Yt(e,t,n){t=t||0,n=n||0;const r=new Date(0);r.setUTCFullYear(e,0,4);const o=7*t+n+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+o),r}const qt=[31,28,31,30,31,30,31,31,30,31,30,31],Zt=[31,29,31,30,31,30,31,31,30,31,30,31];function Kt(e){return e%400==0||e%4==0&&e%100!=0}function Qt(e,t,n){if(t<0||t>11)return!1;if(null!=n){if(n<1)return!1;const r=Kt(e);if(r&&n>Zt[t])return!1;if(!r&&n>qt[t])return!1}return!0}function Jt(e,t){return!(e<0||e>52||null!=t&&(t<0||t>6))}function Xt(e,t,n){return!(e<0||e>=25||null!=t&&(t<0||t>=60)||null!=n&&(n<0||n>=60))}const en=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function tn(e,t,n,r){return function(e,t,n={}){const r=(t=String(t)).match(en);if(r){const o=Gt(n.originalDate||e,n);t=r.reduce((function(e,t){if("'"===t[0])return e;const r=e.indexOf(t),a="'"===e[r-1],s=e.replace(t,"'"+Ft[t[0]](o,t,n)+"'");return a?s.substring(0,r-1)+s.substring(r+1):s}),t)}return Ct(e,t,n)}(function(e,t,n){const r=Ot(t,e=Gt(e,n),!0),o=new Date(e.getTime()-r),a=new Date(0);return a.setFullYear(o.getUTCFullYear(),o.getUTCMonth(),o.getUTCDate()),a.setHours(o.getUTCHours(),o.getUTCMinutes(),o.getUTCSeconds(),o.getUTCMilliseconds()),a}(e,t,{timeZone:(r={...r,timeZone:t,originalDate:e}).timeZone}),n,r)}class nn extends Error{}class rn extends nn{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class on extends nn{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class an extends nn{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class sn extends nn{}class ln extends nn{constructor(e){super(`Invalid unit ${e}`)}}class cn extends nn{}class dn extends nn{constructor(){super("Zone is an abstract class")}}const un="numeric",fn="short",hn="long",mn={year:un,month:un,day:un},pn={year:un,month:fn,day:un},gn={year:un,month:fn,day:un,weekday:fn},vn={year:un,month:hn,day:un},yn={year:un,month:hn,day:un,weekday:hn},bn={hour:un,minute:un},xn={hour:un,minute:un,second:un},wn={hour:un,minute:un,second:un,timeZoneName:fn},kn={hour:un,minute:un,second:un,timeZoneName:hn},Sn={hour:un,minute:un,hourCycle:"h23"},Cn={hour:un,minute:un,second:un,hourCycle:"h23"},jn={hour:un,minute:un,second:un,hourCycle:"h23",timeZoneName:fn},En={hour:un,minute:un,second:un,hourCycle:"h23",timeZoneName:hn},Nn={year:un,month:un,day:un,hour:un,minute:un},Dn={year:un,month:un,day:un,hour:un,minute:un,second:un},Tn={year:un,month:fn,day:un,hour:un,minute:un},An={year:un,month:fn,day:un,hour:un,minute:un,second:un},Rn={year:un,month:fn,day:un,weekday:fn,hour:un,minute:un},Mn={year:un,month:hn,day:un,hour:un,minute:un,timeZoneName:fn},On={year:un,month:hn,day:un,hour:un,minute:un,second:un,timeZoneName:fn},In={year:un,month:hn,day:un,weekday:hn,hour:un,minute:un,timeZoneName:hn},Pn={year:un,month:hn,day:un,weekday:hn,hour:un,minute:un,second:un,timeZoneName:hn};class Ln{get type(){throw new dn}get name(){throw new dn}get ianaName(){return this.name}get isUniversal(){throw new dn}offsetName(e,t){throw new dn}formatOffset(e,t){throw new dn}offset(e){throw new dn}equals(e){throw new dn}get isValid(){throw new dn}}let Fn=null;class zn extends Ln{static get instance(){return null===Fn&&(Fn=new zn),Fn}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return ao(e,t,n)}formatOffset(e,t){return co(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return"system"===e.type}get isValid(){return!0}}const Hn=new Map,Vn={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6},Bn=new Map;class Wn extends Ln{static create(e){let t=Bn.get(e);return void 0===t&&Bn.set(e,t=new Wn(e)),t}static resetCache(){Bn.clear(),Hn.clear()}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}}constructor(e){super(),this.zoneName=e,this.valid=Wn.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return ao(e,t,n,this.name)}formatOffset(e,t){return co(this.offset(e),t)}offset(e){if(!this.valid)return NaN;const t=new Date(e);if(isNaN(t))return NaN;const n=function(e){let t=Hn.get(e);return void 0===t&&(t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),Hn.set(e,t)),t}(this.name);let[r,o,a,s,i,l,c]=n.formatToParts?function(e,t){const n=e.formatToParts(t),r=[];for(let e=0;e<n.length;e++){const{type:t,value:o}=n[e],a=Vn[t];"era"===t?r[a]=o:Fr(a)||(r[a]=parseInt(o,10))}return r}(n,t):function(e,t){const n=e.format(t).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,o,a,s,i,l,c,d]=r;return[s,o,a,i,l,c,d]}(n,t);"BC"===s&&(r=1-Math.abs(r));let d=+t;const u=d%1e3;return d-=u>=0?u:1e3+u,(to({year:r,month:o,day:a,hour:24===i?0:i,minute:l,second:c,millisecond:0})-d)/6e4}equals(e){return"iana"===e.type&&e.name===this.name}get isValid(){return this.valid}}let Un={};const $n=new Map;function Gn(e,t={}){const n=JSON.stringify([e,t]);let r=$n.get(n);return void 0===r&&(r=new Intl.DateTimeFormat(e,t),$n.set(n,r)),r}const Yn=new Map,qn=new Map;let Zn=null;const Kn=new Map;function Qn(e){let t=Kn.get(e);return void 0===t&&(t=new Intl.DateTimeFormat(e).resolvedOptions(),Kn.set(e,t)),t}const Jn=new Map;function Xn(e,t,n,r){const o=e.listingMode();return"error"===o?null:"en"===o?n(t):r(t)}class er{constructor(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;const{padTo:r,floor:o,...a}=n;if(!t||Object.keys(a).length>0){const t={useGrouping:!1,...n};n.padTo>0&&(t.minimumIntegerDigits=n.padTo),this.inf=function(e,t={}){const n=JSON.stringify([e,t]);let r=Yn.get(n);return void 0===r&&(r=new Intl.NumberFormat(e,t),Yn.set(n,r)),r}(e,t)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}return Yr(this.floor?Math.floor(e):Qr(e,3),this.padTo)}}class tr{constructor(e,t,n){let r;if(this.opts=n,this.originalZone=void 0,this.opts.timeZone)this.dt=e;else if("fixed"===e.zone.type){const t=e.offset/60*-1,n=t>=0?`Etc/GMT+${t}`:`Etc/GMT${t}`;0!==e.offset&&Wn.create(n).valid?(r=n,this.dt=e):(r="UTC",this.dt=0===e.offset?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else"system"===e.zone.type?this.dt=e:"iana"===e.zone.type?(this.dt=e,r=e.zone.name):(r="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const o={...this.opts};o.timeZone=o.timeZone||r,this.dtf=Gn(t,o)}format(){return this.originalZone?this.formatToParts().map((({value:e})=>e)).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map((e=>{if("timeZoneName"===e.type){const t=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...e,value:t}}return e})):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class nr{constructor(e,t,n){this.opts={style:"long",...n},!t&&Vr()&&(this.rtf=function(e,t={}){const{base:n,...r}=t,o=JSON.stringify([e,r]);let a=qn.get(o);return void 0===a&&(a=new Intl.RelativeTimeFormat(e,t),qn.set(o,a)),a}(e,n))}format(e,t){return this.rtf?this.rtf.format(e,t):function(e,t,n="always",r=!1){const o={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},a=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&a){const n="days"===e;switch(t){case 1:return n?"tomorrow":`next ${o[e][0]}`;case-1:return n?"yesterday":`last ${o[e][0]}`;case 0:return n?"today":`this ${o[e][0]}`}}const s=Object.is(t,-0)||t<0,i=Math.abs(t),l=1===i,c=o[e],d=r?l?c[1]:c[2]||c[1]:l?o[e][0]:e;return s?`${i} ${d} ago`:`in ${i} ${d}`}(t,e,this.opts.numeric,"long"!==this.opts.style)}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}const rr={firstDay:1,minimalDays:4,weekend:[6,7]};class or{static fromOpts(e){return or.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,n,r,o=!1){const a=e||kr.defaultLocale,s=a||(o?"en-US":Zn||(Zn=(new Intl.DateTimeFormat).resolvedOptions().locale,Zn)),i=t||kr.defaultNumberingSystem,l=n||kr.defaultOutputCalendar,c=$r(r)||kr.defaultWeekSettings;return new or(s,i,l,c,a)}static resetCache(){Zn=null,$n.clear(),Yn.clear(),qn.clear(),Kn.clear(),Jn.clear()}static fromObject({locale:e,numberingSystem:t,outputCalendar:n,weekSettings:r}={}){return or.create(e,t,n,r)}constructor(e,t,n,r,o){const[a,s,i]=function(e){const t=e.indexOf("-x-");-1!==t&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(-1===n)return[e];{let t,r;try{t=Gn(e).resolvedOptions(),r=e}catch(o){const a=e.substring(0,n);t=Gn(a).resolvedOptions(),r=a}const{numberingSystem:o,calendar:a}=t;return[r,o,a]}}(e);this.locale=a,this.numberingSystem=t||s||null,this.outputCalendar=n||i||null,this.weekSettings=r,this.intl=function(e,t,n){return n||t?(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`),e):e}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=o,this.fastNumbersCached=null}get fastNumbers(){var e;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(e=this).numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||"latn"===Qn(e.locale).numberingSystem)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return e&&t?"en":"intl"}clone(e){return e&&0!==Object.getOwnPropertyNames(e).length?or.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,$r(e.weekSettings)||this.weekSettings,e.defaultToEN||!1):this}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return Xn(this,e,po,(()=>{const n="ja"===this.intl||this.intl.startsWith("ja-"),r=(t&=!n)?{month:e,day:"numeric"}:{month:e},o=t?"format":"standalone";if(!this.monthsCache[o][e]){const t=n?e=>this.dtFormatter(e,r).format():e=>this.extract(e,r,"month");this.monthsCache[o][e]=function(e){const t=[];for(let n=1;n<=12;n++){const r=vs.utc(2009,n,1);t.push(e(r))}return t}(t)}return this.monthsCache[o][e]}))}weekdays(e,t=!1){return Xn(this,e,bo,(()=>{const n=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},r=t?"format":"standalone";return this.weekdaysCache[r][e]||(this.weekdaysCache[r][e]=function(e){const t=[];for(let n=1;n<=7;n++){const r=vs.utc(2016,11,13+n);t.push(e(r))}return t}((e=>this.extract(e,n,"weekday")))),this.weekdaysCache[r][e]}))}meridiems(){return Xn(this,void 0,(()=>xo),(()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[vs.utc(2016,11,13,9),vs.utc(2016,11,13,19)].map((t=>this.extract(t,e,"dayperiod")))}return this.meridiemCache}))}eras(e){return Xn(this,e,Co,(()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[vs.utc(-40,1,1),vs.utc(2017,1,1)].map((e=>this.extract(e,t,"era")))),this.eraCache[e]}))}extract(e,t,n){const r=this.dtFormatter(e,t).formatToParts().find((e=>e.type.toLowerCase()===n));return r?r.value:null}numberFormatter(e={}){return new er(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new tr(e,this.intl,t)}relFormatter(e={}){return new nr(this.intl,this.isEnglish(),e)}listFormatter(e={}){return function(e,t={}){const n=JSON.stringify([e,t]);let r=Un[n];return r||(r=new Intl.ListFormat(e,t),Un[n]=r),r}(this.intl,e)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||Qn(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Br()?function(e){let t=Jn.get(e);if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,"minimalDays"in t||(t={...rr,...t}),Jn.set(e,t)}return t}(this.locale):rr}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let ar=null;class sr extends Ln{static get utcInstance(){return null===ar&&(ar=new sr(0)),ar}static instance(e){return 0===e?sr.utcInstance:new sr(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new sr(so(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${co(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${co(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return co(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return"fixed"===e.type&&e.fixed===this.fixed}get isValid(){return!0}}class ir extends Ln{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function lr(e,t){if(Fr(e)||null===e)return t;if(e instanceof Ln)return e;if("string"==typeof e){const n=e.toLowerCase();return"default"===n?t:"local"===n||"system"===n?zn.instance:"utc"===n||"gmt"===n?sr.utcInstance:sr.parseSpecifier(n)||Wn.create(e)}return zr(e)?sr.instance(e):"object"==typeof e&&"offset"in e&&"function"==typeof e.offset?e:new ir(e)}const cr={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},dr={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},ur=cr.hanidec.replace(/[\[|\]]/g,"").split(""),fr=new Map;function hr({numberingSystem:e},t=""){const n=e||"latn";let r=fr.get(n);void 0===r&&(r=new Map,fr.set(n,r));let o=r.get(t);return void 0===o&&(o=new RegExp(`${cr[n]}${t}`),r.set(t,o)),o}let mr,pr=()=>Date.now(),gr="system",vr=null,yr=null,br=null,xr=60,wr=null;class kr{static get now(){return pr}static set now(e){pr=e}static set defaultZone(e){gr=e}static get defaultZone(){return lr(gr,zn.instance)}static get defaultLocale(){return vr}static set defaultLocale(e){vr=e}static get defaultNumberingSystem(){return yr}static set defaultNumberingSystem(e){yr=e}static get defaultOutputCalendar(){return br}static set defaultOutputCalendar(e){br=e}static get defaultWeekSettings(){return wr}static set defaultWeekSettings(e){wr=$r(e)}static get twoDigitCutoffYear(){return xr}static set twoDigitCutoffYear(e){xr=e%100}static get throwOnInvalid(){return mr}static set throwOnInvalid(e){mr=e}static resetCaches(){or.resetCache(),Wn.resetCache(),vs.resetCache(),fr.clear()}}class Sr{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Cr=[0,31,59,90,120,151,181,212,243,273,304,334],_r=[0,31,60,91,121,152,182,213,244,274,305,335];function jr(e,t){return new Sr("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function Er(e,t,n){const r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const o=r.getUTCDay();return 0===o?7:o}function Nr(e,t,n){return n+(Jr(e)?_r:Cr)[t-1]}function Dr(e,t){const n=Jr(e)?_r:Cr,r=n.findIndex((e=>e<t));return{month:r+1,day:t-n[r]}}function Tr(e,t){return(e-t+7)%7+1}function Ar(e,t=4,n=1){const{year:r,month:o,day:a}=e,s=Nr(r,o,a),i=Tr(Er(r,o,a),n);let l,c=Math.floor((s-i+14-t)/7);return c<1?(l=r-1,c=ro(l,t,n)):c>ro(r,t,n)?(l=r+1,c=1):l=r,{weekYear:l,weekNumber:c,weekday:i,...uo(e)}}function Rr(e,t=4,n=1){const{weekYear:r,weekNumber:o,weekday:a}=e,s=Tr(Er(r,1,t),n),i=Xr(r);let l,c=7*o+a-s-7+t;c<1?(l=r-1,c+=Xr(l)):c>i?(l=r+1,c-=Xr(r)):l=r;const{month:d,day:u}=Dr(l,c);return{year:l,month:d,day:u,...uo(e)}}function Mr(e){const{year:t,month:n,day:r}=e;return{year:t,ordinal:Nr(t,n,r),...uo(e)}}function Or(e){const{year:t,ordinal:n}=e,{month:r,day:o}=Dr(t,n);return{year:t,month:r,day:o,...uo(e)}}function Ir(e,t){if(!Fr(e.localWeekday)||!Fr(e.localWeekNumber)||!Fr(e.localWeekYear)){if(!Fr(e.weekday)||!Fr(e.weekNumber)||!Fr(e.weekYear))throw new sn("Cannot mix locale-based week fields with ISO-based week fields");return Fr(e.localWeekday)||(e.weekday=e.localWeekday),Fr(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),Fr(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}return{minDaysInFirstWeek:4,startOfWeek:1}}function Pr(e){const t=Hr(e.year),n=Gr(e.month,1,12),r=Gr(e.day,1,eo(e.year,e.month));return t?n?!r&&jr("day",e.day):jr("month",e.month):jr("year",e.year)}function Lr(e){const{hour:t,minute:n,second:r,millisecond:o}=e,a=Gr(t,0,23)||24===t&&0===n&&0===r&&0===o,s=Gr(n,0,59),i=Gr(r,0,59),l=Gr(o,0,999);return a?s?i?!l&&jr("millisecond",o):jr("second",r):jr("minute",n):jr("hour",t)}function Fr(e){return void 0===e}function zr(e){return"number"==typeof e}function Hr(e){return"number"==typeof e&&e%1==0}function Vr(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function Br(){try{return"undefined"!=typeof Intl&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch(e){return!1}}function Wr(e,t,n){if(0!==e.length)return e.reduce(((e,r)=>{const o=[t(r),r];return e&&n(e[0],o[0])===e[0]?e:o}),null)[1]}function Ur(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function $r(e){if(null==e)return null;if("object"!=typeof e)throw new cn("Week settings must be an object");if(!Gr(e.firstDay,1,7)||!Gr(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some((e=>!Gr(e,1,7))))throw new cn("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function Gr(e,t,n){return Hr(e)&&e>=t&&e<=n}function Yr(e,t=2){let n;return n=e<0?"-"+(""+-e).padStart(t,"0"):(""+e).padStart(t,"0"),n}function qr(e){return Fr(e)||null===e||""===e?void 0:parseInt(e,10)}function Zr(e){return Fr(e)||null===e||""===e?void 0:parseFloat(e)}function Kr(e){if(!Fr(e)&&null!==e&&""!==e){const t=1e3*parseFloat("0."+e);return Math.floor(t)}}function Qr(e,t,n="round"){const r=10**t;switch(n){case"expand":return e>0?Math.ceil(e*r)/r:Math.floor(e*r)/r;case"trunc":return Math.trunc(e*r)/r;case"round":return Math.round(e*r)/r;case"floor":return Math.floor(e*r)/r;case"ceil":return Math.ceil(e*r)/r;default:throw new RangeError(`Value rounding ${n} is out of range`)}}function Jr(e){return e%4==0&&(e%100!=0||e%400==0)}function Xr(e){return Jr(e)?366:365}function eo(e,t){const n=function(e){return e-12*Math.floor(e/12)}(t-1)+1;return 2===n?Jr(e+(t-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function to(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function no(e,t,n){return-Tr(Er(e,1,t),n)+t-1}function ro(e,t=4,n=1){const r=no(e,t,n),o=no(e+1,t,n);return(Xr(e)-r+o)/7}function oo(e){return e>99?e:e>kr.twoDigitCutoffYear?1900+e:2e3+e}function ao(e,t,n,r=null){const o=new Date(e),a={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(a.timeZone=r);const s={timeZoneName:t,...a},i=new Intl.DateTimeFormat(n,s).formatToParts(o).find((e=>"timezonename"===e.type.toLowerCase()));return i?i.value:null}function so(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const r=parseInt(t,10)||0;return 60*n+(n<0||Object.is(n,-0)?-r:r)}function io(e){const t=Number(e);if("boolean"==typeof e||""===e||!Number.isFinite(t))throw new cn(`Invalid unit value ${e}`);return t}function lo(e,t){const n={};for(const r in e)if(Ur(e,r)){const o=e[r];if(null==o)continue;n[t(r)]=io(o)}return n}function co(e,t){const n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),o=e>=0?"+":"-";switch(t){case"short":return`${o}${Yr(n,2)}:${Yr(r,2)}`;case"narrow":return`${o}${n}${r>0?`:${r}`:""}`;case"techie":return`${o}${Yr(n,2)}${Yr(r,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function uo(e){return function(e){return["hour","minute","second","millisecond"].reduce(((t,n)=>(t[n]=e[n],t)),{})}(e)}const fo=["January","February","March","April","May","June","July","August","September","October","November","December"],ho=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],mo=["J","F","M","A","M","J","J","A","S","O","N","D"];function po(e){switch(e){case"narrow":return[...mo];case"short":return[...ho];case"long":return[...fo];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const go=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],vo=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],yo=["M","T","W","T","F","S","S"];function bo(e){switch(e){case"narrow":return[...yo];case"short":return[...vo];case"long":return[...go];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const xo=["AM","PM"],wo=["Before Christ","Anno Domini"],ko=["BC","AD"],So=["B","A"];function Co(e){switch(e){case"narrow":return[...So];case"short":return[...ko];case"long":return[...wo];default:return null}}function _o(e,t){let n="";for(const r of e)r.literal?n+=r.val:n+=t(r.val);return n}const jo={D:mn,DD:pn,DDD:vn,DDDD:yn,t:bn,tt:xn,ttt:wn,tttt:kn,T:Sn,TT:Cn,TTT:jn,TTTT:En,f:Nn,ff:Tn,fff:Mn,ffff:In,F:Dn,FF:An,FFF:On,FFFF:Pn};class Eo{static create(e,t={}){return new Eo(e,t)}static parseFormat(e){let t=null,n="",r=!1;const o=[];for(let a=0;a<e.length;a++){const s=e.charAt(a);"'"===s?((n.length>0||r)&&o.push({literal:r||/^\s+$/.test(n),val:""===n?"'":n}),t=null,n="",r=!r):r||s===t?n+=s:(n.length>0&&o.push({literal:/^\s+$/.test(n),val:n}),n=s,t=s)}return n.length>0&&o.push({literal:r||/^\s+$/.test(n),val:n}),o}static macroTokenToFormatOpts(e){return jo[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0,n=void 0){if(this.opts.forceSimple)return Yr(e,t);const r={...this.opts};return t>0&&(r.padTo=t),n&&(r.signDisplay=n),this.loc.numberFormatter(r).format(e)}formatDateTimeFromString(e,t){const n="en"===this.loc.listingMode(),r=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,o=(t,n)=>this.loc.extract(e,t,n),a=t=>e.isOffsetFixed&&0===e.offset&&t.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,t.format):"",s=(t,r)=>n?function(e,t){return po(t)[e.month-1]}(e,t):o(r?{month:t}:{month:t,day:"numeric"},"month"),i=(t,r)=>n?function(e,t){return bo(t)[e.weekday-1]}(e,t):o(r?{weekday:t}:{weekday:t,month:"long",day:"numeric"},"weekday"),l=t=>{const n=Eo.macroTokenToFormatOpts(t);return n?this.formatWithSystemDefault(e,n):t},c=t=>n?function(e,t){return Co(t)[e.year<0?0:1]}(e,t):o({era:t},"era");return _o(Eo.parseFormat(t),(t=>{switch(t){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12==0?12:e.hour%12);case"hh":return this.num(e.hour%12==0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return a({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return a({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return a({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return n?function(e){return xo[e.hour<12?0:1]}(e):o({hour:"numeric",hourCycle:"h12"},"dayperiod");case"d":return r?o({day:"numeric"},"day"):this.num(e.day);case"dd":return r?o({day:"2-digit"},"day"):this.num(e.day,2);case"c":case"E":return this.num(e.weekday);case"ccc":return i("short",!0);case"cccc":return i("long",!0);case"ccccc":return i("narrow",!0);case"EEE":return i("short",!1);case"EEEE":return i("long",!1);case"EEEEE":return i("narrow",!1);case"L":return r?o({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return r?o({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return s("short",!0);case"LLLL":return s("long",!0);case"LLLLL":return s("narrow",!0);case"M":return r?o({month:"numeric"},"month"):this.num(e.month);case"MM":return r?o({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return s("short",!1);case"MMMM":return s("long",!1);case"MMMMM":return s("narrow",!1);case"y":return r?o({year:"numeric"},"year"):this.num(e.year);case"yy":return r?o({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return r?o({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return r?o({year:"numeric"},"year"):this.num(e.year,6);case"G":return c("short");case"GG":return c("long");case"GGGGG":return c("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return l(t)}}))}formatDurationFromString(e,t){const n="negativeLargestOnly"===this.opts.signMode?-1:1,r=e=>{switch(e[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},o=Eo.parseFormat(t),a=o.reduce(((e,{literal:t,val:n})=>t?e:e.concat(n)),[]),s=e.shiftTo(...a.map(r).filter((e=>e)));return _o(o,((e,t)=>o=>{const a=r(o);if(a){const r=t.isNegativeDuration&&a!==t.largestUnit?n:1;let s;return s="negativeLargestOnly"===this.opts.signMode&&a!==t.largestUnit?"never":"all"===this.opts.signMode?"always":"auto",this.num(e.get(a)*r,o.length,s)}return o})(s,{isNegativeDuration:s<0,largestUnit:Object.keys(s.values)[0]}))}}const No=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Do(...e){const t=e.reduce(((e,t)=>e+t.source),"");return RegExp(`^${t}$`)}function To(...e){return t=>e.reduce((([e,n,r],o)=>{const[a,s,i]=o(t,r);return[{...e,...a},s||n,i]}),[{},null,1]).slice(0,2)}function Ao(e,...t){if(null==e)return[null,null];for(const[n,r]of t){const t=n.exec(e);if(t)return r(t)}return[null,null]}function Ro(...e){return(t,n)=>{const r={};let o;for(o=0;o<e.length;o++)r[e[o]]=qr(t[n+o]);return[r,null,n+o]}}const Mo=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,Oo=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Io=RegExp(`${Oo.source}(?:${Mo.source}?(?:\\[(${No.source})\\])?)?`),Po=RegExp(`(?:[Tt]${Io.source})?`),Lo=Ro("weekYear","weekNumber","weekDay"),Fo=Ro("year","ordinal"),zo=RegExp(`${Oo.source} ?(?:${Mo.source}|(${No.source}))?`),Ho=RegExp(`(?: ${zo.source})?`);function Vo(e,t,n){const r=e[t];return Fr(r)?n:qr(r)}function Bo(e,t){return[{hours:Vo(e,t,0),minutes:Vo(e,t+1,0),seconds:Vo(e,t+2,0),milliseconds:Kr(e[t+3])},null,t+4]}function Wo(e,t){const n=!e[t]&&!e[t+1],r=so(e[t+1],e[t+2]);return[{},n?null:sr.instance(r),t+3]}function Uo(e,t){return[{},e[t]?Wn.create(e[t]):null,t+1]}const $o=RegExp(`^T?${Oo.source}$`),Go=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function Yo(e){const[t,n,r,o,a,s,i,l,c]=e,d="-"===t[0],u=l&&"-"===l[0],f=(e,t=!1)=>void 0!==e&&(t||e&&d)?-e:e;return[{years:f(Zr(n)),months:f(Zr(r)),weeks:f(Zr(o)),days:f(Zr(a)),hours:f(Zr(s)),minutes:f(Zr(i)),seconds:f(Zr(l),"-0"===l),milliseconds:f(Kr(c),u)}]}const qo={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Zo(e,t,n,r,o,a,s){const i={year:2===t.length?oo(qr(t)):qr(t),month:ho.indexOf(n)+1,day:qr(r),hour:qr(o),minute:qr(a)};return s&&(i.second=qr(s)),e&&(i.weekday=e.length>3?go.indexOf(e)+1:vo.indexOf(e)+1),i}const Ko=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Qo(e){const[,t,n,r,o,a,s,i,l,c,d,u]=e,f=Zo(t,o,r,n,a,s,i);let h;return h=l?qo[l]:c?0:so(d,u),[f,new sr(h)]}const Jo=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Xo=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,ea=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function ta(e){const[,t,n,r,o,a,s,i]=e;return[Zo(t,o,r,n,a,s,i),sr.utcInstance]}function na(e){const[,t,n,r,o,a,s,i]=e;return[Zo(t,i,n,r,o,a,s),sr.utcInstance]}const ra=Do(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Po),oa=Do(/(\d{4})-?W(\d\d)(?:-?(\d))?/,Po),aa=Do(/(\d{4})-?(\d{3})/,Po),sa=Do(Io),ia=To((function(e,t){return[{year:Vo(e,t),month:Vo(e,t+1,1),day:Vo(e,t+2,1)},null,t+3]}),Bo,Wo,Uo),la=To(Lo,Bo,Wo,Uo),ca=To(Fo,Bo,Wo,Uo),da=To(Bo,Wo,Uo),ua=To(Bo),fa=Do(/(\d{4})-(\d\d)-(\d\d)/,Ho),ha=Do(zo),ma=To(Bo,Wo,Uo),pa="Invalid Duration",ga={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},va={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6},...ga},ya={years:{quarters:4,months:12,weeks:52.1775,days:365.2425,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:4.3481250000000005,days:30.436875,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...ga},ba=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],xa=ba.slice(0).reverse();function wa(e,t,n=!1){const r={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new _a(r)}function ka(e,t){let n=t.milliseconds??0;for(const r of xa.slice(1))t[r]&&(n+=t[r]*e[r].milliseconds);return n}function Sa(e,t){const n=ka(e,t)<0?-1:1;ba.reduceRight(((r,o)=>{if(Fr(t[o]))return r;if(r){const a=t[r]*n,s=e[o][r],i=Math.floor(a/s);t[o]+=i*n,t[r]-=i*s*n}return o}),null),ba.reduce(((n,r)=>{if(Fr(t[r]))return n;if(n){const o=t[n]%1;t[n]-=o,t[r]+=o*e[n][r]}return r}),null)}function Ca(e){const t={};for(const[n,r]of Object.entries(e))0!==r&&(t[n]=r);return t}class _a{constructor(e){const t="longterm"===e.conversionAccuracy||!1;let n=t?ya:va;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||or.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(e,t){return _a.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(null==e||"object"!=typeof e)throw new cn("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new _a({values:lo(e,_a.normalizeUnit),loc:or.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(zr(e))return _a.fromMillis(e);if(_a.isDuration(e))return e;if("object"==typeof e)return _a.fromObject(e);throw new cn(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[n]=function(e){return Ao(e,[Go,Yo])}(e);return n?_a.fromObject(n,t):_a.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[n]=function(e){return Ao(e,[$o,ua])}(e);return n?_a.fromObject(n,t):_a.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new cn("need to specify a reason the Duration is invalid");const n=e instanceof Sr?e:new Sr(e,t);if(kr.throwOnInvalid)throw new an(n);return new _a({invalid:n})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e?e.toLowerCase():e];if(!t)throw new ln(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const n={...t,floor:!1!==t.round&&!1!==t.floor};return this.isValid?Eo.create(this.loc,n).formatDurationFromString(this,e):pa}toHuman(e={}){if(!this.isValid)return pa;const t=!1!==e.showZeros,n=ba.map((n=>{const r=this.values[n];return Fr(r)||0===r&&!t?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:n.slice(0,-1)}).format(r)})).filter((e=>e));return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=Qr(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();return t<0||t>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},vs.fromMillis(t,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?ka(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=_a.fromDurationLike(e),n={};for(const e of ba)(Ur(t.values,e)||Ur(this.values,e))&&(n[e]=t.get(e)+this.get(e));return wa(this,{values:n},!0)}minus(e){if(!this.isValid)return this;const t=_a.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=io(e(this.values[n],n));return wa(this,{values:t},!0)}get(e){return this[_a.normalizeUnit(e)]}set(e){return this.isValid?wa(this,{values:{...this.values,...lo(e,_a.normalizeUnit)}}):this}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:n,matrix:r}={}){return wa(this,{loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:r,conversionAccuracy:n})}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return Sa(this.matrix,e),wa(this,{values:e},!0)}rescale(){return this.isValid?wa(this,{values:Ca(this.normalize().shiftToAll().toObject())},!0):this}shiftTo(...e){if(!this.isValid)return this;if(0===e.length)return this;e=e.map((e=>_a.normalizeUnit(e)));const t={},n={},r=this.toObject();let o;for(const a of ba)if(e.indexOf(a)>=0){o=a;let e=0;for(const t in n)e+=this.matrix[t][a]*n[t],n[t]=0;zr(r[a])&&(e+=r[a]);const s=Math.trunc(e);t[a]=s,n[a]=(1e3*e-1e3*s)/1e3}else zr(r[a])&&(n[a]=r[a]);for(const e in n)0!==n[e]&&(t[o]+=e===o?n[e]:n[e]/this.matrix[o][e]);return Sa(this.matrix,t),wa(this,{values:t},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=0===this.values[t]?0:-this.values[t];return wa(this,{values:e},!0)}removeZeros(){return this.isValid?wa(this,{values:Ca(this.values)},!0):this}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;for(const r of ba)if(t=this.values[r],n=e.values[r],!(void 0===t||0===t?void 0===n||0===n:t===n))return!1;var t,n;return!0}}const ja="Invalid Interval";class Ea{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,t=null){if(!e)throw new cn("need to specify a reason the Interval is invalid");const n=e instanceof Sr?e:new Sr(e,t);if(kr.throwOnInvalid)throw new on(n);return new Ea({invalid:n})}static fromDateTimes(e,t){const n=ys(e),r=ys(t),o=function(e,t){return e&&e.isValid?t&&t.isValid?t<e?Ea.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null:Ea.invalid("missing or invalid end"):Ea.invalid("missing or invalid start")}(n,r);return null==o?new Ea({start:n,end:r}):o}static after(e,t){const n=_a.fromDurationLike(t),r=ys(e);return Ea.fromDateTimes(r,r.plus(n))}static before(e,t){const n=_a.fromDurationLike(t),r=ys(e);return Ea.fromDateTimes(r.minus(n),r)}static fromISO(e,t){const[n,r]=(e||"").split("/",2);if(n&&r){let e,o,a,s;try{e=vs.fromISO(n,t),o=e.isValid}catch(r){o=!1}try{a=vs.fromISO(r,t),s=a.isValid}catch(r){s=!1}if(o&&s)return Ea.fromDateTimes(e,a);if(o){const n=_a.fromISO(r,t);if(n.isValid)return Ea.after(e,n)}else if(s){const e=_a.fromISO(n,t);if(e.isValid)return Ea.before(a,e)}}return Ea.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return null===this.invalidReason}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",t){if(!this.isValid)return NaN;const n=this.start.startOf(e,t);let r;return r=t?.useLocaleWeeks?this.end.reconfigure({locale:n.locale}):this.end,r=r.startOf(e,t),Math.floor(r.diff(n,e).get(e))+(r.valueOf()!==this.end.valueOf())}hasSame(e){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,e))}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return!!this.isValid&&this.s>e}isBefore(e){return!!this.isValid&&this.e<=e}contains(e){return!!this.isValid&&this.s<=e&&this.e>e}set({start:e,end:t}={}){return this.isValid?Ea.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(ys).filter((e=>this.contains(e))).sort(((e,t)=>e.toMillis()-t.toMillis())),n=[];let{s:r}=this,o=0;for(;r<this.e;){const e=t[o]||this.e,a=+e>+this.e?this.e:e;n.push(Ea.fromDateTimes(r,a)),r=a,o+=1}return n}splitBy(e){const t=_a.fromDurationLike(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];let n,{s:r}=this,o=1;const a=[];for(;r<this.e;){const e=this.start.plus(t.mapUnits((e=>e*o)));n=+e>+this.e?this.e:e,a.push(Ea.fromDateTimes(r,n)),r=n,o+=1}return a}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return!!this.isValid&&+this.e===+e.s}abutsEnd(e){return!!this.isValid&&+e.e===+this.s}engulfs(e){return!!this.isValid&&this.s<=e.s&&this.e>=e.e}equals(e){return!(!this.isValid||!e.isValid)&&this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,n=this.e<e.e?this.e:e.e;return t>=n?null:Ea.fromDateTimes(t,n)}union(e){if(!this.isValid)return this;const t=this.s<e.s?this.s:e.s,n=this.e>e.e?this.e:e.e;return Ea.fromDateTimes(t,n)}static merge(e){const[t,n]=e.sort(((e,t)=>e.s-t.s)).reduce((([e,t],n)=>t?t.overlaps(n)||t.abutsStart(n)?[e,t.union(n)]:[e.concat([t]),n]:[e,n]),[[],null]);return n&&t.push(n),t}static xor(e){let t=null,n=0;const r=[],o=e.map((e=>[{time:e.s,type:"s"},{time:e.e,type:"e"}])),a=Array.prototype.concat(...o).sort(((e,t)=>e.time-t.time));for(const e of a)n+="s"===e.type?1:-1,1===n?t=e.time:(t&&+t!==+e.time&&r.push(Ea.fromDateTimes(t,e.time)),t=null);return Ea.merge(r)}difference(...e){return Ea.xor([this].concat(e)).map((e=>this.intersection(e))).filter((e=>e&&!e.isEmpty()))}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:ja}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=mn,t={}){return this.isValid?Eo.create(this.s.loc.clone(t),e).formatInterval(this):ja}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:ja}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:ja}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:ja}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:ja}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):_a.invalid(this.invalidReason)}mapEndpoints(e){return Ea.fromDateTimes(e(this.s),e(this.e))}}class Na{static hasDST(e=kr.defaultZone){const t=vs.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return Wn.isValidZone(e)}static normalizeZone(e){return lr(e,kr.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||or.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||or.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||or.create(e)).getWeekendDays().slice()}static months(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:o="gregory"}={}){return(r||or.create(t,n,o)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:o="gregory"}={}){return(r||or.create(t,n,o)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||or.create(t,n,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||or.create(t,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return or.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return or.create(t,null,"gregory").eras(e)}static features(){return{relative:Vr(),localeWeek:Br()}}}function Da(e,t){const n=e=>e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(t)-n(e);return Math.floor(_a.fromMillis(r).as("days"))}function Ta(e,t=e=>e){return{regex:e,deser:([e])=>t(function(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);if(-1!==e[n].search(cr.hanidec))t+=ur.indexOf(e[n]);else for(const e in dr){const[n,o]=dr[e];r>=n&&r<=o&&(t+=r-n)}}return parseInt(t,10)}return t}(e))}}const Aa=`[ ${String.fromCharCode(160)}]`,Ra=new RegExp(Aa,"g");function Ma(e){return e.replace(/\./g,"\\.?").replace(Ra,Aa)}function Oa(e){return e.replace(/\./g,"").replace(Ra," ").toLowerCase()}function Ia(e,t){return null===e?null:{regex:RegExp(e.map(Ma).join("|")),deser:([n])=>e.findIndex((e=>Oa(n)===Oa(e)))+t}}function Pa(e,t){return{regex:e,deser:([,e,t])=>so(e,t),groups:t}}function La(e){return{regex:e,deser:([e])=>e}}const Fa={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};let za=null;function Ha(e,t){return Array.prototype.concat(...e.map((e=>function(e,t){if(e.literal)return e;const n=Wa(Eo.macroTokenToFormatOpts(e.val),t);return null==n||n.includes(void 0)?e:n}(e,t))))}class Va{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=Ha(Eo.parseFormat(t),e),this.units=this.tokens.map((t=>function(e,t){const n=hr(t),r=hr(t,"{2}"),o=hr(t,"{3}"),a=hr(t,"{4}"),s=hr(t,"{6}"),i=hr(t,"{1,2}"),l=hr(t,"{1,3}"),c=hr(t,"{1,6}"),d=hr(t,"{1,9}"),u=hr(t,"{2,4}"),f=hr(t,"{4,6}"),h=e=>{return{regex:RegExp((t=e.val,t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:([e])=>e,literal:!0};var t},m=(m=>{if(e.literal)return h(m);switch(m.val){case"G":return Ia(t.eras("short"),0);case"GG":return Ia(t.eras("long"),0);case"y":return Ta(c);case"yy":case"kk":return Ta(u,oo);case"yyyy":case"kkkk":return Ta(a);case"yyyyy":return Ta(f);case"yyyyyy":return Ta(s);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return Ta(i);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return Ta(r);case"MMM":return Ia(t.months("short",!0),1);case"MMMM":return Ia(t.months("long",!0),1);case"LLL":return Ia(t.months("short",!1),1);case"LLLL":return Ia(t.months("long",!1),1);case"o":case"S":return Ta(l);case"ooo":case"SSS":return Ta(o);case"u":return La(d);case"uu":return La(i);case"uuu":case"E":case"c":return Ta(n);case"a":return Ia(t.meridiems(),0);case"EEE":return Ia(t.weekdays("short",!1),1);case"EEEE":return Ia(t.weekdays("long",!1),1);case"ccc":return Ia(t.weekdays("short",!0),1);case"cccc":return Ia(t.weekdays("long",!0),1);case"Z":case"ZZ":return Pa(new RegExp(`([+-]${i.source})(?::(${r.source}))?`),2);case"ZZZ":return Pa(new RegExp(`([+-]${i.source})(${r.source})?`),2);case"z":return La(/[a-z_+-/]{1,256}?/i);case" ":return La(/[^\S\n\r]/);default:return h(m)}})(e)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return m.token=e,m}(t,e))),this.disqualifyingUnit=this.units.find((e=>e.invalidReason)),!this.disqualifyingUnit){const[e,t]=function(e){const t=e.map((e=>e.regex)).reduce(((e,t)=>`${e}(${t.source})`),"");return[`^${t}$`,e]}(this.units);this.regex=RegExp(e,"i"),this.handlers=t}}explainFromTokens(e){if(this.isValid){const[t,n]=function(e,t,n){const r=e.match(t);if(r){const e={};let t=1;for(const o in n)if(Ur(n,o)){const a=n[o],s=a.groups?a.groups+1:1;!a.literal&&a.token&&(e[a.token.val[0]]=a.deser(r.slice(t,t+s))),t+=s}return[r,e]}return[r,{}]}(e,this.regex,this.handlers),[r,o,a]=n?function(e){let t,n=null;Fr(e.z)||(n=Wn.create(e.z)),Fr(e.Z)||(n||(n=new sr(e.Z)),t=e.Z),Fr(e.q)||(e.M=3*(e.q-1)+1),Fr(e.h)||(e.h<12&&1===e.a?e.h+=12:12===e.h&&0===e.a&&(e.h=0)),0===e.G&&e.y&&(e.y=-e.y),Fr(e.u)||(e.S=Kr(e.u));const r=Object.keys(e).reduce(((t,n)=>{const r=(e=>{switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}})(n);return r&&(t[r]=e[n]),t}),{});return[r,n,t]}(n):[null,null,void 0];if(Ur(n,"a")&&Ur(n,"H"))throw new sn("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:n,result:r,zone:o,specificOffset:a}}return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function Ba(e,t,n){return new Va(e,n).explainFromTokens(t)}function Wa(e,t){if(!e)return null;const n=Eo.create(t,e).dtFormatter((za||(za=vs.fromMillis(1555555555555)),za)),r=n.formatToParts(),o=n.resolvedOptions();return r.map((t=>function(e,t,n){const{type:r,value:o}=e;if("literal"===r){const e=/^\s+$/.test(o);return{literal:!e,val:e?" ":o}}const a=t[r];let s=r;"hour"===r&&(s=null!=t.hour12?t.hour12?"hour12":"hour24":null!=t.hourCycle?"h11"===t.hourCycle||"h12"===t.hourCycle?"hour12":"hour24":n.hour12?"hour12":"hour24");let i=Fa[s];if("object"==typeof i&&(i=i[a]),i)return{literal:!1,val:i}}(t,e,o)))}const Ua="Invalid DateTime",$a=864e13;function Ga(e){return new Sr("unsupported zone",`the zone "${e.name}" is not supported`)}function Ya(e){return null===e.weekData&&(e.weekData=Ar(e.c)),e.weekData}function qa(e){return null===e.localWeekData&&(e.localWeekData=Ar(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function Za(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new vs({...n,...t,old:n})}function Ka(e,t,n){let r=e-60*t*1e3;const o=n.offset(r);if(t===o)return[r,t];r-=60*(o-t)*1e3;const a=n.offset(r);return o===a?[r,o]:[e-60*Math.min(o,a)*1e3,Math.max(o,a)]}function Qa(e,t){const n=new Date(e+=60*t*1e3);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function Ja(e,t,n){return Ka(to(e),t,n)}function Xa(e,t){const n=e.o,r=e.c.year+Math.trunc(t.years),o=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),a={...e.c,year:r,month:o,day:Math.min(e.c.day,eo(r,o))+Math.trunc(t.days)+7*Math.trunc(t.weeks)},s=_a.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),i=to(a);let[l,c]=Ka(i,n,e.zone);return 0!==s&&(l+=s,c=e.zone.offset(l)),{ts:l,o:c}}function es(e,t,n,r,o,a){const{setZone:s,zone:i}=n;if(e&&0!==Object.keys(e).length||t){const r=t||i,o=vs.fromObject(e,{...n,zone:r,specificOffset:a});return s?o:o.setZone(i)}return vs.invalid(new Sr("unparsable",`the input "${o}" can't be parsed as ${r}`))}function ts(e,t,n=!0){return e.isValid?Eo.create(or.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function ns(e,t,n){const r=e.c.year>9999||e.c.year<0;let o="";if(r&&e.c.year>=0&&(o+="+"),o+=Yr(e.c.year,r?6:4),"year"===n)return o;if(t){if(o+="-",o+=Yr(e.c.month),"month"===n)return o;o+="-"}else if(o+=Yr(e.c.month),"month"===n)return o;return o+=Yr(e.c.day),o}function rs(e,t,n,r,o,a,s){let i=!n||0!==e.c.millisecond||0!==e.c.second,l="";switch(s){case"day":case"month":case"year":break;default:if(l+=Yr(e.c.hour),"hour"===s)break;if(t){if(l+=":",l+=Yr(e.c.minute),"minute"===s)break;i&&(l+=":",l+=Yr(e.c.second))}else{if(l+=Yr(e.c.minute),"minute"===s)break;i&&(l+=Yr(e.c.second))}if("second"===s)break;!i||r&&0===e.c.millisecond||(l+=".",l+=Yr(e.c.millisecond,3))}return o&&(e.isOffsetFixed&&0===e.offset&&!a?l+="Z":e.o<0?(l+="-",l+=Yr(Math.trunc(-e.o/60)),l+=":",l+=Yr(Math.trunc(-e.o%60))):(l+="+",l+=Yr(Math.trunc(e.o/60)),l+=":",l+=Yr(Math.trunc(e.o%60)))),a&&(l+="["+e.zone.ianaName+"]"),l}const os={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},as={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},ss={ordinal:1,hour:0,minute:0,second:0,millisecond:0},is=["year","month","day","hour","minute","second","millisecond"],ls=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],cs=["year","ordinal","hour","minute","second","millisecond"];function ds(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new ln(e);return t}function us(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return ds(e)}}function fs(e,t){const n=lr(t.zone,kr.defaultZone);if(!n.isValid)return vs.invalid(Ga(n));const r=or.fromObject(t);let o,a;if(Fr(e.year))o=kr.now();else{for(const t of is)Fr(e[t])&&(e[t]=os[t]);const t=Pr(e)||Lr(e);if(t)return vs.invalid(t);const r=function(e){if(void 0===ps&&(ps=kr.now()),"iana"!==e.type)return e.offset(ps);const t=e.name;let n=gs.get(t);return void 0===n&&(n=e.offset(ps),gs.set(t,n)),n}(n);[o,a]=Ja(e,r,n)}return new vs({ts:o,zone:n,loc:r,o:a})}function hs(e,t,n){const r=!!Fr(n.round)||n.round,o=Fr(n.rounding)?"trunc":n.rounding,a=(e,a)=>(e=Qr(e,r||n.calendary?0:2,n.calendary?"round":o),t.loc.clone(n).relFormatter(n).format(e,a)),s=r=>n.calendary?t.hasSame(e,r)?0:t.startOf(r).diff(e.startOf(r),r).get(r):t.diff(e,r).get(r);if(n.unit)return a(s(n.unit),n.unit);for(const e of n.units){const t=s(e);if(Math.abs(t)>=1)return a(t,e)}return a(e>t?-0:0,n.units[n.units.length-1])}function ms(e){let t,n={};return e.length>0&&"object"==typeof e[e.length-1]?(n=e[e.length-1],t=Array.from(e).slice(0,e.length-1)):t=Array.from(e),[n,t]}let ps;const gs=new Map;class vs{constructor(e){const t=e.zone||kr.defaultZone;let n=e.invalid||(Number.isNaN(e.ts)?new Sr("invalid input"):null)||(t.isValid?null:Ga(t));this.ts=Fr(e.ts)?kr.now():e.ts;let r=null,o=null;if(!n)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[r,o]=[e.old.c,e.old.o];else{const a=zr(e.o)&&!e.old?e.o:t.offset(this.ts);r=Qa(this.ts,a),n=Number.isNaN(r.year)?new Sr("invalid input"):null,r=n?null:r,o=n?null:a}this._zone=t,this.loc=e.loc||or.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=r,this.o=o,this.isLuxonDateTime=!0}static now(){return new vs({})}static local(){const[e,t]=ms(arguments),[n,r,o,a,s,i,l]=t;return fs({year:n,month:r,day:o,hour:a,minute:s,second:i,millisecond:l},e)}static utc(){const[e,t]=ms(arguments),[n,r,o,a,s,i,l]=t;return e.zone=sr.utcInstance,fs({year:n,month:r,day:o,hour:a,minute:s,second:i,millisecond:l},e)}static fromJSDate(e,t={}){const n=(r=e,"[object Date]"===Object.prototype.toString.call(r)?e.valueOf():NaN);var r;if(Number.isNaN(n))return vs.invalid("invalid input");const o=lr(t.zone,kr.defaultZone);return o.isValid?new vs({ts:n,zone:o,loc:or.fromObject(t)}):vs.invalid(Ga(o))}static fromMillis(e,t={}){if(zr(e))return e<-$a||e>$a?vs.invalid("Timestamp out of range"):new vs({ts:e,zone:lr(t.zone,kr.defaultZone),loc:or.fromObject(t)});throw new cn(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(zr(e))return new vs({ts:1e3*e,zone:lr(t.zone,kr.defaultZone),loc:or.fromObject(t)});throw new cn("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const n=lr(t.zone,kr.defaultZone);if(!n.isValid)return vs.invalid(Ga(n));const r=or.fromObject(t),o=lo(e,us),{minDaysInFirstWeek:a,startOfWeek:s}=Ir(o,r),i=kr.now(),l=Fr(t.specificOffset)?n.offset(i):t.specificOffset,c=!Fr(o.ordinal),d=!Fr(o.year),u=!Fr(o.month)||!Fr(o.day),f=d||u,h=o.weekYear||o.weekNumber;if((f||c)&&h)throw new sn("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&c)throw new sn("Can't mix ordinal dates with month/day");const m=h||o.weekday&&!f;let p,g,v=Qa(i,l);m?(p=ls,g=as,v=Ar(v,a,s)):c?(p=cs,g=ss,v=Mr(v)):(p=is,g=os);let y=!1;for(const e of p)Fr(o[e])?o[e]=y?g[e]:v[e]:y=!0;const b=m?function(e,t=4,n=1){const r=Hr(e.weekYear),o=Gr(e.weekNumber,1,ro(e.weekYear,t,n)),a=Gr(e.weekday,1,7);return r?o?!a&&jr("weekday",e.weekday):jr("week",e.weekNumber):jr("weekYear",e.weekYear)}(o,a,s):c?function(e){const t=Hr(e.year),n=Gr(e.ordinal,1,Xr(e.year));return t?!n&&jr("ordinal",e.ordinal):jr("year",e.year)}(o):Pr(o),x=b||Lr(o);if(x)return vs.invalid(x);const w=m?Rr(o,a,s):c?Or(o):o,[k,S]=Ja(w,l,n),C=new vs({ts:k,zone:n,o:S,loc:r});return o.weekday&&f&&e.weekday!==C.weekday?vs.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${C.toISO()}`):C.isValid?C:vs.invalid(C.invalid)}static fromISO(e,t={}){const[n,r]=function(e){return Ao(e,[ra,ia],[oa,la],[aa,ca],[sa,da])}(e);return es(n,r,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[n,r]=function(e){return Ao(function(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[Ko,Qo])}(e);return es(n,r,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[n,r]=function(e){return Ao(e,[Jo,ta],[Xo,ta],[ea,na])}(e);return es(n,r,t,"HTTP",t)}static fromFormat(e,t,n={}){if(Fr(e)||Fr(t))throw new cn("fromFormat requires an input string and a format");const{locale:r=null,numberingSystem:o=null}=n,a=or.fromOpts({locale:r,numberingSystem:o,defaultToEN:!0}),[s,i,l,c]=function(e,t,n){const{result:r,zone:o,specificOffset:a,invalidReason:s}=Ba(e,t,n);return[r,o,a,s]}(a,e,t);return c?vs.invalid(c):es(s,i,n,`format ${t}`,e,l)}static fromString(e,t,n={}){return vs.fromFormat(e,t,n)}static fromSQL(e,t={}){const[n,r]=function(e){return Ao(e,[fa,ia],[ha,ma])}(e);return es(n,r,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new cn("need to specify a reason the DateTime is invalid");const n=e instanceof Sr?e:new Sr(e,t);if(kr.throwOnInvalid)throw new rn(n);return new vs({invalid:n})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){const n=Wa(e,or.fromObject(t));return n?n.map((e=>e?e.val:null)).join(""):null}static expandFormat(e,t={}){return Ha(Eo.parseFormat(e),or.fromObject(t)).map((e=>e.val)).join("")}static resetCache(){ps=void 0,gs.clear()}get(e){return this[e]}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Ya(this).weekYear:NaN}get weekNumber(){return this.isValid?Ya(this).weekNumber:NaN}get weekday(){return this.isValid?Ya(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?qa(this).weekday:NaN}get localWeekNumber(){return this.isValid?qa(this).weekNumber:NaN}get localWeekYear(){return this.isValid?qa(this).weekYear:NaN}get ordinal(){return this.isValid?Mr(this.c).ordinal:NaN}get monthShort(){return this.isValid?Na.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Na.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Na.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Na.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return!this.isOffsetFixed&&(this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset)}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,t=6e4,n=to(this.c),r=this.zone.offset(n-e),o=this.zone.offset(n+e),a=this.zone.offset(n-r*t),s=this.zone.offset(n-o*t);if(a===s)return[this];const i=n-a*t,l=n-s*t,c=Qa(i,a),d=Qa(l,s);return c.hour===d.hour&&c.minute===d.minute&&c.second===d.second&&c.millisecond===d.millisecond?[Za(this,{ts:i}),Za(this,{ts:l})]:[this]}get isInLeapYear(){return Jr(this.year)}get daysInMonth(){return eo(this.year,this.month)}get daysInYear(){return this.isValid?Xr(this.year):NaN}get weeksInWeekYear(){return this.isValid?ro(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?ro(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:n,calendar:r}=Eo.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:n,outputCalendar:r}}toUTC(e=0,t={}){return this.setZone(sr.instance(e),t)}toLocal(){return this.setZone(kr.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:n=!1}={}){if((e=lr(e,kr.defaultZone)).equals(this.zone))return this;if(e.isValid){let r=this.ts;if(t||n){const t=e.offset(this.ts),n=this.toObject();[r]=Ja(n,t,e)}return Za(this,{ts:r,zone:e})}return vs.invalid(Ga(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:n}={}){return Za(this,{loc:this.loc.clone({locale:e,numberingSystem:t,outputCalendar:n})})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=lo(e,us),{minDaysInFirstWeek:n,startOfWeek:r}=Ir(t,this.loc),o=!Fr(t.weekYear)||!Fr(t.weekNumber)||!Fr(t.weekday),a=!Fr(t.ordinal),s=!Fr(t.year),i=!Fr(t.month)||!Fr(t.day),l=s||i,c=t.weekYear||t.weekNumber;if((l||a)&&c)throw new sn("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(i&&a)throw new sn("Can't mix ordinal dates with month/day");let d;o?d=Rr({...Ar(this.c,n,r),...t},n,r):Fr(t.ordinal)?(d={...this.toObject(),...t},Fr(t.day)&&(d.day=Math.min(eo(d.year,d.month),d.day))):d=Or({...Mr(this.c),...t});const[u,f]=Ja(d,this.o,this.zone);return Za(this,{ts:u,o:f})}plus(e){return this.isValid?Za(this,Xa(this,_a.fromDurationLike(e))):this}minus(e){return this.isValid?Za(this,Xa(this,_a.fromDurationLike(e).negate())):this}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;const n={},r=_a.normalizeUnit(e);switch(r){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0}if("weeks"===r)if(t){const e=this.loc.getStartOfWeek(),{weekday:t}=this;t<e&&(n.weekNumber=this.weekNumber-1),n.weekday=e}else n.weekday=1;if("quarters"===r){const e=Math.ceil(this.month/3);n.month=3*(e-1)+1}return this.set(n)}endOf(e,t){return this.isValid?this.plus({[e]:1}).startOf(e,t).minus(1):this}toFormat(e,t={}){return this.isValid?Eo.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):Ua}toLocaleString(e=mn,t={}){return this.isValid?Eo.create(this.loc.clone(t),e).formatDateTime(this):Ua}toLocaleParts(e={}){return this.isValid?Eo.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:n=!1,includeOffset:r=!0,extendedZone:o=!1,precision:a="milliseconds"}={}){if(!this.isValid)return null;const s="extended"===e;let i=ns(this,s,a=ds(a));return is.indexOf(a)>=3&&(i+="T"),i+=rs(this,s,t,n,r,o,a),i}toISODate({format:e="extended",precision:t="day"}={}){return this.isValid?ns(this,"extended"===e,ds(t)):null}toISOWeekDate(){return ts(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:n=!0,includePrefix:r=!1,extendedZone:o=!1,format:a="extended",precision:s="milliseconds"}={}){return this.isValid?(s=ds(s),(r&&is.indexOf(s)>=3?"T":"")+rs(this,"extended"===a,t,e,n,o,s)):null}toRFC2822(){return ts(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return ts(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?ns(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:n=!0}={}){let r="HH:mm:ss.SSS";return(t||e)&&(n&&(r+=" "),t?r+="z":e&&(r+="ZZ")),ts(this,r,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():Ua}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",n={}){if(!this.isValid||!e.isValid)return _a.invalid("created by diffing an invalid DateTime");const r={locale:this.locale,numberingSystem:this.numberingSystem,...n},o=(i=t,Array.isArray(i)?i:[i]).map(_a.normalizeUnit),a=e.valueOf()>this.valueOf(),s=function(e,t,n,r){let[o,a,s,i]=function(e,t,n){const r=[["years",(e,t)=>t.year-e.year],["quarters",(e,t)=>t.quarter-e.quarter+4*(t.year-e.year)],["months",(e,t)=>t.month-e.month+12*(t.year-e.year)],["weeks",(e,t)=>{const n=Da(e,t);return(n-n%7)/7}],["days",Da]],o={},a=e;let s,i;for(const[l,c]of r)n.indexOf(l)>=0&&(s=l,o[l]=c(e,t),i=a.plus(o),i>t?(o[l]--,(e=a.plus(o))>t&&(i=e,o[l]--,e=a.plus(o))):e=i);return[e,o,i,s]}(e,t,n);const l=t-o,c=n.filter((e=>["hours","minutes","seconds","milliseconds"].indexOf(e)>=0));0===c.length&&(s<t&&(s=o.plus({[i]:1})),s!==o&&(a[i]=(a[i]||0)+l/(s-o)));const d=_a.fromObject(a,r);return c.length>0?_a.fromMillis(l,r).shiftTo(...c).plus(d):d}(a?this:e,a?e:this,o,r);var i;return a?s.negate():s}diffNow(e="milliseconds",t={}){return this.diff(vs.now(),e,t)}until(e){return this.isValid?Ea.fromDateTimes(this,e):this}hasSame(e,t,n){if(!this.isValid)return!1;const r=e.valueOf(),o=this.setZone(e.zone,{keepLocalTime:!0});return o.startOf(t,n)<=r&&r<=o.endOf(t,n)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||vs.fromObject({},{zone:this.zone}),n=e.padding?this<t?-e.padding:e.padding:0;let r=["years","months","days","hours","minutes","seconds"],o=e.unit;return Array.isArray(e.unit)&&(r=e.unit,o=void 0),hs(t,this.plus(n),{...e,numeric:"always",units:r,unit:o})}toRelativeCalendar(e={}){return this.isValid?hs(e.base||vs.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(vs.isDateTime))throw new cn("min requires all arguments be DateTimes");return Wr(e,(e=>e.valueOf()),Math.min)}static max(...e){if(!e.every(vs.isDateTime))throw new cn("max requires all arguments be DateTimes");return Wr(e,(e=>e.valueOf()),Math.max)}static fromFormatExplain(e,t,n={}){const{locale:r=null,numberingSystem:o=null}=n;return Ba(or.fromOpts({locale:r,numberingSystem:o,defaultToEN:!0}),e,t)}static fromStringExplain(e,t,n={}){return vs.fromFormatExplain(e,t,n)}static buildFormatParser(e,t={}){const{locale:n=null,numberingSystem:r=null}=t,o=or.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0});return new Va(o,e)}static fromFormatParser(e,t,n={}){if(Fr(e)||Fr(t))throw new cn("fromFormatParser requires an input string and a format parser");const{locale:r=null,numberingSystem:o=null}=n,a=or.fromOpts({locale:r,numberingSystem:o,defaultToEN:!0});if(!a.equals(t.locale))throw new cn(`fromFormatParser called with a locale of ${a}, but the format parser was created for ${t.locale}`);const{result:s,zone:i,specificOffset:l,invalidReason:c}=t.explainFromTokens(e);return c?vs.invalid(c):es(s,i,n,`format ${t.format}`,e,l)}static get DATE_SHORT(){return mn}static get DATE_MED(){return pn}static get DATE_MED_WITH_WEEKDAY(){return gn}static get DATE_FULL(){return vn}static get DATE_HUGE(){return yn}static get TIME_SIMPLE(){return bn}static get TIME_WITH_SECONDS(){return xn}static get TIME_WITH_SHORT_OFFSET(){return wn}static get TIME_WITH_LONG_OFFSET(){return kn}static get TIME_24_SIMPLE(){return Sn}static get TIME_24_WITH_SECONDS(){return Cn}static get TIME_24_WITH_SHORT_OFFSET(){return jn}static get TIME_24_WITH_LONG_OFFSET(){return En}static get DATETIME_SHORT(){return Nn}static get DATETIME_SHORT_WITH_SECONDS(){return Dn}static get DATETIME_MED(){return Tn}static get DATETIME_MED_WITH_SECONDS(){return An}static get DATETIME_MED_WITH_WEEKDAY(){return Rn}static get DATETIME_FULL(){return Mn}static get DATETIME_FULL_WITH_SECONDS(){return On}static get DATETIME_HUGE(){return In}static get DATETIME_HUGE_WITH_SECONDS(){return Pn}}function ys(e){if(vs.isDateTime(e))return e;if(e&&e.valueOf&&zr(e.valueOf()))return vs.fromJSDate(e);if(e&&"object"==typeof e)return vs.fromObject(e);throw new cn(`Unknown datetime argument: ${e}, of type ${typeof e}`)}const bs={january:1,february:2,march:3,april:4,may:5,june:6,july:7,august:8,september:9,october:10,november:11,december:12};function xs(e,t="24",n=!0){if(!e)return"12"===t?"UTC, AM/PM":"UTC, 24hr";const r=e=>n?"12"===t?`${e}, AM/PM`:`${e}, 24hr`:e,o=e.match(/^([+-])(\d{2}):?(\d{2})$/);if(o){const e=o[1],t=parseInt(o[2],10),n=parseInt(o[3],10);return r(0===n?`UTC${e}${t}`:`UTC${e}${t}:${n.toString().padStart(2,"0")}`)}if(e.startsWith("Etc/GMT")){const t=e.replace("Etc/GMT",""),n=parseInt(t,10);return r(0===n?"UTC":`UTC${n>=0?"+":"-"}${Math.abs(n)}`)}if(!isNaN(parseFloat(e))&&isFinite(e)){const t=parseFloat(e);return r(0===t?"UTC":`UTC${t>=0?"+":""}${t}`)}if("local"===e.toLowerCase()){const e=Intl.DateTimeFormat().resolvedOptions().timeZone;let t=vs.now().setZone(e).toFormat("ZZ");return t=t.replace(":00","").replace(/^(\+|-)0/,"$1"),r(`${e} (UTC${t})`)}if("UTC"===e.toUpperCase())return r("UTC");const a=vs.now().setZone(e);if(a.isValid){let t=a.toFormat("ZZ");return t=t.replace(":00","").replace(/^(\+|-)0/,"$1"),r(`${e} (UTC${t})`)}return r(e)}function ws(e,t){if(e.tbc)return e.tbc_note||"Date and time to be confirmed";const n=Ns(t||"UTC"),r=eventkoi_params?.time_format||"12",o="undefined"!=typeof eventkoi_params&&eventkoi_params.locale&&(a=eventkoi_params.locale)?a.replace("_","-"):"en";var a;const s=e=>e?.isValid?"24"===r?e.setLocale(o).toFormat("HH:mm"):e.setLocale(o).toFormat(0===e.minute?"ha":"h:mma").toLowerCase().replace(":00",""):"",i=e=>{if(!e)return null;const t=vs.fromISO(e,{zone:"utc"}).setZone(n).setLocale(o);return t.isValid?t:null};if("recurring"===e.date_type){const t=i(e.start_date_iso||e.start_date),n=i(e.end_real)||i(e.end_date_iso||e.end_date);if(!t)return null;const r=!!e.all_day,o=n&&t.hasSame(n,"day");return o&&!r?`${t.toLocaleString(vs.DATE_MED_WITH_WEEKDAY)}, ${s(t)} – ${s(n)}`:!n||o?t.toLocaleString(vs.DATE_MED_WITH_WEEKDAY):`${t.toLocaleString(vs.DATE_MED_WITH_WEEKDAY)} – ${n.toLocaleString(vs.DATE_MED_WITH_WEEKDAY)}`}if("standard"===e.date_type||"multi"===e.date_type){const t=i(e.start_date_iso||e.start_date),n=i(e.end_real)||i(e.end_date_iso||e.end_date);if(!t)return null;const r=!!e.all_day;return n&&t.hasSame(n,"day")&&!r?`${t.toLocaleString(vs.DATE_MED_WITH_WEEKDAY)}, ${s(t)} – ${s(n)}`:n?`${t.toLocaleString(vs.DATE_MED_WITH_WEEKDAY)}, ${s(t)} – ${n.toLocaleString(vs.DATE_MED_WITH_WEEKDAY)}, ${s(n)}`:r?t.toLocaleString(vs.DATE_MED_WITH_WEEKDAY):`${t.toLocaleString(vs.DATE_MED_WITH_WEEKDAY)}, ${s(t)}`}return null}function ks(e,t,n="12"){if(e.tbc)return e.tbc_note||"Date and time to be confirmed";const r=Ns(t||"UTC"),o="undefined"!=typeof eventkoi_params&&eventkoi_params.locale&&(a=eventkoi_params.locale)?a.replace("_","-"):"en";var a;const s=e=>e?.isValid?"24"===n?e.setLocale(o).toFormat("HH:mm"):e.setLocale(o).toFormat(0===e.minute?"ha":"h:mma").toLowerCase().replace(":00",""):"",i=e=>{if(!e)return null;const t=vs.fromISO(e,{zone:"utc"}).setZone(r).setLocale(o);return t.isValid?t:null};if("recurring"===e.date_type&&e.timeline){const t=i(e.start),n=i(e.end_real)||i(e.end);if(!t)return null;const r=!!e.allDay,o=n&&t.hasSame(n,"day");return o&&!r?`${t.toLocaleString(vs.DATE_MED_WITH_WEEKDAY)}, ${s(t)} – ${s(n)}`:!n||o?t.toLocaleString(vs.DATE_MED_WITH_WEEKDAY):`${t.toLocaleString(vs.DATE_MED_WITH_WEEKDAY)} – ${n.toLocaleString(vs.DATE_MED_WITH_WEEKDAY)}`}if("standard"===e.date_type||"multi"===e.date_type){const t=i(e.start),n=i(e.end_real)||i(e.end);if(!t)return null;const r=!!e.allDay;return n&&t.hasSame(n,"day")&&!r?`${t.toLocaleString(vs.DATE_MED_WITH_WEEKDAY)}, ${s(t)} – ${s(n)}`:n?`${t.toLocaleString(vs.DATE_MED_WITH_WEEKDAY)}, ${s(t)} – ${n.toLocaleString(vs.DATE_MED_WITH_WEEKDAY)}, ${s(n)}`:r?t.toLocaleString(vs.DATE_MED_WITH_WEEKDAY):`${t.toLocaleString(vs.DATE_MED_WITH_WEEKDAY)}, ${s(t)}`}return null}function Ss(e,t={}){if(!e)return"";const{time_format:n}=Te||{},r=Ns(t.timezone||"undefined"!=typeof eventkoi_params&&eventkoi_params.timezone_string||"UTC"),o=new Date(e),a=o.toLocaleDateString("en-CA",{year:"numeric",month:"2-digit",day:"2-digit",timeZone:r}),s="24"===n,i=o.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit",hour12:!s,timeZone:r});return"date"===t.format?a:"time"===t.format?i:`${a}\n${i}`}function Cs(e){if(e)return/[+-]\d\d:\d\d|Z$/.test(e)?e:/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(e)?e.replace(" ","T")+"Z":e+"Z"}function _s(e,t="UTC"){if(!e)return null;const n=Ns(t);let r;return r=/[+-]\d\d:\d\d|Z$/.test(e)?vs.fromISO(e,{zone:"utc"}):vs.fromISO(e,{zone:n}),r.setZone(n).toJSDate()}function js(e,t="UTC"){if(!e)return null;const n=Ns(t);return vs.fromISO(e,{zone:n}).setZone("utc").toISO({suppressMilliseconds:!0})}const Es=[{key:0,short:"Mo",label:"Monday"},{key:1,short:"Tu",label:"Tuesday"},{key:2,short:"We",label:"Wednesday"},{key:3,short:"Th",label:"Thursday"},{key:4,short:"Fr",label:"Friday"},{key:5,short:"Sa",label:"Saturday"},{key:6,short:"Su",label:"Sunday"}];function Ns(e){if(!e)return"UTC";if("local"===e)return Intl.DateTimeFormat().resolvedOptions().timeZone;if("utc"===e.toLowerCase())return"UTC";const t=e.match(/^UTC([+-]?\d+(\.\d+)?)$/i);if(t){const e=parseFloat(t[1]);return`Etc/GMT${e>=0?"-":"+"}${Math.abs(e)}`}if(!isNaN(parseFloat(e))&&isFinite(e)){const t=parseFloat(e);return`Etc/GMT${t>=0?"-":"+"}${Math.abs(t)}`}return e}function Ds(e=0){return[...Es.slice(e),...Es.slice(0,e)]}function Ts(e,t,n="UTC"){if(!e)return"";const r=Ns(n),o="string"==typeof e?new Date(e):e,a="string"==typeof t?new Date(t):t,s=tn(o,r,"MMM d, yyyy"),i=tn(o,r,"h:mm a"),l=a?tn(a,r,"h:mm a"):null;return`${s}, ${i}${l?` – ${l}`:""}`}function As(e){if(!e)return"UTC";const t=Ns(e);return vs.now().setZone(t).isValid?t:"UTC"}function Rs(e){const t=vs.utc();let n=t.year,r=t.month;if(e?.default_year&&""!==e.default_year){const t=parseInt(e.default_year,10);isNaN(t)||(n=t)}var o;return e?.default_month&&""!==e.default_month&&(r=null!==(o=bs[e.default_month.toLowerCase()])&&void 0!==o?o:t.month),vs.utc(n,r,1).toISODate()}const Ms=window.wp.i18n;function Os(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Os(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Is(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Os(e))&&(r&&(r+=" "),r+=t);return r}const Ps=e=>{const t=Hs(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{const n=e.split("-");return""===n[0]&&1!==n.length&&n.shift(),Ls(n,t)||zs(e)},getConflictingClassGroupIds:(e,t)=>{const o=n[e]||[];return t&&r[e]?[...o,...r[e]]:o}}},Ls=(e,t)=>{if(0===e.length)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Ls(e.slice(1),r):void 0;if(o)return o;if(0===t.validators.length)return;const a=e.join("-");return t.validators.find((({validator:e})=>e(a)))?.classGroupId},Fs=/^\[(.+)\]$/,zs=e=>{if(Fs.test(e)){const t=Fs.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Hs=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Us(Object.entries(e.classGroups),n).forEach((([e,n])=>{Vs(n,r,e,t)})),r},Vs=(e,t,n,r)=>{e.forEach((e=>{if("string"!=typeof e){if("function"==typeof e)return Ws(e)?void Vs(e(r),t,n,r):void t.validators.push({validator:e,classGroupId:n});Object.entries(e).forEach((([e,o])=>{Vs(o,Bs(t,e),n,r)}))}else(""===e?t:Bs(t,e)).classGroupId=n}))},Bs=(e,t)=>{let n=e;return t.split("-").forEach((e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)})),n},Ws=e=>e.isThemeGetter,Us=(e,t)=>t?e.map((([e,n])=>[e,n.map((e=>"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map((([e,n])=>[t+e,n]))):e))])):e,$s=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(o,a)=>{n.set(o,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);return void 0!==t?t:void 0!==(t=r.get(e))?(o(e,t),t):void 0},set(e,t){n.has(e)?n.set(e,t):o(e,t)}}},Gs=e=>{const{separator:t,experimentalParseClassName:n}=e,r=1===t.length,o=t[0],a=t.length,s=e=>{const n=[];let s,i=0,l=0;for(let c=0;c<e.length;c++){let d=e[c];if(0===i){if(d===o&&(r||e.slice(c,c+a)===t)){n.push(e.slice(l,c)),l=c+a;continue}if("/"===d){s=c;continue}}"["===d?i++:"]"===d&&i--}const c=0===n.length?e:e.substring(l),d=c.startsWith("!");return{modifiers:n,hasImportantModifier:d,baseClassName:d?c.substring(1):c,maybePostfixModifierPosition:s&&s>l?s-l:void 0}};return n?e=>n({className:e,parseClassName:s}):s},Ys=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach((e=>{"["===e[0]?(t.push(...n.sort(),e),n=[]):n.push(e)})),t.push(...n.sort()),t},qs=/\s+/;function Zs(){let e,t,n=0,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=Ks(e))&&(r&&(r+=" "),r+=t);return r}const Ks=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Ks(e[r]))&&(n&&(n+=" "),n+=t);return n};function Qs(e,...t){let n,r,o,a=function(i){const l=t.reduce(((e,t)=>t(e)),e());return n=(e=>({cache:$s(e.cacheSize),parseClassName:Gs(e),...Ps(e)}))(l),r=n.cache.get,o=n.cache.set,a=s,s(i)};function s(e){const t=r(e);if(t)return t;const a=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,a=[],s=e.trim().split(qs);let i="";for(let e=s.length-1;e>=0;e-=1){const t=s[e],{modifiers:l,hasImportantModifier:c,baseClassName:d,maybePostfixModifierPosition:u}=n(t);let f=Boolean(u),h=r(f?d.substring(0,u):d);if(!h){if(!f){i=t+(i.length>0?" "+i:i);continue}if(h=r(d),!h){i=t+(i.length>0?" "+i:i);continue}f=!1}const m=Ys(l).join(":"),p=c?m+"!":m,g=p+h;if(a.includes(g))continue;a.push(g);const v=o(h,f);for(let e=0;e<v.length;++e){const t=v[e];a.push(p+t)}i=t+(i.length>0?" "+i:i)}return i})(e,n);return o(e,a),a}return function(){return a(Zs.apply(null,arguments))}}const Js=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},Xs=/^\[(?:([a-z-]+):)?(.+)\]$/i,ei=/^\d+\/\d+$/,ti=new Set(["px","full","screen"]),ni=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ri=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,oi=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,ai=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,si=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ii=e=>ci(e)||ti.has(e)||ei.test(e),li=e=>ki(e,"length",Si),ci=e=>Boolean(e)&&!Number.isNaN(Number(e)),di=e=>ki(e,"number",ci),ui=e=>Boolean(e)&&Number.isInteger(Number(e)),fi=e=>e.endsWith("%")&&ci(e.slice(0,-1)),hi=e=>Xs.test(e),mi=e=>ni.test(e),pi=new Set(["length","size","percentage"]),gi=e=>ki(e,pi,Ci),vi=e=>ki(e,"position",Ci),yi=new Set(["image","url"]),bi=e=>ki(e,yi,ji),xi=e=>ki(e,"",_i),wi=()=>!0,ki=(e,t,n)=>{const r=Xs.exec(e);return!!r&&(r[1]?"string"==typeof t?r[1]===t:t.has(r[1]):n(r[2]))},Si=e=>ri.test(e)&&!oi.test(e),Ci=()=>!1,_i=e=>ai.test(e),ji=e=>si.test(e),Ei=Qs((Symbol.toStringTag,()=>{const e=Js("colors"),t=Js("spacing"),n=Js("blur"),r=Js("brightness"),o=Js("borderColor"),a=Js("borderRadius"),s=Js("borderSpacing"),i=Js("borderWidth"),l=Js("contrast"),c=Js("grayscale"),d=Js("hueRotate"),u=Js("invert"),f=Js("gap"),h=Js("gradientColorStops"),m=Js("gradientColorStopPositions"),p=Js("inset"),g=Js("margin"),v=Js("opacity"),y=Js("padding"),b=Js("saturate"),x=Js("scale"),w=Js("sepia"),k=Js("skew"),S=Js("space"),C=Js("translate"),_=()=>["auto",hi,t],j=()=>[hi,t],E=()=>["",ii,li],N=()=>["auto",ci,hi],D=()=>["","0",hi],T=()=>[ci,hi];return{cacheSize:500,separator:":",theme:{colors:[wi],spacing:[ii,li],blur:["none","",mi,hi],brightness:T(),borderColor:[e],borderRadius:["none","","full",mi,hi],borderSpacing:j(),borderWidth:E(),contrast:T(),grayscale:D(),hueRotate:T(),invert:D(),gap:j(),gradientColorStops:[e],gradientColorStopPositions:[fi,li],inset:_(),margin:_(),opacity:T(),padding:j(),saturate:T(),scale:T(),sepia:D(),skew:T(),space:j(),translate:j()},classGroups:{aspect:[{aspect:["auto","square","video",hi]}],container:["container"],columns:[{columns:[mi]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",hi]}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[p]}],"inset-x":[{"inset-x":[p]}],"inset-y":[{"inset-y":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ui,hi]}],basis:[{basis:_()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",hi]}],grow:[{grow:D()}],shrink:[{shrink:D()}],order:[{order:["first","last","none",ui,hi]}],"grid-cols":[{"grid-cols":[wi]}],"col-start-end":[{col:["auto",{span:["full",ui,hi]},hi]}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":[wi]}],"row-start-end":[{row:["auto",{span:[ui,hi]},hi]}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",hi]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",hi]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal","start","end","center","between","around","evenly","stretch"]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",hi,t]}],"min-w":[{"min-w":[hi,t,"min","max","fit"]}],"max-w":[{"max-w":[hi,t,"none","full","min","max","fit","prose",{screen:[mi]},mi]}],h:[{h:[hi,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[hi,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[hi,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[hi,t,"auto","min","max","fit"]}],"font-size":[{text:["base",mi,li]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",di]}],"font-family":[{font:[wi]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",hi]}],"line-clamp":[{"line-clamp":["none",ci,di]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ii,hi]}],"list-image":[{"list-image":["none",hi]}],"list-style-type":[{list:["none","disc","decimal",hi]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","none","wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ii,li]}],"underline-offset":[{"underline-offset":["auto",ii,hi]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",hi]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",hi]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",vi]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",gi]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},bi]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:["solid","dashed","dotted","double","none","hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["","solid","dashed","dotted","double","none"]}],"outline-offset":[{"outline-offset":[ii,hi]}],"outline-w":[{outline:[ii,li]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:E()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[ii,li]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",mi,xi]}],"shadow-color":[{shadow:[wi]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",mi,hi]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[u]}],saturate:[{saturate:[b]}],sepia:[{sepia:[w]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[w]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",hi]}],duration:[{duration:T()}],ease:[{ease:["linear","in","out","in-out",hi]}],delay:[{delay:T()}],animate:[{animate:["none","spin","ping","pulse","bounce",hi]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[ui,hi]}],"translate-x":[{"translate-x":[C]}],"translate-y":[{"translate-y":[C]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",hi]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",hi]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",hi]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ii,li,di]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}));function Ni(...e){return Ei(Is(e))}const Di=window.wp.primitives;function Ti({fill:e="#fb4409",width:t="16.918",height:n="21.89"}){return(0,De.jsx)(Di.SVG,{xmlns:"http://www.w3.org/2000/svg",width:t,height:n,viewBox:"0 0 16.918 21.89",children:(0,De.jsxs)("g",{transform:"translate(0 -13.696)",children:[(0,De.jsx)("g",{transform:"translate(0 13.696)",children:(0,De.jsx)(Di.Path,{d:"M6.19-72.725A3.818,3.818,0,0,0,4.837-75.38a3.359,3.359,0,0,0-2.484-.876A1.885,1.885,0,0,0,.611-74.9a1.612,1.612,0,0,0-.092,1.06,6.23,6.23,0,0,0,.518,1.178,8.55,8.55,0,0,1,.4.832,4.387,4.387,0,0,1,.224.775,7.582,7.582,0,0,0,.984,2.5,4.542,4.542,0,0,0,1.52,1.613,1.022,1.022,0,0,0,1.363-.107q.563-.391.693-2.332A18.33,18.33,0,0,0,6.19-72.725Zm-.09,7.2q-1.034,0-1.242,2.7a18.162,18.162,0,0,0,.413,5.442q.622,2.739,1.677,2.878,2.3.313,2.729-2.422a10.636,10.636,0,0,0-.736-5.668Q7.773-65.521,6.1-65.521Zm2.05-1.52a.88.88,0,0,0,.941.487,2.49,2.49,0,0,0,1.12-.657q.583-.539,1.389-1.4.481-.627.9-1.091a5.462,5.462,0,0,1,.805-.754,4.378,4.378,0,0,0,2.051-2.931,2.483,2.483,0,0,0-.917-2.533,2.674,2.674,0,0,0-2.914-.028A5.715,5.715,0,0,0,9.343-73.55,12.509,12.509,0,0,0,7.9-69.78,3.422,3.422,0,0,0,8.149-67.041Z",transform:"translate(-0.467 76.356)",fill:e})}),(0,De.jsx)("g",{transform:"translate(7.301 20.061)",children:(0,De.jsx)(Di.Path,{d:"M34.564-32.511a2.816,2.816,0,0,0-.269,1.24,1.461,1.461,0,0,0,.269.913c.535.852.818,1.139,1.1,1.59a15.006,15.006,0,0,0,3.8,4.125q2.223,1.635,3.58.774a1.555,1.555,0,0,0,.865-1.448,3.235,3.235,0,0,0-.619-1.622A17.131,17.131,0,0,0,41.85-28.67l-.332-.386a20.805,20.805,0,0,0-2.5-2.265,10.6,10.6,0,0,0-2.8-1.656Q34.936-33.447,34.564-32.511Z",transform:"translate(-34.295 33.134)",fill:e})})]})})}function Ai({invisible:e=!1}){return(0,De.jsx)("div",{className:"flex items-center",children:(0,De.jsxs)(Se,{to:"dashboard",className:Ni("flex items-center gap-2 font-semibold text-sm hover:text-foreground",e&&"opacity-0 pointer-events-none"),children:[(0,De.jsx)(Ti,{}),(0,De.jsx)("span",{className:"sr-only",children:"EventKoi"})]})})}var Ri={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Mi=(t,n)=>{const r=(0,e.forwardRef)((({color:r="currentColor",size:o=24,strokeWidth:a=2,absoluteStrokeWidth:s,className:i="",children:l,...c},d)=>{return(0,e.createElement)("svg",{ref:d,...Ri,width:o,height:o,stroke:r,strokeWidth:s?24*Number(a)/Number(o):a,className:["lucide",`lucide-${u=t,u.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,i].join(" "),...c},[...n.map((([t,n])=>(0,e.createElement)(t,n))),...Array.isArray(l)?l:[l]]);var u}));return r.displayName=`${t}`,r},Oi=Mi("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);function Ii({tabs:e,isSub:t,asDiv:n}){const r=Y(),o=r.pathname?.split("/");let a=o?o[1]:null;o[2]&&t&&(a=o[2]),t&&(!o[2]||parseInt(o[2])>0||["add"].includes(o[2]))&&(a="");const s=n?"div":"nav";return(0,De.jsx)(s,{className:Ni("flex flex-col md:flex-row text-sm gap-3 md:gap-10 items-start md:items-center"),children:e.map(((e,t)=>{const n=a===e.href;return(0,De.jsxs)(Se,{to:e.href,className:Ni("flex items-center",n?"text-foreground":"text-muted-foreground",n&&"relative after:absolute after:bg-foreground after:w-full after:-bottom-[1px] md:after:-bottom-[14px] after:left-[0px] after:h-[2px]","transition-colors hover:text-foreground"),children:[e.title,e.submenu&&(0,De.jsx)(Oi,{className:"w-3.5 h-3.5 ml-1"})]},`tab-${t}`)}))})}const Pi={main:[{href:"dashboard",title:"Dashboard"},{href:"events",title:"Events"},{href:"calendars",title:"Calendars"},{href:"settings",title:"Settings"}],side:[]};function Li({root:e}){const t=Y();if(!Pi[e])return null;const n=t.pathname.split("events/");return n[1]&&(parseInt(n[1])>0||n[1].includes("add"))?null:(0,De.jsxs)("div",{className:"flex text-sm h-12 items-center border-b gap-6 px-8",children:[(0,De.jsx)(Ai,{invisible:!0}),(0,De.jsx)(Ii,{tabs:Pi[e],isSub:!0})]})}function Fi({className:e,children:t}){return(0,De.jsx)("main",{className:Ni("flex flex-1 flex-col w-full max-w-[1280px] mx-auto p-4 md:p-8",e),children:t})}function zi(){return(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)(Li,{root:"dashboard"}),(0,De.jsx)(Fi,{children:(0,De.jsx)(de,{})})]})}const Hi={h1:"text-2xl",h3:"text-xl",h4:"text-base"};function Vi({level:e=1,tagline:t=null,className:n,children:r}){const o=`h${e}`;return(0,De.jsxs)("div",{className:Ni("grid gap-1",n),children:[(0,De.jsx)(o,{className:Ni(Hi[o],"font-medium text-foreground tracking-tight scroll-m-20"),children:r}),t&&(0,De.jsx)("span",{className:"block text-sm text-muted-foreground font-normal",children:t})]})}function Bi({container:e=!1,className:t,children:n}){return(0,De.jsx)("div",{className:Ni("w-full flex flex-col rounded-lg border text-sm bg-card text-card-foreground shadow-sm gap-6",e&&"p-6",t),children:n})}function Wi(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function Ui(...e){return t=>{let n=!1;const r=e.map((e=>{const r=Wi(e,t);return n||"function"!=typeof r||(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():Wi(e[t],null)}}}}function $i(...t){return e.useCallback(Ui(...t),t)}function Gi(t){const n=qi(t),r=e.forwardRef(((t,r)=>{const{children:o,...a}=t,s=e.Children.toArray(o),i=s.find(Ki);if(i){const t=i.props.children,o=s.map((n=>n===i?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:n));return(0,De.jsx)(n,{...a,ref:r,children:e.isValidElement(t)?e.cloneElement(t,void 0,o):null})}return(0,De.jsx)(n,{...a,ref:r,children:o})}));return r.displayName=`${t}.Slot`,r}var Yi=Gi("Slot");function qi(t){const n=e.forwardRef(((t,n)=>{const{children:r,...o}=t,a=$i(e.isValidElement(r)?function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}(r):void 0,n);if(e.isValidElement(r)){const t=function(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}(o,r.props);return r.type!==e.Fragment&&(t.ref=a),e.cloneElement(r,t)}return e.Children.count(r)>1?e.Children.only(null):null}));return n.displayName=`${t}.SlotClone`,n}var Zi=Symbol("radix.slottable");function Ki(t){return e.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===Zi}const Qi=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,Ji=Is,Xi=(e,t)=>n=>{var r;if(null==(null==t?void 0:t.variants))return Ji(e,null==n?void 0:n.class,null==n?void 0:n.className);const{variants:o,defaultVariants:a}=t,s=Object.keys(o).map((e=>{const t=null==n?void 0:n[e],r=null==a?void 0:a[e];if(null===t)return null;const s=Qi(t)||Qi(r);return o[e][s]})),i=n&&Object.entries(n).reduce(((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e}),{}),l=null==t||null===(r=t.compoundVariants)||void 0===r?void 0:r.reduce(((e,t)=>{let{class:n,className:r,...o}=t;return Object.entries(o).every((e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...a,...i}[t]):{...a,...i}[t]===n}))?[...e,n,r]:e}),[]);return Ji(e,s,l,null==n?void 0:n.class,null==n?void 0:n.className)},el=Xi("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent text-foreground hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-input hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),tl=e.forwardRef((({className:e,variant:t,size:n,asChild:r=!1,...o},a)=>{const s=r?Yi:"button";return(0,De.jsx)(s,{className:Ni(el({variant:t,size:n,className:e})),ref:a,...o})}));function nl({className:e}){return(0,De.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor",stroke:"none",width:20,height:20,className:Ni("inline-block align-middle text-foreground",e),"aria-hidden":"true",children:(0,De.jsx)("path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z"})})}tl.displayName="Button";const rl=["Recurring events","Unlimited calendars","Priority support","30 day money-back guarantee"];function ol({className:e,headline:t,minimal:n=!1}){return(0,De.jsxs)(Bi,{container:!0,className:Ni("border-[#B8D7D4] gap-8",e),children:[(0,De.jsxs)("div",{className:"flex gap-4",children:[(0,De.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,De.jsxs)("div",{className:"flex items-center gap-[6px] mb-3",children:[(0,De.jsx)(nl,{}),(0,De.jsx)("div",{className:"!m-0 !p-0 text-foreground text-[20px] font-medium",children:t||"Access Pro features"})]}),(0,De.jsx)("div",{className:"text-sm leading-[1.6] text-muted-foreground mb-4",children:"Thanks for using EventKoi Lite. Get an exclusive 10% discount on all Pro plans when you upgrade today."}),(0,De.jsx)(tl,{asChild:!0,className:Ni("bg-[#3A6667] hover:bg-[#325c5c] min-w-[140px] text-white font-medium text-sm px-5 py-2 rounded-sm"),size:"sm",children:(0,De.jsx)("a",{href:"https://eventkoi.com/upgradeqf35m3ref/",target:"_blank",rel:"noopener noreferrer",children:"Claim discount"})})]}),(0,De.jsxs)("div",{className:"flex flex-col items-center min-w-[82px] select-none",children:[(0,De.jsx)("span",{className:"text-[60px] leading-[1] tracking-[-3px] block font-bold",style:{background:"linear-gradient(103deg, #2B4244 29.71%, #8CBCB9 57.08%, #4E8888 80.54%)",WebkitBackgroundClip:"text",backgroundClip:"text",WebkitTextFillColor:"transparent"},children:"10%"}),(0,De.jsx)("span",{className:"font-bold uppercase tracking-wide text-[16px] text-[#3A6667] mt-[4px]",children:"Discount"})]})]}),!n&&(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)("hr",{className:"border-t border-[#E1E7E8]"}),(0,De.jsx)("ul",{className:"space-y-4 pl-0 mb-0",children:rl.map((e=>(0,De.jsxs)("li",{className:"flex items-center gap-[6px] text-[15px] text-[#263130] font-normal",children:[(0,De.jsx)(nl,{className:"w-4 h-4"}),e]},e)))})]})]})}function al({href:e,children:t,disabled:n=!1}){return(0,De.jsx)("a",{href:n?void 0:e,target:n?void 0:"_blank","aria-disabled":n,className:`\n        flex border rounded-xl items-center text-base px-6 py-4 h-[70px]\n        ${n?"bg-muted text-muted-foreground border-muted opacity-50 cursor-not-allowed pointer-events-none":"bg-transparent text-card-foreground hover:bg-accent border-input hover:border-foreground/40"}\n      `,children:t})}const sl=Mi("Rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]),il=Mi("BookOpen",[["path",{d:"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z",key:"vv98re"}],["path",{d:"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z",key:"1cyq3y"}]]),ll=Mi("Inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]),cl=Mi("CircleUser",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]]);function dl(){return(0,De.jsxs)(Bi,{container:!0,children:[(0,De.jsx)(Vi,{level:3,children:"Quick links"}),(0,De.jsxs)(al,{href:"https://eventkoi.com/docs/knowledge-base/quick-start-guide/",children:[(0,De.jsx)(sl,{className:"w-5 h-5 mr-4"}),(0,De.jsx)("span",{children:"View Quick Start Guide"})]}),(0,De.jsxs)(al,{href:"https://eventkoi.com/docs",children:[(0,De.jsx)(il,{className:"w-5 h-5 mr-4"}),(0,De.jsx)("span",{children:"Read documentation"})]}),(0,De.jsxs)(al,{href:"https://eventkoi.com/docs/request-support/",children:[(0,De.jsx)(ll,{className:"w-5 h-5 mr-4"}),(0,De.jsx)("span",{children:"Request support"})]}),(0,De.jsxs)(al,{href:"https://pro.eventkoi.com/account",children:[(0,De.jsx)(cl,{className:"w-5 h-5 mr-4"}),(0,De.jsx)("span",{children:"Go to my account"})]})]})}const ul=Xi("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function fl({className:e,variant:t,...n}){return(0,De.jsx)("div",{className:Ni(ul({variant:t}),e),...n})}const hl=Mi("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),ml=Mi("CircleDotDashed",[["path",{d:"M10.1 2.18a9.93 9.93 0 0 1 3.8 0",key:"1qdqn0"}],["path",{d:"M17.6 3.71a9.95 9.95 0 0 1 2.69 2.7",key:"1bq7p6"}],["path",{d:"M21.82 10.1a9.93 9.93 0 0 1 0 3.8",key:"1rlaqf"}],["path",{d:"M20.29 17.6a9.95 9.95 0 0 1-2.7 2.69",key:"1xk03u"}],["path",{d:"M13.9 21.82a9.94 9.94 0 0 1-3.8 0",key:"l7re25"}],["path",{d:"M6.4 20.29a9.95 9.95 0 0 1-2.69-2.7",key:"1v18p6"}],["path",{d:"M2.18 13.9a9.93 9.93 0 0 1 0-3.8",key:"xdo6bj"}],["path",{d:"M3.71 6.4a9.95 9.95 0 0 1 2.7-2.69",key:"1jjmaz"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]),pl=Mi("Clock3",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16.5 12",key:"1aq6pp"}]]),gl=Mi("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]),vl=Mi("Repeat",[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]]),yl=Mi("Ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]]),bl={live:"Live",completed:"Completed",recurring:"Recurring",tbc:"Date not set",upcoming:"Upcoming",publish:"Upcoming",draft:"Draft",trash:"Trash"};function xl({status:e}){return(0,De.jsxs)(fl,{className:"absolute top-2 right-2 opacity-90 flex gap-1 font-normal text-[12px] py-1 px-3 pointer-events-none",children:["completed"==e&&(0,De.jsx)(hl,{className:"w-4 h-4 text-[#71ffca]"}),"draft"==e&&(0,De.jsx)(ml,{className:"w-4 h-4 text-white"}),"tbc"==e&&(0,De.jsx)(ml,{className:"w-4 h-4 text-white"}),"upcoming"==e&&(0,De.jsx)(pl,{className:"w-4 h-4 text-[#9addff]"}),"live"==e&&(0,De.jsx)(gl,{className:"w-4 h-4 text-[#ff8a88]"}),"publish"==e&&(0,De.jsx)(pl,{className:"w-4 h-4 text-[#48BEFA]"}),"recurring"==e&&(0,De.jsx)(vl,{className:"w-4 h-4 text-white"}),"trash"==e&&(0,De.jsx)(yl,{className:"w-4 h-4 text-primary/40"}),bl[e]]})}var wl=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce(((t,n)=>{const r=Gi(`Primitive.${n}`),o=e.forwardRef(((e,t)=>{const{asChild:o,...a}=e,s=o?r:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,De.jsx)(s,{...a,ref:t})}));return o.displayName=`Primitive.${n}`,{...t,[n]:o}}),{});function kl(e,t){e&&pe.flushSync((()=>e.dispatchEvent(t)))}var Sl=e.forwardRef(((e,t)=>{const{ratio:n=1,style:r,...o}=e;return(0,De.jsx)("div",{style:{position:"relative",width:"100%",paddingBottom:100/n+"%"},"data-radix-aspect-ratio-wrapper":"",children:(0,De.jsx)(wl.div,{...o,ref:t,style:{...r,position:"absolute",top:0,right:0,bottom:0,left:0}})})}));Sl.displayName="AspectRatio";const Cl=Sl;function _l({className:e,...t}){return(0,De.jsx)("div",{className:Ni("animate-pulse rounded-md bg-muted",e),...t})}function jl(){return(0,De.jsxs)("div",{className:"flex flex-col space-y-3",children:[(0,De.jsx)(Cl,{ratio:1.5,children:(0,De.jsx)(_l,{className:"h-full w-full rounded-xl"})}),(0,De.jsxs)("div",{className:"space-y-2",children:[(0,De.jsx)(_l,{className:"h-3 w-[80%]"}),(0,De.jsx)(_l,{className:"h-3 w-[60%]"}),(0,De.jsx)(_l,{className:"h-3 w-[40%]"})]})]})}const El=Mi("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]),Nl=Mi("MapPin",[["path",{d:"M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z",key:"2oe9fu"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]),Dl=Mi("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]),Tl=Mi("CirclePlus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]),Al=Mi("List",[["line",{x1:"8",x2:"21",y1:"6",y2:"6",key:"7ey8pc"}],["line",{x1:"8",x2:"21",y1:"12",y2:"12",key:"rjfblc"}],["line",{x1:"8",x2:"21",y1:"18",y2:"18",key:"c3b1m8"}],["line",{x1:"3",x2:"3.01",y1:"6",y2:"6",key:"1g7gq3"}],["line",{x1:"3",x2:"3.01",y1:"12",y2:"12",key:"1pjlvk"}],["line",{x1:"3",x2:"3.01",y1:"18",y2:"18",key:"28t2mc"}]]),Rl=Mi("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);function Ml(){const[t,n]=(0,e.useState)(null);(0,e.useEffect)((()=>{Ne()({path:`${eventkoi_params.api}/events?number=3`,method:"get"}).then(n).catch((()=>{}))}),[]);const r=e=>{if(!e.location_line)return null;const t="virtual"===e.type||"online"===e.type||e.location_line.startsWith("http://")||e.location_line.startsWith("https://"),n=t?El:Nl;return(0,De.jsxs)("span",{className:Ni("flex items-center gap-1 truncate text-muted-foreground",t&&"underline underline-offset-4"),title:e.location_line,onClick:n=>{t&&(n.preventDefault(),n.stopPropagation(),window.open(e.location_line,"_blank"))},children:[(0,De.jsx)(n,{className:"w-4 h-4 shrink-0"}),(0,De.jsx)("span",{className:"truncate",children:e.location_line})]})},o=1===t?.length?2:2===t?.length?1:0;return console.log(t),(0,De.jsxs)(Bi,{container:!0,children:[(0,De.jsx)(Vi,{level:3,children:"Events"}),(0,De.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6 sm:gap-8 lg:gap-10",children:[!t&&Array.from({length:3}).map(((e,t)=>(0,De.jsx)(jl,{},t))),t&&t.map((e=>(0,De.jsxs)(Se,{className:"flex flex-col space-y-3",to:`/events/${e.id}`,children:[(0,De.jsx)(Cl,{ratio:1.5,children:e.image?(0,De.jsxs)("div",{className:"h-full w-full flex items-center justify-center relative",children:[(0,De.jsx)(xl,{status:e.status}),(0,De.jsx)("img",{src:e.image,className:"h-full w-full rounded-xl object-cover",alt:e.title})]}):(0,De.jsxs)("div",{className:"h-full w-full rounded-xl border border-input flex items-center justify-center relative",children:[(0,De.jsx)(xl,{status:e.status}),(0,De.jsx)(Dl,{className:"w-6 h-6 text-muted-foreground/40"})]})}),(0,De.jsxs)("div",{className:"space-y-[2px]",children:[(0,De.jsx)("span",{className:"block text-base font-medium text-foreground truncate",title:e.title,children:e.title}),"tbc"!==e.status&&(0,De.jsx)("span",{className:"block text-muted-foreground",children:ws(e,e.timezone)}),r(e)]})]},`event-${e.id}`))),t&&0===t.length&&(0,De.jsx)("div",{className:"col-span-3 flex items-center justify-center text-muted-foreground/80 text-base",children:"There are no upcoming events."}),Array.from({length:o}).map(((e,t)=>(0,De.jsx)("div",{},`filler-${t}`))),(0,De.jsxs)("div",{className:"flex flex-col gap-4 justify-between h-full",children:[(0,De.jsx)(tl,{variant:"default",className:"flex flex-col grow gap-1 px-4 justify-center h-auto border rounded-xl items-center border-foreground bg-foreground text-white hover:text-card-foreground hover:bg-accent hover:border-foreground/40",asChild:!0,children:(0,De.jsxs)(Se,{to:"/events/add/main",children:[(0,De.jsx)(Tl,{className:"w-5 h-5"}),"Add new event"]})}),(0,De.jsx)(tl,{className:"flex flex-col grow gap-1 px-4 justify-center h-auto border rounded-xl items-center bg-transparent text-card-foreground hover:bg-accent border-foreground/40",asChild:!0,children:(0,De.jsxs)(Se,{to:"/events",children:[(0,De.jsx)(Al,{className:"w-5 h-5"}),"View all events"]})}),(0,De.jsx)(tl,{className:"flex flex-col grow gap-1 px-4 justify-center h-auto border rounded-xl items-center bg-transparent text-card-foreground hover:bg-accent border-foreground/40",asChild:!0,children:(0,De.jsxs)("a",{href:eventkoi_params?.default_calendar,target:"_blank",rel:"noopener noreferrer",children:[(0,De.jsx)(Rl,{className:"w-5 h-5"}),"View default calendar"]})})]})]})]})}function Ol(){return(0,De.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,De.jsx)("div",{className:"mx-auto flex w-full gap-2 justify-between",children:(0,De.jsx)(Vi,{children:"Dashboard"})}),(0,De.jsx)("div",{className:"grid",children:(0,De.jsx)(Ml,{})}),(0,De.jsxs)("div",{className:"grid gap-8 md:grid-cols-2",children:[(0,De.jsx)(dl,{}),(0,De.jsx)(ol,{})]})]})}function Il(){const t=K();return(0,e.useEffect)((()=>{t("/dashboard")})),null}function Pl(){return q("/events/:id/*")||q("/events/add")?(0,De.jsx)(de,{}):(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)(Li,{root:"events"}),(0,De.jsx)(Fi,{children:(0,De.jsx)(de,{})})]})}const Ll=(0,e.createContext)(null);function Fl(){const t=(0,e.useContext)(Ll);if(!t)throw new Error("useEventEditContext must be used within an EventEditContext.Provider");return t}const zl=Mi("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),Hl=Mi("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);function Vl(){const{event:e}=Fl(),{timestamp:t}=X(),n=Y().pathname.includes("/instances/edit/"),r=n?"Edit event instance":e?.id>0?"Edit event":"Add event";return(0,De.jsxs)("div",{className:"flex flex-col gap-[1px] flex-shrink-0 min-w-0 overflow-hidden",children:[(0,De.jsx)("div",{className:"flex items-center gap-1 text-muted-foreground text-sm font-normal",children:n?(0,De.jsxs)("div",{className:"hidden md:flex items-center gap-2 pl-6",children:[(0,De.jsx)(Se,{to:"/events",className:"text-foreground hover:underline flex items-center gap-1",children:"Back to all events"}),(0,De.jsx)(zl,{className:"w-4 h-4"}),(0,De.jsx)(Se,{to:`/events/${e?.id}/instances`,className:"text-foreground hover:underline",children:"Recurring event instances table"}),(0,De.jsx)(zl,{className:"w-4 h-4"}),(0,De.jsx)("span",{className:"text-muted-foreground",children:"Edit event instance"})]}):(0,De.jsx)(tl,{variant:"link",className:"p-0 h-auto text-muted-foreground font-normal",asChild:!0,children:(0,De.jsxs)(Se,{to:"/events",children:[(0,De.jsx)(Hl,{className:"mr-2 h-4 w-4"}),"Back to all events"]})})}),n&&(0,De.jsx)("div",{className:"flex sm:hidden items-center text-sm text-muted-foreground font-normal pl-0",children:(0,De.jsxs)(Se,{to:`/events/${e?.id}/instances`,className:"hover:underline flex items-center gap-1",children:[(0,De.jsx)(Hl,{className:"h-4 w-4"}),"Back"]})}),(0,De.jsx)("div",{children:(0,De.jsx)(Vi,{level:3,className:n?"mt-[2px] pl-2 md:pl-6 truncate":"mt-[2px] pl-6 truncate",children:r})})]})}function Bl(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function Wl(t,n=[]){let r=[];const o=()=>{const n=r.map((t=>e.createContext(t)));return function(r){const o=r?.[t]||n;return e.useMemo((()=>({[`__scope${t}`]:{...r,[t]:o}})),[r,o])}};return o.scopeName=t,[function(n,o){const a=e.createContext(o),s=r.length;r=[...r,o];const i=n=>{const{scope:r,children:o,...i}=n,l=r?.[t]?.[s]||a,c=e.useMemo((()=>i),Object.values(i));return(0,De.jsx)(l.Provider,{value:c,children:o})};return i.displayName=n+"Provider",[i,function(r,i){const l=i?.[t]?.[s]||a,c=e.useContext(l);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${r}\` must be used within \`${n}\``)}]},Ul(o,...n)]}function Ul(...t){const n=t[0];if(1===t.length)return n;const r=()=>{const r=t.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(t){const o=r.reduce(((e,{useScope:n,scopeName:r})=>({...e,...n(t)[`__scope${r}`]})),{});return e.useMemo((()=>({[`__scope${n.scopeName}`]:o})),[o])}};return r.scopeName=n.scopeName,r}var $l=globalThis?.document?e.useLayoutEffect:()=>{},Gl=n[" useInsertionEffect ".trim().toString()]||$l;function Yl({prop:t,defaultProp:n,onChange:r=()=>{},caller:o}){const[a,s,i]=function({defaultProp:t,onChange:n}){const[r,o]=e.useState(t),a=e.useRef(r),s=e.useRef(n);return Gl((()=>{s.current=n}),[n]),e.useEffect((()=>{a.current!==r&&(s.current?.(r),a.current=r)}),[r,a]),[r,o,s]}({defaultProp:n,onChange:r}),l=void 0!==t,c=l?t:a;{const n=e.useRef(void 0!==t);e.useEffect((()=>{const e=n.current;if(e!==l){const t=e?"controlled":"uncontrolled",n=l?"controlled":"uncontrolled";console.warn(`${o} is changing from ${t} to ${n}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}n.current=l}),[l,o])}const d=e.useCallback((e=>{if(l){const n=function(e){return"function"==typeof e}(e)?e(t):e;n!==t&&i.current?.(n)}else s(e)}),[l,t,s,i]);return[c,d]}function ql(t){const n=t+"CollectionProvider",[r,o]=Wl(n),[a,s]=r(n,{collectionRef:{current:null},itemMap:new Map}),i=t=>{const{scope:n,children:r}=t,o=e.useRef(null),s=e.useRef(new Map).current;return(0,De.jsx)(a,{scope:n,itemMap:s,collectionRef:o,children:r})};i.displayName=n;const l=t+"CollectionSlot",c=Gi(l),d=e.forwardRef(((e,t)=>{const{scope:n,children:r}=e,o=$i(t,s(l,n).collectionRef);return(0,De.jsx)(c,{ref:o,children:r})}));d.displayName=l;const u=t+"CollectionItemSlot",f="data-radix-collection-item",h=Gi(u),m=e.forwardRef(((t,n)=>{const{scope:r,children:o,...a}=t,i=e.useRef(null),l=$i(n,i),c=s(u,r);return e.useEffect((()=>(c.itemMap.set(i,{ref:i,...a}),()=>{c.itemMap.delete(i)}))),(0,De.jsx)(h,{[f]:"",ref:l,children:o})}));return m.displayName=u,[{Provider:i,Slot:d,ItemSlot:m},function(n){const r=s(t+"CollectionConsumer",n),o=e.useCallback((()=>{const e=r.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${f}]`)),n=Array.from(r.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)));return n}),[r.collectionRef,r.itemMap]);return o},o]}Symbol("RADIX:SYNC_STATE");Map;var Zl=e.createContext(void 0);function Kl(t){const n=e.useContext(Zl);return t||n||"ltr"}function Ql(t){const n=e.useRef(t);return e.useEffect((()=>{n.current=t})),e.useMemo((()=>(...e)=>n.current?.(...e)),[])}var Jl,Xl="dismissableLayer.update",ec=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),tc=e.forwardRef(((t,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:i,onDismiss:l,...c}=t,d=e.useContext(ec),[u,f]=e.useState(null),h=u?.ownerDocument??globalThis?.document,[,m]=e.useState({}),p=$i(n,(e=>f(e))),g=Array.from(d.layers),[v]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(v),b=u?g.indexOf(u):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,w=b>=y,k=function(t,n=globalThis?.document){const r=Ql(t),o=e.useRef(!1),a=e.useRef((()=>{}));return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){let t=function(){oc("dismissableLayer.pointerDownOutside",r,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(n.removeEventListener("click",a.current),a.current=t,n.addEventListener("click",a.current,{once:!0})):t()}else n.removeEventListener("click",a.current);o.current=!1},t=window.setTimeout((()=>{n.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(t),n.removeEventListener("pointerdown",e),n.removeEventListener("click",a.current)}}),[n,r]),{onPointerDownCapture:()=>o.current=!0}}((e=>{const t=e.target,n=[...d.branches].some((e=>e.contains(t)));w&&!n&&(a?.(e),i?.(e),e.defaultPrevented||l?.())}),h),S=function(t,n=globalThis?.document){const r=Ql(t),o=e.useRef(!1);return e.useEffect((()=>{const e=e=>{e.target&&!o.current&&oc("dismissableLayer.focusOutside",r,{originalEvent:e},{discrete:!1})};return n.addEventListener("focusin",e),()=>n.removeEventListener("focusin",e)}),[n,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}((e=>{const t=e.target;[...d.branches].some((e=>e.contains(t)))||(s?.(e),i?.(e),e.defaultPrevented||l?.())}),h);return function(t,n=globalThis?.document){const r=Ql(t);e.useEffect((()=>{const e=e=>{"Escape"===e.key&&r(e)};return n.addEventListener("keydown",e,{capture:!0}),()=>n.removeEventListener("keydown",e,{capture:!0})}),[r,n])}((e=>{b===d.layers.size-1&&(o?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))}),h),e.useEffect((()=>{if(u)return r&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(Jl=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(u)),d.layers.add(u),rc(),()=>{r&&1===d.layersWithOutsidePointerEventsDisabled.size&&(h.body.style.pointerEvents=Jl)}}),[u,h,r,d]),e.useEffect((()=>()=>{u&&(d.layers.delete(u),d.layersWithOutsidePointerEventsDisabled.delete(u),rc())}),[u,d]),e.useEffect((()=>{const e=()=>m({});return document.addEventListener(Xl,e),()=>document.removeEventListener(Xl,e)}),[]),(0,De.jsx)(wl.div,{...c,ref:p,style:{pointerEvents:x?w?"auto":"none":void 0,...t.style},onFocusCapture:Bl(t.onFocusCapture,S.onFocusCapture),onBlurCapture:Bl(t.onBlurCapture,S.onBlurCapture),onPointerDownCapture:Bl(t.onPointerDownCapture,k.onPointerDownCapture)})}));tc.displayName="DismissableLayer";var nc=e.forwardRef(((t,n)=>{const r=e.useContext(ec),o=e.useRef(null),a=$i(n,o);return e.useEffect((()=>{const e=o.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}}),[r.branches]),(0,De.jsx)(wl.div,{...t,ref:a})}));function rc(){const e=new CustomEvent(Xl);document.dispatchEvent(e)}function oc(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?kl(o,a):o.dispatchEvent(a)}nc.displayName="DismissableLayerBranch";var ac=0;function sc(){e.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ic()),document.body.insertAdjacentElement("beforeend",e[1]??ic()),ac++,()=>{1===ac&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),ac--}}),[])}function ic(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var lc="focusScope.autoFocusOnMount",cc="focusScope.autoFocusOnUnmount",dc={bubbles:!1,cancelable:!0},uc=e.forwardRef(((t,n)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:a,onUnmountAutoFocus:s,...i}=t,[l,c]=e.useState(null),d=Ql(a),u=Ql(s),f=e.useRef(null),h=$i(n,(e=>c(e))),m=e.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;e.useEffect((()=>{if(o){let e=function(e){if(m.paused||!l)return;const t=e.target;l.contains(t)?f.current=t:pc(f.current,{select:!0})},t=function(e){if(m.paused||!l)return;const t=e.relatedTarget;null!==t&&(l.contains(t)||pc(f.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&pc(l)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[o,l,m.paused]),e.useEffect((()=>{if(l){gc.add(m);const e=document.activeElement;if(!l.contains(e)){const t=new CustomEvent(lc,dc);l.addEventListener(lc,d),l.dispatchEvent(t),t.defaultPrevented||(function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(pc(r,{select:t}),document.activeElement!==n)return}(fc(l).filter((e=>"A"!==e.tagName)),{select:!0}),document.activeElement===e&&pc(l))}return()=>{l.removeEventListener(lc,d),setTimeout((()=>{const t=new CustomEvent(cc,dc);l.addEventListener(cc,u),l.dispatchEvent(t),t.defaultPrevented||pc(e??document.body,{select:!0}),l.removeEventListener(cc,u),gc.remove(m)}),0)}}}),[l,d,u,m]);const p=e.useCallback((e=>{if(!r&&!o)return;if(m.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){const t=e.currentTarget,[o,a]=function(e){const t=fc(e);return[hc(t,e),hc(t.reverse(),e)]}(t);o&&a?e.shiftKey||n!==a?e.shiftKey&&n===o&&(e.preventDefault(),r&&pc(a,{select:!0})):(e.preventDefault(),r&&pc(o,{select:!0})):n===t&&e.preventDefault()}}),[r,o,m.paused]);return(0,De.jsx)(wl.div,{tabIndex:-1,...i,ref:h,onKeyDown:p})}));function fc(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function hc(e,t){for(const n of e)if(!mc(n,{upTo:t}))return n}function mc(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function pc(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}uc.displayName="FocusScope";var gc=function(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=vc(e,t),e.unshift(t)},remove(t){e=vc(e,t),e[0]?.resume()}}}();function vc(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var yc=n[" useId ".trim().toString()]||(()=>{}),bc=0;function xc(t){const[n,r]=e.useState(yc());return $l((()=>{t||r((e=>e??String(bc++)))}),[t]),t||(n?`radix-${n}`:"")}const wc=["top","right","bottom","left"],kc=Math.min,Sc=Math.max,Cc=Math.round,_c=Math.floor,jc=e=>({x:e,y:e}),Ec={left:"right",right:"left",bottom:"top",top:"bottom"},Nc={start:"end",end:"start"};function Dc(e,t,n){return Sc(e,kc(t,n))}function Tc(e,t){return"function"==typeof e?e(t):e}function Ac(e){return e.split("-")[0]}function Rc(e){return e.split("-")[1]}function Mc(e){return"x"===e?"y":"x"}function Oc(e){return"y"===e?"height":"width"}function Ic(e){return["top","bottom"].includes(Ac(e))?"y":"x"}function Pc(e){return Mc(Ic(e))}function Lc(e){return e.replace(/start|end/g,(e=>Nc[e]))}function Fc(e){return e.replace(/left|right|bottom|top/g,(e=>Ec[e]))}function zc(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Hc(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Vc(e,t,n){let{reference:r,floating:o}=e;const a=Ic(t),s=Pc(t),i=Oc(s),l=Ac(t),c="y"===a,d=r.x+r.width/2-o.width/2,u=r.y+r.height/2-o.height/2,f=r[i]/2-o[i]/2;let h;switch(l){case"top":h={x:d,y:r.y-o.height};break;case"bottom":h={x:d,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:u};break;case"left":h={x:r.x-o.width,y:u};break;default:h={x:r.x,y:r.y}}switch(Rc(t)){case"start":h[s]-=f*(n&&c?-1:1);break;case"end":h[s]+=f*(n&&c?-1:1)}return h}async function Bc(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:a,rects:s,elements:i,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:f=!1,padding:h=0}=Tc(t,e),m=zc(h),p=i[f?"floating"===u?"reference":"floating":u],g=Hc(await a.getClippingRect({element:null==(n=await(null==a.isElement?void 0:a.isElement(p)))||n?p:p.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(i.floating)),boundary:c,rootBoundary:d,strategy:l})),v="floating"===u?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,y=await(null==a.getOffsetParent?void 0:a.getOffsetParent(i.floating)),b=await(null==a.isElement?void 0:a.isElement(y))&&await(null==a.getScale?void 0:a.getScale(y))||{x:1,y:1},x=Hc(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:v,offsetParent:y,strategy:l}):v);return{top:(g.top-x.top+m.top)/b.y,bottom:(x.bottom-g.bottom+m.bottom)/b.y,left:(g.left-x.left+m.left)/b.x,right:(x.right-g.right+m.right)/b.x}}function Wc(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Uc(e){return wc.some((t=>e[t]>=0))}function $c(){return"undefined"!=typeof window}function Gc(e){return Zc(e)?(e.nodeName||"").toLowerCase():"#document"}function Yc(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function qc(e){var t;return null==(t=(Zc(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Zc(e){return!!$c()&&(e instanceof Node||e instanceof Yc(e).Node)}function Kc(e){return!!$c()&&(e instanceof Element||e instanceof Yc(e).Element)}function Qc(e){return!!$c()&&(e instanceof HTMLElement||e instanceof Yc(e).HTMLElement)}function Jc(e){return!(!$c()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Yc(e).ShadowRoot)}function Xc(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ad(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function ed(e){return["table","td","th"].includes(Gc(e))}function td(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function nd(e){const t=rd(),n=Kc(e)?ad(e):e;return["transform","translate","scale","rotate","perspective"].some((e=>!!n[e]&&"none"!==n[e]))||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","translate","scale","rotate","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function rd(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function od(e){return["html","body","#document"].includes(Gc(e))}function ad(e){return Yc(e).getComputedStyle(e)}function sd(e){return Kc(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function id(e){if("html"===Gc(e))return e;const t=e.assignedSlot||e.parentNode||Jc(e)&&e.host||qc(e);return Jc(t)?t.host:t}function ld(e){const t=id(e);return od(t)?e.ownerDocument?e.ownerDocument.body:e.body:Qc(t)&&Xc(t)?t:ld(t)}function cd(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=ld(e),a=o===(null==(r=e.ownerDocument)?void 0:r.body),s=Yc(o);if(a){const e=dd(s);return t.concat(s,s.visualViewport||[],Xc(o)?o:[],e&&n?cd(e):[])}return t.concat(o,cd(o,[],n))}function dd(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ud(e){const t=ad(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Qc(e),a=o?e.offsetWidth:n,s=o?e.offsetHeight:r,i=Cc(n)!==a||Cc(r)!==s;return i&&(n=a,r=s),{width:n,height:r,$:i}}function fd(e){return Kc(e)?e:e.contextElement}function hd(e){const t=fd(e);if(!Qc(t))return jc(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=ud(t);let s=(a?Cc(n.width):n.width)/r,i=(a?Cc(n.height):n.height)/o;return s&&Number.isFinite(s)||(s=1),i&&Number.isFinite(i)||(i=1),{x:s,y:i}}const md=jc(0);function pd(e){const t=Yc(e);return rd()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:md}function gd(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),a=fd(e);let s=jc(1);t&&(r?Kc(r)&&(s=hd(r)):s=hd(e));const i=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Yc(e))&&t}(a,n,r)?pd(a):jc(0);let l=(o.left+i.x)/s.x,c=(o.top+i.y)/s.y,d=o.width/s.x,u=o.height/s.y;if(a){const e=Yc(a),t=r&&Kc(r)?Yc(r):r;let n=e,o=dd(n);for(;o&&r&&t!==n;){const e=hd(o),t=o.getBoundingClientRect(),r=ad(o),a=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,s=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,d*=e.x,u*=e.y,l+=a,c+=s,n=Yc(o),o=dd(n)}}return Hc({width:d,height:u,x:l,y:c})}function vd(e,t){const n=sd(e).scrollLeft;return t?t.left+n:gd(qc(e)).left+n}function yd(e,t,n){void 0===n&&(n=!1);const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:vd(e,r)),y:r.top+t.scrollTop}}function bd(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Yc(e),r=qc(e),o=n.visualViewport;let a=r.clientWidth,s=r.clientHeight,i=0,l=0;if(o){a=o.width,s=o.height;const e=rd();(!e||e&&"fixed"===t)&&(i=o.offsetLeft,l=o.offsetTop)}return{width:a,height:s,x:i,y:l}}(e,n);else if("document"===t)r=function(e){const t=qc(e),n=sd(e),r=e.ownerDocument.body,o=Sc(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Sc(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+vd(e);const i=-n.scrollTop;return"rtl"===ad(r).direction&&(s+=Sc(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:s,y:i}}(qc(e));else if(Kc(t))r=function(e,t){const n=gd(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=Qc(e)?hd(e):jc(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:o*a.x,y:r*a.y}}(t,n);else{const n=pd(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Hc(r)}function xd(e,t){const n=id(e);return!(n===t||!Kc(n)||od(n))&&("fixed"===ad(n).position||xd(n,t))}function wd(e,t,n){const r=Qc(t),o=qc(t),a="fixed"===n,s=gd(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const l=jc(0);function c(){l.x=vd(o)}if(r||!r&&!a)if(("body"!==Gc(t)||Xc(o))&&(i=sd(t)),r){const e=gd(t,!0,a,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&c();a&&!r&&o&&c();const d=!o||r||a?jc(0):yd(o,i);return{x:s.left+i.scrollLeft-l.x-d.x,y:s.top+i.scrollTop-l.y-d.y,width:s.width,height:s.height}}function kd(e){return"static"===ad(e).position}function Sd(e,t){if(!Qc(e)||"fixed"===ad(e).position)return null;if(t)return t(e);let n=e.offsetParent;return qc(e)===n&&(n=n.ownerDocument.body),n}function Cd(e,t){const n=Yc(e);if(td(e))return n;if(!Qc(e)){let t=id(e);for(;t&&!od(t);){if(Kc(t)&&!kd(t))return t;t=id(t)}return n}let r=Sd(e,t);for(;r&&ed(r)&&kd(r);)r=Sd(r,t);return r&&od(r)&&kd(r)&&!nd(r)?n:r||function(e){let t=id(e);for(;Qc(t)&&!od(t);){if(nd(t))return t;if(td(t))return null;t=id(t)}return null}(e)||n}const _d={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a="fixed"===o,s=qc(r),i=!!t&&td(t.floating);if(r===s||i&&a)return n;let l={scrollLeft:0,scrollTop:0},c=jc(1);const d=jc(0),u=Qc(r);if((u||!u&&!a)&&(("body"!==Gc(r)||Xc(s))&&(l=sd(r)),Qc(r))){const e=gd(r);c=hd(r),d.x=e.x+r.clientLeft,d.y=e.y+r.clientTop}const f=!s||u||a?jc(0):yd(s,l,!0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+f.x,y:n.y*c.y-l.scrollTop*c.y+d.y+f.y}},getDocumentElement:qc,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[..."clippingAncestors"===n?td(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=cd(e,[],!1).filter((e=>Kc(e)&&"body"!==Gc(e))),o=null;const a="fixed"===ad(e).position;let s=a?id(e):e;for(;Kc(s)&&!od(s);){const t=ad(s),n=nd(s);n||"fixed"!==t.position||(o=null),(a?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||Xc(s)&&!n&&xd(e,s))?r=r.filter((e=>e!==s)):o=t,s=id(s)}return t.set(e,r),r}(t,this._c):[].concat(n),r],s=a[0],i=a.reduce(((e,n)=>{const r=bd(t,n,o);return e.top=Sc(r.top,e.top),e.right=kc(r.right,e.right),e.bottom=kc(r.bottom,e.bottom),e.left=Sc(r.left,e.left),e}),bd(t,s,o));return{width:i.right-i.left,height:i.bottom-i.top,x:i.left,y:i.top}},getOffsetParent:Cd,getElementRects:async function(e){const t=this.getOffsetParent||Cd,n=this.getDimensions,r=await n(e.floating);return{reference:wd(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=ud(e);return{width:t,height:n}},getScale:hd,isElement:Kc,isRTL:function(e){return"rtl"===ad(e).direction}};function jd(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}const Ed=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:s,middlewareData:i}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,a=await(null==r.isRTL?void 0:r.isRTL(o.floating)),s=Ac(n),i=Rc(n),l="y"===Ic(n),c=["left","top"].includes(s)?-1:1,d=a&&l?-1:1,u=Tc(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:m}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return i&&"number"==typeof m&&(h="end"===i?-1*m:m),l?{x:h*d,y:f*c}:{x:f*c,y:h*d}}(t,e);return s===(null==(n=i.offset)?void 0:n.placement)&&null!=(r=i.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:s}}}}},Nd=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:i={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Tc(e,t),c={x:n,y:r},d=await Bc(t,l),u=Ic(Ac(o)),f=Mc(u);let h=c[f],m=c[u];if(a){const e="y"===f?"bottom":"right";h=Dc(h+d["y"===f?"top":"left"],h,h-d[e])}if(s){const e="y"===u?"bottom":"right";m=Dc(m+d["y"===u?"top":"left"],m,m-d[e])}const p=i.fn({...t,[f]:h,[u]:m});return{...p,data:{x:p.x-n,y:p.y-r,enabled:{[f]:a,[u]:s}}}}}},Dd=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:s,initialPlacement:i,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:p=!0,...g}=Tc(e,t);if(null!=(n=a.arrow)&&n.alignmentOffset)return{};const v=Ac(o),y=Ic(i),b=Ac(i)===i,x=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=f||(b||!p?[Fc(i)]:function(e){const t=Fc(e);return[Lc(e),t,Lc(t)]}(i)),k="none"!==m;!f&&k&&w.push(...function(e,t,n,r){const o=Rc(e);let a=function(e,t,n){const r=["left","right"],o=["right","left"],a=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?a:s;default:return[]}}(Ac(e),"start"===n,r);return o&&(a=a.map((e=>e+"-"+o)),t&&(a=a.concat(a.map(Lc)))),a}(i,p,m,x));const S=[i,...w],C=await Bc(t,g),_=[];let j=(null==(r=a.flip)?void 0:r.overflows)||[];if(d&&_.push(C[v]),u){const e=function(e,t,n){void 0===n&&(n=!1);const r=Rc(e),o=Pc(e),a=Oc(o);let s="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=Fc(s)),[s,Fc(s)]}(o,s,x);_.push(C[e[0]],C[e[1]])}if(j=[...j,{placement:o,overflows:_}],!_.every((e=>e<=0))){var E,N;const e=((null==(E=a.flip)?void 0:E.index)||0)+1,t=S[e];if(t){var D;const n="alignment"===u&&y!==Ic(t),r=(null==(D=j[0])?void 0:D.overflows[0])>0;if(!n||r)return{data:{index:e,overflows:j},reset:{placement:t}}}let n=null==(N=j.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:N.placement;if(!n)switch(h){case"bestFit":{var T;const e=null==(T=j.filter((e=>{if(k){const t=Ic(e.placement);return t===y||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:T[0];e&&(n=e);break}case"initialPlacement":n=i}if(o!==n)return{reset:{placement:n}}}return{}}}},Td=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:s,elements:i}=t,{apply:l=()=>{},...c}=Tc(e,t),d=await Bc(t,c),u=Ac(o),f=Rc(o),h="y"===Ic(o),{width:m,height:p}=a.floating;let g,v;"top"===u||"bottom"===u?(g=u,v=f===(await(null==s.isRTL?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(v=u,g="end"===f?"top":"bottom");const y=p-d.top-d.bottom,b=m-d.left-d.right,x=kc(p-d[g],y),w=kc(m-d[v],b),k=!t.middlewareData.shift;let S=x,C=w;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(C=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(S=y),k&&!f){const e=Sc(d.left,0),t=Sc(d.right,0),n=Sc(d.top,0),r=Sc(d.bottom,0);h?C=m-2*(0!==e||0!==t?e+t:Sc(d.left,d.right)):S=p-2*(0!==n||0!==r?n+r:Sc(d.top,d.bottom))}await l({...t,availableWidth:C,availableHeight:S});const _=await s.getDimensions(i.floating);return m!==_.width||p!==_.height?{reset:{rects:!0}}:{}}}},Ad=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Tc(e,t);switch(r){case"referenceHidden":{const e=Wc(await Bc(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Uc(e)}}}case"escaped":{const e=Wc(await Bc(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Uc(e)}}}default:return{}}}}},Rd=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:s,elements:i,middlewareData:l}=t,{element:c,padding:d=0}=Tc(e,t)||{};if(null==c)return{};const u=zc(d),f={x:n,y:r},h=Pc(o),m=Oc(h),p=await s.getDimensions(c),g="y"===h,v=g?"top":"left",y=g?"bottom":"right",b=g?"clientHeight":"clientWidth",x=a.reference[m]+a.reference[h]-f[h]-a.floating[m],w=f[h]-a.reference[h],k=await(null==s.getOffsetParent?void 0:s.getOffsetParent(c));let S=k?k[b]:0;S&&await(null==s.isElement?void 0:s.isElement(k))||(S=i.floating[b]||a.floating[m]);const C=x/2-w/2,_=S/2-p[m]/2-1,j=kc(u[v],_),E=kc(u[y],_),N=j,D=S-p[m]-E,T=S/2-p[m]/2+C,A=Dc(N,T,D),R=!l.arrow&&null!=Rc(o)&&T!==A&&a.reference[m]/2-(T<N?j:E)-p[m]/2<0,M=R?T<N?T-N:T-D:0;return{[h]:f[h]+M,data:{[h]:A,centerOffset:T-A-M,...R&&{alignmentOffset:M}},reset:R}}}),Md=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:l=!0,crossAxis:c=!0}=Tc(e,t),d={x:n,y:r},u=Ic(o),f=Mc(u);let h=d[f],m=d[u];const p=Tc(i,t),g="number"==typeof p?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(l){const e="y"===f?"height":"width",t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;h<t?h=t:h>n&&(h=n)}if(c){var v,y;const e="y"===f?"width":"height",t=["top","left"].includes(Ac(o)),n=a.reference[u]-a.floating[e]+(t&&(null==(v=s.offset)?void 0:v[u])||0)+(t?0:g.crossAxis),r=a.reference[u]+a.reference[e]+(t?0:(null==(y=s.offset)?void 0:y[u])||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:h,[u]:m}}}},Od=(e,t,n)=>{const r=new Map,o={platform:_d,...n},a={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:s}=n,i=a.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:u}=Vc(c,r,l),f=r,h={},m=0;for(let n=0;n<i.length;n++){const{name:a,fn:p}=i[n],{x:g,y:v,data:y,reset:b}=await p({x:d,y:u,initialPlacement:r,placement:f,strategy:o,middlewareData:h,rects:c,platform:s,elements:{reference:e,floating:t}});d=null!=g?g:d,u=null!=v?v:u,h={...h,[a]:{...h[a],...y}},b&&m<=50&&(m++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(c=!0===b.rects?await s.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:d,y:u}=Vc(c,f,l))),n=-1)}return{x:d,y:u,placement:f,strategy:o,middlewareData:h}})(e,t,{...o,platform:a})};var Id="undefined"!=typeof document?e.useLayoutEffect:e.useEffect;function Pd(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!Pd(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||Pd(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function Ld(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Fd(e,t){const n=Ld(e);return Math.round(t*n)/n}function zd(t){const n=e.useRef(t);return Id((()=>{n.current=t})),n}const Hd=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?Rd({element:n.current,padding:r}).fn(t):{}:n?Rd({element:n,padding:r}).fn(t):{};var o}}),Vd=(e,t)=>({...Ed(e),options:[e,t]}),Bd=(e,t)=>({...Nd(e),options:[e,t]}),Wd=(e,t)=>({...Md(e),options:[e,t]}),Ud=(e,t)=>({...Dd(e),options:[e,t]}),$d=(e,t)=>({...Td(e),options:[e,t]}),Gd=(e,t)=>({...Ad(e),options:[e,t]}),Yd=(e,t)=>({...Hd(e),options:[e,t]});var qd=e.forwardRef(((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return(0,De.jsx)(wl.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:(0,De.jsx)("polygon",{points:"0,0 30,0 15,10"})})}));qd.displayName="Arrow";var Zd=qd;function Kd(t){const[n,r]=e.useState(void 0);return $l((()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const e=new ResizeObserver((e=>{if(!Array.isArray(e))return;if(!e.length)return;const n=e[0];let o,a;if("borderBoxSize"in n){const e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,a=t.blockSize}else o=t.offsetWidth,a=t.offsetHeight;r({width:o,height:a})}));return e.observe(t,{box:"border-box"}),()=>e.unobserve(t)}r(void 0)}),[t]),n}var Qd="Popper",[Jd,Xd]=Wl(Qd),[eu,tu]=Jd(Qd),nu=t=>{const{__scopePopper:n,children:r}=t,[o,a]=e.useState(null);return(0,De.jsx)(eu,{scope:n,anchor:o,onAnchorChange:a,children:r})};nu.displayName=Qd;var ru="PopperAnchor",ou=e.forwardRef(((t,n)=>{const{__scopePopper:r,virtualRef:o,...a}=t,s=tu(ru,r),i=e.useRef(null),l=$i(n,i);return e.useEffect((()=>{s.onAnchorChange(o?.current||i.current)})),o?null:(0,De.jsx)(wl.div,{...a,ref:l})}));ou.displayName=ru;var au="PopperContent",[su,iu]=Jd(au),lu=e.forwardRef(((t,n)=>{const{__scopePopper:r,side:o="bottom",sideOffset:a=0,align:s="center",alignOffset:i=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:u=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:m="optimized",onPlaced:p,...g}=t,v=tu(au,r),[y,b]=e.useState(null),x=$i(n,(e=>b(e))),[w,k]=e.useState(null),S=Kd(w),C=S?.width??0,_=S?.height??0,j=o+("center"!==s?"-"+s:""),E="number"==typeof u?u:{top:0,right:0,bottom:0,left:0,...u},N=Array.isArray(d)?d:[d],D=N.length>0,T={padding:E,boundary:N.filter(fu),altBoundary:D},{refs:A,floatingStyles:R,placement:M,isPositioned:O,middlewareData:I}=function(t){void 0===t&&(t={});const{placement:n="bottom",strategy:r="absolute",middleware:o=[],platform:a,elements:{reference:s,floating:i}={},transform:l=!0,whileElementsMounted:c,open:d}=t,[u,f]=e.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[h,m]=e.useState(o);Pd(h,o)||m(o);const[p,g]=e.useState(null),[v,y]=e.useState(null),b=e.useCallback((e=>{e!==S.current&&(S.current=e,g(e))}),[]),x=e.useCallback((e=>{e!==C.current&&(C.current=e,y(e))}),[]),w=s||p,k=i||v,S=e.useRef(null),C=e.useRef(null),_=e.useRef(u),j=null!=c,E=zd(c),N=zd(a),D=zd(d),T=e.useCallback((()=>{if(!S.current||!C.current)return;const e={placement:n,strategy:r,middleware:h};N.current&&(e.platform=N.current),Od(S.current,C.current,e).then((e=>{const t={...e,isPositioned:!1!==D.current};A.current&&!Pd(_.current,t)&&(_.current=t,pe.flushSync((()=>{f(t)})))}))}),[h,n,r,N,D]);Id((()=>{!1===d&&_.current.isPositioned&&(_.current.isPositioned=!1,f((e=>({...e,isPositioned:!1}))))}),[d]);const A=e.useRef(!1);Id((()=>(A.current=!0,()=>{A.current=!1})),[]),Id((()=>{if(w&&(S.current=w),k&&(C.current=k),w&&k){if(E.current)return E.current(w,k,T);T()}}),[w,k,T,E,j]);const R=e.useMemo((()=>({reference:S,floating:C,setReference:b,setFloating:x})),[b,x]),M=e.useMemo((()=>({reference:w,floating:k})),[w,k]),O=e.useMemo((()=>{const e={position:r,left:0,top:0};if(!M.floating)return e;const t=Fd(M.floating,u.x),n=Fd(M.floating,u.y);return l?{...e,transform:"translate("+t+"px, "+n+"px)",...Ld(M.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}}),[r,l,M.floating,u.x,u.y]);return e.useMemo((()=>({...u,update:T,refs:R,elements:M,floatingStyles:O})),[u,T,R,M,O])}({strategy:"fixed",placement:j,whileElementsMounted:(...e)=>function(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:i="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=fd(e),d=o||a?[...c?cd(c):[],...cd(t)]:[];d.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),a&&e.addEventListener("resize",n)}));const u=c&&i?function(e,t){let n,r=null;const o=qc(e);function a(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function s(i,l){void 0===i&&(i=!1),void 0===l&&(l=1),a();const c=e.getBoundingClientRect(),{left:d,top:u,width:f,height:h}=c;if(i||t(),!f||!h)return;const m={rootMargin:-_c(u)+"px "+-_c(o.clientWidth-(d+f))+"px "+-_c(o.clientHeight-(u+h))+"px "+-_c(d)+"px",threshold:Sc(0,kc(1,l))||1};let p=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!p)return s();r?s(!1,r):n=setTimeout((()=>{s(!1,1e-7)}),1e3)}1!==r||jd(c,e.getBoundingClientRect())||s(),p=!1}try{r=new IntersectionObserver(g,{...m,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,m)}r.observe(e)}(!0),a}(c,n):null;let f,h=-1,m=null;s&&(m=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&m&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame((()=>{var e;null==(e=m)||e.observe(t)}))),n()})),c&&!l&&m.observe(c),m.observe(t));let p=l?gd(e):null;return l&&function t(){const r=gd(e);p&&!jd(p,r)&&n(),p=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;d.forEach((e=>{o&&e.removeEventListener("scroll",n),a&&e.removeEventListener("resize",n)})),null==u||u(),null==(e=m)||e.disconnect(),m=null,l&&cancelAnimationFrame(f)}}(...e,{animationFrame:"always"===m}),elements:{reference:v.anchor},middleware:[Vd({mainAxis:a+_,alignmentAxis:i}),c&&Bd({mainAxis:!0,crossAxis:!1,limiter:"partial"===f?Wd():void 0,...T}),c&&Ud({...T}),$d({...T,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:a}=t.reference,s=e.floating.style;s.setProperty("--radix-popper-available-width",`${n}px`),s.setProperty("--radix-popper-available-height",`${r}px`),s.setProperty("--radix-popper-anchor-width",`${o}px`),s.setProperty("--radix-popper-anchor-height",`${a}px`)}}),w&&Yd({element:w,padding:l}),hu({arrowWidth:C,arrowHeight:_}),h&&Gd({strategy:"referenceHidden",...T})]}),[P,L]=mu(M),F=Ql(p);$l((()=>{O&&F?.()}),[O,F]);const z=I.arrow?.x,H=I.arrow?.y,V=0!==I.arrow?.centerOffset,[B,W]=e.useState();return $l((()=>{y&&W(window.getComputedStyle(y).zIndex)}),[y]),(0,De.jsx)("div",{ref:A.setFloating,"data-radix-popper-content-wrapper":"",style:{...R,transform:O?R.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:B,"--radix-popper-transform-origin":[I.transformOrigin?.x,I.transformOrigin?.y].join(" "),...I.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:(0,De.jsx)(su,{scope:r,placedSide:P,onArrowChange:k,arrowX:z,arrowY:H,shouldHideArrow:V,children:(0,De.jsx)(wl.div,{"data-side":P,"data-align":L,...g,ref:x,style:{...g.style,animation:O?void 0:"none"}})})})}));lu.displayName=au;var cu="PopperArrow",du={top:"bottom",right:"left",bottom:"top",left:"right"},uu=e.forwardRef((function(e,t){const{__scopePopper:n,...r}=e,o=iu(cu,n),a=du[o.placedSide];return(0,De.jsx)("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:(0,De.jsx)(Zd,{...r,ref:t,style:{...r.style,display:"block"}})})}));function fu(e){return null!==e}uu.displayName=cu;var hu=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,a=0!==o.arrow?.centerOffset,s=a?0:e.arrowWidth,i=a?0:e.arrowHeight,[l,c]=mu(n),d={start:"0%",center:"50%",end:"100%"}[c],u=(o.arrow?.x??0)+s/2,f=(o.arrow?.y??0)+i/2;let h="",m="";return"bottom"===l?(h=a?d:`${u}px`,m=-i+"px"):"top"===l?(h=a?d:`${u}px`,m=`${r.floating.height+i}px`):"right"===l?(h=-i+"px",m=a?d:`${f}px`):"left"===l&&(h=`${r.floating.width+i}px`,m=a?d:`${f}px`),{data:{x:h,y:m}}}});function mu(e){const[t,n="center"]=e.split("-");return[t,n]}var pu=nu,gu=ou,vu=lu,yu=uu,bu=e.forwardRef(((t,n)=>{const{container:r,...o}=t,[a,s]=e.useState(!1);$l((()=>s(!0)),[]);const i=r||a&&globalThis?.document?.body;return i?pe.createPortal((0,De.jsx)(wl.div,{...o,ref:n}),i):null}));bu.displayName="Portal";var xu=t=>{const{present:n,children:r}=t,o=function(t){const[n,r]=e.useState(),o=e.useRef(null),a=e.useRef(t),s=e.useRef("none"),i=t?"mounted":"unmounted",[l,c]=function(t,n){return e.useReducer(((e,t)=>n[e][t]??e),t)}(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect((()=>{const e=wu(o.current);s.current="mounted"===l?e:"none"}),[l]),$l((()=>{const e=o.current,n=a.current;if(n!==t){const r=s.current,o=wu(e);c(t?"MOUNT":"none"===o||"none"===e?.display?"UNMOUNT":n&&r!==o?"ANIMATION_OUT":"UNMOUNT"),a.current=t}}),[t,c]),$l((()=>{if(n){let e;const t=n.ownerDocument.defaultView??window,r=r=>{const s=wu(o.current).includes(r.animationName);if(r.target===n&&s&&(c("ANIMATION_END"),!a.current)){const r=n.style.animationFillMode;n.style.animationFillMode="forwards",e=t.setTimeout((()=>{"forwards"===n.style.animationFillMode&&(n.style.animationFillMode=r)}))}},i=e=>{e.target===n&&(s.current=wu(o.current))};return n.addEventListener("animationstart",i),n.addEventListener("animationcancel",r),n.addEventListener("animationend",r),()=>{t.clearTimeout(e),n.removeEventListener("animationstart",i),n.removeEventListener("animationcancel",r),n.removeEventListener("animationend",r)}}c("ANIMATION_END")}),[n,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:e.useCallback((e=>{o.current=e?getComputedStyle(e):null,r(e)}),[])}}(n),a="function"==typeof r?r({present:o.isPresent}):e.Children.only(r),s=$i(o.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}(a));return"function"==typeof r||o.isPresent?e.cloneElement(a,{ref:s}):null};function wu(e){return e?.animationName||"none"}xu.displayName="Presence";var ku="rovingFocusGroup.onEntryFocus",Su={bubbles:!1,cancelable:!0},Cu="RovingFocusGroup",[_u,ju,Eu]=ql(Cu),[Nu,Du]=Wl(Cu,[Eu]),[Tu,Au]=Nu(Cu),Ru=e.forwardRef(((e,t)=>(0,De.jsx)(_u.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,De.jsx)(_u.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,De.jsx)(Mu,{...e,ref:t})})})));Ru.displayName=Cu;var Mu=e.forwardRef(((t,n)=>{const{__scopeRovingFocusGroup:r,orientation:o,loop:a=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:d,preventScrollOnEntryFocus:u=!1,...f}=t,h=e.useRef(null),m=$i(n,h),p=Kl(s),[g,v]=Yl({prop:i,defaultProp:l??null,onChange:c,caller:Cu}),[y,b]=e.useState(!1),x=Ql(d),w=ju(r),k=e.useRef(!1),[S,C]=e.useState(0);return e.useEffect((()=>{const e=h.current;if(e)return e.addEventListener(ku,x),()=>e.removeEventListener(ku,x)}),[x]),(0,De.jsx)(Tu,{scope:r,orientation:o,dir:p,loop:a,currentTabStopId:g,onItemFocus:e.useCallback((e=>v(e)),[v]),onItemShiftTab:e.useCallback((()=>b(!0)),[]),onFocusableItemAdd:e.useCallback((()=>C((e=>e+1))),[]),onFocusableItemRemove:e.useCallback((()=>C((e=>e-1))),[]),children:(0,De.jsx)(wl.div,{tabIndex:y||0===S?-1:0,"data-orientation":o,...f,ref:m,style:{outline:"none",...t.style},onMouseDown:Bl(t.onMouseDown,(()=>{k.current=!0})),onFocus:Bl(t.onFocus,(e=>{const t=!k.current;if(e.target===e.currentTarget&&t&&!y){const t=new CustomEvent(ku,Su);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=w().filter((e=>e.focusable));Lu([e.find((e=>e.active)),e.find((e=>e.id===g)),...e].filter(Boolean).map((e=>e.ref.current)),u)}}k.current=!1})),onBlur:Bl(t.onBlur,(()=>b(!1)))})})})),Ou="RovingFocusGroupItem",Iu=e.forwardRef(((t,n)=>{const{__scopeRovingFocusGroup:r,focusable:o=!0,active:a=!1,tabStopId:s,children:i,...l}=t,c=xc(),d=s||c,u=Au(Ou,r),f=u.currentTabStopId===d,h=ju(r),{onFocusableItemAdd:m,onFocusableItemRemove:p,currentTabStopId:g}=u;return e.useEffect((()=>{if(o)return m(),()=>p()}),[o,m,p]),(0,De.jsx)(_u.ItemSlot,{scope:r,id:d,focusable:o,active:a,children:(0,De.jsx)(wl.span,{tabIndex:f?0:-1,"data-orientation":u.orientation,...l,ref:n,onMouseDown:Bl(t.onMouseDown,(e=>{o?u.onItemFocus(d):e.preventDefault()})),onFocus:Bl(t.onFocus,(()=>u.onItemFocus(d))),onKeyDown:Bl(t.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void u.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const r=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:Pu[r]}(e,u.orientation,u.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let o=h().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===t)o.reverse();else if("prev"===t||"next"===t){"prev"===t&&o.reverse();const a=o.indexOf(e.currentTarget);o=u.loop?(r=a+1,(n=o).map(((e,t)=>n[(r+t)%n.length]))):o.slice(a+1)}setTimeout((()=>Lu(o)))}var n,r})),children:"function"==typeof i?i({isCurrentTabStop:f,hasTabStop:null!=g}):i})})}));Iu.displayName=Ou;var Pu={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Lu(e,t=!1){const n=document.activeElement;for(const r of e){if(r===n)return;if(r.focus({preventScroll:t}),document.activeElement!==n)return}}var Fu=Ru,zu=Iu,Hu=new WeakMap,Vu=new WeakMap,Bu={},Wu=0,Uu=function(e){return e&&(e.host||Uu(e.parentNode))},$u=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),function(e,t,n,r){var o=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=Uu(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);Bu[n]||(Bu[n]=new WeakMap);var a=Bu[n],s=[],i=new Set,l=new Set(o),c=function(e){e&&!i.has(e)&&(i.add(e),c(e.parentNode))};o.forEach(c);var d=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(i.has(e))d(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,l=(Hu.get(e)||0)+1,c=(a.get(e)||0)+1;Hu.set(e,l),a.set(e,c),s.push(e),1===l&&o&&Vu.set(e,!0),1===c&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}}))};return d(t),i.clear(),Wu++,function(){s.forEach((function(e){var t=Hu.get(e)-1,o=a.get(e)-1;Hu.set(e,t),a.set(e,o),t||(Vu.has(e)||e.removeAttribute(r),Vu.delete(e)),o||e.removeAttribute(n)})),--Wu||(Hu=new WeakMap,Hu=new WeakMap,Vu=new WeakMap,Bu={})}}(r,o,n,"aria-hidden")):function(){return null}},Gu=function(e,t){return Gu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Gu(e,t)};function Yu(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}Gu(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}var qu=function(){return qu=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},qu.apply(this,arguments)};function Zu(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function Ku(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var Qu="right-scroll-bar-position",Ju="width-before-scroll-bar";function Xu(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var ef="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,tf=new WeakMap;function nf(e){return e}var rf=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=nf);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},s=function(){return Promise.resolve().then(a)};s(),n={push:function(e){t.push(e),s()},filter:function(e){return t=t.filter(e),n}}}};return o}(null);return t.options=qu({async:!0,ssr:!1},e),t}(),of=function(){},af=e.forwardRef((function(t,n){var r=e.useRef(null),o=e.useState({onScrollCapture:of,onWheelCapture:of,onTouchMoveCapture:of}),a=o[0],s=o[1],i=t.forwardProps,l=t.children,c=t.className,d=t.removeScrollBar,u=t.enabled,f=t.shards,h=t.sideCar,m=t.noIsolation,p=t.inert,g=t.allowPinchZoom,v=t.as,y=void 0===v?"div":v,b=t.gapMode,x=Zu(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=h,k=function(t,n){var r,o,a,s=(r=n||null,o=function(e){return t.forEach((function(t){return Xu(t,e)}))},(a=(0,e.useState)((function(){return{value:r,callback:o,facade:{get current(){return a.value},set current(e){var t=a.value;t!==e&&(a.value=e,a.callback(e,t))}}}}))[0]).callback=o,a.facade);return ef((function(){var e=tf.get(s);if(e){var n=new Set(e),r=new Set(t),o=s.current;n.forEach((function(e){r.has(e)||Xu(e,null)})),r.forEach((function(e){n.has(e)||Xu(e,o)}))}tf.set(s,t)}),[t]),s}([r,n]),S=qu(qu({},x),a);return e.createElement(e.Fragment,null,u&&e.createElement(w,{sideCar:rf,removeScrollBar:d,shards:f,noIsolation:m,inert:p,setCallbacks:s,allowPinchZoom:!!g,lockRef:r,gapMode:b}),i?e.cloneElement(e.Children.only(l),qu(qu({},S),{ref:k})):e.createElement(y,qu({},S,{className:c,ref:k}),l))}));af.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},af.classNames={fullWidth:Ju,zeroRight:Qu};var sf=function(t){var n=t.sideCar,r=Zu(t,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=n.read();if(!o)throw new Error("Sidecar medium not found");return e.createElement(o,qu({},r))};sf.isSideCarExport=!0;var lf=function(){var e=0,t=null;return{add:function(n){var r,a;0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=o.nc;return t&&e.setAttribute("nonce",t),e}())&&(a=n,(r=t).styleSheet?r.styleSheet.cssText=a:r.appendChild(document.createTextNode(a)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},cf=function(){var t,n=(t=lf(),function(n,r){e.useEffect((function(){return t.add(n),function(){t.remove()}}),[n&&r])});return function(e){var t=e.styles,r=e.dynamic;return n(t,r),null}},df={left:0,top:0,right:0,gap:0},uf=function(e){return parseInt(e||"",10)||0},ff=cf(),hf="data-scroll-locked",mf=function(e,t,n,r){var o=e.left,a=e.top,s=e.right,i=e.gap;return void 0===n&&(n="margin"),"\n  .".concat("with-scroll-bars-hidden"," {\n   overflow: hidden ").concat(r,";\n   padding-right: ").concat(i,"px ").concat(r,";\n  }\n  body[").concat(hf,"] {\n    overflow: hidden ").concat(r,";\n    overscroll-behavior: contain;\n    ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n    padding-left: ".concat(o,"px;\n    padding-top: ").concat(a,"px;\n    padding-right: ").concat(s,"px;\n    margin-left:0;\n    margin-top:0;\n    margin-right: ").concat(i,"px ").concat(r,";\n    "),"padding"===n&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),"\n  }\n  \n  .").concat(Qu," {\n    right: ").concat(i,"px ").concat(r,";\n  }\n  \n  .").concat(Ju," {\n    margin-right: ").concat(i,"px ").concat(r,";\n  }\n  \n  .").concat(Qu," .").concat(Qu," {\n    right: 0 ").concat(r,";\n  }\n  \n  .").concat(Ju," .").concat(Ju," {\n    margin-right: 0 ").concat(r,";\n  }\n  \n  body[").concat(hf,"] {\n    ").concat("--removed-body-scroll-bar-size",": ").concat(i,"px;\n  }\n")},pf=function(){var e=parseInt(document.body.getAttribute(hf)||"0",10);return isFinite(e)?e:0},gf=function(t){var n=t.noRelative,r=t.noImportant,o=t.gapMode,a=void 0===o?"margin":o;e.useEffect((function(){return document.body.setAttribute(hf,(pf()+1).toString()),function(){var e=pf()-1;e<=0?document.body.removeAttribute(hf):document.body.setAttribute(hf,e.toString())}}),[]);var s=e.useMemo((function(){return function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return df;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[uf(n),uf(r),uf(o)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}}(a)}),[a]);return e.createElement(ff,{styles:mf(s,!n,a,r?"":"!important")})},vf=!1;if("undefined"!=typeof window)try{var yf=Object.defineProperty({},"passive",{get:function(){return vf=!0,!0}});window.addEventListener("test",yf,yf),window.removeEventListener("test",yf,yf)}catch(e){vf=!1}var bf=!!vf&&{passive:!1},xf=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},wf=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),kf(e,r)){var o=Sf(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},kf=function(e,t){return"v"===e?function(e){return xf(e,"overflowY")}(t):function(e){return xf(e,"overflowX")}(t)},Sf=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},Cf=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},_f=function(e){return[e.deltaX,e.deltaY]},jf=function(e){return e&&"current"in e?e.current:e},Ef=function(e){return"\n  .block-interactivity-".concat(e," {pointer-events: none;}\n  .allow-interactivity-").concat(e," {pointer-events: all;}\n")},Nf=0,Df=[];function Tf(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Af=(Rf=function(t){var n=e.useRef([]),r=e.useRef([0,0]),o=e.useRef(),a=e.useState(Nf++)[0],s=e.useState(cf)[0],i=e.useRef(t);e.useEffect((function(){i.current=t}),[t]),e.useEffect((function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(a));var e=Ku([t.lockRef.current],(t.shards||[]).map(jf),!0).filter(Boolean);return e.forEach((function(e){return e.classList.add("allow-interactivity-".concat(a))})),function(){document.body.classList.remove("block-interactivity-".concat(a)),e.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(a))}))}}}),[t.inert,t.lockRef.current,t.shards]);var l=e.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var n,a=Cf(e),s=r.current,l="deltaX"in e?e.deltaX:s[0]-a[0],c="deltaY"in e?e.deltaY:s[1]-a[1],d=e.target,u=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===u&&"range"===d.type)return!1;var f=wf(u,d);if(!f)return!0;if(f?n=u:(n="v"===u?"h":"v",f=wf(u,d)),!f)return!1;if(!o.current&&"changedTouches"in e&&(l||c)&&(o.current=n),!n)return!0;var h=o.current||n;return function(e,t,n,r){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,i=t.contains(s),l=!1,c=a>0,d=0,u=0;do{var f=Sf(e,s),h=f[0],m=f[1]-f[2]-o*h;(h||m)&&kf(e,s)&&(d+=m,u+=h),s=s instanceof ShadowRoot?s.host:s.parentNode}while(!i&&s!==document.body||i&&(t.contains(s)||t===s));return(c&&(Math.abs(d)<1||!1)||!c&&(Math.abs(u)<1||!1))&&(l=!0),l}(h,t,e,"h"===h?l:c)}),[]),c=e.useCallback((function(e){var t=e;if(Df.length&&Df[Df.length-1]===s){var r="deltaY"in t?_f(t):Cf(t),o=n.current.filter((function(e){return e.name===t.type&&(e.target===t.target||t.target===e.shadowParent)&&function(e,t){return e[0]===t[0]&&e[1]===t[1]}(e.delta,r)}))[0];if(o&&o.should)t.cancelable&&t.preventDefault();else if(!o){var a=(i.current.shards||[]).map(jf).filter(Boolean).filter((function(e){return e.contains(t.target)}));(a.length>0?l(t,a[0]):!i.current.noIsolation)&&t.cancelable&&t.preventDefault()}}}),[]),d=e.useCallback((function(e,t,r,o){var a={name:e,delta:t,target:r,should:o,shadowParent:Tf(r)};n.current.push(a),setTimeout((function(){n.current=n.current.filter((function(e){return e!==a}))}),1)}),[]),u=e.useCallback((function(e){r.current=Cf(e),o.current=void 0}),[]),f=e.useCallback((function(e){d(e.type,_f(e),e.target,l(e,t.lockRef.current))}),[]),h=e.useCallback((function(e){d(e.type,Cf(e),e.target,l(e,t.lockRef.current))}),[]);e.useEffect((function(){return Df.push(s),t.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",c,bf),document.addEventListener("touchmove",c,bf),document.addEventListener("touchstart",u,bf),function(){Df=Df.filter((function(e){return e!==s})),document.removeEventListener("wheel",c,bf),document.removeEventListener("touchmove",c,bf),document.removeEventListener("touchstart",u,bf)}}),[]);var m=t.removeScrollBar,p=t.inert;return e.createElement(e.Fragment,null,p?e.createElement(s,{styles:Ef(a)}):null,m?e.createElement(gf,{gapMode:t.gapMode}):null)},rf.useMedium(Rf),sf);var Rf,Mf=e.forwardRef((function(t,n){return e.createElement(af,qu({},t,{ref:n,sideCar:Af}))}));Mf.classNames=af.classNames;const Of=Mf;var If=["Enter"," "],Pf=["ArrowUp","PageDown","End"],Lf=["ArrowDown","PageUp","Home",...Pf],Ff={ltr:[...If,"ArrowRight"],rtl:[...If,"ArrowLeft"]},zf={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Hf="Menu",[Vf,Bf,Wf]=ql(Hf),[Uf,$f]=Wl(Hf,[Wf,Xd,Du]),Gf=Xd(),Yf=Du(),[qf,Zf]=Uf(Hf),[Kf,Qf]=Uf(Hf),Jf=t=>{const{__scopeMenu:n,open:r=!1,children:o,dir:a,onOpenChange:s,modal:i=!0}=t,l=Gf(n),[c,d]=e.useState(null),u=e.useRef(!1),f=Ql(s),h=Kl(a);return e.useEffect((()=>{const e=()=>{u.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>u.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}}),[]),(0,De.jsx)(pu,{...l,children:(0,De.jsx)(qf,{scope:n,open:r,onOpenChange:f,content:c,onContentChange:d,children:(0,De.jsx)(Kf,{scope:n,onClose:e.useCallback((()=>f(!1)),[f]),isUsingKeyboardRef:u,dir:h,modal:i,children:o})})})};Jf.displayName=Hf;var Xf=e.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e,o=Gf(n);return(0,De.jsx)(gu,{...o,...r,ref:t})}));Xf.displayName="MenuAnchor";var eh="MenuPortal",[th,nh]=Uf(eh,{forceMount:void 0}),rh=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=Zf(eh,t);return(0,De.jsx)(th,{scope:t,forceMount:n,children:(0,De.jsx)(xu,{present:n||a.open,children:(0,De.jsx)(bu,{asChild:!0,container:o,children:r})})})};rh.displayName=eh;var oh="MenuContent",[ah,sh]=Uf(oh),ih=e.forwardRef(((e,t)=>{const n=nh(oh,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Zf(oh,e.__scopeMenu),s=Qf(oh,e.__scopeMenu);return(0,De.jsx)(Vf.Provider,{scope:e.__scopeMenu,children:(0,De.jsx)(xu,{present:r||a.open,children:(0,De.jsx)(Vf.Slot,{scope:e.__scopeMenu,children:s.modal?(0,De.jsx)(lh,{...o,ref:t}):(0,De.jsx)(ch,{...o,ref:t})})})})})),lh=e.forwardRef(((t,n)=>{const r=Zf(oh,t.__scopeMenu),o=e.useRef(null),a=$i(n,o);return e.useEffect((()=>{const e=o.current;if(e)return $u(e)}),[]),(0,De.jsx)(uh,{...t,ref:a,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:Bl(t.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})})),ch=e.forwardRef(((e,t)=>{const n=Zf(oh,e.__scopeMenu);return(0,De.jsx)(uh,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})})),dh=Gi("MenuContent.ScrollLock"),uh=e.forwardRef(((t,n)=>{const{__scopeMenu:r,loop:o=!1,trapFocus:a,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:d,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:h,onDismiss:m,disableOutsideScroll:p,...g}=t,v=Zf(oh,r),y=Qf(oh,r),b=Gf(r),x=Yf(r),w=Bf(r),[k,S]=e.useState(null),C=e.useRef(null),_=$i(n,C,v.onContentChange),j=e.useRef(0),E=e.useRef(""),N=e.useRef(0),D=e.useRef(null),T=e.useRef("right"),A=e.useRef(0),R=p?Of:e.Fragment,M=p?{as:dh,allowPinchZoom:!0}:void 0;e.useEffect((()=>()=>window.clearTimeout(j.current)),[]),sc();const O=e.useCallback((e=>T.current===D.current?.side&&function(e,t){if(!t)return!1;return function(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){const s=t[e],i=t[a],l=s.x,c=s.y,d=i.x,u=i.y;c>r!=u>r&&n<(d-l)*(r-c)/(u-c)+l&&(o=!o)}return o}({x:e.clientX,y:e.clientY},t)}(e,D.current?.area)),[]);return(0,De.jsx)(ah,{scope:r,searchRef:E,onItemEnter:e.useCallback((e=>{O(e)&&e.preventDefault()}),[O]),onItemLeave:e.useCallback((e=>{O(e)||(C.current?.focus(),S(null))}),[O]),onTriggerLeave:e.useCallback((e=>{O(e)&&e.preventDefault()}),[O]),pointerGraceTimerRef:N,onPointerGraceIntentChange:e.useCallback((e=>{D.current=e}),[]),children:(0,De.jsx)(R,{...M,children:(0,De.jsx)(uc,{asChild:!0,trapped:a,onMountAutoFocus:Bl(s,(e=>{e.preventDefault(),C.current?.focus({preventScroll:!0})})),onUnmountAutoFocus:i,children:(0,De.jsx)(tc,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:d,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:h,onDismiss:m,children:(0,De.jsx)(Fu,{asChild:!0,...x,dir:y.dir,orientation:"vertical",loop:o,currentTabStopId:k,onCurrentTabStopIdChange:S,onEntryFocus:Bl(c,(e=>{y.isUsingKeyboardRef.current||e.preventDefault()})),preventScrollOnEntryFocus:!0,children:(0,De.jsx)(vu,{role:"menu","aria-orientation":"vertical","data-state":zh(v.open),"data-radix-menu-content":"",dir:y.dir,...b,...g,ref:_,style:{outline:"none",...g.style},onKeyDown:Bl(g.onKeyDown,(e=>{const t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!n&&r&&(e=>{const t=E.current+e,n=w().filter((e=>!e.disabled)),r=document.activeElement,o=n.find((e=>e.ref.current===r))?.textValue,a=function(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,o=n?e.indexOf(n):-1;let a=(s=e,i=Math.max(o,0),s.map(((e,t)=>s[(i+t)%s.length])));var s,i;1===r.length&&(a=a.filter((e=>e!==n)));const l=a.find((e=>e.toLowerCase().startsWith(r.toLowerCase())));return l!==n?l:void 0}(n.map((e=>e.textValue)),t,o),s=n.find((e=>e.textValue===a))?.ref.current;!function e(t){E.current=t,window.clearTimeout(j.current),""!==t&&(j.current=window.setTimeout((()=>e("")),1e3))}(t),s&&setTimeout((()=>s.focus()))})(e.key));const o=C.current;if(e.target!==o)return;if(!Lf.includes(e.key))return;e.preventDefault();const a=w().filter((e=>!e.disabled)).map((e=>e.ref.current));Pf.includes(e.key)&&a.reverse(),function(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}(a)})),onBlur:Bl(t.onBlur,(e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(j.current),E.current="")})),onPointerMove:Bl(t.onPointerMove,Bh((e=>{const t=e.target,n=A.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>A.current?"right":"left";T.current=t,A.current=e.clientX}})))})})})})})})}));ih.displayName=oh;var fh=e.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return(0,De.jsx)(wl.div,{role:"group",...r,ref:t})}));fh.displayName="MenuGroup";var hh=e.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return(0,De.jsx)(wl.div,{...r,ref:t})}));hh.displayName="MenuLabel";var mh="MenuItem",ph="menu.itemSelect",gh=e.forwardRef(((t,n)=>{const{disabled:r=!1,onSelect:o,...a}=t,s=e.useRef(null),i=Qf(mh,t.__scopeMenu),l=sh(mh,t.__scopeMenu),c=$i(n,s),d=e.useRef(!1);return(0,De.jsx)(vh,{...a,ref:c,disabled:r,onClick:Bl(t.onClick,(()=>{const e=s.current;if(!r&&e){const t=new CustomEvent(ph,{bubbles:!0,cancelable:!0});e.addEventListener(ph,(e=>o?.(e)),{once:!0}),kl(e,t),t.defaultPrevented?d.current=!1:i.onClose()}})),onPointerDown:e=>{t.onPointerDown?.(e),d.current=!0},onPointerUp:Bl(t.onPointerUp,(e=>{d.current||e.currentTarget?.click()})),onKeyDown:Bl(t.onKeyDown,(e=>{const t=""!==l.searchRef.current;r||t&&" "===e.key||If.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}))})}));gh.displayName=mh;var vh=e.forwardRef(((t,n)=>{const{__scopeMenu:r,disabled:o=!1,textValue:a,...s}=t,i=sh(mh,r),l=Yf(r),c=e.useRef(null),d=$i(n,c),[u,f]=e.useState(!1),[h,m]=e.useState("");return e.useEffect((()=>{const e=c.current;e&&m((e.textContent??"").trim())}),[s.children]),(0,De.jsx)(Vf.ItemSlot,{scope:r,disabled:o,textValue:a??h,children:(0,De.jsx)(zu,{asChild:!0,...l,focusable:!o,children:(0,De.jsx)(wl.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...s,ref:d,onPointerMove:Bl(t.onPointerMove,Bh((e=>{o?i.onItemLeave(e):(i.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))}))),onPointerLeave:Bl(t.onPointerLeave,Bh((e=>i.onItemLeave(e)))),onFocus:Bl(t.onFocus,(()=>f(!0))),onBlur:Bl(t.onBlur,(()=>f(!1)))})})})})),yh=e.forwardRef(((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return(0,De.jsx)(jh,{scope:e.__scopeMenu,checked:n,children:(0,De.jsx)(gh,{role:"menuitemcheckbox","aria-checked":Hh(n)?"mixed":n,...o,ref:t,"data-state":Vh(n),onSelect:Bl(o.onSelect,(()=>r?.(!!Hh(n)||!n)),{checkForDefaultPrevented:!1})})})}));yh.displayName="MenuCheckboxItem";var bh="MenuRadioGroup",[xh,wh]=Uf(bh,{value:void 0,onValueChange:()=>{}}),kh=e.forwardRef(((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=Ql(r);return(0,De.jsx)(xh,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,De.jsx)(fh,{...o,ref:t})})}));kh.displayName=bh;var Sh="MenuRadioItem",Ch=e.forwardRef(((e,t)=>{const{value:n,...r}=e,o=wh(Sh,e.__scopeMenu),a=n===o.value;return(0,De.jsx)(jh,{scope:e.__scopeMenu,checked:a,children:(0,De.jsx)(gh,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":Vh(a),onSelect:Bl(r.onSelect,(()=>o.onValueChange?.(n)),{checkForDefaultPrevented:!1})})})}));Ch.displayName=Sh;var _h="MenuItemIndicator",[jh,Eh]=Uf(_h,{checked:!1}),Nh=e.forwardRef(((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=Eh(_h,n);return(0,De.jsx)(xu,{present:r||Hh(a.checked)||!0===a.checked,children:(0,De.jsx)(wl.span,{...o,ref:t,"data-state":Vh(a.checked)})})}));Nh.displayName=_h;var Dh=e.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return(0,De.jsx)(wl.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})}));Dh.displayName="MenuSeparator";var Th=e.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e,o=Gf(n);return(0,De.jsx)(yu,{...o,...r,ref:t})}));Th.displayName="MenuArrow";var Ah="MenuSub",[Rh,Mh]=Uf(Ah),Oh=t=>{const{__scopeMenu:n,children:r,open:o=!1,onOpenChange:a}=t,s=Zf(Ah,n),i=Gf(n),[l,c]=e.useState(null),[d,u]=e.useState(null),f=Ql(a);return e.useEffect((()=>(!1===s.open&&f(!1),()=>f(!1))),[s.open,f]),(0,De.jsx)(pu,{...i,children:(0,De.jsx)(qf,{scope:n,open:o,onOpenChange:f,content:d,onContentChange:u,children:(0,De.jsx)(Rh,{scope:n,contentId:xc(),triggerId:xc(),trigger:l,onTriggerChange:c,children:r})})})};Oh.displayName=Ah;var Ih="MenuSubTrigger",Ph=e.forwardRef(((t,n)=>{const r=Zf(Ih,t.__scopeMenu),o=Qf(Ih,t.__scopeMenu),a=Mh(Ih,t.__scopeMenu),s=sh(Ih,t.__scopeMenu),i=e.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=s,d={__scopeMenu:t.__scopeMenu},u=e.useCallback((()=>{i.current&&window.clearTimeout(i.current),i.current=null}),[]);return e.useEffect((()=>u),[u]),e.useEffect((()=>{const e=l.current;return()=>{window.clearTimeout(e),c(null)}}),[l,c]),(0,De.jsx)(Xf,{asChild:!0,...d,children:(0,De.jsx)(vh,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":a.contentId,"data-state":zh(r.open),...t,ref:Ui(n,a.onTriggerChange),onClick:e=>{t.onClick?.(e),t.disabled||e.defaultPrevented||(e.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:Bl(t.onPointerMove,Bh((e=>{s.onItemEnter(e),e.defaultPrevented||t.disabled||r.open||i.current||(s.onPointerGraceIntentChange(null),i.current=window.setTimeout((()=>{r.onOpenChange(!0),u()}),100))}))),onPointerLeave:Bl(t.onPointerLeave,Bh((e=>{u();const t=r.content?.getBoundingClientRect();if(t){const n=r.content?.dataset.side,o="right"===n,a=o?-5:5,i=t[o?"left":"right"],c=t[o?"right":"left"];s.onPointerGraceIntentChange({area:[{x:e.clientX+a,y:e.clientY},{x:i,y:t.top},{x:c,y:t.top},{x:c,y:t.bottom},{x:i,y:t.bottom}],side:n}),window.clearTimeout(l.current),l.current=window.setTimeout((()=>s.onPointerGraceIntentChange(null)),300)}else{if(s.onTriggerLeave(e),e.defaultPrevented)return;s.onPointerGraceIntentChange(null)}}))),onKeyDown:Bl(t.onKeyDown,(e=>{const n=""!==s.searchRef.current;t.disabled||n&&" "===e.key||Ff[o.dir].includes(e.key)&&(r.onOpenChange(!0),r.content?.focus(),e.preventDefault())}))})})}));Ph.displayName=Ih;var Lh="MenuSubContent",Fh=e.forwardRef(((t,n)=>{const r=nh(oh,t.__scopeMenu),{forceMount:o=r.forceMount,...a}=t,s=Zf(oh,t.__scopeMenu),i=Qf(oh,t.__scopeMenu),l=Mh(Lh,t.__scopeMenu),c=e.useRef(null),d=$i(n,c);return(0,De.jsx)(Vf.Provider,{scope:t.__scopeMenu,children:(0,De.jsx)(xu,{present:o||s.open,children:(0,De.jsx)(Vf.Slot,{scope:t.__scopeMenu,children:(0,De.jsx)(uh,{id:l.contentId,"aria-labelledby":l.triggerId,...a,ref:d,align:"start",side:"rtl"===i.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{i.isUsingKeyboardRef.current&&c.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:Bl(t.onFocusOutside,(e=>{e.target!==l.trigger&&s.onOpenChange(!1)})),onEscapeKeyDown:Bl(t.onEscapeKeyDown,(e=>{i.onClose(),e.preventDefault()})),onKeyDown:Bl(t.onKeyDown,(e=>{const t=e.currentTarget.contains(e.target),n=zf[i.dir].includes(e.key);t&&n&&(s.onOpenChange(!1),l.trigger?.focus(),e.preventDefault())}))})})})})}));function zh(e){return e?"open":"closed"}function Hh(e){return"indeterminate"===e}function Vh(e){return Hh(e)?"indeterminate":e?"checked":"unchecked"}function Bh(e){return t=>"mouse"===t.pointerType?e(t):void 0}Fh.displayName=Lh;var Wh=Jf,Uh=Xf,$h=rh,Gh=ih,Yh=fh,qh=hh,Zh=gh,Kh=yh,Qh=kh,Jh=Ch,Xh=Nh,em=Dh,tm=Th,nm=Oh,rm=Ph,om=Fh,am="DropdownMenu",[sm,im]=Wl(am,[$f]),lm=$f(),[cm,dm]=sm(am),um=t=>{const{__scopeDropdownMenu:n,children:r,dir:o,open:a,defaultOpen:s,onOpenChange:i,modal:l=!0}=t,c=lm(n),d=e.useRef(null),[u,f]=Yl({prop:a,defaultProp:s??!1,onChange:i,caller:am});return(0,De.jsx)(cm,{scope:n,triggerId:xc(),triggerRef:d,contentId:xc(),open:u,onOpenChange:f,onOpenToggle:e.useCallback((()=>f((e=>!e))),[f]),modal:l,children:(0,De.jsx)(Wh,{...c,open:u,onOpenChange:f,dir:o,modal:l,children:r})})};um.displayName=am;var fm="DropdownMenuTrigger",hm=e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=dm(fm,n),s=lm(n);return(0,De.jsx)(Uh,{asChild:!0,...s,children:(0,De.jsx)(wl.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:Ui(t,a.triggerRef),onPointerDown:Bl(e.onPointerDown,(e=>{r||0!==e.button||!1!==e.ctrlKey||(a.onOpenToggle(),a.open||e.preventDefault())})),onKeyDown:Bl(e.onKeyDown,(e=>{r||(["Enter"," "].includes(e.key)&&a.onOpenToggle(),"ArrowDown"===e.key&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())}))})})}));hm.displayName=fm;var mm=e=>{const{__scopeDropdownMenu:t,...n}=e,r=lm(t);return(0,De.jsx)($h,{...r,...n})};mm.displayName="DropdownMenuPortal";var pm="DropdownMenuContent",gm=e.forwardRef(((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,a=dm(pm,r),s=lm(r),i=e.useRef(!1);return(0,De.jsx)(Gh,{id:a.contentId,"aria-labelledby":a.triggerId,...s,...o,ref:n,onCloseAutoFocus:Bl(t.onCloseAutoFocus,(e=>{i.current||a.triggerRef.current?.focus(),i.current=!1,e.preventDefault()})),onInteractOutside:Bl(t.onInteractOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;a.modal&&!r||(i.current=!0)})),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})}));gm.displayName=pm,e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=lm(n);return(0,De.jsx)(Yh,{...o,...r,ref:t})})).displayName="DropdownMenuGroup";var vm=e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=lm(n);return(0,De.jsx)(qh,{...o,...r,ref:t})}));vm.displayName="DropdownMenuLabel";var ym=e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=lm(n);return(0,De.jsx)(Zh,{...o,...r,ref:t})}));ym.displayName="DropdownMenuItem";var bm=e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=lm(n);return(0,De.jsx)(Kh,{...o,...r,ref:t})}));bm.displayName="DropdownMenuCheckboxItem",e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=lm(n);return(0,De.jsx)(Qh,{...o,...r,ref:t})})).displayName="DropdownMenuRadioGroup";var xm=e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=lm(n);return(0,De.jsx)(Jh,{...o,...r,ref:t})}));xm.displayName="DropdownMenuRadioItem";var wm=e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=lm(n);return(0,De.jsx)(Xh,{...o,...r,ref:t})}));wm.displayName="DropdownMenuItemIndicator";var km=e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=lm(n);return(0,De.jsx)(em,{...o,...r,ref:t})}));km.displayName="DropdownMenuSeparator",e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=lm(n);return(0,De.jsx)(tm,{...o,...r,ref:t})})).displayName="DropdownMenuArrow";var Sm=e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=lm(n);return(0,De.jsx)(rm,{...o,...r,ref:t})}));Sm.displayName="DropdownMenuSubTrigger";var Cm=e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=lm(n);return(0,De.jsx)(om,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})}));Cm.displayName="DropdownMenuSubContent";var _m=um,jm=hm,Em=mm,Nm=gm,Dm=vm,Tm=ym,Am=bm,Rm=xm,Mm=wm,Om=km,Im=Sm,Pm=Cm;const Lm=Mi("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),Fm=Mi("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]),zm=_m,Hm=jm,Vm=Em,Bm=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:a}=e,s=lm(t),[i,l]=Yl({prop:r,defaultProp:a??!1,onChange:o,caller:"DropdownMenuSub"});return(0,De.jsx)(nm,{...s,open:i,onOpenChange:l,children:n})},Wm=e.forwardRef((({className:e,inset:t,children:n,...r},o)=>(0,De.jsxs)(Im,{ref:o,className:Ni("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...r,children:[n,(0,De.jsx)(zl,{className:"ml-auto h-4 w-4"})]})));Wm.displayName=Im.displayName;const Um=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)(Pm,{ref:n,className:Ni("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t})));Um.displayName=Pm.displayName;const $m=e.forwardRef((({className:e,sideOffset:t=4,...n},r)=>{const o="undefined"!=typeof document?document.querySelector(".eventkoi-admin")||document.body:void 0;return(0,De.jsx)(Em,{container:o,children:(0,De.jsx)(Nm,{ref:r,sideOffset:t,className:Ni("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})})}));$m.displayName=Nm.displayName;const Gm=e.forwardRef((({className:e,inset:t,...n},r)=>(0,De.jsx)(Tm,{ref:r,className:Ni("relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...n})));Gm.displayName=Tm.displayName;const Ym=e.forwardRef((({className:e,children:t,checked:n,...r},o)=>(0,De.jsxs)(Am,{ref:o,className:Ni("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[(0,De.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,De.jsx)(Mm,{children:(0,De.jsx)(Lm,{className:"h-4 w-4"})})}),t]})));Ym.displayName=Am.displayName,e.forwardRef((({className:e,children:t,...n},r)=>(0,De.jsxs)(Rm,{ref:r,className:Ni("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[(0,De.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,De.jsx)(Mm,{children:(0,De.jsx)(Fm,{className:"h-2 w-2 fill-current"})})}),t]}))).displayName=Rm.displayName,e.forwardRef((({className:e,inset:t,...n},r)=>(0,De.jsx)(Dm,{ref:r,className:Ni("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}))).displayName=Dm.displayName;const qm=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)(Om,{ref:n,className:Ni("-mx-1 my-1 h-px bg-muted",e),...t})));qm.displayName=Om.displayName;const Zm=(0,e.createContext)(null);var Km=Array(12).fill(0),Qm=({visible:t,className:n})=>e.createElement("div",{className:["sonner-loading-wrapper",n].filter(Boolean).join(" "),"data-visible":t},e.createElement("div",{className:"sonner-spinner"},Km.map(((t,n)=>e.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`}))))),Jm=e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},e.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Xm=e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},e.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),ep=e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},e.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),tp=e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},e.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),np=e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},e.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),rp=1,op=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach((t=>t(e)))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,o="number"==typeof(null==e?void 0:e.id)||(null==(t=e.id)?void 0:t.length)>0?e.id:rp++,a=this.toasts.find((e=>e.id===o)),s=void 0===e.dismissible||e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),a?this.toasts=this.toasts.map((t=>t.id===o?(this.publish({...t,...e,id:o,title:n}),{...t,...e,id:o,dismissible:s,title:n}):t)):this.addToast({title:n,...r,dismissible:s,id:o}),o},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach((e=>{this.subscribers.forEach((t=>t({id:e.id,dismiss:!0})))})),this.subscribers.forEach((t=>t({id:e,dismiss:!0}))),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(t,n)=>{if(!n)return;let r;void 0!==n.loading&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:"function"!=typeof n.description?n.description:void 0}));let o,a=t instanceof Promise?t:t(),s=void 0!==r,i=a.then((async t=>{if(o=["resolve",t],e.isValidElement(t))s=!1,this.create({id:r,type:"default",message:t});else if(ap(t)&&!t.ok){s=!1;let e="function"==typeof n.error?await n.error(`HTTP error! status: ${t.status}`):n.error,o="function"==typeof n.description?await n.description(`HTTP error! status: ${t.status}`):n.description;this.create({id:r,type:"error",message:e,description:o})}else if(void 0!==n.success){s=!1;let e="function"==typeof n.success?await n.success(t):n.success,o="function"==typeof n.description?await n.description(t):n.description;this.create({id:r,type:"success",message:e,description:o})}})).catch((async e=>{if(o=["reject",e],void 0!==n.error){s=!1;let t="function"==typeof n.error?await n.error(e):n.error,o="function"==typeof n.description?await n.description(e):n.description;this.create({id:r,type:"error",message:t,description:o})}})).finally((()=>{var e;s&&(this.dismiss(r),r=void 0),null==(e=n.finally)||e.call(n)})),l=()=>new Promise(((e,t)=>i.then((()=>"reject"===o[0]?t(o[1]):e(o[1]))).catch(t)));return"string"!=typeof r&&"number"!=typeof r?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(e,t)=>{let n=(null==t?void 0:t.id)||rp++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter((e=>!this.dismissedToasts.has(e.id))),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},ap=e=>e&&"object"==typeof e&&"ok"in e&&"boolean"==typeof e.ok&&"status"in e&&"number"==typeof e.status,sp=Object.assign(((e,t)=>{let n=(null==t?void 0:t.id)||rp++;return op.addToast({title:e,...t,id:n}),n}),{success:op.success,info:op.info,warning:op.warning,error:op.error,custom:op.custom,message:op.message,promise:op.promise,dismiss:op.dismiss,loading:op.loading},{getHistory:()=>op.toasts,getToasts:()=>op.getActiveToasts()});function ip(e){return void 0!==e.label}!function(e,{insertAt:t}={}){if(!e||"undefined"==typeof document)return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===t&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}(':where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}\n');var lp=3,cp=14;function dp(...e){return e.filter(Boolean).join(" ")}var up=t=>{var n,r,o,a,s,i,l,c,d,u,f;let{invert:h,toast:m,unstyled:p,interacting:g,setHeights:v,visibleToasts:y,heights:b,index:x,toasts:w,expanded:k,removeToast:S,defaultRichColors:C,closeButton:_,style:j,cancelButtonStyle:E,actionButtonStyle:N,className:D="",descriptionClassName:T="",duration:A,position:R,gap:M,loadingIcon:O,expandByDefault:I,classNames:P,icons:L,closeButtonAriaLabel:F="Close toast",pauseWhenPageIsHidden:z}=t,[H,V]=e.useState(null),[B,W]=e.useState(null),[U,$]=e.useState(!1),[G,Y]=e.useState(!1),[q,Z]=e.useState(!1),[K,Q]=e.useState(!1),[J,X]=e.useState(!1),[ee,te]=e.useState(0),[ne,re]=e.useState(0),oe=e.useRef(m.duration||A||4e3),ae=e.useRef(null),se=e.useRef(null),ie=0===x,le=x+1<=y,ce=m.type,de=!1!==m.dismissible,ue=m.className||"",fe=m.descriptionClassName||"",he=e.useMemo((()=>b.findIndex((e=>e.toastId===m.id))||0),[b,m.id]),me=e.useMemo((()=>{var e;return null!=(e=m.closeButton)?e:_}),[m.closeButton,_]),pe=e.useMemo((()=>m.duration||A||4e3),[m.duration,A]),ge=e.useRef(0),ve=e.useRef(0),ye=e.useRef(0),be=e.useRef(null),[xe,we]=R.split("-"),ke=e.useMemo((()=>b.reduce(((e,t,n)=>n>=he?e:e+t.height),0)),[b,he]),Se=(()=>{let[t,n]=e.useState(document.hidden);return e.useEffect((()=>{let e=()=>{n(document.hidden)};return document.addEventListener("visibilitychange",e),()=>window.removeEventListener("visibilitychange",e)}),[]),t})(),Ce=m.invert||h,_e="loading"===ce;ve.current=e.useMemo((()=>he*M+ke),[he,ke]),e.useEffect((()=>{oe.current=pe}),[pe]),e.useEffect((()=>{$(!0)}),[]),e.useEffect((()=>{let e=se.current;if(e){let t=e.getBoundingClientRect().height;return re(t),v((e=>[{toastId:m.id,height:t,position:m.position},...e])),()=>v((e=>e.filter((e=>e.toastId!==m.id))))}}),[v,m.id]),e.useLayoutEffect((()=>{if(!U)return;let e=se.current,t=e.style.height;e.style.height="auto";let n=e.getBoundingClientRect().height;e.style.height=t,re(n),v((e=>e.find((e=>e.toastId===m.id))?e.map((e=>e.toastId===m.id?{...e,height:n}:e)):[{toastId:m.id,height:n,position:m.position},...e]))}),[U,m.title,m.description,v,m.id]);let je=e.useCallback((()=>{Y(!0),te(ve.current),v((e=>e.filter((e=>e.toastId!==m.id)))),setTimeout((()=>{S(m)}),200)}),[m,S,v,ve]);return e.useEffect((()=>{if(m.promise&&"loading"===ce||m.duration===1/0||"loading"===m.type)return;let e;return k||g||z&&Se?(()=>{if(ye.current<ge.current){let e=(new Date).getTime()-ge.current;oe.current=oe.current-e}ye.current=(new Date).getTime()})():oe.current!==1/0&&(ge.current=(new Date).getTime(),e=setTimeout((()=>{var e;null==(e=m.onAutoClose)||e.call(m,m),je()}),oe.current)),()=>clearTimeout(e)}),[k,g,m,ce,z,Se,je]),e.useEffect((()=>{m.delete&&je()}),[je,m.delete]),e.createElement("li",{tabIndex:0,ref:se,className:dp(D,ue,null==P?void 0:P.toast,null==(n=null==m?void 0:m.classNames)?void 0:n.toast,null==P?void 0:P.default,null==P?void 0:P[ce],null==(r=null==m?void 0:m.classNames)?void 0:r[ce]),"data-sonner-toast":"","data-rich-colors":null!=(o=m.richColors)?o:C,"data-styled":!(m.jsx||m.unstyled||p),"data-mounted":U,"data-promise":!!m.promise,"data-swiped":J,"data-removed":G,"data-visible":le,"data-y-position":xe,"data-x-position":we,"data-index":x,"data-front":ie,"data-swiping":q,"data-dismissible":de,"data-type":ce,"data-invert":Ce,"data-swipe-out":K,"data-swipe-direction":B,"data-expanded":!!(k||I&&U),style:{"--index":x,"--toasts-before":x,"--z-index":w.length-x,"--offset":`${G?ee:ve.current}px`,"--initial-height":I?"auto":`${ne}px`,...j,...m.style},onDragEnd:()=>{Z(!1),V(null),be.current=null},onPointerDown:e=>{_e||!de||(ae.current=new Date,te(ve.current),e.target.setPointerCapture(e.pointerId),"BUTTON"!==e.target.tagName&&(Z(!0),be.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{var e,t,n,r;if(K||!de)return;be.current=null;let o=Number((null==(e=se.current)?void 0:e.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),a=Number((null==(t=se.current)?void 0:t.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),s=(new Date).getTime()-(null==(n=ae.current)?void 0:n.getTime()),i="x"===H?o:a,l=Math.abs(i)/s;if(Math.abs(i)>=20||l>.11)return te(ve.current),null==(r=m.onDismiss)||r.call(m,m),W("x"===H?o>0?"right":"left":a>0?"down":"up"),je(),Q(!0),void X(!1);Z(!1),V(null)},onPointerMove:e=>{var n,r,o,a;if(!be.current||!de||(null==(n=window.getSelection())?void 0:n.toString().length)>0)return;let s=e.clientY-be.current.y,i=e.clientX-be.current.x,l=null!=(r=t.swipeDirections)?r:function(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}(R);!H&&(Math.abs(i)>1||Math.abs(s)>1)&&V(Math.abs(i)>Math.abs(s)?"x":"y");let c={x:0,y:0};"y"===H?(l.includes("top")||l.includes("bottom"))&&(l.includes("top")&&s<0||l.includes("bottom")&&s>0)&&(c.y=s):"x"===H&&(l.includes("left")||l.includes("right"))&&(l.includes("left")&&i<0||l.includes("right")&&i>0)&&(c.x=i),(Math.abs(c.x)>0||Math.abs(c.y)>0)&&X(!0),null==(o=se.current)||o.style.setProperty("--swipe-amount-x",`${c.x}px`),null==(a=se.current)||a.style.setProperty("--swipe-amount-y",`${c.y}px`)}},me&&!m.jsx?e.createElement("button",{"aria-label":F,"data-disabled":_e,"data-close-button":!0,onClick:_e||!de?()=>{}:()=>{var e;je(),null==(e=m.onDismiss)||e.call(m,m)},className:dp(null==P?void 0:P.closeButton,null==(a=null==m?void 0:m.classNames)?void 0:a.closeButton)},null!=(s=null==L?void 0:L.close)?s:np):null,m.jsx||(0,e.isValidElement)(m.title)?m.jsx?m.jsx:"function"==typeof m.title?m.title():m.title:e.createElement(e.Fragment,null,ce||m.icon||m.promise?e.createElement("div",{"data-icon":"",className:dp(null==P?void 0:P.icon,null==(i=null==m?void 0:m.classNames)?void 0:i.icon)},m.promise||"loading"===m.type&&!m.icon?m.icon||function(){var t,n,r;return null!=L&&L.loading?e.createElement("div",{className:dp(null==P?void 0:P.loader,null==(t=null==m?void 0:m.classNames)?void 0:t.loader,"sonner-loader"),"data-visible":"loading"===ce},L.loading):O?e.createElement("div",{className:dp(null==P?void 0:P.loader,null==(n=null==m?void 0:m.classNames)?void 0:n.loader,"sonner-loader"),"data-visible":"loading"===ce},O):e.createElement(Qm,{className:dp(null==P?void 0:P.loader,null==(r=null==m?void 0:m.classNames)?void 0:r.loader),visible:"loading"===ce})}():null,"loading"!==m.type?m.icon||(null==L?void 0:L[ce])||(e=>{switch(e){case"success":return Jm;case"info":return ep;case"warning":return Xm;case"error":return tp;default:return null}})(ce):null):null,e.createElement("div",{"data-content":"",className:dp(null==P?void 0:P.content,null==(l=null==m?void 0:m.classNames)?void 0:l.content)},e.createElement("div",{"data-title":"",className:dp(null==P?void 0:P.title,null==(c=null==m?void 0:m.classNames)?void 0:c.title)},"function"==typeof m.title?m.title():m.title),m.description?e.createElement("div",{"data-description":"",className:dp(T,fe,null==P?void 0:P.description,null==(d=null==m?void 0:m.classNames)?void 0:d.description)},"function"==typeof m.description?m.description():m.description):null),(0,e.isValidElement)(m.cancel)?m.cancel:m.cancel&&ip(m.cancel)?e.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||E,onClick:e=>{var t,n;ip(m.cancel)&&de&&(null==(n=(t=m.cancel).onClick)||n.call(t,e),je())},className:dp(null==P?void 0:P.cancelButton,null==(u=null==m?void 0:m.classNames)?void 0:u.cancelButton)},m.cancel.label):null,(0,e.isValidElement)(m.action)?m.action:m.action&&ip(m.action)?e.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||N,onClick:e=>{var t,n;ip(m.action)&&(null==(n=(t=m.action).onClick)||n.call(t,e),!e.defaultPrevented&&je())},className:dp(null==P?void 0:P.actionButton,null==(f=null==m?void 0:m.classNames)?void 0:f.actionButton)},m.action.label):null))};function fp(){if("undefined"==typeof window||"undefined"==typeof document)return"ltr";let e=document.documentElement.getAttribute("dir");return"auto"!==e&&e?e:window.getComputedStyle(document.documentElement).direction}function hp(e,t){let n={};return[e,t].forEach(((e,t)=>{let r=1===t,o=r?"--mobile-offset":"--offset",a=r?"16px":"32px";function s(e){["top","right","bottom","left"].forEach((t=>{n[`${o}-${t}`]="number"==typeof e?`${e}px`:e}))}"number"==typeof e||"string"==typeof e?s(e):"object"==typeof e?["top","right","bottom","left"].forEach((t=>{void 0===e[t]?n[`${o}-${t}`]=a:n[`${o}-${t}`]="number"==typeof e[t]?`${e[t]}px`:e[t]})):s(a)})),n}var mp=(0,e.forwardRef)((function(t,n){let{invert:r,position:o="bottom-right",hotkey:a=["altKey","KeyT"],expand:s,closeButton:i,className:l,offset:c,mobileOffset:d,theme:u="light",richColors:f,duration:h,style:m,visibleToasts:p=lp,toastOptions:g,dir:v=fp(),gap:y=cp,loadingIcon:b,icons:x,containerAriaLabel:w="Notifications",pauseWhenPageIsHidden:k}=t,[S,C]=e.useState([]),_=e.useMemo((()=>Array.from(new Set([o].concat(S.filter((e=>e.position)).map((e=>e.position)))))),[S,o]),[j,E]=e.useState([]),[N,D]=e.useState(!1),[T,A]=e.useState(!1),[R,M]=e.useState("system"!==u?u:"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),O=e.useRef(null),I=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),P=e.useRef(null),L=e.useRef(!1),F=e.useCallback((e=>{C((t=>{var n;return null!=(n=t.find((t=>t.id===e.id)))&&n.delete||op.dismiss(e.id),t.filter((({id:t})=>t!==e.id))}))}),[]);return e.useEffect((()=>op.subscribe((e=>{e.dismiss?C((t=>t.map((t=>t.id===e.id?{...t,delete:!0}:t)))):setTimeout((()=>{pe.flushSync((()=>{C((t=>{let n=t.findIndex((t=>t.id===e.id));return-1!==n?[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]:[e,...t]}))}))}))}))),[]),e.useEffect((()=>{if("system"!==u)return void M(u);if("system"===u&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?M("dark"):M("light")),"undefined"==typeof window)return;let e=window.matchMedia("(prefers-color-scheme: dark)");try{e.addEventListener("change",(({matches:e})=>{M(e?"dark":"light")}))}catch(t){e.addListener((({matches:e})=>{try{M(e?"dark":"light")}catch(e){console.error(e)}}))}}),[u]),e.useEffect((()=>{S.length<=1&&D(!1)}),[S]),e.useEffect((()=>{let e=e=>{var t,n;a.every((t=>e[t]||e.code===t))&&(D(!0),null==(t=O.current)||t.focus()),"Escape"===e.code&&(document.activeElement===O.current||null!=(n=O.current)&&n.contains(document.activeElement))&&D(!1)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[a]),e.useEffect((()=>{if(O.current)return()=>{P.current&&(P.current.focus({preventScroll:!0}),P.current=null,L.current=!1)}}),[O.current]),e.createElement("section",{ref:n,"aria-label":`${w} ${I}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},_.map(((n,o)=>{var a;let[u,w]=n.split("-");return S.length?e.createElement("ol",{key:n,dir:"auto"===v?fp():v,tabIndex:-1,ref:O,className:l,"data-sonner-toaster":!0,"data-theme":R,"data-y-position":u,"data-lifted":N&&S.length>1&&!s,"data-x-position":w,style:{"--front-toast-height":`${(null==(a=j[0])?void 0:a.height)||0}px`,"--width":"356px","--gap":`${y}px`,...m,...hp(c,d)},onBlur:e=>{L.current&&!e.currentTarget.contains(e.relatedTarget)&&(L.current=!1,P.current&&(P.current.focus({preventScroll:!0}),P.current=null))},onFocus:e=>{e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||L.current||(L.current=!0,P.current=e.relatedTarget)},onMouseEnter:()=>D(!0),onMouseMove:()=>D(!0),onMouseLeave:()=>{T||D(!1)},onDragEnd:()=>D(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||A(!0)},onPointerUp:()=>A(!1)},S.filter((e=>!e.position&&0===o||e.position===n)).map(((o,a)=>{var l,c;return e.createElement(up,{key:o.id,icons:x,index:a,toast:o,defaultRichColors:f,duration:null!=(l=null==g?void 0:g.duration)?l:h,className:null==g?void 0:g.className,descriptionClassName:null==g?void 0:g.descriptionClassName,invert:r,visibleToasts:p,closeButton:null!=(c=null==g?void 0:g.closeButton)?c:i,interacting:T,position:n,style:null==g?void 0:g.style,unstyled:null==g?void 0:g.unstyled,classNames:null==g?void 0:g.classNames,cancelButtonStyle:null==g?void 0:g.cancelButtonStyle,actionButtonStyle:null==g?void 0:g.actionButtonStyle,removeToast:F,toasts:S.filter((e=>e.position==o.position)),heights:j.filter((e=>e.position==o.position)),setHeights:E,expandByDefault:s,gap:y,loadingIcon:b,expanded:N,pauseWhenPageIsHidden:k,swipeDirections:t.swipeDirections})}))):null})))}));function pp({message:e,url:t,variant:n="default"}){return(0,De.jsxs)("div",{className:`flex items-center justify-between gap-4 rounded-md p-3 text-sm font-medium w-[280px] shadow-lg ${{default:"bg-neutral-900 text-white border border-neutral-800",success:"bg-green-600 text-white border border-green-500",error:"bg-red-600 text-white border border-red-500"}[n]}`,children:[(0,De.jsx)("div",{className:"flex-1",children:e}),t&&(0,De.jsx)("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2 text-xs hover:no-underline",children:"View"})]})}function gp(e){if(!e?.message)return;const t=e?.variant||"default";sp.custom((n=>(0,De.jsx)(pp,{message:e.message,url:e.url,variant:t})),{duration:4e3})}function vp(e){e&&sp.custom((t=>(0,De.jsx)(pp,{message:e,variant:"error"})),{duration:4e3})}const yp=Mi("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);function bp(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&"object"==typeof e&&t&&"object"==typeof t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const r of n)if(!t.hasOwnProperty(r)||!bp(e[r],t[r]))return!1;return!0}return!1}function xp(){const t=Y().pathname.includes("/instances/edit/");let n=null;try{n=(0,e.useContext)(Zm)}catch(e){n=null}const r=K(),{event:o,setEvent:a,loading:s,setLoading:i,setIsPublishing:l,setDisableAutoSave:c}=Fl(),[d,u]=(0,e.useState)(!1),[f,h]=(0,e.useState)(!1),m=(0,e.useRef)(!1),p=t?d||s:!o?.title?.trim()||d||s,g=async(e,t={})=>{u(!0);try{const n=await Ne()({path:`${eventkoi_params.api}/${e}`,method:"post",data:t,headers:{"EVENTKOI-API-KEY":eventkoi_params.api_key}});return gp(n),h(!0),setTimeout((()=>h(!1)),3e3),n}catch(e){throw gp({message:"Failed to save. Please try again."}),e}finally{u(!1)}},v=async e=>{if(console.log(o),!o?.title?.trim())return;"publish"===e&&(c?.(!0),l?.(!0),await new Promise((e=>setTimeout(e,10))));const t={...o,wp_status:e},n=await g("update_event",{event:t});n?.id&&(a?.(n),m.current||(m.current=!0,window.location.hash.includes("/events/add/")&&(window.location.hash=window.location.hash.replace("/events/add/",`/events/${n.id}/`)))),"publish"===e&&(l?.(!1),c?.(!1))},y=t&&n?.data&&n?.originalData&&!bp(n.data,n.originalData);return(0,De.jsxs)("div",{className:"flex gap-1 md:gap-2",children:[f&&(0,De.jsx)("div",{className:"text-xs text-muted-foreground mr-6 self-center",children:"Saved just now"}),t&&n?(0,De.jsxs)(De.Fragment,{children:[o?.url&&n?.timestamp&&(0,De.jsx)(tl,{variant:"link",onClick:()=>window.open(`${o.url}?instance=${n.timestamp}`,"_blank"),children:"Preview"}),(0,De.jsx)(tl,{variant:"ghost",onClick:()=>{n.resetData(),gp({message:"Changes reverted."})},disabled:!y,children:"Reset"}),(0,De.jsx)(tl,{disabled:!y||d,onClick:async()=>{if(n?.data&&n.eventId&&n.timestamp){u(!0);try{await Ne()({path:`${eventkoi_params.api}/edit_instance`,method:"post",data:{event_id:parseInt(n.eventId),timestamp:parseInt(n.timestamp),overrides:n.data},headers:{"EVENTKOI-API-KEY":eventkoi_params.api_key}}),a?.((e=>{const t={...e?.recurrence_overrides||{}};return t[n.timestamp]={...t[n.timestamp]||{},...n.data,modified_at:(new Date).toISOString()},{...e,recurrence_overrides:t}})),gp({message:"Instance updated!"}),h(!0),setTimeout((()=>h(!1)),3e3)}catch(e){gp({message:"Failed to save instance."})}finally{u(!1)}}},children:d?(0,De.jsxs)("span",{className:"flex items-center gap-2",children:[(0,De.jsx)(yp,{className:"h-4 w-4 animate-spin"}),"Saving..."]}):(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)("span",{className:"sm:hidden",children:"Save"}),(0,De.jsx)("span",{className:"hidden sm:inline",children:"Save instance"})]})})]}):(0,De.jsxs)(De.Fragment,{children:["draft"===o?.wp_status&&(0,De.jsx)(tl,{variant:"ghost",disabled:p,onClick:()=>v("draft"),children:"Save draft"}),(0,De.jsx)(tl,{variant:"link",disabled:p||!o?.url,onClick:()=>window.open(o?.url,"_blank"),children:"Preview"}),(0,De.jsxs)("div",{className:"flex items-center gap-[1px]",children:[(0,De.jsx)(tl,{variant:"default",className:"rounded-r-none",disabled:p,onClick:()=>v("publish"),children:d?(0,De.jsxs)("span",{className:"flex items-center gap-2",children:[(0,De.jsx)(yp,{className:"h-4 w-4 animate-spin"}),"Saving..."]}):"draft"===o?.wp_status?"Publish":"Save"}),(0,De.jsxs)(zm,{modal:!1,children:[(0,De.jsx)(Hm,{asChild:!0,children:(0,De.jsx)(tl,{variant:"default",size:"icon",className:"rounded-l-none",disabled:p,children:(0,De.jsx)(Oi,{className:"w-4 h-4"})})}),(0,De.jsxs)($m,{className:"w-56 z-[510000]",align:"end",children:[(0,De.jsx)(Gm,{disabled:!o?.id,onClick:async()=>{const e=await g("duplicate_event",{event_id:o?.id});e?.id&&o?.id&&(window.location.hash=window.location.hash.replace(o.id,e.id)),a?.(e)},children:"Create duplicate event"}),(0,De.jsx)(qm,{}),"publish"===o?.wp_status&&(0,De.jsx)(Gm,{onClick:()=>v("draft"),children:"Unpublish"}),(0,De.jsx)(Gm,{className:"text-destructive focus:text-destructive",onClick:async()=>{await g("delete_event",{event_id:o?.id}),r("/events")},children:"Move to trash"})]})]})]})]})]})}function wp(){const{event:e,setEvent:t}=Fl();return(0,De.jsxs)("header",{className:Ni("flex items-center text-sm h-20 sticky top-[0px] z-[100000] bg-white md:bg-muted shadow-sm border-b gap-2 md:gap-6 px-4 md:px-8"),children:[(0,De.jsx)(Ai,{}),(0,De.jsx)(Vl,{}),(0,De.jsx)("div",{className:"flex w-full justify-end",children:(0,De.jsx)(xp,{})})]})}const kp=Mi("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);function Sp({className:e}){return(0,De.jsxs)("span",{className:Ni("ml-2 inline-flex items-center uppercase px-[6px] py-[3px] rounded-full bg-primary text-xs font-semibold text-white gap-[2px]",e),style:{lineHeight:1.2},children:[(0,De.jsx)(kp,{className:"h-3 w-3 fill-white text-white",strokeWidth:0}),"Pro"]})}function Cp(){const{event:e}=Fl(),t=Y();if(t.pathname.includes("/instances/edit/"))return null;const n=t.pathname.split("/")[3]||"main",r=[{name:"main",title:"Main"},..."recurring"===e?.date_type?[{name:"instances",title:"Recurring instances"}]:[]];return(0,De.jsx)("nav",{className:"grid gap-1 text-sm text-muted-foreground",children:r.map((e=>{const t=n===e.name;return(0,De.jsxs)(Se,{to:e.name,className:"font-medium px-3 py-3 rounded-lg "+(t?"text-foreground bg-foreground/5":""),children:[e.title,"instances"===e.name&&(0,De.jsx)(Sp,{className:"ml-0"})]},e.name)}))})}const _p=Mi("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);function jp(e,t,n=!0){const r=n&&e?.recurrence_overrides?.[t]||{},o=["title","description","summary","image","image_id","template","locations"],a={};for(const t of o)n&&void 0!==r[t]?a[t]=r[t]:e&&Object.prototype.hasOwnProperty.call(e,t)?a[t]=e[t]:a[t]=null;return a}function Ep(){const{loading:t,setLoading:n,event:r,setEvent:o,settings:a,notFound:s,restoreEvent:i}=function(){const t=K(),n=Y(),{id:r}=X(),[o,a]=(0,e.useState)(!0),[s,i]=(0,e.useState)(null),[l,c]=(0,e.useState)(null),[d,u]=(0,e.useState)(!1),f=parseInt(r,10)||0,h=async()=>{try{const e=await Ne()({path:`${eventkoi_params.api}/event?id=${f}`,method:"get"}),t={...e,recurrence_rules:Array.isArray(e.recurrence_rules)?e.recurrence_rules:[]};i(t)}catch{u(!0)}},m=async()=>{try{const e=await Ne()({path:`${eventkoi_params.api}/settings`,method:"get",headers:{"EVENTKOI-API-KEY":eventkoi_params.api_key}});c(e)}catch{}};return(0,e.useEffect)((()=>{if(f)Promise.all([h(),m()]).finally((()=>a(!1)));else{const e={...eventkoi_params.new_event,recurrence_rules:[]};i(e),a(!1)}}),[f]),(0,e.useEffect)((()=>{n.pathname.endsWith(r)&&t("main")}),[n,r,t]),{loading:o,setLoading:a,event:s,setEvent:i,settings:l,notFound:d,restoreEvent:async()=>{a(!0);try{const e=await Ne()({path:`${eventkoi_params.api}/restore_event`,method:"post",data:{event_id:s?.id},headers:{"EVENTKOI-API-KEY":eventkoi_params.api_key}}),t={...e.event,recurrence_rules:Array.isArray(e.event?.recurrence_rules)?e.event.recurrence_rules:[]};i(t),(e=>{e.message&&sp((({dismiss:t})=>(0,De.jsxs)("div",{className:"flex items-center cursor-pointer active:ring-2 active:ring-ring active:ring-offset-2 bg-[#222222] rounded-sm border-0 font-medium justify-between p-4 gap-4 text-sm leading-5 text-primary-foreground w-60",onClick:t,children:[e.message,e.url&&(0,De.jsx)("div",{onClick:t=>{t.stopPropagation(),window.open(e.url,"_blank")},className:"underline underline-offset-2 hover:no-underline",children:"View event"})]})),{duration:4e3})})(e)}finally{a(!1)}}}}(),[l,c]=(0,e.useState)(!1),[d,u]=(0,e.useState)(!1),[f,h]=(0,e.useState)({}),m=Y(),{id:p,timestamp:g}=X(),v=m.pathname.includes("/instances/edit/"),y=(0,e.useMemo)((()=>v&&r&&g?jp(r,g,!1):null),[v,r,g]);if((0,e.useEffect)((()=>{!r?.id&&window.location.hash.includes("/events/add/")&&(async()=>{try{const e=await Ne()({path:`${eventkoi_params.api}/update_event`,method:"POST",data:{event:{title:"",excerpt:"(auto-draft)",wp_status:"draft"}},headers:{"EVENTKOI-API-KEY":eventkoi_params.api_key}});console.log(e.id),e?.id&&(o(e),window.location.hash=window.location.hash.replace("/events/add/",`/events/${e.id}/`))}catch(e){console.error("❌ Failed to create auto-draft",e)}})()}),[]),(0,e.useEffect)((()=>{if(v&&r?.id&&g){const e=jp(r,g,!0);h(e)}}),[v,r,g]),!r||v&&!y)return null;if("trash"===r.wp_status)return(0,De.jsxs)("div",{className:"flex-1 flex items-center justify-center text-sm flex-col gap-4 relative w-full",children:[(0,De.jsx)("div",{className:"absolute top-4 left-4",children:(0,De.jsx)(tl,{variant:"link",asChild:!0,children:(0,De.jsxs)(Se,{to:"/events",children:[(0,De.jsx)(Hl,{className:"mr-2 h-4 w-4"}),"Back"]})})}),(0,De.jsx)(_p,{className:"w-10 h-10 text-muted-foreground",strokeWidth:1}),(0,De.jsx)("div",{className:"text-base text-muted-foreground",children:"Event has moved to Trash. Restore it before you can edit."}),(0,De.jsx)("div",{className:"pt-4",children:(0,De.jsx)(tl,{onClick:i,children:"Restore event"})})]});const b=(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)(wp,{}),(0,De.jsxs)(Fi,{className:v?"max-w-[800px]":"max-w-[1180px]",children:[(0,De.jsxs)("div",{className:Ni("w-full mx-auto items-start gap-6",v?"grid grid-cols-1":"grid md:grid-cols-[180px_1fr] grid-cols-1"),children:[!v&&(0,De.jsx)(Cp,{}),(0,De.jsx)("div",{className:"grid",children:(0,De.jsx)(de,{context:{instanceData:f,setInstanceData:h}})})]}),(0,De.jsx)("div",{className:"h-10"})]})]});return(0,De.jsx)(Ll.Provider,{value:{event:r,setEvent:o,loading:t,setLoading:n,settings:a,restoreEvent:i,isPublishing:l,setIsPublishing:c,disableAutoSave:d,setDisableAutoSave:u},children:v?(0,De.jsx)(Zm.Provider,{value:{data:f,setData:h,originalData:y,setOriginalData:()=>{},resetData:async()=>{if(r?.id&&g)try{await Ne()({path:`${eventkoi_params.api}/reset_instance`,method:"POST",headers:{"EVENTKOI-API-KEY":eventkoi_params.api_key},data:{event_id:r.id,timestamp:g}});const e=jp(r,g,!1);h(e)}catch(e){console.error("Failed to reset instance:",e)}},eventId:r.id,timestamp:g,setEvent:o},children:b}):b})}const Np=Mi("EllipsisVertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);function Dp({table:e,base:t,fetchResults:n,addTo:r,queryStatus:o}){const a=async r=>{let o=e.getFilteredSelectedRowModel().rows,a=[];o.forEach(((e,t)=>{a.push(e.original.id)}));let s={ids:a,action:r,base:t};const i=`${eventkoi_params.api}/${r}_${t}`;await Ne()({path:i,method:"post",data:s,headers:{"EVENTKOI-API-KEY":eventkoi_params.api_key}}).then((t=>{e.setRowSelection({}),n(t.success)})).catch((e=>{}))};return(0,De.jsxs)(zm,{children:[(0,De.jsx)(Hm,{asChild:!0,children:(0,De.jsxs)(tl,{variant:"outline",className:"flex font-normal w-full sm:w-auto justify-start sm:justify-center",children:[(0,De.jsx)(Np,{className:"mr-2 h-4 w-4"}),"Bulk actions"]})}),(0,De.jsx)($m,{align:"start",className:"w-[180px]",children:"trash"==o?(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)(Gm,{disabled:0==e.getFilteredSelectedRowModel().rows.length,onClick:()=>{a("restore")},children:(0,De.jsx)("span",{children:"Restore"})}),(0,De.jsx)(Gm,{disabled:0==e.getFilteredSelectedRowModel().rows.length,onClick:()=>{a("remove")},children:(0,De.jsx)("span",{children:"Delete permanently"})})]}):(0,De.jsxs)(De.Fragment,{children:["calendars"!==t&&(0,De.jsx)(Gm,{disabled:0==e.getFilteredSelectedRowModel().rows.length,onClick:()=>{a("duplicate")},children:(0,De.jsx)("span",{children:"Duplicate"})}),(0,De.jsx)(Gm,{disabled:0==e.getFilteredSelectedRowModel().rows.length,onClick:()=>{a("delete")},children:(0,De.jsx)("span",{children:["calendars"].includes(t)?"Delete":"Move to trash"})}),r&&e.getFilteredSelectedRowModel().rows.length>0&&(0,De.jsxs)(Bm,{children:[(0,De.jsx)(Wm,{children:(0,De.jsx)("span",{children:r})}),(0,De.jsx)(Vm,{children:(0,De.jsx)(Um,{children:(0,De.jsx)(Ym,{children:"Panel"})})})]}),r&&0==e.getFilteredSelectedRowModel().rows.length&&(0,De.jsx)(Gm,{disabled:0==e.getFilteredSelectedRowModel().rows.length,children:(0,De.jsx)("span",{children:r})})]})})]})}function Tp(e){const t=Ye(e);return t.setDate(1),t.setHours(0,0,0,0),t}function Ap(e){const t=Ye(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function Rp(e,t){const n=Ye(e),r=n.getFullYear(),o=n.getDate(),a=Qe(e,0);a.setFullYear(r,t,15),a.setHours(0,0,0,0);const s=function(e){const t=Ye(e),n=t.getFullYear(),r=t.getMonth(),o=Qe(e,0);return o.setFullYear(n,r+1,0),o.setHours(0,0,0,0),o.getDate()}(a);return n.setMonth(t,Math.min(o,s)),n}function Mp(e,t){const n=Ye(e);return isNaN(+n)?Qe(e,NaN):(n.setFullYear(t),n)}function Op(e,t){const n=Ye(e),r=Ye(t);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}function Ip(e,t){const n=Ye(e);if(isNaN(t))return Qe(e,NaN);if(!t)return n;const r=n.getDate(),o=Qe(e,n.getTime());return o.setMonth(n.getMonth()+t+1,0),r>=o.getDate()?o:(n.setFullYear(o.getFullYear(),o.getMonth(),r),n)}function Pp(e,t){const n=Ye(e),r=Ye(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function Lp(e,t){return+Ye(e)<+Ye(t)}function Fp(e,t){const n=Ye(e);return isNaN(t)?Qe(e,NaN):t?(n.setDate(n.getDate()+t),n):n}function zp(e,t){return+qe(e)===+qe(t)}function Hp(e,t){const n=Ye(e),r=Ye(t);return n.getTime()>r.getTime()}function Vp(e,t){return Fp(e,-t)}function Bp(e,t){return Fp(e,7*t)}function Wp(e,t){return Ip(e,12*t)}function Up(e,t){const n=$e(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Ye(e),a=o.getDay(),s=6+(a<r?-7:0)-(a-r);return o.setDate(o.getDate()+s),o.setHours(23,59,59,999),o}function $p(e){return Up(e,{weekStartsOn:1})}function Gp(e,t){return function(e,t,n){const r=Xe(e,n),o=Xe(t,n),a=+r-Ze(r),s=+o-Ze(o);return Math.round((a-s)/Ge)}(function(e){const t=Ye(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(0,0,0,0),t}(e),Tp(e),t)+1}var Yp=function(){return Yp=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Yp.apply(this,arguments)};function qp(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function Zp(e){return"multiple"===e.mode}function Kp(e){return"range"===e.mode}function Qp(e){return"single"===e.mode}"function"==typeof SuppressedError&&SuppressedError;var Jp={root:"rdp",multiple_months:"rdp-multiple_months",with_weeknumber:"rdp-with_weeknumber",vhidden:"rdp-vhidden",button_reset:"rdp-button_reset",button:"rdp-button",caption:"rdp-caption",caption_start:"rdp-caption_start",caption_end:"rdp-caption_end",caption_between:"rdp-caption_between",caption_label:"rdp-caption_label",caption_dropdowns:"rdp-caption_dropdowns",dropdown:"rdp-dropdown",dropdown_month:"rdp-dropdown_month",dropdown_year:"rdp-dropdown_year",dropdown_icon:"rdp-dropdown_icon",months:"rdp-months",month:"rdp-month",table:"rdp-table",tbody:"rdp-tbody",tfoot:"rdp-tfoot",head:"rdp-head",head_row:"rdp-head_row",head_cell:"rdp-head_cell",nav:"rdp-nav",nav_button:"rdp-nav_button",nav_button_previous:"rdp-nav_button_previous",nav_button_next:"rdp-nav_button_next",nav_icon:"rdp-nav_icon",row:"rdp-row",weeknumber:"rdp-weeknumber",cell:"rdp-cell",day:"rdp-day",day_today:"rdp-day_today",day_outside:"rdp-day_outside",day_selected:"rdp-day_selected",day_disabled:"rdp-day_disabled",day_hidden:"rdp-day_hidden",day_range_start:"rdp-day_range_start",day_range_end:"rdp-day_range_end",day_range_middle:"rdp-day_range_middle"},Xp=Object.freeze({__proto__:null,formatCaption:function(e,t){return Ct(e,"LLLL y",t)},formatDay:function(e,t){return Ct(e,"d",t)},formatMonthCaption:function(e,t){return Ct(e,"LLLL",t)},formatWeekNumber:function(e){return"".concat(e)},formatWeekdayName:function(e,t){return Ct(e,"cccccc",t)},formatYearCaption:function(e,t){return Ct(e,"yyyy",t)}}),eg=Object.freeze({__proto__:null,labelDay:function(e,t,n){return Ct(e,"do MMMM (EEEE)",n)},labelMonthDropdown:function(){return"Month: "},labelNext:function(){return"Go to next month"},labelPrevious:function(){return"Go to previous month"},labelWeekNumber:function(e){return"Week n. ".concat(e)},labelWeekday:function(e,t){return Ct(e,"cccc",t)},labelYearDropdown:function(){return"Year: "}});var tg=(0,e.createContext)(void 0);function ng(e){var t,n,r,o,a,s=e.initialProps,i=(n=Jp,r=We,o=new Date,{captionLayout:"buttons",classNames:n,formatters:Xp,labels:eg,locale:r,modifiersClassNames:{},modifiers:{},numberOfMonths:1,styles:{},today:o,mode:"default"}),l=function(e){var t=e.fromYear,n=e.toYear,r=e.fromMonth,o=e.toMonth,a=e.fromDate,s=e.toDate;return r?a=Tp(r):t&&(a=new Date(t,0,1)),o?s=Ap(o):n&&(s=new Date(n,11,31)),{fromDate:a?qe(a):void 0,toDate:s?qe(s):void 0}}(s),c=l.fromDate,d=l.toDate,u=null!==(t=s.captionLayout)&&void 0!==t?t:i.captionLayout;"buttons"===u||c&&d||(u="buttons"),(Qp(s)||Zp(s)||Kp(s))&&(a=s.onSelect);var f=Yp(Yp(Yp({},i),s),{captionLayout:u,classNames:Yp(Yp({},i.classNames),s.classNames),components:Yp({},s.components),formatters:Yp(Yp({},i.formatters),s.formatters),fromDate:c,labels:Yp(Yp({},i.labels),s.labels),mode:s.mode||i.mode,modifiers:Yp(Yp({},i.modifiers),s.modifiers),modifiersClassNames:Yp(Yp({},i.modifiersClassNames),s.modifiersClassNames),onSelect:a,styles:Yp(Yp({},i.styles),s.styles),toDate:d});return(0,De.jsx)(tg.Provider,{value:f,children:e.children})}function rg(){var t=(0,e.useContext)(tg);if(!t)throw new Error("useDayPicker must be used within a DayPickerProvider.");return t}function og(e){var t=rg(),n=t.locale,r=t.classNames,o=t.styles,a=t.formatters.formatCaption;return(0,De.jsx)("div",{className:r.caption_label,style:o.caption_label,"aria-live":"polite",role:"presentation",id:e.id,children:a(e.displayMonth,{locale:n})})}function ag(e){return(0,De.jsx)("svg",Yp({width:"8px",height:"8px",viewBox:"0 0 120 120","data-testid":"iconDropdown"},e,{children:(0,De.jsx)("path",{d:"M4.22182541,48.2218254 C8.44222828,44.0014225 15.2388494,43.9273804 19.5496459,47.9996989 L19.7781746,48.2218254 L60,88.443 L100.221825,48.2218254 C104.442228,44.0014225 111.238849,43.9273804 115.549646,47.9996989 L115.778175,48.2218254 C119.998577,52.4422283 120.07262,59.2388494 116.000301,63.5496459 L115.778175,63.7781746 L67.7781746,111.778175 C63.5577717,115.998577 56.7611506,116.07262 52.4503541,112.000301 L52.2218254,111.778175 L4.22182541,63.7781746 C-0.0739418023,59.4824074 -0.0739418023,52.5175926 4.22182541,48.2218254 Z",fill:"currentColor",fillRule:"nonzero"})}))}function sg(e){var t,n,r=e.onChange,o=e.value,a=e.children,s=e.caption,i=e.className,l=e.style,c=rg(),d=null!==(n=null===(t=c.components)||void 0===t?void 0:t.IconDropdown)&&void 0!==n?n:ag;return(0,De.jsxs)("div",{className:i,style:l,children:[(0,De.jsx)("span",{className:c.classNames.vhidden,children:e["aria-label"]}),(0,De.jsx)("select",{name:e.name,"aria-label":e["aria-label"],className:c.classNames.dropdown,style:c.styles.dropdown,value:o,onChange:r,children:a}),(0,De.jsxs)("div",{className:c.classNames.caption_label,style:c.styles.caption_label,"aria-hidden":"true",children:[s,(0,De.jsx)(d,{className:c.classNames.dropdown_icon,style:c.styles.dropdown_icon})]})]})}function ig(e){var t,n=rg(),r=n.fromDate,o=n.toDate,a=n.styles,s=n.locale,i=n.formatters.formatMonthCaption,l=n.classNames,c=n.components,d=n.labels.labelMonthDropdown;if(!r)return(0,De.jsx)(De.Fragment,{});if(!o)return(0,De.jsx)(De.Fragment,{});var u=[];if(function(e,t){const n=Ye(e),r=Ye(t);return n.getFullYear()===r.getFullYear()}(r,o))for(var f=Tp(r),h=r.getMonth();h<=o.getMonth();h++)u.push(Rp(f,h));else for(f=Tp(new Date),h=0;h<=11;h++)u.push(Rp(f,h));var m=null!==(t=null==c?void 0:c.Dropdown)&&void 0!==t?t:sg;return(0,De.jsx)(m,{name:"months","aria-label":d(),className:l.dropdown_month,style:a.dropdown_month,onChange:function(t){var n=Number(t.target.value),r=Rp(Tp(e.displayMonth),n);e.onChange(r)},value:e.displayMonth.getMonth(),caption:i(e.displayMonth,{locale:s}),children:u.map((function(e){return(0,De.jsx)("option",{value:e.getMonth(),children:i(e,{locale:s})},e.getMonth())}))})}function lg(e){var t,n=e.displayMonth,r=rg(),o=r.fromDate,a=r.toDate,s=r.locale,i=r.styles,l=r.classNames,c=r.components,d=r.formatters.formatYearCaption,u=r.labels.labelYearDropdown,f=[];if(!o)return(0,De.jsx)(De.Fragment,{});if(!a)return(0,De.jsx)(De.Fragment,{});for(var h=o.getFullYear(),m=a.getFullYear(),p=h;p<=m;p++)f.push(Mp(Je(new Date),p));var g=null!==(t=null==c?void 0:c.Dropdown)&&void 0!==t?t:sg;return(0,De.jsx)(g,{name:"years","aria-label":u(),className:l.dropdown_year,style:i.dropdown_year,onChange:function(t){var r=Mp(Tp(n),Number(t.target.value));e.onChange(r)},value:n.getFullYear(),caption:d(n,{locale:s}),children:f.map((function(e){return(0,De.jsx)("option",{value:e.getFullYear(),children:d(e,{locale:s})},e.getFullYear())}))})}var cg=(0,e.createContext)(void 0);function dg(t){var n=rg(),r=function(){var t=rg(),n=function(e){var t=e.month,n=e.defaultMonth,r=e.today,o=t||n||r||new Date,a=e.toDate,s=e.fromDate,i=e.numberOfMonths,l=void 0===i?1:i;return a&&Op(a,o)<0&&(o=Ip(a,-1*(l-1))),s&&Op(o,s)<0&&(o=s),Tp(o)}(t),r=function(t,n){var r=(0,e.useState)(t),o=r[0];return[void 0===n?o:n,r[1]]}(n,t.month),o=r[0],a=r[1];return[o,function(e){var n;if(!t.disableNavigation){var r=Tp(e);a(r),null===(n=t.onMonthChange)||void 0===n||n.call(t,r)}}]}(),o=r[0],a=r[1],s=function(e,t){for(var n=t.reverseMonths,r=t.numberOfMonths,o=Tp(e),a=Op(Tp(Ip(o,r)),o),s=[],i=0;i<a;i++){var l=Ip(o,i);s.push(l)}return n&&(s=s.reverse()),s}(o,n),i=function(e,t){if(!t.disableNavigation){var n=t.toDate,r=t.pagedNavigation,o=t.numberOfMonths,a=void 0===o?1:o,s=r?a:1,i=Tp(e);if(!n)return Ip(i,s);if(!(Op(n,e)<a))return Ip(i,s)}}(o,n),l=function(e,t){if(!t.disableNavigation){var n=t.fromDate,r=t.pagedNavigation,o=t.numberOfMonths,a=r?void 0===o?1:o:1,s=Tp(e);if(!n)return Ip(s,-a);if(!(Op(s,n)<=0))return Ip(s,-a)}}(o,n),c=function(e){return s.some((function(t){return Pp(e,t)}))},d={currentMonth:o,displayMonths:s,goToMonth:a,goToDate:function(e,t){c(e)||(t&&Lp(e,t)?a(Ip(e,1+-1*n.numberOfMonths)):a(e))},previousMonth:l,nextMonth:i,isDateDisplayed:c};return(0,De.jsx)(cg.Provider,{value:d,children:t.children})}function ug(){var t=(0,e.useContext)(cg);if(!t)throw new Error("useNavigation must be used within a NavigationProvider");return t}function fg(e){var t,n=rg(),r=n.classNames,o=n.styles,a=n.components,s=ug().goToMonth,i=function(t){s(Ip(t,e.displayIndex?-e.displayIndex:0))},l=null!==(t=null==a?void 0:a.CaptionLabel)&&void 0!==t?t:og,c=(0,De.jsx)(l,{id:e.id,displayMonth:e.displayMonth});return(0,De.jsxs)("div",{className:r.caption_dropdowns,style:o.caption_dropdowns,children:[(0,De.jsx)("div",{className:r.vhidden,children:c}),(0,De.jsx)(ig,{onChange:i,displayMonth:e.displayMonth}),(0,De.jsx)(lg,{onChange:i,displayMonth:e.displayMonth})]})}function hg(e){return(0,De.jsx)("svg",Yp({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:(0,De.jsx)("path",{d:"M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z",fill:"currentColor",fillRule:"nonzero"})}))}function mg(e){return(0,De.jsx)("svg",Yp({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:(0,De.jsx)("path",{d:"M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z",fill:"currentColor"})}))}var pg=(0,e.forwardRef)((function(e,t){var n=rg(),r=n.classNames,o=n.styles,a=[r.button_reset,r.button];e.className&&a.push(e.className);var s=a.join(" "),i=Yp(Yp({},o.button_reset),o.button);return e.style&&Object.assign(i,e.style),(0,De.jsx)("button",Yp({},e,{ref:t,type:"button",className:s,style:i}))}));function gg(e){var t,n,r=rg(),o=r.dir,a=r.locale,s=r.classNames,i=r.styles,l=r.labels,c=l.labelPrevious,d=l.labelNext,u=r.components;if(!e.nextMonth&&!e.previousMonth)return(0,De.jsx)(De.Fragment,{});var f=c(e.previousMonth,{locale:a}),h=[s.nav_button,s.nav_button_previous].join(" "),m=d(e.nextMonth,{locale:a}),p=[s.nav_button,s.nav_button_next].join(" "),g=null!==(t=null==u?void 0:u.IconRight)&&void 0!==t?t:mg,v=null!==(n=null==u?void 0:u.IconLeft)&&void 0!==n?n:hg;return(0,De.jsxs)("div",{className:s.nav,style:i.nav,children:[!e.hidePrevious&&(0,De.jsx)(pg,{name:"previous-month","aria-label":f,className:h,style:i.nav_button_previous,disabled:!e.previousMonth,onClick:e.onPreviousClick,children:"rtl"===o?(0,De.jsx)(g,{className:s.nav_icon,style:i.nav_icon}):(0,De.jsx)(v,{className:s.nav_icon,style:i.nav_icon})}),!e.hideNext&&(0,De.jsx)(pg,{name:"next-month","aria-label":m,className:p,style:i.nav_button_next,disabled:!e.nextMonth,onClick:e.onNextClick,children:"rtl"===o?(0,De.jsx)(v,{className:s.nav_icon,style:i.nav_icon}):(0,De.jsx)(g,{className:s.nav_icon,style:i.nav_icon})})]})}function vg(e){var t=rg().numberOfMonths,n=ug(),r=n.previousMonth,o=n.nextMonth,a=n.goToMonth,s=n.displayMonths,i=s.findIndex((function(t){return Pp(e.displayMonth,t)})),l=0===i,c=i===s.length-1,d=t>1&&(l||!c),u=t>1&&(c||!l);return(0,De.jsx)(gg,{displayMonth:e.displayMonth,hideNext:d,hidePrevious:u,nextMonth:o,previousMonth:r,onPreviousClick:function(){r&&a(r)},onNextClick:function(){o&&a(o)}})}function yg(e){var t,n,r=rg(),o=r.classNames,a=r.disableNavigation,s=r.styles,i=r.captionLayout,l=r.components,c=null!==(t=null==l?void 0:l.CaptionLabel)&&void 0!==t?t:og;return n=a?(0,De.jsx)(c,{id:e.id,displayMonth:e.displayMonth}):"dropdown"===i?(0,De.jsx)(fg,{displayMonth:e.displayMonth,id:e.id}):"dropdown-buttons"===i?(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)(fg,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),(0,De.jsx)(vg,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)(c,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),(0,De.jsx)(vg,{displayMonth:e.displayMonth,id:e.id})]}),(0,De.jsx)("div",{className:o.caption,style:s.caption,children:n})}function bg(e){var t=rg(),n=t.footer,r=t.styles,o=t.classNames.tfoot;return n?(0,De.jsx)("tfoot",{className:o,style:r.tfoot,children:(0,De.jsx)("tr",{children:(0,De.jsx)("td",{colSpan:8,children:n})})}):(0,De.jsx)(De.Fragment,{})}function xg(){var e=rg(),t=e.classNames,n=e.styles,r=e.showWeekNumber,o=e.locale,a=e.weekStartsOn,s=e.ISOWeek,i=e.formatters.formatWeekdayName,l=e.labels.labelWeekday,c=function(e,t,n){for(var r=n?et(new Date):Xe(new Date,{locale:e,weekStartsOn:t}),o=[],a=0;a<7;a++){var s=Fp(r,a);o.push(s)}return o}(o,a,s);return(0,De.jsxs)("tr",{style:n.head_row,className:t.head_row,children:[r&&(0,De.jsx)("td",{style:n.head_cell,className:t.head_cell}),c.map((function(e,r){return(0,De.jsx)("th",{scope:"col",className:t.head_cell,style:n.head_cell,"aria-label":l(e,{locale:o}),children:i(e,{locale:o})},r)}))]})}function wg(){var e,t=rg(),n=t.classNames,r=t.styles,o=t.components,a=null!==(e=null==o?void 0:o.HeadRow)&&void 0!==e?e:xg;return(0,De.jsx)("thead",{style:r.head,className:n.head,children:(0,De.jsx)(a,{})})}function kg(e){var t=rg(),n=t.locale,r=t.formatters.formatDay;return(0,De.jsx)(De.Fragment,{children:r(e.date,{locale:n})})}var Sg=(0,e.createContext)(void 0);function Cg(e){if(!Zp(e.initialProps)){return(0,De.jsx)(Sg.Provider,{value:{selected:void 0,modifiers:{disabled:[]}},children:e.children})}return(0,De.jsx)(_g,{initialProps:e.initialProps,children:e.children})}function _g(e){var t=e.initialProps,n=e.children,r=t.selected,o=t.min,a=t.max,s={disabled:[]};r&&s.disabled.push((function(e){var t=a&&r.length>a-1,n=r.some((function(t){return zp(t,e)}));return Boolean(t&&!n)}));var i={selected:r,onDayClick:function(e,n,s){var i,l;if(!(null===(i=t.onDayClick)||void 0===i||i.call(t,e,n,s),Boolean(n.selected&&o&&(null==r?void 0:r.length)===o)||Boolean(!n.selected&&a&&(null==r?void 0:r.length)===a))){var c=r?qp([],r,!0):[];if(n.selected){var d=c.findIndex((function(t){return zp(e,t)}));c.splice(d,1)}else c.push(e);null===(l=t.onSelect)||void 0===l||l.call(t,c,e,n,s)}},modifiers:s};return(0,De.jsx)(Sg.Provider,{value:i,children:n})}function jg(){var t=(0,e.useContext)(Sg);if(!t)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return t}var Eg,Ng=(0,e.createContext)(void 0);function Dg(e){if(!Kp(e.initialProps)){return(0,De.jsx)(Ng.Provider,{value:{selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}},children:e.children})}return(0,De.jsx)(Tg,{initialProps:e.initialProps,children:e.children})}function Tg(e){var t=e.initialProps,n=e.children,r=t.selected,o=r||{},a=o.from,s=o.to,i=t.min,l=t.max,c={range_start:[],range_end:[],range_middle:[],disabled:[]};if(a?(c.range_start=[a],s?(c.range_end=[s],zp(a,s)||(c.range_middle=[{after:a,before:s}])):c.range_end=[a]):s&&(c.range_start=[s],c.range_end=[s]),i&&(a&&!s&&c.disabled.push({after:Vp(a,i-1),before:Fp(a,i-1)}),a&&s&&c.disabled.push({after:a,before:Fp(a,i-1)}),!a&&s&&c.disabled.push({after:Vp(s,i-1),before:Fp(s,i-1)})),l){if(a&&!s&&(c.disabled.push({before:Fp(a,1-l)}),c.disabled.push({after:Fp(a,l-1)})),a&&s){var d=l-(Ke(s,a)+1);c.disabled.push({before:Vp(a,d)}),c.disabled.push({after:Fp(s,d)})}!a&&s&&(c.disabled.push({before:Fp(s,1-l)}),c.disabled.push({after:Fp(s,l-1)}))}return(0,De.jsx)(Ng.Provider,{value:{selected:r,onDayClick:function(e,n,o){var a,s;null===(a=t.onDayClick)||void 0===a||a.call(t,e,n,o);var i=function(e,t){var n=t||{},r=n.from,o=n.to;if(r&&o){if(zp(o,e)&&zp(r,e))return;if(zp(o,e))return{from:o,to:void 0};if(zp(r,e))return;return Hp(r,e)?{from:e,to:o}:{from:r,to:e}}return o?Hp(e,o)?{from:o,to:e}:{from:e,to:o}:r?Lp(e,r)?{from:e,to:r}:{from:r,to:e}:{from:e,to:void 0}}(e,r);null===(s=t.onSelect)||void 0===s||s.call(t,i,e,n,o)},modifiers:c},children:n})}function Ag(){var t=(0,e.useContext)(Ng);if(!t)throw new Error("useSelectRange must be used within a SelectRangeProvider");return t}function Rg(e){return Array.isArray(e)?qp([],e,!0):void 0!==e?[e]:[]}!function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"}(Eg||(Eg={}));var Mg=Eg.Selected,Og=Eg.Disabled,Ig=Eg.Hidden,Pg=Eg.Today,Lg=Eg.RangeEnd,Fg=Eg.RangeMiddle,zg=Eg.RangeStart,Hg=Eg.Outside,Vg=(0,e.createContext)(void 0);function Bg(e){var t=rg(),n=function(e,t,n){var r,o=((r={})[Mg]=Rg(e.selected),r[Og]=Rg(e.disabled),r[Ig]=Rg(e.hidden),r[Pg]=[e.today],r[Lg]=[],r[Fg]=[],r[zg]=[],r[Hg]=[],r);return e.fromDate&&o[Og].push({before:e.fromDate}),e.toDate&&o[Og].push({after:e.toDate}),Zp(e)?o[Og]=o[Og].concat(t.modifiers[Og]):Kp(e)&&(o[Og]=o[Og].concat(n.modifiers[Og]),o[zg]=n.modifiers[zg],o[Fg]=n.modifiers[Fg],o[Lg]=n.modifiers[Lg]),o}(t,jg(),Ag()),r=function(e){var t={};return Object.entries(e).forEach((function(e){var n=e[0],r=e[1];t[n]=Rg(r)})),t}(t.modifiers),o=Yp(Yp({},n),r);return(0,De.jsx)(Vg.Provider,{value:o,children:e.children})}function Wg(){var t=(0,e.useContext)(Vg);if(!t)throw new Error("useModifiers must be used within a ModifiersProvider");return t}function Ug(e,t,n){var r=Object.keys(t).reduce((function(n,r){var o=t[r];return function(e,t){return t.some((function(t){if("boolean"==typeof t)return t;if(vt(t))return zp(e,t);if(n=t,Array.isArray(n)&&n.every(vt))return t.includes(e);var n;if(function(e){return Boolean(e&&"object"==typeof e&&"from"in e)}(t))return function(e,t){var n,r=t.from,o=t.to;return r&&o?(Ke(o,r)<0&&(r=(n=[o,r])[0],o=n[1]),Ke(e,r)>=0&&Ke(o,e)>=0):o?zp(o,e):!!r&&zp(r,e)}(e,t);if(function(e){return Boolean(e&&"object"==typeof e&&"dayOfWeek"in e)}(t))return t.dayOfWeek.includes(e.getDay());if(function(e){return Boolean(e&&"object"==typeof e&&"before"in e&&"after"in e)}(t)){var r=Ke(t.before,e)>0,o=Ke(t.after,e)<0;return Hp(t.before,t.after)?o&&r:r||o}return function(e){return Boolean(e&&"object"==typeof e&&"after"in e)}(t)?Ke(e,t.after)>0:function(e){return Boolean(e&&"object"==typeof e&&"before"in e)}(t)?Ke(t.before,e)>0:"function"==typeof t&&t(e)}))}(e,o)&&n.push(r),n}),[]),o={};return r.forEach((function(e){return o[e]=!0})),n&&!Pp(e,n)&&(o.outside=!0),o}function $g(e,t){var n=t.moveBy,r=t.direction,o=t.context,a=t.modifiers,s=t.retry,i=void 0===s?{count:0,lastFocused:e}:s,l=o.weekStartsOn,c=o.fromDate,d=o.toDate,u=o.locale,f={day:Fp,week:Bp,month:Ip,year:Wp,startOfWeek:function(e){return o.ISOWeek?et(e):Xe(e,{locale:u,weekStartsOn:l})},endOfWeek:function(e){return o.ISOWeek?$p(e):Up(e,{locale:u,weekStartsOn:l})}}[n](e,"after"===r?1:-1);"before"===r&&c?f=function(e){let t;return e.forEach((function(e){const n=Ye(e);(void 0===t||t<n||isNaN(Number(n)))&&(t=n)})),t||new Date(NaN)}([c,f]):"after"===r&&d&&(f=function(e){let t;return e.forEach((e=>{const n=Ye(e);(!t||t>n||isNaN(+n))&&(t=n)})),t||new Date(NaN)}([d,f]));var h=!0;if(a){var m=Ug(f,a);h=!m.disabled&&!m.hidden}return h?f:i.count>365?i.lastFocused:$g(f,{moveBy:n,direction:r,context:o,modifiers:a,retry:Yp(Yp({},i),{count:i.count+1})})}var Gg=(0,e.createContext)(void 0);function Yg(t){var n=ug(),r=Wg(),o=(0,e.useState)(),a=o[0],s=o[1],i=(0,e.useState)(),l=i[0],c=i[1],d=function(e,t){for(var n,r,o=Tp(e[0]),a=Ap(e[e.length-1]),s=o;s<=a;){var i=Ug(s,t);if(i.disabled||i.hidden)s=Fp(s,1);else{if(i.selected)return s;i.today&&!r&&(r=s),n||(n=s),s=Fp(s,1)}}return r||n}(n.displayMonths,r),u=(null!=a?a:l&&n.isDateDisplayed(l))?l:d,f=function(e){s(e)},h=rg(),m=function(e,t){if(a){var o=$g(a,{moveBy:e,direction:t,context:h,modifiers:r});zp(a,o)||(n.goToDate(o,a),f(o))}},p={focusedDay:a,focusTarget:u,blur:function(){c(a),s(void 0)},focus:f,focusDayAfter:function(){return m("day","after")},focusDayBefore:function(){return m("day","before")},focusWeekAfter:function(){return m("week","after")},focusWeekBefore:function(){return m("week","before")},focusMonthBefore:function(){return m("month","before")},focusMonthAfter:function(){return m("month","after")},focusYearBefore:function(){return m("year","before")},focusYearAfter:function(){return m("year","after")},focusStartOfWeek:function(){return m("startOfWeek","before")},focusEndOfWeek:function(){return m("endOfWeek","after")}};return(0,De.jsx)(Gg.Provider,{value:p,children:t.children})}function qg(){var t=(0,e.useContext)(Gg);if(!t)throw new Error("useFocusContext must be used within a FocusProvider");return t}var Zg=(0,e.createContext)(void 0);function Kg(e){if(!Qp(e.initialProps)){return(0,De.jsx)(Zg.Provider,{value:{selected:void 0},children:e.children})}return(0,De.jsx)(Qg,{initialProps:e.initialProps,children:e.children})}function Qg(e){var t=e.initialProps,n=e.children,r={selected:t.selected,onDayClick:function(e,n,r){var o,a,s;null===(o=t.onDayClick)||void 0===o||o.call(t,e,n,r),!n.selected||t.required?null===(s=t.onSelect)||void 0===s||s.call(t,e,e,n,r):null===(a=t.onSelect)||void 0===a||a.call(t,void 0,e,n,r)}};return(0,De.jsx)(Zg.Provider,{value:r,children:n})}function Jg(){var t=(0,e.useContext)(Zg);if(!t)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return t}function Xg(t,n,r){var o,a,s,i=rg(),l=qg(),c=function(e,t){return Ug(e,Wg(),t)}(t,n),d=function(e,t){var n=rg(),r=Jg(),o=jg(),a=Ag(),s=qg(),i=s.focusDayAfter,l=s.focusDayBefore,c=s.focusWeekAfter,d=s.focusWeekBefore,u=s.blur,f=s.focus,h=s.focusMonthBefore,m=s.focusMonthAfter,p=s.focusYearBefore,g=s.focusYearAfter,v=s.focusStartOfWeek,y=s.focusEndOfWeek,b={onClick:function(s){var i,l,c,d;Qp(n)?null===(i=r.onDayClick)||void 0===i||i.call(r,e,t,s):Zp(n)?null===(l=o.onDayClick)||void 0===l||l.call(o,e,t,s):Kp(n)?null===(c=a.onDayClick)||void 0===c||c.call(a,e,t,s):null===(d=n.onDayClick)||void 0===d||d.call(n,e,t,s)},onFocus:function(r){var o;f(e),null===(o=n.onDayFocus)||void 0===o||o.call(n,e,t,r)},onBlur:function(r){var o;u(),null===(o=n.onDayBlur)||void 0===o||o.call(n,e,t,r)},onKeyDown:function(r){var o;switch(r.key){case"ArrowLeft":r.preventDefault(),r.stopPropagation(),"rtl"===n.dir?i():l();break;case"ArrowRight":r.preventDefault(),r.stopPropagation(),"rtl"===n.dir?l():i();break;case"ArrowDown":r.preventDefault(),r.stopPropagation(),c();break;case"ArrowUp":r.preventDefault(),r.stopPropagation(),d();break;case"PageUp":r.preventDefault(),r.stopPropagation(),r.shiftKey?p():h();break;case"PageDown":r.preventDefault(),r.stopPropagation(),r.shiftKey?g():m();break;case"Home":r.preventDefault(),r.stopPropagation(),v();break;case"End":r.preventDefault(),r.stopPropagation(),y()}null===(o=n.onDayKeyDown)||void 0===o||o.call(n,e,t,r)},onKeyUp:function(r){var o;null===(o=n.onDayKeyUp)||void 0===o||o.call(n,e,t,r)},onMouseEnter:function(r){var o;null===(o=n.onDayMouseEnter)||void 0===o||o.call(n,e,t,r)},onMouseLeave:function(r){var o;null===(o=n.onDayMouseLeave)||void 0===o||o.call(n,e,t,r)},onPointerEnter:function(r){var o;null===(o=n.onDayPointerEnter)||void 0===o||o.call(n,e,t,r)},onPointerLeave:function(r){var o;null===(o=n.onDayPointerLeave)||void 0===o||o.call(n,e,t,r)},onTouchCancel:function(r){var o;null===(o=n.onDayTouchCancel)||void 0===o||o.call(n,e,t,r)},onTouchEnd:function(r){var o;null===(o=n.onDayTouchEnd)||void 0===o||o.call(n,e,t,r)},onTouchMove:function(r){var o;null===(o=n.onDayTouchMove)||void 0===o||o.call(n,e,t,r)},onTouchStart:function(r){var o;null===(o=n.onDayTouchStart)||void 0===o||o.call(n,e,t,r)}};return b}(t,c),u=function(){var e=rg(),t=Jg(),n=jg(),r=Ag();return Qp(e)?t.selected:Zp(e)?n.selected:Kp(e)?r.selected:void 0}(),f=Boolean(i.onDayClick||"default"!==i.mode);(0,e.useEffect)((function(){var e;c.outside||l.focusedDay&&f&&zp(l.focusedDay,t)&&(null===(e=r.current)||void 0===e||e.focus())}),[l.focusedDay,t,r,f,c.outside]);var h=function(e,t){var n=[e.classNames.day];return Object.keys(t).forEach((function(t){var r=e.modifiersClassNames[t];if(r)n.push(r);else if(function(e){return Object.values(Eg).includes(e)}(t)){var o=e.classNames["day_".concat(t)];o&&n.push(o)}})),n}(i,c).join(" "),m=function(e,t){var n=Yp({},e.styles.day);return Object.keys(t).forEach((function(t){var r;n=Yp(Yp({},n),null===(r=e.modifiersStyles)||void 0===r?void 0:r[t])})),n}(i,c),p=Boolean(c.outside&&!i.showOutsideDays||c.hidden),g=null!==(s=null===(a=i.components)||void 0===a?void 0:a.DayContent)&&void 0!==s?s:kg,v={style:m,className:h,children:(0,De.jsx)(g,{date:t,displayMonth:n,activeModifiers:c}),role:"gridcell"},y=l.focusTarget&&zp(l.focusTarget,t)&&!c.outside,b=l.focusedDay&&zp(l.focusedDay,t),x=Yp(Yp(Yp({},v),((o={disabled:c.disabled,role:"gridcell"})["aria-selected"]=c.selected,o.tabIndex=b||y?0:-1,o)),d);return{isButton:f,isHidden:p,activeModifiers:c,selectedDays:u,buttonProps:x,divProps:v}}function ev(t){var n=(0,e.useRef)(null),r=Xg(t.date,t.displayMonth,n);return r.isHidden?(0,De.jsx)("div",{role:"gridcell"}):r.isButton?(0,De.jsx)(pg,Yp({name:"day",ref:n},r.buttonProps)):(0,De.jsx)("div",Yp({},r.divProps))}function tv(e){var t=e.number,n=e.dates,r=rg(),o=r.onWeekNumberClick,a=r.styles,s=r.classNames,i=r.locale,l=r.labels.labelWeekNumber,c=(0,r.formatters.formatWeekNumber)(Number(t),{locale:i});if(!o)return(0,De.jsx)("span",{className:s.weeknumber,style:a.weeknumber,children:c});var d=l(Number(t),{locale:i});return(0,De.jsx)(pg,{name:"week-number","aria-label":d,className:s.weeknumber,style:a.weeknumber,onClick:function(e){o(t,n,e)},children:c})}function nv(e){var t,n,r,o=rg(),a=o.styles,s=o.classNames,i=o.showWeekNumber,l=o.components,c=null!==(t=null==l?void 0:l.Day)&&void 0!==t?t:ev,d=null!==(n=null==l?void 0:l.WeekNumber)&&void 0!==n?n:tv;return i&&(r=(0,De.jsx)("td",{className:s.cell,style:a.cell,children:(0,De.jsx)(d,{number:e.weekNumber,dates:e.dates})})),(0,De.jsxs)("tr",{className:s.row,style:a.row,children:[r,e.dates.map((function(t){return(0,De.jsx)("td",{className:s.cell,style:a.cell,role:"presentation",children:(0,De.jsx)(c,{displayMonth:e.displayMonth,date:t})},function(e){return Math.trunc(+Ye(e)/1e3)}(t))}))]})}function rv(e,t,n){for(var r=(null==n?void 0:n.ISOWeek)?$p(t):Up(t,n),o=(null==n?void 0:n.ISOWeek)?et(e):Xe(e,n),a=Ke(r,o),s=[],i=0;i<=a;i++)s.push(Fp(o,i));return s.reduce((function(e,t){var r=(null==n?void 0:n.ISOWeek)?nt(t):ot(t,n),o=e.find((function(e){return e.weekNumber===r}));return o?(o.dates.push(t),e):(e.push({weekNumber:r,dates:[t]}),e)}),[])}function ov(e){var t,n,r,o=rg(),a=o.locale,s=o.classNames,i=o.styles,l=o.hideHead,c=o.fixedWeeks,d=o.components,u=o.weekStartsOn,f=o.firstWeekContainsDate,h=o.ISOWeek,m=function(e,t){var n=rv(Tp(e),Ap(e),t);if(null==t?void 0:t.useFixedWeeks){var r=Gp(e,t);if(r<6){var o=n[n.length-1],a=o.dates[o.dates.length-1],s=Bp(a,6-r),i=rv(Bp(a,1),s,t);n.push.apply(n,i)}}return n}(e.displayMonth,{useFixedWeeks:Boolean(c),ISOWeek:h,locale:a,weekStartsOn:u,firstWeekContainsDate:f}),p=null!==(t=null==d?void 0:d.Head)&&void 0!==t?t:wg,g=null!==(n=null==d?void 0:d.Row)&&void 0!==n?n:nv,v=null!==(r=null==d?void 0:d.Footer)&&void 0!==r?r:bg;return(0,De.jsxs)("table",{id:e.id,className:s.table,style:i.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!l&&(0,De.jsx)(p,{}),(0,De.jsx)("tbody",{className:s.tbody,style:i.tbody,children:m.map((function(t){return(0,De.jsx)(g,{displayMonth:e.displayMonth,dates:t.dates,weekNumber:t.weekNumber},t.weekNumber)}))}),(0,De.jsx)(v,{displayMonth:e.displayMonth})]})}var av="undefined"!=typeof window&&window.document&&window.document.createElement?e.useLayoutEffect:e.useEffect,sv=!1,iv=0;function lv(){return"react-day-picker-".concat(++iv)}function cv(t){var n,r,o=rg(),a=o.dir,s=o.classNames,i=o.styles,l=o.components,c=ug().displayMonths,d=function(t){var n,r=null!=t?t:sv?lv():null,o=(0,e.useState)(r),a=o[0],s=o[1];return av((function(){null===a&&s(lv())}),[]),(0,e.useEffect)((function(){!1===sv&&(sv=!0)}),[]),null!==(n=null!=t?t:a)&&void 0!==n?n:void 0}(o.id?"".concat(o.id,"-").concat(t.displayIndex):void 0),u=o.id?"".concat(o.id,"-grid-").concat(t.displayIndex):void 0,f=[s.month],h=i.month,m=0===t.displayIndex,p=t.displayIndex===c.length-1,g=!m&&!p;"rtl"===a&&(p=(n=[m,p])[0],m=n[1]),m&&(f.push(s.caption_start),h=Yp(Yp({},h),i.caption_start)),p&&(f.push(s.caption_end),h=Yp(Yp({},h),i.caption_end)),g&&(f.push(s.caption_between),h=Yp(Yp({},h),i.caption_between));var v=null!==(r=null==l?void 0:l.Caption)&&void 0!==r?r:yg;return(0,De.jsxs)("div",{className:f.join(" "),style:h,children:[(0,De.jsx)(v,{id:d,displayMonth:t.displayMonth,displayIndex:t.displayIndex}),(0,De.jsx)(ov,{id:u,"aria-labelledby":d,displayMonth:t.displayMonth})]},t.displayIndex)}function dv(e){var t=rg(),n=t.classNames,r=t.styles;return(0,De.jsx)("div",{className:n.months,style:r.months,children:e.children})}function uv(t){var n,r,o=t.initialProps,a=rg(),s=qg(),i=ug(),l=(0,e.useState)(!1),c=l[0],d=l[1];(0,e.useEffect)((function(){a.initialFocus&&s.focusTarget&&(c||(s.focus(s.focusTarget),d(!0)))}),[a.initialFocus,c,s.focus,s.focusTarget,s]);var u=[a.classNames.root,a.className];a.numberOfMonths>1&&u.push(a.classNames.multiple_months),a.showWeekNumber&&u.push(a.classNames.with_weeknumber);var f=Yp(Yp({},a.styles.root),a.style),h=Object.keys(o).filter((function(e){return e.startsWith("data-")})).reduce((function(e,t){var n;return Yp(Yp({},e),((n={})[t]=o[t],n))}),{}),m=null!==(r=null===(n=o.components)||void 0===n?void 0:n.Months)&&void 0!==r?r:dv;return(0,De.jsx)("div",Yp({className:u.join(" "),style:f,dir:a.dir,id:a.id,nonce:o.nonce,title:o.title,lang:o.lang},h,{children:(0,De.jsx)(m,{children:i.displayMonths.map((function(e,t){return(0,De.jsx)(cv,{displayIndex:t,displayMonth:e},t)}))})}))}function fv(e){var t=e.children,n=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["children"]);return(0,De.jsx)(ng,{initialProps:n,children:(0,De.jsx)(dg,{children:(0,De.jsx)(Kg,{initialProps:n,children:(0,De.jsx)(Cg,{initialProps:n,children:(0,De.jsx)(Dg,{initialProps:n,children:(0,De.jsx)(Bg,{children:(0,De.jsx)(Yg,{children:t})})})})})})})}function hv(e){return(0,De.jsx)(fv,Yp({},e,{children:(0,De.jsx)(uv,{initialProps:e})}))}function mv({className:e,classNames:t,showOutsideDays:n=!0,...r}){return(0,De.jsx)(hv,{showOutsideDays:n,className:Ni("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:Ni("h-8 w-8 rounded-md flex items-center justify-center text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-colors","[&>svg]:h-3 [&>svg]:w-3"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:"h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",day:Ni(el({variant:"ghost"}),"h-9 w-9 p-0 font-normal aria-selected:opacity-100"),day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},...r})}mv.displayName="Calendar";const pv=(0,e.memo)(mv);var gv="Popover",[vv,yv]=Wl(gv,[Xd]),bv=Xd(),[xv,wv]=vv(gv),kv=t=>{const{__scopePopover:n,children:r,open:o,defaultOpen:a,onOpenChange:s,modal:i=!1}=t,l=bv(n),c=e.useRef(null),[d,u]=e.useState(!1),[f,h]=Yl({prop:o,defaultProp:a??!1,onChange:s,caller:gv});return(0,De.jsx)(pu,{...l,children:(0,De.jsx)(xv,{scope:n,contentId:xc(),triggerRef:c,open:f,onOpenChange:h,onOpenToggle:e.useCallback((()=>h((e=>!e))),[h]),hasCustomAnchor:d,onCustomAnchorAdd:e.useCallback((()=>u(!0)),[]),onCustomAnchorRemove:e.useCallback((()=>u(!1)),[]),modal:i,children:r})})};kv.displayName=gv;var Sv="PopoverAnchor";e.forwardRef(((t,n)=>{const{__scopePopover:r,...o}=t,a=wv(Sv,r),s=bv(r),{onCustomAnchorAdd:i,onCustomAnchorRemove:l}=a;return e.useEffect((()=>(i(),()=>l())),[i,l]),(0,De.jsx)(gu,{...s,...o,ref:n})})).displayName=Sv;var Cv="PopoverTrigger",_v=e.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,o=wv(Cv,n),a=bv(n),s=$i(t,o.triggerRef),i=(0,De.jsx)(wl.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Lv(o.open),...r,ref:s,onClick:Bl(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:(0,De.jsx)(gu,{asChild:!0,...a,children:i})}));_v.displayName=Cv;var jv="PopoverPortal",[Ev,Nv]=vv(jv,{forceMount:void 0}),Dv=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=wv(jv,t);return(0,De.jsx)(Ev,{scope:t,forceMount:n,children:(0,De.jsx)(xu,{present:n||a.open,children:(0,De.jsx)(bu,{asChild:!0,container:o,children:r})})})};Dv.displayName=jv;var Tv="PopoverContent",Av=e.forwardRef(((e,t)=>{const n=Nv(Tv,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=wv(Tv,e.__scopePopover);return(0,De.jsx)(xu,{present:r||a.open,children:a.modal?(0,De.jsx)(Mv,{...o,ref:t}):(0,De.jsx)(Ov,{...o,ref:t})})}));Av.displayName=Tv;var Rv=Gi("PopoverContent.RemoveScroll"),Mv=e.forwardRef(((t,n)=>{const r=wv(Tv,t.__scopePopover),o=e.useRef(null),a=$i(n,o),s=e.useRef(!1);return e.useEffect((()=>{const e=o.current;if(e)return $u(e)}),[]),(0,De.jsx)(Of,{as:Rv,allowPinchZoom:!0,children:(0,De.jsx)(Iv,{...t,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Bl(t.onCloseAutoFocus,(e=>{e.preventDefault(),s.current||r.triggerRef.current?.focus()})),onPointerDownOutside:Bl(t.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;s.current=r}),{checkForDefaultPrevented:!1}),onFocusOutside:Bl(t.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})})})),Ov=e.forwardRef(((t,n)=>{const r=wv(Tv,t.__scopePopover),o=e.useRef(!1),a=e.useRef(!1);return(0,De.jsx)(Iv,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(o.current||r.triggerRef.current?.focus(),e.preventDefault()),o.current=!1,a.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(o.current=!0,"pointerdown"===e.detail.originalEvent.type&&(a.current=!0));const n=e.target,s=r.triggerRef.current?.contains(n);s&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&a.current&&e.preventDefault()}})})),Iv=e.forwardRef(((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:d,...u}=e,f=wv(Tv,n),h=bv(n);return sc(),(0,De.jsx)(uc,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:(0,De.jsx)(tc,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:d,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>f.onOpenChange(!1),children:(0,De.jsx)(vu,{"data-state":Lv(f.open),role:"dialog",id:f.contentId,...h,...u,ref:t,style:{...u.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})})),Pv="PopoverClose";function Lv(e){return e?"open":"closed"}e.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,o=wv(Pv,n);return(0,De.jsx)(wl.button,{type:"button",...r,ref:t,onClick:Bl(e.onClick,(()=>o.onOpenChange(!1)))})})).displayName=Pv,e.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,o=bv(n);return(0,De.jsx)(yu,{...o,...r,ref:t})})).displayName="PopoverArrow";var Fv=Dv,zv=Av;const Hv=kv,Vv=_v,Bv=e.forwardRef((({className:e,align:t="center",sideOffset:n=4,...r},o)=>{const a="undefined"!=typeof document?document.querySelector(".eventkoi-admin")||document.body:void 0;return(0,De.jsx)(Fv,{container:a,children:(0,De.jsx)(zv,{ref:o,align:t,sideOffset:n,className:Ni("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})})}));function Wv(){const t=K(),[n,r]=je(),o=n.get("from"),a=n.get("to"),s=n.get("status"),i=n.get("event_status"),l=n.get("calendar"),[c,d]=(0,e.useState)({from:o||null,to:a||null}),u=function(t){const[n,r]=(0,e.useState)((()=>"undefined"!=typeof window&&window.matchMedia(t).matches));return(0,e.useEffect)((()=>{const e=window.matchMedia(t),n=()=>r(e.matches);return e.addEventListener?e.addEventListener("change",n):e.addListener(n),()=>e.removeEventListener?e.removeEventListener("change",n):e.removeListener(n)}),[t]),n}("(max-width: 768px)");(0,e.useEffect)((()=>{if(!c?.from&&!c?.to||c&&0===Object.keys(c).length)return void((o||a)&&f());let e={};s&&(e.status=s),i&&(e.event_status=i),l&&(e.calendar=l),c.from&&(e.from=Ct(c.from,"yyyy-MM-dd")),c.to&&(e.to=Ct(c.to,"yyyy-MM-dd")),t({pathname:"",search:`?${ve(e)}`})}),[c]);const f=()=>{let e={};s&&(e.status=s),i&&(e.event_status=i),l&&(e.calendar=l),d({}),t({pathname:"",search:`?${ve(e)}`})},{settings:h}=Re(),m=(e=>{null!=e&&""!==e||(e=0);const t=Number(e);return 6===t?0:t>=0&&t<=5?t+1:1})(h?.week_starts_on);return(0,De.jsx)("div",{className:Ni("grid"),children:(0,De.jsxs)(Hv,{children:[(0,De.jsx)(Vv,{asChild:!0,children:(0,De.jsxs)(tl,{id:"date",variant:"outline",className:Ni(c&&c.from?c.to?"w-[250px]":"w-[150px]":"w-auto","justify-start text-left font-normal",!c&&"text-muted-foreground"),children:[(0,De.jsx)(Rl,{className:"mr-2 h-4 w-4"}),c?.from?c.to?(0,De.jsxs)(De.Fragment,{children:[Ct(c.from,"LLL dd, y")," -"," ",Ct(c.to,"LLL dd, y")]}):Ct(c.from,"LLL dd, y"):(0,De.jsx)("span",{children:"Date range"})]})}),(0,De.jsxs)(Bv,{className:"w-auto p-0",align:u?"start":"end",children:[(0,De.jsx)(pv,{initialFocus:!0,mode:"range",defaultMonth:c?.from,selected:c,numberOfMonths:2,weekStartsOn:m,onSelect:function(e){e?.from&&e?.to&&e.from.getTime()===e.to.getTime()||e?.from&&!e?.to&&c?.from&&!c?.to&&e.from.getTime()===new Date(c.from).getTime()||!e?.from&&e?.to&&!c?.from&&c?.to&&e.to.getTime()===new Date(c.to).getTime()?d({}):d(e||{})}}),c&&Object.keys(c).length>0&&(0,De.jsx)("div",{className:"p-3 pt-0 flex justify-center",children:(0,De.jsx)(tl,{variant:"link",className:"p-0",onClick:()=>f(),children:"Clear date filter"})})]})]})})}Bv.displayName=zv.displayName;const Uv=e.forwardRef((({className:e,type:t,...n},r)=>(0,De.jsx)("input",{type:t,className:Ni("flex h-10 w-full rounded-md border border-input bg-background shadow-none px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:bg-secondary",e),ref:r,...n})));Uv.displayName="Input";const $v=Mi("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);function Gv(e){var t;const{table:n}=e,r=n.getAllColumns()[1].id;return(0,De.jsxs)("div",{className:"relative w-full sm:w-auto",children:[(0,De.jsx)($v,{className:"absolute left-2.5 top-3 w-4 h-4 text-muted-foreground"}),(0,De.jsx)(Uv,{type:"search",placeholder:"Search...",className:"w-full rounded-lg bg-background pl-8 w-full sm:w-[250px] placeholder:text-muted-foreground/70 shadow-sm",value:null!==(t=n.getColumn(r)?.getFilterValue())&&void 0!==t?t:"",onChange:e=>n.getColumn(r)?.setFilterValue(e.target.value)})]})}const Yv=Mi("ListFilter",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]]),qv={live:"Live",upcoming:"Upcoming",completed:"Completed",tbc:"Date not set"},Zv=eventkoi_params.calendars;function Kv({base:e,table:t,hideDateRange:n,hideCategories:r,filterName:o,queryStatus:a,eventStatus:s,calStatus:i,from:l,to:c,statusFilters:d,hideSearchBox:u=!1}){const[f,h]=je(),m=s?.split(",").filter(Boolean)||[],p=i?.split(",").filter(Boolean)||[];return(0,De.jsxs)(De.Fragment,{children:[d&&(0,De.jsxs)(zm,{children:[(0,De.jsx)(Hm,{asChild:!0,children:(0,De.jsxs)(tl,{variant:"outline",className:"flex font-normal w-full sm:w-auto justify-start sm:justify-center",children:[(0,De.jsx)(Yv,{className:"mr-2 h-4 w-4"}),"Status",m.length>0&&(0,De.jsxs)(De.Fragment,{children:[" (",m.length,")"]})]})}),(0,De.jsxs)($m,{align:"start",className:"w-[180px]",children:[(0,De.jsx)(Ym,{onClick:()=>{const e=Object.keys(qv),t={...Object.fromEntries(f.entries()),event_status:e.join(",")};h(t)},children:"Select all"}),(0,De.jsx)(Ym,{onClick:()=>{const e={...Object.fromEntries(f.entries())};delete e.event_status,h(e)},children:"Clear selected"}),(0,De.jsx)(qm,{}),Object.keys(qv).map((e=>{const t=m.includes(e);return(0,De.jsx)(Ym,{checked:t,onCheckedChange:()=>{const n=m.slice(),r=t?n.filter((t=>t!==e)):[...n,e],o={...Object.fromEntries(f.entries())};r.length>0?o.event_status=r.join(","):delete o.event_status,h(o)},children:qv[e]},e)}))]})]}),"events"===e&&(0,De.jsxs)(zm,{children:[(0,De.jsx)(Hm,{asChild:!0,children:(0,De.jsxs)(tl,{variant:"outline",className:"flex font-normal w-full sm:w-auto justify-start sm:justify-center",children:[(0,De.jsx)(Yv,{className:"mr-2 h-4 w-4"}),"Calendar",p.length>0&&(0,De.jsxs)(De.Fragment,{children:[" (",p.length,")"]})]})}),(0,De.jsxs)($m,{align:"start",className:"w-[180px]",children:[(0,De.jsx)(Ym,{onClick:()=>{const e=Zv.map((e=>e.id.toString())),t={...Object.fromEntries(f.entries()),calendar:e.join(",")};h(t)},children:"Select all"}),(0,De.jsx)(Ym,{onClick:()=>{const e={...Object.fromEntries(f.entries())};delete e.calendar,h(e)},children:"Clear selected"}),(0,De.jsx)(qm,{}),Zv.map((e=>{const t=p.includes(e.id.toString());return(0,De.jsx)(Ym,{checked:t,onCheckedChange:()=>{const n=p.slice(),r=t?n.filter((t=>t!==e.id.toString())):[...n,e.id.toString()],o={...Object.fromEntries(f.entries())};r.length>0?o.calendar=r.join(","):delete o.calendar,h(o)},children:e.name},e.id)}))]})]}),!r&&(0,De.jsxs)(zm,{children:[(0,De.jsx)(Hm,{asChild:!0,children:(0,De.jsxs)(tl,{variant:"outline",className:"flex font-normal w-full sm:w-auto justify-start sm:justify-center",children:[(0,De.jsx)(Yv,{className:"mr-2 h-4 w-4"}),o]})}),(0,De.jsx)($m,{align:"start",className:"w-[180px]"})]}),!n&&(0,De.jsx)(Wv,{}),!u&&(0,De.jsx)(Gv,{table:t})]})}function Qv(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}var Jv=["color"],Xv=(0,e.forwardRef)((function(t,n){var r=t.color,o=void 0===r?"currentColor":r,a=Qv(t,Jv);return(0,e.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a,{ref:n}),(0,e.createElement)("path",{d:"M8.84182 3.13514C9.04327 3.32401 9.05348 3.64042 8.86462 3.84188L5.43521 7.49991L8.86462 11.1579C9.05348 11.3594 9.04327 11.6758 8.84182 11.8647C8.64036 12.0535 8.32394 12.0433 8.13508 11.8419L4.38508 7.84188C4.20477 7.64955 4.20477 7.35027 4.38508 7.15794L8.13508 3.15794C8.32394 2.95648 8.64036 2.94628 8.84182 3.13514Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))})),ey=["color"],ty=(0,e.forwardRef)((function(t,n){var r=t.color,o=void 0===r?"currentColor":r,a=Qv(t,ey);return(0,e.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a,{ref:n}),(0,e.createElement)("path",{d:"M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))})),ny=["color"],ry=(0,e.forwardRef)((function(t,n){var r=t.color,o=void 0===r?"currentColor":r,a=Qv(t,ny);return(0,e.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a,{ref:n}),(0,e.createElement)("path",{d:"M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))})),oy=["color"],ay=(0,e.forwardRef)((function(t,n){var r=t.color,o=void 0===r?"currentColor":r,a=Qv(t,oy);return(0,e.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a,{ref:n}),(0,e.createElement)("path",{d:"M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))}));function sy(e){const{table:t}=e;return(0,De.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,De.jsxs)(tl,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:()=>t.setPageIndex(0),disabled:!t.getCanPreviousPage(),children:[(0,De.jsx)("span",{className:"sr-only",children:"Go to first page"}),(0,De.jsx)(ry,{className:"h-4 w-4"})]}),(0,De.jsxs)(tl,{variant:"outline",className:"h-8 w-8 p-0",onClick:()=>t.previousPage(),disabled:!t.getCanPreviousPage(),children:[(0,De.jsx)("span",{className:"sr-only",children:"Go to previous page"}),(0,De.jsx)(Xv,{className:"h-4 w-4"})]}),(0,De.jsxs)(tl,{variant:"outline",className:"h-8 w-8 p-0",onClick:()=>t.nextPage(),disabled:!t.getCanNextPage(),children:[(0,De.jsx)("span",{className:"sr-only",children:"Go to next page"}),(0,De.jsx)(ty,{className:"h-4 w-4"})]}),(0,De.jsxs)(tl,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:()=>t.setPageIndex(t.getPageCount()-1),disabled:!t.getCanNextPage(),children:[(0,De.jsx)("span",{className:"sr-only",children:"Go to last page"}),(0,De.jsx)(ay,{className:"h-4 w-4"})]})]})}var iy=e.forwardRef(((e,t)=>(0,De.jsx)(wl.label,{...e,ref:t,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}})));iy.displayName="Label";var ly=iy;const cy=Xi("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),dy=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)(ly,{ref:n,className:Ni(cy(),e),...t})));function uy(e,[t,n]){return Math.min(n,Math.max(t,e))}function fy(t){const n=e.useRef({value:t,previous:t});return e.useMemo((()=>(n.current.value!==t&&(n.current.previous=n.current.value,n.current.value=t),n.current.previous)),[t])}dy.displayName=ly.displayName;var hy=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),my=e.forwardRef(((e,t)=>(0,De.jsx)(wl.span,{...e,ref:t,style:{...hy,...e.style}})));my.displayName="VisuallyHidden";var py=my,gy=[" ","Enter","ArrowUp","ArrowDown"],vy=[" ","Enter"],yy="Select",[by,xy,wy]=ql(yy),[ky,Sy]=Wl(yy,[wy,Xd]),Cy=Xd(),[_y,jy]=ky(yy),[Ey,Ny]=ky(yy),Dy=t=>{const{__scopeSelect:n,children:r,open:o,defaultOpen:a,onOpenChange:s,value:i,defaultValue:l,onValueChange:c,dir:d,name:u,autoComplete:f,disabled:h,required:m,form:p}=t,g=Cy(n),[v,y]=e.useState(null),[b,x]=e.useState(null),[w,k]=e.useState(!1),S=Kl(d),[C,_]=Yl({prop:o,defaultProp:a??!1,onChange:s,caller:yy}),[j,E]=Yl({prop:i,defaultProp:l,onChange:c,caller:yy}),N=e.useRef(null),D=!v||p||!!v.closest("form"),[T,A]=e.useState(new Set),R=Array.from(T).map((e=>e.props.value)).join(";");return(0,De.jsx)(pu,{...g,children:(0,De.jsxs)(_y,{required:m,scope:n,trigger:v,onTriggerChange:y,valueNode:b,onValueNodeChange:x,valueNodeHasChildren:w,onValueNodeHasChildrenChange:k,contentId:xc(),value:j,onValueChange:E,open:C,onOpenChange:_,dir:S,triggerPointerDownPosRef:N,disabled:h,children:[(0,De.jsx)(by.Provider,{scope:n,children:(0,De.jsx)(Ey,{scope:t.__scopeSelect,onNativeOptionAdd:e.useCallback((e=>{A((t=>new Set(t).add(e)))}),[]),onNativeOptionRemove:e.useCallback((e=>{A((t=>{const n=new Set(t);return n.delete(e),n}))}),[]),children:r})}),D?(0,De.jsxs)(pb,{"aria-hidden":!0,required:m,tabIndex:-1,name:u,autoComplete:f,value:j,onChange:e=>E(e.target.value),disabled:h,form:p,children:[void 0===j?(0,De.jsx)("option",{value:""}):null,Array.from(T)]},R):null]})})};Dy.displayName=yy;var Ty="SelectTrigger",Ay=e.forwardRef(((t,n)=>{const{__scopeSelect:r,disabled:o=!1,...a}=t,s=Cy(r),i=jy(Ty,r),l=i.disabled||o,c=$i(n,i.onTriggerChange),d=xy(r),u=e.useRef("touch"),[f,h,m]=vb((e=>{const t=d().filter((e=>!e.disabled)),n=t.find((e=>e.value===i.value)),r=yb(t,e,n);void 0!==r&&i.onValueChange(r.value)})),p=e=>{l||(i.onOpenChange(!0),m()),e&&(i.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,De.jsx)(gu,{asChild:!0,...s,children:(0,De.jsx)(wl.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":gb(i.value)?"":void 0,...a,ref:c,onClick:Bl(a.onClick,(e=>{e.currentTarget.focus(),"mouse"!==u.current&&p(e)})),onPointerDown:Bl(a.onPointerDown,(e=>{u.current=e.pointerType;const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(p(e),e.preventDefault())})),onKeyDown:Bl(a.onKeyDown,(e=>{const t=""!==f.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||h(e.key),t&&" "===e.key||gy.includes(e.key)&&(p(),e.preventDefault())}))})})}));Ay.displayName=Ty;var Ry="SelectValue",My=e.forwardRef(((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:s="",...i}=e,l=jy(Ry,n),{onValueNodeHasChildrenChange:c}=l,d=void 0!==a,u=$i(t,l.onValueNodeChange);return $l((()=>{c(d)}),[c,d]),(0,De.jsx)(wl.span,{...i,ref:u,style:{pointerEvents:"none"},children:gb(l.value)?(0,De.jsx)(De.Fragment,{children:s}):a})}));My.displayName=Ry;var Oy=e.forwardRef(((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return(0,De.jsx)(wl.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})}));Oy.displayName="SelectIcon";var Iy=e=>(0,De.jsx)(bu,{asChild:!0,...e});Iy.displayName="SelectPortal";var Py="SelectContent",Ly=e.forwardRef(((t,n)=>{const r=jy(Py,t.__scopeSelect),[o,a]=e.useState();if($l((()=>{a(new DocumentFragment)}),[]),!r.open){const e=o;return e?pe.createPortal((0,De.jsx)(zy,{scope:t.__scopeSelect,children:(0,De.jsx)(by.Slot,{scope:t.__scopeSelect,children:(0,De.jsx)("div",{children:t.children})})}),e):null}return(0,De.jsx)(By,{...t,ref:n})}));Ly.displayName=Py;var Fy=10,[zy,Hy]=ky(Py),Vy=Gi("SelectContent.RemoveScroll"),By=e.forwardRef(((t,n)=>{const{__scopeSelect:r,position:o="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:s,onPointerDownOutside:i,side:l,sideOffset:c,align:d,alignOffset:u,arrowPadding:f,collisionBoundary:h,collisionPadding:m,sticky:p,hideWhenDetached:g,avoidCollisions:v,...y}=t,b=jy(Py,r),[x,w]=e.useState(null),[k,S]=e.useState(null),C=$i(n,(e=>w(e))),[_,j]=e.useState(null),[E,N]=e.useState(null),D=xy(r),[T,A]=e.useState(!1),R=e.useRef(!1);e.useEffect((()=>{if(x)return $u(x)}),[x]),sc();const M=e.useCallback((e=>{const[t,...n]=D().map((e=>e.ref.current)),[r]=n.slice(-1),o=document.activeElement;for(const n of e){if(n===o)return;if(n?.scrollIntoView({block:"nearest"}),n===t&&k&&(k.scrollTop=0),n===r&&k&&(k.scrollTop=k.scrollHeight),n?.focus(),document.activeElement!==o)return}}),[D,k]),O=e.useCallback((()=>M([_,x])),[M,_,x]);e.useEffect((()=>{T&&O()}),[T,O]);const{onOpenChange:I,triggerPointerDownPosRef:P}=b;e.useEffect((()=>{if(x){let e={x:0,y:0};const t=t=>{e={x:Math.abs(Math.round(t.pageX)-(P.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(P.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():x.contains(n.target)||I(!1),document.removeEventListener("pointermove",t),P.current=null};return null!==P.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}}),[x,I,P]),e.useEffect((()=>{const e=()=>I(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}}),[I]);const[L,F]=vb((e=>{const t=D().filter((e=>!e.disabled)),n=t.find((e=>e.ref.current===document.activeElement)),r=yb(t,e,n);r&&setTimeout((()=>r.ref.current.focus()))})),z=e.useCallback(((e,t,n)=>{const r=!R.current&&!n;(void 0!==b.value&&b.value===t||r)&&(j(e),r&&(R.current=!0))}),[b.value]),H=e.useCallback((()=>x?.focus()),[x]),V=e.useCallback(((e,t,n)=>{const r=!R.current&&!n;(void 0!==b.value&&b.value===t||r)&&N(e)}),[b.value]),B="popper"===o?Uy:Wy,W=B===Uy?{side:l,sideOffset:c,align:d,alignOffset:u,arrowPadding:f,collisionBoundary:h,collisionPadding:m,sticky:p,hideWhenDetached:g,avoidCollisions:v}:{};return(0,De.jsx)(zy,{scope:r,content:x,viewport:k,onViewportChange:S,itemRefCallback:z,selectedItem:_,onItemLeave:H,itemTextRefCallback:V,focusSelectedItem:O,selectedItemText:E,position:o,isPositioned:T,searchRef:L,children:(0,De.jsx)(Of,{as:Vy,allowPinchZoom:!0,children:(0,De.jsx)(uc,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:Bl(a,(e=>{b.trigger?.focus({preventScroll:!0}),e.preventDefault()})),children:(0,De.jsx)(tc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:(0,De.jsx)(B,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:e=>e.preventDefault(),...y,...W,onPlaced:()=>A(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:Bl(y.onKeyDown,(e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||F(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=D().filter((e=>!e.disabled)).map((e=>e.ref.current));if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout((()=>M(t))),e.preventDefault()}}))})})})})})}));By.displayName="SelectContentImpl";var Wy=e.forwardRef(((t,n)=>{const{__scopeSelect:r,onPlaced:o,...a}=t,s=jy(Py,r),i=Hy(Py,r),[l,c]=e.useState(null),[d,u]=e.useState(null),f=$i(n,(e=>u(e))),h=xy(r),m=e.useRef(!1),p=e.useRef(!0),{viewport:g,selectedItem:v,selectedItemText:y,focusSelectedItem:b}=i,x=e.useCallback((()=>{if(s.trigger&&s.valueNode&&l&&d&&g&&v&&y){const e=s.trigger.getBoundingClientRect(),t=d.getBoundingClientRect(),n=s.valueNode.getBoundingClientRect(),r=y.getBoundingClientRect();if("rtl"!==s.dir){const o=r.left-t.left,a=n.left-o,s=e.left-a,i=e.width+s,c=Math.max(i,t.width),d=window.innerWidth-Fy,u=uy(a,[Fy,Math.max(Fy,d-c)]);l.style.minWidth=i+"px",l.style.left=u+"px"}else{const o=t.right-r.right,a=window.innerWidth-n.right-o,s=window.innerWidth-e.right-a,i=e.width+s,c=Math.max(i,t.width),d=window.innerWidth-Fy,u=uy(a,[Fy,Math.max(Fy,d-c)]);l.style.minWidth=i+"px",l.style.right=u+"px"}const a=h(),i=window.innerHeight-2*Fy,c=g.scrollHeight,u=window.getComputedStyle(d),f=parseInt(u.borderTopWidth,10),p=parseInt(u.paddingTop,10),b=parseInt(u.borderBottomWidth,10),x=f+p+c+parseInt(u.paddingBottom,10)+b,w=Math.min(5*v.offsetHeight,x),k=window.getComputedStyle(g),S=parseInt(k.paddingTop,10),C=parseInt(k.paddingBottom,10),_=e.top+e.height/2-Fy,j=i-_,E=v.offsetHeight/2,N=f+p+(v.offsetTop+E),D=x-N;if(N<=_){const e=a.length>0&&v===a[a.length-1].ref.current;l.style.bottom="0px";const t=d.clientHeight-g.offsetTop-g.offsetHeight,n=N+Math.max(j,E+(e?C:0)+t+b);l.style.height=n+"px"}else{const e=a.length>0&&v===a[0].ref.current;l.style.top="0px";const t=Math.max(_,f+g.offsetTop+(e?S:0)+E)+D;l.style.height=t+"px",g.scrollTop=N-_+g.offsetTop}l.style.margin=`${Fy}px 0`,l.style.minHeight=w+"px",l.style.maxHeight=i+"px",o?.(),requestAnimationFrame((()=>m.current=!0))}}),[h,s.trigger,s.valueNode,l,d,g,v,y,s.dir,o]);$l((()=>x()),[x]);const[w,k]=e.useState();$l((()=>{d&&k(window.getComputedStyle(d).zIndex)}),[d]);const S=e.useCallback((e=>{e&&!0===p.current&&(x(),b?.(),p.current=!1)}),[x,b]);return(0,De.jsx)($y,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:m,onScrollButtonChange:S,children:(0,De.jsx)("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w},children:(0,De.jsx)(wl.div,{...a,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})}));Wy.displayName="SelectItemAlignedPosition";var Uy=e.forwardRef(((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Fy,...a}=e,s=Cy(n);return(0,De.jsx)(vu,{...s,...a,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})}));Uy.displayName="SelectPopperPosition";var[$y,Gy]=ky(Py,{}),Yy="SelectViewport",qy=e.forwardRef(((t,n)=>{const{__scopeSelect:r,nonce:o,...a}=t,s=Hy(Yy,r),i=Gy(Yy,r),l=$i(n,s.onViewportChange),c=e.useRef(0);return(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),(0,De.jsx)(by.Slot,{scope:r,children:(0,De.jsx)(wl.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:Bl(a.onScroll,(e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=i;if(r?.current&&n){const e=Math.abs(c.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*Fy,o=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),s=Math.max(o,a);if(s<r){const o=s+e,a=Math.min(r,o),i=o-a;n.style.height=a+"px","0px"===n.style.bottom&&(t.scrollTop=i>0?i:0,n.style.justifyContent="flex-end")}}}c.current=t.scrollTop}))})})]})}));qy.displayName=Yy;var Zy="SelectGroup",[Ky,Qy]=ky(Zy);e.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,o=xc();return(0,De.jsx)(Ky,{scope:n,id:o,children:(0,De.jsx)(wl.div,{role:"group","aria-labelledby":o,...r,ref:t})})})).displayName=Zy;var Jy="SelectLabel",Xy=e.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,o=Qy(Jy,n);return(0,De.jsx)(wl.div,{id:o.id,...r,ref:t})}));Xy.displayName=Jy;var eb="SelectItem",[tb,nb]=ky(eb),rb=e.forwardRef(((t,n)=>{const{__scopeSelect:r,value:o,disabled:a=!1,textValue:s,...i}=t,l=jy(eb,r),c=Hy(eb,r),d=l.value===o,[u,f]=e.useState(s??""),[h,m]=e.useState(!1),p=$i(n,(e=>c.itemRefCallback?.(e,o,a))),g=xc(),v=e.useRef("touch"),y=()=>{a||(l.onValueChange(o),l.onOpenChange(!1))};if(""===o)throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,De.jsx)(tb,{scope:r,value:o,disabled:a,textId:g,isSelected:d,onItemTextChange:e.useCallback((e=>{f((t=>t||(e?.textContent??"").trim()))}),[]),children:(0,De.jsx)(by.ItemSlot,{scope:r,value:o,disabled:a,textValue:u,children:(0,De.jsx)(wl.div,{role:"option","aria-labelledby":g,"data-highlighted":h?"":void 0,"aria-selected":d&&h,"data-state":d?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...i,ref:p,onFocus:Bl(i.onFocus,(()=>m(!0))),onBlur:Bl(i.onBlur,(()=>m(!1))),onClick:Bl(i.onClick,(()=>{"mouse"!==v.current&&y()})),onPointerUp:Bl(i.onPointerUp,(()=>{"mouse"===v.current&&y()})),onPointerDown:Bl(i.onPointerDown,(e=>{v.current=e.pointerType})),onPointerMove:Bl(i.onPointerMove,(e=>{v.current=e.pointerType,a?c.onItemLeave?.():"mouse"===v.current&&e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:Bl(i.onPointerLeave,(e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()})),onKeyDown:Bl(i.onKeyDown,(e=>{""!==c.searchRef?.current&&" "===e.key||(vy.includes(e.key)&&y()," "===e.key&&e.preventDefault())}))})})})}));rb.displayName=eb;var ob="SelectItemText",ab=e.forwardRef(((t,n)=>{const{__scopeSelect:r,className:o,style:a,...s}=t,i=jy(ob,r),l=Hy(ob,r),c=nb(ob,r),d=Ny(ob,r),[u,f]=e.useState(null),h=$i(n,(e=>f(e)),c.onItemTextChange,(e=>l.itemTextRefCallback?.(e,c.value,c.disabled))),m=u?.textContent,p=e.useMemo((()=>(0,De.jsx)("option",{value:c.value,disabled:c.disabled,children:m},c.value)),[c.disabled,c.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:v}=d;return $l((()=>(g(p),()=>v(p))),[g,v,p]),(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)(wl.span,{id:c.textId,...s,ref:h}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?pe.createPortal(s.children,i.valueNode):null]})}));ab.displayName=ob;var sb="SelectItemIndicator",ib=e.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e;return nb(sb,n).isSelected?(0,De.jsx)(wl.span,{"aria-hidden":!0,...r,ref:t}):null}));ib.displayName=sb;var lb="SelectScrollUpButton",cb=e.forwardRef(((t,n)=>{const r=Hy(lb,t.__scopeSelect),o=Gy(lb,t.__scopeSelect),[a,s]=e.useState(!1),i=$i(n,o.onScrollButtonChange);return $l((()=>{if(r.viewport&&r.isPositioned){let e=function(){const e=t.scrollTop>0;s(e)};const t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[r.viewport,r.isPositioned]),a?(0,De.jsx)(fb,{...t,ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null}));cb.displayName=lb;var db="SelectScrollDownButton",ub=e.forwardRef(((t,n)=>{const r=Hy(db,t.__scopeSelect),o=Gy(db,t.__scopeSelect),[a,s]=e.useState(!1),i=$i(n,o.onScrollButtonChange);return $l((()=>{if(r.viewport&&r.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;s(n)};const t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[r.viewport,r.isPositioned]),a?(0,De.jsx)(fb,{...t,ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null}));ub.displayName=db;var fb=e.forwardRef(((t,n)=>{const{__scopeSelect:r,onAutoScroll:o,...a}=t,s=Hy("SelectScrollButton",r),i=e.useRef(null),l=xy(r),c=e.useCallback((()=>{null!==i.current&&(window.clearInterval(i.current),i.current=null)}),[]);return e.useEffect((()=>()=>c()),[c]),$l((()=>{const e=l().find((e=>e.ref.current===document.activeElement));e?.ref.current?.scrollIntoView({block:"nearest"})}),[l]),(0,De.jsx)(wl.div,{"aria-hidden":!0,...a,ref:n,style:{flexShrink:0,...a.style},onPointerDown:Bl(a.onPointerDown,(()=>{null===i.current&&(i.current=window.setInterval(o,50))})),onPointerMove:Bl(a.onPointerMove,(()=>{s.onItemLeave?.(),null===i.current&&(i.current=window.setInterval(o,50))})),onPointerLeave:Bl(a.onPointerLeave,(()=>{c()}))})})),hb=e.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e;return(0,De.jsx)(wl.div,{"aria-hidden":!0,...r,ref:t})}));hb.displayName="SelectSeparator";var mb="SelectArrow";e.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,o=Cy(n),a=jy(mb,n),s=Hy(mb,n);return a.open&&"popper"===s.position?(0,De.jsx)(yu,{...o,...r,ref:t}):null})).displayName=mb;var pb=e.forwardRef((({__scopeSelect:t,value:n,...r},o)=>{const a=e.useRef(null),s=$i(o,a),i=fy(n);return e.useEffect((()=>{const e=a.current;if(!e)return;const t=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(t,"value").set;if(i!==n&&r){const t=new Event("change",{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}}),[i,n]),(0,De.jsx)(wl.select,{...r,style:{...hy,...r.style},ref:s,defaultValue:n})}));function gb(e){return""===e||void 0===e}function vb(t){const n=Ql(t),r=e.useRef(""),o=e.useRef(0),a=e.useCallback((e=>{const t=r.current+e;n(t),function e(t){r.current=t,window.clearTimeout(o.current),""!==t&&(o.current=window.setTimeout((()=>e("")),1e3))}(t)}),[n]),s=e.useCallback((()=>{r.current="",window.clearTimeout(o.current)}),[]);return e.useEffect((()=>()=>window.clearTimeout(o.current)),[]),[r,a,s]}function yb(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,o=n?e.indexOf(n):-1;let a=(s=e,i=Math.max(o,0),s.map(((e,t)=>s[(i+t)%s.length])));var s,i;1===r.length&&(a=a.filter((e=>e!==n)));const l=a.find((e=>e.textValue.toLowerCase().startsWith(r.toLowerCase())));return l!==n?l:void 0}pb.displayName="SelectBubbleInput";var bb=Dy,xb=Ay,wb=My,kb=Oy,Sb=Iy,Cb=Ly,_b=qy,jb=Xy,Eb=rb,Nb=ab,Db=ib,Tb=cb,Ab=ub,Rb=hb;const Mb=Mi("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]),Ob=Mi("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),Ib=bb,Pb=wb,Lb=e.forwardRef((({className:e,children:t,...n},r)=>(0,De.jsxs)(xb,{ref:r,className:Ni("flex h-10 w-full items-center gap-4 rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,(0,De.jsx)(kb,{asChild:!0,children:n.isalternate?(0,De.jsx)(Mb,{className:"ml-auto h-3.5 w-3.5 opacity-50"}):(0,De.jsx)(Oi,{className:"ml-auto h-4 w-4 opacity-50"})})]})));Lb.displayName=xb.displayName;const Fb=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)(Tb,{ref:n,className:Ni("flex cursor-default items-center justify-center py-1",e),...t,children:(0,De.jsx)(Ob,{className:"h-4 w-4"})})));Fb.displayName=Tb.displayName;const zb=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)(Ab,{ref:n,className:Ni("flex cursor-default items-center justify-center py-1",e),...t,children:(0,De.jsx)(Oi,{className:"h-4 w-4"})})));zb.displayName=Ab.displayName;const Hb=e.forwardRef((({className:e,children:t,position:n="popper",...r},o)=>{const a="undefined"!=typeof document?document.querySelector(".eventkoi-admin")||document.body:void 0;return(0,De.jsx)(Sb,{container:a,children:(0,De.jsxs)(Cb,{ref:o,className:Ni("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===n&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[(0,De.jsx)(Fb,{}),(0,De.jsx)(_b,{className:Ni("p-1","popper"===n&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),(0,De.jsx)(zb,{})]})})}));Hb.displayName=Cb.displayName,e.forwardRef((({className:e,...t},n)=>(0,De.jsx)(jb,{ref:n,className:Ni("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}))).displayName=jb.displayName;const Vb=e.forwardRef((({className:e,children:t,...n},r)=>(0,De.jsxs)(Eb,{ref:r,className:Ni("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[(0,De.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,De.jsx)(Db,{children:(0,De.jsx)(Lm,{className:"h-4 w-4"})})}),(0,De.jsx)(Nb,{children:t})]})));function Bb({table:e}){return(0,De.jsxs)("div",{className:"flex flex-col sm:flex-row items-start sm:items-center gap-2",children:[(0,De.jsx)(dy,{htmlFor:"rows_per_page",className:"text-sm font-normal",children:"Rows per page"}),(0,De.jsxs)(Ib,{value:`${e.getState().pagination.pageSize}`,onValueChange:t=>{e.setPageSize(Number(t))},children:[(0,De.jsx)(Lb,{id:"rows_per_page",className:"h-8 w-[70px]",isalternate:"yes",children:(0,De.jsx)(Pb,{placeholder:e.getState().pagination.pageSize})}),(0,De.jsx)(Hb,{children:[10,20,30,40,50].map((e=>(0,De.jsx)(Vb,{value:`${e}`,children:e},e)))})]})]})}function Wb({statusFilters:t,base:n,data:r}){const[o]=je(),[a,s]=(0,e.useState)({}),i=o.get("status"),l=o.get("event_status"),c=o.get("calendar"),d=o.get("from"),u=o.get("to");return(0,e.useEffect)((()=>{if("events"===n&&"undefined"!=typeof window){const e=`${window?.eventkoi_params?.api||"/wp-json/eventkoi/v1"}/get_event_counts`;Ne()({path:e,method:"GET"}).then(s).catch((e=>{console.warn("Could not fetch event counts:",e)}))}}),[n]),(0,De.jsx)(De.Fragment,{children:t?.map(((e,t)=>{var r;const o=!i&&"all"===e.key||i===e.key,s={status:e.key};l&&(s.event_status=l),c&&(s.calendar=c),d&&(s.from=d),u&&(s.to=u);const f="events"!==n||e.hideCount?"":null!==(r=a?.[e.key])&&void 0!==r?r:0;return(0,De.jsxs)(Se,{to:{pathname:"/"+n,search:ve(s).toString()},className:Ni("flex items-center hover:underline hover:decoration-dotted underline-offset-4 text-foreground",o&&"underline decoration-dotted underline-offset-4 font-medium"),children:[e.title,""!==f&&(0,De.jsxs)("span",{className:"ml-1",children:["(",f,")"]})]},`status-${t}`)}))})}function Ub(e){const{table:t}=e;return(0,De.jsxs)("div",{className:"flex items-center text-sm",children:["Page ",t.getState().pagination.pageIndex+1," of ",t.getPageCount()]})}function $b(e){const{table:t,compact:n}=e;return(0,De.jsxs)(De.Fragment,{children:[t.getFilteredSelectedRowModel().rows.length," of"," ",t.getFilteredRowModel().rows.length," ",!n&&"row(s)"," selected."]})}Vb.displayName=Eb.displayName,e.forwardRef((({className:e,...t},n)=>(0,De.jsx)(Rb,{ref:n,className:Ni("-mx-1 my-1 h-px bg-muted",e),...t}))).displayName=Rb.displayName;const Gb=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)("div",{className:"relative w-full overflow-auto",children:(0,De.jsx)("table",{ref:n,className:Ni("w-full caption-bottom text-sm",e),...t})})));Gb.displayName="Table";const Yb=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)("thead",{ref:n,className:Ni("[&_tr]:border-b",e),...t})));Yb.displayName="TableHeader";const qb=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)("tbody",{ref:n,className:Ni("[&_tr:last-child]:border-0",e),...t})));qb.displayName="TableBody",e.forwardRef((({className:e,...t},n)=>(0,De.jsx)("tfoot",{ref:n,className:Ni("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}))).displayName="TableFooter";const Zb=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)("tr",{ref:n,className:Ni("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t})));Zb.displayName="TableRow";const Kb=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)("th",{ref:n,className:Ni("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t})));Kb.displayName="TableHead";const Qb=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)("td",{ref:n,className:Ni("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t})));function Jb(e,t){return"function"==typeof e?e(t):e}function Xb(e,t){return n=>{t.setState((t=>({...t,[e]:Jb(n,t[e])})))}}function ex(e){return e instanceof Function}function tx(e,t,n){let r,o=[];return a=>{let s;n.key&&n.debug&&(s=Date.now());const i=e(a),l=i.length!==o.length||i.some(((e,t)=>o[t]!==e));if(!l)return r;let c;if(o=i,n.key&&n.debug&&(c=Date.now()),r=t(...i),null==n||null==n.onChange||n.onChange(r),n.key&&n.debug&&null!=n&&n.debug()){const e=Math.round(100*(Date.now()-s))/100,t=Math.round(100*(Date.now()-c))/100,r=t/16,o=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%c⏱ ${o(t,5)} /${o(e,5)} ms`,`\n            font-size: .6rem;\n            font-weight: bold;\n            color: hsl(${Math.max(0,Math.min(120-120*r,120))}deg 100% 31%);`,null==n?void 0:n.key)}return r}}function nx(e,t,n,r){return{debug:()=>{var n;return null!=(n=null==e?void 0:e.debugAll)?n:e[t]},key:!1,onChange:r}}Qb.displayName="TableCell",e.forwardRef((({className:e,...t},n)=>(0,De.jsx)("caption",{ref:n,className:Ni("mt-4 text-sm text-muted-foreground",e),...t}))).displayName="TableCaption";const rx="debugHeaders";function ox(e,t,n){var r;let o={id:null!=(r=n.id)?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const e=[],t=n=>{n.subHeaders&&n.subHeaders.length&&n.subHeaders.map(t),e.push(n)};return t(o),e},getContext:()=>({table:e,header:o,column:t})};return e._features.forEach((t=>{null==t.createHeader||t.createHeader(o,e)})),o}const ax={createTable:e=>{e.getHeaderGroups=tx((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,r,o)=>{var a,s;const i=null!=(a=null==r?void 0:r.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?a:[],l=null!=(s=null==o?void 0:o.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?s:[],c=n.filter((e=>!(null!=r&&r.includes(e.id)||null!=o&&o.includes(e.id))));return sx(t,[...i,...c,...l],e)}),nx(e.options,rx)),e.getCenterHeaderGroups=tx((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,r,o)=>(n=n.filter((e=>!(null!=r&&r.includes(e.id)||null!=o&&o.includes(e.id)))),sx(t,n,e,"center"))),nx(e.options,rx)),e.getLeftHeaderGroups=tx((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left]),((t,n,r)=>{var o;return sx(t,null!=(o=null==r?void 0:r.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?o:[],e,"left")}),nx(e.options,rx)),e.getRightHeaderGroups=tx((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right]),((t,n,r)=>{var o;return sx(t,null!=(o=null==r?void 0:r.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?o:[],e,"right")}),nx(e.options,rx)),e.getFooterGroups=tx((()=>[e.getHeaderGroups()]),(e=>[...e].reverse()),nx(e.options,rx)),e.getLeftFooterGroups=tx((()=>[e.getLeftHeaderGroups()]),(e=>[...e].reverse()),nx(e.options,rx)),e.getCenterFooterGroups=tx((()=>[e.getCenterHeaderGroups()]),(e=>[...e].reverse()),nx(e.options,rx)),e.getRightFooterGroups=tx((()=>[e.getRightHeaderGroups()]),(e=>[...e].reverse()),nx(e.options,rx)),e.getFlatHeaders=tx((()=>[e.getHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),nx(e.options,rx)),e.getLeftFlatHeaders=tx((()=>[e.getLeftHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),nx(e.options,rx)),e.getCenterFlatHeaders=tx((()=>[e.getCenterHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),nx(e.options,rx)),e.getRightFlatHeaders=tx((()=>[e.getRightHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),nx(e.options,rx)),e.getCenterLeafHeaders=tx((()=>[e.getCenterFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),nx(e.options,rx)),e.getLeftLeafHeaders=tx((()=>[e.getLeftFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),nx(e.options,rx)),e.getRightLeafHeaders=tx((()=>[e.getRightFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),nx(e.options,rx)),e.getLeafHeaders=tx((()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()]),((e,t,n)=>{var r,o,a,s,i,l;return[...null!=(r=null==(o=e[0])?void 0:o.headers)?r:[],...null!=(a=null==(s=t[0])?void 0:s.headers)?a:[],...null!=(i=null==(l=n[0])?void 0:l.headers)?i:[]].map((e=>e.getLeafHeaders())).flat()}),nx(e.options,rx))}};function sx(e,t,n,r){var o,a;let s=0;const i=function(e,t){void 0===t&&(t=1),s=Math.max(s,t),e.filter((e=>e.getIsVisible())).forEach((e=>{var n;null!=(n=e.columns)&&n.length&&i(e.columns,t+1)}),0)};i(e);let l=[];const c=(e,t)=>{const o={depth:t,id:[r,`${t}`].filter(Boolean).join("_"),headers:[]},a=[];e.forEach((e=>{const s=[...a].reverse()[0];let i,l=!1;if(e.column.depth===o.depth&&e.column.parent?i=e.column.parent:(i=e.column,l=!0),s&&(null==s?void 0:s.column)===i)s.subHeaders.push(e);else{const o=ox(n,i,{id:[r,t,i.id,null==e?void 0:e.id].filter(Boolean).join("_"),isPlaceholder:l,placeholderId:l?`${a.filter((e=>e.column===i)).length}`:void 0,depth:t,index:a.length});o.subHeaders.push(e),a.push(o)}o.headers.push(e),e.headerGroup=o})),l.push(o),t>0&&c(a,t-1)},d=t.map(((e,t)=>ox(n,e,{depth:s,index:t})));c(d,s-1),l.reverse();const u=e=>e.filter((e=>e.column.getIsVisible())).map((e=>{let t=0,n=0,r=[0];return e.subHeaders&&e.subHeaders.length?(r=[],u(e.subHeaders).forEach((e=>{let{colSpan:n,rowSpan:o}=e;t+=n,r.push(o)}))):t=1,n+=Math.min(...r),e.colSpan=t,e.rowSpan=n,{colSpan:t,rowSpan:n}}));return u(null!=(o=null==(a=l[0])?void 0:a.headers)?o:[]),l}const ix=(e,t,n,r,o,a,s)=>{let i={id:t,index:r,original:n,depth:o,parentId:s,_valuesCache:{},_uniqueValuesCache:{},getValue:t=>{if(i._valuesCache.hasOwnProperty(t))return i._valuesCache[t];const n=e.getColumn(t);return null!=n&&n.accessorFn?(i._valuesCache[t]=n.accessorFn(i.original,r),i._valuesCache[t]):void 0},getUniqueValues:t=>{if(i._uniqueValuesCache.hasOwnProperty(t))return i._uniqueValuesCache[t];const n=e.getColumn(t);return null!=n&&n.accessorFn?n.columnDef.getUniqueValues?(i._uniqueValuesCache[t]=n.columnDef.getUniqueValues(i.original,r),i._uniqueValuesCache[t]):(i._uniqueValuesCache[t]=[i.getValue(t)],i._uniqueValuesCache[t]):void 0},renderValue:t=>{var n;return null!=(n=i.getValue(t))?n:e.options.renderFallbackValue},subRows:null!=a?a:[],getLeafRows:()=>function(e,t){const n=[],r=e=>{e.forEach((e=>{n.push(e);const o=t(e);null!=o&&o.length&&r(o)}))};return r(e),n}(i.subRows,(e=>e.subRows)),getParentRow:()=>i.parentId?e.getRow(i.parentId,!0):void 0,getParentRows:()=>{let e=[],t=i;for(;;){const n=t.getParentRow();if(!n)break;e.push(n),t=n}return e.reverse()},getAllCells:tx((()=>[e.getAllLeafColumns()]),(t=>t.map((t=>function(e,t,n,r){const o={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:()=>{var t;return null!=(t=o.getValue())?t:e.options.renderFallbackValue},getContext:tx((()=>[e,n,t,o]),((e,t,n,r)=>({table:e,column:t,row:n,cell:r,getValue:r.getValue,renderValue:r.renderValue})),nx(e.options,"debugCells"))};return e._features.forEach((r=>{null==r.createCell||r.createCell(o,n,t,e)}),{}),o}(e,i,t,t.id)))),nx(e.options,"debugRows")),_getAllCellsByColumnId:tx((()=>[i.getAllCells()]),(e=>e.reduce(((e,t)=>(e[t.column.id]=t,e)),{})),nx(e.options,"debugRows"))};for(let t=0;t<e._features.length;t++){const n=e._features[t];null==n||null==n.createRow||n.createRow(i,e)}return i},lx={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},cx=(e,t,n)=>{var r,o;const a=null==n||null==(r=n.toString())?void 0:r.toLowerCase();return Boolean(null==(o=e.getValue(t))||null==(o=o.toString())||null==(o=o.toLowerCase())?void 0:o.includes(a))};cx.autoRemove=e=>bx(e);const dx=(e,t,n)=>{var r;return Boolean(null==(r=e.getValue(t))||null==(r=r.toString())?void 0:r.includes(n))};dx.autoRemove=e=>bx(e);const ux=(e,t,n)=>{var r;return(null==(r=e.getValue(t))||null==(r=r.toString())?void 0:r.toLowerCase())===(null==n?void 0:n.toLowerCase())};ux.autoRemove=e=>bx(e);const fx=(e,t,n)=>{var r;return null==(r=e.getValue(t))?void 0:r.includes(n)};fx.autoRemove=e=>bx(e);const hx=(e,t,n)=>!n.some((n=>{var r;return!(null!=(r=e.getValue(t))&&r.includes(n))}));hx.autoRemove=e=>bx(e)||!(null!=e&&e.length);const mx=(e,t,n)=>n.some((n=>{var r;return null==(r=e.getValue(t))?void 0:r.includes(n)}));mx.autoRemove=e=>bx(e)||!(null!=e&&e.length);const px=(e,t,n)=>e.getValue(t)===n;px.autoRemove=e=>bx(e);const gx=(e,t,n)=>e.getValue(t)==n;gx.autoRemove=e=>bx(e);const vx=(e,t,n)=>{let[r,o]=n;const a=e.getValue(t);return a>=r&&a<=o};vx.resolveFilterValue=e=>{let[t,n]=e,r="number"!=typeof t?parseFloat(t):t,o="number"!=typeof n?parseFloat(n):n,a=null===t||Number.isNaN(r)?-1/0:r,s=null===n||Number.isNaN(o)?1/0:o;if(a>s){const e=a;a=s,s=e}return[a,s]},vx.autoRemove=e=>bx(e)||bx(e[0])&&bx(e[1]);const yx={includesString:cx,includesStringSensitive:dx,equalsString:ux,arrIncludes:fx,arrIncludesAll:hx,arrIncludesSome:mx,equals:px,weakEquals:gx,inNumberRange:vx};function bx(e){return null==e||""===e}const xx={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Xb("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=null==n?void 0:n.getValue(e.id);return"string"==typeof r?yx.includesString:"number"==typeof r?yx.inNumberRange:"boolean"==typeof r||null!==r&&"object"==typeof r?yx.equals:Array.isArray(r)?yx.arrIncludes:yx.weakEquals},e.getFilterFn=()=>{var n,r;return ex(e.columnDef.filterFn)?e.columnDef.filterFn:"auto"===e.columnDef.filterFn?e.getAutoFilterFn():null!=(n=null==(r=t.options.filterFns)?void 0:r[e.columnDef.filterFn])?n:yx[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,o;return(null==(n=e.columnDef.enableColumnFilter)||n)&&(null==(r=t.options.enableColumnFilters)||r)&&(null==(o=t.options.enableFilters)||o)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return null==(n=t.getState().columnFilters)||null==(n=n.find((t=>t.id===e.id)))?void 0:n.value},e.getFilterIndex=()=>{var n,r;return null!=(n=null==(r=t.getState().columnFilters)?void 0:r.findIndex((t=>t.id===e.id)))?n:-1},e.setFilterValue=n=>{t.setColumnFilters((t=>{const r=e.getFilterFn(),o=null==t?void 0:t.find((t=>t.id===e.id)),a=Jb(n,o?o.value:void 0);var s;if(wx(r,a,e))return null!=(s=null==t?void 0:t.filter((t=>t.id!==e.id)))?s:[];const i={id:e.id,value:a};var l;return o?null!=(l=null==t?void 0:t.map((t=>t.id===e.id?i:t)))?l:[]:null!=t&&t.length?[...t,i]:[i]}))}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns();null==e.options.onColumnFiltersChange||e.options.onColumnFiltersChange((e=>{var r;return null==(r=Jb(t,e))?void 0:r.filter((e=>{const t=n.find((t=>t.id===e.id));return!t||!wx(t.getFilterFn(),e.value,t)}))}))},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.columnFilters)?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function wx(e,t,n){return!(!e||!e.autoRemove)&&e.autoRemove(t,n)||void 0===t||"string"==typeof t&&!t}const kx={sum:(e,t,n)=>n.reduce(((t,n)=>{const r=n.getValue(e);return t+("number"==typeof r?r:0)}),0),min:(e,t,n)=>{let r;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(r>n||void 0===r&&n>=n)&&(r=n)})),r},max:(e,t,n)=>{let r;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(r<n||void 0===r&&n>=n)&&(r=n)})),r},extent:(e,t,n)=>{let r,o;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(void 0===r?n>=n&&(r=o=n):(r>n&&(r=n),o<n&&(o=n)))})),[r,o]},mean:(e,t)=>{let n=0,r=0;if(t.forEach((t=>{let o=t.getValue(e);null!=o&&(o=+o)>=o&&(++n,r+=o)})),n)return r/n},median:(e,t)=>{if(!t.length)return;const n=t.map((t=>t.getValue(e)));if(r=n,!Array.isArray(r)||!r.every((e=>"number"==typeof e)))return;var r;if(1===n.length)return n[0];const o=Math.floor(n.length/2),a=n.sort(((e,t)=>e-t));return n.length%2!=0?a[o]:(a[o-1]+a[o])/2},unique:(e,t)=>Array.from(new Set(t.map((t=>t.getValue(e)))).values()),uniqueCount:(e,t)=>new Set(t.map((t=>t.getValue(e)))).size,count:(e,t)=>t.length},Sx={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return null!=(t=null==(n=e.getValue())||null==n.toString?void 0:n.toString())?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:Xb("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping((t=>null!=t&&t.includes(e.id)?t.filter((t=>t!==e.id)):[...null!=t?t:[],e.id]))},e.getCanGroup=()=>{var n,r;return(null==(n=e.columnDef.enableGrouping)||n)&&(null==(r=t.options.enableGrouping)||r)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return null==(n=t.getState().grouping)?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return null==(n=t.getState().grouping)?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=null==n?void 0:n.getValue(e.id);return"number"==typeof r?kx.sum:"[object Date]"===Object.prototype.toString.call(r)?kx.extent:void 0},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return ex(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:"auto"===e.columnDef.aggregationFn?e.getAutoAggregationFn():null!=(n=null==(r=t.options.aggregationFns)?void 0:r[e.columnDef.aggregationFn])?n:kx[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>null==e.options.onGroupingChange?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.grouping)?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return null!=r&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var t;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!(null==(t=n.subRows)||!t.length)}}},Cx={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Xb("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=tx((e=>[Rx(t,e)]),(t=>t.findIndex((t=>t.id===e.id))),nx(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return(null==(r=Rx(t,n)[0])?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const o=Rx(t,n);return(null==(r=o[o.length-1])?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>null==e.options.onColumnOrderChange?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:null!=(n=e.initialState.columnOrder)?n:[])},e._getOrderColumnsFn=tx((()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode]),((e,t,n)=>r=>{let o=[];if(null!=e&&e.length){const t=[...e],n=[...r];for(;n.length&&t.length;){const e=t.shift(),r=n.findIndex((t=>t.id===e));r>-1&&o.push(n.splice(r,1)[0])}o=[...o,...n]}else o=r;return function(e,t,n){if(null==t||!t.length||!n)return e;const r=e.filter((e=>!t.includes(e.id)));if("remove"===n)return r;const o=t.map((t=>e.find((e=>e.id===t)))).filter(Boolean);return[...o,...r]}(o,t,n)}),nx(e.options,"debugTable"))}},jx={getInitialState:e=>({columnPinning:{left:[],right:[]},...e}),getDefaultOptions:e=>({onColumnPinningChange:Xb("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map((e=>e.id)).filter(Boolean);t.setColumnPinning((e=>{var t,o,a,s,i,l;return"right"===n?{left:(null!=(a=null==e?void 0:e.left)?a:[]).filter((e=>!(null!=r&&r.includes(e)))),right:[...(null!=(s=null==e?void 0:e.right)?s:[]).filter((e=>!(null!=r&&r.includes(e)))),...r]}:"left"===n?{left:[...(null!=(i=null==e?void 0:e.left)?i:[]).filter((e=>!(null!=r&&r.includes(e)))),...r],right:(null!=(l=null==e?void 0:e.right)?l:[]).filter((e=>!(null!=r&&r.includes(e))))}:{left:(null!=(t=null==e?void 0:e.left)?t:[]).filter((e=>!(null!=r&&r.includes(e)))),right:(null!=(o=null==e?void 0:e.right)?o:[]).filter((e=>!(null!=r&&r.includes(e))))}}))},e.getCanPin=()=>e.getLeafColumns().some((e=>{var n,r,o;return(null==(n=e.columnDef.enablePinning)||n)&&(null==(r=null!=(o=t.options.enableColumnPinning)?o:t.options.enablePinning)||r)})),e.getIsPinned=()=>{const n=e.getLeafColumns().map((e=>e.id)),{left:r,right:o}=t.getState().columnPinning,a=n.some((e=>null==r?void 0:r.includes(e))),s=n.some((e=>null==o?void 0:o.includes(e)));return a?"left":!!s&&"right"},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();return o?null!=(n=null==(r=t.getState().columnPinning)||null==(r=r[o])?void 0:r.indexOf(e.id))?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=tx((()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right]),((e,t,n)=>{const r=[...null!=t?t:[],...null!=n?n:[]];return e.filter((e=>!r.includes(e.column.id)))}),nx(t.options,"debugRows")),e.getLeftVisibleCells=tx((()=>[e._getAllVisibleCells(),t.getState().columnPinning.left]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.column.id===t)))).filter(Boolean).map((e=>({...e,position:"left"})))),nx(t.options,"debugRows")),e.getRightVisibleCells=tx((()=>[e._getAllVisibleCells(),t.getState().columnPinning.right]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.column.id===t)))).filter(Boolean).map((e=>({...e,position:"right"})))),nx(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>null==e.options.onColumnPinningChange?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?{left:[],right:[]}:null!=(n=null==(r=e.initialState)?void 0:r.columnPinning)?n:{left:[],right:[]})},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;var o,a;return t?Boolean(null==(n=r[t])?void 0:n.length):Boolean((null==(o=r.left)?void 0:o.length)||(null==(a=r.right)?void 0:a.length))},e.getLeftLeafColumns=tx((()=>[e.getAllLeafColumns(),e.getState().columnPinning.left]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.id===t)))).filter(Boolean)),nx(e.options,"debugColumns")),e.getRightLeafColumns=tx((()=>[e.getAllLeafColumns(),e.getState().columnPinning.right]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.id===t)))).filter(Boolean)),nx(e.options,"debugColumns")),e.getCenterLeafColumns=tx((()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((e,t,n)=>{const r=[...null!=t?t:[],...null!=n?n:[]];return e.filter((e=>!r.includes(e.id)))}),nx(e.options,"debugColumns"))}},Ex={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Nx={getDefaultColumnDef:()=>Ex,getInitialState:e=>({columnSizing:{},columnSizingInfo:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]},...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Xb("columnSizing",e),onColumnSizingInfoChange:Xb("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,o;const a=t.getState().columnSizing[e.id];return Math.min(Math.max(null!=(n=e.columnDef.minSize)?n:Ex.minSize,null!=(r=null!=a?a:e.columnDef.size)?r:Ex.size),null!=(o=e.columnDef.maxSize)?o:Ex.maxSize)},e.getStart=tx((e=>[e,Rx(t,e),t.getState().columnSizing]),((t,n)=>n.slice(0,e.getIndex(t)).reduce(((e,t)=>e+t.getSize()),0)),nx(t.options,"debugColumns")),e.getAfter=tx((e=>[e,Rx(t,e),t.getState().columnSizing]),((t,n)=>n.slice(e.getIndex(t)+1).reduce(((e,t)=>e+t.getSize()),0)),nx(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing((t=>{let{[e.id]:n,...r}=t;return r}))},e.getCanResize=()=>{var n,r;return(null==(n=e.columnDef.enableResizing)||n)&&(null==(r=t.options.enableColumnResizing)||r)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let t=0;const n=e=>{var r;e.subHeaders.length?e.subHeaders.forEach(n):t+=null!=(r=e.column.getSize())?r:0};return n(e),t},e.getStart=()=>{if(e.index>0){const t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),o=null==r?void 0:r.getCanResize();return a=>{if(!r||!o)return;if(null==a.persist||a.persist(),Tx(a)&&a.touches&&a.touches.length>1)return;const s=e.getSize(),i=e?e.getLeafHeaders().map((e=>[e.column.id,e.column.getSize()])):[[r.id,r.getSize()]],l=Tx(a)?Math.round(a.touches[0].clientX):a.clientX,c={},d=(e,n)=>{"number"==typeof n&&(t.setColumnSizingInfo((e=>{var r,o;const a="rtl"===t.options.columnResizeDirection?-1:1,s=(n-(null!=(r=null==e?void 0:e.startOffset)?r:0))*a,i=Math.max(s/(null!=(o=null==e?void 0:e.startSize)?o:0),-.999999);return e.columnSizingStart.forEach((e=>{let[t,n]=e;c[t]=Math.round(100*Math.max(n+n*i,0))/100})),{...e,deltaOffset:s,deltaPercentage:i}})),"onChange"!==t.options.columnResizeMode&&"end"!==e||t.setColumnSizing((e=>({...e,...c}))))},u=e=>d("move",e),f=e=>{d("end",e),t.setColumnSizingInfo((e=>({...e,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]})))},h=n||("undefined"!=typeof document?document:null),m={moveHandler:e=>u(e.clientX),upHandler:e=>{null==h||h.removeEventListener("mousemove",m.moveHandler),null==h||h.removeEventListener("mouseup",m.upHandler),f(e.clientX)}},p={moveHandler:e=>(e.cancelable&&(e.preventDefault(),e.stopPropagation()),u(e.touches[0].clientX),!1),upHandler:e=>{var t;null==h||h.removeEventListener("touchmove",p.moveHandler),null==h||h.removeEventListener("touchend",p.upHandler),e.cancelable&&(e.preventDefault(),e.stopPropagation()),f(null==(t=e.touches[0])?void 0:t.clientX)}},g=!!function(){if("boolean"==typeof Dx)return Dx;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch(t){e=!1}return Dx=e,Dx}()&&{passive:!1};Tx(a)?(null==h||h.addEventListener("touchmove",p.moveHandler,g),null==h||h.addEventListener("touchend",p.upHandler,g)):(null==h||h.addEventListener("mousemove",m.moveHandler,g),null==h||h.addEventListener("mouseup",m.upHandler,g)),t.setColumnSizingInfo((e=>({...e,startOffset:l,startSize:s,deltaOffset:0,deltaPercentage:0,columnSizingStart:i,isResizingColumn:r.id})))}}},createTable:e=>{e.setColumnSizing=t=>null==e.options.onColumnSizingChange?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>null==e.options.onColumnSizingInfoChange?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:null!=(n=e.initialState.columnSizing)?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}:null!=(n=e.initialState.columnSizingInfo)?n:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]})},e.getTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},e.getLeftTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getLeftHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},e.getCenterTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getCenterHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},e.getRightTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getRightHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0}}};let Dx=null;function Tx(e){return"touchstart"===e.type}const Ax={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Xb("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility((t=>({...t,[e.id]:null!=n?n:!e.getIsVisible()})))},e.getIsVisible=()=>{var n,r;const o=e.columns;return null==(n=o.length?o.some((e=>e.getIsVisible())):null==(r=t.getState().columnVisibility)?void 0:r[e.id])||n},e.getCanHide=()=>{var n,r;return(null==(n=e.columnDef.enableHiding)||n)&&(null==(r=t.options.enableHiding)||r)},e.getToggleVisibilityHandler=()=>t=>{null==e.toggleVisibility||e.toggleVisibility(t.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=tx((()=>[e.getAllCells(),t.getState().columnVisibility]),(e=>e.filter((e=>e.column.getIsVisible()))),nx(t.options,"debugRows")),e.getVisibleCells=tx((()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()]),((e,t,n)=>[...e,...t,...n]),nx(t.options,"debugRows"))},createTable:e=>{const t=(t,n)=>tx((()=>[n(),n().filter((e=>e.getIsVisible())).map((e=>e.id)).join("_")]),(e=>e.filter((e=>null==e.getIsVisible?void 0:e.getIsVisible()))),nx(e.options,"debugColumns"));e.getVisibleFlatColumns=t(0,(()=>e.getAllFlatColumns())),e.getVisibleLeafColumns=t(0,(()=>e.getAllLeafColumns())),e.getLeftVisibleLeafColumns=t(0,(()=>e.getLeftLeafColumns())),e.getRightVisibleLeafColumns=t(0,(()=>e.getRightLeafColumns())),e.getCenterVisibleLeafColumns=t(0,(()=>e.getCenterLeafColumns())),e.setColumnVisibility=t=>null==e.options.onColumnVisibilityChange?void 0:e.options.onColumnVisibilityChange(t),e.resetColumnVisibility=t=>{var n;e.setColumnVisibility(t?{}:null!=(n=e.initialState.columnVisibility)?n:{})},e.toggleAllColumnsVisible=t=>{var n;t=null!=(n=t)?n:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce(((e,n)=>({...e,[n.id]:t||!(null!=n.getCanHide&&n.getCanHide())})),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some((e=>!(null!=e.getIsVisible&&e.getIsVisible()))),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some((e=>null==e.getIsVisible?void 0:e.getIsVisible())),e.getToggleAllColumnsVisibilityHandler=()=>t=>{var n;e.toggleAllColumnsVisible(null==(n=t.target)?void 0:n.checked)}}};function Rx(e,t){return t?"center"===t?e.getCenterVisibleLeafColumns():"left"===t?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const Mx={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Xb("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=null==(n=e.getCoreRowModel().flatRows[0])||null==(n=n._getAllCellsByColumnId()[t.id])?void 0:n.getValue();return"string"==typeof r||"number"==typeof r}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,o,a;return(null==(n=e.columnDef.enableGlobalFilter)||n)&&(null==(r=t.options.enableGlobalFilter)||r)&&(null==(o=t.options.enableFilters)||o)&&(null==(a=null==t.options.getColumnCanGlobalFilter?void 0:t.options.getColumnCanGlobalFilter(e))||a)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>yx.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return ex(r)?r:"auto"===r?e.getGlobalAutoFilterFn():null!=(t=null==(n=e.options.filterFns)?void 0:n[r])?t:yx[r]},e.setGlobalFilter=t=>{null==e.options.onGlobalFilterChange||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},Ox={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Xb("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,o;if(t){if(null!=(r=null!=(o=e.options.autoResetAll)?o:e.options.autoResetExpanded)?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue((()=>{e.resetExpanded(),n=!1}))}}else e._queue((()=>{t=!0}))},e.setExpanded=t=>null==e.options.onExpandedChange?void 0:e.options.onExpandedChange(t),e.toggleAllRowsExpanded=t=>{(null!=t?t:!e.getIsAllRowsExpanded())?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=t=>{var n,r;e.setExpanded(t?{}:null!=(n=null==(r=e.initialState)?void 0:r.expanded)?n:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some((e=>e.getCanExpand())),e.getToggleAllRowsExpandedHandler=()=>t=>{null==t.persist||t.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const t=e.getState().expanded;return!0===t||Object.values(t).some(Boolean)},e.getIsAllRowsExpanded=()=>{const t=e.getState().expanded;return"boolean"==typeof t?!0===t:!!Object.keys(t).length&&!e.getRowModel().flatRows.some((e=>!e.getIsExpanded()))},e.getExpandedDepth=()=>{let t=0;return(!0===e.getState().expanded?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach((e=>{const n=e.split(".");t=Math.max(t,n.length)})),t},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded((r=>{var o;const a=!0===r||!(null==r||!r[e.id]);let s={};if(!0===r?Object.keys(t.getRowModel().rowsById).forEach((e=>{s[e]=!0})):s=r,n=null!=(o=n)?o:!a,!a&&n)return{...s,[e.id]:!0};if(a&&!n){const{[e.id]:t,...n}=s;return n}return r}))},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!(null!=(n=null==t.options.getIsRowExpanded?void 0:t.options.getIsRowExpanded(e))?n:!0===r||(null==r?void 0:r[e.id]))},e.getCanExpand=()=>{var n,r,o;return null!=(n=null==t.options.getRowCanExpand?void 0:t.options.getRowCanExpand(e))?n:(null==(r=t.options.enableExpanding)||r)&&!(null==(o=e.subRows)||!o.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}}},Ix={getInitialState:e=>({rowPinning:{top:[],bottom:[]},...e}),getDefaultOptions:e=>({onRowPinningChange:Xb("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,o)=>{const a=r?e.getLeafRows().map((e=>{let{id:t}=e;return t})):[],s=o?e.getParentRows().map((e=>{let{id:t}=e;return t})):[],i=new Set([...s,e.id,...a]);t.setRowPinning((e=>{var t,r,o,a,s,l;return"bottom"===n?{top:(null!=(o=null==e?void 0:e.top)?o:[]).filter((e=>!(null!=i&&i.has(e)))),bottom:[...(null!=(a=null==e?void 0:e.bottom)?a:[]).filter((e=>!(null!=i&&i.has(e)))),...Array.from(i)]}:"top"===n?{top:[...(null!=(s=null==e?void 0:e.top)?s:[]).filter((e=>!(null!=i&&i.has(e)))),...Array.from(i)],bottom:(null!=(l=null==e?void 0:e.bottom)?l:[]).filter((e=>!(null!=i&&i.has(e))))}:{top:(null!=(t=null==e?void 0:e.top)?t:[]).filter((e=>!(null!=i&&i.has(e)))),bottom:(null!=(r=null==e?void 0:e.bottom)?r:[]).filter((e=>!(null!=i&&i.has(e))))}}))},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:o}=t.options;return"function"==typeof r?r(e):null==(n=null!=r?r:o)||n},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:o}=t.getState().rowPinning,a=n.some((e=>null==r?void 0:r.includes(e))),s=n.some((e=>null==o?void 0:o.includes(e)));return a?"top":!!s&&"bottom"},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();if(!o)return-1;const a=null==(n="top"===o?t.getTopRows():t.getBottomRows())?void 0:n.map((e=>{let{id:t}=e;return t}));return null!=(r=null==a?void 0:a.indexOf(e.id))?r:-1}},createTable:e=>{e.setRowPinning=t=>null==e.options.onRowPinningChange?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?{top:[],bottom:[]}:null!=(n=null==(r=e.initialState)?void 0:r.rowPinning)?n:{top:[],bottom:[]})},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;var o,a;return t?Boolean(null==(n=r[t])?void 0:n.length):Boolean((null==(o=r.top)?void 0:o.length)||(null==(a=r.bottom)?void 0:a.length))},e._getPinnedRows=(t,n,r)=>{var o;return(null==(o=e.options.keepPinnedRows)||o?(null!=n?n:[]).map((t=>{const n=e.getRow(t,!0);return n.getIsAllParentsExpanded()?n:null})):(null!=n?n:[]).map((e=>t.find((t=>t.id===e))))).filter(Boolean).map((e=>({...e,position:r})))},e.getTopRows=tx((()=>[e.getRowModel().rows,e.getState().rowPinning.top]),((t,n)=>e._getPinnedRows(t,n,"top")),nx(e.options,"debugRows")),e.getBottomRows=tx((()=>[e.getRowModel().rows,e.getState().rowPinning.bottom]),((t,n)=>e._getPinnedRows(t,n,"bottom")),nx(e.options,"debugRows")),e.getCenterRows=tx((()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom]),((e,t,n)=>{const r=new Set([...null!=t?t:[],...null!=n?n:[]]);return e.filter((e=>!r.has(e.id)))}),nx(e.options,"debugRows"))}},Px={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Xb("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>null==e.options.onRowSelectionChange?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:null!=(n=e.initialState.rowSelection)?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection((n=>{t=void 0!==t?t:!e.getIsAllRowsSelected();const r={...n},o=e.getPreGroupedRowModel().flatRows;return t?o.forEach((e=>{e.getCanSelect()&&(r[e.id]=!0)})):o.forEach((e=>{delete r[e.id]})),r}))},e.toggleAllPageRowsSelected=t=>e.setRowSelection((n=>{const r=void 0!==t?t:!e.getIsAllPageRowsSelected(),o={...n};return e.getRowModel().rows.forEach((t=>{Lx(o,t.id,r,!0,e)})),o})),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=tx((()=>[e.getState().rowSelection,e.getCoreRowModel()]),((t,n)=>Object.keys(t).length?Fx(e,n):{rows:[],flatRows:[],rowsById:{}}),nx(e.options,"debugTable")),e.getFilteredSelectedRowModel=tx((()=>[e.getState().rowSelection,e.getFilteredRowModel()]),((t,n)=>Object.keys(t).length?Fx(e,n):{rows:[],flatRows:[],rowsById:{}}),nx(e.options,"debugTable")),e.getGroupedSelectedRowModel=tx((()=>[e.getState().rowSelection,e.getSortedRowModel()]),((t,n)=>Object.keys(t).length?Fx(e,n):{rows:[],flatRows:[],rowsById:{}}),nx(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=Boolean(t.length&&Object.keys(n).length);return r&&t.some((e=>e.getCanSelect()&&!n[e.id]))&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter((e=>e.getCanSelect())),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some((e=>!n[e.id]))&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys(null!=(t=e.getState().rowSelection)?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return!e.getIsAllPageRowsSelected()&&t.filter((e=>e.getCanSelect())).some((e=>e.getIsSelected()||e.getIsSomeSelected()))},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const o=e.getIsSelected();t.setRowSelection((a=>{var s;if(n=void 0!==n?n:!o,e.getCanSelect()&&o===n)return a;const i={...a};return Lx(i,e.id,n,null==(s=null==r?void 0:r.selectChildren)||s,t),i}))},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return zx(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return"some"===Hx(e,n)},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return"all"===Hx(e,n)},e.getCanSelect=()=>{var n;return"function"==typeof t.options.enableRowSelection?t.options.enableRowSelection(e):null==(n=t.options.enableRowSelection)||n},e.getCanSelectSubRows=()=>{var n;return"function"==typeof t.options.enableSubRowSelection?t.options.enableSubRowSelection(e):null==(n=t.options.enableSubRowSelection)||n},e.getCanMultiSelect=()=>{var n;return"function"==typeof t.options.enableMultiRowSelection?t.options.enableMultiRowSelection(e):null==(n=t.options.enableMultiRowSelection)||n},e.getToggleSelectedHandler=()=>{const t=e.getCanSelect();return n=>{var r;t&&e.toggleSelected(null==(r=n.target)?void 0:r.checked)}}}},Lx=(e,t,n,r,o)=>{var a;const s=o.getRow(t,!0);n?(s.getCanMultiSelect()||Object.keys(e).forEach((t=>delete e[t])),s.getCanSelect()&&(e[t]=!0)):delete e[t],r&&null!=(a=s.subRows)&&a.length&&s.getCanSelectSubRows()&&s.subRows.forEach((t=>Lx(e,t.id,n,r,o)))};function Fx(e,t){const n=e.getState().rowSelection,r=[],o={},a=function(e,t){return e.map((e=>{var t;const s=zx(e,n);if(s&&(r.push(e),o[e.id]=e),null!=(t=e.subRows)&&t.length&&(e={...e,subRows:a(e.subRows)}),s)return e})).filter(Boolean)};return{rows:a(t.rows),flatRows:r,rowsById:o}}function zx(e,t){var n;return null!=(n=t[e.id])&&n}function Hx(e,t,n){var r;if(null==(r=e.subRows)||!r.length)return!1;let o=!0,a=!1;return e.subRows.forEach((e=>{if((!a||o)&&(e.getCanSelect()&&(zx(e,t)?a=!0:o=!1),e.subRows&&e.subRows.length)){const n=Hx(e,t);"all"===n?a=!0:"some"===n?(a=!0,o=!1):o=!1}})),o?"all":!!a&&"some"}const Vx=/([0-9]+)/gm;function Bx(e,t){return e===t?0:e>t?1:-1}function Wx(e){return"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?"":String(e):"string"==typeof e?e:""}function Ux(e,t){const n=e.split(Vx).filter(Boolean),r=t.split(Vx).filter(Boolean);for(;n.length&&r.length;){const e=n.shift(),t=r.shift(),o=parseInt(e,10),a=parseInt(t,10),s=[o,a].sort();if(isNaN(s[0])){if(e>t)return 1;if(t>e)return-1}else{if(isNaN(s[1]))return isNaN(o)?-1:1;if(o>a)return 1;if(a>o)return-1}}return n.length-r.length}const $x={alphanumeric:(e,t,n)=>Ux(Wx(e.getValue(n)).toLowerCase(),Wx(t.getValue(n)).toLowerCase()),alphanumericCaseSensitive:(e,t,n)=>Ux(Wx(e.getValue(n)),Wx(t.getValue(n))),text:(e,t,n)=>Bx(Wx(e.getValue(n)).toLowerCase(),Wx(t.getValue(n)).toLowerCase()),textCaseSensitive:(e,t,n)=>Bx(Wx(e.getValue(n)),Wx(t.getValue(n))),datetime:(e,t,n)=>{const r=e.getValue(n),o=t.getValue(n);return r>o?1:r<o?-1:0},basic:(e,t,n)=>Bx(e.getValue(n),t.getValue(n))},Gx={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Xb("sorting",e),isMultiSortEvent:e=>e.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const t of n){const n=null==t?void 0:t.getValue(e.id);if("[object Date]"===Object.prototype.toString.call(n))return $x.datetime;if("string"==typeof n&&(r=!0,n.split(Vx).length>1))return $x.alphanumeric}return r?$x.text:$x.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return"string"==typeof(null==n?void 0:n.getValue(e.id))?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return ex(e.columnDef.sortingFn)?e.columnDef.sortingFn:"auto"===e.columnDef.sortingFn?e.getAutoSortingFn():null!=(n=null==(r=t.options.sortingFns)?void 0:r[e.columnDef.sortingFn])?n:$x[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const o=e.getNextSortingOrder(),a=null!=n;t.setSorting((s=>{const i=null==s?void 0:s.find((t=>t.id===e.id)),l=null==s?void 0:s.findIndex((t=>t.id===e.id));let c,d=[],u=a?n:"desc"===o;var f;return c=null!=s&&s.length&&e.getCanMultiSort()&&r?i?"toggle":"add":null!=s&&s.length&&l!==s.length-1?"replace":i?"toggle":"replace","toggle"===c&&(a||o||(c="remove")),"add"===c?(d=[...s,{id:e.id,desc:u}],d.splice(0,d.length-(null!=(f=t.options.maxMultiSortColCount)?f:Number.MAX_SAFE_INTEGER))):d="toggle"===c?s.map((t=>t.id===e.id?{...t,desc:u}:t)):"remove"===c?s.filter((t=>t.id!==e.id)):[{id:e.id,desc:u}],d}))},e.getFirstSortDir=()=>{var n,r;return(null!=(n=null!=(r=e.columnDef.sortDescFirst)?r:t.options.sortDescFirst)?n:"desc"===e.getAutoSortDir())?"desc":"asc"},e.getNextSortingOrder=n=>{var r,o;const a=e.getFirstSortDir(),s=e.getIsSorted();return s?!!(s===a||null!=(r=t.options.enableSortingRemoval)&&!r||n&&null!=(o=t.options.enableMultiRemove)&&!o)&&("desc"===s?"asc":"desc"):a},e.getCanSort=()=>{var n,r;return(null==(n=e.columnDef.enableSorting)||n)&&(null==(r=t.options.enableSorting)||r)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return null!=(n=null!=(r=e.columnDef.enableMultiSort)?r:t.options.enableMultiSort)?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=null==(n=t.getState().sorting)?void 0:n.find((t=>t.id===e.id));return!!r&&(r.desc?"desc":"asc")},e.getSortIndex=()=>{var n,r;return null!=(n=null==(r=t.getState().sorting)?void 0:r.findIndex((t=>t.id===e.id)))?n:-1},e.clearSorting=()=>{t.setSorting((t=>null!=t&&t.length?t.filter((t=>t.id!==e.id)):[]))},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(null==r.persist||r.persist(),null==e.toggleSorting||e.toggleSorting(void 0,!!e.getCanMultiSort()&&(null==t.options.isMultiSortEvent?void 0:t.options.isMultiSortEvent(r))))}}},createTable:e=>{e.setSorting=t=>null==e.options.onSortingChange?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.sorting)?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},Yx=[ax,Ax,Cx,jx,lx,xx,{createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},Mx,Gx,Sx,Ox,{getInitialState:e=>({...e,pagination:{pageIndex:0,pageSize:10,...null==e?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:Xb("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,o;if(t){if(null!=(r=null!=(o=e.options.autoResetAll)?o:e.options.autoResetPageIndex)?r:!e.options.manualPagination){if(n)return;n=!0,e._queue((()=>{e.resetPageIndex(),n=!1}))}}else e._queue((()=>{t=!0}))},e.setPagination=t=>null==e.options.onPaginationChange?void 0:e.options.onPaginationChange((e=>Jb(t,e))),e.resetPagination=t=>{var n;e.setPagination(t?{pageIndex:0,pageSize:10}:null!=(n=e.initialState.pagination)?n:{pageIndex:0,pageSize:10})},e.setPageIndex=t=>{e.setPagination((n=>{let r=Jb(t,n.pageIndex);const o=void 0===e.options.pageCount||-1===e.options.pageCount?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return r=Math.max(0,Math.min(r,o)),{...n,pageIndex:r}}))},e.resetPageIndex=t=>{var n,r;e.setPageIndex(t?0:null!=(n=null==(r=e.initialState)||null==(r=r.pagination)?void 0:r.pageIndex)?n:0)},e.resetPageSize=t=>{var n,r;e.setPageSize(t?10:null!=(n=null==(r=e.initialState)||null==(r=r.pagination)?void 0:r.pageSize)?n:10)},e.setPageSize=t=>{e.setPagination((e=>{const n=Math.max(1,Jb(t,e.pageSize)),r=e.pageSize*e.pageIndex,o=Math.floor(r/n);return{...e,pageIndex:o,pageSize:n}}))},e.setPageCount=t=>e.setPagination((n=>{var r;let o=Jb(t,null!=(r=e.options.pageCount)?r:-1);return"number"==typeof o&&(o=Math.max(-1,o)),{...n,pageCount:o}})),e.getPageOptions=tx((()=>[e.getPageCount()]),(e=>{let t=[];return e&&e>0&&(t=[...new Array(e)].fill(null).map(((e,t)=>t))),t}),nx(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:t}=e.getState().pagination,n=e.getPageCount();return-1===n||0!==n&&t<n-1},e.previousPage=()=>e.setPageIndex((e=>e-1)),e.nextPage=()=>e.setPageIndex((e=>e+1)),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var t;return null!=(t=e.options.pageCount)?t:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var t;return null!=(t=e.options.rowCount)?t:e.getPrePaginationRowModel().rows.length}}},Ix,Px,Nx];function qx(e){var t,n;const r=[...Yx,...null!=(t=e._features)?t:[]];let o={_features:r};const a=o._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultOptions?void 0:t.getDefaultOptions(o))),{});let s={...null!=(n=e.initialState)?n:{}};o._features.forEach((e=>{var t;s=null!=(t=null==e.getInitialState?void 0:e.getInitialState(s))?t:s}));const i=[];let l=!1;const c={_features:r,options:{...a,...e},initialState:s,_queue:e=>{i.push(e),l||(l=!0,Promise.resolve().then((()=>{for(;i.length;)i.shift()();l=!1})).catch((e=>setTimeout((()=>{throw e})))))},reset:()=>{o.setState(o.initialState)},setOptions:e=>{const t=Jb(e,o.options);o.options=(e=>o.options.mergeOptions?o.options.mergeOptions(a,e):{...a,...e})(t)},getState:()=>o.options.state,setState:e=>{null==o.options.onStateChange||o.options.onStateChange(e)},_getRowId:(e,t,n)=>{var r;return null!=(r=null==o.options.getRowId?void 0:o.options.getRowId(e,t,n))?r:`${n?[n.id,t].join("."):t}`},getCoreRowModel:()=>(o._getCoreRowModel||(o._getCoreRowModel=o.options.getCoreRowModel(o)),o._getCoreRowModel()),getRowModel:()=>o.getPaginationRowModel(),getRow:(e,t)=>{let n=(t?o.getPrePaginationRowModel():o.getRowModel()).rowsById[e];if(!n&&(n=o.getCoreRowModel().rowsById[e],!n))throw new Error;return n},_getDefaultColumnDef:tx((()=>[o.options.defaultColumn]),(e=>{var t;return e=null!=(t=e)?t:{},{header:e=>{const t=e.header.column.columnDef;return t.accessorKey?t.accessorKey:t.accessorFn?t.id:null},cell:e=>{var t,n;return null!=(t=null==(n=e.renderValue())||null==n.toString?void 0:n.toString())?t:null},...o._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultColumnDef?void 0:t.getDefaultColumnDef())),{}),...e}}),nx(e,"debugColumns")),_getColumnDefs:()=>o.options.columns,getAllColumns:tx((()=>[o._getColumnDefs()]),(e=>{const t=function(e,n,r){return void 0===r&&(r=0),e.map((e=>{const a=function(e,t,n,r){var o,a;const s={...e._getDefaultColumnDef(),...t},i=s.accessorKey;let l,c=null!=(o=null!=(a=s.id)?a:i?"function"==typeof String.prototype.replaceAll?i.replaceAll(".","_"):i.replace(/\./g,"_"):void 0)?o:"string"==typeof s.header?s.header:void 0;if(s.accessorFn?l=s.accessorFn:i&&(l=i.includes(".")?e=>{let t=e;for(const e of i.split(".")){var n;t=null==(n=t)?void 0:n[e]}return t}:e=>e[s.accessorKey]),!c)throw new Error;let d={id:`${String(c)}`,accessorFn:l,parent:r,depth:n,columnDef:s,columns:[],getFlatColumns:tx((()=>[!0]),(()=>{var e;return[d,...null==(e=d.columns)?void 0:e.flatMap((e=>e.getFlatColumns()))]}),nx(e.options,"debugColumns")),getLeafColumns:tx((()=>[e._getOrderColumnsFn()]),(e=>{var t;if(null!=(t=d.columns)&&t.length){let t=d.columns.flatMap((e=>e.getLeafColumns()));return e(t)}return[d]}),nx(e.options,"debugColumns"))};for(const t of e._features)null==t.createColumn||t.createColumn(d,e);return d}(o,e,r,n),s=e;return a.columns=s.columns?t(s.columns,a,r+1):[],a}))};return t(e)}),nx(e,"debugColumns")),getAllFlatColumns:tx((()=>[o.getAllColumns()]),(e=>e.flatMap((e=>e.getFlatColumns()))),nx(e,"debugColumns")),_getAllFlatColumnsById:tx((()=>[o.getAllFlatColumns()]),(e=>e.reduce(((e,t)=>(e[t.id]=t,e)),{})),nx(e,"debugColumns")),getAllLeafColumns:tx((()=>[o.getAllColumns(),o._getOrderColumnsFn()]),((e,t)=>{let n=e.flatMap((e=>e.getLeafColumns()));return t(n)}),nx(e,"debugColumns")),getColumn:e=>o._getAllFlatColumnsById()[e]};Object.assign(o,c);for(let e=0;e<o._features.length;e++){const t=o._features[e];null==t||null==t.createTable||t.createTable(o)}return o}function Zx(t,n){return t?function(e){return"function"==typeof e&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}(r=t)||"function"==typeof r||function(e){return"object"==typeof e&&"symbol"==typeof e.$$typeof&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}(r)?e.createElement(t,n):t:null;var r}function Kx({data:t,columns:n,empty:r,hideStatusFilters:o,hideDateRange:a,hideCategories:s,hideBottomBar:i,hideBottomSelected:l,gap:c,base:d,compact:u,isLoading:f,fetchResults:h,activeId:m,statusFilters:p,filterName:g,addTo:v,queryStatus:y,eventStatus:b,calStatus:x,from:w,to:k,defaultSort:S,customTopLeft:C,hideTableBorder:_=!1,tableClassName:j="",hideSearchBox:E=!1}){const[N,D]=(0,e.useState)(S),[T,A]=(0,e.useState)([]),[R,M]=(0,e.useState)({}),[O,I]=React.useState({}),[P]=je(),L=function(t){const n={state:{},onStateChange:()=>{},renderFallbackValue:null,...t},[r]=e.useState((()=>({current:qx(n)}))),[o,a]=e.useState((()=>r.current.initialState));return r.current.setOptions((e=>({...e,...t,state:{...o,...t.state},onStateChange:e=>{a(e),null==t.onStateChange||t.onStateChange(e)}}))),r.current}({data:t,columns:n,onSortingChange:D,onColumnFiltersChange:A,getCoreRowModel:e=>tx((()=>[e.options.data]),(t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(t,o,a){void 0===o&&(o=0);const s=[];for(let l=0;l<t.length;l++){const c=ix(e,e._getRowId(t[l],l,a),t[l],l,o,void 0,null==a?void 0:a.id);var i;n.flatRows.push(c),n.rowsById[c.id]=c,s.push(c),e.options.getSubRows&&(c.originalSubRows=e.options.getSubRows(t[l],l),null!=(i=c.originalSubRows)&&i.length&&(c.subRows=r(c.originalSubRows,o+1,c)))}return s};return n.rows=r(t),n}),nx(e.options,"debugTable",0,(()=>e._autoResetPageIndex()))),getPaginationRowModel:e=>tx((()=>[e.getState().pagination,e.getPrePaginationRowModel(),e.options.paginateExpandedRows?void 0:e.getState().expanded]),((t,n)=>{if(!n.rows.length)return n;const{pageSize:r,pageIndex:o}=t;let{rows:a,flatRows:s,rowsById:i}=n;const l=r*o,c=l+r;let d;a=a.slice(l,c),d=e.options.paginateExpandedRows?{rows:a,flatRows:s,rowsById:i}:function(e){const t=[],n=e=>{var r;t.push(e),null!=(r=e.subRows)&&r.length&&e.getIsExpanded()&&e.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}({rows:a,flatRows:s,rowsById:i}),d.flatRows=[];const u=e=>{d.flatRows.push(e),e.subRows.length&&e.subRows.forEach(u)};return d.rows.forEach(u),d}),nx(e.options,"debugTable")),getSortedRowModel:e=>tx((()=>[e.getState().sorting,e.getPreSortedRowModel()]),((t,n)=>{if(!n.rows.length||null==t||!t.length)return n;const r=e.getState().sorting,o=[],a=r.filter((t=>{var n;return null==(n=e.getColumn(t.id))?void 0:n.getCanSort()})),s={};a.forEach((t=>{const n=e.getColumn(t.id);n&&(s[t.id]={sortUndefined:n.columnDef.sortUndefined,invertSorting:n.columnDef.invertSorting,sortingFn:n.getSortingFn()})}));const i=e=>{const t=e.map((e=>({...e})));return t.sort(((e,t)=>{for(let r=0;r<a.length;r+=1){var n;const o=a[r],i=s[o.id],l=i.sortUndefined,c=null!=(n=null==o?void 0:o.desc)&&n;let d=0;if(l){const n=void 0===e.getValue(o.id),r=void 0===t.getValue(o.id);if(n||r){if("first"===l)return n?-1:1;if("last"===l)return n?1:-1;d=n&&r?0:n?l:-l}}if(0===d&&(d=i.sortingFn(e,t,o.id)),0!==d)return c&&(d*=-1),i.invertSorting&&(d*=-1),d}return e.index-t.index})),t.forEach((e=>{var t;o.push(e),null!=(t=e.subRows)&&t.length&&(e.subRows=i(e.subRows))})),t};return{rows:i(n.rows),flatRows:o,rowsById:n.rowsById}}),nx(e.options,"debugTable",0,(()=>e._autoResetPageIndex()))),getFilteredRowModel:e=>tx((()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter]),((t,n,r)=>{if(!t.rows.length||(null==n||!n.length)&&!r){for(let e=0;e<t.flatRows.length;e++)t.flatRows[e].columnFilters={},t.flatRows[e].columnFiltersMeta={};return t}const o=[],a=[];(null!=n?n:[]).forEach((t=>{var n;const r=e.getColumn(t.id);if(!r)return;const a=r.getFilterFn();a&&o.push({id:t.id,filterFn:a,resolvedValue:null!=(n=null==a.resolveFilterValue?void 0:a.resolveFilterValue(t.value))?n:t.value})}));const s=(null!=n?n:[]).map((e=>e.id)),i=e.getGlobalFilterFn(),l=e.getAllLeafColumns().filter((e=>e.getCanGlobalFilter()));let c,d;r&&i&&l.length&&(s.push("__global__"),l.forEach((e=>{var t;a.push({id:e.id,filterFn:i,resolvedValue:null!=(t=null==i.resolveFilterValue?void 0:i.resolveFilterValue(r))?t:r})})));for(let e=0;e<t.flatRows.length;e++){const n=t.flatRows[e];if(n.columnFilters={},o.length)for(let e=0;e<o.length;e++){c=o[e];const t=c.id;n.columnFilters[t]=c.filterFn(n,t,c.resolvedValue,(e=>{n.columnFiltersMeta[t]=e}))}if(a.length){for(let e=0;e<a.length;e++){d=a[e];const t=d.id;if(d.filterFn(n,t,d.resolvedValue,(e=>{n.columnFiltersMeta[t]=e}))){n.columnFilters.__global__=!0;break}}!0!==n.columnFilters.__global__&&(n.columnFilters.__global__=!1)}}return function(e,t,n){return n.options.filterFromLeafRows?function(e,t,n){var r;const o=[],a={},s=null!=(r=n.options.maxLeafRowFilterDepth)?r:100,i=function(e,r){void 0===r&&(r=0);const l=[];for(let d=0;d<e.length;d++){var c;let u=e[d];const f=ix(n,u.id,u.original,u.index,u.depth,void 0,u.parentId);if(f.columnFilters=u.columnFilters,null!=(c=u.subRows)&&c.length&&r<s){if(f.subRows=i(u.subRows,r+1),u=f,t(u)&&!f.subRows.length){l.push(u),a[u.id]=u,o.push(u);continue}if(t(u)||f.subRows.length){l.push(u),a[u.id]=u,o.push(u);continue}}else u=f,t(u)&&(l.push(u),a[u.id]=u,o.push(u))}return l};return{rows:i(e),flatRows:o,rowsById:a}}(e,t,n):function(e,t,n){var r;const o=[],a={},s=null!=(r=n.options.maxLeafRowFilterDepth)?r:100,i=function(e,r){void 0===r&&(r=0);const l=[];for(let d=0;d<e.length;d++){let u=e[d];if(t(u)){var c;if(null!=(c=u.subRows)&&c.length&&r<s){const e=ix(n,u.id,u.original,u.index,u.depth,void 0,u.parentId);e.subRows=i(u.subRows,r+1),u=e}l.push(u),o.push(u),a[u.id]=u}}return l};return{rows:i(e),flatRows:o,rowsById:a}}(e,t,n)}(t.rows,(e=>{for(let t=0;t<s.length;t++)if(!1===e.columnFilters[s[t]])return!1;return!0}),e)}),nx(e.options,"debugTable",0,(()=>e._autoResetPageIndex()))),onColumnVisibilityChange:M,onRowSelectionChange:I,state:{sorting:N,columnFilters:T,columnVisibility:R,rowSelection:O}});return(0,De.jsxs)("div",{className:Ni("w-full grid self-start",c?`gap-${c}`:"gap-6"),children:[(0,De.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[(0,De.jsx)("div",{className:"flex items-center",children:C?"function"==typeof C?C(L):C:(0,De.jsx)(Dp,{table:L,base:d,fetchResults:h,addTo:v,queryStatus:y})}),(0,De.jsx)("div",{className:"flex flex-col sm:flex-row gap-3 sm:items-center sm:space-x-4",children:(0,De.jsx)(Kv,{base:d,table:L,hideDateRange:a,hideCategories:s,filterName:g,queryStatus:y,eventStatus:P.get("event_status"),calStatus:x,from:w,to:k,statusFilters:p,hideSearchBox:E})})]}),(0,De.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-2 sm:gap-0",children:[!o&&(0,De.jsx)("div",{className:"flex flex-wrap items-center text-sm gap-x-4 gap-y-2",children:(0,De.jsx)(Wb,{statusFilters:p,base:d,data:t})}),(0,De.jsx)("div",{className:"text-sm text-muted-foreground",children:(0,De.jsx)($b,{table:L,compact:u})})]}),(0,De.jsx)("div",{className:Ni("rounded-lg bg-card text-sm text-card-foreground shadow-sm w-full overflow-x-auto",!_&&"border",_&&"rounded-none shadow-none border-none",j),children:(0,De.jsxs)(Gb,{children:[(0,De.jsx)(Yb,{children:L.getHeaderGroups().map((e=>(0,De.jsx)(Zb,{children:e.headers.map((e=>(0,De.jsx)(Kb,{className:Ni("h-10","font-normal","select"===e.id&&(j.includes("no-checkbox-padding")?"w-[36px] pl-0":"w-[50px]"),["start_date","end_date","created","created_at","status","quantity","total","amount_total","calendar"].includes(e.id)&&"w-[15%]",["id"].includes(e.id)&&"w-[8%]",["created","created_at","modified_date","count"].includes(e.id)&&"text-right",["count","modified_date"].includes(e.id)&&"w-auto",["title","name","shortcode"].includes(e.id)&&"w-[30%]"),children:e.isPlaceholder?null:Zx(e.column.columnDef.header,e.getContext())},e.id)))},e.id)))}),(0,De.jsx)(qb,{children:f?[...Array(6)].map(((e,t)=>(0,De.jsx)(Zb,{children:n.map(((e,n)=>(0,De.jsx)(Qb,{children:(0,De.jsx)("div",{className:"flex items-center",children:(0,De.jsx)(_l,{className:"h-4 w-full rounded"})})},`skeleton-${t}-${n}`)))},`skeleton-${t}`))):L.getRowModel().rows?.length?L.getRowModel().rows.map((e=>(0,De.jsx)(Zb,{"data-state":e.getIsSelected()&&"selected",className:"group",children:e.getVisibleCells().map((t=>(0,De.jsx)(Qb,{className:Ni("select"===t.column.id&&j.includes("no-checkbox-padding")&&"pl-0 w-[36px]",m==e.original.id&&t.id.indexOf("name")>=1&&"font-medium underline decoration-dotted",t.id.indexOf("modified")>=1&&"text-right",t.id.indexOf("created")>=1&&"text-right"),children:Zx(t.column.columnDef.cell,t.getContext())},t.id)))},e.id))):(0,De.jsx)(Zb,{children:(0,De.jsx)(Qb,{colSpan:n.length,className:"h-40 text-center text-muted-foreground text-sm",children:r})})})]})}),!i&&L.getRowModel().rows?.length>0&&(0,De.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 sm:gap-0",children:[(0,De.jsx)("div",{className:"text-sm text-muted-foreground",children:!l&&(0,De.jsx)($b,{table:L,compact:u})}),(0,De.jsxs)("div",{className:"flex flex-col sm:flex-row items-start sm:items-center gap-4 sm:gap-12 text-foreground",children:[(0,De.jsx)(Bb,{table:L}),(0,De.jsxs)("div",{className:"flex gap-4",children:[(0,De.jsx)(Ub,{table:L}),(0,De.jsx)(sy,{table:L})]})]})]})]})}function Qx({title:e,column:t}){return(0,De.jsxs)(tl,{variant:"ghost",className:"p-0 hover:bg-[transparent] font-normal",onClick:()=>t.toggleSorting("asc"===t.getIsSorted()),children:[e,(0,De.jsx)(Mb,{className:"ml-1 h-3.5 w-3.5"})]})}var Jx="Checkbox",[Xx,ew]=Wl(Jx),[tw,nw]=Xx(Jx);function rw(t){const{__scopeCheckbox:n,checked:r,children:o,defaultChecked:a,disabled:s,form:i,name:l,onCheckedChange:c,required:d,value:u="on",internal_do_not_use_render:f}=t,[h,m]=Yl({prop:r,defaultProp:a??!1,onChange:c,caller:Jx}),[p,g]=e.useState(null),[v,y]=e.useState(null),b=e.useRef(!1),x=!p||!!i||!!p.closest("form"),w={checked:h,disabled:s,setChecked:m,control:p,setControl:g,name:l,form:i,value:u,hasConsumerStoppedPropagationRef:b,required:d,defaultChecked:!fw(a)&&a,isFormControl:x,bubbleInput:v,setBubbleInput:y};return(0,De.jsx)(tw,{scope:n,...w,children:uw(f)?f(w):o})}var ow="CheckboxTrigger",aw=e.forwardRef((({__scopeCheckbox:t,onKeyDown:n,onClick:r,...o},a)=>{const{control:s,value:i,disabled:l,checked:c,required:d,setControl:u,setChecked:f,hasConsumerStoppedPropagationRef:h,isFormControl:m,bubbleInput:p}=nw(ow,t),g=$i(a,u),v=e.useRef(c);return e.useEffect((()=>{const e=s?.form;if(e){const t=()=>f(v.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[s,f]),(0,De.jsx)(wl.button,{type:"button",role:"checkbox","aria-checked":fw(c)?"mixed":c,"aria-required":d,"data-state":hw(c),"data-disabled":l?"":void 0,disabled:l,value:i,...o,ref:g,onKeyDown:Bl(n,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:Bl(r,(e=>{f((e=>!!fw(e)||!e)),p&&m&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())}))})}));aw.displayName=ow;var sw=e.forwardRef(((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:s,disabled:i,value:l,onCheckedChange:c,form:d,...u}=e;return(0,De.jsx)(rw,{__scopeCheckbox:n,checked:o,defaultChecked:a,disabled:i,required:s,onCheckedChange:c,name:r,form:d,value:l,internal_do_not_use_render:({isFormControl:e})=>(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)(aw,{...u,ref:t,__scopeCheckbox:n}),e&&(0,De.jsx)(dw,{__scopeCheckbox:n})]})})}));sw.displayName=Jx;var iw="CheckboxIndicator",lw=e.forwardRef(((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=nw(iw,n);return(0,De.jsx)(xu,{present:r||fw(a.checked)||!0===a.checked,children:(0,De.jsx)(wl.span,{"data-state":hw(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})}));lw.displayName=iw;var cw="CheckboxBubbleInput",dw=e.forwardRef((({__scopeCheckbox:t,...n},r)=>{const{control:o,hasConsumerStoppedPropagationRef:a,checked:s,defaultChecked:i,required:l,disabled:c,name:d,value:u,form:f,bubbleInput:h,setBubbleInput:m}=nw(cw,t),p=$i(r,m),g=fy(s),v=Kd(o);e.useEffect((()=>{const e=h;if(!e)return;const t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set,r=!a.current;if(g!==s&&n){const t=new Event("click",{bubbles:r});e.indeterminate=fw(s),n.call(e,!fw(s)&&s),e.dispatchEvent(t)}}),[h,g,s,a]);const y=e.useRef(!fw(s)&&s);return(0,De.jsx)(wl.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??y.current,required:l,disabled:c,name:d,value:u,form:f,...n,tabIndex:-1,ref:p,style:{...n.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})}));function uw(e){return"function"==typeof e}function fw(e){return"indeterminate"===e}function hw(e){return fw(e)?"indeterminate":e?"checked":"unchecked"}dw.displayName=cw;const mw=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)(sw,{ref:n,className:Ni("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:(0,De.jsx)(lw,{className:Ni("flex items-center justify-center text-current"),children:(0,De.jsx)(Lm,{className:"h-4 w-4"})})})));mw.displayName=sw.displayName;const pw=Mi("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]),gw=Mi("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),vw={completed:(0,De.jsx)(hl,{className:"w-4 h-4 text-success"}),upcoming:(0,De.jsx)(pl,{className:"w-4 h-4 text-[#48BEFA]"}),tbc:(0,De.jsx)(ml,{className:"w-4 h-4 text-primary/60"}),trash:(0,De.jsx)(yl,{className:"w-4 h-4 text-primary/40"}),live:(0,De.jsx)(gl,{className:"w-4 h-4 text-destructive"})},yw=e=>({completed:"Completed",upcoming:"Upcoming",tbc:"Date not set",trash:"Trash",live:"Live"}[e]||"—");function bw({instances:t,isLoading:n,eventId:r,timezone:o}){const[a,s]=(0,e.useState)([]),[i,l]=(0,e.useState)(0),c=K(),[d,u]=je(),{setEvent:f}=Fl(),h=d.get("status")||"all",m=()=>{u((e=>new URLSearchParams(e)))},p=(0,e.useMemo)((()=>[{id:"select",header:({table:e})=>(0,De.jsx)("div",{className:"flex items-center justify-center min-h-6",children:(0,De.jsx)(mw,{checked:e.getIsAllPageRowsSelected()||e.getIsSomePageRowsSelected()&&"indeterminate",onCheckedChange:t=>e.toggleAllPageRowsSelected(!!t),"aria-label":"Select all"})}),cell:({row:e})=>(0,De.jsx)("div",{className:"flex items-center justify-center min-h-6",children:(0,De.jsx)(mw,{checked:e.getIsSelected(),onCheckedChange:t=>e.toggleSelected(!!t),"aria-label":"Select row"})}),enableSorting:!1,enableHiding:!1},{accessorKey:"title",header:({column:e})=>(0,De.jsx)(Qx,{title:"Event name",column:e}),cell:({row:e})=>{const{instance_url:t,start_date:n,override:o}=e.original,a=o?.title,s=e.getValue("title"),i=e.original.start_date,l=i.endsWith("Z")?new Date(i):new Date(i+"Z"),d=Math.floor(l.getTime()/1e3);return(0,De.jsxs)("div",{className:"group flex items-center gap-2 text-foreground",children:[(0,De.jsx)("a",{href:"#",onClick:e=>{e.preventDefault(),c(`/events/${r}/instances/edit/${d}`)},className:"font-medium hover:underline hover:decoration-dotted underline-offset-4",children:a||s}),o&&(0,De.jsx)(fl,{variant:"outline",className:"text-xs border-[#F6EFD3] text-foreground bg-[#FBF9ED] font-medium px-2 py-1",children:"Edited"}),t&&(0,De.jsx)("a",{href:t,className:"invisible group-hover:visible min-w-5 w-5 h-5 items-center justify-center",target:"_blank",rel:"noopener noreferrer",title:"View instance",children:(0,De.jsx)(pw,{className:"w-full h-full"})})]})},sortingFn:"alphanumeric"},{accessorKey:"status",header:({column:e})=>(0,De.jsx)(Qx,{title:"Status",column:e}),cell:({row:e})=>{const t=e.getValue("status");return(0,De.jsxs)("div",{className:"flex items-center space-x-2",children:[vw[t],(0,De.jsx)("div",{className:"text-foreground",children:yw(t)})]})},sortingFn:"alphanumeric"},{accessorKey:"start_date",header:({column:e})=>(0,De.jsx)(Qx,{title:"Starts",column:e}),cell:({row:e})=>{const t=e.getValue("start_date"),n=e.original.all_day;return(0,De.jsx)("div",{className:"text-foreground whitespace-pre-line",children:Ss(t,{timezone:o,format:n?"date":"date-time"})})},sortingFn:"alphanumeric"},{accessorKey:"end_date",header:({column:e})=>(0,De.jsx)(Qx,{title:"Ends",column:e}),cell:({row:e})=>{const t=e.getValue("end_date"),n=e.original.all_day;return(0,De.jsx)("div",{className:"text-foreground whitespace-pre-line",children:Ss(t,{timezone:o,format:n?"date":"date-time"})})},sortingFn:"alphanumeric"},{accessorKey:"modified_date",header:({column:e})=>(0,De.jsx)(Qx,{title:"Last modified",column:e}),cell:({row:e})=>{const t=e.original.override?.modified_at;return(0,De.jsx)("div",{className:"text-foreground whitespace-pre-line",children:Ss(t,{timezone:o})})},sortingFn:"alphanumeric"}]),[c,r]),g=r?`events/${r}/instances`:"instances";return(0,e.useEffect)((()=>{if(!t)return;const e="trash"===d.get("status"),n=d.get("event_status"),r=n?n.split(",").map((e=>e.trim().toLowerCase())).filter(Boolean):[],o=t.filter((t=>{const n=(t.status||"").trim().toLowerCase(),o="trash"===n;return e?o:r.length>0?r.includes(n):!o}));s(o)}),[t,d]),(0,De.jsx)(Kx,{data:a,columns:p,empty:"trash"===h?"No trashed instances found.":"No recurring instances found.",base:g,queryStatus:h,statusFilters:[{key:"all",title:"All",hideCount:!0,isSelected:!0},{key:"trash",title:"Trash"}],hideCategories:!0,fetchResults:()=>{},isLoading:n,hideTableBorder:!0,tableClassName:"no-checkbox-padding rounded-none border border-transparent",defaultSort:[{id:"start_date",desc:!1}],hideSearchBox:!0,customTopLeft:e=>{const t=e.getSelectedRowModel().rows,n=t.length,o="trash"===h;return(0,De.jsx)(tl,{size:"sm",variant:"ghost",className:Ni("gap-1 border border-input bg-muted",0===n&&"border-input bg-muted text-muted-foreground/50 pointer-events-none"),disabled:0===n,onClick:()=>{o?(async(e,t)=>{if(!e?.length)return;const n=(new Date).toISOString(),o=[];try{await Promise.all(e.map((e=>{const t=Math.floor(new Date(e.original.start_date).getTime()/1e3);return o.push(t),Ne()({path:`${eventkoi_params.api}/edit_instance`,method:"POST",headers:{"Content-Type":"application/json","EVENTKOI-API-KEY":eventkoi_params.api_key},body:JSON.stringify({event_id:r,timestamp:t,overrides:{modified_at:n},deleteKeys:["status"]})})}))),f((e=>{const t={...e.recurrence_overrides||{}};return o.forEach((e=>{if(t[e]){const{status:n,...r}=t[e];0===Object.keys(r).length?delete t[e]:t[e]=r}})),{...e,recurrence_overrides:t}})),gp({message:`Restored ${e.length} instance(s).`}),t.resetRowSelection(),m()}catch(e){console.error("Failed to restore instances:",e),vp("Failed to restore one or more instances.")}})(t,e):(async(e,t)=>{if(!e?.length)return;const n=(new Date).toISOString(),o={};try{await Promise.all(e.map((e=>{const t=Math.floor(new Date(e.original.start_date).getTime()/1e3);return o[t]={...e.original.override||{},status:"trash",modified_at:n},Ne()({path:`${eventkoi_params.api}/edit_instance`,method:"POST",headers:{"Content-Type":"application/json","EVENTKOI-API-KEY":eventkoi_params.api_key},body:JSON.stringify({event_id:r,timestamp:t,overrides:o[t]})})}))),f((e=>({...e,recurrence_overrides:{...e.recurrence_overrides||{},...o}}))),gp({message:`Moved ${e.length} instance(s) to trash.`}),t.resetRowSelection(),m()}catch(e){console.error("Failed to trash instances:",e),vp("Failed to trash one or more instances.")}})(t,e)},children:o?(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)(hl,{className:"w-4 h-4"}),"Restore"]}):(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)(gw,{className:"w-4 h-4"}),"Move to trash"]})})}})}function xw({variant:e,className:t,children:n}){let r="flex flex-col gap-2 px-6 py-8 w-full";return"header"===e&&(r="flex flex-col gap-2 px-6 py-4 w-full"),(0,De.jsx)("div",{className:Ni(r,t),children:n})}const ww=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)("textarea",{className:Ni("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t})));ww.displayName="Textarea";var kw=["MO","TU","WE","TH","FR","SA","SU"],Sw=function(){function e(e,t){if(0===t)throw new Error("Can't create weekday with n == 0");this.weekday=e,this.n=t}return e.fromStr=function(t){return new e(kw.indexOf(t))},e.prototype.nth=function(t){return this.n===t?this:new e(this.weekday,t)},e.prototype.equals=function(e){return this.weekday===e.weekday&&this.n===e.n},e.prototype.toString=function(){var e=kw[this.weekday];return this.n&&(e=(this.n>0?"+":"")+String(this.n)+e),e},e.prototype.getJsWeekday=function(){return 6===this.weekday?0:this.weekday+1},e}(),Cw=function(e){return null!=e},_w=function(e){return"number"==typeof e},jw=function(e){return"string"==typeof e&&kw.includes(e)},Ew=Array.isArray,Nw=function(e,t){void 0===t&&(t=e),1===arguments.length&&(t=e,e=0);for(var n=[],r=e;r<t;r++)n.push(r);return n},Dw=function(e,t){var n=0,r=[];if(Ew(e))for(;n<t;n++)r[n]=[].concat(e);else for(;n<t;n++)r[n]=e;return r};function Tw(e,t,n){void 0===n&&(n=" ");var r=String(e);return t|=0,r.length>t?String(r):((t-=r.length)>n.length&&(n+=Dw(n,t/n.length)),n.slice(0,t)+String(r))}var Aw=function(e,t){var n=e%t;return n*t<0?n+t:n},Rw=function(e,t){return{div:Math.floor(e/t),mod:Aw(e,t)}},Mw=function(e){return!Cw(e)||0===e.length},Ow=function(e){return!Mw(e)},Iw=function(e,t){return Ow(e)&&-1!==e.indexOf(t)},Pw=function(e,t,n,r,o,a){return void 0===r&&(r=0),void 0===o&&(o=0),void 0===a&&(a=0),new Date(Date.UTC(e,t-1,n,r,o,a))},Lw=[31,28,31,30,31,30,31,31,30,31,30,31],Fw=864e5,zw=Pw(1970,1,1),Hw=[6,0,1,2,3,4,5],Vw=function(e){return e%4==0&&e%100!=0||e%400==0},Bw=function(e){return e instanceof Date},Ww=function(e){return Bw(e)&&!isNaN(e.getTime())},Uw=function(e){return t=zw,n=e.getTime()-t.getTime(),Math.round(n/Fw);var t,n},$w=function(e){return new Date(zw.getTime()+e*Fw)},Gw=function(e){var t=e.getUTCMonth();return 1===t&&Vw(e.getUTCFullYear())?29:Lw[t]},Yw=function(e){return Hw[e.getUTCDay()]},qw=function(e,t){var n=Pw(e,t+1,1);return[Yw(n),Gw(n)]},Zw=function(e,t){return t=t||e,new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))},Kw=function(e){return new Date(e.getTime())},Qw=function(e){for(var t=[],n=0;n<e.length;n++)t.push(Kw(e[n]));return t},Jw=function(e){e.sort((function(e,t){return e.getTime()-t.getTime()}))},Xw=function(e,t){void 0===t&&(t=!0);var n=new Date(e);return[Tw(n.getUTCFullYear().toString(),4,"0"),Tw(n.getUTCMonth()+1,2,"0"),Tw(n.getUTCDate(),2,"0"),"T",Tw(n.getUTCHours(),2,"0"),Tw(n.getUTCMinutes(),2,"0"),Tw(n.getUTCSeconds(),2,"0"),t?"Z":""].join("")},ek=function(e){var t=/^(\d{4})(\d{2})(\d{2})(T(\d{2})(\d{2})(\d{2})Z?)?$/.exec(e);if(!t)throw new Error("Invalid UNTIL value: ".concat(e));return new Date(Date.UTC(parseInt(t[1],10),parseInt(t[2],10)-1,parseInt(t[3],10),parseInt(t[5],10)||0,parseInt(t[6],10)||0,parseInt(t[7],10)||0))},tk=function(e,t){return e.toLocaleString("sv-SE",{timeZone:t}).replace(" ","T")+"Z"},nk=function(){function e(e,t){this.minDate=null,this.maxDate=null,this._result=[],this.total=0,this.method=e,this.args=t,"between"===e?(this.maxDate=t.inc?t.before:new Date(t.before.getTime()-1),this.minDate=t.inc?t.after:new Date(t.after.getTime()+1)):"before"===e?this.maxDate=t.inc?t.dt:new Date(t.dt.getTime()-1):"after"===e&&(this.minDate=t.inc?t.dt:new Date(t.dt.getTime()+1))}return e.prototype.accept=function(e){++this.total;var t=this.minDate&&e<this.minDate,n=this.maxDate&&e>this.maxDate;if("between"===this.method){if(t)return!0;if(n)return!1}else if("before"===this.method){if(n)return!1}else if("after"===this.method)return!!t||(this.add(e),!1);return this.add(e)},e.prototype.add=function(e){return this._result.push(e),!0},e.prototype.getValue=function(){var e=this._result;switch(this.method){case"all":case"between":return e;default:return e.length?e[e.length-1]:null}},e.prototype.clone=function(){return new e(this.method,this.args)},e}();const rk=nk;var ok=function(e){function t(t,n,r){var o=e.call(this,t,n)||this;return o.iterator=r,o}return Yu(t,e),t.prototype.add=function(e){return!!this.iterator(e,this._result.length)&&(this._result.push(e),!0)},t}(rk);const ak=ok,sk={dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],tokens:{SKIP:/^[ \r\n\t]+|^\.$/,number:/^[1-9][0-9]*/,numberAsText:/^(one|two|three)/i,every:/^every/i,"day(s)":/^days?/i,"weekday(s)":/^weekdays?/i,"week(s)":/^weeks?/i,"hour(s)":/^hours?/i,"minute(s)":/^minutes?/i,"month(s)":/^months?/i,"year(s)":/^years?/i,on:/^(on|in)/i,at:/^(at)/i,the:/^the/i,first:/^first/i,second:/^second/i,third:/^third/i,nth:/^([1-9][0-9]*)(\.|th|nd|rd|st)/i,last:/^last/i,for:/^for/i,"time(s)":/^times?/i,until:/^(un)?til/i,monday:/^mo(n(day)?)?/i,tuesday:/^tu(e(s(day)?)?)?/i,wednesday:/^we(d(n(esday)?)?)?/i,thursday:/^th(u(r(sday)?)?)?/i,friday:/^fr(i(day)?)?/i,saturday:/^sa(t(urday)?)?/i,sunday:/^su(n(day)?)?/i,january:/^jan(uary)?/i,february:/^feb(ruary)?/i,march:/^mar(ch)?/i,april:/^apr(il)?/i,may:/^may/i,june:/^june?/i,july:/^july?/i,august:/^aug(ust)?/i,september:/^sep(t(ember)?)?/i,october:/^oct(ober)?/i,november:/^nov(ember)?/i,december:/^dec(ember)?/i,comma:/^(,\s*|(and|or)\s*)+/i}};var ik=function(e,t){return-1!==e.indexOf(t)},lk=function(e){return e.toString()},ck=function(e,t,n){return"".concat(t," ").concat(n,", ").concat(e)},dk=function(){function e(e,t,n,r){if(void 0===t&&(t=lk),void 0===n&&(n=sk),void 0===r&&(r=ck),this.text=[],this.language=n||sk,this.gettext=t,this.dateFormatter=r,this.rrule=e,this.options=e.options,this.origOptions=e.origOptions,this.origOptions.bymonthday){var o=[].concat(this.options.bymonthday),a=[].concat(this.options.bynmonthday);o.sort((function(e,t){return e-t})),a.sort((function(e,t){return t-e})),this.bymonthday=o.concat(a),this.bymonthday.length||(this.bymonthday=null)}if(Cw(this.origOptions.byweekday)){var s=Ew(this.origOptions.byweekday)?this.origOptions.byweekday:[this.origOptions.byweekday],i=String(s);this.byweekday={allWeeks:s.filter((function(e){return!e.n})),someWeeks:s.filter((function(e){return Boolean(e.n)})),isWeekdays:-1!==i.indexOf("MO")&&-1!==i.indexOf("TU")&&-1!==i.indexOf("WE")&&-1!==i.indexOf("TH")&&-1!==i.indexOf("FR")&&-1===i.indexOf("SA")&&-1===i.indexOf("SU"),isEveryDay:-1!==i.indexOf("MO")&&-1!==i.indexOf("TU")&&-1!==i.indexOf("WE")&&-1!==i.indexOf("TH")&&-1!==i.indexOf("FR")&&-1!==i.indexOf("SA")&&-1!==i.indexOf("SU")};var l=function(e,t){return e.weekday-t.weekday};this.byweekday.allWeeks.sort(l),this.byweekday.someWeeks.sort(l),this.byweekday.allWeeks.length||(this.byweekday.allWeeks=null),this.byweekday.someWeeks.length||(this.byweekday.someWeeks=null)}else this.byweekday=null}return e.isFullyConvertible=function(t){if(!(t.options.freq in e.IMPLEMENTED))return!1;if(t.origOptions.until&&t.origOptions.count)return!1;for(var n in t.origOptions){if(ik(["dtstart","tzid","wkst","freq"],n))return!0;if(!ik(e.IMPLEMENTED[t.options.freq],n))return!1}return!0},e.prototype.isFullyConvertible=function(){return e.isFullyConvertible(this.rrule)},e.prototype.toString=function(){var t=this.gettext;if(!(this.options.freq in e.IMPLEMENTED))return t("RRule error: Unable to fully convert this rrule to text");if(this.text=[t("every")],this[iS.FREQUENCIES[this.options.freq]](),this.options.until){this.add(t("until"));var n=this.options.until;this.add(this.dateFormatter(n.getUTCFullYear(),this.language.monthNames[n.getUTCMonth()],n.getUTCDate()))}else this.options.count&&this.add(t("for")).add(this.options.count.toString()).add(this.plural(this.options.count)?t("times"):t("time"));return this.isFullyConvertible()||this.add(t("(~ approximate)")),this.text.join("")},e.prototype.HOURLY=function(){var e=this.gettext;1!==this.options.interval&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("hours"):e("hour"))},e.prototype.MINUTELY=function(){var e=this.gettext;1!==this.options.interval&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("minutes"):e("minute"))},e.prototype.DAILY=function(){var e=this.gettext;1!==this.options.interval&&this.add(this.options.interval.toString()),this.byweekday&&this.byweekday.isWeekdays?this.add(this.plural(this.options.interval)?e("weekdays"):e("weekday")):this.add(this.plural(this.options.interval)?e("days"):e("day")),this.origOptions.bymonth&&(this.add(e("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday?this._byweekday():this.origOptions.byhour&&this._byhour()},e.prototype.WEEKLY=function(){var e=this.gettext;1!==this.options.interval&&this.add(this.options.interval.toString()).add(this.plural(this.options.interval)?e("weeks"):e("week")),this.byweekday&&this.byweekday.isWeekdays?1===this.options.interval?this.add(this.plural(this.options.interval)?e("weekdays"):e("weekday")):this.add(e("on")).add(e("weekdays")):this.byweekday&&this.byweekday.isEveryDay?this.add(this.plural(this.options.interval)?e("days"):e("day")):(1===this.options.interval&&this.add(e("week")),this.origOptions.bymonth&&(this.add(e("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday(),this.origOptions.byhour&&this._byhour())},e.prototype.MONTHLY=function(){var e=this.gettext;this.origOptions.bymonth?(1!==this.options.interval&&(this.add(this.options.interval.toString()).add(e("months")),this.plural(this.options.interval)&&this.add(e("in"))),this._bymonth()):(1!==this.options.interval&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("months"):e("month"))),this.bymonthday?this._bymonthday():this.byweekday&&this.byweekday.isWeekdays?this.add(e("on")).add(e("weekdays")):this.byweekday&&this._byweekday()},e.prototype.YEARLY=function(){var e=this.gettext;this.origOptions.bymonth?(1!==this.options.interval&&(this.add(this.options.interval.toString()),this.add(e("years"))),this._bymonth()):(1!==this.options.interval&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("years"):e("year"))),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday(),this.options.byyearday&&this.add(e("on the")).add(this.list(this.options.byyearday,this.nth,e("and"))).add(e("day")),this.options.byweekno&&this.add(e("in")).add(this.plural(this.options.byweekno.length)?e("weeks"):e("week")).add(this.list(this.options.byweekno,void 0,e("and")))},e.prototype._bymonthday=function(){var e=this.gettext;this.byweekday&&this.byweekday.allWeeks?this.add(e("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext,e("or"))).add(e("the")).add(this.list(this.bymonthday,this.nth,e("or"))):this.add(e("on the")).add(this.list(this.bymonthday,this.nth,e("and")))},e.prototype._byweekday=function(){var e=this.gettext;this.byweekday.allWeeks&&!this.byweekday.isWeekdays&&this.add(e("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext)),this.byweekday.someWeeks&&(this.byweekday.allWeeks&&this.add(e("and")),this.add(e("on the")).add(this.list(this.byweekday.someWeeks,this.weekdaytext,e("and"))))},e.prototype._byhour=function(){var e=this.gettext;this.add(e("at")).add(this.list(this.origOptions.byhour,void 0,e("and")))},e.prototype._bymonth=function(){this.add(this.list(this.options.bymonth,this.monthtext,this.gettext("and")))},e.prototype.nth=function(e){var t;e=parseInt(e.toString(),10);var n=this.gettext;if(-1===e)return n("last");var r=Math.abs(e);switch(r){case 1:case 21:case 31:t=r+n("st");break;case 2:case 22:t=r+n("nd");break;case 3:case 23:t=r+n("rd");break;default:t=r+n("th")}return e<0?t+" "+n("last"):t},e.prototype.monthtext=function(e){return this.language.monthNames[e-1]},e.prototype.weekdaytext=function(e){var t=_w(e)?(e+1)%7:e.getJsWeekday();return(e.n?this.nth(e.n)+" ":"")+this.language.dayNames[t]},e.prototype.plural=function(e){return e%100!=1},e.prototype.add=function(e){return this.text.push(" "),this.text.push(e),this},e.prototype.list=function(e,t,n,r){var o=this;void 0===r&&(r=","),Ew(e)||(e=[e]),t=t||function(e){return e.toString()};var a=function(e){return t&&t.call(o,e)};return n?function(e,t,n){for(var r="",o=0;o<e.length;o++)0!==o&&(o===e.length-1?r+=" "+n+" ":r+=t+" "),r+=e[o];return r}(e.map(a),r,n):e.map(a).join(r+" ")},e}();const uk=dk;var fk,hk=function(){function e(e){this.done=!0,this.rules=e}return e.prototype.start=function(e){return this.text=e,this.done=!1,this.nextSymbol()},e.prototype.isDone=function(){return this.done&&null===this.symbol},e.prototype.nextSymbol=function(){var e,t;this.symbol=null,this.value=null;do{if(this.done)return!1;for(var n in e=null,this.rules){var r=this.rules[n].exec(this.text);r&&(null===e||r[0].length>e[0].length)&&(e=r,t=n)}if(null!=e&&(this.text=this.text.substr(e[0].length),""===this.text&&(this.done=!0)),null==e)return this.done=!0,this.symbol=null,void(this.value=null)}while("SKIP"===t);return this.symbol=t,this.value=e,!0},e.prototype.accept=function(e){if(this.symbol===e){if(this.value){var t=this.value;return this.nextSymbol(),t}return this.nextSymbol(),!0}return!1},e.prototype.acceptNumber=function(){return this.accept("number")},e.prototype.expect=function(e){if(this.accept(e))return!0;throw new Error("expected "+e+" but found "+this.symbol)},e}();function mk(e,t){void 0===t&&(t=sk);var n={},r=new hk(t.tokens);return r.start(e)?(function(){r.expect("every");var e=r.acceptNumber();if(e&&(n.interval=parseInt(e[0],10)),r.isDone())throw new Error("Unexpected end");switch(r.symbol){case"day(s)":n.freq=iS.DAILY,r.nextSymbol()&&(a(),c());break;case"weekday(s)":n.freq=iS.WEEKLY,n.byweekday=[iS.MO,iS.TU,iS.WE,iS.TH,iS.FR],r.nextSymbol(),a(),c();break;case"week(s)":n.freq=iS.WEEKLY,r.nextSymbol()&&(o(),a(),c());break;case"hour(s)":n.freq=iS.HOURLY,r.nextSymbol()&&(o(),c());break;case"minute(s)":n.freq=iS.MINUTELY,r.nextSymbol()&&(o(),c());break;case"month(s)":n.freq=iS.MONTHLY,r.nextSymbol()&&(o(),c());break;case"year(s)":n.freq=iS.YEARLY,r.nextSymbol()&&(o(),c());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":n.freq=iS.WEEKLY;var t=r.symbol.substr(0,2).toUpperCase();if(n.byweekday=[iS[t]],!r.nextSymbol())return;for(;r.accept("comma");){if(r.isDone())throw new Error("Unexpected end");var d=i();if(!d)throw new Error("Unexpected symbol "+r.symbol+", expected weekday");n.byweekday.push(iS[d]),r.nextSymbol()}a(),function(){r.accept("on"),r.accept("the");var e=l();if(e)for(n.bymonthday=[e],r.nextSymbol();r.accept("comma");){if(!(e=l()))throw new Error("Unexpected symbol "+r.symbol+"; expected monthday");n.bymonthday.push(e),r.nextSymbol()}}(),c();break;case"january":case"february":case"march":case"april":case"may":case"june":case"july":case"august":case"september":case"october":case"november":case"december":if(n.freq=iS.YEARLY,n.bymonth=[s()],!r.nextSymbol())return;for(;r.accept("comma");){if(r.isDone())throw new Error("Unexpected end");var u=s();if(!u)throw new Error("Unexpected symbol "+r.symbol+", expected month");n.bymonth.push(u),r.nextSymbol()}o(),c();break;default:throw new Error("Unknown symbol")}}(),n):null;function o(){var e=r.accept("on"),t=r.accept("the");if(e||t)do{var o=l(),a=i(),c=s();if(o)a?(r.nextSymbol(),n.byweekday||(n.byweekday=[]),n.byweekday.push(iS[a].nth(o))):(n.bymonthday||(n.bymonthday=[]),n.bymonthday.push(o),r.accept("day(s)"));else if(a)r.nextSymbol(),n.byweekday||(n.byweekday=[]),n.byweekday.push(iS[a]);else if("weekday(s)"===r.symbol)r.nextSymbol(),n.byweekday||(n.byweekday=[iS.MO,iS.TU,iS.WE,iS.TH,iS.FR]);else if("week(s)"===r.symbol){r.nextSymbol();var d=r.acceptNumber();if(!d)throw new Error("Unexpected symbol "+r.symbol+", expected week number");for(n.byweekno=[parseInt(d[0],10)];r.accept("comma");){if(!(d=r.acceptNumber()))throw new Error("Unexpected symbol "+r.symbol+"; expected monthday");n.byweekno.push(parseInt(d[0],10))}}else{if(!c)return;r.nextSymbol(),n.bymonth||(n.bymonth=[]),n.bymonth.push(c)}}while(r.accept("comma")||r.accept("the")||r.accept("on"))}function a(){if(r.accept("at"))do{var e=r.acceptNumber();if(!e)throw new Error("Unexpected symbol "+r.symbol+", expected hour");for(n.byhour=[parseInt(e[0],10)];r.accept("comma");){if(!(e=r.acceptNumber()))throw new Error("Unexpected symbol "+r.symbol+"; expected hour");n.byhour.push(parseInt(e[0],10))}}while(r.accept("comma")||r.accept("at"))}function s(){switch(r.symbol){case"january":return 1;case"february":return 2;case"march":return 3;case"april":return 4;case"may":return 5;case"june":return 6;case"july":return 7;case"august":return 8;case"september":return 9;case"october":return 10;case"november":return 11;case"december":return 12;default:return!1}}function i(){switch(r.symbol){case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return r.symbol.substr(0,2).toUpperCase();default:return!1}}function l(){switch(r.symbol){case"last":return r.nextSymbol(),-1;case"first":return r.nextSymbol(),1;case"second":return r.nextSymbol(),r.accept("last")?-2:2;case"third":return r.nextSymbol(),r.accept("last")?-3:3;case"nth":var e=parseInt(r.value[1],10);if(e<-366||e>366)throw new Error("Nth out of range: "+e);return r.nextSymbol(),r.accept("last")?-e:e;default:return!1}}function c(){if("until"===r.symbol){var e=Date.parse(r.text);if(!e)throw new Error("Cannot parse until date:"+r.text);n.until=new Date(e)}else r.accept("for")&&(n.count=parseInt(r.value[0],10),r.expect("number"))}}function pk(e){return e<fk.HOURLY}!function(e){e[e.YEARLY=0]="YEARLY",e[e.MONTHLY=1]="MONTHLY",e[e.WEEKLY=2]="WEEKLY",e[e.DAILY=3]="DAILY",e[e.HOURLY=4]="HOURLY",e[e.MINUTELY=5]="MINUTELY",e[e.SECONDLY=6]="SECONDLY"}(fk||(fk={}));var gk=function(e,t){return void 0===t&&(t=sk),new iS(mk(e,t)||void 0)},vk=["count","until","interval","byweekday","bymonthday","bymonth"];uk.IMPLEMENTED=[],uk.IMPLEMENTED[fk.HOURLY]=vk,uk.IMPLEMENTED[fk.MINUTELY]=vk,uk.IMPLEMENTED[fk.DAILY]=["byhour"].concat(vk),uk.IMPLEMENTED[fk.WEEKLY]=vk,uk.IMPLEMENTED[fk.MONTHLY]=vk,uk.IMPLEMENTED[fk.YEARLY]=["byweekno","byyearday"].concat(vk);var yk=uk.isFullyConvertible,bk=function(){function e(e,t,n,r){this.hour=e,this.minute=t,this.second=n,this.millisecond=r||0}return e.prototype.getHours=function(){return this.hour},e.prototype.getMinutes=function(){return this.minute},e.prototype.getSeconds=function(){return this.second},e.prototype.getMilliseconds=function(){return this.millisecond},e.prototype.getTime=function(){return 1e3*(60*this.hour*60+60*this.minute+this.second)+this.millisecond},e}(),xk=function(e){function t(t,n,r,o,a,s,i){var l=e.call(this,o,a,s,i)||this;return l.year=t,l.month=n,l.day=r,l}return Yu(t,e),t.fromDate=function(e){return new this(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.valueOf()%1e3)},t.prototype.getWeekday=function(){return Yw(new Date(this.getTime()))},t.prototype.getTime=function(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second,this.millisecond)).getTime()},t.prototype.getDay=function(){return this.day},t.prototype.getMonth=function(){return this.month},t.prototype.getYear=function(){return this.year},t.prototype.addYears=function(e){this.year+=e},t.prototype.addMonths=function(e){if(this.month+=e,this.month>12){var t=Math.floor(this.month/12),n=Aw(this.month,12);this.month=n,this.year+=t,0===this.month&&(this.month=12,--this.year)}},t.prototype.addWeekly=function(e,t){t>this.getWeekday()?this.day+=-(this.getWeekday()+1+(6-t))+7*e:this.day+=-(this.getWeekday()-t)+7*e,this.fixDay()},t.prototype.addDaily=function(e){this.day+=e,this.fixDay()},t.prototype.addHours=function(e,t,n){for(t&&(this.hour+=Math.floor((23-this.hour)/e)*e);;){this.hour+=e;var r=Rw(this.hour,24),o=r.div,a=r.mod;if(o&&(this.hour=a,this.addDaily(o)),Mw(n)||Iw(n,this.hour))break}},t.prototype.addMinutes=function(e,t,n,r){for(t&&(this.minute+=Math.floor((1439-(60*this.hour+this.minute))/e)*e);;){this.minute+=e;var o=Rw(this.minute,60),a=o.div,s=o.mod;if(a&&(this.minute=s,this.addHours(a,!1,n)),(Mw(n)||Iw(n,this.hour))&&(Mw(r)||Iw(r,this.minute)))break}},t.prototype.addSeconds=function(e,t,n,r,o){for(t&&(this.second+=Math.floor((86399-(3600*this.hour+60*this.minute+this.second))/e)*e);;){this.second+=e;var a=Rw(this.second,60),s=a.div,i=a.mod;if(s&&(this.second=i,this.addMinutes(s,!1,n,r)),(Mw(n)||Iw(n,this.hour))&&(Mw(r)||Iw(r,this.minute))&&(Mw(o)||Iw(o,this.second)))break}},t.prototype.fixDay=function(){if(!(this.day<=28)){var e=qw(this.year,this.month-1)[1];if(!(this.day<=e))for(;this.day>e;){if(this.day-=e,++this.month,13===this.month&&(this.month=1,++this.year,this.year>9999))return;e=qw(this.year,this.month-1)[1]}}},t.prototype.add=function(e,t){var n=e.freq,r=e.interval,o=e.wkst,a=e.byhour,s=e.byminute,i=e.bysecond;switch(n){case fk.YEARLY:return this.addYears(r);case fk.MONTHLY:return this.addMonths(r);case fk.WEEKLY:return this.addWeekly(r,o);case fk.DAILY:return this.addDaily(r);case fk.HOURLY:return this.addHours(r,t,a);case fk.MINUTELY:return this.addMinutes(r,t,a,s);case fk.SECONDLY:return this.addSeconds(r,t,a,s,i)}},t}(bk);function wk(e){for(var t=[],n=0,r=Object.keys(e);n<r.length;n++){var o=r[n];Iw(sS,o)||t.push(o),Bw(e[o])&&!Ww(e[o])&&t.push(o)}if(t.length)throw new Error("Invalid options: "+t.join(", "));return qu({},e)}function kk(e){var t=qu(qu({},aS),wk(e));if(Cw(t.byeaster)&&(t.freq=iS.YEARLY),!Cw(t.freq)||!iS.FREQUENCIES[t.freq])throw new Error("Invalid frequency: ".concat(t.freq," ").concat(e.freq));if(t.dtstart||(t.dtstart=new Date((new Date).setMilliseconds(0))),Cw(t.wkst)?_w(t.wkst)||(t.wkst=t.wkst.weekday):t.wkst=iS.MO.weekday,Cw(t.bysetpos)){_w(t.bysetpos)&&(t.bysetpos=[t.bysetpos]);for(var n=0;n<t.bysetpos.length;n++)if(0===(a=t.bysetpos[n])||!(a>=-366&&a<=366))throw new Error("bysetpos must be between 1 and 366, or between -366 and -1")}if(!(Boolean(t.byweekno)||Ow(t.byweekno)||Ow(t.byyearday)||Boolean(t.bymonthday)||Ow(t.bymonthday)||Cw(t.byweekday)||Cw(t.byeaster)))switch(t.freq){case iS.YEARLY:t.bymonth||(t.bymonth=t.dtstart.getUTCMonth()+1),t.bymonthday=t.dtstart.getUTCDate();break;case iS.MONTHLY:t.bymonthday=t.dtstart.getUTCDate();break;case iS.WEEKLY:t.byweekday=[Yw(t.dtstart)]}if(Cw(t.bymonth)&&!Ew(t.bymonth)&&(t.bymonth=[t.bymonth]),Cw(t.byyearday)&&!Ew(t.byyearday)&&_w(t.byyearday)&&(t.byyearday=[t.byyearday]),Cw(t.bymonthday))if(Ew(t.bymonthday)){var r=[],o=[];for(n=0;n<t.bymonthday.length;n++){var a;(a=t.bymonthday[n])>0?r.push(a):a<0&&o.push(a)}t.bymonthday=r,t.bynmonthday=o}else t.bymonthday<0?(t.bynmonthday=[t.bymonthday],t.bymonthday=[]):(t.bynmonthday=[],t.bymonthday=[t.bymonthday]);else t.bymonthday=[],t.bynmonthday=[];if(Cw(t.byweekno)&&!Ew(t.byweekno)&&(t.byweekno=[t.byweekno]),Cw(t.byweekday))if(_w(t.byweekday))t.byweekday=[t.byweekday],t.bynweekday=null;else if(jw(t.byweekday))t.byweekday=[Sw.fromStr(t.byweekday).weekday],t.bynweekday=null;else if(t.byweekday instanceof Sw)!t.byweekday.n||t.freq>iS.MONTHLY?(t.byweekday=[t.byweekday.weekday],t.bynweekday=null):(t.bynweekday=[[t.byweekday.weekday,t.byweekday.n]],t.byweekday=null);else{var s=[],i=[];for(n=0;n<t.byweekday.length;n++){var l=t.byweekday[n];_w(l)?s.push(l):jw(l)?s.push(Sw.fromStr(l).weekday):!l.n||t.freq>iS.MONTHLY?s.push(l.weekday):i.push([l.weekday,l.n])}t.byweekday=Ow(s)?s:null,t.bynweekday=Ow(i)?i:null}else t.bynweekday=null;return Cw(t.byhour)?_w(t.byhour)&&(t.byhour=[t.byhour]):t.byhour=t.freq<iS.HOURLY?[t.dtstart.getUTCHours()]:null,Cw(t.byminute)?_w(t.byminute)&&(t.byminute=[t.byminute]):t.byminute=t.freq<iS.MINUTELY?[t.dtstart.getUTCMinutes()]:null,Cw(t.bysecond)?_w(t.bysecond)&&(t.bysecond=[t.bysecond]):t.bysecond=t.freq<iS.SECONDLY?[t.dtstart.getUTCSeconds()]:null,{parsedOptions:t}}function Sk(e){var t=e.split("\n").map(_k).filter((function(e){return null!==e}));return qu(qu({},t[0]),t[1])}function Ck(e){var t={},n=/DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\s]+)/i.exec(e);if(!n)return t;var r=n[1],o=n[2];return r&&(t.tzid=r),t.dtstart=ek(o),t}function _k(e){if(!(e=e.replace(/^\s+|\s+$/,"")).length)return null;var t=/^([A-Z]+?)[:;]/.exec(e.toUpperCase());if(!t)return jk(e);var n=t[1];switch(n.toUpperCase()){case"RRULE":case"EXRULE":return jk(e);case"DTSTART":return Ck(e);default:throw new Error("Unsupported RFC prop ".concat(n," in ").concat(e))}}function jk(e){var t=Ck(e.replace(/^RRULE:/i,""));return e.replace(/^(?:RRULE|EXRULE):/i,"").split(";").forEach((function(n){var r=n.split("="),o=r[0],a=r[1];switch(o.toUpperCase()){case"FREQ":t.freq=fk[a.toUpperCase()];break;case"WKST":t.wkst=oS[a.toUpperCase()];break;case"COUNT":case"INTERVAL":case"BYSETPOS":case"BYMONTH":case"BYMONTHDAY":case"BYYEARDAY":case"BYWEEKNO":case"BYHOUR":case"BYMINUTE":case"BYSECOND":var s=function(e){return-1!==e.indexOf(",")?e.split(",").map(Ek):Ek(e)}(a),i=o.toLowerCase();t[i]=s;break;case"BYWEEKDAY":case"BYDAY":t.byweekday=function(e){return e.split(",").map((function(e){if(2===e.length)return oS[e];var t=e.match(/^([+-]?\d{1,2})([A-Z]{2})$/);if(!t||t.length<3)throw new SyntaxError("Invalid weekday string: ".concat(e));var n=Number(t[1]),r=t[2],o=oS[r].weekday;return new Sw(o,n)}))}(a);break;case"DTSTART":case"TZID":var l=Ck(e);t.tzid=l.tzid,t.dtstart=l.dtstart;break;case"UNTIL":t.until=ek(a);break;case"BYEASTER":t.byeaster=Number(a);break;default:throw new Error("Unknown RRULE property '"+o+"'")}})),t}function Ek(e){return/^[+-]?\d+$/.test(e)?Number(e):e}var Nk=function(){function e(e,t){if(isNaN(e.getTime()))throw new RangeError("Invalid date passed to DateWithZone");this.date=e,this.tzid=t}return Object.defineProperty(e.prototype,"isUTC",{get:function(){return!this.tzid||"UTC"===this.tzid.toUpperCase()},enumerable:!1,configurable:!0}),e.prototype.toString=function(){var e=Xw(this.date.getTime(),this.isUTC);return this.isUTC?":".concat(e):";TZID=".concat(this.tzid,":").concat(e)},e.prototype.getTime=function(){return this.date.getTime()},e.prototype.rezonedDate=function(){return this.isUTC?this.date:(e=this.date,t=this.tzid,n=Intl.DateTimeFormat().resolvedOptions().timeZone,r=new Date(tk(e,n)),o=new Date(tk(e,null!=t?t:"UTC")).getTime()-r.getTime(),new Date(e.getTime()-o));var e,t,n,r,o},e}();function Dk(e){for(var t,n=[],r="",o=Object.keys(e),a=Object.keys(aS),s=0;s<o.length;s++)if("tzid"!==o[s]&&Iw(a,o[s])){var i=o[s].toUpperCase(),l=e[o[s]],c="";if(Cw(l)&&(!Ew(l)||l.length)){switch(i){case"FREQ":c=iS.FREQUENCIES[e.freq];break;case"WKST":c=_w(l)?new Sw(l).toString():l.toString();break;case"BYWEEKDAY":i="BYDAY",c=(t=l,Ew(t)?t:[t]).map((function(e){return e instanceof Sw?e:Ew(e)?new Sw(e[0],e[1]):new Sw(e)})).toString();break;case"DTSTART":r=Tk(l,e.tzid);break;case"UNTIL":c=Xw(l,!e.tzid);break;default:if(Ew(l)){for(var d=[],u=0;u<l.length;u++)d[u]=String(l[u]);c=d.toString()}else c=String(l)}c&&n.push([i,c])}}var f=n.map((function(e){var t=e[0],n=e[1];return"".concat(t,"=").concat(n.toString())})).join(";"),h="";return""!==f&&(h="RRULE:".concat(f)),[r,h].filter((function(e){return!!e})).join("\n")}function Tk(e,t){return e?"DTSTART"+new Nk(new Date(e),t).toString():""}function Ak(e,t){return Array.isArray(e)?!!Array.isArray(t)&&e.length===t.length&&e.every((function(e,n){return e.getTime()===t[n].getTime()})):e instanceof Date?t instanceof Date&&e.getTime()===t.getTime():e===t}var Rk=function(){function e(){this.all=!1,this.before=[],this.after=[],this.between=[]}return e.prototype._cacheAdd=function(e,t,n){t&&(t=t instanceof Date?Kw(t):Qw(t)),"all"===e?this.all=t:(n._value=t,this[e].push(n))},e.prototype._cacheGet=function(e,t){var n=!1,r=t?Object.keys(t):[],o=function(e){for(var n=0;n<r.length;n++){var o=r[n];if(!Ak(t[o],e[o]))return!0}return!1},a=this[e];if("all"===e)n=this.all;else if(Ew(a))for(var s=0;s<a.length;s++){var i=a[s];if(!r.length||!o(i)){n=i._value;break}}if(!n&&this.all){var l=new rk(e,t);for(s=0;s<this.all.length&&l.accept(this.all[s]);s++);n=l.getValue(),this._cacheAdd(e,n,t)}return Ew(n)?Qw(n):n instanceof Date?Kw(n):n},e}(),Mk=Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku([],Dw(1,31),!0),Dw(2,28),!0),Dw(3,31),!0),Dw(4,30),!0),Dw(5,31),!0),Dw(6,30),!0),Dw(7,31),!0),Dw(8,31),!0),Dw(9,30),!0),Dw(10,31),!0),Dw(11,30),!0),Dw(12,31),!0),Dw(1,7),!0),Ok=Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku([],Dw(1,31),!0),Dw(2,29),!0),Dw(3,31),!0),Dw(4,30),!0),Dw(5,31),!0),Dw(6,30),!0),Dw(7,31),!0),Dw(8,31),!0),Dw(9,30),!0),Dw(10,31),!0),Dw(11,30),!0),Dw(12,31),!0),Dw(1,7),!0),Ik=Nw(1,29),Pk=Nw(1,30),Lk=Nw(1,31),Fk=Nw(1,32),zk=Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku([],Fk,!0),Pk,!0),Fk,!0),Lk,!0),Fk,!0),Lk,!0),Fk,!0),Fk,!0),Lk,!0),Fk,!0),Lk,!0),Fk,!0),Fk.slice(0,7),!0),Hk=Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku([],Fk,!0),Ik,!0),Fk,!0),Lk,!0),Fk,!0),Lk,!0),Fk,!0),Fk,!0),Lk,!0),Fk,!0),Lk,!0),Fk,!0),Fk.slice(0,7),!0),Vk=Nw(-28,0),Bk=Nw(-29,0),Wk=Nw(-30,0),Uk=Nw(-31,0),$k=Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku([],Uk,!0),Bk,!0),Uk,!0),Wk,!0),Uk,!0),Wk,!0),Uk,!0),Uk,!0),Wk,!0),Uk,!0),Wk,!0),Uk,!0),Uk.slice(0,7),!0),Gk=Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku(Ku([],Uk,!0),Vk,!0),Uk,!0),Wk,!0),Uk,!0),Wk,!0),Uk,!0),Uk,!0),Wk,!0),Uk,!0),Wk,!0),Uk,!0),Uk.slice(0,7),!0),Yk=[0,31,60,91,121,152,182,213,244,274,305,335,366],qk=[0,31,59,90,120,151,181,212,243,273,304,334,365],Zk=function(){for(var e=[],t=0;t<55;t++)e=e.concat(Nw(7));return e}();var Kk=function(){function e(e){this.options=e}return e.prototype.rebuild=function(e,t){var n=this.options;if(e!==this.lastyear&&(this.yearinfo=function(e,t){var n,r,o=Pw(e,1,1),a=Vw(e)?366:365,s=Vw(e+1)?366:365,i=Uw(o),l=Yw(o),c=qu(qu({yearlen:a,nextyearlen:s,yearordinal:i,yearweekday:l},function(e){var t=Vw(e)?366:365,n=Pw(e,1,1),r=Yw(n);return 365===t?{mmask:Mk,mdaymask:Hk,nmdaymask:Gk,wdaymask:Zk.slice(r),mrange:qk}:{mmask:Ok,mdaymask:zk,nmdaymask:$k,wdaymask:Zk.slice(r),mrange:Yk}}(e)),{wnomask:null});if(Mw(t.byweekno))return c;c.wnomask=Dw(0,a+7);var d=n=Aw(7-l+t.wkst,7);d>=4?(d=0,r=c.yearlen+Aw(l-t.wkst,7)):r=a-d;for(var u=Math.floor(r/7),f=Aw(r,7),h=Math.floor(u+f/4),m=0;m<t.byweekno.length;m++){var p=t.byweekno[m];if(p<0&&(p+=h+1),p>0&&p<=h){var g=void 0;p>1?(g=d+7*(p-1),d!==n&&(g-=7-n)):g=d;for(var v=0;v<7&&(c.wnomask[g]=1,g++,c.wdaymask[g]!==t.wkst);v++);}}if(Iw(t.byweekno,1)&&(g=d+7*h,d!==n&&(g-=7-n),g<a))for(m=0;m<7&&(c.wnomask[g]=1,g+=1,c.wdaymask[g]!==t.wkst);m++);if(d){var y=void 0;if(Iw(t.byweekno,-1))y=-1;else{var b=Yw(Pw(e-1,1,1)),x=Aw(7-b.valueOf()+t.wkst,7),w=Vw(e-1)?366:365,k=void 0;x>=4?(x=0,k=w+Aw(b-t.wkst,7)):k=a-d,y=Math.floor(52+Aw(k,7)/4)}if(Iw(t.byweekno,y))for(g=0;g<d;g++)c.wnomask[g]=1}return c}(e,n)),Ow(n.bynweekday)&&(t!==this.lastmonth||e!==this.lastyear)){var r=this.yearinfo,o=r.yearlen,a=r.mrange,s=r.wdaymask;this.monthinfo=function(e,t,n,r,o,a){var s={lastyear:e,lastmonth:t,nwdaymask:[]},i=[];if(a.freq===iS.YEARLY)if(Mw(a.bymonth))i=[[0,n]];else for(var l=0;l<a.bymonth.length;l++)t=a.bymonth[l],i.push(r.slice(t-1,t+1));else a.freq===iS.MONTHLY&&(i=[r.slice(t-1,t+1)]);if(Mw(i))return s;for(s.nwdaymask=Dw(0,n),l=0;l<i.length;l++)for(var c=i[l],d=c[0],u=c[1]-1,f=0;f<a.bynweekday.length;f++){var h=void 0,m=a.bynweekday[f],p=m[0],g=m[1];g<0?(h=u+7*(g+1),h-=Aw(o[h]-p,7)):(h=d+7*(g-1),h+=Aw(7-o[h]+p,7)),d<=h&&h<=u&&(s.nwdaymask[h]=1)}return s}(e,t,o,a,s,n)}Cw(n.byeaster)&&(this.eastermask=function(e,t){void 0===t&&(t=0);var n=e%19,r=Math.floor(e/100),o=e%100,a=Math.floor(r/4),s=r%4,i=Math.floor((r+8)/25),l=Math.floor((r-i+1)/3),c=Math.floor(19*n+r-a-l+15)%30,d=Math.floor(o/4),u=o%4,f=Math.floor(32+2*s+2*d-c-u)%7,h=Math.floor((n+11*c+22*f)/451),m=Math.floor((c+f-7*h+114)/31),p=(c+f-7*h+114)%31+1,g=Date.UTC(e,m-1,p+t),v=Date.UTC(e,0,1);return[Math.ceil((g-v)/864e5)]}(e,n.byeaster))},Object.defineProperty(e.prototype,"lastyear",{get:function(){return this.monthinfo?this.monthinfo.lastyear:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastmonth",{get:function(){return this.monthinfo?this.monthinfo.lastmonth:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"yearlen",{get:function(){return this.yearinfo.yearlen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"yearordinal",{get:function(){return this.yearinfo.yearordinal},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mrange",{get:function(){return this.yearinfo.mrange},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"wdaymask",{get:function(){return this.yearinfo.wdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mmask",{get:function(){return this.yearinfo.mmask},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"wnomask",{get:function(){return this.yearinfo.wnomask},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nwdaymask",{get:function(){return this.monthinfo?this.monthinfo.nwdaymask:[]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextyearlen",{get:function(){return this.yearinfo.nextyearlen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mdaymask",{get:function(){return this.yearinfo.mdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nmdaymask",{get:function(){return this.yearinfo.nmdaymask},enumerable:!1,configurable:!0}),e.prototype.ydayset=function(){return[Nw(this.yearlen),0,this.yearlen]},e.prototype.mdayset=function(e,t){for(var n=this.mrange[t-1],r=this.mrange[t],o=Dw(null,this.yearlen),a=n;a<r;a++)o[a]=a;return[o,n,r]},e.prototype.wdayset=function(e,t,n){for(var r=Dw(null,this.yearlen+7),o=Uw(Pw(e,t,n))-this.yearordinal,a=o,s=0;s<7&&(r[o]=o,++o,this.wdaymask[o]!==this.options.wkst);s++);return[r,a,o]},e.prototype.ddayset=function(e,t,n){var r=Dw(null,this.yearlen),o=Uw(Pw(e,t,n))-this.yearordinal;return r[o]=o,[r,o,o+1]},e.prototype.htimeset=function(e,t,n,r){var o=this,a=[];return this.options.byminute.forEach((function(t){a=a.concat(o.mtimeset(e,t,n,r))})),Jw(a),a},e.prototype.mtimeset=function(e,t,n,r){var o=this.options.bysecond.map((function(n){return new bk(e,t,n,r)}));return Jw(o),o},e.prototype.stimeset=function(e,t,n,r){return[new bk(e,t,n,r)]},e.prototype.getdayset=function(e){switch(e){case fk.YEARLY:return this.ydayset.bind(this);case fk.MONTHLY:return this.mdayset.bind(this);case fk.WEEKLY:return this.wdayset.bind(this);case fk.DAILY:default:return this.ddayset.bind(this)}},e.prototype.gettimeset=function(e){switch(e){case fk.HOURLY:return this.htimeset.bind(this);case fk.MINUTELY:return this.mtimeset.bind(this);case fk.SECONDLY:return this.stimeset.bind(this)}},e}();const Qk=Kk;function Jk(e,t,n,r,o,a){for(var s=[],i=0;i<e.length;i++){var l=void 0,c=void 0,d=e[i];d<0?(l=Math.floor(d/t.length),c=Aw(d,t.length)):(l=Math.floor((d-1)/t.length),c=Aw(d-1,t.length));for(var u=[],f=n;f<r;f++){var h=a[f];Cw(h)&&u.push(h)}var m;m=l<0?u.slice(l)[0]:u[l];var p=t[c],g=$w(o.yearordinal+m),v=Zw(g,p);Iw(s,v)||s.push(v)}return Jw(s),s}function Xk(e,t){var n=t.dtstart,r=t.freq,o=t.interval,a=t.until,s=t.bysetpos,i=t.count;if(0===i||0===o)return nS(e);var l=xk.fromDate(n),c=new Qk(t);c.rebuild(l.year,l.month);for(var d=function(e,t,n){var r=n.freq,o=n.byhour,a=n.byminute,s=n.bysecond;return pk(r)?function(e){var t=e.dtstart.getTime()%1e3;if(!pk(e.freq))return[];var n=[];return e.byhour.forEach((function(r){e.byminute.forEach((function(o){e.bysecond.forEach((function(e){n.push(new bk(r,o,e,t))}))}))})),n}(n):r>=iS.HOURLY&&Ow(o)&&!Iw(o,t.hour)||r>=iS.MINUTELY&&Ow(a)&&!Iw(a,t.minute)||r>=iS.SECONDLY&&Ow(s)&&!Iw(s,t.second)?[]:e.gettimeset(r)(t.hour,t.minute,t.second,t.millisecond)}(c,l,t);;){var u=c.getdayset(r)(l.year,l.month,l.day),f=u[0],h=u[1],m=u[2],p=rS(f,h,m,c,t);if(Ow(s))for(var g=Jk(s,d,h,m,c,f),v=0;v<g.length;v++){var y=g[v];if(a&&y>a)return nS(e);if(y>=n){var b=tS(y,t);if(!e.accept(b))return nS(e);if(i&&! --i)return nS(e)}}else for(v=h;v<m;v++){var x=f[v];if(Cw(x))for(var w=$w(c.yearordinal+x),k=0;k<d.length;k++){var S=d[k];if(y=Zw(w,S),a&&y>a)return nS(e);if(y>=n){if(b=tS(y,t),!e.accept(b))return nS(e);if(i&&! --i)return nS(e)}}}if(0===t.interval)return nS(e);if(l.add(t,p),l.year>9999)return nS(e);pk(r)||(d=c.gettimeset(r)(l.hour,l.minute,l.second,0)),c.rebuild(l.year,l.month)}}function eS(e,t,n){var r=n.bymonth,o=n.byweekno,a=n.byweekday,s=n.byeaster,i=n.bymonthday,l=n.bynmonthday,c=n.byyearday;return Ow(r)&&!Iw(r,e.mmask[t])||Ow(o)&&!e.wnomask[t]||Ow(a)&&!Iw(a,e.wdaymask[t])||Ow(e.nwdaymask)&&!e.nwdaymask[t]||null!==s&&!Iw(e.eastermask,t)||(Ow(i)||Ow(l))&&!Iw(i,e.mdaymask[t])&&!Iw(l,e.nmdaymask[t])||Ow(c)&&(t<e.yearlen&&!Iw(c,t+1)&&!Iw(c,-e.yearlen+t)||t>=e.yearlen&&!Iw(c,t+1-e.yearlen)&&!Iw(c,-e.nextyearlen+t-e.yearlen))}function tS(e,t){return new Nk(e,t.tzid).rezonedDate()}function nS(e){return e.getValue()}function rS(e,t,n,r,o){for(var a=!1,s=t;s<n;s++){var i=e[s];(a=eS(r,i,o))&&(e[i]=null)}return a}var oS={MO:new Sw(0),TU:new Sw(1),WE:new Sw(2),TH:new Sw(3),FR:new Sw(4),SA:new Sw(5),SU:new Sw(6)},aS={freq:fk.YEARLY,dtstart:null,interval:1,wkst:oS.MO,count:null,until:null,tzid:null,bysetpos:null,bymonth:null,bymonthday:null,bynmonthday:null,byyearday:null,byweekno:null,byweekday:null,bynweekday:null,byhour:null,byminute:null,bysecond:null,byeaster:null},sS=Object.keys(aS),iS=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t=!1),this._cache=t?null:new Rk,this.origOptions=wk(e);var n=kk(e).parsedOptions;this.options=n}return e.parseText=function(e,t){return mk(e,t)},e.fromText=function(e,t){return gk(e,t)},e.fromString=function(t){return new e(e.parseString(t)||void 0)},e.prototype._iter=function(e){return Xk(e,this.options)},e.prototype._cacheGet=function(e,t){return!!this._cache&&this._cache._cacheGet(e,t)},e.prototype._cacheAdd=function(e,t,n){if(this._cache)return this._cache._cacheAdd(e,t,n)},e.prototype.all=function(e){if(e)return this._iter(new ak("all",{},e));var t=this._cacheGet("all");return!1===t&&(t=this._iter(new rk("all",{})),this._cacheAdd("all",t)),t},e.prototype.between=function(e,t,n,r){if(void 0===n&&(n=!1),!Ww(e)||!Ww(t))throw new Error("Invalid date passed in to RRule.between");var o={before:t,after:e,inc:n};if(r)return this._iter(new ak("between",o,r));var a=this._cacheGet("between",o);return!1===a&&(a=this._iter(new rk("between",o)),this._cacheAdd("between",a,o)),a},e.prototype.before=function(e,t){if(void 0===t&&(t=!1),!Ww(e))throw new Error("Invalid date passed in to RRule.before");var n={dt:e,inc:t},r=this._cacheGet("before",n);return!1===r&&(r=this._iter(new rk("before",n)),this._cacheAdd("before",r,n)),r},e.prototype.after=function(e,t){if(void 0===t&&(t=!1),!Ww(e))throw new Error("Invalid date passed in to RRule.after");var n={dt:e,inc:t},r=this._cacheGet("after",n);return!1===r&&(r=this._iter(new rk("after",n)),this._cacheAdd("after",r,n)),r},e.prototype.count=function(){return this.all().length},e.prototype.toString=function(){return Dk(this.origOptions)},e.prototype.toText=function(e,t,n){return function(e,t,n,r){return new uk(e,t,n,r).toString()}(this,e,t,n)},e.prototype.isFullyConvertibleToText=function(){return yk(this)},e.prototype.clone=function(){return new e(this.origOptions)},e.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],e.YEARLY=fk.YEARLY,e.MONTHLY=fk.MONTHLY,e.WEEKLY=fk.WEEKLY,e.DAILY=fk.DAILY,e.HOURLY=fk.HOURLY,e.MINUTELY=fk.MINUTELY,e.SECONDLY=fk.SECONDLY,e.MO=oS.MO,e.TU=oS.TU,e.WE=oS.WE,e.TH=oS.TH,e.FR=oS.FR,e.SA=oS.SA,e.SU=oS.SU,e.parseString=Sk,e.optionsToString=Dk,e}(),lS={dtstart:null,cache:!1,unfold:!1,forceset:!1,compatible:!1,tzid:null};function cS(e,t){return void 0===t&&(t={}),function(e,t){var n=function(e,t){var n=[],r=[],o=[],a=[],s=Ck(e),i=s.dtstart,l=s.tzid,c=function(e,t){if(void 0===t&&(t=!1),!(e=e&&e.trim()))throw new Error("Invalid empty string");if(!t)return e.split(/\s/);for(var n=e.split("\n"),r=0;r<n.length;){var o=n[r]=n[r].replace(/\s+$/g,"");o?r>0&&" "===o[0]?(n[r-1]+=o.slice(1),n.splice(r,1)):r+=1:n.splice(r,1)}return n}(e,t.unfold);return c.forEach((function(e){var t;if(e){var s=function(e){var t=function(e){if(-1===e.indexOf(":"))return{name:"RRULE",value:e};var t,n=(t=e.split(":")).slice(0,1).concat([t.slice(1).join(":")]);return{name:n[0],value:n[1]}}(e),n=t.name,r=t.value,o=n.split(";");if(!o)throw new Error("empty property name");return{name:o[0].toUpperCase(),parms:o.slice(1),value:r}}(e),i=s.name,c=s.parms,d=s.value;switch(i.toUpperCase()){case"RRULE":if(c.length)throw new Error("unsupported RRULE parm: ".concat(c.join(",")));n.push(Sk(e));break;case"RDATE":var u=(null!==(t=/RDATE(?:;TZID=([^:=]+))?/i.exec(e))&&void 0!==t?t:[])[1];u&&!l&&(l=u),r=r.concat(uS(d,c));break;case"EXRULE":if(c.length)throw new Error("unsupported EXRULE parm: ".concat(c.join(",")));o.push(Sk(d));break;case"EXDATE":a=a.concat(uS(d,c));break;case"DTSTART":break;default:throw new Error("unsupported property: "+i)}}})),{dtstart:i,tzid:l,rrulevals:n,rdatevals:r,exrulevals:o,exdatevals:a}}(e,t),r=n.rrulevals,o=n.rdatevals,a=n.exrulevals,s=n.exdatevals,i=n.dtstart,l=n.tzid,c=!1===t.cache;if(t.compatible&&(t.forceset=!0,t.unfold=!0),t.forceset||r.length>1||o.length||a.length||s.length){var d=new hS(c);return d.dtstart(i),d.tzid(l||void 0),r.forEach((function(e){d.rrule(new iS(dS(e,i,l),c))})),o.forEach((function(e){d.rdate(e)})),a.forEach((function(e){d.exrule(new iS(dS(e,i,l),c))})),s.forEach((function(e){d.exdate(e)})),t.compatible&&t.dtstart&&d.rdate(i),d}var u=r[0]||{};return new iS(dS(u,u.dtstart||t.dtstart||i,u.tzid||t.tzid||l),c)}(e,function(e){var t=[],n=Object.keys(e),r=Object.keys(lS);if(n.forEach((function(e){Iw(r,e)||t.push(e)})),t.length)throw new Error("Invalid options: "+t.join(", "));return qu(qu({},lS),e)}(t))}function dS(e,t,n){return qu(qu({},e),{dtstart:t,tzid:n})}function uS(e,t){return function(e){e.forEach((function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw new Error("unsupported RDATE/EXDATE parm: "+e)}))}(t),e.split(",").map((function(e){return ek(e)}))}function fS(e){var t=this;return function(n){if(void 0!==n&&(t["_".concat(e)]=n),void 0!==t["_".concat(e)])return t["_".concat(e)];for(var r=0;r<t._rrule.length;r++){var o=t._rrule[r].origOptions[e];if(o)return o}}}var hS=function(e){function t(t){void 0===t&&(t=!1);var n=e.call(this,{},t)||this;return n.dtstart=fS.apply(n,["dtstart"]),n.tzid=fS.apply(n,["tzid"]),n._rrule=[],n._rdate=[],n._exrule=[],n._exdate=[],n}return Yu(t,e),t.prototype._iter=function(e){return function(e,t,n,r,o,a){var s={},i=e.accept;function l(e,t){n.forEach((function(n){n.between(e,t,!0).forEach((function(e){s[Number(e)]=!0}))}))}o.forEach((function(e){var t=new Nk(e,a).rezonedDate();s[Number(t)]=!0})),e.accept=function(e){var t=Number(e);return isNaN(t)?i.call(this,e):!(!s[t]&&(l(new Date(t-1),new Date(t+1)),!s[t]))||(s[t]=!0,i.call(this,e))},"between"===e.method&&(l(e.args.after,e.args.before),e.accept=function(e){var t=Number(e);return!!s[t]||(s[t]=!0,i.call(this,e))});for(var c=0;c<r.length;c++){var d=new Nk(r[c],a).rezonedDate();if(!e.accept(new Date(d.getTime())))break}t.forEach((function(t){Xk(e,t.options)}));var u=e._result;switch(Jw(u),e.method){case"all":case"between":return u;case"before":return u.length&&u[u.length-1]||null;default:return u.length&&u[0]||null}}(e,this._rrule,this._exrule,this._rdate,this._exdate,this.tzid())},t.prototype.rrule=function(e){mS(e,this._rrule)},t.prototype.exrule=function(e){mS(e,this._exrule)},t.prototype.rdate=function(e){pS(e,this._rdate)},t.prototype.exdate=function(e){pS(e,this._exdate)},t.prototype.rrules=function(){return this._rrule.map((function(e){return cS(e.toString())}))},t.prototype.exrules=function(){return this._exrule.map((function(e){return cS(e.toString())}))},t.prototype.rdates=function(){return this._rdate.map((function(e){return new Date(e.getTime())}))},t.prototype.exdates=function(){return this._exdate.map((function(e){return new Date(e.getTime())}))},t.prototype.valueOf=function(){var e=[];return!this._rrule.length&&this._dtstart&&(e=e.concat(Dk({dtstart:this._dtstart}))),this._rrule.forEach((function(t){e=e.concat(t.toString().split("\n"))})),this._exrule.forEach((function(t){e=e.concat(t.toString().split("\n").map((function(e){return e.replace(/^RRULE:/,"EXRULE:")})).filter((function(e){return!/^DTSTART/.test(e)})))})),this._rdate.length&&e.push(gS("RDATE",this._rdate,this.tzid())),this._exdate.length&&e.push(gS("EXDATE",this._exdate,this.tzid())),e},t.prototype.toString=function(){return this.valueOf().join("\n")},t.prototype.clone=function(){var e=new t(!!this._cache);return this._rrule.forEach((function(t){return e.rrule(t.clone())})),this._exrule.forEach((function(t){return e.exrule(t.clone())})),this._rdate.forEach((function(t){return e.rdate(new Date(t.getTime()))})),this._exdate.forEach((function(t){return e.exdate(new Date(t.getTime()))})),e},t}(iS);function mS(e,t){if(!(e instanceof iS))throw new TypeError(String(e)+" is not RRule instance");Iw(t.map(String),String(e))||t.push(e)}function pS(e,t){if(!(e instanceof Date))throw new TypeError(String(e)+" is not Date instance");Iw(t.map(Number),Number(e))||(t.push(e),Jw(t))}function gS(e,t,n){var r=!n||"UTC"===n.toUpperCase(),o=r?"".concat(e,":"):"".concat(e,";TZID=").concat(n,":"),a=t.map((function(e){return Xw(e.valueOf(),r)})).join(",");return"".concat(o).concat(a)}function vS(){const{event:t}=Fl(),{settings:n}=Re(),r=(0,e.useRef)(null),[o]=je(),a=o.get("status")||"all",s=(0,e.useMemo)((()=>Array.isArray(n?.working_days)?n.working_days.map((e=>parseInt(e,10))):[0,1,2,3,4]),[n?.working_days]),[i,l]=(0,e.useState)([]);return(0,e.useEffect)((()=>{const e=t?.recurrence_overrides?Object.entries(t.recurrence_overrides).map((([e,t])=>({...t,timestamp:Number(e)}))):[],n="trash"===a,r=function(e=[],t="",n=[],r=[],o=null,a=!1){const s=new Date,i=[],l=[iS.MO,iS.TU,iS.WE,iS.TH,iS.FR,iS.SA,iS.SU];let c=0;for(let g=0;g<e.length;g++){const v=e[g],y=vs.fromISO(v.start_date,{zone:"utc"}),b=vs.fromISO(v.end_date,{zone:"utc"}),x=b.diff(y),w=new Date(y.year,y.month-1,y.day,y.hour,y.minute,y.second,y.millisecond),k=b.toUTC().toJSDate(),S=y.hour,C=y.minute;if(b.hour,b.minute,!w)continue;if(!k&&v.all_day&&(k=new Date(w),k.setHours(23,59,0,0)),!k)continue;const _="never"===v.ends;if("day"===v.frequency&&!0===v.working_days_only&&Array.isArray(r)&&r.length>0){const e=[],l=new Date(w),h=v.every||1;let m=0,p=0;for(;e.length<500;){const t=l.getDay();if(r.includes(t))if(0===m){if(e.push(new Date(l)),p++,m=h-1,"after"===v.ends&&p>=v.ends_after)break;if("on"===v.ends&&l>new Date(v.ends_on))break}else m--;l.setDate(l.getDate()+1)}for(let r=0;r<e.length;r++){var d,u,f;const l=e[r],h=vs.fromObject({year:null!==(d=l.getFullYear?.())&&void 0!==d?d:l.year,month:null!==(u=l.getMonth?.()+1)&&void 0!==u?u:l.month,day:null!==(f=l.getDate?.())&&void 0!==f?f:l.day,hour:S,minute:C},{zone:"utc"}),m=h.plus(x),p=Math.floor(h.toUTC().toSeconds()),g=n.find((e=>e.timestamp===p)),y=h<=s&&s<m,b=m<s;let w;if("trash"===g?.status){if(!a)continue;w="trash"}else w=y?"live":b?"completed":"upcoming";const k=o?.endsWith("/"),_=k||o?.includes("/event/"),j=o?_?`${o.replace(/\/$/,"")}/${p}`:`${o}?instance=${p}`:null;i.push({id:String(c++),title:g?.title||t||`Instance ${r+1}`,status:w,all_day:v.all_day||!1,start_date:h.toUTC().toISO({suppressMilliseconds:!1}),end_date:m.toUTC().toISO({suppressMilliseconds:!1}),modified_date:g?.modified_at||"",instance_url:j,override:g})}continue}let j;if("week"===v.frequency&&v.weekdays?.length&&(j=v.weekdays.map((e=>l[e]))),("month"===v.frequency||"year"===v.frequency)&&"weekday-of-month"===v.month_day_rule){const e=y.weekday-1,t=Math.ceil(y.day/7);j=[l[e].nth(t)]}const E={freq:"day"===v.frequency?iS.DAILY:"week"===v.frequency?iS.WEEKLY:"month"===v.frequency?iS.MONTHLY:iS.YEARLY,interval:v.every||1,dtstart:w,count:"after"===v.ends?v.ends_after:_?500:void 0,until:"on"===v.ends?new Date(v.ends_on):void 0,byweekday:j,bymonthday:"month"===v.frequency&&"day-of-month"===v.month_day_rule&&v.month_day_value?[v.month_day_value]:void 0,bymonth:"year"===v.frequency&&v.months?.length?v.months.map((e=>e+1)):void 0};try{const e=new iS(E).all();for(let r=0;r<e.length&&i.length<500;r++){var h,m,p;const l=e[r],d=vs.fromObject({year:null!==(h=l.getFullYear?.())&&void 0!==h?h:l.year,month:null!==(m=l.getMonth?.()+1)&&void 0!==m?m:l.month,day:null!==(p=l.getDate?.())&&void 0!==p?p:l.day,hour:S,minute:C},{zone:"utc"}),u=d.plus(x),f=Math.floor(d.toUTC().toSeconds()),g=n.find((e=>e.timestamp===f)),y=d<=s&&s<u,b=u<s;let w;if("trash"===g?.status){if(!a)continue;w="trash"}else w=y?"live":b?"completed":"upcoming";const k=o?.endsWith("/"),_=k||o?.includes("/event/"),j=o?_?`${o.replace(/\/$/,"")}/${f}`:`${o}?instance=${f}`:null;i.push({id:String(c++),title:t||`Instance ${r+1}`,status:w,all_day:v.all_day||!1,start_date:d.toUTC().toISO({suppressMilliseconds:!1}),end_date:u.toUTC().toISO({suppressMilliseconds:!1}),modified_date:g?.modified_at||"",instance_url:j,override:g})}}catch(e){console.error("Failed to generate recurring instances:",e)}}return a?i.filter((e=>"trash"===e.status)):i.filter((e=>"trash"!==e.status))}(t?.recurrence_rules,t?.title,e,s,t?.url,n);l(r)}),[t?.recurrence_rules,t?.title,t?.recurrence_overrides,s,t?.id,t?.url,a,o]),(0,e.useEffect)((()=>{r.current&&(r.current.style.height="auto",r.current.style.height=`${r.current.scrollHeight}px`)}),[t?.title]),console.log(i),(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)(ol,{className:"mb-8"}),(0,De.jsx)("div",{className:"flex flex-col w-full gap-8 pointer-events-none opacity-50 select-none",children:(0,De.jsxs)(Bi,{container:!0,children:[(0,De.jsx)(xw,{className:"flex gap-2 p-0",children:(0,De.jsx)("div",{className:"relative flex items-center gap-2",children:(0,De.jsx)(ww,{ref:r,id:"event-name-readonly",className:Ni("inline-flex flex-1 resize-none overflow-hidden bg-transparent border-2 border-transparent rounded-md p-2 font-medium text-2xl leading-tight min-h-0 w-auto max-w-full","text-foreground","shadow-none ring-0 focus:ring-0 focus-visible:ring-0","outline-none focus:outline-none focus-visible:outline-none","focus-visible:ring-offset-0 focus-visible:ring-transparent focus-visible:ring-offset-transparent","cursor-default select-none",!t?.title&&"text-muted-foreground"),value:t?.title||"",readOnly:!0,rows:1})})}),(0,De.jsx)(bw,{instances:i,isLoading:!1,eventId:t?.id,timezone:t?.timezone,status:a})]})})]})}function yS({isInstance:t=!1,value:n,onChange:r}){const{event:o,setEvent:a}=Fl(),s=t?null:o,i=t?null:a,l=(0,e.useRef)(),c=`event-description-${(0,e.useId)()}`,[d,u]=(0,e.useState)(!1),[f,h]=(0,e.useState)(n||s?.description||"");return(0,e.useEffect)((()=>{if(!window.tinymce||!l.current||d)return;const e=window.tinymce.get(c);return e&&e.remove(),window.tinymce.init({target:l.current,height:250,menubar:!1,branding:!1,plugins:"lists link wordpress",toolbar:"undo redo | heading1 heading2 heading3 heading4 | bold italic underline | bullist numlist | link | removeformat | htmlToggle",block_formats:"Paragraph=p; Heading 1=h1; Heading 2=h2; Heading 3=h3; Heading 4=h4",content_style:"\n        body {\n          padding: 2px 14px;\n          font-family: Inter, system-ui, sans-serif;\n          font-size: 14px;\n          line-height: 1.6;\n          color: #1f2937;\n          background: transparent;\n        }\n      ",setup:e=>{[{id:"heading1",label:"H1",block:"h1"},{id:"heading2",label:"H2",block:"h2"},{id:"heading3",label:"H3",block:"h3"},{id:"heading4",label:"H4",block:"h4"}].forEach((({id:t,label:n,block:r})=>{e.addButton(t,{text:n,tooltip:`Heading ${n}`,onclick:()=>e.execCommand("FormatBlock",!1,r),onPostRender(){const t=this;e.on("NodeChange",(()=>{t.active(e.formatter.match(r))}))}})})),e.addButton("htmlToggle",{text:"Switch to Code Editor",tooltip:"Toggle HTML view",onclick:()=>{const t=e.getContent({format:"html"});h(t),u(!0),e.remove()}}),e.on("Change Input Undo Redo",(()=>{const n=e.getContent();t&&r?r(n):i?.((e=>({...e,description:n})))})),e.on("init",(()=>{e.setContent(f||"")}))}}),()=>{const e=window.tinymce?.get(c);e&&e.remove()}}),[d,c]),(0,e.useEffect)((()=>{h(n||s?.description||"")}),[n,s?.description]),(0,De.jsxs)(xw,{className:"p-0",children:[(0,De.jsx)(dy,{htmlFor:c,children:"Event description"}),(0,De.jsx)("div",{className:"text-muted-foreground mb-2",children:"Tell people what your event is about."}),d?(0,De.jsxs)("div",{className:"mb-2 border border-input rounded-md",children:[(0,De.jsx)("div",{className:"mce-toolbar-grp mce-container mce-panel mce-first mce-last flex justify-end py-[4px] shadow-[0_1px_2px_rgba(0,0,0,0.04)]",children:(0,De.jsx)("button",{type:"button",onClick:()=>u(!1),className:"mx-[8px] px-[6px] py-[4px] mce-btn mce-btn-has-text text-sm border-none bg-transparent cursor-pointer hover:bg-[#e5e7eb] text-[#374151]",children:(0,De.jsx)("span",{className:"mce-txt",children:"Switch to Visual Editor"})})}),(0,De.jsx)("textarea",{className:"w-full min-h-[250px] rounded-md border-0 bg-background p-2 text-sm font-mono focus:outline-none focus:shadow-none",value:f,onChange:e=>h(e.target.value),onBlur:e=>{t&&r?r(e.target.value):i?.((t=>({...t,description:e.target.value})))}})]}):(0,De.jsx)("textarea",{id:c,ref:l,defaultValue:f,className:"w-full min-h-[250px] rounded-md border border-input bg-background p-2 text-sm"})]})}const bS=window.wp.mediaUtils,xS=Mi("Repeat2",[["path",{d:"m2 9 3-3 3 3",key:"1ltn5i"}],["path",{d:"M13 18H7a2 2 0 0 1-2-2V6",key:"1r6tfw"}],["path",{d:"m22 15-3 3-3-3",key:"4rnwn2"}],["path",{d:"M11 6h6a2 2 0 0 1 2 2v10",key:"2f72bc"}]]),wS=["image"];function kS({isInstance:t=!1,value:n,onChange:r}){const{event:o,setEvent:a}=Fl(),[s,i]=(0,e.useState)(!1),[l,c]=(0,e.useState)(!1),[d,u]=(0,e.useState)(""),[f,h]=(0,e.useState)(!1),[m,p]=(0,e.useState)(0),g=t?n?.image:o?.image,v=t?n?.image_id:o?.image_id,y=(e,n)=>{t&&r?r({image:e,image_id:n}):a((t=>({...t,image:e,image_id:n})))},b=async e=>{e?.preventDefault(),e?.stopPropagation(),i(!0),y("",""),i(!1)},x=async({file:e=null,url:n=null,attachment_id:r=null})=>{i(!0);try{let a={path:`${eventkoi_params.api}/upload_image`,method:"POST"};if(e){const n=new FormData;n.append("uploadedfile",e),n.append("post_id",o.id),n.append("set_thumbnail",t?"0":"1"),a.body=n,a.headers={"EVENTKOI-API-KEY":eventkoi_params.api_key}}else a.body=JSON.stringify({post_id:o.id,set_thumbnail:!t,...n&&{url:n},...r&&{attachment_id:r}}),a.headers={"EVENTKOI-API-KEY":eventkoi_params.api_key,"Content-Type":"application/json"};const s=await Ne()(a);s.id&&s.url?y(s.url,s.id):vp("Upload failed. Please try again.")}catch(e){vp("Upload failed. Please try again.")}finally{i(!1),u(""),c(!1)}},w=()=>{d&&d.startsWith("http")?x({url:d}):vp("Please enter a valid image URL.")},k=e=>{e.preventDefault(),e.stopPropagation(),p((e=>e+1)),h(!0)},S=e=>{e.preventDefault(),e.stopPropagation(),p((e=>{const t=e-1;return t<=0?(h(!1),0):t}))},C=e=>{var t;e.preventDefault(),e.stopPropagation(),p(0),h(!1),t=e.dataTransfer.files,t?.length&&x({file:t[0]})};return(0,De.jsxs)(xw,{className:"p-0",children:[(0,De.jsx)(dy,{htmlFor:"image",children:"Header banner image"}),(0,De.jsx)("div",{className:"text-muted-foreground",children:"Ideal size: 1600px × 600px"}),(0,De.jsx)(bS.MediaUpload,{title:"Select event image",onSelect:e=>x({attachment_id:e.id,url:e.url}),allowedTypes:wS,value:v,disabled:s,render:({open:e})=>(0,De.jsxs)("div",{className:Ni("relative group rounded overflow-hidden transition",g?"p-0":"bg-secondary hover:border-muted-foreground/60 p-8 flex flex-col items-center justify-center gap-4 cursor-pointer"),onClick:()=>{s||l||g||e()},onDragEnter:k,onDragOver:e=>e.preventDefault(),onDragLeave:S,onDrop:C,children:[f&&(0,De.jsx)("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-background/70 text-xl font-semibold text-primary rounded-2xl",children:"Drop to upload"}),s&&(0,De.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-background/60 rounded-2xl",children:(0,De.jsx)(yp,{className:"w-8 h-8 animate-spin",strokeWidth:1.5})}),l?(0,De.jsx)(CS,{urlInput:d,setUrlInput:u,onSubmit:w,onCancel:()=>{c(!1),u("")},uploading:s}):g?(0,De.jsx)(_S,{imageUrl:g,openMediaLibrary:e,deleteImage:b}):(0,De.jsx)(SS,{onUrlMode:()=>c(!0)})]})})]})}function SS({onUrlMode:e}){return(0,De.jsxs)("div",{className:"flex flex-col items-center justify-center gap-3 text-center",children:[(0,De.jsx)(Dl,{className:"w-10 h-10 text-muted-foreground",strokeWidth:1.2}),(0,De.jsx)("div",{className:"text-lg font-semibold",children:"Drag and drop an image"}),(0,De.jsx)("div",{className:"text-sm text-muted-foreground",children:"or click to upload from your media library"}),(0,De.jsxs)(tl,{variant:"link",size:"sm",className:"text-xs mt-2",onClick:t=>{t.stopPropagation(),e()},children:[(0,De.jsx)(El,{className:"w-3 h-3 mr-1"}),"Paste image URL instead"]})]})}function CS({urlInput:e,setUrlInput:t,onSubmit:n,onCancel:r,uploading:o}){return(0,De.jsxs)("div",{className:"flex flex-col items-center justify-center w-full gap-4 text-center p-4",children:[(0,De.jsx)(El,{className:"w-8 h-8 mx-auto text-muted-foreground",strokeWidth:1.2}),(0,De.jsx)("div",{className:"text-lg font-semibold",children:"Paste an image URL"}),(0,De.jsx)("div",{className:"text-sm text-muted-foreground",children:"Enter a direct link to an image (https://...)"}),(0,De.jsx)(Uv,{type:"url",placeholder:"https://example.com/banner.jpg",value:e,onChange:e=>t(e.target.value),className:"w-full",disabled:o,onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),n())}}),(0,De.jsxs)("div",{className:"flex gap-2",children:[(0,De.jsx)(tl,{size:"sm",variant:"default",onClick:n,disabled:o,children:"Set Image"}),(0,De.jsx)(tl,{size:"sm",variant:"outline",onClick:r,disabled:o,children:"Cancel"})]})]})}function _S({imageUrl:e,openMediaLibrary:t,deleteImage:n}){return(0,De.jsxs)("div",{className:"relative w-full h-auto group",children:[(0,De.jsx)("img",{src:e,alt:"",className:"w-full h-auto rounded-2xl object-cover transition duration-300 group-hover:opacity-80"}),(0,De.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-black/60 opacity-0 group-hover:opacity-100 transition-opacity duration-300 rounded-2xl",children:(0,De.jsxs)("div",{className:"flex flex-col sm:flex-row gap-3",children:[(0,De.jsxs)(tl,{variant:"secondary",size:"sm",className:"bg-white/20 text-white hover:bg-white/30",onClick:e=>{e.preventDefault(),e.stopPropagation(),t()},children:[(0,De.jsx)(xS,{className:"w-4 h-4 mr-1"}),"Replace"]}),(0,De.jsxs)(tl,{variant:"destructive",size:"sm",className:"bg-red-500/80 hover:bg-red-600 text-white",onClick:e=>{e.preventDefault(),e.stopPropagation(),n()},children:[(0,De.jsx)(gw,{className:"w-4 h-4 mr-1"}),"Delete"]})]})})]})}const jS=Mi("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),ES=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)("div",{ref:n,className:Ni("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t})));ES.displayName="Card";const NS=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)("div",{ref:n,className:Ni("flex flex-col space-y-1.5 p-6",e),...t})));NS.displayName="CardHeader";const DS=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)("h3",{ref:n,className:Ni("text-2xl font-semibold leading-none tracking-tight",e),...t})));DS.displayName="CardTitle",e.forwardRef((({className:e,...t},n)=>(0,De.jsx)("p",{ref:n,className:Ni("text-sm text-muted-foreground",e),...t}))).displayName="CardDescription";const TS=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)("div",{ref:n,className:Ni("p-6 pt-0",e),...t})));function AS({location:e,onChange:t}){return(0,De.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,De.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,De.jsx)(dy,{htmlFor:`name-${e.id}`,children:"Location name (optional)"}),(0,De.jsx)(Uv,{id:`name-${e.id}`,value:e.name,placeholder:"e.g., Zoom, Google Meet, or Webinar Host",onChange:e=>t({name:e.target.value})}),(0,De.jsx)("p",{className:"text-muted-foreground text-sm",children:"Give your location a name to help attendees identify it more easily."})]}),(0,De.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,De.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,De.jsx)(dy,{htmlFor:`link_text-${e.id}`,children:"Event link text"}),(0,De.jsx)(Uv,{id:`link_text-${e.id}`,value:e.link_text,placeholder:"e.g., Join on Zoom",onChange:e=>t({link_text:e.target.value})})]}),(0,De.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,De.jsx)(dy,{htmlFor:`virtual_url-${e.id}`,children:"Event URL"}),(0,De.jsx)(Uv,{id:`virtual_url-${e.id}`,type:"url",placeholder:"https://",value:e.virtual_url,onChange:e=>t({virtual_url:e.target.value})})]})]})]})}TS.displayName="CardContent",e.forwardRef((({className:e,...t},n)=>(0,De.jsx)("div",{ref:n,className:Ni("flex items-center p-6 pt-0",e),...t}))).displayName="CardFooter";const RS=Xi("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),MS=e.forwardRef((({className:e,variant:t,...n},r)=>(0,De.jsx)("div",{ref:r,role:"alert",className:Ni(RS({variant:t}),e),...n})));MS.displayName="Alert",e.forwardRef((({className:e,...t},n)=>(0,De.jsx)("h5",{ref:n,className:Ni("mb-1 font-medium leading-none tracking-tight",e),...t}))).displayName="AlertTitle";const OS=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)("div",{ref:n,className:Ni("text-sm [&_p]:leading-relaxed",e),...t})));OS.displayName="AlertDescription";const IS=Mi("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var PS=o(17);function LS(){return LS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},LS.apply(null,arguments)}function FS(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}function zS(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}const HS="NOT_LOADED",VS="LOADED",BS="AUTH_FAILURE";class WS{static async load(e,t){var n;const r=e.libraries?e.libraries.split(","):[],o=this.serializeParams(e);this.listeners.push(t),null!=(n=window.google)&&null!=(n=n.maps)&&n.importLibrary?(this.serializedApiParams||(this.loadingStatus=VS),this.notifyLoadingStatusListeners()):(this.serializedApiParams=o,this.initImportLibrary(e)),this.serializedApiParams&&this.serializedApiParams!==o&&console.warn("[google-maps-api-loader] The maps API has already been loaded with different parameters and will not be loaded again. Refresh the page for new values to have effect.");const a=["maps",...r];await Promise.all(a.map((e=>google.maps.importLibrary(e))))}static serializeParams(e){return[e.v,e.key,e.language,e.region,e.authReferrerPolicy,e.solutionChannel].join("/")}static initImportLibrary(e){if(window.google||(window.google={}),window.google.maps||(window.google.maps={}),window.google.maps.importLibrary)return void console.error("[google-maps-api-loader-internal]: initImportLibrary must only be called once");let t=null;const n=()=>t||(t=new Promise(((t,n)=>{var r;const o=document.createElement("script"),a=new URLSearchParams;for(const[t,n]of Object.entries(e)){const e=t.replace(/[A-Z]/g,(e=>"_"+e[0].toLowerCase()));a.set(e,String(n))}a.set("loading","async"),a.set("callback","__googleMapsCallback__"),o.async=!0,o.src="https://maps.googleapis.com/maps/api/js?"+a.toString(),o.nonce=(null==(r=document.querySelector("script[nonce]"))?void 0:r.nonce)||"",o.onerror=()=>{this.loadingStatus="FAILED",this.notifyLoadingStatusListeners(),n(new Error("The Google Maps JavaScript API could not load."))},window.__googleMapsCallback__=()=>{this.loadingStatus=VS,this.notifyLoadingStatusListeners(),t()},window.gm_authFailure=()=>{this.loadingStatus=BS,this.notifyLoadingStatusListeners()},this.loadingStatus="LOADING",this.notifyLoadingStatusListeners(),document.head.append(o)})),t);google.maps.importLibrary=e=>n().then((()=>google.maps.importLibrary(e)))}static notifyLoadingStatusListeners(){for(const e of this.listeners)e(this.loadingStatus)}}WS.loadingStatus=HS,WS.serializedApiParams=void 0,WS.listeners=[];const US=["onLoad","onError","apiKey","version","libraries"],$S=["children"],GS=e.createContext(null),YS=t=>{const{children:n}=t,r=FS(t,$S),{mapInstances:o,addMapInstance:a,removeMapInstance:s,clearMapInstances:i}=function(){const[t,n]=(0,e.useState)({});return{mapInstances:t,addMapInstance:(e,t="default")=>{n((n=>LS({},n,{[t]:e})))},removeMapInstance:(e="default")=>{n((t=>FS(t,[e].map(zS))))},clearMapInstances:()=>{n({})}}}(),{status:l,loadedLibraries:c,importLibrary:d}=function(t){const{onLoad:n,onError:r,apiKey:o,version:a,libraries:s=[]}=t,i=FS(t,US),[l,c]=(0,e.useState)(WS.loadingStatus),[d,u]=(0,e.useReducer)(((e,t)=>e[t.name]?e:LS({},e,{[t.name]:t.value})),{}),f=(0,e.useMemo)((()=>null==s?void 0:s.join(",")),[s]),h=(0,e.useMemo)((()=>JSON.stringify(LS({apiKey:o,version:a},i))),[o,a,i]),m=(0,e.useCallback)((async e=>{var t;if(d[e])return d[e];if(null==(t=google)||null==(t=t.maps)||!t.importLibrary)throw new Error("[api-provider-internal] importLibrary was called before google.maps.importLibrary was defined.");const n=await window.google.maps.importLibrary(e);return u({name:e,value:n}),n}),[d]);return(0,e.useEffect)((()=>{(async()=>{try{const e=LS({key:o},i);a&&(e.v=a),(null==f?void 0:f.length)>0&&(e.libraries=f),(void 0===e.channel||e.channel<0||e.channel>999)&&delete e.channel,void 0===e.solutionChannel?e.solutionChannel="GMP_visgl_rgmlibrary_v1_default":""===e.solutionChannel&&delete e.solutionChannel,await WS.load(e,(e=>c(e)));for(const e of["core","maps",...s])await m(e);n&&n()}catch(e){r?r(e):console.error("<ApiProvider> failed to load the Google Maps JavaScript API",e)}})()}),[o,f,h]),{status:l,loadedLibraries:d,importLibrary:m}}(r),u=(0,e.useMemo)((()=>({mapInstances:o,addMapInstance:a,removeMapInstance:s,clearMapInstances:i,status:l,loadedLibraries:c,importLibrary:d})),[o,a,s,i,l,c,d]);return e.createElement(GS.Provider,{value:u},n)};function qS(e,t,n){const r={type:e,map:t,detail:{},stoppable:!1,stop:()=>{}};if(KS.includes(e)){const e=r,n=t.getCenter(),o=t.getZoom(),a=t.getHeading()||0,s=t.getTilt()||0,i=t.getBounds();return n&&i&&Number.isFinite(o)||console.warn("[createEvent] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"),e.detail={center:(null==n?void 0:n.toJSON())||{lat:0,lng:0},zoom:o||0,heading:a,tilt:s,bounds:(null==i?void 0:i.toJSON())||{north:90,east:180,south:-90,west:-180}},e}if(QS.includes(e)){var o;if(!n)throw new Error("[createEvent] mouse events must provide a srcEvent");const e=r;return e.domEvent=n.domEvent,e.stoppable=!0,e.stop=()=>n.stop(),e.detail={latLng:(null==(o=n.latLng)?void 0:o.toJSON())||null,placeId:n.placeId},e}return r}const ZS={onBoundsChanged:"bounds_changed",onCenterChanged:"center_changed",onClick:"click",onContextmenu:"contextmenu",onDblclick:"dblclick",onDrag:"drag",onDragend:"dragend",onDragstart:"dragstart",onHeadingChanged:"heading_changed",onIdle:"idle",onIsFractionalZoomEnabledChanged:"isfractionalzoomenabled_changed",onMapCapabilitiesChanged:"mapcapabilities_changed",onMapTypeIdChanged:"maptypeid_changed",onMousemove:"mousemove",onMouseout:"mouseout",onMouseover:"mouseover",onProjectionChanged:"projection_changed",onRenderingTypeChanged:"renderingtype_changed",onTilesLoaded:"tilesloaded",onTiltChanged:"tilt_changed",onZoomChanged:"zoom_changed",onCameraChanged:"bounds_changed"},KS=["bounds_changed","center_changed","heading_changed","tilt_changed","zoom_changed"],QS=["click","contextmenu","dblclick","mousemove","mouseout","mouseover"],JS=Object.keys(ZS);const XS=new Set(["backgroundColor","clickableIcons","controlSize","disableDefaultUI","disableDoubleClickZoom","draggable","draggableCursor","draggingCursor","fullscreenControl","fullscreenControlOptions","gestureHandling","headingInteractionEnabled","isFractionalZoomEnabled","keyboardShortcuts","mapTypeControl","mapTypeControlOptions","mapTypeId","maxZoom","minZoom","noClear","panControl","panControlOptions","restriction","rotateControl","rotateControlOptions","scaleControl","scaleControlOptions","scrollwheel","streetView","streetViewControl","streetViewControlOptions","styles","tiltInteractionEnabled","zoomControl","zoomControlOptions"]);function eC(){var t;return(null==(t=(0,e.useContext)(GS))?void 0:t.status)||HS}function tC(e){return function(e){return!(!e||"object"!=typeof e)&&"lat"in e&&"lng"in e&&Number.isFinite(e.lat)&&Number.isFinite(e.lng)}(e)?e:e.toJSON()}const nC=()=>e.createElement("div",{style:{position:"absolute",top:0,left:0,bottom:0,right:0,zIndex:999,display:"flex",flexFlow:"column nowrap",textAlign:"center",justifyContent:"center",fontSize:".8rem",color:"rgba(0,0,0,0.6)",background:"#dddddd",padding:"1rem 1.5rem"}},e.createElement("h2",null,"Error: AuthFailure"),e.createElement("p",null,"A problem with your API key prevents the map from rendering correctly. Please make sure the value of the ",e.createElement("code",null,"APIProvider.apiKey")," prop is correct. Check the error-message in the console for further details."));function rC(){return eC()===VS}const oC=["id","defaultBounds","defaultCenter","defaultZoom","defaultHeading","defaultTilt","reuseMaps","renderingType","colorScheme"],aC=["padding"];class sC{static has(e){return this.entries[e]&&this.entries[e].length>0}static pop(e){return this.entries[e]&&this.entries[e].pop()||null}static push(e,t){this.entries[e]||(this.entries[e]=[]),this.entries[e].push(t)}}function iC(t,n){const r=rC(),[o,a]=(0,e.useState)(null),[s,i]=function(){const[t,n]=(0,e.useState)(null);return[t,(0,e.useCallback)((e=>n(e)),[n])]}(),l=function(t){const n=function(){const[,t]=(0,e.useReducer)((e=>e+1),0);return t}(),r=(0,e.useRef)({center:{lat:0,lng:0},heading:0,tilt:0,zoom:0});return(0,e.useEffect)((()=>{if(!t)return;const e=google.maps.event.addListener(t,"bounds_changed",(()=>{!function(e,t){const n=e.getCenter(),r=e.getZoom(),o=e.getHeading()||0,a=e.getTilt()||0,s=e.getBounds();n&&s&&Number.isFinite(r)||console.warn("[useTrackedCameraState] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"),Object.assign(t.current,{center:(null==n?void 0:n.toJSON())||{lat:0,lng:0},zoom:r||0,heading:o,tilt:a})}(t,r),n()}));return()=>e.remove()}),[t,n]),r}(o),{id:c,defaultBounds:d,defaultCenter:u,defaultZoom:f,defaultHeading:h,defaultTilt:m,reuseMaps:p,renderingType:g,colorScheme:v}=t,y=FS(t,oC),b=void 0!==t.zoom||void 0!==t.defaultZoom,x=void 0!==t.center||void 0!==t.defaultCenter;d||b&&x||console.warn("<Map> component is missing configuration. You have to provide zoom and center (via the `zoom`/`defaultZoom` and `center`/`defaultCenter` props) or specify the region to show using `defaultBounds`. See https://visgl.github.io/react-google-maps/docs/api-reference/components/map#required"),!y.center&&u&&(y.center=u),!y.zoom&&Number.isFinite(f)&&(y.zoom=f),!y.heading&&Number.isFinite(h)&&(y.heading=h),!y.tilt&&Number.isFinite(m)&&(y.tilt=m);for(const e of Object.keys(y))void 0===y[e]&&delete y[e];const w=(0,e.useRef)(void 0);return(0,e.useEffect)((()=>{if(!s||!r)return;const{addMapInstance:e,removeMapInstance:o}=n,{mapId:i}=t,u=`${i||"default"}:${g||"default"}:${v||"LIGHT"}`;let f,h;if(p&&sC.has(u)?(h=sC.pop(u),f=h.getDiv(),s.appendChild(f),h.setOptions(y),setTimeout((()=>h.setCenter(h.getCenter())),0)):(f=document.createElement("div"),f.style.height="100%",s.appendChild(f),h=new google.maps.Map(f,LS({},y,g?{renderingType:g}:{},v?{colorScheme:v}:{}))),a(h),e(h,c),d){const{padding:e}=d,t=FS(d,aC);h.fitBounds(t,e)}else b&&x||h.fitBounds({east:180,west:-180,south:-90,north:90});if(w.current){const{mapId:e,cameraState:t}=w.current;e!==i&&h.setOptions(t)}return()=>{w.current={mapId:i,cameraState:l.current},f.remove(),p?sC.push(u,h):google.maps.event.clearInstanceListeners(h),a(null),o(c)}}),[s,r,c,t.mapId,t.renderingType,t.colorScheme]),[o,i,l]}sC.entries={};const lC=e.createContext(null);(t=>{const{children:n,id:r,className:o,style:a}=t,s=(0,e.useContext)(GS),i=eC();if(!s)throw new Error("<Map> can only be used inside an <ApiProvider> component.");const[l,c,d]=iC(t,s);!function(t,n,r){const o=r.center?tC(r.center):null;let a=null,s=null;o&&Number.isFinite(o.lat)&&Number.isFinite(o.lng)&&(a=o.lat,s=o.lng);const i=Number.isFinite(r.zoom)?r.zoom:null,l=Number.isFinite(r.heading)?r.heading:null,c=Number.isFinite(r.tilt)?r.tilt:null;(0,e.useLayoutEffect)((()=>{if(!t)return;const e={};let r=!1;null===a||null===s||n.current.center.lat===a&&n.current.center.lng===s||(e.center={lat:a,lng:s},r=!0),null!==i&&n.current.zoom!==i&&(e.zoom=i,r=!0),null!==l&&n.current.heading!==l&&(e.heading=l,r=!0),null!==c&&n.current.tilt!==c&&(e.tilt=c,r=!0),r&&t.moveCamera(e)}))}(l,d,t),function(t,n){for(const r of JS){const o=n[r],a=ZS[r];(0,e.useEffect)((()=>{if(!t)return;if(!o)return;const e=google.maps.event.addListener(t,a,(e=>{o(qS(a,t,e))}));return()=>e.remove()}),[t,a,o])}}(l,t),function(t,n){const r={},o=Object.keys(n);for(const e of o)XS.has(e)&&(r[e]=n[e]);!function(t,n){const r=(0,e.useRef)(void 0);r.current&&PS(n,r.current)||(r.current=n),(0,e.useEffect)(t,r.current)}((()=>{t&&t.setOptions(r)}),[r])}(l,t);const u=function(t,n){const{viewport:r,viewState:o}=n,a=!!r;return(0,e.useLayoutEffect)((()=>{if(!t||!o)return;const{latitude:e,longitude:n,bearing:r,pitch:a,zoom:s}=o;t.moveCamera({center:{lat:e,lng:n},heading:r,tilt:a,zoom:s+1})}),[t,o]),a}(l,t),f=!!t.controlled;(0,e.useEffect)((()=>{if(l)return u&&l.setOptions({disableDefaultUI:!0}),(u||f)&&l.setOptions({gestureHandling:"none",keyboardShortcuts:!1}),()=>{l.setOptions({gestureHandling:t.gestureHandling,keyboardShortcuts:t.keyboardShortcuts})}}),[l,u,f,t.gestureHandling,t.keyboardShortcuts]);const h=t.center?tC(t.center):null;let m=null,p=null;h&&Number.isFinite(h.lat)&&Number.isFinite(h.lng)&&(m=h.lat,p=h.lng);const g=(0,e.useMemo)((()=>{var e,n,r,o,a;return{center:{lat:null!=(e=m)?e:0,lng:null!=(n=p)?n:0},zoom:null!=(r=t.zoom)?r:0,heading:null!=(o=t.heading)?o:0,tilt:null!=(a=t.tilt)?a:0}}),[m,p,t.zoom,t.heading,t.tilt]);(0,e.useLayoutEffect)((()=>{if(!l||!f)return;l.moveCamera(g);const e=l.addListener("bounds_changed",(()=>{l.moveCamera(g)}));return()=>e.remove()}),[l,f,g]);const v=(0,e.useMemo)((()=>LS({width:"100%",height:"100%",position:"relative",zIndex:u?-1:0},a)),[a,u]),y=(0,e.useMemo)((()=>({map:l})),[l]);return i===BS?e.createElement("div",{style:LS({position:"relative"},o?{}:v),className:o},e.createElement(nC,null)):e.createElement("div",LS({ref:c,"data-testid":"map",style:o?void 0:v,className:o},r?{id:r}:{}),l?e.createElement(lC.Provider,{value:y},n):null)}).deckGLViewProps=!0;const cC=new Set;const dC=(t=null)=>{const n=(0,e.useContext)(GS),{map:r}=(0,e.useContext)(lC)||{};if(null===n)return function(...e){const t=JSON.stringify(e);cC.has(t)||(cC.add(t),console.error(...e))}("useMap(): failed to retrieve APIProviderContext. Make sure that the <APIProvider> component exists and that the component you are calling `useMap()` from is a sibling of the <APIProvider>."),null;const{mapInstances:o}=n;return null!==t?o[t]||null:r||o.default||null};function uC(t){const n=rC(),r=(0,e.useContext)(GS);return(0,e.useEffect)((()=>{n&&r&&r.importLibrary(t)}),[n,r,t]),(null==r?void 0:r.loadedLibraries[t])||null}function fC(t,n,r){(0,e.useEffect)((()=>{if(!t||!n||!r)return;const e=google.maps.event.addListener(t,n,r);return()=>e.remove()}),[t,n,r])}function hC(t,n,r){(0,e.useEffect)((()=>{t&&(t[n]=r)}),[t,n,r])}function mC(t,n,r){(0,e.useEffect)((()=>{if(t&&n&&r)return t.addEventListener(n,r),()=>t.removeEventListener(n,r)}),[t,n,r])}const pC=e.createContext(null),gC={TOP_LEFT:["0%","0%"],TOP_CENTER:["50%","0%"],TOP:["50%","0%"],TOP_RIGHT:["100%","0%"],LEFT_CENTER:["0%","50%"],LEFT_TOP:["0%","0%"],LEFT:["0%","50%"],LEFT_BOTTOM:["0%","100%"],RIGHT_TOP:["100%","0%"],RIGHT:["100%","50%"],RIGHT_CENTER:["100%","50%"],RIGHT_BOTTOM:["100%","100%"],BOTTOM_LEFT:["0%","100%"],BOTTOM_CENTER:["50%","100%"],BOTTOM:["50%","100%"],BOTTOM_RIGHT:["100%","100%"],CENTER:["50%","50%"]},vC=({children:t,styles:n,className:r,anchorPoint:o})=>{const[a,s]=null!=o?o:gC.BOTTOM;let i=`-${a}`,l=`-${s}`;a.trimStart().startsWith("-")&&(i=a.substring(1)),s.trimStart().startsWith("-")&&(l=s.substring(1));const c=`translate(50%, 100%) translate(${i}, ${l})`;return e.createElement("div",{style:{transform:c}},e.createElement("div",{className:r,style:n},t))};(0,e.forwardRef)(((t,n)=>{const{children:r,style:o,className:a,anchorPoint:s}=t,[i,l]=function(t){const[n,r]=(0,e.useState)(null),[o,a]=(0,e.useState)(null),s=dC(),i=uC("marker"),{children:l,onClick:c,className:d,onMouseEnter:u,onMouseLeave:f,onDrag:h,onDragStart:m,onDragEnd:p,collisionBehavior:g,clickable:v,draggable:y,position:b,title:x,zIndex:w}=t,k=e.Children.count(l);return(0,e.useEffect)((()=>{if(!s||!i)return;const e=new i.AdvancedMarkerElement;e.map=s,r(e);let t=null;return k>0&&(t=document.createElement("div"),t.isCustomMarker=!0,e.content=t,a(t)),()=>{var n;e.map=null,null==(n=t)||n.remove(),r(null),a(null)}}),[s,i,k]),(0,e.useEffect)((()=>{!n||!n.content||k>0||(n.content.className=d||"")}),[n,d,k]),hC(n,"position",b),hC(n,"title",null!=x?x:""),hC(n,"zIndex",w),hC(n,"collisionBehavior",g),(0,e.useEffect)((()=>{n&&(n.gmpDraggable=void 0!==y?y:!!(h||m||p))}),[n,y,h,p,m]),(0,e.useEffect)((()=>{if(!n)return;const e=void 0!==v||Boolean(c)||Boolean(u)||Boolean(f);n.gmpClickable=e,e&&null!=n&&n.content&&function(e){return e.nodeType===Node.ELEMENT_NODE}(n.content)&&(n.content.style.pointerEvents="none",n.content.firstElementChild&&(n.content.firstElementChild.style.pointerEvents="all"))}),[n,v,c,u,f]),fC(n,"click",c),fC(n,"drag",h),fC(n,"dragstart",m),fC(n,"dragend",p),mC(null==n?void 0:n.element,"mouseenter",u),mC(null==n?void 0:n.element,"mouseleave",f),[n,o]}(t),c=(0,e.useMemo)((()=>i?{marker:i}:null),[i]);return(0,e.useImperativeHandle)(n,(()=>i),[i]),l?e.createElement(pC.Provider,{value:c},(0,pe.createPortal)(e.createElement(vC,{anchorPoint:s,styles:o,className:a},r),l)):null})),new Set(["animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","columns","flex","flexGrow","flexPositive","flexShrink","flexNegative","flexOrder","gridArea","gridRow","gridRowEnd","gridRowSpan","gridRowStart","gridColumn","gridColumnEnd","gridColumnSpan","gridColumnStart","fontWeight","lineClamp","lineHeight","opacity","order","orphans","scale","tabSize","widows","zIndex","zoom","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth"]);const yC=["onClick","onDrag","onDragStart","onDragEnd","onMouseOver","onMouseOut"];function bC({location:t,onChange:n}){const[r,o]=(0,e.useState)(null);return(0,De.jsx)("div",{className:"flex flex-col gap-2",children:(0,De.jsx)(xC,{onPlaceSelect:o,location:t,onChange:n})})}(0,e.forwardRef)(((t,n)=>{const r=function(t){const[n,r]=(0,e.useState)(null),o=dC(),{onClick:a,onDrag:s,onDragStart:i,onDragEnd:l,onMouseOver:c,onMouseOut:d}=t,u=FS(t,yC),{position:f,draggable:h}=u;return(0,e.useEffect)((()=>{if(!o)return void(void 0===o&&console.error("<Marker> has to be inside a Map component."));const e=new google.maps.Marker(u);return e.setMap(o),r(e),()=>{e.setMap(null),r(null)}}),[o]),(0,e.useEffect)((()=>{if(!n)return;const e=n,t=google.maps.event;return a&&t.addListener(e,"click",a),s&&t.addListener(e,"drag",s),i&&t.addListener(e,"dragstart",i),l&&t.addListener(e,"dragend",l),c&&t.addListener(e,"mouseover",c),d&&t.addListener(e,"mouseout",d),n.setDraggable(Boolean(h)),()=>{t.clearInstanceListeners(e)}}),[n,h,a,s,i,l,c,d]),(0,e.useEffect)((()=>{n&&u&&n.setOptions(u)}),[n,u]),(0,e.useEffect)((()=>{!h&&f&&n&&n.setPosition(f)}),[h,f,n]),n}(t);return(0,e.useImperativeHandle)(n,(()=>r),[r]),e.createElement(e.Fragment,null)}));const xC=({onPlaceSelect:t,location:n,onChange:r})=>{const[o,a]=(0,e.useState)(null),s=(0,e.useRef)(null),i=uC("places"),l=(0,e.useRef)(null);return(0,e.useEffect)((()=>{i&&s.current&&(a(new i.Autocomplete(s.current,{fields:["geometry","name","formatted_address","address_components"]})),l.current=new google.maps.Geocoder)}),[i]),(0,e.useEffect)((()=>{o&&o.addListener("place_changed",(()=>{const e=o.getPlace();t(e);const n=e.geometry?.location.lat().toString(),a=e.geometry?.location.lng().toString(),s=e.address_components||[];let i="",l="",c="",d="",u="",f="";s.forEach((({long_name:e,short_name:t,types:n})=>{n.includes("street_number")&&(i=e),n.includes("route")&&(l=e),n.includes("locality")&&(c=e),n.includes("administrative_area_level_1")&&(d=t),n.includes("postal_code")&&(u=e),n.includes("country")&&(f=e)}));const h=[i,l].filter(Boolean).join(" "),m=[c,d,u,f].filter(Boolean).join(", "),p=e.name||"";r({name:p,address1:h,address2:"",address3:m,city:c,state:d,zip:u,country:f,latitude:n,longitude:a})}))}),[t,o]),(0,e.useEffect)((()=>{const e=[n.address1,n.address2,n.address3].filter(Boolean).join(" ");e&&(e=>{l.current&&l.current.geocode({address:e},((e,t)=>{if("OK"===t&&e[0]){const t=e[0].geometry.location;r({latitude:t.lat().toString(),longitude:t.lng().toString()})}else console.error("Geocode was not successful for the following reason: "+t)}))})(e)}),[n.address1,n.address2,n.address3]),(0,De.jsx)(Uv,{ref:s,id:"address1",type:"text",value:n?.address1||"",placeholder:"Search address here...",onChange:e=>r({address1:e.target.value}),autoComplete:"off"})};function wC({location:t,onChange:n,settings:r}){const o=Boolean(r?.gmap_connection_status),a=(0,e.useRef)(null),[s,i]=(0,e.useState)(!1);return(0,De.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,De.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,De.jsx)(dy,{htmlFor:`name-${t.id}`,children:"Location name (optional)"}),(0,De.jsx)(Uv,{id:`name-${t.id}`,value:t.name,placeholder:"e.g., Main Hall, Room A",onChange:e=>n({name:e.target.value})}),(0,De.jsx)("p",{className:"text-muted-foreground text-sm",children:"Give your location a name to help attendees identify it more easily."})]}),(0,De.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,De.jsx)(dy,{htmlFor:`address1-${t.id}`,children:"Address"}),o?(0,De.jsx)(bC,{location:t,onChange:n}):(0,De.jsx)(Uv,{id:`address1-${t.id}`,value:t.address1,placeholder:"Street address",onChange:e=>n({address1:e.target.value})})]}),(0,De.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,De.jsx)(dy,{htmlFor:`address2-${t.id}`,children:"Apartment unit number, building name (optional)"}),(0,De.jsx)(Uv,{id:`address2-${t.id}`,value:t.address2,placeholder:"Apartment, unit, building name",onChange:e=>n({address2:e.target.value})})]}),(0,De.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,De.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,De.jsx)(dy,{htmlFor:`city-${t.id}`,children:"City"}),(0,De.jsx)(Uv,{id:`city-${t.id}`,value:t.city,placeholder:"City",onChange:e=>n({city:e.target.value})})]}),(0,De.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,De.jsx)(dy,{htmlFor:`state-${t.id}`,children:"State"}),(0,De.jsx)(Uv,{id:`state-${t.id}`,value:t.state,placeholder:"State",onChange:e=>n({state:e.target.value})})]}),(0,De.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,De.jsx)(dy,{htmlFor:`country-${t.id}`,children:"Country"}),(0,De.jsx)(Uv,{id:`country-${t.id}`,value:t.country,placeholder:"Country",onChange:e=>n({country:e.target.value})})]}),(0,De.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,De.jsx)(dy,{htmlFor:`zip-${t.id}`,children:"Postal code"}),(0,De.jsx)(Uv,{id:`zip-${t.id}`,value:t.zip,placeholder:"Postal code",onChange:e=>n({zip:e.target.value})})]})]}),(0,De.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,De.jsx)(mw,{id:`embed_gmap-${t.id}`,checked:t.embed_gmap,onCheckedChange:e=>n({embed_gmap:e})}),(0,De.jsx)("label",{htmlFor:`embed_gmap-${t.id}`,className:"text-sm",children:"Embed Google Map on page."})]}),t.embed_gmap&&!o&&(0,De.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,De.jsxs)("div",{className:"flex flex-col gap-2 max-w-[422px]",children:[(0,De.jsx)(dy,{htmlFor:`gmap_link-${t.id}`,children:"Google Maps Embed Link"}),(0,De.jsx)(Uv,{ref:a,type:"text",id:`gmap_link-${t.id}`,value:t?.gmap_link,placeholder:"https://google.com/maps/embed",onChange:e=>n({gmap_link:e.target.value}),onBlur:e=>{const r=t?.gmap_link||"",o=(e=>{const t=/^https:\/\/www\.google\.com\/maps\/embed(\?.*)?$/i,n=e.match(/<iframe[^>]+src=["']([^"']+)["']/i);if(n){const e=n[1];if(t.test(e))return e}return t.test(e)?e:""})(r);if(!r)return e.target.classList.remove("eventkoi-error"),void i(!1);o?(n({gmap_link:o}),e.target.classList.remove("eventkoi-error"),i(!1)):(e.target.classList.add("eventkoi-error"),i(!0))}}),s&&(0,De.jsx)("p",{className:"w-full text-xs text-[#d13d3d]",children:"Wrong embed URL. Follow the instructions below to get the correct URL."})]}),(0,De.jsx)(MS,{className:"flex gap-x-8 bg-gray-50",children:(0,De.jsxs)(OS,{children:[(0,De.jsx)("p",{className:"text-base font-medium mb-2",children:"How to get the Google Maps embed link:"}),(0,De.jsxs)("ol",{className:"text-sm list-decimal pl-4 mb-4",children:[(0,De.jsx)("li",{children:"Find your address in Google Maps."}),(0,De.jsxs)("li",{children:["Click on the ",(0,De.jsx)("strong",{children:"Share"})," button."]}),(0,De.jsxs)("li",{children:["Go to ",(0,De.jsx)("strong",{children:"Embed a map"})," tab."]}),(0,De.jsx)("li",{children:"Copy the entire iframe html code."}),(0,De.jsx)("li",{children:"Paste it above. We’ll extract the correct embed URL."}),(0,De.jsxs)("li",{children:["It should start with:",(0,De.jsx)("code",{className:"text-inherit ml-1",children:"https://www.google.com/maps/embed"})]})]}),(0,De.jsxs)("p",{className:"text-sm",children:["Do ",(0,De.jsx)("strong",{children:"NOT"})," paste:",(0,De.jsx)("code",{className:"text-inherit ml-1",children:"https://maps.app.goo.gl/"})]}),(0,De.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4 pt-8",children:[(0,De.jsxs)(ES,{className:"select-none relative",children:[(0,De.jsx)("div",{className:"absolute -right-2.5 top-0 rounded-full w-6 h-6 bg-red-500 text-white inline-flex items-center justify-center -translate-y-1/2",children:(0,De.jsx)(IS,{size:20})}),(0,De.jsx)(NS,{className:"py-2 px-4",children:(0,De.jsx)(DS,{className:"text-base font-normal",children:"Share"})}),(0,De.jsxs)(TS,{className:"grid gap-2 px-4 pb-4",children:[(0,De.jsxs)("ul",{className:"flex gap-x-4 font-semibold text-black whitespace-nowrap",children:[(0,De.jsx)("li",{className:"underline underline-offset-4",children:"Send a link"}),(0,De.jsx)("li",{children:"Embed a map"})]}),(0,De.jsx)("p",{className:"text-black underline underline-offset-4 decoration-gray-200 text-xs",children:"https://maps.app.goo.gl/"}),(0,De.jsx)("p",{className:"text-blue-700 font-semibold text-xs",children:"COPY TO CLIPBOARD"})]})]}),(0,De.jsxs)(ES,{className:"select-none relative",children:[(0,De.jsx)("div",{className:"absolute -right-2.5 top-0 rounded-full w-6 h-6 bg-green-500 text-white inline-flex items-center justify-center -translate-y-1/2",children:(0,De.jsx)(Lm,{size:20})}),(0,De.jsx)(NS,{className:"py-2 px-4",children:(0,De.jsx)(DS,{className:"text-base font-normal",children:"Share"})}),(0,De.jsxs)(TS,{className:"grid gap-2 px-4 pb-4",children:[(0,De.jsxs)("ul",{className:"flex gap-x-4 font-semibold text-black whitespace-nowrap",children:[(0,De.jsx)("li",{children:"Send a link"}),(0,De.jsx)("li",{className:"underline underline-offset-4",children:"Embed a map"})]}),(0,De.jsx)("p",{className:"text-black underline underline-offset-4 decoration-gray-200 text-xs truncate",children:'<iframe src="https://www.google.com/maps/embed...'}),(0,De.jsx)("p",{className:"text-blue-700 font-semibold text-xs",children:"COPY HTML"})]})]})]})]})})]})]})}function kC({location:e,expandedLocationId:t,setExpandedLocationId:n,onChange:r,onDelete:o,settings:a}){const s=t===e.id,i=t=>{t.stopPropagation(),n(s?null:e.id)};return(0,De.jsxs)(ES,{className:"border rounded-lg shadow-sm overflow-hidden",children:[(0,De.jsxs)("div",{className:"flex justify-between items-center px-4 py-3 cursor-pointer hover:bg-muted/30 transition",onClick:i,children:[(0,De.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,De.jsx)(DS,{className:"text-base font-medium",children:e.name||("physical"===e.type?"Physical location":"Online location")}),(0,De.jsx)("div",{className:"text-sm text-muted-foreground truncate max-w-[280px]",children:"physical"===e.type?e.address1||"No address yet":e.virtual_url||"No URL yet"})]}),(0,De.jsxs)("div",{className:"flex items-center gap-1 ml-4",children:[(0,De.jsx)(tl,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-foreground",onClick:i,children:s?(0,De.jsx)(Ob,{className:"h-4 w-4"}):(0,De.jsx)(Oi,{className:"h-4 w-4"})}),(0,De.jsx)(tl,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-destructive",onClick:e=>{e.stopPropagation(),o()},children:(0,De.jsx)(gw,{className:"h-4 w-4"})})]})]}),s&&(0,De.jsx)(TS,{className:"p-4",children:"physical"===e.type?(0,De.jsx)(wC,{location:e,onChange:r,settings:a}):(0,De.jsx)(AS,{location:e,onChange:r})})]})}function SC({isInstance:t=!1,value:n,onChange:r}){const o=Fl(),a=o.event,s=o.setEvent,i=o.settings,l=t?n:a,c=t?e=>{const t="function"==typeof e?e(l):e;r(t)}:s,[d,u]=(0,e.useState)("physical"),[f,h]=(0,e.useState)(null);return(0,De.jsxs)(xw,{className:"p-0",children:[(0,De.jsx)("div",{className:"flex flex-col gap-6",children:(l.locations||[]).map((e=>(0,De.jsx)(kC,{location:e,expandedLocationId:f,setExpandedLocationId:h,onChange:t=>((e,t)=>{c((n=>({...n,locations:(n.locations||[]).map((n=>n.id===e?{...n,...t}:n))})))})(e.id,t),onDelete:()=>(e=>{c((t=>({...t,locations:(t.locations||[]).filter((t=>t.id!==e))}))),f===e&&h(null)})(e.id),settings:i},e.id)))}),0===(l.locations||[]).length&&(0,De.jsx)("p",{className:"text-muted-foreground text-sm",children:"No locations added yet."}),(0,De.jsxs)("div",{className:"flex items-center gap-2 mt-4",children:[(0,De.jsxs)(Ib,{value:d,onValueChange:u,children:[(0,De.jsx)(Lb,{className:"w-[180px]",children:(0,De.jsx)(Pb,{placeholder:"Select location type"})}),(0,De.jsxs)(Hb,{children:[(0,De.jsx)(Vb,{value:"physical",children:"Physical location"}),(0,De.jsx)(Vb,{value:"online",children:"Online location"})]})]}),(0,De.jsxs)(tl,{type:"button",variant:"ghost",onClick:()=>{const e={id:crypto.randomUUID(),type:d,name:"",address1:"",address2:"",city:"",state:"",country:"",zip:"",embed_gmap:!1,gmap_link:"",virtual_url:"",latitude:"",longitude:""};c((t=>({...t,locations:[...t.locations||[],e]}))),h(e.id)},children:[(0,De.jsx)(jS,{className:"w-4 h-4 mr-2"}),"Add location"]})]})]})}const CC=Mi("PencilLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z",key:"ymcmye"}],["path",{d:"m15 5 3 3",key:"1w25hb"}]]);function _C({isInstance:t=!1,value:n,onChange:r,timestamp:o,startDate:a,endDate:s,timezone:i}){const{event:l,setEvent:c,isPublishing:d}=Fl(),[u,f]=(0,e.useState)(!1),h=(0,e.useRef)(null),m=i||l?.timezone||"UTC";function p(){h.current&&(h.current.style.height="auto",h.current.style.height=`${h.current.scrollHeight}px`)}(0,e.useEffect)((()=>{p()}),[n,l?.title]),(0,e.useEffect)((()=>{!l?.id&&h.current&&(h.current.focus(),h.current.selectionStart=h.current.value.length)}),[l?.id]);const g=t?n:l?.title||"",v="Untitled event"===g?"":g;return(0,De.jsxs)(xw,{className:Ni("flex flex-col items-start justify-between p-0",t&&"sm:flex-row"),children:[(0,De.jsxs)("div",{className:"group relative flex w-full items-center gap-2 flex-1",children:[(0,De.jsx)(ww,{ref:h,id:"event-name",className:Ni("inline-flex sm:w-full resize-none overflow-hidden bg-transparent focus:outline-none border-2 border-transparent hover:border-input focus:border-input active:border-input rounded-md p-2 font-medium text-2xl leading-tight min-h-0 w-full max-w-full",u&&"border-red-500",!v&&"text-muted-foreground"),value:v,onInput:e=>{!function(e){const n=e.target.value;f(!n.trim()),t&&r?r(n):c((e=>({...e,title:n})))}(e),p()},onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),h.current.blur())},placeholder:"Enter event name",rows:1}),(0,De.jsx)("div",{onClick:()=>{h.current.focus(),h.current.selectionStart=h.current.value.length},className:"opacity-0 group-hover:opacity-100 transition-opacity cursor-pointer",children:(0,De.jsx)(CC,{className:"w-4 h-4 text-ring"})})]}),t&&o&&(0,De.jsxs)("div",{className:"flex flex-col md:items-end md:pl-4 pt-1 md:text-right text-foreground text-xs whitespace-nowrap min-w-[140px]",children:[(0,De.jsxs)("div",{className:"text-[13px]",children:[(0,De.jsx)("span",{className:"font-medium",children:"Event ID:"})," ",o]}),a&&s&&(0,De.jsx)("div",{className:"pt-2 text-base",children:Ts(a,s,m)})]}),u&&(0,De.jsx)("p",{className:"text-xs text-red-500 font-medium",children:"Event name cannot be blank"})]})}const jC=eventkoi_params?.theme||"twentytwentyfive",EC=eventkoi_params?.custom_templates||[];function NC({isInstance:e=!1,value:t={},onChange:n}){const{event:r,setEvent:o}=Fl(),a=e?t?.template||"default":r?.template||"default",s="default"!==a&&a!==`single-event-${e?t?.slug||t?.post_name||t?.id:r?.slug||r?.post_name||r?.id}`,i=encodeURIComponent(`/wp_template/${jC}//${a}`),l=s?`${eventkoi_params.site_url}/wp-admin/site-editor.php?p=${i}&canvas=edit`:`${eventkoi_params.site_url}/wp-admin/site-editor.php?p=/template&activeView=EventKoi`;return(0,De.jsxs)(xw,{className:"p-0",children:[(0,De.jsx)(dy,{htmlFor:"template",children:"Event template"}),(0,De.jsx)("div",{className:"text-muted-foreground",children:"Select or edit the design template of your event page."}),(0,De.jsxs)("div",{className:"flex items-center gap-4 mt-2",children:[(0,De.jsxs)(Ib,{value:a,onValueChange:t=>{e&&n?n({template:t}):o((e=>({...e,template:t})))},children:[(0,De.jsx)(Lb,{id:"template",className:"w-[250px]",children:(0,De.jsx)(Pb,{placeholder:"Select a template"})}),(0,De.jsxs)(Hb,{children:[(0,De.jsx)(Vb,{value:"default",children:"Default template"}),EC.map((e=>(0,De.jsx)(Vb,{value:e.slug,children:e.title},e.slug)))]})]}),(0,De.jsx)("a",{href:l,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-primary underline hover:text-primary/80 transition",children:s?"Edit in Site Editor":"View/edit template"})]})]})}function DC(){const{id:t,timestamp:n}=X(),{instanceData:r,setInstanceData:o}=J(),[a,s]=(0,e.useState)(!0),[i,l]=(0,e.useState)({}),[c,d]=(0,e.useState)(null),[u,f]=(0,e.useState)(null);return(0,e.useEffect)((()=>{if(!n)return;const e=new Date(1e3*Number(n)).toISOString(),t=new Date(e);if(d(t),r?.recurrence_rules?.[0]?.start_date&&r?.recurrence_rules?.[0]?.end_date){const e=r.recurrence_rules[0],n=new Date(e.start_date),o=new Date(e.end_date).getTime()-n.getTime(),a=new Date(t.getTime()+o);f(a)}}),[n,r?.recurrence_rules]),(0,e.useEffect)((()=>{(async()=>{s(!0);try{const[e,r]=await Promise.all([Ne()({path:`${eventkoi_params.api}/instance_data?id=${t}&timestamp=${n}`}),Ne()({path:`${eventkoi_params.api}/settings`,method:"GET",headers:{"EVENTKOI-API-KEY":eventkoi_params.api_key}})]);o(e?.merged||{}),l(r||{})}catch(e){gp({message:"Failed to load instance."})}finally{s(!1)}})()}),[t,n,o]),a?null:(0,De.jsxs)("div",{className:"flex flex-col w-full gap-8",children:[(0,De.jsx)(Bi,{container:!0,children:(0,De.jsx)(_C,{isInstance:!0,timestamp:n,startDate:c,endDate:u,timezone:r.timezone,value:r.title,onChange:e=>o((t=>({...t,title:e})))})}),(0,De.jsxs)(Bi,{container:!0,children:[(0,De.jsx)(Vi,{level:3,children:"Location details"}),i?.gmap_api_key?(0,De.jsx)(YS,{apiKey:i.gmap_api_key,children:(0,De.jsx)(SC,{isInstance:!0,value:r,onChange:e=>o((t=>({...t,...e})))})}):(0,De.jsx)(SC,{isInstance:!0,value:r,onChange:e=>o((t=>({...t,...e})))})]}),(0,De.jsxs)(Bi,{container:!0,className:"gap-10",children:[(0,De.jsx)(Vi,{level:3,children:"Additional details"}),(0,De.jsx)(kS,{isInstance:!0,value:r,onChange:e=>o((t=>({...t,...e})))}),(0,De.jsx)(yS,{isInstance:!0,value:r.description,onChange:e=>o((t=>({...t,description:e})))}),(0,De.jsx)(NC,{isInstance:!0,value:r,onChange:e=>o((t=>({...t,...e})))})]})]})}var TC=.999,AC=/[\\\/_+.#"@\[\(\{&]/,RC=/[\\\/_+.#"@\[\(\{&]/g,MC=/[\s-]/,OC=/[\s-]/g;function IC(e,t,n,r,o,a,s){if(a===t.length)return o===e.length?1:.99;var i=`${o},${a}`;if(void 0!==s[i])return s[i];for(var l,c,d,u,f=r.charAt(a),h=n.indexOf(f,o),m=0;h>=0;)(l=IC(e,t,n,r,h+1,a+1,s))>m&&(h===o?l*=1:AC.test(e.charAt(h-1))?(l*=.8,(d=e.slice(o,h-1).match(RC))&&o>0&&(l*=Math.pow(TC,d.length))):MC.test(e.charAt(h-1))?(l*=.9,(u=e.slice(o,h-1).match(OC))&&o>0&&(l*=Math.pow(TC,u.length))):(l*=.17,o>0&&(l*=Math.pow(TC,h-o))),e.charAt(h)!==t.charAt(a)&&(l*=.9999)),(l<.1&&n.charAt(h-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(h-1)!==r.charAt(a))&&.1*(c=IC(e,t,n,r,h+1,a+2,s))>l&&(l=.1*c),l>m&&(m=l),h=n.indexOf(f,h+1);return s[i]=m,m}function PC(e){return e.toLowerCase().replace(OC," ")}function LC(e,t,n){return IC(e=n&&n.length>0?e+" "+n.join(" "):e,t,PC(e),PC(t),0,0,{})}var FC="Dialog",[zC,HC]=Wl(FC),[VC,BC]=zC(FC),WC=t=>{const{__scopeDialog:n,children:r,open:o,defaultOpen:a,onOpenChange:s,modal:i=!0}=t,l=e.useRef(null),c=e.useRef(null),[d,u]=Yl({prop:o,defaultProp:a??!1,onChange:s,caller:FC});return(0,De.jsx)(VC,{scope:n,triggerRef:l,contentRef:c,contentId:xc(),titleId:xc(),descriptionId:xc(),open:d,onOpenChange:u,onOpenToggle:e.useCallback((()=>u((e=>!e))),[u]),modal:i,children:r})};WC.displayName=FC;var UC="DialogTrigger";e.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=BC(UC,n),a=$i(t,o.triggerRef);return(0,De.jsx)(wl.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":d_(o.open),...r,ref:a,onClick:Bl(e.onClick,o.onOpenToggle)})})).displayName=UC;var $C="DialogPortal",[GC,YC]=zC($C,{forceMount:void 0}),qC=t=>{const{__scopeDialog:n,forceMount:r,children:o,container:a}=t,s=BC($C,n);return(0,De.jsx)(GC,{scope:n,forceMount:r,children:e.Children.map(o,(e=>(0,De.jsx)(xu,{present:r||s.open,children:(0,De.jsx)(bu,{asChild:!0,container:a,children:e})})))})};qC.displayName=$C;var ZC="DialogOverlay",KC=e.forwardRef(((e,t)=>{const n=YC(ZC,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=BC(ZC,e.__scopeDialog);return a.modal?(0,De.jsx)(xu,{present:r||a.open,children:(0,De.jsx)(JC,{...o,ref:t})}):null}));KC.displayName=ZC;var QC=Gi("DialogOverlay.RemoveScroll"),JC=e.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=BC(ZC,n);return(0,De.jsx)(Of,{as:QC,allowPinchZoom:!0,shards:[o.contentRef],children:(0,De.jsx)(wl.div,{"data-state":d_(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})})),XC="DialogContent",e_=e.forwardRef(((e,t)=>{const n=YC(XC,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=BC(XC,e.__scopeDialog);return(0,De.jsx)(xu,{present:r||a.open,children:a.modal?(0,De.jsx)(t_,{...o,ref:t}):(0,De.jsx)(n_,{...o,ref:t})})}));e_.displayName=XC;var t_=e.forwardRef(((t,n)=>{const r=BC(XC,t.__scopeDialog),o=e.useRef(null),a=$i(n,r.contentRef,o);return e.useEffect((()=>{const e=o.current;if(e)return $u(e)}),[]),(0,De.jsx)(r_,{...t,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Bl(t.onCloseAutoFocus,(e=>{e.preventDefault(),r.triggerRef.current?.focus()})),onPointerDownOutside:Bl(t.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()})),onFocusOutside:Bl(t.onFocusOutside,(e=>e.preventDefault()))})})),n_=e.forwardRef(((t,n)=>{const r=BC(XC,t.__scopeDialog),o=e.useRef(!1),a=e.useRef(!1);return(0,De.jsx)(r_,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(o.current||r.triggerRef.current?.focus(),e.preventDefault()),o.current=!1,a.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(o.current=!0,"pointerdown"===e.detail.originalEvent.type&&(a.current=!0));const n=e.target,s=r.triggerRef.current?.contains(n);s&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&a.current&&e.preventDefault()}})})),r_=e.forwardRef(((t,n)=>{const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:s,...i}=t,l=BC(XC,r),c=e.useRef(null),d=$i(n,c);return sc(),(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)(uc,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:a,onUnmountAutoFocus:s,children:(0,De.jsx)(tc,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":d_(l.open),...i,ref:d,onDismiss:()=>l.onOpenChange(!1)})}),(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)(m_,{titleId:l.titleId}),(0,De.jsx)(p_,{contentRef:c,descriptionId:l.descriptionId})]})]})})),o_="DialogTitle",a_=e.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=BC(o_,n);return(0,De.jsx)(wl.h2,{id:o.titleId,...r,ref:t})}));a_.displayName=o_;var s_="DialogDescription",i_=e.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=BC(s_,n);return(0,De.jsx)(wl.p,{id:o.descriptionId,...r,ref:t})}));i_.displayName=s_;var l_="DialogClose",c_=e.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=BC(l_,n);return(0,De.jsx)(wl.button,{type:"button",...r,ref:t,onClick:Bl(e.onClick,(()=>o.onOpenChange(!1)))})}));function d_(e){return e?"open":"closed"}c_.displayName=l_;var u_="DialogTitleWarning",[f_,h_]=function(t,n){const r=e.createContext(n),o=t=>{const{children:n,...o}=t,a=e.useMemo((()=>o),Object.values(o));return(0,De.jsx)(r.Provider,{value:a,children:n})};return o.displayName=t+"Provider",[o,function(o){const a=e.useContext(r);if(a)return a;if(void 0!==n)return n;throw new Error(`\`${o}\` must be used within \`${t}\``)}]}(u_,{contentName:XC,titleName:o_,docsSlug:"dialog"}),m_=({titleId:t})=>{const n=h_(u_),r=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return e.useEffect((()=>{t&&(document.getElementById(t)||console.error(r))}),[r,t]),null},p_=({contentRef:t,descriptionId:n})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${h_("DialogDescriptionWarning").contentName}}.`;return e.useEffect((()=>{const e=t.current?.getAttribute("aria-describedby");n&&e&&(document.getElementById(n)||console.warn(r))}),[r,t,n]),null},g_=WC,v_=qC,y_=KC,b_=e_,x_=a_,w_=i_,k_=c_,S_='[cmdk-group=""]',C_='[cmdk-group-items=""]',j_='[cmdk-item=""]',E_=`${j_}:not([aria-disabled="true"])`,N_="cmdk-item-select",D_="data-value",T_=(e,t,n)=>LC(e,t,n),A_=e.createContext(void 0),R_=()=>e.useContext(A_),M_=e.createContext(void 0),O_=()=>e.useContext(M_),I_=e.createContext(void 0),P_=e.forwardRef(((t,n)=>{let r=K_((()=>{var e,n;return{search:"",value:null!=(n=null!=(e=t.value)?e:t.defaultValue)?n:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}})),o=K_((()=>new Set)),a=K_((()=>new Map)),s=K_((()=>new Map)),i=K_((()=>new Set)),l=q_(t),{label:c,children:d,value:u,onValueChange:f,filter:h,shouldFilter:m,loop:p,disablePointerSelection:g=!1,vimBindings:v=!0,...y}=t,b=xc(),x=xc(),w=xc(),k=e.useRef(null),S=X_();Z_((()=>{if(void 0!==u){let e=u.trim();r.current.value=e,C.emit()}}),[u]),Z_((()=>{S(6,T)}),[]);let C=e.useMemo((()=>({subscribe:e=>(i.current.add(e),()=>i.current.delete(e)),snapshot:()=>r.current,setState:(e,t,n)=>{var o,a,s,i;if(!Object.is(r.current[e],t)){if(r.current[e]=t,"search"===e)D(),E(),S(1,N);else if("value"===e){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let e=document.getElementById(w);e?e.focus():null==(o=document.getElementById(b))||o.focus()}if(S(7,(()=>{var e;r.current.selectedItemId=null==(e=A())?void 0:e.id,C.emit()})),n||S(5,T),void 0!==(null==(a=l.current)?void 0:a.value)){let e=null!=t?t:"";return void(null==(i=(s=l.current).onValueChange)||i.call(s,e))}}C.emit()}},emit:()=>{i.current.forEach((e=>e()))}})),[]),_=e.useMemo((()=>({value:(e,t,n)=>{var o;t!==(null==(o=s.current.get(e))?void 0:o.value)&&(s.current.set(e,{value:t,keywords:n}),r.current.filtered.items.set(e,j(t,n)),S(2,(()=>{E(),C.emit()})))},item:(e,t)=>(o.current.add(e),t&&(a.current.has(t)?a.current.get(t).add(e):a.current.set(t,new Set([e]))),S(3,(()=>{D(),E(),r.current.value||N(),C.emit()})),()=>{s.current.delete(e),o.current.delete(e),r.current.filtered.items.delete(e);let t=A();S(4,(()=>{D(),(null==t?void 0:t.getAttribute("id"))===e&&N(),C.emit()}))}),group:e=>(a.current.has(e)||a.current.set(e,new Set),()=>{s.current.delete(e),a.current.delete(e)}),filter:()=>l.current.shouldFilter,label:c||t["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:b,inputId:w,labelId:x,listInnerRef:k})),[]);function j(e,t){var n,o;let a=null!=(o=null==(n=l.current)?void 0:n.filter)?o:T_;return e?a(e,r.current.search,t):0}function E(){if(!r.current.search||!1===l.current.shouldFilter)return;let e=r.current.filtered.items,t=[];r.current.filtered.groups.forEach((n=>{let r=a.current.get(n),o=0;r.forEach((t=>{let n=e.get(t);o=Math.max(n,o)})),t.push([n,o])}));let n=k.current;R().sort(((t,n)=>{var r,o;let a=t.getAttribute("id"),s=n.getAttribute("id");return(null!=(r=e.get(s))?r:0)-(null!=(o=e.get(a))?o:0)})).forEach((e=>{let t=e.closest(C_);t?t.appendChild(e.parentElement===t?e:e.closest(`${C_} > *`)):n.appendChild(e.parentElement===n?e:e.closest(`${C_} > *`))})),t.sort(((e,t)=>t[1]-e[1])).forEach((e=>{var t;let n=null==(t=k.current)?void 0:t.querySelector(`${S_}[${D_}="${encodeURIComponent(e[0])}"]`);null==n||n.parentElement.appendChild(n)}))}function N(){let e=R().find((e=>"true"!==e.getAttribute("aria-disabled"))),t=null==e?void 0:e.getAttribute(D_);C.setState("value",t||void 0)}function D(){var e,t,n,i;if(!r.current.search||!1===l.current.shouldFilter)return void(r.current.filtered.count=o.current.size);r.current.filtered.groups=new Set;let c=0;for(let a of o.current){let o=j(null!=(t=null==(e=s.current.get(a))?void 0:e.value)?t:"",null!=(i=null==(n=s.current.get(a))?void 0:n.keywords)?i:[]);r.current.filtered.items.set(a,o),o>0&&c++}for(let[e,t]of a.current)for(let n of t)if(r.current.filtered.items.get(n)>0){r.current.filtered.groups.add(e);break}r.current.filtered.count=c}function T(){var e,t,n;let r=A();r&&((null==(e=r.parentElement)?void 0:e.firstChild)===r&&(null==(n=null==(t=r.closest(S_))?void 0:t.querySelector('[cmdk-group-heading=""]'))||n.scrollIntoView({block:"nearest"})),r.scrollIntoView({block:"nearest"}))}function A(){var e;return null==(e=k.current)?void 0:e.querySelector(`${j_}[aria-selected="true"]`)}function R(){var e;return Array.from((null==(e=k.current)?void 0:e.querySelectorAll(E_))||[])}function M(e){let t=R()[e];t&&C.setState("value",t.getAttribute(D_))}function O(e){var t;let n=A(),r=R(),o=r.findIndex((e=>e===n)),a=r[o+e];null!=(t=l.current)&&t.loop&&(a=o+e<0?r[r.length-1]:o+e===r.length?r[0]:r[o+e]),a&&C.setState("value",a.getAttribute(D_))}function I(e){let t,n=A(),r=null==n?void 0:n.closest(S_);for(;r&&!t;)r=e>0?G_(r,S_):Y_(r,S_),t=null==r?void 0:r.querySelector(E_);t?C.setState("value",t.getAttribute(D_)):O(e)}let P=()=>M(R().length-1),L=e=>{e.preventDefault(),e.metaKey?P():e.altKey?I(1):O(1)},F=e=>{e.preventDefault(),e.metaKey?M(0):e.altKey?I(-1):O(-1)};return e.createElement(wl.div,{ref:n,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:e=>{var t;null==(t=y.onKeyDown)||t.call(y,e);let n=e.nativeEvent.isComposing||229===e.keyCode;if(!e.defaultPrevented&&!n)switch(e.key){case"n":case"j":v&&e.ctrlKey&&L(e);break;case"ArrowDown":L(e);break;case"p":case"k":v&&e.ctrlKey&&F(e);break;case"ArrowUp":F(e);break;case"Home":e.preventDefault(),M(0);break;case"End":e.preventDefault(),P();break;case"Enter":{e.preventDefault();let t=A();if(t){let e=new Event(N_);t.dispatchEvent(e)}}}}},e.createElement("label",{"cmdk-label":"",htmlFor:_.inputId,id:_.labelId,style:tj},c),ej(t,(t=>e.createElement(M_.Provider,{value:C},e.createElement(A_.Provider,{value:_},t)))))})),L_=e.forwardRef(((t,n)=>{var r,o;let a=xc(),s=e.useRef(null),i=e.useContext(I_),l=R_(),c=q_(t),d=null!=(o=null==(r=c.current)?void 0:r.forceMount)?o:null==i?void 0:i.forceMount;Z_((()=>{if(!d)return l.item(a,null==i?void 0:i.id)}),[d]);let u=J_(a,s,[t.value,t.children,s],t.keywords),f=O_(),h=Q_((e=>e.value&&e.value===u.current)),m=Q_((e=>!(!d&&!1!==l.filter())||!e.search||e.filtered.items.get(a)>0));function p(){var e,t;g(),null==(t=(e=c.current).onSelect)||t.call(e,u.current)}function g(){f.setState("value",u.current,!0)}if(e.useEffect((()=>{let e=s.current;if(e&&!t.disabled)return e.addEventListener(N_,p),()=>e.removeEventListener(N_,p)}),[m,t.onSelect,t.disabled]),!m)return null;let{disabled:v,value:y,onSelect:b,forceMount:x,keywords:w,...k}=t;return e.createElement(wl.div,{ref:Ui(s,n),...k,id:a,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!h,"data-disabled":!!v,"data-selected":!!h,onPointerMove:v||l.getDisablePointerSelection()?void 0:g,onClick:v?void 0:p},t.children)})),F_=e.forwardRef(((t,n)=>{let{heading:r,children:o,forceMount:a,...s}=t,i=xc(),l=e.useRef(null),c=e.useRef(null),d=xc(),u=R_(),f=Q_((e=>!(!a&&!1!==u.filter())||!e.search||e.filtered.groups.has(i)));Z_((()=>u.group(i)),[]),J_(i,l,[t.value,t.heading,c]);let h=e.useMemo((()=>({id:i,forceMount:a})),[a]);return e.createElement(wl.div,{ref:Ui(l,n),...s,"cmdk-group":"",role:"presentation",hidden:!f||void 0},r&&e.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:d},r),ej(t,(t=>e.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?d:void 0},e.createElement(I_.Provider,{value:h},t)))))})),z_=e.forwardRef(((t,n)=>{let{alwaysRender:r,...o}=t,a=e.useRef(null),s=Q_((e=>!e.search));return r||s?e.createElement(wl.div,{ref:Ui(a,n),...o,"cmdk-separator":"",role:"separator"}):null})),H_=e.forwardRef(((t,n)=>{let{onValueChange:r,...o}=t,a=null!=t.value,s=O_(),i=Q_((e=>e.search)),l=Q_((e=>e.selectedItemId)),c=R_();return e.useEffect((()=>{null!=t.value&&s.setState("search",t.value)}),[t.value]),e.createElement(wl.input,{ref:n,...o,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":l,id:c.inputId,type:"text",value:a?t.value:i,onChange:e=>{a||s.setState("search",e.target.value),null==r||r(e.target.value)}})})),V_=e.forwardRef(((t,n)=>{let{children:r,label:o="Suggestions",...a}=t,s=e.useRef(null),i=e.useRef(null),l=Q_((e=>e.selectedItemId)),c=R_();return e.useEffect((()=>{if(i.current&&s.current){let e,t=i.current,n=s.current,r=new ResizeObserver((()=>{e=requestAnimationFrame((()=>{let e=t.offsetHeight;n.style.setProperty("--cmdk-list-height",e.toFixed(1)+"px")}))}));return r.observe(t),()=>{cancelAnimationFrame(e),r.unobserve(t)}}}),[]),e.createElement(wl.div,{ref:Ui(s,n),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l,"aria-label":o,id:c.listId},ej(t,(t=>e.createElement("div",{ref:Ui(i,c.listInnerRef),"cmdk-list-sizer":""},t))))})),B_=e.forwardRef(((t,n)=>{let{open:r,onOpenChange:o,overlayClassName:a,contentClassName:s,container:i,...l}=t;return e.createElement(g_,{open:r,onOpenChange:o},e.createElement(v_,{container:i},e.createElement(y_,{"cmdk-overlay":"",className:a}),e.createElement(b_,{"aria-label":t.label,"cmdk-dialog":"",className:s},e.createElement(P_,{ref:n,...l}))))})),W_=e.forwardRef(((t,n)=>Q_((e=>0===e.filtered.count))?e.createElement(wl.div,{ref:n,...t,"cmdk-empty":"",role:"presentation"}):null)),U_=e.forwardRef(((t,n)=>{let{progress:r,children:o,label:a="Loading...",...s}=t;return e.createElement(wl.div,{ref:n,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},ej(t,(t=>e.createElement("div",{"aria-hidden":!0},t))))})),$_=Object.assign(P_,{List:V_,Item:L_,Input:H_,Group:F_,Separator:z_,Dialog:B_,Empty:W_,Loading:U_});function G_(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Y_(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function q_(t){let n=e.useRef(t);return Z_((()=>{n.current=t})),n}var Z_="undefined"==typeof window?e.useEffect:e.useLayoutEffect;function K_(t){let n=e.useRef();return void 0===n.current&&(n.current=t()),n}function Q_(t){let n=O_(),r=()=>t(n.snapshot());return e.useSyncExternalStore(n.subscribe,r,r)}function J_(t,n,r,o=[]){let a=e.useRef(),s=R_();return Z_((()=>{var e;let i=(()=>{var e;for(let t of r){if("string"==typeof t)return t.trim();if("object"==typeof t&&"current"in t)return t.current?null==(e=t.current.textContent)?void 0:e.trim():a.current}})(),l=o.map((e=>e.trim()));s.value(t,i,l),null==(e=n.current)||e.setAttribute(D_,i),a.current=i})),a}var X_=()=>{let[t,n]=e.useState(),r=K_((()=>new Map));return Z_((()=>{r.current.forEach((e=>e())),r.current=new Map}),[t]),(e,t)=>{r.current.set(e,t),n({})}};function ej({asChild:t,children:n},r){return t&&e.isValidElement(n)?e.cloneElement(function(e){let t=e.type;return"function"==typeof t?t(e.props):"render"in t?t.render(e.props):e}(n),{ref:n.ref},r(n.props.children)):r(n)}var tj={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const nj=g_,rj=v_,oj=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)(y_,{ref:n,className:Ni("fixed inset-0 z-[100000] bg-black/80  data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t})));oj.displayName=y_.displayName;const aj=e.forwardRef((({className:e,children:t,...n},r)=>(0,De.jsxs)(rj,{children:[(0,De.jsx)(oj,{}),(0,De.jsxs)(b_,{ref:r,className:Ni("fixed left-[50%] top-[50%] z-[100000] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,(0,De.jsxs)(k_,{className:Ni("absolute right-4 top-3 inline-flex items-center justify-center","rounded-full p-2 cursor-pointer bg-transparent shadow-none border-0","text-muted-foreground opacity-70 transition-opacity","hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-0","disabled:pointer-events-none"),children:[(0,De.jsx)(IS,{className:"h-5 w-5"}),(0,De.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})));aj.displayName=b_.displayName;const sj=({className:e,...t})=>(0,De.jsx)("div",{className:Ni("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});sj.displayName="DialogHeader";const ij=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)(x_,{ref:n,className:Ni("text-lg font-semibold leading-none tracking-tight",e),...t})));ij.displayName=x_.displayName,e.forwardRef((({className:e,...t},n)=>(0,De.jsx)(w_,{ref:n,className:Ni("text-sm text-muted-foreground",e),...t}))).displayName=w_.displayName;const lj=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)($_,{ref:n,className:Ni("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t})));lj.displayName=$_.displayName;const cj=e.forwardRef((({className:e,...t},n)=>(0,De.jsxs)("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[(0,De.jsx)($v,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,De.jsx)($_.Input,{ref:n,className:Ni("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]})));cj.displayName=$_.Input.displayName;const dj=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)($_.List,{ref:n,className:Ni("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t})));dj.displayName=$_.List.displayName;const uj=e.forwardRef(((e,t)=>(0,De.jsx)($_.Empty,{ref:t,className:"py-6 text-center text-sm",...e})));uj.displayName=$_.Empty.displayName;const fj=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)($_.Group,{ref:n,className:Ni("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t})));fj.displayName=$_.Group.displayName;const hj=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)($_.Separator,{ref:n,className:Ni("-mx-1 h-px bg-border",e),...t})));hj.displayName=$_.Separator.displayName;const mj=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)($_.Item,{ref:n,className:Ni("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none","data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50","aria-selected:bg-transparent aria-selected:text-accent-foreground","aria-[selected=false]:hover:bg-accent aria-[selected=true]:hover:bg-accent aria-[selected=false]:hover:text-accent-foreground",e),...t})));function pj({options:t,placeholder:n,noItems:r,value:o,onSelectionChange:a,searchPlaceholder:s="Search items..."}){const i=e.useRef(null),[l,c]=e.useState(!1),[d,u]=e.useState(null!=o?o:[]),[f,h]=e.useState(""),m=e.useCallback((e=>{u((t=>t.filter((t=>t.id!==e.id))))}),[]),p=e.useCallback((e=>{const t=i.current;t&&("Delete"!==e.key&&"Backspace"!==e.key||""!==t.value||u((e=>{const t=[...e];return t.pop(),t})),"Escape"===e.key&&t.blur())}),[]),g=t.filter((e=>!d.some((t=>e.id===t.id))));return e.useEffect((()=>{a(d)}),[d]),e.useEffect((()=>{if(!Array.isArray(o))return;const e=o.map((e=>{if(!e.name){const n=t.find((t=>t.id===e.id));return null!=n?n:e}return e}));u(e)}),[o,t]),(0,De.jsx)("div",{className:"group relative rounded-md border border-input ring-offset-background focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",children:(0,De.jsxs)(Hv,{open:l,onOpenChange:c,children:[d.length>0&&(0,De.jsx)("div",{className:"absolute top-[0px] left-[0px] px-3 py-2 border-t-0 border-l-0 border-r-0 flex space-x-2",children:d.map((e=>(0,De.jsxs)(fl,{variant:"secondary",className:"text-sm text-foreground font-normal rounded",children:[e.name,(0,De.jsx)("button",{className:"ml-1 rounded-full outline-none ring-offset-background focus:ring-2 focus:ring-ring focus:ring-offset-2",onKeyDown:t=>"Enter"===t.key&&m(e),onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},onClick:()=>m(e),children:(0,De.jsx)(IS,{className:"h-3.5 w-3.5 text-muted-foreground hover:text-foreground"})})]},`option-${e.id}`)))}),(0,De.jsx)(Vv,{asChild:!0,children:(0,De.jsx)(Uv,{ref:i,value:f||(d.length>0?"":n),onChange:e=>h(e.target.value),placeholder:n,className:"flex-1 text-left leading-none bg-transparent outline-none border-none focus:shadow-none text-muted-foreground px-3 py-3","aria-expanded":l,onKeyDown:p})}),(0,De.jsx)(Bv,{className:"w-[--radix-popover-trigger-width] max-h-[--radix-popover-content-available-height] p-0",children:(0,De.jsxs)(lj,{children:[(0,De.jsx)(cj,{placeholder:s,className:"outline-none border-none focus:shadow-none px-0"}),(0,De.jsxs)(dj,{children:[(0,De.jsx)(uj,{children:(0,De.jsx)("span",{className:"text-muted-foreground",children:r})}),(0,De.jsx)(fj,{children:g.map((e=>(0,De.jsx)(mj,{onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},onSelect:()=>{h(""),u((t=>[...t,e]))},className:"cursor-pointer",children:(0,De.jsx)("span",{children:e.name})},e.id)))})]})]})})]})})}function gj(){var t;const{event:n,setEvent:r}=Fl(),[o,a]=(0,e.useState)([]),[s,i]=(0,e.useState)(!1),l=parseInt(null!==(t=eventkoi_params?.default_cal)&&void 0!==t?t:0,10),c=e=>{const t=e.map((e=>({id:e.id,name:e.name})));JSON.stringify(n?.calendar||[])!==JSON.stringify(t)&&r((e=>({...e,calendar:t})))};(0,e.useEffect)((()=>{(async()=>{try{const e=await Ne()({path:`${eventkoi_params.api}/calendars`,method:"get"});if(Array.isArray(e)){const t=e.map((e=>({id:parseInt(e.id,10),name:e.name})));a(t);const r=!Array.isArray(n?.calendar)||0===n.calendar.length;if(!s&&l&&r&&t.length>0){const e=t.find((e=>e.id===l));e&&(c([e]),i(!0))}}}catch(e){console.error("Failed to fetch calendars:",e)}})()}),[]);const d=Array.isArray(n?.calendar)?n.calendar.map((e=>({id:e.id,name:e.name}))):[];return(0,De.jsxs)(xw,{className:"p-0",children:[(0,De.jsx)(dy,{htmlFor:"calendar",children:"Event calendar"}),(0,De.jsx)("div",{className:"text-muted-foreground mb-2",children:"Select which calendars your event will show up in."}),o.length>0&&(0,De.jsx)(pj,{options:o,placeholder:"Select calendar(s)",noItems:"No calendars are found.",searchPlaceholder:"Search calendars",value:d,onSelectionChange:c})]})}mj.displayName=$_.Item.displayName;var vj="Switch",[yj,bj]=Wl(vj),[xj,wj]=yj(vj),kj=e.forwardRef(((t,n)=>{const{__scopeSwitch:r,name:o,checked:a,defaultChecked:s,required:i,disabled:l,value:c="on",onCheckedChange:d,form:u,...f}=t,[h,m]=e.useState(null),p=$i(n,(e=>m(e))),g=e.useRef(!1),v=!h||u||!!h.closest("form"),[y,b]=Yl({prop:a,defaultProp:s??!1,onChange:d,caller:vj});return(0,De.jsxs)(xj,{scope:r,checked:y,disabled:l,children:[(0,De.jsx)(wl.button,{type:"button",role:"switch","aria-checked":y,"aria-required":i,"data-state":jj(y),"data-disabled":l?"":void 0,disabled:l,value:c,...f,ref:p,onClick:Bl(t.onClick,(e=>{b((e=>!e)),v&&(g.current=e.isPropagationStopped(),g.current||e.stopPropagation())}))}),v&&(0,De.jsx)(_j,{control:h,bubbles:!g.current,name:o,value:c,checked:y,required:i,disabled:l,form:u,style:{transform:"translateX(-100%)"}})]})}));kj.displayName=vj;var Sj="SwitchThumb",Cj=e.forwardRef(((e,t)=>{const{__scopeSwitch:n,...r}=e,o=wj(Sj,n);return(0,De.jsx)(wl.span,{"data-state":jj(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})}));Cj.displayName=Sj;var _j=e.forwardRef((({__scopeSwitch:t,control:n,checked:r,bubbles:o=!0,...a},s)=>{const i=e.useRef(null),l=$i(i,s),c=fy(r),d=Kd(n);return e.useEffect((()=>{const e=i.current;if(!e)return;const t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(c!==r&&n){const t=new Event("click",{bubbles:o});n.call(e,r),e.dispatchEvent(t)}}),[c,r,o]),(0,De.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...a,tabIndex:-1,ref:l,style:{...a.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})}));function jj(e){return e?"checked":"unchecked"}_j.displayName="SwitchBubbleInput";var Ej=kj,Nj=Cj;const Dj=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)(Ej,{className:Ni("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:(0,De.jsx)(Nj,{className:Ni("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})})));function Tj({event:e,setEvent:t,className:n}){return(0,De.jsxs)("div",{className:Ni("flex flex-col gap-4 rounded-sm border p-4",n),children:[(0,De.jsxs)("div",{className:"flex items-center justify-between",children:[(0,De.jsxs)("div",{className:"space-y-1",children:[(0,De.jsx)(dy,{className:"font-semibold",children:"Date and time not confirmed"}),(0,De.jsx)("p",{className:"text-sm text-muted-foreground",children:"Remove date and time. Show “to be confirmed” notification instead."})]}),(0,De.jsx)(Dj,{id:"tbc",checked:e?.tbc,onCheckedChange:e=>t((t=>({...t,tbc:e})))})]}),e?.tbc&&(0,De.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,De.jsx)(dy,{htmlFor:"tbc_note",children:"Notification"}),(0,De.jsx)(Uv,{type:"text",id:"tbc_note",value:e?.tbc_note,placeholder:"Date and time to be confirmed",className:"max-w-[422px]",onChange:e=>t((t=>({...t,tbc_note:e.target.value})))})]})]})}function Aj({event:e,setEvent:t,className:n}){return(0,De.jsx)("div",{className:Ni("flex flex-col gap-4 rounded-sm border p-4",n),children:(0,De.jsxs)("div",{className:"flex items-center justify-between",children:[(0,De.jsxs)("div",{className:"space-y-1",children:[(0,De.jsx)(dy,{className:"font-semibold",children:"Display timezone in event page"}),(0,De.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Your current timezone is"," ",(0,De.jsx)("a",{href:eventkoi_params.general_options_url,target:"_blank",rel:"noopener noreferrer",className:"underline font-normal",children:e?.timezone}),"."]})]}),(0,De.jsx)(Dj,{id:"timezone_display",checked:e?.timezone_display,onCheckedChange:e=>t((t=>({...t,timezone_display:e})))})]})})}Dj.displayName=Ej.displayName;var[Rj,Mj]=Wl("Tooltip",[Xd]),Oj=Xd(),Ij="TooltipProvider",Pj=700,Lj="tooltip.open",[Fj,zj]=Rj(Ij),Hj=t=>{const{__scopeTooltip:n,delayDuration:r=Pj,skipDelayDuration:o=300,disableHoverableContent:a=!1,children:s}=t,i=e.useRef(!0),l=e.useRef(!1),c=e.useRef(0);return e.useEffect((()=>{const e=c.current;return()=>window.clearTimeout(e)}),[]),(0,De.jsx)(Fj,{scope:n,isOpenDelayedRef:i,delayDuration:r,onOpen:e.useCallback((()=>{window.clearTimeout(c.current),i.current=!1}),[]),onClose:e.useCallback((()=>{window.clearTimeout(c.current),c.current=window.setTimeout((()=>i.current=!0),o)}),[o]),isPointerInTransitRef:l,onPointerInTransitChange:e.useCallback((e=>{l.current=e}),[]),disableHoverableContent:a,children:s})};Hj.displayName=Ij;var Vj="Tooltip",[Bj,Wj]=Rj(Vj),Uj=t=>{const{__scopeTooltip:n,children:r,open:o,defaultOpen:a,onOpenChange:s,disableHoverableContent:i,delayDuration:l}=t,c=zj(Vj,t.__scopeTooltip),d=Oj(n),[u,f]=e.useState(null),h=xc(),m=e.useRef(0),p=i??c.disableHoverableContent,g=l??c.delayDuration,v=e.useRef(!1),[y,b]=Yl({prop:o,defaultProp:a??!1,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(Lj))):c.onClose(),s?.(e)},caller:Vj}),x=e.useMemo((()=>y?v.current?"delayed-open":"instant-open":"closed"),[y]),w=e.useCallback((()=>{window.clearTimeout(m.current),m.current=0,v.current=!1,b(!0)}),[b]),k=e.useCallback((()=>{window.clearTimeout(m.current),m.current=0,b(!1)}),[b]),S=e.useCallback((()=>{window.clearTimeout(m.current),m.current=window.setTimeout((()=>{v.current=!0,b(!0),m.current=0}),g)}),[g,b]);return e.useEffect((()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)}),[]),(0,De.jsx)(pu,{...d,children:(0,De.jsx)(Bj,{scope:n,contentId:h,open:y,stateAttribute:x,trigger:u,onTriggerChange:f,onTriggerEnter:e.useCallback((()=>{c.isOpenDelayedRef.current?S():w()}),[c.isOpenDelayedRef,S,w]),onTriggerLeave:e.useCallback((()=>{p?k():(window.clearTimeout(m.current),m.current=0)}),[k,p]),onOpen:w,onClose:k,disableHoverableContent:p,children:r})})};Uj.displayName=Vj;var $j="TooltipTrigger",Gj=e.forwardRef(((t,n)=>{const{__scopeTooltip:r,...o}=t,a=Wj($j,r),s=zj($j,r),i=Oj(r),l=$i(n,e.useRef(null),a.onTriggerChange),c=e.useRef(!1),d=e.useRef(!1),u=e.useCallback((()=>c.current=!1),[]);return e.useEffect((()=>()=>document.removeEventListener("pointerup",u)),[u]),(0,De.jsx)(gu,{asChild:!0,...i,children:(0,De.jsx)(wl.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...o,ref:l,onPointerMove:Bl(t.onPointerMove,(e=>{"touch"!==e.pointerType&&(d.current||s.isPointerInTransitRef.current||(a.onTriggerEnter(),d.current=!0))})),onPointerLeave:Bl(t.onPointerLeave,(()=>{a.onTriggerLeave(),d.current=!1})),onPointerDown:Bl(t.onPointerDown,(()=>{a.open&&a.onClose(),c.current=!0,document.addEventListener("pointerup",u,{once:!0})})),onFocus:Bl(t.onFocus,(()=>{c.current||a.onOpen()})),onBlur:Bl(t.onBlur,a.onClose),onClick:Bl(t.onClick,a.onClose)})})}));Gj.displayName=$j;var Yj="TooltipPortal",[qj,Zj]=Rj(Yj,{forceMount:void 0}),Kj="TooltipContent",Qj=e.forwardRef(((e,t)=>{const n=Zj(Kj,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,s=Wj(Kj,e.__scopeTooltip);return(0,De.jsx)(xu,{present:r||s.open,children:s.disableHoverableContent?(0,De.jsx)(nE,{side:o,...a,ref:t}):(0,De.jsx)(Jj,{side:o,...a,ref:t})})})),Jj=e.forwardRef(((t,n)=>{const r=Wj(Kj,t.__scopeTooltip),o=zj(Kj,t.__scopeTooltip),a=e.useRef(null),s=$i(n,a),[i,l]=e.useState(null),{trigger:c,onClose:d}=r,u=a.current,{onPointerInTransitChange:f}=o,h=e.useCallback((()=>{l(null),f(!1)}),[f]),m=e.useCallback(((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},o=function(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}(r,function(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}(r,n.getBoundingClientRect())),a=function(e){const t=e.slice();return t.sort(((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0)),function(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const r=e[n];for(;t.length>=2;){const e=t[t.length-1],n=t[t.length-2];if(!((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x)))break;t.pop()}t.push(r)}t.pop();const n=[];for(let t=e.length-1;t>=0;t--){const r=e[t];for(;n.length>=2;){const e=n[n.length-1],t=n[n.length-2];if(!((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x)))break;n.pop()}n.push(r)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}(t)}([...o,...function(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}(t.getBoundingClientRect())]);l(a),f(!0)}),[f]);return e.useEffect((()=>()=>h()),[h]),e.useEffect((()=>{if(c&&u){const e=e=>m(e,u),t=e=>m(e,c);return c.addEventListener("pointerleave",e),u.addEventListener("pointerleave",t),()=>{c.removeEventListener("pointerleave",e),u.removeEventListener("pointerleave",t)}}}),[c,u,m,h]),e.useEffect((()=>{if(i){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),o=!function(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){const s=t[e],i=t[a],l=s.x,c=s.y,d=i.x,u=i.y;c>r!=u>r&&n<(d-l)*(r-c)/(u-c)+l&&(o=!o)}return o}(n,i);r?h():o&&(h(),d())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[c,u,i,d,h]),(0,De.jsx)(nE,{...t,ref:s})})),[Xj,eE]=Rj(Vj,{isInside:!1}),tE=function(e){const t=({children:e})=>(0,De.jsx)(De.Fragment,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=Zi,t}("TooltipContent"),nE=e.forwardRef(((t,n)=>{const{__scopeTooltip:r,children:o,"aria-label":a,onEscapeKeyDown:s,onPointerDownOutside:i,...l}=t,c=Wj(Kj,r),d=Oj(r),{onClose:u}=c;return e.useEffect((()=>(document.addEventListener(Lj,u),()=>document.removeEventListener(Lj,u))),[u]),e.useEffect((()=>{if(c.trigger){const e=e=>{const t=e.target;t?.contains(c.trigger)&&u()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}}),[c.trigger,u]),(0,De.jsx)(tc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:(0,De.jsxs)(vu,{"data-state":c.stateAttribute,...d,...l,ref:n,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[(0,De.jsx)(tE,{children:o}),(0,De.jsx)(Xj,{scope:r,isInside:!0,children:(0,De.jsx)(py,{id:c.contentId,role:"tooltip",children:a||o})})]})})}));Qj.displayName=Kj;var rE="TooltipArrow";e.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Oj(n);return eE(rE,n).isInside?null:(0,De.jsx)(yu,{...o,...r,ref:t})})).displayName=rE;var oE=Qj;const aE=Hj,sE=Uj,iE=Gj,lE=e.forwardRef((({className:e,sideOffset:t=4,...n},r)=>(0,De.jsx)(oE,{ref:r,sideOffset:t,className:Ni("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})));lE.displayName=oE.displayName;const cE=Mi("CheckCheck",[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]]),dE=Mi("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]),uE="w-[90px]";function fE({attribute:t,data:n,eventId:r}){const[o,a]=(0,e.useState)(""),[s,i]=(0,e.useState)(Date.now()),l=(e,t)=>{navigator.clipboard.writeText(e),a(t),i(Date.now()),setTimeout((()=>a("")),1200)},c=`[eventkoi id=${r} data=${n}]`;return(0,De.jsx)("div",{className:"inline-flex w-fit flex-col rounded-sm border bg-muted p-2 text-sm space-y-2",children:(0,De.jsxs)(aE,{delayDuration:0,children:[(0,De.jsxs)("div",{className:"flex flex-wrap items-center gap-1",children:[(0,De.jsx)("span",{className:Ni("font-normal text-[12px] text-muted-foreground",uE),children:"Block attribute:"}),(0,De.jsxs)("div",{className:"relative bg-[#eeeeee] flex items-center p-1 pt-2 py-1.5 pl-2 rounded-sm",children:[(0,De.jsx)("div",{className:"text-xs font-mono pr-8",children:t}),(0,De.jsxs)(sE,{children:[(0,De.jsx)(iE,{asChild:!0,children:(0,De.jsx)(tl,{variant:"secondary",size:"icon",className:"bg-white absolute top-[3px] right-[4px] p-0 w-6 h-6 border-none rounded-sm cursor-pointer hover:bg-white",onClick:()=>l(t,"attribute"),"aria-label":"Copy attribute",children:"attribute"===o?(0,De.jsx)(cE,{className:"h-4 w-4 transition-all duration-200"}):(0,De.jsx)(dE,{className:"h-4 w-4 transition-all duration-200"})})}),(0,De.jsx)(lE,{className:"bg-zinc-900 text-white px-3 py-1.5 text-sm rounded-md shadow-none border-none",side:"top",sideOffset:8,children:"attribute"===o?"Copied!":"Copy attribute"})]},`attr-${s}`)]})]}),(0,De.jsxs)("div",{className:"flex flex-wrap items-center gap-1",children:[(0,De.jsx)("span",{className:Ni("font-normal text-[12px] text-muted-foreground",uE),children:"Shortcode:"}),(0,De.jsxs)("div",{className:"relative bg-[#eeeeee] flex items-center p-1 pt-2 py-1.5 pl-2 rounded-sm",children:[(0,De.jsx)("div",{className:"text-xs font-mono pr-8",children:c}),(0,De.jsxs)(sE,{children:[(0,De.jsx)(iE,{asChild:!0,children:(0,De.jsx)(tl,{variant:"secondary",size:"icon",className:"bg-white absolute top-[3px] right-[4px] p-0 w-6 h-6 border-none rounded-sm cursor-pointer hover:bg-white",onClick:()=>l(c,"shortcode"),"aria-label":"Copy shortcode",children:"shortcode"===o?(0,De.jsx)(cE,{className:"h-4 w-4 transition-all duration-200"}):(0,De.jsx)(dE,{className:"h-4 w-4 transition-all duration-200"})})}),(0,De.jsx)(lE,{className:"bg-zinc-900 text-white px-3 py-1.5 text-sm rounded-md shadow-none border-none",side:"top",sideOffset:8,children:"shortcode"===o?"Copied!":"Copy shortcode"})]},`code-${s}`)]})]})]})})}function hE({date:t,setDate:n,disabled:r,wpTz:o="UTC"}){const a=e=>vs.fromJSDate(e,{zone:o}).toFormat("h:mma").toLowerCase(),s=(0,e.useMemo)((()=>Array.from({length:96},((e,t)=>vs.fromObject({hour:Math.floor(t/4),minute:t%4*15},{zone:o}).toFormat("h:mma").toLowerCase()))),[o]),[i,l]=(0,e.useState)((()=>t&&yt(t)?a(t):"")),[c,d]=(0,e.useState)(!1),[u,f]=(0,e.useState)(-1),h=(0,e.useRef)(null),m=(0,e.useRef)(null),p=(0,e.useRef)([]),g=e=>{if(!e)return null;const n=e.toLowerCase().replace(/\s/g,""),r=n.match(/^(\d{1,2}):(\d{2})(am|pm)?$/);if(r){let[,e,n,a]=r,s=parseInt(e,10),i=parseInt(n,10);return a||(a=s>=7&&s<=11?"am":"pm"),"pm"===a&&s<12&&(s+=12),"am"===a&&12===s&&(s=0),vs.fromJSDate(t||new Date,{zone:o}).set({hour:s,minute:i,second:0,millisecond:0}).setZone("utc").toJSDate()}const a=n.match(/^(\d{1,2})(\d{2})?(am|pm)?$/);if(a){let[,e,n,r]=a,s=parseInt(e,10),i=n?parseInt(n,10):0;return i>=60||s>12?null:(r||(r=s>=7&&s<=11?"am":"pm"),"pm"===r&&s<12&&(s+=12),"am"===r&&12===s&&(s=0),vs.fromJSDate(t||new Date,{zone:o}).set({hour:s,minute:i,second:0,millisecond:0}).setZone("utc").toJSDate())}return null},v=e=>{l(e);const t=g(e);t&&yt(t)&&n(t),d(!1)};return(0,e.useEffect)((()=>{const e=e=>{h.current?.contains(e.target)||d(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)}),[]),(0,e.useEffect)((()=>{-1!==u&&p.current[u]&&c&&p.current[u].scrollIntoView({block:"nearest"})}),[u,c]),(0,De.jsxs)("div",{ref:h,className:"relative w-[100px]",children:[(0,De.jsx)("input",{ref:m,type:"text",value:i,placeholder:"Set time",onChange:e=>{const t=e.target.value;l(t),d(!0);const n=g(t);if(n&&yt(n)){const e=a(vs.fromJSDate(n,{zone:"utc"}).setZone(o).toJSDate()),t=s.findIndex((t=>t===e));f(t)}else f(-1)},onBlur:()=>{const e=g(i);e&&yt(e)&&(n(e),l(a(vs.fromJSDate(e,{zone:"utc"}).setZone(o).toJSDate())))},onFocus:()=>{if(r)return;d(!0);const e=g(i);if(e&&yt(e)){const t=a(vs.fromJSDate(e,{zone:"utc"}).setZone(o).toJSDate()),n=s.findIndex((e=>e===t));f(n)}else f(-1)},onKeyDown:e=>{if(!r)if("ArrowDown"===e.key)e.preventDefault(),c||d(!0),f((e=>e<s.length-1?e+1:0));else if("ArrowUp"===e.key)e.preventDefault(),c||d(!0),f((e=>e>0?e-1:s.length-1));else if("Enter"===e.key)if(e.preventDefault(),-1!==u)v(s[u]);else{const e=g(i);e&&yt(e)&&(n(e),l(a(vs.fromJSDate(e,{zone:"utc"}).setZone(o).toJSDate())),d(!1))}else"Escape"===e.key&&d(!1)},onMouseDown:e=>{if(document.activeElement===m.current&&!c){e.preventDefault(),d(!0);const t=g(i);if(t&&yt(t)){const e=a(vs.fromJSDate(t,{zone:"utc"}).setZone(o).toJSDate()),n=s.findIndex((t=>t===e));f(n)}}},disabled:r,inputMode:"text",className:Ni("h-10 w-full rounded-md border border-input px-3 py-2 text-sm shadow-sm","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1","placeholder:text-muted-foreground",r?"bg-muted text-muted-foreground/40 cursor-not-allowed opacity-100":"bg-background")}),c&&!r&&(0,De.jsx)("div",{className:"absolute z-10 mt-1 max-h-60 w-full overflow-y-auto rounded-md border bg-popover text-sm shadow-md",children:s.map(((e,t)=>(0,De.jsx)("button",{type:"button",onClick:()=>v(e),ref:e=>p.current[t]=e,className:Ni("w-full px-3 py-2 text-left whitespace-nowrap",t===u&&"bg-muted text-foreground"),children:e},e)))})]})}const mE=Mi("ChevronsLeft",[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]]),pE=Mi("ChevronsRight",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]);function gE({displayMonth:e}){const{goToMonth:t}=ug(),n=e.getFullYear(),r=e.getMonth(),o="undefined"!=typeof eventkoi_params&&eventkoi_params.locale&&(a=eventkoi_params.locale)?a.replace("_","-"):"en";var a;const s=vs.fromJSDate(e).setLocale(o).toFormat("LLLL");return(0,De.jsx)("div",{className:"flex items-center justify-between px-2",children:(0,De.jsxs)("div",{className:"flex items-center gap-1",children:[(0,De.jsx)("button",{onClick:()=>t(new Date(n-1,r)),className:"p-1 hover:bg-muted rounded","aria-label":"Previous year",children:(0,De.jsx)(mE,{className:"h-4 w-4"})}),(0,De.jsx)("button",{onClick:()=>t(new Date(n,r-1)),className:"p-1 hover:bg-muted rounded","aria-label":"Previous month",children:(0,De.jsx)(Hl,{className:"h-4 w-4"})}),(0,De.jsxs)("span",{className:"font-medium w-32 text-center capitalize",children:[s," ",n]}),(0,De.jsx)("button",{onClick:()=>t(new Date(n,r+1)),className:"p-1 hover:bg-muted rounded","aria-label":"Next month",children:(0,De.jsx)(zl,{className:"h-4 w-4"})}),(0,De.jsx)("button",{onClick:()=>t(new Date(n+1,r)),className:"p-1 hover:bg-muted rounded","aria-label":"Next year",children:(0,De.jsx)(pE,{className:"h-4 w-4"})})]})})}const vE=(0,e.memo)((function({value:t,onChange:n,className:r}){const{settings:o}=Re(),a=(0,e.useMemo)((()=>t instanceof Date&&!isNaN(t)?t:new Date),[t?.getFullYear(),t?.getMonth()]),s=`${a.getFullYear()}-${a.getMonth()}`,i=(e=>{null!=e&&""!==e||(e=0);const t=Number(e);return 6===t?0:t>=0&&t<=5?t+1:1})(o?.week_starts_on),l="undefined"!=typeof eventkoi_params&&eventkoi_params.locale&&(c=eventkoi_params.locale)?c.replace("_","-"):"en";var c;const d=Array.from({length:7},((e,t)=>vs.now().setLocale(l).set({weekday:t+1}).toFormat("ccc")));return(0,De.jsx)("div",{children:(0,De.jsx)(pv,{mode:"single",selected:t,onSelect:n,defaultMonth:a,weekStartsOn:i,className:r,components:{Caption:gE},formatters:{formatWeekdayName:e=>d[e]}})},s)}));function yE(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function bE(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var xE=["mousedown","touchstart"];function wE({value:t,onChange:n,wpTz:r="UTC",className:o,disabled:a=!1}){const[s,i]=(0,e.useState)(!1),l=(0,e.useRef)(null);!function(t,n,r){void 0===r&&(r=xE);var o=(0,e.useRef)(n);(0,e.useEffect)((function(){o.current=n}),[n]),(0,e.useEffect)((function(){for(var e=function(e){var n=t.current;n&&!n.contains(e.target)&&o.current(e)},n=0,a=r;n<a.length;n++){var s=a[n];yE(document,s,e)}return function(){for(var t=0,n=r;t<n.length;t++){var o=n[t];bE(document,o,e)}}}),[r,t])}(l,(()=>{s&&i(!1)}));const c="undefined"!=typeof eventkoi_params&&eventkoi_params.locale&&(d=eventkoi_params.locale)?d.replace("_","-"):"en";var d;return(0,De.jsxs)("div",{className:"relative",ref:l,children:[(0,De.jsx)(tl,{type:"button",variant:"outline",onClick:()=>{a||i((e=>!e))},disabled:a,className:Ni(!t&&"text-muted-foreground font-normal","w-[116px] justify-start",o),children:t?vs.fromJSDate(t,{zone:r}).setLocale(c).toFormat("d MMM yyyy"):"Set date"}),s&&!a&&(0,De.jsx)("div",{className:"absolute z-50 mt-2 rounded-md border bg-background shadow-md",children:(0,De.jsx)(vE,{value:t?new Date(t.getFullYear(),t.getMonth(),t.getDate()):null,onChange:e=>{if(e){i(!1);const t=vs.fromObject({year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()},{zone:r});n(t)}}})})]})}const kE=Mi("MoveRight",[["path",{d:"M18 8L22 12L18 16",key:"1r0oui"}],["path",{d:"M2 12H22",key:"1m8cig"}]]),SE=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],CE=["January","February","March","April","May","June","July","August","September","October","November","December"];function _E(e){if(!(e instanceof Date)||isNaN(e))return"";const t=e.getDate(),n=Math.ceil(t/7);return["first","second","third","fourth","fifth"][n-1]||`${n}th`}function jE(e,t){const n=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],r=["January","February","March","April","May","June","July","August","September","October","November","December"],o=["first","second","third","fourth","fifth"];let a;a=e.every&&e.every>1?`Every ${e.every} ${{day:"days",week:"weeks",month:"months",year:"years"}[e.frequency]||"custom"}`:{day:"Daily",week:"Weekly",month:"Monthly",year:"Yearly"}[e.frequency]||"Custom";let s="";if("week"===e.frequency&&e.weekdays?.length&&(s=`, on ${e.weekdays.map((e=>n[e])).join(", ")}`),"month"===e.frequency&&"weekday-of-month"===e.month_day_rule){const r=vs.fromISO(e.start_date,{zone:"utc"}).setZone(t).toJSDate(),a=0===(i=r.getDay())?6:i-1,l=Math.ceil(r.getDate()/7);s=`, on the ${o[l-1]||`${l}th`} ${n[a]}`}var i;if("month"===e.frequency&&"day-of-month"===e.month_day_rule&&(s=`, on day ${vs.fromISO(e.start_date,{zone:"utc"}).setZone(t).day}`),"year"===e.frequency&&e.months?.length){const t=e.months.map((e=>r[e])).join(", ");s=`, in ${t}`}let l="";return l="after"===e.ends?`, ${e.ends_after} events`:"on"===e.ends?`, until ${vs.fromISO(e.ends_on,{zone:"utc"}).setZone(t).toFormat("d MMM yyyy")}`:", forever",`${a}${s}${l}.`}const EE=(0,e.memo)((function({showAttributes:t}){var n;const{event:r,setEvent:o}=Fl(),a=null!==(n=r?.tbc)&&void 0!==n&&n,[s,i]=(0,e.useState)(null),l=r.recurrence_rules||[],{settings:c}=Re(),d=r?.timezone||window.eventkoi_params?.timezone_string||"UTC",u=(0,e.useCallback)((()=>{const e=new Date;e.setHours(9,0,0,0),new Date(e).setHours(17,0,0,0);const t=new Date;t.setFullYear(t.getFullYear()+2);const n={start_date:vs.fromJSDate(e,{zone:d}).setZone("utc").toISO({suppressMilliseconds:!0}),end_date:null,all_day:!1,every:1,frequency:"day",working_days_only:!1,ends:"after",ends_after:30,ends_on:vs.fromJSDate(t,{zone:d}).setZone("utc").toISO({suppressMilliseconds:!0}),weekdays:[],months:[e.getMonth()],month_day_rule:"day-of-month",month_day_value:e.getDate()};o((e=>({...e,recurrence_rules:[...e.recurrence_rules||[],n]})))}),[o]),f=(0,e.useCallback)(((e,t,n)=>{const r=[...l],a={...r[e]},s={...a,[t]:n},i="start_date"===t,c=vs.fromISO(i?n:s.start_date,{zone:"utc"}).setZone(d).toJSDate(),u=c instanceof Date&&!isNaN(c);"all_day"===t&&!0===n&&(s.end_date=null);const f="frequency"===t?"week"===n:"week"===s.frequency;if(u&&f&&i&&(!s.weekdays||0===s.weekdays.length)){const e=_s(c.toISOString(),d).getDay(),t=0===e?6:e-1;s.weekdays=[t]}if(("frequency"===t&&"year"===n||i&&"year"===s.frequency)&&u&&(s.months=[c.getMonth()],s.month_day_value=c.getDate()),("frequency"===t&&"month"===n||i&&"month"===s.frequency)&&u&&(s.month_day_value=c.getDate()),i&&a.end_date){const e=vs.fromISO(a.start_date,{zone:"utc"}),t=vs.fromISO(a.end_date,{zone:"utc"});if(e.isValid&&t.isValid){const r=t.diff(e),o=vs.fromISO(n,{zone:"utc"});o.isValid&&(s.end_date=o.plus(r).toUTC().toISO({suppressMilliseconds:!0}))}}r[e]=s,o((e=>({...e,recurrence_rules:r})))}),[l,o]),h=(0,e.useCallback)(((e,t)=>{o((n=>{const r=[...n.recurrence_rules||[]],o=r[e]||{},a={...o,...t},s=vs.fromISO(t.start_date||o.start_date,{zone:"utc"}).setZone(d).toJSDate();if(s instanceof Date&&!isNaN(s)&&"week"===a.frequency&&"start_date"in t){const e=_s(s.toISOString(),d).getDay(),t=0===e?6:e-1;a.weekdays=[t]}if(t.start_date&&o.end_date){const e=vs.fromISO(o.start_date,{zone:"utc"}),n=vs.fromISO(o.end_date,{zone:"utc"});if(e.isValid&&n.isValid){const r=n.diff(e),o=vs.fromISO(t.start_date,{zone:"utc"});o.isValid&&(a.end_date=o.plus(r).toUTC().toISO({suppressMilliseconds:!0}))}}return r[e]=a,{...n,recurrence_rules:r}}))}),[o]),m=(0,e.useCallback)((e=>{const t=[...l];t.splice(e,1),o((e=>({...e,recurrence_rules:t})))}),[l,o]),p=(0,e.useCallback)(((e,t,n)=>{const r=l[e][t]||[],o=r.includes(n)?r.filter((e=>e!==n)):[...r,n];f(e,t,o)}),[l,f]);return(0,De.jsxs)("div",{className:"flex flex-col gap-6 pointer-events-none opacity-50 select-none",children:[l.map(((e,n)=>{var o;const u=_s(Cs(e.start_date),d),g=_s(Cs(e.end_date),d),v=_s(Cs(e.ends_on),d);return(0,De.jsxs)("div",{className:"border rounded-md p-4 space-y-6",children:[(0,De.jsxs)("div",{className:"flex flex-wrap items-center gap-2 md:gap-4",children:[(0,De.jsx)(wE,{value:u,wpTz:d,onChange:t=>{if(!t)return;const r=u?vs.fromJSDate(u,{zone:d}):vs.fromObject({hour:9,minute:0},{zone:d}),o=t.set({hour:r.hour,minute:r.minute,second:0,millisecond:0});let a=null;if(!e.all_day&&u&&g){const e=vs.fromJSDate(g,{zone:d}).diff(r);a=o.plus(e).toUTC().toISO({suppressMilliseconds:!0})}const s=o.toUTC().toISO({suppressMilliseconds:!0});h(n,{start_date:s,...a&&{end_date:a}})},className:Ni("disabled:bg-muted disabled:text-muted-foreground/40 disabled:cursor-not-allowed disabled:opacity-100"),disabled:a}),!e.all_day&&(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)(hE,{date:u,wpTz:d,setDate:e=>{if(!e)return;const t=vs.fromJSDate(e,{zone:"utc"}).setZone(d),r=g?vs.fromJSDate(g,{zone:"utc"}).setZone(d):null;let o={start_date:t.toUTC().toISO({suppressMilliseconds:!0})};if(r){const e=r.diff(vs.fromJSDate(u,{zone:"utc"}).setZone(d)),n=t.plus(e);o.end_date=n.toUTC().toISO({suppressMilliseconds:!0})}h(n,o)},disabled:a}),(0,De.jsx)(kE,{className:"w-6 h-6 text-muted-foreground",strokeWidth:1.5}),(0,De.jsx)(hE,{date:g,wpTz:d,setDate:e=>{if(!e)return;const t=vs.fromISO(l[n].start_date,{zone:"utc"}).setZone(d),r=vs.fromJSDate(e,{zone:d}),o=t.set({hour:r.hour,minute:r.minute,second:0,millisecond:0}).toUTC().toISO({suppressMilliseconds:!0});console.log("Rule end_date =>",o),h(n,{end_date:o})},disabled:a})]}),(0,De.jsxs)("div",{className:"flex items-center gap-2",children:[(0,De.jsx)(Dj,{checked:e.all_day,onCheckedChange:e=>f(n,"all_day",e),disabled:a}),(0,De.jsx)("span",{className:"text-sm text-muted-foreground",children:"All day"})]}),(0,De.jsx)(tl,{type:"button",size:"icon",variant:"ghost",onClick:()=>m(n),className:"h-7 w-7 ml-auto p-0",children:(0,De.jsx)(gw,{className:"h-4 w-4 text-muted-foreground"})})]}),t&&(0,De.jsx)(fE,{attribute:`event_datetime_${n+1}`,data:`datetime_${n+1}`,eventId:r?.id}),(0,De.jsxs)("div",{className:"flex items-center gap-2",children:[(0,De.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Repeats every"}),(0,De.jsx)(Uv,{type:"number",min:1,value:e.every,onChange:e=>f(n,"every",parseInt(e.target.value)),className:"w-16 h-9"}),(0,De.jsxs)(Ib,{value:e.frequency,onValueChange:e=>f(n,"frequency",e),children:[(0,De.jsx)(Lb,{className:"w-[100px] h-9",children:(0,De.jsx)(Pb,{})}),(0,De.jsxs)(Hb,{children:[(0,De.jsx)(Vb,{value:"day",children:"Day"}),(0,De.jsx)(Vb,{value:"week",children:"Week"}),(0,De.jsx)(Vb,{value:"month",children:"Month"}),(0,De.jsx)(Vb,{value:"year",children:"Year"})]})]})]}),"day"===e.frequency&&(0,De.jsxs)("div",{className:"flex items-center gap-2",children:[(0,De.jsx)(mw,{checked:e.working_days_only,onCheckedChange:e=>f(n,"working_days_only",e),id:`working-days-${n}`}),(0,De.jsxs)("label",{htmlFor:`working-days-${n}`,className:"text-sm text-muted-foreground",children:["Only count"," ",(0,De.jsx)(Se,{to:"/settings",className:"underline text-muted-foreground hover:text-primary/80",onClick:e=>e.stopPropagation(),children:"working days"}),"."]})]}),"week"===e.frequency&&(0,De.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,De.jsx)("span",{className:"text-sm font-medium text-foreground",children:"On"}),Ds(parseInt(null!==(o=c?.week_starts_on)&&void 0!==o?o:"0",10)).map((({key:t,short:r})=>(0,De.jsx)(tl,{type:"button",size:"sm",variant:e.weekdays.includes(t)?"default":"secondary",className:Ni("rounded-full w-8 h-8 p-0 transition-none",e.weekdays.includes(t)?"bg-foreground":"bg-secondary border border-input"),onClick:()=>p(n,"weekdays",t),children:r},t)))]}),"month"===e.frequency&&(0,De.jsxs)("div",{className:"flex items-center gap-2",children:[(0,De.jsx)("span",{className:"text-sm font-medium text-foreground",children:"On"}),(0,De.jsxs)(Ib,{value:e.month_day_rule,onValueChange:e=>f(n,"month_day_rule",e),children:[(0,De.jsx)(Lb,{className:"w-[220px] h-9",children:(0,De.jsx)(Pb,{placeholder:"Pick rule"})}),(0,De.jsxs)(Hb,{children:[(0,De.jsxs)(Vb,{value:"day-of-month",children:["day ",u?.getDate()]}),(0,De.jsxs)(Vb,{value:"weekday-of-month",children:["the ",_E(u)," ",SE[0===u?.getDay()?6:u?.getDay()-1]]})]})]})]}),"year"===e.frequency&&(0,De.jsxs)("div",{className:"space-y-6",children:[(0,De.jsxs)("div",{className:"flex items-center gap-2",children:[(0,De.jsx)("span",{className:"text-sm font-medium text-foreground",children:"In"}),(0,De.jsxs)(Hv,{children:[(0,De.jsx)(Vv,{asChild:!0,children:(0,De.jsx)(tl,{variant:"outline",role:"combobox",className:Ni("min-w-[260px] w-full px-2 h-9 justify-start items-center overflow-x-auto whitespace-nowrap","scrollbar-hide appearance-none","hover:bg-transparent hover:text-foreground"),children:0===e.months.length?(0,De.jsx)("span",{className:"text-muted-foreground",children:"Select months"}):(0,De.jsx)("div",{className:"flex gap-1.5 items-center",children:[...e.months].sort(((e,t)=>e-t)).map((e=>(0,De.jsxs)("div",{className:"flex items-center px-2 py-0.5 text-sm rounded-sm bg-[#eeeeee] text-foreground",children:[CE[e],(0,De.jsx)("span",{role:"button",tabIndex:0,onClick:t=>{t.stopPropagation(),p(n,"months",e)},onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),p(n,"months",e))},className:"ml-1 hover:text-foreground focus:outline-none",children:(0,De.jsx)(IS,{className:"h-3 w-3"})})]},e)))})})}),(0,De.jsx)(Bv,{align:"start",className:"w-[260px] p-0",children:(0,De.jsx)(lj,{children:(0,De.jsx)(fj,{children:CE.map(((t,r)=>{const o=e.months.includes(r);return(0,De.jsxs)(mj,{value:t,onSelect:()=>p(n,"months",r),className:Ni("cursor-pointer px-3 py-2"),children:[(0,De.jsx)("span",{className:"flex-1",children:t}),o&&(0,De.jsx)("span",{children:"✓"})]},r)}))})})})]})]}),(0,De.jsxs)("div",{className:"flex items-center gap-2",children:[(0,De.jsx)("span",{className:"text-sm font-medium text-foreground",children:"On"}),(0,De.jsxs)(Ib,{value:e.month_day_rule,onValueChange:e=>f(n,"month_day_rule",e),children:[(0,De.jsx)(Lb,{className:"w-[220px] h-9",children:(0,De.jsx)(Pb,{placeholder:"Pick rule"})}),(0,De.jsxs)(Hb,{children:[(0,De.jsxs)(Vb,{value:"day-of-month",children:["day ",u?.getDate()]}),(0,De.jsxs)(Vb,{value:"weekday-of-month",children:["the ",_E(u)," ",SE[0===u?.getDay()?6:u?.getDay()-1]]})]})]})]})]}),(0,De.jsxs)("div",{className:"flex items-center gap-2",children:[(0,De.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Ends"}),(0,De.jsxs)(Ib,{value:e.ends,onValueChange:e=>f(n,"ends",e),children:[(0,De.jsx)(Lb,{className:"w-[100px] h-9",children:(0,De.jsx)(Pb,{})}),(0,De.jsxs)(Hb,{children:[(0,De.jsx)(Vb,{value:"never",children:"Never"}),(0,De.jsx)(Vb,{value:"after",children:"After"}),(0,De.jsx)(Vb,{value:"on",children:"On"})]})]}),"after"===e.ends&&(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)(Uv,{type:"number",min:1,value:e.ends_after,onChange:e=>f(n,"ends_after",parseInt(e.target.value)),className:"w-20 h-9"}),(0,De.jsx)("span",{className:"text-sm text-muted-foreground",children:"events"})]}),"on"===e.ends&&(0,De.jsx)(wE,{value:v,wpTz:d,onChange:e=>{if(!e)return;const t=vs.fromJSDate(null!=v?v:new Date,{zone:d}),r=vs.fromJSDate(e,{zone:d}).set({hour:t.hour,minute:t.minute,second:0,millisecond:0}).setZone("utc").toISO({suppressMilliseconds:!0});f(n,"ends_on",r)}})]}),(0,De.jsxs)("div",{className:"space-y-1",children:[(0,De.jsx)("label",{className:"text-sm font-medium text-foreground",children:"Recurring rule summary"}),(0,De.jsxs)("div",{className:"relative max-w-[450px]",children:[(0,De.jsx)(Uv,{type:"text",readOnly:!0,value:jE(e,d),className:"w-full text-sm pr-[100px]"}),(0,De.jsxs)(tl,{variant:"secondary",type:"button",className:"absolute h-8 px-2 right-[5px] top-[4px] border-none cursor-pointer hover:bg-input text-sm",onClick:()=>{i(n),navigator.clipboard.writeText(jE(e,d)),setTimeout((()=>i(null)),1200)},children:[s===n?(0,De.jsx)(cE,{className:"mr-2 h-4 w-4"}):(0,De.jsx)(dE,{className:"mr-2 h-4 w-4"}),s===n?"Copied!":"Copy"]})]})]}),t&&(0,De.jsx)(fE,{attribute:`event_rulesummary_${n+1}`,data:`rulesummary_${n+1}`,eventId:r?.id})]},n)})),(0,De.jsx)("div",{children:(0,De.jsxs)(tl,{type:"button",variant:"ghost",size:"sm",onClick:u,className:"w-auto justify-start text-sm",children:[(0,De.jsx)(jS,{className:"w-4 h-4 mr-2"}),"Add recurring rule"]})}),(0,De.jsx)(Tj,{event:r,setEvent:o}),(0,De.jsx)(Aj,{event:r,setEvent:o})]})}));function NE({event:e,updateDay:t,updateEvent:n,tbc:r}){const o=e?.timezone||"UTC",a=Array.isArray(e.event_days)?e.event_days.length:0,s=Math.max(0,a-1),i=e.start_date?_s(Cs(e.start_date),o):void 0,l=e.end_date?_s(Cs(e.end_date),o):void 0,c=(e,n)=>{if(!a&&0===e){const e=js((new Date).toISOString(),o);"start"===n&&t(0,"start_date",e),"end"===n&&t(0,"end_date",e)}},d=(e,r)=>{const a=js(vs.fromJSDate(r,{zone:o}).toISO(),o);"start"===e?(c(0,"start"),t(0,"start_date",a),n("start_date",a)):(c(s,"end"),t(s,"end_date",a),n("end_date",a))};return(0,De.jsxs)("div",{className:"flex flex-wrap items-center gap-4",children:[(0,De.jsx)(wE,{value:i,wpTz:o,onChange:e=>{if(!e)return;const t=i?vs.fromJSDate(i,{zone:o}):vs.fromObject({hour:9,minute:0},{zone:o}),n=e.set({hour:t.hour,minute:t.minute,second:0,millisecond:0});d("start",n.toJSDate())},disabled:r}),(0,De.jsx)(hE,{date:i,setDate:e=>{if(!e)return;const t=i||new Date,n=new Date(t);n.setHours(e.getHours(),e.getMinutes(),0,0),d("start",n)},wpTz:o}),(0,De.jsx)(kE,{className:"w-6 h-6 text-muted-foreground",strokeWidth:1.5}),(0,De.jsx)(wE,{value:l,wpTz:o,onChange:e=>{if(!e)return;const t=l?vs.fromJSDate(l,{zone:o}):i?vs.fromJSDate(i,{zone:o}):vs.fromObject({hour:17,minute:0},{zone:o}),n=e.set({hour:t.hour,minute:t.minute,second:0,millisecond:0});d("end",n.toJSDate())},disabled:r}),(0,De.jsx)(hE,{date:l,setDate:e=>{if(!e)return;const t=l||i||new Date,n=new Date(t);n.setHours(e.getHours(),e.getMinutes(),0,0),d("end",n)},wpTz:o})]})}var DE="Radio",[TE,AE]=Wl(DE),[RE,ME]=TE(DE),OE=e.forwardRef(((t,n)=>{const{__scopeRadio:r,name:o,checked:a=!1,required:s,disabled:i,value:l="on",onCheck:c,form:d,...u}=t,[f,h]=e.useState(null),m=$i(n,(e=>h(e))),p=e.useRef(!1),g=!f||d||!!f.closest("form");return(0,De.jsxs)(RE,{scope:r,checked:a,disabled:i,children:[(0,De.jsx)(wl.button,{type:"button",role:"radio","aria-checked":a,"data-state":FE(a),"data-disabled":i?"":void 0,disabled:i,value:l,...u,ref:m,onClick:Bl(t.onClick,(e=>{a||c?.(),g&&(p.current=e.isPropagationStopped(),p.current||e.stopPropagation())}))}),g&&(0,De.jsx)(LE,{control:f,bubbles:!p.current,name:o,value:l,checked:a,required:s,disabled:i,form:d,style:{transform:"translateX(-100%)"}})]})}));OE.displayName=DE;var IE="RadioIndicator",PE=e.forwardRef(((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=ME(IE,n);return(0,De.jsx)(xu,{present:r||a.checked,children:(0,De.jsx)(wl.span,{"data-state":FE(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})}));PE.displayName=IE;var LE=e.forwardRef((({__scopeRadio:t,control:n,checked:r,bubbles:o=!0,...a},s)=>{const i=e.useRef(null),l=$i(i,s),c=fy(r),d=Kd(n);return e.useEffect((()=>{const e=i.current;if(!e)return;const t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(c!==r&&n){const t=new Event("click",{bubbles:o});n.call(e,r),e.dispatchEvent(t)}}),[c,r,o]),(0,De.jsx)(wl.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...a,tabIndex:-1,ref:l,style:{...a.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})}));function FE(e){return e?"checked":"unchecked"}LE.displayName="RadioBubbleInput";var zE=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],HE="RadioGroup",[VE,BE]=Wl(HE,[Du,AE]),WE=Du(),UE=AE(),[$E,GE]=VE(HE),YE=e.forwardRef(((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:a,required:s=!1,disabled:i=!1,orientation:l,dir:c,loop:d=!0,onValueChange:u,...f}=e,h=WE(n),m=Kl(c),[p,g]=Yl({prop:a,defaultProp:o??null,onChange:u,caller:HE});return(0,De.jsx)($E,{scope:n,name:r,required:s,disabled:i,value:p,onValueChange:g,children:(0,De.jsx)(Fu,{asChild:!0,...h,orientation:l,dir:m,loop:d,children:(0,De.jsx)(wl.div,{role:"radiogroup","aria-required":s,"aria-orientation":l,"data-disabled":i?"":void 0,dir:m,...f,ref:t})})})}));YE.displayName=HE;var qE="RadioGroupItem",ZE=e.forwardRef(((t,n)=>{const{__scopeRadioGroup:r,disabled:o,...a}=t,s=GE(qE,r),i=s.disabled||o,l=WE(r),c=UE(r),d=e.useRef(null),u=$i(n,d),f=s.value===a.value,h=e.useRef(!1);return e.useEffect((()=>{const e=e=>{zE.includes(e.key)&&(h.current=!0)},t=()=>h.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}}),[]),(0,De.jsx)(zu,{asChild:!0,...l,focusable:!i,active:f,children:(0,De.jsx)(OE,{disabled:i,required:s.required,checked:f,...c,...a,name:s.name,ref:u,onCheck:()=>s.onValueChange(a.value),onKeyDown:Bl((e=>{"Enter"===e.key&&e.preventDefault()})),onFocus:Bl(a.onFocus,(()=>{h.current&&d.current?.click()}))})})}));ZE.displayName=qE;var KE=e.forwardRef(((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=UE(n);return(0,De.jsx)(PE,{...o,...r,ref:t})}));KE.displayName="RadioGroupIndicator";var QE=YE,JE=ZE,XE=KE;const eN=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)(QE,{className:Ni("grid gap-2",e),...t,ref:n})));eN.displayName=QE.displayName;const tN=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)(JE,{ref:n,className:Ni("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:(0,De.jsx)(XE,{className:"flex items-center justify-center",children:(0,De.jsx)(Fm,{className:"h-2.5 w-2.5 fill-current text-current"})})})));function nN({value:e,onChange:t}){return(0,De.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,De.jsx)(dy,{className:"font-medium text-sm",children:"Event Type:"}),(0,De.jsxs)(eN,{value:e||"selected",onValueChange:t,className:"flex flex-col gap-2",children:[(0,De.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,De.jsx)(tN,{value:"continuous",id:"continuous"}),(0,De.jsx)(dy,{htmlFor:"continuous",className:"text-sm font-medium cursor-pointer",children:"Consecutive Days"})]}),(0,De.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,De.jsx)(tN,{value:"selected",id:"selected"}),(0,De.jsxs)(dy,{htmlFor:"selected",className:"text-sm font-medium cursor-pointer",children:["Selected Days"," ",(0,De.jsx)("span",{className:"font-normal",children:"(non-consecutive or varied times)"})]})]})]})]})}function rN({showAttributes:t}){var n;const{event:r,setEvent:o}=Fl(),a=r.event_days?.length?r.event_days:[{start_date:null,end_date:null,all_day:!1}],s=null!==(n=r?.tbc)&&void 0!==n&&n,i=r?.timezone||window.eventkoi_params?.timezone_string||"UTC",[l,c]=(0,e.useState)({}),d=(e,t,n)=>{const s=[...a],d={...s[e]},u={...l},f=((e=>{if(0===e)return null;const t=a[e-1];t?.end_date&&vs.fromISO(t.end_date,{zone:"utc"}).setZone(i)})(e),d.start_date?vs.fromISO(d.start_date,{zone:"utc"}).setZone(i):null),h=d.end_date?vs.fromISO(d.end_date,{zone:"utc"}).setZone(i):null;if("all_day"===t&&(d.all_day=n,f&&h)){let e=f,t=h;n?(e=e.set({hour:0,minute:0,second:0,millisecond:0}),t=t.set({hour:23,minute:59,second:59,millisecond:999})):(0===e.hour&&(e=e.set({hour:9,minute:0})),t.hour>=23&&(t=t.set({hour:17,minute:0}))),d.start_date=e.setZone("utc").toISO({suppressMilliseconds:!0}),d.end_date=t.setZone("utc").toISO({suppressMilliseconds:!0})}if("start_date"===t){if(/[+-]\d\d:\d\d|Z$/.test(n))d.start_date=vs.fromISO(n).toUTC().toISO({suppressMilliseconds:!0});else{const e=vs.fromISO(n,{zone:i});d.start_date=e.toUTC().toISO({suppressMilliseconds:!0})}if(h&&vs.fromISO(d.start_date)>h){const e=vs.fromISO(d.start_date).plus({hours:8});d.end_date=e.toUTC().toISO({suppressMilliseconds:!0})}delete u[e]}if("end_date"===t){const t=vs.fromISO(n,{zone:i});f&&t<f?u[e]="End must be after start.":(d.end_date=t.setZone("utc").toISO({suppressMilliseconds:!0}),"continuous"===r.standard_type&&e===a.length-1&&o((e=>({...e,end_date:d.end_date}))),delete u[e])}s[e]=d,o((e=>({...e,event_days:s}))),c(u)},u=r.standard_type||"continuous";return(0,De.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,De.jsx)(nN,{value:u,onChange:e=>{o((t=>{if("continuous"===e)return{...t,standard_type:"continuous",start_date:null,end_date:null,event_days:[]};if("selected"===e){const e=[{start_date:null,end_date:null,all_day:!1}];return{...t,standard_type:"selected",start_date:null,end_date:null,event_days:e}}return t}))}}),"selected"===u&&(0,De.jsx)(De.Fragment,{children:a.map(((e,t)=>{const n=e.start_date?_s(Cs(e.start_date),i):void 0,r=e.end_date?_s(Cs(e.end_date),i):void 0;return(0,De.jsxs)("div",{className:"flex flex-wrap items-center gap-2 md:gap-4 group",children:[(0,De.jsx)(wE,{value:n,wpTz:i,onChange:e=>{if(!e)return;const s=n?{h:n.getHours(),m:n.getMinutes()}:{h:9,m:0},i=r?{h:r.getHours(),m:r.getMinutes()}:{h:17,m:0},l=e.set({hour:s.h,minute:s.m,second:0,millisecond:0}),c=e.set({hour:i.h,minute:i.m,second:0,millisecond:0});((e,t,n)=>{const r=[...a],s={...r[e]};s.start_date=t,s.end_date=n,r[e]=s,o((e=>({...e,event_days:r})))})(t,l.toUTC().toISO({suppressMilliseconds:!0}),c.toUTC().toISO({suppressMilliseconds:!0}))},className:Ni("disabled:bg-muted disabled:text-muted-foreground/40 disabled:cursor-not-allowed disabled:opacity-100"),disabled:s}),!e.all_day&&(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)(hE,{date:n,wpTz:i,setDate:e=>{if(!e||!n)return;const r=vs.fromJSDate(e,{zone:"utc"}).setZone(i),o=vs.fromJSDate(n,{zone:i}).set({hour:r.hour,minute:r.minute,second:0,millisecond:0});d(t,"start_date",o.toISO({suppressMilliseconds:!0}))},disabled:s}),(0,De.jsx)(kE,{className:"w-6 h-6 text-muted-foreground",strokeWidth:1.5}),(0,De.jsx)(hE,{date:r,wpTz:i,setDate:e=>{if(!e||!n)return;const r=vs.fromJSDate(e,{zone:"utc"}).setZone(i),o=vs.fromJSDate(n,{zone:i}).set({hour:r.hour,minute:r.minute,second:0,millisecond:0});d(t,"end_date",o.toISO({suppressMilliseconds:!0}))},disabled:s})]}),(0,De.jsxs)("div",{className:"flex items-center gap-2",children:[(0,De.jsx)(Dj,{checked:e.all_day,onCheckedChange:e=>d(t,"all_day",e),disabled:s}),(0,De.jsx)("span",{className:"text-sm text-muted-foreground",children:"All day"}),0!==t&&(0,De.jsx)(tl,{type:"button",size:"icon",variant:"ghost",onClick:()=>(e=>{if(a.length<=1)return;const t=[...a];t.splice(e,1),o((e=>({...e,event_days:t})))})(t),className:"h-7 w-7 p-0 opacity-0 group-hover:opacity-100 transition-opacity duration-200",disabled:a.length<=1,children:(0,De.jsx)(gw,{className:"h-4 w-4 text-muted-foreground"})})]})]},t)}))}),"continuous"===u&&(0,De.jsx)(NE,{event:r,updateDay:d,updateEvent:(e,t)=>o((n=>({...n,[e]:t})))}),t&&(0,De.jsx)(fE,{attribute:"event_datetime",data:"datetime",eventId:r?.id}),"selected"===u&&(0,De.jsx)("div",{className:"flex",children:(0,De.jsxs)(tl,{type:"button",variant:"ghost",size:"sm",onClick:()=>{const e=a[a.length-1],t=_s(e?.end_date?e.end_date:(new Date).toISOString(),i),n=new Date(t);n.setDate(n.getDate()+1),n.setHours(9,0,0,0),new Date(n).setHours(17,0,0,0);const r={start_date:null,end_date:null,all_day:!1};o((e=>({...e,event_days:[...e.event_days||[],r]})))},className:"w-auto justify-start text-sm",disabled:s,children:[(0,De.jsx)(jS,{className:"w-4 h-4 mr-2"}),"Add day"]})})]})}function oN({event:e,setEvent:t,showAttributes:n}){return(0,De.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,De.jsx)(rN,{showAttributes:n}),(0,De.jsx)(Tj,{event:e,setEvent:t}),(0,De.jsx)(Aj,{event:e,setEvent:t})]})}tN.displayName=JE.displayName;var aN="Tabs",[sN,iN]=Wl(aN,[Du]),lN=Du(),[cN,dN]=sN(aN),uN=e.forwardRef(((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:s="horizontal",dir:i,activationMode:l="automatic",...c}=e,d=Kl(i),[u,f]=Yl({prop:r,onChange:o,defaultProp:a??"",caller:aN});return(0,De.jsx)(cN,{scope:n,baseId:xc(),value:u,onValueChange:f,orientation:s,dir:d,activationMode:l,children:(0,De.jsx)(wl.div,{dir:d,"data-orientation":s,...c,ref:t})})}));uN.displayName=aN;var fN="TabsList",hN=e.forwardRef(((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=dN(fN,n),s=lN(n);return(0,De.jsx)(Fu,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:r,children:(0,De.jsx)(wl.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})}));hN.displayName=fN;var mN="TabsTrigger",pN=e.forwardRef(((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,s=dN(mN,n),i=lN(n),l=yN(s.baseId,r),c=bN(s.baseId,r),d=r===s.value;return(0,De.jsx)(zu,{asChild:!0,...i,focusable:!o,active:d,children:(0,De.jsx)(wl.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":c,"data-state":d?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...a,ref:t,onMouseDown:Bl(e.onMouseDown,(e=>{o||0!==e.button||!1!==e.ctrlKey?e.preventDefault():s.onValueChange(r)})),onKeyDown:Bl(e.onKeyDown,(e=>{[" ","Enter"].includes(e.key)&&s.onValueChange(r)})),onFocus:Bl(e.onFocus,(()=>{const e="manual"!==s.activationMode;d||o||!e||s.onValueChange(r)}))})})}));pN.displayName=mN;var gN="TabsContent",vN=e.forwardRef(((t,n)=>{const{__scopeTabs:r,value:o,forceMount:a,children:s,...i}=t,l=dN(gN,r),c=yN(l.baseId,o),d=bN(l.baseId,o),u=o===l.value,f=e.useRef(u);return e.useEffect((()=>{const e=requestAnimationFrame((()=>f.current=!1));return()=>cancelAnimationFrame(e)}),[]),(0,De.jsx)(xu,{present:a||u,children:({present:e})=>(0,De.jsx)(wl.div,{"data-state":u?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!e,id:d,tabIndex:0,...i,ref:n,style:{...t.style,animationDuration:f.current?"0s":void 0},children:e&&s})})}));function yN(e,t){return`${e}-trigger-${t}`}function bN(e,t){return`${e}-content-${t}`}vN.displayName=gN;var xN=hN,wN=pN,kN=vN;const SN=uN,CN=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)(xN,{ref:n,className:Ni("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t})));CN.displayName=xN.displayName;const _N=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)(wN,{ref:n,className:Ni("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t})));_N.displayName=wN.displayName;const jN=e.forwardRef((({className:e,...t},n)=>(0,De.jsx)(kN,{ref:n,className:Ni("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t})));function EN({showAttributes:t}){const{event:n,setEvent:r}=Fl(),o=n?.date_type||"standard";return(0,e.useEffect)((()=>{if("standard"!==o||n.event_days&&0!==n.event_days.length||r((e=>({...e,event_days:[{start_date:null,end_date:null,all_day:!1}]}))),"recurring"===o&&(!n.recurrence_rules||0===n.recurrence_rules.length)){const e=new Date;e.setHours(9,0,0,0),new Date(e).setHours(17,0,0,0);const t=new Date;t.setFullYear(t.getFullYear()+2);const n={start_date:null,end_date:null,all_day:!1,every:1,frequency:"day",working_days_only:!1,ends:"after",ends_after:30,ends_on:t.toISOString(),weekdays:[],months:[],month_day_rule:"day-of-month",month_day_value:e.getDate()};r((e=>({...e,recurrence_rules:[n]})))}}),[o]),(0,De.jsx)(xw,{className:"gap-3 p-0",children:(0,De.jsxs)(SN,{value:o,onValueChange:e=>{r((t=>({...t,date_type:e})))},className:"w-full",children:[(0,De.jsxs)(CN,{className:"border border-input rounded-lg mb-4",children:[(0,De.jsx)(_N,{value:"standard",className:"rounded-lg",children:"Standard"}),(0,De.jsxs)(_N,{value:"recurring",className:"rounded-lg",children:["Recurring",(0,De.jsx)(Sp,{})]})]}),(0,De.jsx)(jN,{value:"standard",children:(0,De.jsx)(oN,{event:n,setEvent:r,showAttributes:t})}),(0,De.jsxs)(jN,{value:"recurring",children:[(0,De.jsx)(ol,{headline:"Upgrade to access Recurring Events",minimal:!0,className:"mb-8 mt-6"}),(0,De.jsx)(EE,{showAttributes:t})]})]})})}function NN(){const{event:t,settings:n}=Fl(),r=n?.gmap_api_key,[o,a]=(0,e.useState)(!1);return(0,De.jsxs)("div",{className:"flex flex-col w-full gap-8",children:[(0,De.jsxs)(Bi,{container:!0,className:"flex flex-col md:flex-row items-start justify-between gap-4",children:[(0,De.jsx)(_C,{}),(0,De.jsxs)("div",{className:"flex items-center min-w-[170px] justify-between gap-[10px]",children:[(0,De.jsx)(dy,{htmlFor:"show-attrs",className:"font-normal text-[12px]",children:(0,De.jsxs)("div",{className:"leading-[15px] flex md:block",children:[(0,De.jsx)("div",{children:"Show block attributes"}),(0,De.jsx)("div",{children:"and shortcodes"})]})}),(0,De.jsx)(Dj,{id:"show-attrs",checked:o,onCheckedChange:a})]})]}),(0,De.jsx)(Bi,{container:!0,children:(0,De.jsx)(EN,{showAttributes:o})}),(0,De.jsxs)(Bi,{container:!0,children:[(0,De.jsx)(Vi,{level:3,children:"Location details"}),r?(0,De.jsx)(YS,{apiKey:r,children:(0,De.jsx)(SC,{})}):(0,De.jsx)(SC,{}),o&&(0,De.jsx)(fE,{attribute:"event_location",data:"location",eventId:t?.id})]}),(0,De.jsxs)(Bi,{container:!0,className:"gap-10",children:[(0,De.jsx)(Vi,{level:3,children:"Additional details"}),(0,De.jsx)(kS,{}),o&&(0,De.jsx)("div",{className:"text-sm text-muted-foreground -mt-6",children:(0,De.jsx)(fE,{attribute:"event_image",data:"image",eventId:t?.id})}),(0,De.jsx)(yS,{}),o&&(0,De.jsx)("div",{className:"text-sm text-muted-foreground -mt-6",children:(0,De.jsx)(fE,{attribute:"event_details",data:"details",eventId:t?.id})}),(0,De.jsx)(NC,{}),(0,De.jsx)(gj,{}),o&&(0,De.jsx)("div",{className:"text-sm text-muted-foreground -mt-6",children:(0,De.jsx)(fE,{attribute:"event_calendar",data:"calendar",eventId:t?.id})})]})]})}function DN({title:e,type:t="link",url:n,locked:r=!1,Icon:o=jS}){const a=(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)(o,{className:"mr-2 h-5 w-5"}),e,r&&(0,De.jsx)(Sp,{})]});return(0,De.jsx)(tl,{className:Ni("bg-foreground border border-foreground font-normal hover:bg-accent hover:border-card-foreground hover:text-accent-foreground",r&&"cursor-default border-[#e9e9e9] bg-[#e9e9e9] text-muted-foreground hover:border-[#e9e9e9] hover:bg-[#e9e9e9] hover:text-muted-foreground"),asChild:!0,children:"link"===t?(0,De.jsx)(Se,{to:r?"#":n,children:a}):(0,De.jsx)("a",{href:r?"#":n,children:a})})}jN.displayName=kN.displayName;const TN={live:"Live",completed:"Completed",tbc:"Date not set",upcoming:"Upcoming",publish:"Upcoming",draft:"Draft",trash:"Trash",recurring:"Recurring"},AN=(e,t,n)=>`${e.original.title} ${e.original.status}`.toLowerCase().includes(n.toLowerCase()),RN=(e,t)=>{const n=["live","upcoming","publish","tbc","draft","completed","trash"];return n.indexOf(e.original.status)-n.indexOf(t.original.status)};function MN(){const[t,n]=(0,e.useState)(!0),[r,o]=(0,e.useState)([]),[a]=je(),s=a.get("status")||"",i=a.get("event_status")||"",l=a.get("calendar")||"",c=a.get("from")||"",d=a.get("to")||"",u=(0,e.useCallback)((async(e=null)=>{n(!0);try{const n=new URLSearchParams({status:s,event_status:i,calendar:l,from:c,to:d}),r=`${eventkoi_params.api}/events?${n.toString()}`,a=await Ne()({path:r,method:"get"});o(a),(t=e)&&sp.custom((e=>(0,De.jsx)(pp,{message:t,variant:"default"})),{duration:4e3})}catch(e){console.error("Failed to load events:",e)}finally{n(!1)}var t}),[s,i,l,c,d]);(0,e.useEffect)((()=>{u()}),[u]);const f=(0,e.useMemo)((()=>[{id:"select",header:({table:e})=>(0,De.jsx)("div",{className:"flex items-center justify-center min-h-6",children:(0,De.jsx)(mw,{checked:e.getIsAllPageRowsSelected()||e.getIsSomePageRowsSelected()&&"indeterminate",onCheckedChange:t=>e.toggleAllPageRowsSelected(!!t),"aria-label":"Select all"})}),cell:({row:e})=>(0,De.jsx)("div",{className:"flex items-center justify-center min-h-6",children:(0,De.jsx)(mw,{checked:e.getIsSelected(),onCheckedChange:t=>e.toggleSelected(!!t),"aria-label":"Select row"})}),enableSorting:!1,enableHiding:!1},{accessorKey:"title",header:({column:e})=>(0,De.jsx)(Qx,{title:"Event name",column:e}),cell:({row:e})=>{const{id:t,wp_status:n,url:r}=e.original;return(0,De.jsx)("div",{className:"grid space-y-1",children:(0,De.jsxs)("div",{className:"flex items-center gap-2 text-foreground",children:[(0,De.jsxs)("span",{className:"inline",children:[(0,De.jsx)("a",{href:`#/events/${parseInt(t)}/main`,className:"inline font-medium hover:underline hover:decoration-dotted underline-offset-4 break-words",children:e.getValue("title")}),r&&(0,De.jsx)("a",{href:r,className:"ms-2 text-muted-foreground hover:text-foreground shrink-0",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,De.jsx)(pw,{className:"w-5 h-5 inline-block"})})]}),["draft","trash"].includes(n)&&(0,De.jsx)(fl,{variant:"outline",className:"font-normal",children:n.charAt(0).toUpperCase()+n.slice(1)}),"recurring"===e.original.date_type&&(0,De.jsx)("span",{className:"text-xs font-normal px-2 py-0.5 rounded-full border border-[#D0E6FB] bg-[#F0F8FF] text-foreground",children:"Recurring"})]})})},filterFn:AN,sortingFn:"alphanumeric"},{accessorKey:"status",header:({column:e})=>(0,De.jsx)(Qx,{title:"Status",column:e}),cell:({row:e})=>{const t=e.getValue("status"),n={completed:(0,De.jsx)(hl,{className:"w-4 h-4 text-success"}),draft:(0,De.jsx)(ml,{className:"w-4 h-4 text-primary/60"}),tbc:(0,De.jsx)(ml,{className:"w-4 h-4 text-primary/60"}),upcoming:(0,De.jsx)(pl,{className:"w-4 h-4 text-[#48BEFA]"}),publish:(0,De.jsx)(pl,{className:"w-4 h-4 text-[#48BEFA]"}),live:(0,De.jsx)(gl,{className:"w-4 h-4 text-destructive"}),trash:(0,De.jsx)(yl,{className:"w-4 h-4 text-primary/40"}),recurring:(0,De.jsx)(vl,{className:"w-4 h-4 text-primary/60"})};return(0,De.jsxs)("div",{className:"flex items-center space-x-2",children:[n[t],(0,De.jsx)("div",{className:"text-foreground",children:TN[t]})]})},filterFn:AN,sortingFn:RN},{accessorKey:"start_date_iso",header:({column:e})=>(0,De.jsx)(Qx,{title:"Starts",column:e}),cell:({row:e})=>{const{start_date_iso:t,timezone:n,recurrence_rules:r,event_days:o,date_type:a}=e.original,s="recurring"===a&&!0===r?.[0]?.all_day||["standard","multi"].includes(a)&&!0===o?.[0]?.all_day;return(0,De.jsx)("div",{className:"text-foreground whitespace-pre-line",children:Ss(t,{timezone:n,format:s?"date":"date-time"})})},filterFn:AN,sortingFn:"alphanumeric",sortUndefined:"last",invertSorting:!0},{accessorKey:"end_date_iso",header:({column:e})=>(0,De.jsx)(Qx,{title:"Ends",column:e}),cell:({row:e})=>{const{end_date_iso:t,timezone:n,recurrence_rules:r,event_days:o,date_type:a}=e.original,s="recurring"===a&&!0===r?.[0]?.all_day||["standard","multi"].includes(a)&&!0===o?.[o.length-1]?.all_day,i="recurring"===a&&"never"===r?.[0]?.ends&&!t;return(0,De.jsx)("div",{className:"text-foreground whitespace-pre-line",children:i?"Never":Ss(t,{timezone:n,format:s?"date":"date-time"})})},filterFn:AN,sortingFn:"alphanumeric",sortUndefined:"last",invertSorting:!0},{accessorKey:"calendar",header:()=>(0,De.jsx)(De.Fragment,{children:"Calendar"}),cell:({row:e})=>{const t=e.original.calendar||[];return(0,De.jsx)("div",{className:"text-foreground",children:t.map(((e,n)=>(0,De.jsxs)("span",{children:[e.name,n<t.length-1&&", "]},`calendar-${n}`)))})},filterFn:AN},{accessorKey:"modified_date",header:({column:e})=>(0,De.jsx)(Qx,{title:"Last modified",column:e}),cell:({row:e})=>{const t=e.getValue("modified_date"),{timezone:n}=e.original;return(0,De.jsx)("div",{className:"text-foreground whitespace-pre-line",children:Ss(t,{timezone:n})})},filterFn:AN,sortingFn:(e,t,n)=>(Date.parse(e.getValue(n))||0)-(Date.parse(t.getValue(n))||0),sortUndefined:"last"}]),[]);return(0,De.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,De.jsxs)("div",{className:"mx-auto flex w-full gap-2 justify-between",children:[(0,De.jsx)(Vi,{children:"Events"}),(0,De.jsx)(DN,{title:"Add event",url:"/events/add"})]}),(0,De.jsx)(Kx,{data:r,columns:f,empty:"No events are found.",base:"events",statusFilters:[{key:"all",title:"All",hideCount:!0,isSelected:!0},{key:"publish",title:"Published"},{key:"draft",title:"Draft"},{key:"future",title:"Scheduled"},{key:"recurring",title:"Recurring"},{key:"trash",title:"Trash"}],isLoading:t,fetchResults:u,queryStatus:s,eventStatus:i,calStatus:l,from:c,to:d,hideCategories:!0,defaultSort:[{id:"modified_date",desc:!0}]}),(0,De.jsx)(ol,{className:"my-8 max-w-2xl"})]})}function ON(){return(0,De.jsx)(De.Fragment,{children:"List of event templates"})}function IN(){return q("/calendars/:id/*")||q("/calendars/add")?(0,De.jsx)(de,{}):(0,De.jsx)(Fi,{children:(0,De.jsx)(de,{})})}function PN({calendar:e,setCalendar:t}){const n=e?.id>0?"Edit calendar":"Add calendar";return(0,De.jsxs)("div",{className:"space-y-[1px]",children:[(0,De.jsx)(tl,{variant:"link",className:"p-0 h-auto text-muted-foreground font-normal",asChild:!0,children:(0,De.jsxs)(Se,{to:"/calendars",children:[(0,De.jsx)(Hl,{className:"mr-2 h-4 w-4"}),"Back to all calendars"]})}),(0,De.jsx)(Vi,{level:3,className:"pl-6",children:n})]})}function LN({loading:t,setLoading:n,calendar:r,setCalendar:o}){const a=K(),[s,i]=(0,e.useState)(!1),[l,c]=(0,e.useState)(!1);let d=!r?.id&&!r?.name||s;return(0,De.jsxs)("div",{className:"flex gap-1 md:gap-2",children:[(0,De.jsx)(tl,{variant:"link",disabled:d||!r.url,onClick:()=>window.open(r?.url,"_blank"),children:"Preview"}),(0,De.jsxs)("div",{className:"flex items-center gap-[1px]",children:[(0,De.jsx)(tl,{variant:"default",className:"rounded-r-none",disabled:d,onClick:()=>{(async()=>{if(!r.name)return c(!0),document.getElementById("calendar-name").focus(),void document.getElementById("calendar-name").classList.add("eventkoi-error");i(!0),await Ne()({path:`${eventkoi_params.api}/update_calendar`,method:"post",data:{calendar:r,status:"publish"},headers:{"EVENTKOI-API-KEY":eventkoi_params.api_key}}).then((e=>{i(!1),e.error?vp(e.error):(o(e),gp(e),e.update_endpoint&&(window.location.hash=window.location.hash.replace("add",e.id)))})).catch((e=>{i(!1)}))})()},children:r?.id?"Save":"Publish"}),(0,De.jsxs)(zm,{modal:!1,children:[(0,De.jsx)(Hm,{asChild:!0,children:(0,De.jsx)(tl,{variant:"default",size:"icon",className:"rounded-l-none",disabled:d,children:(0,De.jsx)(Oi,{className:"w-4 h-4"})})}),(0,De.jsxs)($m,{className:"w-56 z-[510000]",align:"end",children:[(0,De.jsx)(Gm,{disabled:!r?.id,onClick:()=>{(async()=>{i(!0),n(!0);const e=r?.id;await Ne()({path:`${eventkoi_params.api}/duplicate_calendar`,method:"post",data:{calendar_id:r?.id},headers:{"EVENTKOI-API-KEY":eventkoi_params.api_key}}).then((t=>{i(!1),n(!1),o(t),gp(t),t.update_endpoint&&(window.location.hash=window.location.hash.replace(e,t.id))})).catch((()=>{i(!1),n(!1)}))})()},children:"Create duplicate calendar"}),(0,De.jsx)(qm,{}),(0,De.jsx)(Gm,{className:"text-destructive focus:text-destructive",disabled:r?.id===parseInt(eventkoi_params.default_cal),onClick:()=>{(async()=>{n(!0),await Ne()({path:`${eventkoi_params.api}/delete_calendar`,method:"post",data:{calendar_id:r?.id},headers:{"EVENTKOI-API-KEY":eventkoi_params.api_key}}).then((e=>{n(!1),a("/calendars"),gp(e)})).catch((()=>{n(!1)}))})()},children:"Delete calendar"})]})]})]})]})}function FN({loading:e,setLoading:t,calendar:n,setCalendar:r}){return(0,De.jsxs)("header",{className:Ni("flex text-sm h-12 items-center border-b gap-2 md:gap-6 px-4 md:px-8","sticky top-[0px] z-[100000] bg-white md:bg-muted h-20 shadow-sm border-b"),children:[(0,De.jsx)(Ai,{}),(0,De.jsx)(PN,{calendar:n,setCalendar:r}),(0,De.jsx)("div",{className:"flex w-full justify-end",children:(0,De.jsx)(LN,{loading:e,setLoading:t,calendar:n,setCalendar:r})})]})}const zN=[{name:"main",title:"Main"},{name:"embed",title:"Embed"}];function HN({calendar:e,setCalendar:t,location:n}){var r=n.pathname?.split("/"),o=r[3];const a="font-medium px-3 py-3 rounded-lg text-foreground bg-foreground/5";return(0,De.jsx)("nav",{className:"grid gap-1 text-sm text-muted-foreground",children:zN.map((function(e,t){let n="font-medium px-3 py-3 rounded-lg";return r&&o&&o===e.name&&(n=a),r&&!o&&"main"===e.name&&(n=a),(0,De.jsx)(Se,{to:e.name,className:n,children:e.title},`setting-tab-${t}`)}))})}function VN({type:e="order",title:t,message:n,actionTo:r,actionLabel:o}){const a=K(),s={order:(0,Ms.__)("Order","eventkoi"),event:(0,Ms.__)("Event","eventkoi"),calendar:(0,Ms.__)("Calendar","eventkoi"),ticket:(0,Ms.__)("Ticket","eventkoi"),item:(0,Ms.__)("Item","eventkoi")}[e]||(0,Ms.__)("Item","eventkoi"),i={order:"/tickets/orders",event:"/events",calendar:"/calendars",ticket:"/tickets",item:"/"}[e]||"/";return(0,De.jsx)(Fi,{children:(0,De.jsxs)("div",{className:"flex flex-col items-center justify-center text-center py-24 max-w-md mx-auto",children:[(0,De.jsx)("div",{className:"mb-4 rounded-full bg-red-100 text-red-600 p-4",children:(0,De.jsx)(gl,{className:"w-8 h-8"})}),(0,De.jsx)("h2",{className:"text-xl font-semibold mb-2 text-foreground",children:t||sprintf((0,Ms.__)("%s not found","eventkoi"),s)}),(0,De.jsx)("p",{className:"text-muted-foreground text-sm mb-6",children:n||sprintf((0,Ms.__)("This %s may have been deleted, or the link you followed is invalid.","eventkoi"),s.toLowerCase())}),(0,De.jsx)(tl,{onClick:()=>a(r||i),variant:"default",children:o||sprintf((0,Ms.__)("Back to all %s","eventkoi"),`${e}s`)})]})})}function BN(){const t=K(),n=Y(),{settings:r,refreshSettings:o}=Re(),{id:a}=X(),[s,i]=(0,e.useState)(!0),[l,c]=(0,e.useState)(null),[d,u]=(0,e.useState)(!1),f=n.pathname?.split("/"),h=f[3],m=parseInt(a)||0;return(0,e.useEffect)((()=>{h||t("main")}),[n]),(0,e.useEffect)((()=>{m?(async()=>{try{const e=await Ne()({path:`${eventkoi_params.api}/calendar?id=${m}`,method:"get"});c(e)}catch(e){u(!0)}finally{i(!1)}})():(async()=>{const e=await o(),t=null!==(r=["monday","tuesday","wednesday","thursday","friday","saturday","sunday"][parseInt(null!==(n=e?.week_starts_on)&&void 0!==n?n:"0",10)])&&void 0!==r?r:"monday";var n,r;c({...eventkoi_params.new_calendar,startday:t}),i(!1)})()}),[]),s||!r||!l&&!m?null:d||m&&!l?.id?(0,De.jsx)(VN,{type:"calendar"}):(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)(FN,{loading:s,setLoading:i,calendar:l,setCalendar:c}),(0,De.jsxs)(Fi,{className:"max-w-[1180px]",children:[(0,De.jsxs)("div",{className:Ni("w-full mx-auto items-start gap-6","grid grid-cols-1 md:grid-cols-[180px_1fr]"),children:[(0,De.jsx)(HN,{calendar:l,setCalendar:c,location:n}),(0,De.jsx)("div",{className:"grid",children:(0,De.jsx)(de,{context:[l,c]})})]}),(0,De.jsx)("div",{className:"h-10"})]})]})}var WN="horizontal",UN=["horizontal","vertical"],$N=e.forwardRef(((e,t)=>{const{decorative:n,orientation:r=WN,...o}=e,a=function(e){return UN.includes(e)}(r)?r:WN,s=n?{role:"none"}:{"aria-orientation":"vertical"===a?a:void 0,role:"separator"};return(0,De.jsx)(wl.div,{"data-orientation":a,...s,...o,ref:t})}));$N.displayName="Separator";var GN=$N;const YN=e.forwardRef((({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>(0,De.jsx)(GN,{ref:o,decorative:n,orientation:t,className:Ni("shrink-0 bg-border","horizontal"===t?"h-[1px] w-full":"h-full w-[1px]",e),...r})));function qN({calendar:e,setCalendar:t}){return(0,De.jsxs)(xw,{className:"p-0",children:[(0,De.jsx)(dy,{children:"Default calendar display"}),(0,De.jsx)(SN,{defaultValue:e?.display,onValueChange:e=>{t((t=>({...t,display:e})))},className:"pt-1",children:(0,De.jsxs)(CN,{className:"border border-input rounded-lg",children:[(0,De.jsx)(_N,{value:"calendar",className:"rounded-lg",children:"Calendar"}),(0,De.jsx)(_N,{value:"list",className:"rounded-lg",children:"List"})]})}),(0,De.jsx)("div",{className:"text-muted-foreground",children:"Choose the default view visitors see."})]})}YN.displayName=GN.displayName;const ZN=Mi("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),KN={monday:"Monday",tuesday:"Tuesday",wednesday:"Wednesday",thursday:"Thursday",friday:"Friday",saturday:"Saturday",sunday:"Sunday"},QN=["monday","tuesday","wednesday","thursday","friday","saturday","sunday"];function JN({calendar:t,setCalendar:n}){var r,o;const a="list"===t?.display,{settings:s}=Re(),i=null!==(r=QN[parseInt(null!==(o=s?.week_starts_on)&&void 0!==o?o:"0",10)])&&void 0!==r?r:"monday";(0,e.useEffect)((()=>{t?.startday||n((e=>({...e,startday:i})))}),[t?.startday,i,n]);const l=t?.startday||i;return(0,De.jsxs)(xw,{className:"p-0",children:[(0,De.jsx)(dy,{htmlFor:"startday",children:"Week starts on"}),(0,De.jsxs)(Ib,{value:l,onValueChange:e=>{a||n((t=>({...t,startday:e})))},disabled:a,children:[(0,De.jsx)(Lb,{id:"startday",className:"w-[250px]",children:(0,De.jsx)(Pb,{placeholder:"Select a day"})}),(0,De.jsx)(Hb,{children:Object.entries(KN).map((([e,t])=>(0,De.jsx)(Vb,{value:e,children:t},e)))})]}),!a&&(0,De.jsxs)("div",{className:"text-muted-foreground",children:["Select the day calendar use as the start of the week."," ",(0,De.jsx)(Se,{to:"/settings",className:"underline hover:text-primary transition-colors",children:"Edit global settings"}),"."]}),a&&(0,De.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground mt-2",children:[(0,De.jsx)(ZN,{className:"w-4 h-4"}),"This setting is only available in calendar view."]})]})}function XN({calendar:e,setCalendar:t}){const n="list"===e?.display;return(0,De.jsxs)(xw,{className:"p-0",children:[(0,De.jsx)(dy,{children:"Default time frame to display"}),(0,De.jsx)(SN,{defaultValue:e?.timeframe,onValueChange:e=>{n||(e=>{t((t=>({...t,timeframe:e})))})(e)},className:"pt-1",children:(0,De.jsxs)(CN,{className:"border border-input rounded-lg opacity-100",children:[(0,De.jsx)(_N,{value:"month",className:"rounded-lg",disabled:n,children:"Month"}),(0,De.jsx)(_N,{value:"week",className:"rounded-lg",disabled:n,children:"Week"})]})}),n&&(0,De.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground mt-2",children:[(0,De.jsx)(ZN,{className:"w-4 h-4"}),"This setting is only available in calendar view."]})]})}function eD(){const[e,t]=J();return(0,De.jsx)(Bi,{children:(0,De.jsxs)("div",{className:"grid w-full",children:[(0,De.jsx)(xw,{variant:"header",children:(0,De.jsx)(Vi,{level:3,children:"Additional details"})}),(0,De.jsx)(YN,{}),(0,De.jsx)(qN,{calendar:e,setCalendar:t}),(0,De.jsx)(YN,{}),(0,De.jsx)(XN,{calendar:e,setCalendar:t}),(0,De.jsx)(YN,{}),(0,De.jsx)(JN,{calendar:e,setCalendar:t})]})})}function tD({calendar:e,setCalendar:t}){return(0,De.jsxs)(xw,{className:"p-0",children:[(0,De.jsx)(dy,{children:"Block"}),(0,De.jsxs)("div",{className:"relative max-w-[422px] space-y-4",children:[(0,De.jsxs)("div",{className:"text-base text-muted-foreground",children:["1. In the block editor, add"," ",(0,De.jsx)("code",{className:"relative rounded bg-muted px-[0.3rem] py-[0.2rem] text-sm font-mono font-semibold",children:"/EK Calendar"})," ","block."]}),(0,De.jsx)("div",{className:"text-base text-muted-foreground",children:"2. In the right hand side Settings panel, select the relevant calendar from the dropdown menu."})]})]})}function nD({calendar:t,setCalendar:n}){const[r,o]=(0,e.useState)(!1);return(0,De.jsxs)(xw,{className:"p-0",children:[(0,De.jsx)(dy,{children:"Calendar link"}),(0,De.jsxs)("div",{className:"relative max-w-[422px]",children:[(0,De.jsx)(Uv,{type:"text",value:t?.url,className:"w-full",readOnly:!0,disabled:!t.url}),(0,De.jsxs)(tl,{variant:"secondary",type:"submit",className:"absolute h-8 px-2 right-[5px] top-[4px] border-none cursor-pointer hover:bg-input",disabled:!t.url,onClick:()=>{o(!0),navigator.clipboard.writeText(t?.url),setTimeout((()=>{o(!1)}),1200)},children:[r?(0,De.jsx)(cE,{className:"mr-2 h-4 w-4"}):(0,De.jsx)(dE,{className:"mr-2 h-4 w-4"}),r?"Copied!":"Copy"]})]})]})}function rD({calendar:t,setCalendar:n}){const[r,o]=(0,e.useState)(!1);return(0,De.jsxs)(xw,{className:"p-0",children:[(0,De.jsx)(dy,{children:"Shortcode"}),(0,De.jsxs)("div",{className:"relative max-w-[260px]",children:[(0,De.jsx)(Uv,{type:"text",value:t?.shortcode,className:"w-full",readOnly:!0,disabled:!t.url}),(0,De.jsxs)(tl,{variant:"secondary",type:"submit",className:"absolute h-8 px-2 right-[5px] top-[4px] border-none cursor-pointer hover:bg-input",disabled:!t.url,onClick:()=>{o(!0),navigator.clipboard.writeText(t?.shortcode),setTimeout((()=>{o(!1)}),1200)},children:[r?(0,De.jsx)(cE,{className:"mr-2 h-4 w-4"}):(0,De.jsx)(dE,{className:"mr-2 h-4 w-4"}),r?"Copied!":"Copy"]})]})]})}function oD(){const[e,t]=J();return(0,De.jsx)(Bi,{children:(0,De.jsxs)("div",{className:"grid w-full",children:[(0,De.jsx)(xw,{variant:"header",children:(0,De.jsx)(Vi,{level:3,children:"Embed"})}),(0,De.jsx)(YN,{}),(0,De.jsxs)("div",{className:"flex flex-col px-6 py-8 w-full gap-10",children:[(0,De.jsx)(nD,{calendar:e,setCalendar:t}),(0,De.jsx)(rD,{calendar:e,setCalendar:t}),(0,De.jsx)(tD,{calendar:e,setCalendar:t})]})]})})}const aD=window.wp.components;function sD({calendar:t,setCalendar:n}){const[r,o]=(0,e.useState)();return(0,De.jsxs)(xw,{className:"p-0",children:[(0,De.jsx)(dy,{htmlFor:"color",children:"Color"}),(0,De.jsxs)(Hv,{children:[(0,De.jsxs)(Vv,{className:"flex gap-4 items-center h-10 w-[150px] rounded-md border border-input bg-background shadow-none px-3 py-2 text-sm ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",children:[(0,De.jsx)("div",{style:{backgroundColor:t?.color},className:"flex rounded-full w-5 h-5"}),t?.color]}),(0,De.jsx)(Bv,{align:"start",className:"w-[250px] z-[900]",children:(0,De.jsx)(aD.ColorPicker,{color:t?.color,onChange:e=>{n((t=>({...t,color:e})))},enableAlpha:!1,defaultValue:eventkoi_params.default_color})})]}),(0,De.jsx)("div",{className:"text-muted-foreground",children:"Used for accent colors in your calendar."})]})}eventkoi_params.default_color;const iD=[{value:"current",label:"Current month"},{value:"january",label:"January"},{value:"february",label:"February"},{value:"march",label:"March"},{value:"april",label:"April"},{value:"may",label:"May"},{value:"june",label:"June"},{value:"july",label:"July"},{value:"august",label:"August"},{value:"september",label:"September"},{value:"october",label:"October"},{value:"november",label:"November"},{value:"december",label:"December"}];function lD({calendar:e,setCalendar:t}){const{settings:n}=Re(),r=(e,n)=>{t((t=>({...t,[e]:n})))},o=(new Date).getFullYear(),a=[{value:"current",label:`Current year (${o})`},...Array.from({length:10},((e,t)=>{const n=o+t+1;return{value:String(n),label:String(n)}}))];return"list"===e?.display?null:(0,De.jsx)(xw,{className:"p-0",children:(0,De.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-10",children:[(0,De.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,De.jsx)(dy,{htmlFor:"default_month",children:"Default month to display"}),(0,De.jsxs)(Ib,{value:e?.default_month||"current",onValueChange:e=>r("default_month",e),children:[(0,De.jsx)(Lb,{id:"default_month",className:"w-full max-w-[250px]",children:(0,De.jsx)(Pb,{placeholder:"Select a month"})}),(0,De.jsx)(Hb,{children:iD.map((e=>(0,De.jsx)(Vb,{value:e.value,children:e.label},e.value)))})]}),(0,De.jsx)("p",{className:"text-sm text-muted-foreground",children:"Select the month visitors see when they first view the calendar."})]}),(0,De.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,De.jsx)(dy,{htmlFor:"default_year",children:"Default year to display"}),(0,De.jsxs)(Ib,{value:e?.default_year||"current",onValueChange:e=>r("default_year",e),children:[(0,De.jsx)(Lb,{id:"default_year",className:"w-full max-w-[250px]",children:(0,De.jsx)(Pb,{placeholder:"Select a year"})}),(0,De.jsx)(Hb,{children:a.map((e=>(0,De.jsx)(Vb,{value:e.value,children:e.label},e.value)))})]}),(0,De.jsx)("p",{className:"text-sm text-muted-foreground",children:"Select the year visitors see when they first view the calendar."})]})]})})}function cD({calendar:t,setCalendar:n}){const r=(0,e.useRef)(null),[o,a]=(0,e.useState)(!1),s=e=>{var t=e.currentTarget.textContent.trim();n((e=>({...e,name:t}))),t?(e.currentTarget.classList.remove("eventkoi-error"),a(!1)):(e.currentTarget.classList.add("eventkoi-error"),a(!0))};return(0,e.useEffect)((()=>{r.current&&0===t.name?.length&&r.current.focus()}),[]),(0,De.jsxs)(xw,{className:"flex-row items-center flex-wrap gap-y-1",children:[(0,De.jsx)("div",{ref:r,id:"calendar-name",className:"inline-flex rounded-md items-center px-2 py-1 cursor-pointer font-medium text-lg border-2 border-transparent hover:border-input focus:border-input active:border-input",contentEditable:!0,spellCheck:!1,placeholder:"Enter calendar name",dangerouslySetInnerHTML:{__html:t?.name},onBlur:e=>s(e),onKeyDown:e=>"Enter"===e.key&&s(e)}),(0,De.jsxs)("div",{onClick:()=>{(e=>{var t,n;document.createRange?((t=document.createRange()).selectNodeContents(e),t.collapse(!1),(n=window.getSelection()).removeAllRanges(),n.addRange(t)):document.selection&&((t=document.body.createTextRange()).moveToElementText(e),t.collapse(!1),t.select())})(document.getElementById("calendar-name")),r.current.focus()},className:"cursor-pointer inline-flex items-center gap-x-1",children:[(0,De.jsx)(CC,{className:"w-3.5 h-3.5 text-ring"}),(0,De.jsx)("span",{className:"text-xs",children:"Click to edit"})]}),o&&(0,De.jsx)("p",{className:"w-full text-xs text-[#d13d3d]",children:"Calendar name cannot be blank"})]})}function dD({calendar:e,setCalendar:t}){let n=e.name?e.name.replace(/\s+/g,"-").toLowerCase():"";return(0,De.jsxs)(xw,{className:"p-0",children:[(0,De.jsx)(dy,{htmlFor:"slug",children:"Slug"}),(0,De.jsx)(Uv,{type:"text",id:"slug",value:e.slug?e.slug:n,placeholder:"Address",className:"max-w-[422px]",onChange:e=>{t((t=>({...t,slug:e.target.value})))}}),(0,De.jsxs)("div",{className:"text-muted-foreground",children:["Define the URL of your calendar",(0,De.jsx)("br",{}),(0,De.jsxs)(De.Fragment,{children:["(e.g. ",eventkoi_params.default_cal_url,e.slug?e.slug:n,")"]})]})]})}function uD(){const[e,t]=J();return(0,De.jsx)(Bi,{children:(0,De.jsxs)("div",{className:"grid w-full",children:[(0,De.jsx)(cD,{calendar:e,setCalendar:t}),(0,De.jsx)(YN,{}),(0,De.jsxs)("div",{className:"flex flex-col px-6 py-8 w-full gap-10",children:[(0,De.jsx)(dD,{calendar:e,setCalendar:t}),(0,De.jsx)(sD,{calendar:e,setCalendar:t}),(0,De.jsx)(qN,{calendar:e,setCalendar:t}),(0,De.jsx)(XN,{calendar:e,setCalendar:t}),(0,De.jsx)(lD,{calendar:e,setCalendar:t}),(0,De.jsx)(JN,{calendar:e,setCalendar:t})]})]})})}const fD=(e,t,n)=>`${e.original.name} ${e.original.slug}`.toLowerCase().includes(n.toLowerCase()),hD=[{id:"select",header:({table:e})=>(0,De.jsx)("div",{className:"flex items-center justify-center min-h-6",children:(0,De.jsx)(mw,{checked:e.getIsAllPageRowsSelected()||e.getIsSomePageRowsSelected()&&"indeterminate",onCheckedChange:t=>e.toggleAllPageRowsSelected(!!t),"aria-label":"Select all rows"})}),cell:({row:e})=>(0,De.jsx)("div",{className:"flex items-center justify-center min-h-6",children:(0,De.jsx)(mw,{checked:e.getIsSelected(),onCheckedChange:t=>e.toggleSelected(!!t),"aria-label":"Select row"})}),enableSorting:!1,enableHiding:!1},{accessorKey:"name",header:({column:e})=>(0,De.jsx)(Qx,{title:"Calendar name",column:e}),cell:function({row:e}){const t=parseInt(e.original.id)===parseInt(eventkoi_params.default_cal),n=`#/calendars/${e.original.id}/main`;return(0,De.jsx)("div",{className:"grid space-y-1",children:(0,De.jsxs)("div",{className:"flex gap-2 items-start text-foreground",children:[(0,De.jsxs)("span",{className:"inline",children:[(0,De.jsx)("a",{href:n,className:"inline font-medium hover:underline hover:decoration-dotted underline-offset-4",children:e.getValue("name")}),(0,De.jsx)("a",{href:e.original.url,target:"_blank",rel:"noopener noreferrer",className:"ms-2 text-muted-foreground hover:text-foreground shrink-0","aria-label":"View public calendar",children:(0,De.jsx)(pw,{className:"w-5 h-5 inline-block"})})]}),t&&(0,De.jsx)(fl,{variant:"outline",className:"font-normal",children:"Default"})]})})},filterFn:fD,sortingFn:"alphanumeric"},{accessorKey:"slug",header:({column:e})=>(0,De.jsx)(Qx,{title:"Slug",column:e}),cell:({row:e})=>(0,De.jsx)("div",{className:"text-foreground",children:e.getValue("slug")}),filterFn:fD,sortingFn:"alphanumeric"},{accessorKey:"shortcode",header:({column:e})=>(0,De.jsx)(Qx,{title:"Shortcode",column:e}),cell:function({row:t}){const n=t.getValue("shortcode"),[r,o]=(0,e.useState)(!1),[a,s]=(0,e.useState)(0);return(0,De.jsxs)("div",{className:"relative text-foreground w-full max-w-[220px]",children:[(0,De.jsx)(Uv,{type:"text",value:n,readOnly:!0,className:"w-full pr-10"}),(0,De.jsx)(aE,{delayDuration:0,children:(0,De.jsxs)(sE,{children:[(0,De.jsx)(iE,{asChild:!0,children:(0,De.jsx)(tl,{variant:"secondary",size:"icon",className:"absolute h-8 right-[5px] top-[4px] border-none cursor-pointer hover:bg-input",onClick:()=>{navigator.clipboard.writeText(n),o(!0),s((e=>e+1)),setTimeout((()=>{o(!1),s((e=>e+1))}),1500)},"aria-label":"Copy shortcode",children:r?(0,De.jsx)(cE,{className:"h-4 w-4 transition-all duration-200"}):(0,De.jsx)(dE,{className:"h-4 w-4 transition-all duration-200"})})}),(0,De.jsx)(lE,{className:"bg-zinc-900 text-white px-3 py-1.5 text-sm rounded-md shadow-lg",side:"top",sideOffset:8,children:r?"Copied!":"Copy shortcode"})]},a)})]})},filterFn:fD,sortingFn:"alphanumeric"},{accessorKey:"count",header:({column:e})=>(0,De.jsx)(Qx,{title:"Events count",column:e}),cell:({row:e})=>(0,De.jsx)("div",{className:"text-foreground text-right",children:e.getValue("count")}),filterFn:fD,sortingFn:"alphanumeric"}];function mD(){const[t,n]=(0,e.useState)([]),[r,o]=(0,e.useState)(!1),[a]=je(),s=async()=>{try{const e=await Ne()({path:`${eventkoi_params.api}/calendars`,method:"get"});n(e)}catch(e){console.error("Failed to load calendars:",e)}finally{o(!1)}};return(0,e.useEffect)((()=>{o(!0),s()}),[a]),(0,De.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,De.jsxs)("div",{className:"mx-auto flex w-full gap-2 justify-between",children:[(0,De.jsx)(Vi,{children:"Calendars"}),(0,De.jsx)(DN,{title:"Add calendar",url:"#",locked:!0})]}),(0,De.jsx)(Kx,{data:t,columns:hD,empty:"No calendars are found.",base:"calendars",hideStatusFilters:!0,isLoading:r,fetchResults:s,hideCategories:!0,hideDateRange:!0}),(0,De.jsx)(ol,{headline:"Upgrade now to add multiple calendars",className:"my-8 max-w-2xl"})]})}const pD=[{name:"default",title:"Default settings"},{name:"integrations",title:"API & integrations"}];function gD({settings:e,setSettings:t,location:n}){var r=n.pathname?.split("/"),o=r[2];const a="font-medium px-3 py-3 rounded-lg text-foreground bg-foreground/5";return(0,De.jsx)("nav",{className:"grid gap-1 text-sm text-muted-foreground",children:pD.map((function(e,t){let n="font-medium px-3 py-3 rounded-lg";return r&&o&&o===e.name&&(n=a),r&&!o&&"default"===e.name&&(n=a),(0,De.jsx)(Se,{to:e.name,className:n,children:e.title},`setting-tab-${t}`)}))})}function vD(){const t=Y(),[n,r]=(0,e.useState)(null);(0,e.useEffect)((()=>{(async()=>{try{const e=await Ne()({path:`${eventkoi_params.api}/settings`,method:"get",headers:{"EVENTKOI-API-KEY":eventkoi_params.api_key}});r(e),console.log(e)}catch(e){console.error("Failed to load settings:",e)}})()}),[]);const o=(0,e.useMemo)((()=>[n,r]),[n]);return(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)(Li,{root:"settings"}),(0,De.jsxs)(Fi,{className:"max-w-[1180px]",children:[(0,De.jsxs)("div",{className:Ni("w-full mx-auto items-start gap-6","grid grid-cols-1 md:grid-cols-[180px_1fr]"),children:[(0,De.jsx)(gD,{settings:n,setSettings:r,location:t}),(0,De.jsx)("div",{className:"grid",children:n?(0,De.jsx)(de,{context:o}):(0,De.jsx)("div",{className:"p-8 text-muted-foreground",children:"Loading settings…"})})]}),(0,De.jsx)("div",{className:"h-10"})]})]})}function yD(){const[t,n]=(0,e.useState)(!1),[r,o]=(0,e.useState)(null);return(0,De.jsx)(Bi,{children:(0,De.jsxs)("div",{className:"grid w-full",children:[(0,De.jsx)(xw,{variant:"header",children:(0,De.jsx)(Vi,{level:3,children:"EventKoi API"})}),(0,De.jsx)(YN,{}),(0,De.jsxs)(xw,{className:"gap-6",children:[(0,De.jsxs)("div",{className:"space-y-2",children:[(0,De.jsx)(dy,{children:"Developer API key"}),(0,De.jsxs)("p",{className:"text-sm text-muted-foreground",children:["This key is kept private and is not displayed. You may regenerate it below if needed. The new key will be shown"," ",(0,De.jsx)("strong",{children:"only once"}),", so please copy it immediately."]})]}),r&&(0,De.jsx)("div",{className:"bg-muted/40 border border-muted rounded px-3 py-2",children:(0,De.jsx)("code",{className:"bg-transparent text-sm break-all",children:r})}),(0,De.jsx)("div",{className:"inline-flex",children:(0,De.jsx)(tl,{variant:"default",onClick:async()=>{try{n(!0);const e=await Ne()({path:`${eventkoi_params.api}/settings`,method:"POST",data:{api_key:"refresh"},headers:{"EVENTKOI-API-KEY":eventkoi_params.api_key}});e?.api_key?(o(e.api_key),gp({message:"API key regenerated successfully."})):vp("Unexpected response.")}catch(t){var e;vp(null!==(e=t?.message)&&void 0!==e?e:"Something went wrong.")}finally{n(!1)}},disabled:t,className:"w-48",children:t?"Regenerating...":"Regenerate API key"})})]})]})})}function bD({settings:t,setSettings:n}){var r;const[o,a]=(0,e.useState)(!1),[s,i]=(0,e.useState)(!1);let l;return l=t?.gmap_connection_status?s?"Testing...":"Test connection":s?"Connecting...":"Connect",(0,De.jsx)(Bi,{children:(0,De.jsxs)("div",{className:"grid w-full",children:[(0,De.jsx)(xw,{variant:"header",children:(0,De.jsx)(Vi,{level:3,children:"Google maps"})}),(0,De.jsx)(YN,{}),(0,De.jsxs)(xw,{className:"gap-6",children:[(0,De.jsxs)(MS,{className:"flex gap-x-8 bg-gray-50",children:[(0,De.jsx)(OS,{children:"You need an API key from Google to integrate Google maps. Follow this doc to generate API key."}),(0,De.jsx)(tl,{variant:"outline",onClick:()=>{window.open("https://developers.google.com/maps/documentation/javascript/get-api-key","_blank")},children:"View doc"})]}),(0,De.jsxs)("div",{className:"flex flex-col items-start gap-1.5",children:[(0,De.jsx)(dy,{htmlFor:"ek-gmap-api-key",children:"Google API key"}),(0,De.jsx)(Uv,{type:"password",id:"ek-gmap-api-key",value:null!==(r=t?.gmap_api_key)&&void 0!==r?r:"",placeholder:"Enter your API key",disabled:t?.gmap_connection_status,className:"",onChange:e=>{n((t=>({...t,gmap_api_key:e.target.value})))}})]}),(0,De.jsxs)("div",{className:"inline-flex gap-2",children:[(0,De.jsx)(tl,{variant:"default",onClick:async()=>{try{i(!0),await(async e=>{const t=`https://maps.googleapis.com/maps/api/geocode/json?address=New+York&key=${e}`,n=await fetch(t),r=await n.json();var o;if("OK"!==r.status)throw new Error(null!==(o=r?.error_message)&&void 0!==o?o:"Invalid API Key.");return r})(t?.gmap_api_key);const e=await Ne()({path:`${eventkoi_params.api}/settings`,method:"post",data:{gmap_api_key:t?.gmap_api_key,gmap_connection_status:!0},headers:{"EVENTKOI-API-KEY":t?.api_key}});n(e.settings),i(!1),gp({...e,message:"API successfully connected."})}catch(t){var e;vp(null!==(e=t?.message)&&void 0!==e?e:"Something wrong.")}finally{i(!1)}},disabled:s||!t?.gmap_api_key||o,className:"w-40",children:l}),t?.gmap_connection_status&&(0,De.jsx)(tl,{variant:"link",onClick:async()=>{try{a(!0);const e=await Ne()({path:`${eventkoi_params.api}/settings`,method:"post",data:{gmap_api_key:null,gmap_connection_status:!1},headers:{"EVENTKOI-API-KEY":eventkoi_params.api_key}});n(e.settings),a(!1),gp({...e,message:"API key removed."})}catch(t){var e;vp(null!==(e=t?.message)&&void 0!==e?e:"Something wrong.")}finally{a(!1)}},disabled:o||s,className:"w-40",children:o?"Removing...":"Remove API Key"})]})]})]})})}function xD(){const[e,t]=J();return(0,De.jsxs)("div",{className:"grid gap-8",children:[(0,De.jsx)(yD,{settings:e,setSettings:t}),(0,De.jsx)(bD,{settings:e,setSettings:t})]})}const wD=["Mo","Tu","We","Th","Fr","Sa","Su"],kD={0:"Monday",1:"Tuesday",2:"Wednesday",3:"Thursday",4:"Friday",5:"Saturday",6:"Sunday"};function SD(){const{settings:t,refreshSettings:n}=Re(),[r,o]=(0,e.useState)(!1),[a,s]=(0,e.useState)(t?.time_format||"12");(0,e.useEffect)((()=>{t?.time_format&&t.time_format!==a&&s(t.time_format)}),[t?.time_format]);const i=(0,e.useMemo)((()=>Array.isArray(t?.working_days)?t.working_days.map((e=>parseInt(e,10))):[0,1,2,3,4]),[t?.working_days]),l=(0,e.useMemo)((()=>void 0!==t?.week_starts_on?parseInt(t.week_starts_on,10):0),[t?.week_starts_on]),c=(0,e.useMemo)((()=>[...wD.slice(l),...wD.slice(0,l)]),[l]),d=async e=>{try{o(!0);const t=await Ne()({path:`${eventkoi_params.api}/settings`,method:"post",data:e,headers:{"EVENTKOI-API-KEY":eventkoi_params.api_key}});await n(),gp({...t,message:"Settings updated."})}catch(e){var t;vp(null!==(t=e?.message)&&void 0!==t?t:"Failed to update setting.")}finally{o(!1)}};return(0,De.jsx)("div",{className:"grid gap-8",children:(0,De.jsx)(Bi,{children:(0,De.jsxs)("div",{className:"grid w-full",children:[(0,De.jsx)(xw,{variant:"header",children:(0,De.jsx)(Vi,{level:3,children:"General Settings"})}),(0,De.jsx)(YN,{}),(0,De.jsxs)(xw,{className:"gap-10",children:[(0,De.jsxs)("div",{className:"grid gap-2",children:[(0,De.jsx)(dy,{htmlFor:"week-start",children:"Week starts on"}),(0,De.jsxs)(Ib,{value:String(l),onValueChange:e=>{const t=parseInt(e,10);isNaN(t)||d({week_starts_on:t})},disabled:r,children:[(0,De.jsx)(Lb,{id:"week-start",className:"w-[250px]",children:(0,De.jsx)(Pb,{placeholder:"Select a day"})}),(0,De.jsx)(Hb,{children:Object.entries(kD).map((([e,t])=>(0,De.jsx)(Vb,{value:e,children:t},`option-${e}`)))})]}),(0,De.jsx)("div",{className:"text-muted-foreground",children:"Select the day calendars use as the start of the week."})]}),(0,De.jsxs)("div",{className:"grid gap-2",children:[(0,De.jsx)(dy,{className:"text-sm font-medium",children:"Working days"}),(0,De.jsx)("div",{className:"flex items-center gap-4 flex-wrap",children:c.map(((e,t)=>{const n=(l+t)%7;return(0,De.jsx)(tl,{type:"button",size:"sm",variant:i.includes(n)?"default":"secondary",className:Ni("rounded-full w-9 h-9 p-0 transition-none text-smm font-medium",i.includes(n)?"bg-foreground text-background":"bg-secondary border border-input text-foreground/80"),onClick:()=>(e=>{const t=i.includes(e)?i.filter((t=>t!==e)):[...i,e].sort();d({working_days:t})})(n),children:e},e)}))}),(0,De.jsx)("div",{className:"text-muted-foreground",children:"Select your working days. These are used for recurring event rules."})]}),(0,De.jsxs)("div",{className:"grid gap-2",children:[(0,De.jsx)(dy,{className:"text-sm font-medium",children:"Time format"}),(0,De.jsx)(SN,{value:a,onValueChange:e=>{s(e),e!==t?.time_format&&d({time_format:e})},className:"w-[350px]",children:(0,De.jsxs)(CN,{className:"border border-input rounded-lg w-full flex",children:[(0,De.jsx)(_N,{value:"12",className:"flex-1 rounded-lg text-center",children:"12-hour (AM/PM) clock"}),(0,De.jsx)(_N,{value:"24",className:"flex-1 rounded-lg text-center",children:"24-hour clock"})]})}),(0,De.jsx)("div",{className:"text-muted-foreground",children:"Select how event times are displayed (e.g. 2:00 PM or 14:00)."})]})]})]})})})}const CD=Mi("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);function _D({isEvent:t=!1,isCalendar:n=!1}){const r=Y(),[o,a]=(0,e.useState)(!1),s=r.pathname.split("events/");if(s[1]&&(parseInt(s[1])>0||s[1].includes("add"))&&(t=!0),t)return null;const i=r.pathname.split("calendars/");return i[1]&&(parseInt(i[1])>0||i[1].includes("add"))&&(n=!0),n?null:(0,De.jsxs)("header",{className:Ni("relative bg-white shadow-sm md:shadow-none md:bg-transparent border-b px-4 py-4 md:py-2 text-sm",t&&"sticky top-8 z-[500] bg-muted h-20 shadow-sm border-none"),children:[(0,De.jsxs)("div",{className:"flex items-center justify-between md:justify-start gap-6",children:[(0,De.jsx)(Ai,{}),(0,De.jsx)("button",{onClick:()=>a(!o),className:"md:hidden text-muted-foreground focus:outline-none",children:o?(0,De.jsx)(IS,{className:"w-6 h-6"}):(0,De.jsx)(CD,{className:"w-6 h-6"})}),(0,De.jsx)("div",{className:"hidden md:flex",children:(0,De.jsx)(Ii,{tabs:Pi.main})}),(0,De.jsxs)("div",{className:"hidden md:flex ml-auto items-center gap-2",children:[(0,De.jsxs)("a",{href:"https://eventkoi.com/docs/",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-3 py-1.5 text-muted-foreground hover:text-foreground transition-colors",children:[(0,De.jsx)(il,{className:"w-4 h-4"}),(0,De.jsx)("span",{children:"Read docs"})]}),(0,De.jsxs)("a",{href:"https://eventkoi.com/docs/request-support/",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-3 py-1.5 text-muted-foreground hover:text-foreground transition-colors",children:[(0,De.jsx)(ll,{className:"w-4 h-4"}),(0,De.jsx)("span",{children:"Request support"})]})]})]}),o&&(0,De.jsxs)("div",{className:"md:hidden mt-4 space-y-4",children:[(0,De.jsx)(Ii,{tabs:Pi.main}),(0,De.jsxs)("div",{className:"flex flex-col gap-2 pt-4 border-t",children:[(0,De.jsxs)("a",{href:"https://eventkoi.com/docs/",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-0 md:px-3 py-1.5 text-muted-foreground hover:text-foreground transition-colors",children:[(0,De.jsx)(il,{className:"w-4 h-4"}),(0,De.jsx)("span",{children:"Read docs"})]}),(0,De.jsxs)("a",{href:"https://eventkoi.com/docs/request-support/",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-0 md:px-3 py-1.5 text-muted-foreground hover:text-foreground transition-colors",children:[(0,De.jsx)(ll,{className:"w-4 h-4"}),(0,De.jsx)("span",{children:"Request support"})]})]})]})]})}var jD=["light","dark"],ED=e.createContext(void 0),ND={setTheme:e=>{},themes:[]};e.memo((({forcedTheme:t,storageKey:n,attribute:r,enableSystem:o,enableColorScheme:a,defaultTheme:s,value:i,attrs:l,nonce:c})=>{let d="system"===s,u="class"===r?`var d=document.documentElement,c=d.classList;c.remove(${l.map((e=>`'${e}'`)).join(",")});`:`var d=document.documentElement,n='${r}',s='setAttribute';`,f=a?jD.includes(s)&&s?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${s}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",h=(e,t=!1,n=!0)=>{let o=i?i[e]:e,s=t?e+"|| ''":`'${o}'`,l="";return a&&n&&!t&&jD.includes(e)&&(l+=`d.style.colorScheme = '${e}';`),"class"===r?l+=t||o?`c.add(${s})`:"null":o&&(l+=`d[s](n,${s})`),l},m=t?`!function(){${u}${h(t)}}()`:o?`!function(){try{${u}var e=localStorage.getItem('${n}');if('system'===e||(!e&&${d})){var t='(prefers-color-scheme: dark)',m=window.matchMedia(t);if(m.media!==t||m.matches){${h("dark")}}else{${h("light")}}}else if(e){${i?`var x=${JSON.stringify(i)};`:""}${h(i?"x[e]":"e",!0)}}${d?"":"else{"+h(s,!1,!1)+"}"}${f}}catch(e){}}()`:`!function(){try{${u}var e=localStorage.getItem('${n}');if(e){${i?`var x=${JSON.stringify(i)};`:""}${h(i?"x[e]":"e",!0)}}else{${h(s,!1,!1)};}${f}}catch(t){}}();`;return e.createElement("script",{nonce:c,dangerouslySetInnerHTML:{__html:m}})}));const DD=({...t})=>{const{theme:n="system"}=null!=(r=e.useContext(ED))?r:ND;var r;return(0,De.jsx)(mp,{theme:n,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...t})};function TD(){const{innerWidth:e,innerHeight:t}=window;return{width:e,height:t}}function AD(){const t=Y(),{width:n}=function(){const[t,n]=(0,e.useState)(TD());return(0,e.useEffect)((()=>{function e(){n(TD())}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]),t}(),r=/^\/tickets\/orders\/[0-9a-fA-F-]{36}$/.test(t.pathname)||/^\/events\/\d+/.test(t.pathname)||/^\/calendars\/\d+/.test(t.pathname);let o=0;return n>=960&&(o=160),n<960&&n>780&&(o=32),(0,e.useEffect)((()=>{jQuery(".wp-toolbar").css({backgroundColor:"inherit"});const e=t.pathname?.split("/")?.[1];jQuery("#toplevel_page_eventkoi ul.wp-submenu-wrap li").removeClass("current"),jQuery('#toplevel_page_eventkoi ul.wp-submenu-wrap li a[href*="eventkoi#/'+e+'"]').parent().addClass("current")}),[t]),(0,De.jsxs)("div",{className:"w-full flex flex-col min-h-[calc(100vh-46px)] md:min-h-[calc(100vh-32px)]",children:[(0,De.jsx)(DD,{expand:!0,position:"bottom-right",visibleToasts:2,toastOptions:{unstyled:!0,className:"",style:{right:"1rem",bottom:"1rem"}}}),!r&&(0,De.jsx)(_D,{}),(0,De.jsxs)(he,{children:[(0,De.jsx)(ue,{index:!0,element:(0,De.jsx)(Il,{})}),(0,De.jsxs)(ue,{path:"dashboard",element:(0,De.jsx)(zi,{}),children:[(0,De.jsx)(ue,{index:!0,element:(0,De.jsx)(Ol,{})}),(0,De.jsx)(ue,{path:"overview",element:(0,De.jsx)(Ol,{})}),(0,De.jsx)(ue,{path:"*",element:(0,De.jsx)(Il,{})})]}),(0,De.jsxs)(ue,{path:"events",element:(0,De.jsx)(Pl,{}),children:[(0,De.jsx)(ue,{index:!0,element:(0,De.jsx)(MN,{})}),(0,De.jsx)(ue,{path:"",element:(0,De.jsx)(MN,{})}),(0,De.jsx)(ue,{path:"templates",element:(0,De.jsx)(ON,{})})]}),(0,De.jsxs)(ue,{path:"events/:id",element:(0,De.jsx)(Ep,{}),children:[(0,De.jsx)(ue,{path:"main",element:(0,De.jsx)(NN,{})}),(0,De.jsx)(ue,{path:"instances",element:(0,De.jsx)(vS,{})}),(0,De.jsx)(ue,{path:"instances/edit/:timestamp",element:(0,De.jsx)(DC,{})})]}),(0,De.jsxs)(ue,{path:"calendars",element:(0,De.jsx)(IN,{}),children:[(0,De.jsx)(ue,{index:!0,element:(0,De.jsx)(mD,{})}),(0,De.jsx)(ue,{path:"",element:(0,De.jsx)(mD,{})})]}),(0,De.jsxs)(ue,{path:"calendars/:id",element:(0,De.jsx)(BN,{}),children:[(0,De.jsx)(ue,{path:"main",element:(0,De.jsx)(uD,{})}),(0,De.jsx)(ue,{path:"details",element:(0,De.jsx)(eD,{})}),(0,De.jsx)(ue,{path:"embed",element:(0,De.jsx)(oD,{})})]}),(0,De.jsxs)(ue,{path:"settings",element:(0,De.jsx)(vD,{}),children:[(0,De.jsx)(ue,{index:!0,element:(0,De.jsx)(SD,{})}),(0,De.jsx)(ue,{path:"default",element:(0,De.jsx)(SD,{})}),(0,De.jsx)(ue,{path:"integrations",element:(0,De.jsx)(xD,{})})]}),(0,De.jsx)(ue,{path:"*",element:(0,De.jsx)(Il,{})})]})]})}const RD=document.getElementById("eventkoi-admin");RD&&(0,a.H)(RD).render((0,De.jsx)(xe,{children:(0,De.jsx)(Me,{children:(0,De.jsx)(AD,{})})}));const MD=window.wp.blocks,OD=("undefined"!=typeof window&&window.eventkoi_params?window.eventkoi_params.locale:"en").split("_")[0],ID=Array.from({length:12},((e,t)=>new Intl.DateTimeFormat(OD,{month:"short"}).format(new Date(2e3,t,1))));function PD({calendarApi:t,currentDate:n,setCurrentDate:r}){const[o,a]=(0,e.useState)(!1),s=t?.view?.calendar?.getOption("timeZone")||"UTC";let i=n instanceof Date?n:new Date(n);isNaN(i)&&(i=new Date);const l=vs.fromJSDate(i,{zone:s}),c=l.year,d=l.month-1;return(0,De.jsxs)(Hv,{open:o,onOpenChange:a,children:[(0,De.jsx)(Vv,{asChild:!0,children:(0,De.jsxs)(tl,{variant:"ghost",className:"text-sm box-border text-foreground bg-background shadow-none rounded border-[1px] border-border border-solid px-3 py-1 pr-2 gap-2 h-10 justify-between hover:bg-muted cursor-pointer font-normal",children:[`${ID[d]} ${c}`,(0,De.jsx)(Oi,{className:"h-4 w-4 min-w-4"})]})}),(0,De.jsxs)(Bv,{side:"bottom",align:"start",sideOffset:20,className:"w-[240px] rounded border bg-white shadow-[0_0_4px_#bbb] text-sm overflow-hidden",children:[(0,De.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,De.jsx)(tl,{variant:"ghost",size:"icon",onClick:()=>{const e=l.minus({years:1}).startOf("month").toJSDate();t.gotoDate(e),r(e)},className:"bg-transparent p-0 text-[1px] text-foreground border-none shadow-none cursor-pointer hover:bg-muted h-8",children:(0,De.jsx)(Hl,{className:"w-4 h-4"})}),(0,De.jsx)("div",{className:"text-sm font-medium",children:c}),(0,De.jsx)(tl,{variant:"ghost",size:"icon",onClick:()=>{const e=l.plus({years:1}).startOf("month").toJSDate();t.gotoDate(e),r(e)},className:"bg-transparent p-0 text-[1px] text-foreground border-none shadow-none cursor-pointer hover:bg-muted h-8",children:(0,De.jsx)(zl,{className:"w-4 h-4"})})]}),(0,De.jsx)("div",{className:"grid grid-cols-4 gap-2",children:ID.map(((e,n)=>(0,De.jsx)(tl,{variant:"ghost",className:Ni("text-sm font-medium bg-transparent text-foreground border-none shadow-none cursor-pointer hover:bg-muted",n===d&&"bg-muted text-foreground font-semibold"),onClick:()=>(e=>{const n=vs.fromObject({year:c,month:e+1,day:1},{zone:s}).toJSDate();t.gotoDate(n),r(n),a(!1)})(n),children:e},e)))})]})]})}function LD({calendarApi:e,currentDate:t,setCurrentDate:n}){return(0,De.jsxs)("div",{className:"flex items-center gap-2",children:[(0,De.jsx)(tl,{variant:"outline",size:"icon",className:"text-[1px] box-border p-0 w-10 h-10 border-solid shadow-none cursor-pointer rounded",onClick:()=>e?.prev(),children:(0,De.jsx)(Hl,{className:"w-4 h-4"})}),(0,De.jsx)(tl,{variant:"outline",size:"icon",className:"text-[1px] box-border p-0 w-10 h-10 border-solid shadow-none cursor-pointer rounded",onClick:()=>e?.next(),children:(0,De.jsx)(zl,{className:"w-4 h-4"})})]})}function FD({inputRef:e,search:t,setSearch:n,open:r,setOpen:o,filteredResults:a,paginatedResults:s,totalPages:i,page:l,setPage:c,timezone:d,timeFormat:u,setSearchOpen:f}){return(0,De.jsxs)("div",{className:"relative w-full lg:min-w-[350px]",children:[(0,De.jsx)(Uv,{ref:e,placeholder:"Search events…",value:t,onFocus:()=>o(!0),onBlur:()=>{setTimeout((()=>{o(!1),f?.(!1)}),150)},onChange:e=>n(e.target.value),className:"pl-9 h-10 w-full shadow-none border border-solid box-border rounded",autoComplete:"off"}),(0,De.jsx)("span",{className:"absolute inset-y-0 left-3 flex items-center text-muted-foreground pointer-events-none",children:(0,De.jsx)($v,{className:"w-4 h-4"})}),r&&t&&(0,De.jsx)(lj,{className:Ni("absolute z-50 left-0 top-12 w-full rounded-md border bg-popover text-popover-foreground shadow-md border-border border-solid","max-h-[400px] h-auto"),children:(0,De.jsx)(dj,{className:"p-2 max-h-[400px] overflow-y-auto",children:0===a.length?(0,De.jsx)(uj,{className:"p-4 text-muted-foreground text-sm",children:"No events found."}):(0,De.jsxs)(De.Fragment,{children:[s.map((e=>(0,De.jsxs)(mj,{value:e.title,onMouseDown:t=>{t.preventDefault(),window.open(e.url,"_blank","noopener,noreferrer"),o(!1),f?.(!1)},className:"grid gap-1 p-2 cursor-pointer text-sm text-foreground rounded-md hover:!bg-accent",children:[(0,De.jsx)("span",{className:"font-normal block",children:vs.fromISO(e.start_date||e.start,{zone:"utc"}).setZone(d).toFormat("24"===u?"d MMM yyyy, EEE • HH:mm":"d MMM yyyy, EEE • h:mma").replace("AM","am").replace("PM","pm")}),(0,De.jsx)("span",{className:"font-medium",children:e.title})]},e.id))),i>1&&(0,De.jsxs)("div",{className:"flex justify-between items-center px-2 pt-2 text-xs text-muted-foreground",children:[(0,De.jsx)(tl,{variant:"ghost",size:"sm",onMouseDown:e=>{e.preventDefault(),c((e=>Math.max(0,e-1)))},disabled:0===l,className:"cursor-pointer box-border border-none text-foreground bg-transparent shadow-none",children:"Prev"}),(0,De.jsxs)("span",{children:["Page ",l+1," of ",i]}),(0,De.jsx)(tl,{variant:"ghost",size:"sm",onMouseDown:e=>{e.preventDefault(),c((e=>Math.min(i-1,e+1)))},disabled:l>=i-1,className:"cursor-pointer box-border border-none text-foreground bg-transparent shadow-none",children:"Next"})]})]})})})]})}function zD({calendarApi:e,setCurrentDate:t,isTodayInRange:n}){return(0,De.jsx)(tl,{variant:"outline",className:Ni("border-solid box-border font-normal shadow-none cursor-pointer","rounded disabled:opacity-100 disabled:bg-background disabled:text-muted-foreground/50 text-foreground"),disabled:n,onClick:()=>{e&&(e.today(),t(e.getDate()))},children:"Today"})}var HD="Toggle",VD=e.forwardRef(((e,t)=>{const{pressed:n,defaultPressed:r,onPressedChange:o,...a}=e,[s,i]=Yl({prop:n,onChange:o,defaultProp:r??!1,caller:HD});return(0,De.jsx)(wl.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:t,onClick:Bl(e.onClick,(()=>{e.disabled||i(!s)}))})}));VD.displayName=HD;var BD=VD,WD="ToggleGroup",[UD,$D]=Wl(WD,[Du]),GD=Du(),YD=e.forwardRef(((e,t)=>{const{type:n,...r}=e;if("single"===n){const e=r;return(0,De.jsx)(KD,{...e,ref:t})}if("multiple"===n){const e=r;return(0,De.jsx)(QD,{...e,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${WD}\``)}));YD.displayName=WD;var[qD,ZD]=UD(WD),KD=e.forwardRef(((t,n)=>{const{value:r,defaultValue:o,onValueChange:a=()=>{},...s}=t,[i,l]=Yl({prop:r,defaultProp:o??"",onChange:a,caller:WD});return(0,De.jsx)(qD,{scope:t.__scopeToggleGroup,type:"single",value:e.useMemo((()=>i?[i]:[]),[i]),onItemActivate:l,onItemDeactivate:e.useCallback((()=>l("")),[l]),children:(0,De.jsx)(eT,{...s,ref:n})})})),QD=e.forwardRef(((t,n)=>{const{value:r,defaultValue:o,onValueChange:a=()=>{},...s}=t,[i,l]=Yl({prop:r,defaultProp:o??[],onChange:a,caller:WD}),c=e.useCallback((e=>l(((t=[])=>[...t,e]))),[l]),d=e.useCallback((e=>l(((t=[])=>t.filter((t=>t!==e))))),[l]);return(0,De.jsx)(qD,{scope:t.__scopeToggleGroup,type:"multiple",value:i,onItemActivate:c,onItemDeactivate:d,children:(0,De.jsx)(eT,{...s,ref:n})})}));YD.displayName=WD;var[JD,XD]=UD(WD),eT=e.forwardRef(((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:o=!0,orientation:a,dir:s,loop:i=!0,...l}=e,c=GD(n),d=Kl(s),u={role:"group",dir:d,...l};return(0,De.jsx)(JD,{scope:n,rovingFocus:o,disabled:r,children:o?(0,De.jsx)(Fu,{asChild:!0,...c,orientation:a,dir:d,loop:i,children:(0,De.jsx)(wl.div,{...u,ref:t})}):(0,De.jsx)(wl.div,{...u,ref:t})})})),tT="ToggleGroupItem",nT=e.forwardRef(((t,n)=>{const r=ZD(tT,t.__scopeToggleGroup),o=XD(tT,t.__scopeToggleGroup),a=GD(t.__scopeToggleGroup),s=r.value.includes(t.value),i=o.disabled||t.disabled,l={...t,pressed:s,disabled:i},c=e.useRef(null);return o.rovingFocus?(0,De.jsx)(zu,{asChild:!0,...a,focusable:!i,active:s,ref:c,children:(0,De.jsx)(rT,{...l,ref:n})}):(0,De.jsx)(rT,{...l,ref:n})}));nT.displayName=tT;var rT=e.forwardRef(((e,t)=>{const{__scopeToggleGroup:n,value:r,...o}=e,a=ZD(tT,n),s={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},i="single"===a.type?s:void 0;return(0,De.jsx)(VD,{...i,...o,ref:t,onPressedChange:e=>{e?a.onItemActivate(r):a.onItemDeactivate(r)}})})),oT=YD,aT=nT;const sT=Xi("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-3",sm:"h-9 px-2.5",lg:"h-11 px-5"}},defaultVariants:{variant:"default",size:"default"}});e.forwardRef((({className:e,variant:t,size:n,...r},o)=>(0,De.jsx)(BD,{ref:o,className:Ni(sT({variant:t,size:n,className:e})),...r}))).displayName=BD.displayName;const iT=e.createContext({size:"default",variant:"default"}),lT=e.forwardRef((({className:e,variant:t,size:n,children:r,...o},a)=>(0,De.jsx)(oT,{ref:a,className:Ni("flex items-center justify-center gap-1",e),...o,children:(0,De.jsx)(iT.Provider,{value:{variant:t,size:n},children:r})})));lT.displayName=oT.displayName;const cT=e.forwardRef((({className:t,children:n,variant:r,size:o,...a},s)=>{const i=e.useContext(iT);return(0,De.jsx)(aT,{ref:s,className:Ni(sT({variant:i.variant||r,size:i.size||o}),t),...a,children:n})}));function dT({calendarApi:e,view:t,setView:n}){return(0,De.jsxs)(lT,{type:"single",className:"bg-muted text-foreground gap-2 border border-solid border-border p-[4px] h-10 box-border rounded shadow-none",value:t,onValueChange:t=>{t&&(e?.changeView(t),n(t))},children:[(0,De.jsx)(cT,{value:"dayGridMonth",className:"border-none transition-none cursor-pointer shadow-none h-full rounded-sm text-foreground hover:text-foreground data-[state=on]:bg-white data-[state=on]:font-semibold",children:"Month"}),(0,De.jsx)(cT,{value:"timeGridWeek",className:"border-none transition-none cursor-pointer shadow-none h-full rounded-sm text-foreground hover:text-foreground data-[state=on]:bg-white data-[state=on]:font-semibold",children:"Week"})]})}cT.displayName=aT.displayName;const uT={0:"sunday",1:"monday",2:"tuesday",3:"wednesday",4:"thursday",5:"friday",6:"saturday"};function fT({calendarApi:t,currentDate:n,setCurrentDate:r}){const{startday:o}=eventkoi_params,a=function(e,t){const n=Object.entries(e).find((([e,n])=>n===t));return n?Number(n[0]):void 0}(uT,o),[s,i]=(0,e.useState)(n?new Date(n):new Date),[l,c]=(0,e.useState)(n?new Date(n):new Date);(0,e.useEffect)((()=>{if(n){const e=new Date(n);i(e),c(e)}}),[n]);const d={from:Xe(s,{weekStartsOn:a}),to:Up(s,{weekStartsOn:a})};return(0,De.jsx)(mv,{mode:"single",selected:d,month:l,weekStartsOn:a,onSelect:e=>{e&&e.getTime()!==s.getTime()&&(i(e),c(e),t&&t.gotoDate(e),r&&r(e))},onMonthChange:e=>{const n=e>l,o=Rp(s,e.getMonth());c(e),i(o),t&&t.gotoDate(o),r&&r(o),console.log(n?"➡️ Next button clicked":"⬅️ Prev button clicked"),console.log("Selected new date:",o)},classNames:{day_range_end:"",day_range_middle:"",day_today:"",day_outside:"text-muted-foreground",day_disabled:"",row:"flex w-full mt-2 justify-between [&>*]:flex-1 [&>td:first-child>button]:rounded-l-md [&>td:last-child>button]:rounded-r-md",head_cell:"text-muted-foreground w-9 font-bold text-sm transition-colors",day_selected:"!bg-accent !text-black",cell:"h-9 w-9 p-0",day:"h-9 w-full border-0 [&:not([aria-selected='true'])]:bg-white hover:[&:not([aria-selected='true'])]:bg-accent [&:not([aria-selected='true'])]:rounded-md transition-colors",button:"cursor-pointer",nav_button:"bg-white border-0 h-8 w-10 hover:bg-accent rounded-md transition-colors",nav_icon:"w-2.5 h-2.5"}})}function hT({calendarApi:t,currentDate:n,setCurrentDate:r}){const[o,a]=(0,e.useState)(!1);return(0,De.jsxs)(Hv,{open:o,onOpenChange:a,children:[(0,De.jsx)(Vv,{asChild:!0,children:(0,De.jsxs)(tl,{variant:"ghost",className:"text-sm box-border text-foreground bg-background shadow-none rounded border-[1px] border-border border-solid px-3 py-1 pr-2 gap-2 h-10 justify-between hover:bg-muted cursor-pointer font-normal",children:[t?.view?.title||"",(0,De.jsx)(Oi,{className:"h-4 w-4 min-w-4"})]})}),(0,De.jsx)(Bv,{side:"bottom",align:"start",sideOffset:20,className:"w-auto rounded border bg-white shadow-[0_0_4px_#bbb] text-sm overflow-hidden p-1",children:(0,De.jsx)(fT,{calendarApi:t,currentDate:n,setCurrentDate:r})})]})}function mT(e){const{calendarApi:t,currentDate:n,setCurrentDate:r,view:o,setView:a,isTodayInRange:s,search:i,setSearch:l,open:c,setOpen:d,filteredResults:u,paginatedResults:f,totalPages:h,page:m,setPage:p,timezone:g,timeFormat:v,inputRef:y}=e;return(0,De.jsxs)("div",{className:"hidden lg:flex flex-wrap items-center justify-between text-sm gap-3 w-full",children:[(0,De.jsxs)("div",{className:"flex items-center gap-2",children:[(0,De.jsx)(LD,{calendarApi:t,currentDate:n,setCurrentDate:r}),"timeGridWeek"===o||"week"===o?(0,De.jsx)(hT,{calendarApi:t,currentDate:n,setCurrentDate:r}):(0,De.jsx)(PD,{calendarApi:t,currentDate:n,setCurrentDate:r}),(0,De.jsx)(zD,{calendarApi:t,setCurrentDate:r,isTodayInRange:s}),(0,De.jsx)(FD,{inputRef:y,search:i,setSearch:l,open:c,setOpen:d,filteredResults:u,paginatedResults:f,totalPages:h,page:m,setPage:p,timezone:g,timeFormat:v})]}),(0,De.jsx)(dT,{calendarApi:t,view:o,setView:a})]})}function pT(t){const{calendarApi:n,currentDate:r,setCurrentDate:o,view:a,setView:s,isTodayInRange:i,search:l,setSearch:c,open:d,setOpen:u,filteredResults:f,paginatedResults:h,totalPages:m,page:p,setPage:g,timezone:v,timeFormat:y}=t,[b,x]=(0,e.useState)(!1),w=(0,e.useRef)(null);return(0,De.jsxs)("div",{className:"flex flex-col w-full gap-4 lg:hidden",children:[(0,De.jsxs)("div",{className:"flex justify-between items-center",children:[(0,De.jsx)(zD,{calendarApi:n,setCurrentDate:o,isTodayInRange:i}),(0,De.jsx)(dT,{calendarApi:n,view:a,setView:s})]}),b?(0,De.jsx)("div",{className:"w-full",children:(0,De.jsx)(FD,{inputRef:w,search:l,setSearch:c,open:d,setOpen:u,filteredResults:f,paginatedResults:h,totalPages:m,page:p,setPage:g,timezone:v,timeFormat:y,setSearchOpen:x})}):(0,De.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,De.jsxs)("div",{className:"flex items-center gap-2",children:[(0,De.jsx)(LD,{calendarApi:n,currentDate:r,setCurrentDate:o}),"timeGridWeek"===a||"week"===a?(0,De.jsx)(hT,{calendarApi:n,currentDate:r,setCurrentDate:o}):(0,De.jsx)(PD,{calendarApi:n,currentDate:r,setCurrentDate:o})]}),(0,De.jsx)(tl,{variant:"outline",size:"icon",className:"rounded shadow-sm border border-solid border-border cursor-pointer",onClick:()=>{x(!0),setTimeout((()=>w.current?.focus()),50)},children:(0,De.jsx)($v,{className:"w-4 h-4"})})]})]})}function gT({calendarApi:t,currentDate:n,setCurrentDate:r,view:o,setView:a,search:s,setSearch:i,events:l,timezone:c,timeFormat:d}){const[u,f]=(0,e.useState)(!1),[h,m]=(0,e.useState)(0),p=(0,e.useRef)(null),g=s?l.filter((e=>{const t=s.toLowerCase();return e.title?.toLowerCase().includes(t)||e.description?.toLowerCase().includes(t)||e.location?.toLowerCase().includes(t)})):[],v=Math.ceil(g.length/10),y=g.slice(10*h,10*(h+1));(0,e.useEffect)((()=>m(0)),[s]);const b=(()=>{if(!t)return!1;const e=t.view?.currentStart,n=t.view?.currentEnd,r=new Date;return e<=r&&r<=n})(),x={calendarApi:t,currentDate:n,setCurrentDate:r,view:o,setView:a,isTodayInRange:b,search:s,setSearch:i,open:u,setOpen:f,filteredResults:g,paginatedResults:y,totalPages:v,page:h,setPage:m,timezone:c,timeFormat:d,inputRef:p};return(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)(pT,{...x}),(0,De.jsx)(mT,{...x})]})}function vT({event:e,icon:t,title:n,name:r}){return(0,De.jsxs)("a",{href:"#",className:"flex flex-col gap-1 items-center justify-center no-underline text-sm text-foreground/90 hover:text-foreground group",onClick:t=>{t.preventDefault(),(()=>{const t=encodeURIComponent(e?.url),n=encodeURIComponent(e?.title),o=`RE: ${n}`;"whatsapp"===r&&window.open(`https://api.whatsapp.com/send?text=${n} ${t}`,"_blank"),"x"===r&&window.open(`https://x.com/intent/post?url=${t}&text=${n}`,"_blank"),"facebook"===r&&window.open(`https://www.facebook.com/sharer/sharer.php?u=${t}`,"_blank"),"linkedin"===r&&window.open(`https://www.linkedin.com/shareArticle/?mini=true&url=${t}&text=${n}`,"_blank"),"instagram"===r&&window.open(`https://www.instagram.com/?url=${t}`,"_blank"),"email"===r&&window.open(`mailto:?&subject=${o}&cc=&bcc=&body=${t}`,"_self")})()},children:[(0,De.jsx)("span",{className:"rounded-full bg-accent group-hover:bg-input flex items-center justify-center w-16 h-16",children:t}),(0,De.jsx)("span",{children:n})]})}function yT({width:e=26,height:t=20,className:n,...r}){return(0,De.jsx)(Di.SVG,{xmlns:"http://www.w3.org/2000/svg",width:e,height:t,viewBox:"0 0 29.025 22.935",children:(0,De.jsxs)("g",{transform:"translate(1.741 1.25)",children:[(0,De.jsx)(Di.Path,{d:"M5.554,6H25.989a2.562,2.562,0,0,1,2.554,2.554V23.88a2.562,2.562,0,0,1-2.554,2.554H5.554A2.562,2.562,0,0,1,3,23.88V8.554A2.562,2.562,0,0,1,5.554,6Z",transform:"translate(-3 -6)",fill:"none",stroke:"#000",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2.5"}),(0,De.jsx)(Di.Path,{d:"M28.543,9,15.771,17.94,3,9",transform:"translate(-3 -6.446)",fill:"none",stroke:"#000",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2.5"})]})})}function bT({width:e=30,height:t=30,className:n,...r}){return(0,De.jsx)(Di.SVG,{xmlns:"http://www.w3.org/2000/svg",width:e,height:t,viewBox:"0 0 30.421 30.421",children:(0,De.jsx)(Di.Path,{d:"M30.419,15.3A15.211,15.211,0,1,0,12.83,30.42V19.727H8.971V15.3h3.863V11.93c0-3.835,2.272-5.952,5.745-5.952a23.263,23.263,0,0,1,3.4.3v3.764H20.066a2.206,2.206,0,0,0-2.477,2.392V15.3h4.217l-.673,4.422H17.587V30.418A15.279,15.279,0,0,0,30.419,15.3",transform:"translate(0.002 0.001)"})})}function xT({width:e=28,height:t=28,className:n,...r}){return(0,De.jsx)(Di.SVG,{xmlns:"http://www.w3.org/2000/svg",width:e,height:t,viewBox:"0 0 27.748 27.742",children:(0,De.jsx)(Di.Path,{d:"M13.872,9a7.113,7.113,0,1,0,7.113,7.113A7.1,7.1,0,0,0,13.872,9Zm0,11.737A4.624,4.624,0,1,1,18.5,16.109a4.633,4.633,0,0,1-4.624,4.624ZM22.934,8.705a1.659,1.659,0,1,1-1.659-1.659A1.655,1.655,0,0,1,22.934,8.705Zm4.711,1.684A8.21,8.21,0,0,0,25.4,4.576a8.264,8.264,0,0,0-5.813-2.241c-2.29-.13-9.155-.13-11.446,0A8.252,8.252,0,0,0,2.333,4.57,8.237,8.237,0,0,0,.092,10.383c-.13,2.29-.13,9.155,0,11.446a8.21,8.21,0,0,0,2.241,5.813,8.274,8.274,0,0,0,5.813,2.241c2.29.13,9.155.13,11.446,0A8.21,8.21,0,0,0,25.4,27.641a8.264,8.264,0,0,0,2.241-5.813c.13-2.29.13-9.149,0-11.44Zm-2.959,13.9a4.682,4.682,0,0,1-2.637,2.637c-1.826.724-6.159.557-8.177.557s-6.357.161-8.177-.557a4.682,4.682,0,0,1-2.637-2.637C2.333,22.46,2.5,18.127,2.5,16.109s-.161-6.357.557-8.177A4.682,4.682,0,0,1,5.694,5.294c1.826-.724,6.159-.557,8.177-.557s6.357-.161,8.177.557a4.682,4.682,0,0,1,2.637,2.637c.724,1.826.557,6.159.557,8.177S25.41,22.466,24.686,24.286Z",transform:"translate(0.005 -2.238)"})})}function wT({width:e=25,height:t=25,className:n,...r}){return(0,De.jsx)(Di.SVG,{xmlns:"http://www.w3.org/2000/svg",width:e,height:t,viewBox:"0 0 24.627 24.627",children:(0,De.jsx)(Di.Path,{d:"M5.513,24.627H.407V8.185H5.513ZM2.957,5.943A2.971,2.971,0,1,1,5.914,2.958,2.982,2.982,0,0,1,2.957,5.943ZM24.622,24.627H19.527v-8c0-1.908-.038-4.354-2.655-4.354-2.655,0-3.061,2.072-3.061,4.216v8.141h-5.1V8.185h4.9v2.243h.071A5.365,5.365,0,0,1,18.51,7.773c5.167,0,6.117,3.4,6.117,7.822v9.032Z",transform:"translate(0 -0.001)"})})}function kT({width:e=29,height:t=29,className:n,...r}){return(0,De.jsx)(Di.SVG,{xmlns:"http://www.w3.org/2000/svg",width:e,height:t,viewBox:"0 0 28.555 28.555",children:(0,De.jsx)(Di.Path,{d:"M24.278,6.4A14.155,14.155,0,0,0,2.008,23.475L0,30.805l7.5-1.97a14.107,14.107,0,0,0,6.763,1.721h.006a14.286,14.286,0,0,0,14.284-14.15A14.206,14.206,0,0,0,24.278,6.4ZM14.271,28.173A11.74,11.74,0,0,1,8.28,26.535l-.427-.255L3.4,27.446l1.186-4.341-.28-.446a11.784,11.784,0,1,1,21.856-6.253A11.892,11.892,0,0,1,14.271,28.173Zm6.45-8.809c-.351-.178-2.091-1.033-2.416-1.147s-.561-.178-.8.178-.911,1.147-1.122,1.39-.414.268-.765.089a9.624,9.624,0,0,1-4.812-4.207c-.363-.625.363-.58,1.039-1.931a.655.655,0,0,0-.032-.618c-.089-.178-.8-1.919-1.09-2.626-.287-.688-.58-.593-.8-.606s-.44-.013-.676-.013a1.31,1.31,0,0,0-.943.44,3.973,3.973,0,0,0-1.237,2.951,6.927,6.927,0,0,0,1.44,3.659,15.8,15.8,0,0,0,6.042,5.341c2.244.969,3.123,1.052,4.245.886a3.621,3.621,0,0,0,2.384-1.683,2.957,2.957,0,0,0,.2-1.683C21.308,19.625,21.072,19.536,20.721,19.364Z",transform:"translate(0 -2.25)"})})}function ST({width:e=23,height:t=21,className:n,...r}){return(0,De.jsx)(Di.SVG,{xmlns:"http://www.w3.org/2000/svg",width:e,height:t,viewBox:"0 0 23.006 20.85",children:(0,De.jsx)(Di.Path,{d:"M18.118.75h3.529L13.939,9.582,23.006,21.6h-7.1l-5.56-7.29L3.984,21.6H.454L8.7,12.153,0,.75H7.28l5.025,6.662L18.119.75ZM16.881,19.483h1.956L6.216,2.756H4.12Z",transform:"translate(0 -0.75)"})})}const CT=Mi("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]),_T=Mi("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);function jT(e,t="utc",n,r){const o=n||eventkoi_params?.locale?.replace("_","-")||"en",a=r||eventkoi_params?.time_format||"12",s=vs.fromISO(e,{zone:"utc"===t?"UTC":Ns(t)}).setLocale(o);return"24"===a?s.toFormat("HH:mm"):s.toFormat("h:mma").toLowerCase().replace(":00","")}function ET(e,t="utc",n){const r=n||eventkoi_params?.locale?.replace("_","-")||"en";return vs.fromISO(e,{zone:"utc"===t?"UTC":Ns(t)}).setLocale(r).toLocaleString(vs.DATE_MED)}const NT=(e,t)=>{const n=new Date(e);return t?n.toISOString().split("T")[0].replace(/-/g,""):n.toISOString().replace(/[-:]/g,"").split(".")[0]+"Z"},DT=e=>window.open(e,"_blank","noopener,noreferrer");function TT({event:t,anchor:n,onClose:r,ignoreNextOutsideClick:o,timezone:a="UTC"}){const[s,i]=(0,e.useState)(!1),[l,c]=(0,e.useState)(!1),[d,u]=(0,e.useState)(!1),[f]=(0,e.useState)(n),h=t.location_line,m=(()=>{const e=Ns(a),n=eventkoi_params?.locale?.replace("_","-")||"en",r=eventkoi_params?.time_format||"12",o="standard"===t.date_type&&"continuous"===t.standard_type,s=t.allDay&&!o;if(o||t.start_time&&t.end_time){const o=t.start_real||t.start,a=t.end_real||t.end;return o!==a?`${ET(o,e,n)}, ${jT(o,e,n,r)} – ${ET(a,e,n)}, ${jT(a,e,n,r)}`:`${ET(o,e,n)} – ${jT(a,e,n,r)}`}return s?t.start.split("T")[0]!==t.end.split("T")[0]?`${ET(t.start,e,n)} – ${ET(t.end_real,e,n)}`:ET(t.start,e,n):vs.fromISO(t.start,{zone:e}).hasSame(vs.fromISO(t.end,{zone:e}),"day")?`${ET(t.start,e,n)}, ${jT(t.start,e,n,r)} – ${jT(t.end,e,n,r)}`:`${ET(t.start,e,n)}, ${jT(t.start,e,n,r)} – ${ET(t.end,e,n)}, ${jT(t.end,e,n,r)}`})(),p=()=>{const e=new URL("https://www.google.com/calendar/render");e.searchParams.set("action","TEMPLATE"),e.searchParams.set("text",t.title||""),e.searchParams.set("dates",`${NT(t.start,t.allDay)}/${NT(t.end,t.allDay)}`),e.searchParams.set("details",t.description||""),e.searchParams.set("location",h||""),e.searchParams.set("output","xml"),DT(e.toString())};if((0,e.useEffect)((()=>(document.body.setAttribute("data-calendar-menu-open",d?"true":"false"),()=>{document.body.removeAttribute("data-calendar-menu-open")})),[d]),(0,e.useEffect)((()=>{const e=e=>{"Escape"===e.key&&(e.stopPropagation(),r())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[r]),!t||!f)return null;const g=document.querySelector(".fc");return(0,pe.createPortal)((0,De.jsxs)(De.Fragment,{children:[(0,De.jsxs)("div",{"data-event-popover":!0,className:"absolute z-50 rounded-lg border bg-white shadow-[0_0_4px_#bbb] text-sm overflow-hidden w-[370px] max-w-full",style:{left:`${f.x}px`,top:`${f.y}px`},onMouseDown:e=>{e.target.closest("[data-event-popover]")&&e.stopPropagation()},onClick:e=>{e.target.closest("[data-event-popover]")&&e.stopPropagation()},onPointerDownCapture:e=>{s&&e.stopPropagation()},children:[(0,De.jsxs)("div",{className:"px-4 py-4 pb-0 relative",children:[(0,De.jsxs)("div",{className:"flex absolute right-1 top-1 gap-1",children:[(0,De.jsx)(tl,{size:"icon",variant:"ghost",className:"h-8 w-8 p-0 shadow-none border-none bg-transparent hover:bg-muted/20 cursor-pointer",onClick:()=>window.open(t.url,"_self"),children:(0,De.jsx)(CT,{className:"h-4 w-4"})}),(0,De.jsx)(tl,{size:"icon",variant:"ghost",className:"h-8 w-8 p-0 shadow-none border-none bg-transparent hover:bg-muted/20 cursor-pointer",onClick:r,children:(0,De.jsx)(IS,{className:"h-4 w-4"})})]}),(0,De.jsxs)("div",{className:"flex flex-col gap-2 pe-[58px]",children:[(0,De.jsx)("a",{href:t.url,className:"text-base font-semibold leading-snug text-foreground no-underline hover:underline line-clamp-2 block",children:t.title}),"recurring"===t.date_type&&(0,De.jsx)(fl,{variant:"secondary",className:"w-fit bg-[#eeeeee] hover:bg-[#eeeeee] font-normal",children:"Recurring"})]})]}),(0,De.jsxs)("div",{className:"p-4 flex flex-col gap-3",children:[(0,De.jsxs)("div",{className:"flex items-start gap-2 text-foreground text-sm leading-snug",children:[(0,De.jsx)(Rl,{className:"h-4 w-4 mt-0.5 shrink-0 text-muted-foreground"}),(0,De.jsx)("div",{className:"flex-1",children:m})]}),h&&(0,De.jsxs)("div",{className:"flex items-start gap-2 text-foreground text-sm leading-snug",children:[(0,De.jsx)(Nl,{className:"h-4 w-4 mt-0.5 shrink-0 text-muted-foreground"}),(0,De.jsx)("div",{className:"flex-1",children:h})]}),t.thumbnail&&(0,De.jsx)("img",{src:t.thumbnail,alt:"",className:"w-full h-auto rounded-none border object-cover max-h-48"}),t.description&&(0,De.jsx)("div",{className:"text-sm text-muted-foreground leading-snug line-clamp-3",children:t.description})]}),(0,De.jsxs)("div",{className:"flex justify-between items-center px-4 pb-4 gap-2",children:[(0,De.jsxs)(zm,{open:d,onOpenChange:e=>{u(e),e||(o.current=!0)},children:[(0,De.jsx)(Hm,{asChild:!0,children:(0,De.jsxs)(tl,{size:"sm",variant:"outline",className:"text-[13px] justify-between gap-2 bg-transparent border border-solid border-[#ddd] rounded-sm shadow-none cursor-pointer h-8 min-h-0",onMouseDown:e=>e.stopPropagation(),children:["Add to calendar",(0,De.jsx)(Oi,{className:"w-3.5 h-3.5"})]})}),(0,De.jsxs)($m,{align:"start",className:"w-44",onMouseDown:e=>e.stopPropagation(),children:[(0,De.jsx)(Gm,{onClick:()=>requestAnimationFrame(p),children:"Google Calendar"}),(0,De.jsx)(Gm,{onClick:()=>requestAnimationFrame((()=>DT(eventkoi_params.ical))),children:"iCalendar"}),(0,De.jsx)(Gm,{onClick:()=>requestAnimationFrame((()=>DT("https://outlook.office.com/owa/"))),children:"Outlook 365"}),(0,De.jsx)(Gm,{onClick:()=>requestAnimationFrame((()=>DT("https://outlook.live.com/owa/"))),children:"Outlook Live"})]})]}),(0,De.jsxs)(tl,{size:"sm",variant:"secondary",onClick:()=>i(!0),className:"text-[13px] gap-2 bg-transparent border border-solid border-[#ddd] rounded-sm shadow-none cursor-pointer h-8 min-h-0",children:[(0,De.jsx)(_T,{className:"w-3.5 h-3.5"}),"Share"]})]})]}),(0,De.jsx)(nj,{open:s,onOpenChange:e=>{i(e),document.body.dataset.shareModalOpen=e?"true":"false",e||(o.current=!0)},children:(0,De.jsxs)(aj,{"data-event-share-modal":!0,className:"w-full max-w-[685px] p-0",onOpenAutoFocus:e=>e.preventDefault(),onMouseDown:e=>e.stopPropagation(),onPointerDownOutside:e=>{e.preventDefault(),i(!1),o.current=!0},children:[(0,De.jsx)(sj,{className:"flex items-center justify-center p-4 border-0 border-solid border-b-2 border-input",children:(0,De.jsx)(ij,{className:"font-sans text-xl m-0 text-foreground",children:"Share this event"})}),(0,De.jsxs)("div",{className:"flex flex-col pt-[30px] pb-[60px] px-[60px]",children:[(0,De.jsxs)("div",{className:"flex gap-4 items-center flex-wrap justify-center pb-[60px]",children:[(0,De.jsx)(vT,{event:t,name:"whatsapp",title:"Whatsapp",icon:(0,De.jsx)(kT,{})}),(0,De.jsx)(vT,{event:t,name:"instagram",title:"Instagram",icon:(0,De.jsx)(xT,{})}),(0,De.jsx)(vT,{event:t,name:"email",title:"Email",icon:(0,De.jsx)(yT,{})}),(0,De.jsx)(vT,{event:t,name:"facebook",title:"Facebook",icon:(0,De.jsx)(bT,{})}),(0,De.jsx)(vT,{event:t,name:"x",title:"X",icon:(0,De.jsx)(ST,{})}),(0,De.jsx)(vT,{event:t,name:"linkedin",title:"Linkedin",icon:(0,De.jsx)(wT,{})})]}),(0,De.jsxs)("div",{className:"flex flex-col gap-3 pb-[10px]",children:[(0,De.jsx)(dy,{className:"text-base",children:"Event link"}),(0,De.jsxs)("div",{className:"relative",children:[(0,De.jsx)(Uv,{id:"link",defaultValue:t?.url,readOnly:!0,className:"min-h-[66px] border border-input border-solid border-primary/30 box-border text-lg text-foreground"}),(0,De.jsxs)(tl,{variant:"secondary",type:"button",className:"absolute h-12 right-[9px] top-[9px] border-none cursor-pointer hover:bg-input",onMouseDown:e=>e.stopPropagation(),onClick:()=>{requestAnimationFrame((()=>{navigator.clipboard.writeText(t?.url),c(!0),setTimeout((()=>c(!1)),1200)}))},children:[l?(0,De.jsx)(cE,{className:"mr-2 h-5 w-5"}):(0,De.jsx)(dE,{className:"mr-2 h-5 w-5"}),l?"Copied!":"Copy"]})]})]})]})]})})]}),g||document.body)}function AT({timezone:t,setTimezone:n,timeFormat:r,setTimeFormat:o}){const[a,s]=(0,e.useState)(!1),i=function(){const e=eventkoi_params?.timezone_override||eventkoi_params?.timezone||"UTC",t=[{value:e,label:`Site Default (${xs(e,"24",!1)})`},{value:"local",label:`Local Time (${Intl.DateTimeFormat().resolvedOptions().timeZone})`},{value:"UTC",label:"UTC"}],n=("function"==typeof Intl.supportedValuesOf?Intl.supportedValuesOf("timeZone").map((e=>({value:e,label:e}))):[]).filter((t=>"UTC"!==t.value&&"local"!==t.value&&t.value!==e)).reduce(((e,t)=>{const[n]=t.value.split("/");return e[n]||(e[n]=[]),e[n].push(t),e}),{});Object.keys(n).forEach((e=>{n[e].sort(((e,t)=>e.label.localeCompare(t.label)))}));const r=Object.fromEntries(Object.entries(n).sort((([e],[t])=>e.localeCompare(t))));return{Popular:t,...r}}(),l=function(t=768){const[n,r]=(0,e.useState)(!1);return(0,e.useEffect)((()=>{function e(){r(window.innerWidth<t)}return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[t]),n}();return(0,De.jsxs)(Hv,{open:a,onOpenChange:s,children:[(0,De.jsx)(Vv,{asChild:!0,children:(0,De.jsx)(tl,{variant:"ghost","aria-haspopup":"listbox","aria-expanded":a,"aria-controls":"timezone-listbox","aria-label":`Current timezone: ${xs(t,r)}. Press Enter or Space to change.`,className:"inline-flex bg-transparent border-none cursor-pointer w-auto h-auto p-0 font-normal text-foreground underline",children:xs(t,r)})}),(0,De.jsxs)(Bv,{align:l?"start":"end",className:"p-0 w-[280px] border border-border border-solid border-[1px]",children:[(0,De.jsxs)(lj,{children:[(0,De.jsx)("div",{className:"",children:(0,De.jsx)(SN,{value:r,onValueChange:o,"aria-label":"Time format selection",className:"w-full bg-muted",children:(0,De.jsxs)(CN,{className:"flex bg-muted px-2 gap-2 shadow-none rounded-none",children:[(0,De.jsx)(_N,{value:"12",className:"rounded-sm bg-muted text-foreground hover:text-foreground flex-1 data-[state=active]:font-semibold shadow-none border-none cursor-pointer",children:"12hr (AM/PM)"}),(0,De.jsx)(_N,{value:"24",className:"rounded-sm bg-muted text-foreground hover:text-foreground flex-1 data-[state=active]:font-semibold shadow-none border-none cursor-pointer",children:"24hr"})]})})}),(0,De.jsx)(cj,{placeholder:"Search timezone...",className:"h-auto border-none focus:border-none focus:border-transparent focus:border-[0px] focus:shadow-none"}),(0,De.jsxs)(dj,{id:"timezone-listbox",role:"listbox","aria-label":"Select a timezone",className:"max-h-[300px] overflow-y-auto border-t border-border border-t-[1px] border-solid border-b-0 border-l-0 border-r-0",children:[(0,De.jsx)(uj,{children:"No timezone found."}),Object.entries(i).map((([e,r],o,a)=>(0,De.jsxs)("div",{children:[(0,De.jsx)(fj,{heading:(0,De.jsx)("span",{className:"py-1 text-sm font-medium text-foreground",children:e}),children:r.map((e=>(0,De.jsx)(mj,{role:"option","aria-selected":t===e.value,onSelect:()=>{const t=As(e.value);n(t);const r=new URLSearchParams(window.location.search);r.set("tz",e.value),window.history.replaceState({},"",`?${r}`),s(!1)},className:"cursor-pointer aria-selected:bg-accent aria-selected:text-accent-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none rounded-sm",children:e.label},e.value)))}),o<a.length-1&&(0,De.jsx)(hj,{})]},e)))]})]}),(0,De.jsxs)("span",{className:"sr-only","aria-live":"polite",children:["Selected timezone: ",xs(t,r)]})]})]})}const RT=window.wp.blockEditor;function MT(e){return"Tag"===e||"Monat"===e?"r":"Jahr"===e?"s":""}var OT={code:"de-at",week:{dow:1,doy:4},buttonText:{prev:"Zurück",next:"Vor",today:"Heute",year:"Jahr",month:"Monat",week:"Woche",day:"Tag",list:"Terminübersicht"},weekText:"KW",weekTextLong:"Woche",allDayText:"Ganztägig",moreLinkText:e=>"+ weitere "+e,noEventsText:"Keine Ereignisse anzuzeigen",buttonHints:{prev:e=>`Vorherige${MT(e)} ${e}`,next:e=>`Nächste${MT(e)} ${e}`,today:e=>"Tag"===e?"Heute":`Diese${MT(e)} ${e}`},viewHint:e=>e+("Woche"===e?"n":"Monat"===e?"s":"es")+"ansicht",navLinkHint:"Gehe zu $0",moreLinkHint:e=>"Zeige "+(1===e?"ein weiteres Ereignis":e+" weitere Ereignisse"),closeHint:"Schließen",timeHint:"Uhrzeit",eventHint:"Ereignis"};function IT(e){return"Tag"===e||"Monat"===e?"r":"Jahr"===e?"s":""}var PT,LT,FT,zT,HT,VT,BT,WT,UT,$T={code:"de",week:{dow:1,doy:4},buttonText:{prev:"Zurück",next:"Vor",today:"Heute",year:"Jahr",month:"Monat",week:"Woche",day:"Tag",list:"Terminübersicht"},weekText:"KW",weekTextLong:"Woche",allDayText:"Ganztägig",moreLinkText:e=>"+ weitere "+e,noEventsText:"Keine Ereignisse anzuzeigen",buttonHints:{prev:e=>`Vorherige${IT(e)} ${e}`,next:e=>`Nächste${IT(e)} ${e}`,today:e=>"Tag"===e?"Heute":`Diese${IT(e)} ${e}`},viewHint:e=>e+("Woche"===e?"n":"Monat"===e?"s":"es")+"ansicht",navLinkHint:"Gehe zu $0",moreLinkHint:e=>"Zeige "+(1===e?"ein weiteres Ereignis":e+" weitere Ereignisse"),closeHint:"Schließen",timeHint:"Uhrzeit",eventHint:"Ereignis"},GT=[{code:"af",week:{dow:1,doy:4},buttonText:{prev:"Vorige",next:"Volgende",today:"Vandag",year:"Jaar",month:"Maand",week:"Week",day:"Dag",list:"Agenda"},allDayText:"Heeldag",moreLinkText:"Addisionele",noEventsText:"Daar is geen gebeurtenisse nie"},{code:"ar-dz",week:{dow:0,doy:4},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",year:"سنة",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"},{code:"ar-kw",week:{dow:0,doy:12},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",year:"سنة",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"},{code:"ar-ly",week:{dow:6,doy:12},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",year:"سنة",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"},{code:"ar-ma",week:{dow:6,doy:12},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",year:"سنة",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"},{code:"ar-sa",week:{dow:0,doy:6},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",year:"سنة",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"},{code:"ar-tn",week:{dow:1,doy:4},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",year:"سنة",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"},{code:"ar",week:{dow:6,doy:12},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",year:"سنة",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"},{code:"az",week:{dow:1,doy:4},buttonText:{prev:"Əvvəl",next:"Sonra",today:"Bu Gün",year:"Il",month:"Ay",week:"Həftə",day:"Gün",list:"Gündəm"},weekText:"Həftə",allDayText:"Bütün Gün",moreLinkText:e=>"+ daha çox "+e,noEventsText:"Göstərmək üçün hadisə yoxdur"},{code:"bg",week:{dow:1,doy:4},buttonText:{prev:"назад",next:"напред",today:"днес",year:"година",month:"Месец",week:"Седмица",day:"Ден",list:"График"},allDayText:"Цял ден",moreLinkText:e=>"+още "+e,noEventsText:"Няма събития за показване"},{code:"bn",week:{dow:0,doy:6},buttonText:{prev:"পেছনে",next:"সামনে",today:"আজ",year:"বছর",month:"মাস",week:"সপ্তাহ",day:"দিন",list:"তালিকা"},weekText:"সপ্তাহ",allDayText:"সারাদিন",moreLinkText:e=>"+অন্যান্য "+e,noEventsText:"কোনো ইভেন্ট নেই"},{code:"bs",week:{dow:1,doy:7},buttonText:{prev:"Prošli",next:"Sljedeći",today:"Danas",year:"Godina",month:"Mjesec",week:"Sedmica",day:"Dan",list:"Raspored"},weekText:"Sed",allDayText:"Cijeli dan",moreLinkText:e=>"+ još "+e,noEventsText:"Nema događaja za prikazivanje"},{code:"ca",week:{dow:1,doy:4},buttonText:{prev:"Anterior",next:"Següent",today:"Avui",year:"Any",month:"Mes",week:"Setmana",day:"Dia",list:"Agenda"},weekText:"Set",allDayText:"Tot el dia",moreLinkText:"més",noEventsText:"No hi ha esdeveniments per mostrar"},{code:"cs",week:{dow:1,doy:4},buttonText:{prev:"Dříve",next:"Později",today:"Nyní",year:"Rok",month:"Měsíc",week:"Týden",day:"Den",list:"Agenda"},weekText:"Týd",allDayText:"Celý den",moreLinkText:e=>"+další: "+e,noEventsText:"Žádné akce k zobrazení"},{code:"cy",week:{dow:1,doy:4},buttonText:{prev:"Blaenorol",next:"Nesaf",today:"Heddiw",year:"Blwyddyn",month:"Mis",week:"Wythnos",day:"Dydd",list:"Rhestr"},weekText:"Wythnos",allDayText:"Trwy'r dydd",moreLinkText:"Mwy",noEventsText:"Dim digwyddiadau"},{code:"da",week:{dow:1,doy:4},buttonText:{prev:"Forrige",next:"Næste",today:"I dag",year:"År",month:"Måned",week:"Uge",day:"Dag",list:"Agenda"},weekText:"Uge",allDayText:"Hele dagen",moreLinkText:"flere",noEventsText:"Ingen arrangementer at vise"},OT,$T,{code:"el",week:{dow:1,doy:4},buttonText:{prev:"Προηγούμενος",next:"Επόμενος",today:"Σήμερα",year:"Ετος",month:"Μήνας",week:"Εβδομάδα",day:"Ημέρα",list:"Ατζέντα"},weekText:"Εβδ",allDayText:"Ολοήμερο",moreLinkText:"περισσότερα",noEventsText:"Δεν υπάρχουν γεγονότα προς εμφάνιση"},{code:"en-au",week:{dow:1,doy:4},buttonHints:{prev:"Previous $0",next:"Next $0",today:"This $0"},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint:e=>`Show ${e} more event${1===e?"":"s"}`},{code:"en-gb",week:{dow:1,doy:4},buttonHints:{prev:"Previous $0",next:"Next $0",today:"This $0"},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint:e=>`Show ${e} more event${1===e?"":"s"}`},{code:"en-nz",week:{dow:1,doy:4},buttonHints:{prev:"Previous $0",next:"Next $0",today:"This $0"},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint:e=>`Show ${e} more event${1===e?"":"s"}`},{code:"eo",week:{dow:1,doy:4},buttonText:{prev:"Antaŭa",next:"Sekva",today:"Hodiaŭ",year:"Jaro",month:"Monato",week:"Semajno",day:"Tago",list:"Tagordo"},weekText:"Sm",allDayText:"Tuta tago",moreLinkText:"pli",noEventsText:"Neniuj eventoj por montri"},{code:"es",week:{dow:0,doy:6},buttonText:{prev:"Ant",next:"Sig",today:"Hoy",year:"Año",month:"Mes",week:"Semana",day:"Día",list:"Agenda"},weekText:"Sm",allDayText:"Todo el día",moreLinkText:"más",noEventsText:"No hay eventos para mostrar"},{code:"es",week:{dow:1,doy:4},buttonText:{prev:"Ant",next:"Sig",today:"Hoy",year:"Año",month:"Mes",week:"Semana",day:"Día",list:"Agenda"},buttonHints:{prev:"$0 antes",next:"$0 siguiente",today:e=>"Día"===e?"Hoy":("Semana"===e?"Esta":"Este")+" "+e.toLocaleLowerCase()},viewHint:e=>"Vista "+("Semana"===e?"de la":"del")+" "+e.toLocaleLowerCase(),weekText:"Sm",weekTextLong:"Semana",allDayText:"Todo el día",moreLinkText:"más",moreLinkHint:e=>`Mostrar ${e} eventos más`,noEventsText:"No hay eventos para mostrar",navLinkHint:"Ir al $0",closeHint:"Cerrar",timeHint:"La hora",eventHint:"Evento"},{code:"et",week:{dow:1,doy:4},buttonText:{prev:"Eelnev",next:"Järgnev",today:"Täna",year:"Aasta",month:"Kuu",week:"Nädal",day:"Päev",list:"Päevakord"},weekText:"näd",allDayText:"Kogu päev",moreLinkText:e=>"+ veel "+e,noEventsText:"Kuvamiseks puuduvad sündmused"},{code:"eu",week:{dow:1,doy:7},buttonText:{prev:"Aur",next:"Hur",today:"Gaur",year:"Urtea",month:"Hilabetea",week:"Astea",day:"Eguna",list:"Agenda"},weekText:"As",allDayText:"Egun osoa",moreLinkText:"gehiago",noEventsText:"Ez dago ekitaldirik erakusteko"},{code:"fa",week:{dow:6,doy:12},direction:"rtl",buttonText:{prev:"قبلی",next:"بعدی",today:"امروز",year:"سال",month:"ماه",week:"هفته",day:"روز",list:"برنامه"},weekText:"هف",allDayText:"تمام روز",moreLinkText:e=>"بیش از "+e,noEventsText:"هیچ رویدادی به نمایش"},{code:"fi",week:{dow:1,doy:4},buttonText:{prev:"Edellinen",next:"Seuraava",today:"Tänään",year:"Vuosi",month:"Kuukausi",week:"Viikko",day:"Päivä",list:"Tapahtumat"},weekText:"Vk",allDayText:"Koko päivä",moreLinkText:"lisää",noEventsText:"Ei näytettäviä tapahtumia"},{code:"fr",buttonText:{prev:"Précédent",next:"Suivant",today:"Aujourd'hui",year:"Année",month:"Mois",week:"Semaine",day:"Jour",list:"Mon planning"},weekText:"Sem.",allDayText:"Toute la journée",moreLinkText:"en plus",noEventsText:"Aucun évènement à afficher"},{code:"fr-ch",week:{dow:1,doy:4},buttonText:{prev:"Précédent",next:"Suivant",today:"Courant",year:"Année",month:"Mois",week:"Semaine",day:"Jour",list:"Mon planning"},weekText:"Sm",allDayText:"Toute la journée",moreLinkText:"en plus",noEventsText:"Aucun évènement à afficher"},{code:"fr",week:{dow:1,doy:4},buttonText:{prev:"Précédent",next:"Suivant",today:"Aujourd'hui",year:"Année",month:"Mois",week:"Semaine",day:"Jour",list:"Planning"},weekText:"Sem.",weekTextLong:"Semaine",allDayText:"Toute la journée",moreLinkText:"en plus",noEventsText:"Aucun évènement à afficher"},{code:"gl",week:{dow:1,doy:4},buttonText:{prev:"Ant",next:"Seg",today:"Hoxe",year:"Ano",month:"Mes",week:"Semana",day:"Día",list:"Axenda"},buttonHints:{prev:"$0 antes",next:"$0 seguinte",today:e=>"Día"===e?"Hoxe":("Semana"===e?"Esta":"Este")+" "+e.toLocaleLowerCase()},viewHint:e=>"Vista "+("Semana"===e?"da":"do")+" "+e.toLocaleLowerCase(),weekText:"Sm",weekTextLong:"Semana",allDayText:"Todo o día",moreLinkText:"máis",moreLinkHint:e=>`Amosar ${e} eventos máis`,noEventsText:"Non hai eventos para amosar",navLinkHint:"Ir ao $0",closeHint:"Pechar",timeHint:"A hora",eventHint:"Evento"},{code:"he",direction:"rtl",buttonText:{prev:"הקודם",next:"הבא",today:"היום",year:"שנה",month:"חודש",week:"שבוע",day:"יום",list:"סדר יום"},allDayText:"כל היום",moreLinkText:"נוספים",noEventsText:"אין אירועים להצגה",weekText:"שבוע"},{code:"hi",week:{dow:0,doy:6},buttonText:{prev:"पिछला",next:"अगला",today:"आज",year:"वर्ष",month:"महीना",week:"सप्ताह",day:"दिन",list:"कार्यसूची"},weekText:"हफ्ता",allDayText:"सभी दिन",moreLinkText:e=>"+अधिक "+e,noEventsText:"कोई घटनाओं को प्रदर्शित करने के लिए"},{code:"hr",week:{dow:1,doy:7},buttonText:{prev:"Prijašnji",next:"Sljedeći",today:"Danas",year:"Godina",month:"Mjesec",week:"Tjedan",day:"Dan",list:"Raspored"},weekText:"Tje",allDayText:"Cijeli dan",moreLinkText:e=>"+ još "+e,noEventsText:"Nema događaja za prikaz"},{code:"hu",week:{dow:1,doy:4},buttonText:{prev:"vissza",next:"előre",today:"ma",year:"Év",month:"Hónap",week:"Hét",day:"Nap",list:"Lista"},weekText:"Hét",allDayText:"Egész nap",moreLinkText:"további",noEventsText:"Nincs megjeleníthető esemény"},{code:"hy-am",week:{dow:1,doy:4},buttonText:{prev:"Նախորդ",next:"Հաջորդ",today:"Այսօր",year:"Տարի",month:"Ամիս",week:"Շաբաթ",day:"Օր",list:"Օրվա ցուցակ"},weekText:"Շաբ",allDayText:"Ամբողջ օր",moreLinkText:e=>"+ ևս "+e,noEventsText:"Բացակայում է իրադարձությունը ցուցադրելու"},{code:"id",week:{dow:1,doy:7},buttonText:{prev:"mundur",next:"maju",today:"hari ini",year:"Tahun",month:"Bulan",week:"Minggu",day:"Hari",list:"Agenda"},weekText:"Mg",allDayText:"Sehari penuh",moreLinkText:"lebih",noEventsText:"Tidak ada acara untuk ditampilkan"},{code:"is",week:{dow:1,doy:4},buttonText:{prev:"Fyrri",next:"Næsti",today:"Í dag",year:"Ár",month:"Mánuður",week:"Vika",day:"Dagur",list:"Dagskrá"},weekText:"Vika",allDayText:"Allan daginn",moreLinkText:"meira",noEventsText:"Engir viðburðir til að sýna"},{code:"it",week:{dow:1,doy:4},buttonText:{prev:"Prec",next:"Succ",today:"Oggi",year:"Anno",month:"Mese",week:"Settimana",day:"Giorno",list:"Agenda"},weekText:"Sm",allDayText:"Tutto il giorno",moreLinkText:e=>"+altri "+e,noEventsText:"Non ci sono eventi da visualizzare"},{code:"ja",buttonText:{prev:"前",next:"次",today:"今日",year:"年",month:"月",week:"週",day:"日",list:"予定リスト"},weekText:"週",allDayText:"終日",moreLinkText:e=>"他 "+e+" 件",noEventsText:"表示する予定はありません"},{code:"ka",week:{dow:1,doy:7},buttonText:{prev:"წინა",next:"შემდეგი",today:"დღეს",year:"წელიწადი",month:"თვე",week:"კვირა",day:"დღე",list:"დღის წესრიგი"},weekText:"კვ",allDayText:"მთელი დღე",moreLinkText:e=>"+ კიდევ "+e,noEventsText:"ღონისძიებები არ არის"},{code:"kk",week:{dow:1,doy:7},buttonText:{prev:"Алдыңғы",next:"Келесі",today:"Бүгін",year:"Жыл",month:"Ай",week:"Апта",day:"Күн",list:"Күн тәртібі"},weekText:"Не",allDayText:"Күні бойы",moreLinkText:e=>"+ тағы "+e,noEventsText:"Көрсету үшін оқиғалар жоқ"},{code:"km",week:{dow:1,doy:4},buttonText:{prev:"មុន",next:"បន្ទាប់",today:"ថ្ងៃនេះ",year:"ឆ្នាំ",month:"ខែ",week:"សប្តាហ៍",day:"ថ្ងៃ",list:"បញ្ជី"},weekText:"សប្តាហ៍",allDayText:"ពេញមួយថ្ងៃ",moreLinkText:"ច្រើនទៀត",noEventsText:"គ្មានព្រឹត្តិការណ៍ត្រូវបង្ហាញ"},{code:"ko",buttonText:{prev:"이전달",next:"다음달",today:"오늘",year:"년도",month:"월",week:"주",day:"일",list:"일정목록"},weekText:"주",allDayText:"종일",moreLinkText:"개",noEventsText:"일정이 없습니다"},{code:"ku",week:{dow:6,doy:12},direction:"rtl",buttonText:{prev:"پێشتر",next:"دواتر",today:"ئەمڕو",year:"ساڵ",month:"مانگ",week:"هەفتە",day:"ڕۆژ",list:"بەرنامە"},weekText:"هەفتە",allDayText:"هەموو ڕۆژەکە",moreLinkText:"زیاتر",noEventsText:"هیچ ڕووداوێك نیە"},{code:"lb",week:{dow:1,doy:4},buttonText:{prev:"Zréck",next:"Weider",today:"Haut",year:"Joer",month:"Mount",week:"Woch",day:"Dag",list:"Terminiwwersiicht"},weekText:"W",allDayText:"Ganzen Dag",moreLinkText:"méi",noEventsText:"Nee Evenementer ze affichéieren"},{code:"lt",week:{dow:1,doy:4},buttonText:{prev:"Atgal",next:"Pirmyn",today:"Šiandien",year:"Metai",month:"Mėnuo",week:"Savaitė",day:"Diena",list:"Darbotvarkė"},weekText:"SAV",allDayText:"Visą dieną",moreLinkText:"daugiau",noEventsText:"Nėra įvykių rodyti"},{code:"lv",week:{dow:1,doy:4},buttonText:{prev:"Iepr.",next:"Nāk.",today:"Šodien",year:"Gads",month:"Mēnesis",week:"Nedēļa",day:"Diena",list:"Dienas kārtība"},weekText:"Ned.",allDayText:"Visu dienu",moreLinkText:e=>"+vēl "+e,noEventsText:"Nav notikumu"},{code:"mk",buttonText:{prev:"претходно",next:"следно",today:"Денес",year:"година",month:"Месец",week:"Недела",day:"Ден",list:"График"},weekText:"Сед",allDayText:"Цел ден",moreLinkText:e=>"+повеќе "+e,noEventsText:"Нема настани за прикажување"},{code:"ms",week:{dow:1,doy:7},buttonText:{prev:"Sebelum",next:"Selepas",today:"hari ini",year:"Tahun",month:"Bulan",week:"Minggu",day:"Hari",list:"Agenda"},weekText:"Mg",allDayText:"Sepanjang hari",moreLinkText:e=>"masih ada "+e+" acara",noEventsText:"Tiada peristiwa untuk dipaparkan"},{code:"nb",week:{dow:1,doy:4},buttonText:{prev:"Forrige",next:"Neste",today:"I dag",year:"År",month:"Måned",week:"Uke",day:"Dag",list:"Agenda"},weekText:"Uke",weekTextLong:"Uke",allDayText:"Hele dagen",moreLinkText:"til",noEventsText:"Ingen hendelser å vise",buttonHints:{prev:"Forrige $0",next:"Neste $0",today:"Nåværende $0"},viewHint:"$0 visning",navLinkHint:"Gå til $0",moreLinkHint:e=>`Vis ${e} flere hendelse${1===e?"":"r"}`},{code:"ne",week:{dow:7,doy:1},buttonText:{prev:"अघिल्लो",next:"अर्को",today:"आज",year:"वर्ष",month:"महिना",week:"हप्ता",day:"दिन",list:"सूची"},weekText:"हप्ता",allDayText:"दिनभरि",moreLinkText:"थप लिंक",noEventsText:"देखाउनको लागि कुनै घटनाहरू छैनन्"},{code:"nl",week:{dow:1,doy:4},buttonText:{prev:"Vorige",next:"Volgende",today:"Vandaag",year:"Jaar",month:"Maand",week:"Week",day:"Dag",list:"Lijst"},allDayText:"Hele dag",moreLinkText:"extra",noEventsText:"Geen evenementen om te laten zien"},{code:"nn",week:{dow:1,doy:4},buttonText:{prev:"Førre",next:"Neste",today:"I dag",year:"År",month:"Månad",week:"Veke",day:"Dag",list:"Agenda"},weekText:"Veke",allDayText:"Heile dagen",moreLinkText:"til",noEventsText:"Ingen hendelser å vise"},{code:"pl",week:{dow:1,doy:4},buttonText:{prev:"Poprzedni",next:"Następny",today:"Dziś",year:"Rok",month:"Miesiąc",week:"Tydzień",day:"Dzień",list:"Plan dnia"},weekText:"Tydz",allDayText:"Cały dzień",moreLinkText:"więcej",noEventsText:"Brak wydarzeń do wyświetlenia"},{code:"pt-br",buttonText:{prev:"Anterior",next:"Próximo",prevYear:"Ano anterior",nextYear:"Próximo ano",year:"Ano",today:"Hoje",month:"Mês",week:"Semana",day:"Dia",list:"Lista"},buttonHints:{prev:"$0 Anterior",next:"Próximo $0",today:e=>"Dia"===e?"Hoje":("Semana"===e?"Esta":"Este")+" "+e.toLocaleLowerCase()},viewHint:e=>"Visualizar "+("Semana"===e?"a":"o")+" "+e.toLocaleLowerCase(),weekText:"Sm",weekTextLong:"Semana",allDayText:"dia inteiro",moreLinkText:e=>"mais +"+e,moreLinkHint:e=>`Mostrar mais ${e} eventos`,noEventsText:"Não há eventos para mostrar",navLinkHint:"Ir para $0",closeHint:"Fechar",timeHint:"A hora",eventHint:"Evento"},{code:"pt",week:{dow:1,doy:4},buttonText:{prev:"Anterior",next:"Seguinte",today:"Hoje",year:"Ano",month:"Mês",week:"Semana",day:"Dia",list:"Agenda"},weekText:"Sem",allDayText:"Todo o dia",moreLinkText:"mais",noEventsText:"Não há eventos para mostrar"},{code:"ro",week:{dow:1,doy:7},buttonText:{prev:"precedentă",next:"următoare",today:"Azi",year:"An",month:"Lună",week:"Săptămână",day:"Zi",list:"Agendă"},weekText:"Săpt",allDayText:"Toată ziua",moreLinkText:e=>"+alte "+e,noEventsText:"Nu există evenimente de afișat"},{code:"ru",week:{dow:1,doy:4},buttonText:{prev:"Пред",next:"След",today:"Сегодня",year:"Год",month:"Месяц",week:"Неделя",day:"День",list:"Повестка дня"},weekText:"Нед",allDayText:"Весь день",moreLinkText:e=>"+ ещё "+e,noEventsText:"Нет событий для отображения"},{code:"si-lk",week:{dow:1,doy:4},buttonText:{prev:"පෙර",next:"පසු",today:"අද",year:"අවුරුදු",month:"මාසය",week:"සතිය",day:"දවස",list:"ලැයිස්තුව"},weekText:"සති",allDayText:"සියලු",moreLinkText:"තවත්",noEventsText:"මුකුත් නැත"},{code:"sk",week:{dow:1,doy:4},buttonText:{prev:"Predchádzajúci",next:"Nasledujúci",today:"Dnes",year:"Rok",month:"Mesiac",week:"Týždeň",day:"Deň",list:"Rozvrh"},weekText:"Ty",allDayText:"Celý deň",moreLinkText:e=>"+ďalšie: "+e,noEventsText:"Žiadne akcie na zobrazenie"},{code:"sl",week:{dow:1,doy:7},buttonText:{prev:"Prejšnji",next:"Naslednji",today:"Trenutni",year:"Leto",month:"Mesec",week:"Teden",day:"Dan",list:"Dnevni red"},weekText:"Teden",allDayText:"Ves dan",moreLinkText:"več",noEventsText:"Ni dogodkov za prikaz"},{code:"sm",buttonText:{prev:"Talu ai",next:"Mulimuli atu",today:"Aso nei",year:"Tausaga",month:"Masina",week:"Vaiaso",day:"Aso",list:"Faasologa"},weekText:"Vaiaso",allDayText:"Aso atoa",moreLinkText:"sili atu",noEventsText:"Leai ni mea na tutupu"},{code:"sq",week:{dow:1,doy:4},buttonText:{prev:"mbrapa",next:"Përpara",today:"Sot",year:"Viti",month:"Muaj",week:"Javë",day:"Ditë",list:"Listë"},weekText:"Ja",allDayText:"Gjithë ditën",moreLinkText:e=>"+më tepër "+e,noEventsText:"Nuk ka evente për të shfaqur"},{code:"sr-cyrl",week:{dow:1,doy:7},buttonText:{prev:"Претходна",next:"следећи",today:"Данас",year:"Година",month:"Месец",week:"Недеља",day:"Дан",list:"Планер"},weekText:"Сед",allDayText:"Цео дан",moreLinkText:e=>"+ још "+e,noEventsText:"Нема догађаја за приказ"},{code:"sr",week:{dow:1,doy:7},buttonText:{prev:"Prethodna",next:"Sledeći",today:"Danas",year:"Godina",month:"Mеsеc",week:"Nеdеlja",day:"Dan",list:"Planеr"},weekText:"Sed",allDayText:"Cеo dan",moreLinkText:e=>"+ još "+e,noEventsText:"Nеma događaja za prikaz"},{code:"sv",week:{dow:1,doy:4},buttonText:{prev:"Förra",next:"Nästa",today:"Idag",year:"År",month:"Månad",week:"Vecka",day:"Dag",list:"Program"},buttonHints:{prev:e=>`Föregående ${e.toLocaleLowerCase()}`,next:e=>`Nästa ${e.toLocaleLowerCase()}`,today:e=>("Program"===e?"Detta":"Denna")+" "+e.toLocaleLowerCase()},viewHint:"$0 vy",navLinkHint:"Gå till $0",moreLinkHint:e=>`Visa ytterligare ${e} händelse${1===e?"":"r"}`,weekText:"v.",weekTextLong:"Vecka",allDayText:"Heldag",moreLinkText:"till",noEventsText:"Inga händelser att visa",closeHint:"Stäng",timeHint:"Klockan",eventHint:"Händelse"},{code:"ta-in",week:{dow:1,doy:4},buttonText:{prev:"முந்தைய",next:"அடுத்தது",today:"இன்று",year:"ஆண்டு",month:"மாதம்",week:"வாரம்",day:"நாள்",list:"தினசரி அட்டவணை"},weekText:"வாரம்",allDayText:"நாள் முழுவதும்",moreLinkText:e=>"+ மேலும் "+e,noEventsText:"காண்பிக்க நிகழ்வுகள் இல்லை"},{code:"th",week:{dow:1,doy:4},buttonText:{prev:"ก่อนหน้า",next:"ถัดไป",prevYear:"ปีก่อนหน้า",nextYear:"ปีถัดไป",year:"ปี",today:"วันนี้",month:"เดือน",week:"สัปดาห์",day:"วัน",list:"กำหนดการ"},weekText:"สัปดาห์",allDayText:"ตลอดวัน",moreLinkText:"เพิ่มเติม",noEventsText:"ไม่มีกิจกรรมที่จะแสดง"},{code:"tr",week:{dow:1,doy:7},buttonText:{prev:"geri",next:"ileri",today:"bugün",year:"Yıl",month:"Ay",week:"Hafta",day:"Gün",list:"Ajanda"},weekText:"Hf",allDayText:"Tüm gün",moreLinkText:"daha fazla",noEventsText:"Gösterilecek etkinlik yok"},{code:"ug",buttonText:{prev:"ئالدىنقى",next:"كېيىنكى",today:"بۈگۈن",year:"يىل",month:"ئاي",week:"ھەپتە",day:"كۈن",list:"كۈنتەرتىپ"},allDayText:"پۈتۈن كۈن"},{code:"uk",week:{dow:1,doy:7},buttonText:{prev:"Попередній",next:"далі",today:"Сьогодні",year:"рік",month:"Місяць",week:"Тиждень",day:"День",list:"Порядок денний"},weekText:"Тиж",allDayText:"Увесь день",moreLinkText:e=>"+ще "+e+"...",noEventsText:"Немає подій для відображення"},{code:"uz-cy",week:{dow:1,doy:4},buttonText:{prev:"Олин",next:"Кейин",today:"Бугун",month:"Ой",week:"Ҳафта",day:"Кун",list:"Кун тартиби"},weekText:"Ҳафта",allDayText:"Кун бўйича",moreLinkText:e=>"+ яна "+e,noEventsText:"Кўрсатиш учун воқеалар йўқ"},{code:"uz",week:{dow:1,doy:4},buttonText:{prev:"Oldingi",next:"Keyingi",today:"Bugun",year:"Yil",month:"Oy",week:"Xafta",day:"Kun",list:"Kun tartibi"},allDayText:"Kun bo'yi",moreLinkText:e=>"+ yana "+e,noEventsText:"Ko'rsatish uchun voqealar yo'q"},{code:"vi",week:{dow:1,doy:4},buttonText:{prev:"Trước",next:"Tiếp",today:"Hôm nay",year:"Năm",month:"Tháng",week:"Tuần",day:"Ngày",list:"Lịch biểu"},weekText:"Tu",allDayText:"Cả ngày",moreLinkText:e=>"+ thêm "+e,noEventsText:"Không có sự kiện để hiển thị"},{code:"zh-cn",week:{dow:1,doy:4},buttonText:{prev:"上月",next:"下月",today:"今天",year:"年",month:"月",week:"周",day:"日",list:"日程"},weekText:"周",allDayText:"全天",moreLinkText:e=>"另外 "+e+" 个",noEventsText:"没有事件显示"},{code:"zh-tw",buttonText:{prev:"上個",next:"下個",today:"今天",year:"年",month:"月",week:"週",day:"天",list:"活動列表"},weekText:"週",allDayText:"整天",moreLinkText:"顯示更多",noEventsText:"沒有任何活動"}],YT={},qT=[],ZT=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function KT(e,t){for(var n in t)e[n]=t[n];return e}function QT(e){var t=e.parentNode;t&&t.removeChild(e)}function JT(e,t,n){var r,o,a,s={};for(a in t)"key"==a?r=t[a]:"ref"==a?o=t[a]:s[a]=t[a];if(arguments.length>2&&(s.children=arguments.length>3?PT.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===s[a]&&(s[a]=e.defaultProps[a]);return XT(e,s,r,o,null)}function XT(e,t,n,r,o){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++FT:o};return null==o&&null!=LT.vnode&&LT.vnode(a),a}function eA(e){return e.children}function tA(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||ZT.test(t)?n:n+"px"}function nA(e,t,n,r,o){var a;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||tA(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||tA(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])a=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=n,n?r||e.addEventListener(t,a?oA:rA,a):e.removeEventListener(t,a?oA:rA,a);else if("dangerouslySetInnerHTML"!==t){if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&-1==t.indexOf("-")?e.removeAttribute(t):e.setAttribute(t,n))}}function rA(e){HT=!0;try{return this.l[e.type+!1](LT.event?LT.event(e):e)}finally{HT=!1}}function oA(e){HT=!0;try{return this.l[e.type+!0](LT.event?LT.event(e):e)}finally{HT=!1}}function aA(e,t){this.props=e,this.context=t}function sA(e,t){if(null==t)return e.__?sA(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?sA(e):null}function iA(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return iA(e)}}function lA(e){HT?setTimeout(e):WT(e)}function cA(e){(!e.__d&&(e.__d=!0)&&VT.push(e)&&!dA.__r++||BT!==LT.debounceRendering)&&((BT=LT.debounceRendering)||lA)(dA)}function dA(){var e,t,n,r,o,a,s,i;for(VT.sort((function(e,t){return e.__v.__b-t.__v.__b}));e=VT.shift();)e.__d&&(t=VT.length,r=void 0,o=void 0,s=(a=(n=e).__v).__e,(i=n.__P)&&(r=[],(o=KT({},a)).__v=a.__v+1,gA(i,a,o,n.__n,void 0!==i.ownerSVGElement,null!=a.__h?[s]:null,r,null==s?sA(a):s,a.__h),vA(r,a),a.__e!=s&&iA(a)),VT.length>t&&VT.sort((function(e,t){return e.__v.__b-t.__v.__b})));dA.__r=0}function uA(e,t,n,r,o,a,s,i,l,c){var d,u,f,h,m,p,g,v=r&&r.__k||qT,y=v.length;for(n.__k=[],d=0;d<t.length;d++)if(null!=(h=n.__k[d]=null==(h=t[d])||"boolean"==typeof h?null:"string"==typeof h||"number"==typeof h||"bigint"==typeof h?XT(null,h,null,null,h):Array.isArray(h)?XT(eA,{children:h},null,null,null):h.__b>0?XT(h.type,h.props,h.key,h.ref?h.ref:null,h.__v):h)){if(h.__=n,h.__b=n.__b+1,null===(f=v[d])||f&&h.key==f.key&&h.type===f.type)v[d]=void 0;else for(u=0;u<y;u++){if((f=v[u])&&h.key==f.key&&h.type===f.type){v[u]=void 0;break}f=null}gA(e,h,f=f||YT,o,a,s,i,l,c),m=h.__e,(u=h.ref)&&f.ref!=u&&(g||(g=[]),f.ref&&g.push(f.ref,null,h),g.push(u,h.__c||m,h)),null!=m?(null==p&&(p=m),"function"==typeof h.type&&h.__k===f.__k?h.__d=l=fA(h,l,e):l=mA(e,h,f,v,m,l),"function"==typeof n.type&&(n.__d=l)):l&&f.__e==l&&l.parentNode!=e&&(l=sA(f))}for(n.__e=p,d=y;d--;)null!=v[d]&&("function"==typeof n.type&&null!=v[d].__e&&v[d].__e==n.__d&&(n.__d=pA(r).nextSibling),xA(v[d],v[d]));if(g)for(d=0;d<g.length;d++)bA(g[d],g[++d],g[++d])}function fA(e,t,n){for(var r,o=e.__k,a=0;o&&a<o.length;a++)(r=o[a])&&(r.__=e,t="function"==typeof r.type?fA(r,t,n):mA(n,r,r,o,r.__e,t));return t}function hA(e,t){return t=t||[],null==e||"boolean"==typeof e||(Array.isArray(e)?e.some((function(e){hA(e,t)})):t.push(e)),t}function mA(e,t,n,r,o,a){var s,i,l;if(void 0!==t.__d)s=t.__d,t.__d=void 0;else if(null==n||o!=a||null==o.parentNode)e:if(null==a||a.parentNode!==e)e.appendChild(o),s=null;else{for(i=a,l=0;(i=i.nextSibling)&&l<r.length;l+=1)if(i==o)break e;e.insertBefore(o,a),s=a}return void 0!==s?s:o.nextSibling}function pA(e){var t,n,r;if(null==e.type||"string"==typeof e.type)return e.__e;if(e.__k)for(t=e.__k.length-1;t>=0;t--)if((n=e.__k[t])&&(r=pA(n)))return r;return null}function gA(e,t,n,r,o,a,s,i,l){var c,d,u,f,h,m,p,g,v,y,b,x,w,k,S,C=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(l=n.__h,i=t.__e=n.__e,t.__h=null,a=[i]),(c=LT.__b)&&c(t);try{e:if("function"==typeof C){if(g=t.props,v=(c=C.contextType)&&r[c.__c],y=c?v?v.props.value:c.__:r,n.__c?p=(d=t.__c=n.__c).__=d.__E:("prototype"in C&&C.prototype.render?t.__c=d=new C(g,y):(t.__c=d=new aA(g,y),d.constructor=C,d.render=wA),v&&v.sub(d),d.props=g,d.state||(d.state={}),d.context=y,d.__n=r,u=d.__d=!0,d.__h=[],d._sb=[]),null==d.__s&&(d.__s=d.state),null!=C.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=KT({},d.__s)),KT(d.__s,C.getDerivedStateFromProps(g,d.__s))),f=d.props,h=d.state,d.__v=t,u)null==C.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==C.getDerivedStateFromProps&&g!==f&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(g,y),!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(g,d.__s,y)||t.__v===n.__v){for(t.__v!==n.__v&&(d.props=g,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),b=0;b<d._sb.length;b++)d.__h.push(d._sb[b]);d._sb=[],d.__h.length&&s.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(g,d.__s,y),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(f,h,m)}))}if(d.context=y,d.props=g,d.__P=e,x=LT.__r,w=0,"prototype"in C&&C.prototype.render){for(d.state=d.__s,d.__d=!1,x&&x(t),c=d.render(d.props,d.state,d.context),k=0;k<d._sb.length;k++)d.__h.push(d._sb[k]);d._sb=[]}else do{d.__d=!1,x&&x(t),c=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&++w<25);d.state=d.__s,null!=d.getChildContext&&(r=KT(KT({},r),d.getChildContext())),u||null==d.getSnapshotBeforeUpdate||(m=d.getSnapshotBeforeUpdate(f,h)),S=null!=c&&c.type===eA&&null==c.key?c.props.children:c,uA(e,Array.isArray(S)?S:[S],t,n,r,o,a,s,i,l),d.base=t.__e,t.__h=null,d.__h.length&&s.push(d),p&&(d.__E=d.__=null),d.__e=!1}else null==a&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=yA(n.__e,t,n,r,o,a,s,l);(c=LT.diffed)&&c(t)}catch(e){t.__v=null,(l||null!=a)&&(t.__e=i,t.__h=!!l,a[a.indexOf(i)]=null),LT.__e(e,t,n)}}function vA(e,t){LT.__c&&LT.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){LT.__e(e,t.__v)}}))}function yA(e,t,n,r,o,a,s,i){var l,c,d,u=n.props,f=t.props,h=t.type,m=0;if("svg"===h&&(o=!0),null!=a)for(;m<a.length;m++)if((l=a[m])&&"setAttribute"in l==!!h&&(h?l.localName===h:3===l.nodeType)){e=l,a[m]=null;break}if(null==e){if(null===h)return document.createTextNode(f);e=o?document.createElementNS("http://www.w3.org/2000/svg",h):document.createElement(h,f.is&&f),a=null,i=!1}if(null===h)u===f||i&&e.data===f||(e.data=f);else{if(a=a&&PT.call(e.childNodes),c=(u=n.props||YT).dangerouslySetInnerHTML,d=f.dangerouslySetInnerHTML,!i){if(null!=a)for(u={},m=0;m<e.attributes.length;m++)u[e.attributes[m].name]=e.attributes[m].value;(d||c)&&(d&&(c&&d.__html==c.__html||d.__html===e.innerHTML)||(e.innerHTML=d&&d.__html||""))}if(function(e,t,n,r,o){var a;for(a in n)"children"===a||"key"===a||a in t||nA(e,a,null,n[a],r);for(a in t)o&&"function"!=typeof t[a]||"children"===a||"key"===a||"value"===a||"checked"===a||n[a]===t[a]||nA(e,a,t[a],n[a],r)}(e,f,u,o,i),d)t.__k=[];else if(m=t.props.children,uA(e,Array.isArray(m)?m:[m],t,n,r,o&&"foreignObject"!==h,a,s,a?a[0]:n.__k&&sA(n,0),i),null!=a)for(m=a.length;m--;)null!=a[m]&&QT(a[m]);i||("value"in f&&void 0!==(m=f.value)&&(m!==e.value||"progress"===h&&!m||"option"===h&&m!==u.value)&&nA(e,"value",m,u.value,!1),"checked"in f&&void 0!==(m=f.checked)&&m!==e.checked&&nA(e,"checked",m,u.checked,!1))}return e}function bA(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){LT.__e(e,n)}}function xA(e,t,n){var r,o;if(LT.unmount&&LT.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||bA(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){LT.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&xA(r[o],t,n||"function"!=typeof e.type);n||null==e.__e||QT(e.__e),e.__=e.__e=e.__d=void 0}function wA(e,t,n){return this.constructor(e,n)}function kA(e,t,n){var r,o,a;LT.__&&LT.__(e,t),o=(r="function"==typeof n)?null:n&&n.__k||t.__k,a=[],gA(t,e=(!r&&n||t).__k=JT(eA,null,[e]),o||YT,YT,void 0!==t.ownerSVGElement,!r&&n?[n]:o?null:t.firstChild?PT.call(t.childNodes):null,a,!r&&n?n:o?o.__e:t.firstChild,r),vA(a,e)}PT=qT.slice,LT={__e:function(e,t,n,r){for(var o,a,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((a=o.constructor)&&null!=a.getDerivedStateFromError&&(o.setState(a.getDerivedStateFromError(e)),s=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),s=o.__d),s)return o.__E=o}catch(t){e=t}throw e}},FT=0,zT=function(e){return null!=e&&void 0===e.constructor},HT=!1,aA.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=KT({},this.state),"function"==typeof e&&(e=e(KT({},n),this.props)),e&&KT(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),cA(this))},aA.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),cA(this))},aA.prototype.render=eA,VT=[],WT="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,dA.__r=0,UT=0;var SA,CA,_A,jA=[],EA=[],NA=LT.__b,DA=LT.__r,TA=LT.diffed,AA=LT.__c,RA=LT.unmount;function MA(){for(var e;e=jA.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(PA),e.__H.__h.forEach(LA),e.__H.__h=[]}catch(t){e.__H.__h=[],LT.__e(t,e.__v)}}LT.__b=function(e){SA=null,NA&&NA(e)},LT.__r=function(e){DA&&DA(e);var t=(SA=e.__c).__H;t&&(CA===SA?(t.__h=[],SA.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=EA,e.__N=e.i=void 0}))):(t.__h.forEach(PA),t.__h.forEach(LA),t.__h=[])),CA=SA},LT.diffed=function(e){TA&&TA(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==jA.push(t)&&_A===LT.requestAnimationFrame||((_A=LT.requestAnimationFrame)||IA)(MA)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==EA&&(e.__=e.__V),e.i=void 0,e.__V=EA}))),CA=SA=null},LT.__c=function(e,t){t.some((function(e){try{e.__h.forEach(PA),e.__h=e.__h.filter((function(e){return!e.__||LA(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],LT.__e(n,e.__v)}})),AA&&AA(e,t)},LT.unmount=function(e){RA&&RA(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{PA(e)}catch(e){t=e}})),n.__H=void 0,t&&LT.__e(t,n.__v))};var OA="function"==typeof requestAnimationFrame;function IA(e){var t,n=function(){clearTimeout(r),OA&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);OA&&(t=requestAnimationFrame(n))}function PA(e){var t=SA,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),SA=t}function LA(e){var t=SA;e.__c=e.__(),SA=t}function FA(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function zA(e){this.props=e}(zA.prototype=new aA).isPureReactComponent=!0,zA.prototype.shouldComponentUpdate=function(e,t){return FA(this.props,e)||FA(this.state,t)};var HA=LT.__b;LT.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),HA&&HA(e)},"undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref");var VA=LT.__e;LT.__e=function(e,t,n,r){if(e.then)for(var o,a=t;a=a.__;)if((o=a.__c)&&o.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t);VA(e,t,n,r)};var BA=LT.unmount;function WA(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=function(e,t){for(var n in t)e[n]=t[n];return e}({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return WA(e,t,n)}))),e}function UA(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return UA(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function $A(){this.__u=0,this.t=null,this.__b=null}function GA(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function YA(){this.u=null,this.o=null}LT.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),BA&&BA(e)},($A.prototype=new aA).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var o=GA(r.__v),a=!1,s=function(){a||(a=!0,n.__R=null,o?o(i):i())};n.__R=s;var i=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=UA(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},l=!0===t.__h;r.__u++||l||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},$A.prototype.componentWillUnmount=function(){this.t=[]},$A.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=WA(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&JT(eA,null,e.fallback);return o&&(o.__h=null),[JT(eA,null,t.__a?null:e.children),o]};var qA=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function ZA(e){return this.getChildContext=function(){return e.context},e.children}function KA(e){var t=this,n=e.i;t.componentWillUnmount=function(){kA(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),e.__v?(t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(e){this.childNodes.push(e),t.i.appendChild(e)},insertBefore:function(e,n){this.childNodes.push(e),t.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.i.removeChild(e)}}),kA(JT(ZA,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}(YA.prototype=new aA).__a=function(e){var t=this,n=GA(t.__v),r=t.o.get(e);return r[0]++,function(o){var a=function(){t.props.revealOrder?(r.push(o),qA(t,e,r)):o()};n?n(a):a()}},YA.prototype.render=function(e){this.u=null,this.o=new Map;var t=hA(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},YA.prototype.componentDidUpdate=YA.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){qA(e,n,t)}))};var QA="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,JA=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,XA="undefined"!=typeof document,eR=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};aA.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(aA.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var tR=LT.event;function nR(){}function rR(){return this.cancelBubble}function oR(){return this.defaultPrevented}LT.event=function(e){return tR&&(e=tR(e)),e.persist=nR,e.isPropagationStopped=rR,e.isDefaultPrevented=oR,e.nativeEvent=e};var aR={configurable:!0,get:function(){return this.class}},sR=LT.vnode;LT.vnode=function(e){var t=e.type,n=e.props,r=n;if("string"==typeof t){var o=-1===t.indexOf("-");for(var a in r={},n){var s=n[a];XA&&"children"===a&&"noscript"===t||"value"===a&&"defaultValue"in n&&null==s||("defaultValue"===a&&"value"in n&&null==n.value?a="value":"download"===a&&!0===s?s="":/ondoubleclick/i.test(a)?a="ondblclick":/^onchange(textarea|input)/i.test(a+t)&&!eR(n.type)?a="oninput":/^onfocus$/i.test(a)?a="onfocusin":/^onblur$/i.test(a)?a="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(a)?a=a.toLowerCase():o&&JA.test(a)?a=a.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===s&&(s=void 0),/^oninput$/i.test(a)&&(a=a.toLowerCase(),r[a]&&(a="oninputCapture")),r[a]=s)}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=hA(n.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==t&&null!=r.defaultValue&&(r.value=hA(n.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r,n.class!=n.className&&(aR.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",aR))}e.$$typeof=QA,sR&&sR(e)};var iR=LT.__r;LT.__r=function(e){iR&&iR(e),e.__c};const lR=[],cR=new Map;function dR(e){lR.push(e),cR.forEach((t=>{fR(t,e)}))}function uR(e){let t=cR.get(e);if(!t||!t.isConnected){if(t=e.querySelector("style[data-fullcalendar]"),!t){t=document.createElement("style"),t.setAttribute("data-fullcalendar","");const n=(void 0===hR&&(hR=function(){const e=document.querySelector('meta[name="csp-nonce"]');if(e&&e.hasAttribute("content"))return e.getAttribute("content");const t=document.querySelector("script[nonce]");return t&&t.nonce||""}()),hR);n&&(t.nonce=n);const r=e===document?document.head:e,o=e===document?r.querySelector("script,link[rel=stylesheet],link[as=style],style"):r.firstChild;r.insertBefore(t,o)}cR.set(e,t),function(e){for(const t of lR)fR(e,t)}(t)}}function fR(e,t){const{sheet:n}=e,r=n.cssRules.length;t.split("}").forEach(((e,t)=>{(e=e.trim())&&n.insertRule(e+"}",r+t)}))}let hR;"undefined"!=typeof document&&uR(document),dR(':root{--fc-small-font-size:.85em;--fc-page-bg-color:#fff;--fc-neutral-bg-color:hsla(0,0%,82%,.3);--fc-neutral-text-color:grey;--fc-border-color:#ddd;--fc-button-text-color:#fff;--fc-button-bg-color:#2c3e50;--fc-button-border-color:#2c3e50;--fc-button-hover-bg-color:#1e2b37;--fc-button-hover-border-color:#1a252f;--fc-button-active-bg-color:#1a252f;--fc-button-active-border-color:#151e27;--fc-event-bg-color:#3788d8;--fc-event-border-color:#3788d8;--fc-event-text-color:#fff;--fc-event-selected-overlay-color:rgba(0,0,0,.25);--fc-more-link-bg-color:#d0d0d0;--fc-more-link-text-color:inherit;--fc-event-resizer-thickness:8px;--fc-event-resizer-dot-total-width:8px;--fc-event-resizer-dot-border-width:1px;--fc-non-business-color:hsla(0,0%,84%,.3);--fc-bg-event-color:#8fdf82;--fc-bg-event-opacity:0.3;--fc-highlight-color:rgba(188,232,241,.3);--fc-today-bg-color:rgba(255,220,40,.15);--fc-now-indicator-color:red}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc{display:flex;flex-direction:column;font-size:1em}.fc,.fc *,.fc :after,.fc :before{box-sizing:border-box}.fc table{border-collapse:collapse;border-spacing:0;font-size:1em}.fc th{text-align:center}.fc td,.fc th{padding:0;vertical-align:top}.fc a[data-navlink]{cursor:pointer}.fc a[data-navlink]:hover{text-decoration:underline}.fc-direction-ltr{direction:ltr;text-align:left}.fc-direction-rtl{direction:rtl;text-align:right}.fc-theme-standard td,.fc-theme-standard th{border:1px solid var(--fc-border-color)}.fc-liquid-hack td,.fc-liquid-hack th{position:relative}@font-face{font-family:fcicons;font-style:normal;font-weight:400;src:url("data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAXVtKNAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZgYydxIAAAF4AAAFNGhlYWQUJ7cIAAAGrAAAADZoaGVhB20DzAAABuQAAAAkaG10eCIABhQAAAcIAAAALGxvY2ED4AU6AAAHNAAAABhtYXhwAA8AjAAAB0wAAAAgbmFtZXsr690AAAdsAAABhnBvc3QAAwAAAAAI9AAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpBgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6Qb//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAWIAjQKeAskAEwAAJSc3NjQnJiIHAQYUFwEWMjc2NCcCnuLiDQ0MJAz/AA0NAQAMJAwNDcni4gwjDQwM/wANIwz/AA0NDCMNAAAAAQFiAI0CngLJABMAACUBNjQnASYiBwYUHwEHBhQXFjI3AZ4BAA0N/wAMJAwNDeLiDQ0MJAyNAQAMIw0BAAwMDSMM4uINIwwNDQAAAAIA4gC3Ax4CngATACcAACUnNzY0JyYiDwEGFB8BFjI3NjQnISc3NjQnJiIPAQYUHwEWMjc2NCcB87e3DQ0MIw3VDQ3VDSMMDQ0BK7e3DQ0MJAzVDQ3VDCQMDQ3zuLcMJAwNDdUNIwzWDAwNIwy4twwkDA0N1Q0jDNYMDA0jDAAAAgDiALcDHgKeABMAJwAAJTc2NC8BJiIHBhQfAQcGFBcWMjchNzY0LwEmIgcGFB8BBwYUFxYyNwJJ1Q0N1Q0jDA0Nt7cNDQwjDf7V1Q0N1QwkDA0Nt7cNDQwkDLfWDCMN1Q0NDCQMt7gMIw0MDNYMIw3VDQ0MJAy3uAwjDQwMAAADAFUAAAOrA1UAMwBoAHcAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMhMjY1NCYjISIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAAVYRGRkR/qoRGRkRA1UFBAUOCQkVDAsZDf2rDRkLDBUJCA4FBQUFBQUOCQgVDAsZDQJVDRkLDBUJCQ4FBAVVAgECBQMCBwQECAX9qwQJAwQHAwMFAQICAgIBBQMDBwQDCQQCVQUIBAQHAgMFAgEC/oAZEhEZGRESGQAAAAADAFUAAAOrA1UAMwBoAIkAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMzFRQWMzI2PQEzMjY1NCYrATU0JiMiBh0BIyIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAgBkSEhmAERkZEYAZEhIZgBEZGREDVQUEBQ4JCRUMCxkN/asNGQsMFQkIDgUFBQUFBQ4JCBUMCxkNAlUNGQsMFQkJDgUEBVUCAQIFAwIHBAQIBf2rBAkDBAcDAwUBAgICAgEFAwMHBAMJBAJVBQgEBAcCAwUCAQL+gIASGRkSgBkSERmAEhkZEoAZERIZAAABAOIAjQMeAskAIAAAExcHBhQXFjI/ARcWMjc2NC8BNzY0JyYiDwEnJiIHBhQX4uLiDQ0MJAzi4gwkDA0N4uINDQwkDOLiDCQMDQ0CjeLiDSMMDQ3h4Q0NDCMN4uIMIw0MDOLiDAwNIwwAAAABAAAAAQAAa5n0y18PPPUACwQAAAAAANivOVsAAAAA2K85WwAAAAADqwNVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOrAAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWIEAAFiBAAA4gQAAOIEAABVBAAAVQQAAOIAAAAAAAoAFAAeAEQAagCqAOoBngJkApoAAQAAAAsAigADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=") format("truetype")}.fc-icon{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font-family:fcicons!important;font-style:normal;font-variant:normal;font-weight:400;height:1em;line-height:1;text-align:center;text-transform:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:1em}.fc-icon-chevron-left:before{content:"\\e900"}.fc-icon-chevron-right:before{content:"\\e901"}.fc-icon-chevrons-left:before{content:"\\e902"}.fc-icon-chevrons-right:before{content:"\\e903"}.fc-icon-minus-square:before{content:"\\e904"}.fc-icon-plus-square:before{content:"\\e905"}.fc-icon-x:before{content:"\\e906"}.fc .fc-button{border-radius:0;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none}.fc .fc-button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.fc .fc-button{-webkit-appearance:button}.fc .fc-button:not(:disabled){cursor:pointer}.fc .fc-button{background-color:transparent;border:1px solid transparent;border-radius:.25em;display:inline-block;font-size:1em;font-weight:400;line-height:1.5;padding:.4em .65em;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle}.fc .fc-button:hover{text-decoration:none}.fc .fc-button:focus{box-shadow:0 0 0 .2rem rgba(44,62,80,.25);outline:0}.fc .fc-button:disabled{opacity:.65}.fc .fc-button-primary{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:hover{background-color:var(--fc-button-hover-bg-color);border-color:var(--fc-button-hover-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:disabled{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button-primary:not(:disabled).fc-button-active,.fc .fc-button-primary:not(:disabled):active{background-color:var(--fc-button-active-bg-color);border-color:var(--fc-button-active-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:not(:disabled).fc-button-active:focus,.fc .fc-button-primary:not(:disabled):active:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button .fc-icon{font-size:1.5em;vertical-align:middle}.fc .fc-button-group{display:inline-flex;position:relative;vertical-align:middle}.fc .fc-button-group>.fc-button{flex:1 1 auto;position:relative}.fc .fc-button-group>.fc-button.fc-button-active,.fc .fc-button-group>.fc-button:active,.fc .fc-button-group>.fc-button:focus,.fc .fc-button-group>.fc-button:hover{z-index:1}.fc-direction-ltr .fc-button-group>.fc-button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0;margin-left:-1px}.fc-direction-ltr .fc-button-group>.fc-button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.fc-direction-rtl .fc-button-group>.fc-button:not(:first-child){border-bottom-right-radius:0;border-top-right-radius:0;margin-right:-1px}.fc-direction-rtl .fc-button-group>.fc-button:not(:last-child){border-bottom-left-radius:0;border-top-left-radius:0}.fc .fc-toolbar{align-items:center;display:flex;justify-content:space-between}.fc .fc-toolbar.fc-header-toolbar{margin-bottom:1.5em}.fc .fc-toolbar.fc-footer-toolbar{margin-top:1.5em}.fc .fc-toolbar-title{font-size:1.75em;margin:0}.fc-direction-ltr .fc-toolbar>*>:not(:first-child){margin-left:.75em}.fc-direction-rtl .fc-toolbar>*>:not(:first-child){margin-right:.75em}.fc-direction-rtl .fc-toolbar-ltr{flex-direction:row-reverse}.fc .fc-scroller{-webkit-overflow-scrolling:touch;position:relative}.fc .fc-scroller-liquid{height:100%}.fc .fc-scroller-liquid-absolute{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-scroller-harness{direction:ltr;overflow:hidden;position:relative}.fc .fc-scroller-harness-liquid{height:100%}.fc-direction-rtl .fc-scroller-harness>.fc-scroller{direction:rtl}.fc-theme-standard .fc-scrollgrid{border:1px solid var(--fc-border-color)}.fc .fc-scrollgrid,.fc .fc-scrollgrid table{table-layout:fixed;width:100%}.fc .fc-scrollgrid table{border-left-style:hidden;border-right-style:hidden;border-top-style:hidden}.fc .fc-scrollgrid{border-bottom-width:0;border-collapse:separate;border-right-width:0}.fc .fc-scrollgrid-liquid{height:100%}.fc .fc-scrollgrid-section,.fc .fc-scrollgrid-section table,.fc .fc-scrollgrid-section>td{height:1px}.fc .fc-scrollgrid-section-liquid>td{height:100%}.fc .fc-scrollgrid-section>*{border-left-width:0;border-top-width:0}.fc .fc-scrollgrid-section-footer>*,.fc .fc-scrollgrid-section-header>*{border-bottom-width:0}.fc .fc-scrollgrid-section-body table,.fc .fc-scrollgrid-section-footer table{border-bottom-style:hidden}.fc .fc-scrollgrid-section-sticky>*{background:var(--fc-page-bg-color);position:sticky;z-index:3}.fc .fc-scrollgrid-section-header.fc-scrollgrid-section-sticky>*{top:0}.fc .fc-scrollgrid-section-footer.fc-scrollgrid-section-sticky>*{bottom:0}.fc .fc-scrollgrid-sticky-shim{height:1px;margin-bottom:-1px}.fc-sticky{position:sticky}.fc .fc-view-harness{flex-grow:1;position:relative}.fc .fc-view-harness-active>.fc-view{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-col-header-cell-cushion{display:inline-block;padding:2px 4px}.fc .fc-bg-event,.fc .fc-highlight,.fc .fc-non-business{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-non-business{background:var(--fc-non-business-color)}.fc .fc-bg-event{background:var(--fc-bg-event-color);opacity:var(--fc-bg-event-opacity)}.fc .fc-bg-event .fc-event-title{font-size:var(--fc-small-font-size);font-style:italic;margin:.5em}.fc .fc-highlight{background:var(--fc-highlight-color)}.fc .fc-cell-shaded,.fc .fc-day-disabled{background:var(--fc-neutral-bg-color)}a.fc-event,a.fc-event:hover{text-decoration:none}.fc-event.fc-event-draggable,.fc-event[href]{cursor:pointer}.fc-event .fc-event-main{position:relative;z-index:2}.fc-event-dragging:not(.fc-event-selected){opacity:.75}.fc-event-dragging.fc-event-selected{box-shadow:0 2px 7px rgba(0,0,0,.3)}.fc-event .fc-event-resizer{display:none;position:absolute;z-index:4}.fc-event-selected .fc-event-resizer,.fc-event:hover .fc-event-resizer{display:block}.fc-event-selected .fc-event-resizer{background:var(--fc-page-bg-color);border-color:inherit;border-radius:calc(var(--fc-event-resizer-dot-total-width)/2);border-style:solid;border-width:var(--fc-event-resizer-dot-border-width);height:var(--fc-event-resizer-dot-total-width);width:var(--fc-event-resizer-dot-total-width)}.fc-event-selected .fc-event-resizer:before{bottom:-20px;content:"";left:-20px;position:absolute;right:-20px;top:-20px}.fc-event-selected,.fc-event:focus{box-shadow:0 2px 5px rgba(0,0,0,.2)}.fc-event-selected:before,.fc-event:focus:before{bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:3}.fc-event-selected:after,.fc-event:focus:after{background:var(--fc-event-selected-overlay-color);bottom:-1px;content:"";left:-1px;position:absolute;right:-1px;top:-1px;z-index:1}.fc-h-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-h-event .fc-event-main{color:var(--fc-event-text-color)}.fc-h-event .fc-event-main-frame{display:flex}.fc-h-event .fc-event-time{max-width:100%;overflow:hidden}.fc-h-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-width:0}.fc-h-event .fc-event-title{display:inline-block;left:0;max-width:100%;overflow:hidden;right:0;vertical-align:top}.fc-h-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-start),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-end){border-bottom-left-radius:0;border-left-width:0;border-top-left-radius:0}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-end),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-start){border-bottom-right-radius:0;border-right-width:0;border-top-right-radius:0}.fc-h-event:not(.fc-event-selected) .fc-event-resizer{bottom:0;top:0;width:var(--fc-event-resizer-thickness)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end{cursor:w-resize;left:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start{cursor:e-resize;right:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-h-event.fc-event-selected .fc-event-resizer{margin-top:calc(var(--fc-event-resizer-dot-total-width)*-.5);top:50%}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end{left:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start{right:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc .fc-popover{box-shadow:0 2px 6px rgba(0,0,0,.15);position:absolute;z-index:9999}.fc .fc-popover-header{align-items:center;display:flex;flex-direction:row;justify-content:space-between;padding:3px 4px}.fc .fc-popover-title{margin:0 2px}.fc .fc-popover-close{cursor:pointer;font-size:1.1em;opacity:.65}.fc-theme-standard .fc-popover{background:var(--fc-page-bg-color);border:1px solid var(--fc-border-color)}.fc-theme-standard .fc-popover-header{background:var(--fc-neutral-bg-color)}');class mR{constructor(e){this.drainedOption=e,this.isRunning=!1,this.isDirty=!1,this.pauseDepths={},this.timeoutId=0}request(e){this.isDirty=!0,this.isPaused()||(this.clearTimeout(),null==e?this.tryDrain():this.timeoutId=setTimeout(this.tryDrain.bind(this),e))}pause(e=""){let{pauseDepths:t}=this;t[e]=(t[e]||0)+1,this.clearTimeout()}resume(e="",t){let{pauseDepths:n}=this;e in n&&(t?delete n[e]:(n[e]-=1,n[e]<=0&&delete n[e]),this.tryDrain())}isPaused(){return Object.keys(this.pauseDepths).length}tryDrain(){if(!this.isRunning&&!this.isPaused()){for(this.isRunning=!0;this.isDirty;)this.isDirty=!1,this.drained();this.isRunning=!1}}clear(){this.clearTimeout(),this.isDirty=!1,this.pauseDepths={}}clearTimeout(){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=0)}drained(){this.drainedOption&&this.drainedOption()}}function pR(e){e.parentNode&&e.parentNode.removeChild(e)}function gR(e,t){if(e.closest)return e.closest(t);if(!document.documentElement.contains(e))return null;do{if(vR(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}function vR(e,t){return(e.matches||e.matchesSelector||e.msMatchesSelector).call(e,t)}const yR=/(top|left|right|bottom|width|height)$/i;function bR(e,t,n){null==n?e.style[t]="":"number"==typeof n&&yR.test(t)?e.style[t]=`${n}px`:e.style[t]=n}let xR=0;function wR(){return xR+=1,"fc-dom-"+xR}function kR(e,t,n,r){let o=function(e,t){return n=>{let r=gR(n.target,e);r&&t.call(r,n,r)}}(n,r);return e.addEventListener(t,o),()=>{e.removeEventListener(t,o)}}function SR(e){return Object.assign({onClick:e},CR(e))}function CR(e){return{tabIndex:0,onKeyDown(t){"Enter"!==t.key&&" "!==t.key||(e(t),t.preventDefault())}}}let _R=0;function jR(){return _R+=1,String(_R)}function ER(e,t,n){return n.func?n.func(e,t):function(e,t){return e||t?null==t?-1:null==e?1:"string"==typeof e||"string"==typeof t?String(e).localeCompare(String(t)):e-t:0}(e[n.field],t[n.field])*(n.order||1)}function NR(e,t){let n=String(e);return"000".substr(0,t-n.length)+n}function DR(e,t,n){return"function"==typeof e?e(...t):"string"==typeof e?t.reduce(((e,t,n)=>e.replace("$"+n,t||"")),e):n}function TR(e){return e%1==0}function AR(e){let t=e.querySelector(".fc-scrollgrid-shrink-frame"),n=e.querySelector(".fc-scrollgrid-shrink-cushion");if(!t)throw new Error("needs fc-scrollgrid-shrink-frame className");if(!n)throw new Error("needs fc-scrollgrid-shrink-cushion className");return e.getBoundingClientRect().width-t.getBoundingClientRect().width+n.getBoundingClientRect().width}const RR=["years","months","days","milliseconds"],MR=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function OR(e,t){return"string"==typeof e?function(e){let t=MR.exec(e);if(t){let e=t[1]?-1:1;return{years:0,months:0,days:e*(t[2]?parseInt(t[2],10):0),milliseconds:e*(60*(t[3]?parseInt(t[3],10):0)*60*1e3+60*(t[4]?parseInt(t[4],10):0)*1e3+1e3*(t[5]?parseInt(t[5],10):0)+(t[6]?parseInt(t[6],10):0))}}return null}(e):"object"==typeof e&&e?IR(e):"number"==typeof e?IR({[t||"milliseconds"]:e}):null}function IR(e){let t={years:e.years||e.year||0,months:e.months||e.month||0,days:e.days||e.day||0,milliseconds:60*(e.hours||e.hour||0)*60*1e3+60*(e.minutes||e.minute||0)*1e3+1e3*(e.seconds||e.second||0)+(e.milliseconds||e.millisecond||e.ms||0)},n=e.weeks||e.week;return n&&(t.days+=7*n,t.specifiedWeeks=!0),t}function PR(e,t){return{years:e.years+t.years,months:e.months+t.months,days:e.days+t.days,milliseconds:e.milliseconds+t.milliseconds}}function LR(e){return FR(e)/864e5}function FR(e){return 31536e6*e.years+2592e6*e.months+864e5*e.days+e.milliseconds}function zR(e,t){let n=null;for(let r=0;r<RR.length;r+=1){let o=RR[r];if(t[o]){let r=e[o]/t[o];if(!TR(r)||null!==n&&n!==r)return null;n=r}else if(e[o])return null}return n}function HR(e){let t=e.milliseconds;if(t){if(t%1e3!=0)return{unit:"millisecond",value:t};if(t%6e4!=0)return{unit:"second",value:t/1e3};if(t%36e5!=0)return{unit:"minute",value:t/6e4};if(t)return{unit:"hour",value:t/36e5}}return e.days?e.specifiedWeeks&&e.days%7==0?{unit:"week",value:e.days/7}:{unit:"day",value:e.days}:e.months?{unit:"month",value:e.months}:e.years?{unit:"year",value:e.years}:{unit:"millisecond",value:0}}function VR(e,t,n){if(e===t)return!0;let r,o=e.length;if(o!==t.length)return!1;for(r=0;r<o;r+=1)if(!(n?n(e[r],t[r]):e[r]===t[r]))return!1;return!0}const BR=["sun","mon","tue","wed","thu","fri","sat"];function WR(e,t){let n=XR(e);return n[2]+=7*t,eM(n)}function UR(e,t){let n=XR(e);return n[2]+=t,eM(n)}function $R(e,t){let n=XR(e);return n[6]+=t,eM(n)}function GR(e,t){return(t.valueOf()-e.valueOf())/864e5}function YR(e,t){return nM(e)===nM(t)?Math.round(GR(e,t)):null}function qR(e){return eM([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()])}function ZR(e,t,n,r){let o=eM([t,0,1+KR(t,n,r)]),a=qR(e),s=Math.round(GR(o,a));return Math.floor(s/7)+1}function KR(e,t,n){let r=7+t-n;return-(7+eM([e,0,r]).getUTCDay()-t)%7+r-1}function QR(e){return[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()]}function JR(e){return new Date(e[0],e[1]||0,null==e[2]?1:e[2],e[3]||0,e[4]||0,e[5]||0)}function XR(e){return[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()]}function eM(e){return 1===e.length&&(e=e.concat([0])),new Date(Date.UTC(...e))}function tM(e){return!isNaN(e.valueOf())}function nM(e){return 1e3*e.getUTCHours()*60*60+1e3*e.getUTCMinutes()*60+1e3*e.getUTCSeconds()+e.getUTCMilliseconds()}function rM(e,t,n=!1){let r=e.toISOString();return r=r.replace(".000",""),n&&(r=r.replace("T00:00:00Z","")),r.length>10&&(null==t?r=r.replace("Z",""):0!==t&&(r=r.replace("Z",aM(t,!0)))),r}function oM(e){return e.toISOString().replace(/T.*$/,"")}function aM(e,t=!1){let n=e<0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),a=Math.round(r%60);return t?`${n+NR(o,2)}:${NR(a,2)}`:`GMT${n}${o}${a?`:${NR(a,2)}`:""}`}function sM(e,t,n){let r,o;return function(...a){if(r){if(!VR(r,a)){n&&n(o);let r=e.apply(this,a);t&&t(r,o)||(o=r)}}else o=e.apply(this,a);return r=a,o}}function iM(e,t,n){let r,o;return a=>{if(r){if(!zM(r,a)){n&&n(o);let r=e.call(this,a);t&&t(r,o)||(o=r)}}else o=e.call(this,a);return r=a,o}}const lM={week:3,separator:9,omitZeroMinute:9,meridiem:9,omitCommas:9},cM={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},dM=/\s*([ap])\.?m\.?/i,uM=/,/g,fM=/\s+/g,hM=/\u200e/g,mM=/UTC|GMT/;class pM{constructor(e){let t={},n={},r=9;for(let o in e)o in lM?(n[o]=e[o],lM[o]<9&&(r=Math.min(lM[o],r))):(t[o]=e[o],o in cM&&(r=Math.min(cM[o],r)));this.standardDateProps=t,this.extendedSettings=n,this.smallestUnitNum=r,this.buildFormattingFunc=sM(gM)}format(e,t){return this.buildFormattingFunc(this.standardDateProps,this.extendedSettings,t)(e)}formatRange(e,t,n,r){let{standardDateProps:o,extendedSettings:a}=this,s=(i=e.marker,l=t.marker,(c=n.calendarSystem).getMarkerYear(i)!==c.getMarkerYear(l)?5:c.getMarkerMonth(i)!==c.getMarkerMonth(l)?4:c.getMarkerDay(i)!==c.getMarkerDay(l)?2:nM(i)!==nM(l)?1:0);var i,l,c;if(!s)return this.format(e,n);let d=s;!(d>1)||"numeric"!==o.year&&"2-digit"!==o.year||"numeric"!==o.month&&"2-digit"!==o.month||"numeric"!==o.day&&"2-digit"!==o.day||(d=1);let u=this.format(e,n),f=this.format(t,n);if(u===f)return u;let h=function(e,t){let n={};for(let r in e)(!(r in cM)||cM[r]<=t)&&(n[r]=e[r]);return n}(o,d),m=gM(h,a,n),p=m(e),g=m(t),v=function(e,t,n,r){let o=0;for(;o<e.length;){let a=e.indexOf(t,o);if(-1===a)break;let s=e.substr(0,a);o=a+t.length;let i=e.substr(o),l=0;for(;l<n.length;){let e=n.indexOf(r,l);if(-1===e)break;let t=n.substr(0,e);l=e+r.length;let o=n.substr(l);if(s===t&&i===o)return{before:s,after:i}}}return null}(u,p,f,g),y=a.separator||r||n.defaultSeparator||"";return v?v.before+p+y+g+v.after:u+y+f}getSmallestUnit(){switch(this.smallestUnitNum){case 7:case 6:case 5:return"year";case 4:return"month";case 3:return"week";case 2:return"day";default:return"time"}}}function gM(e,t,n){let r=Object.keys(e).length;return 1===r&&"short"===e.timeZoneName?e=>aM(e.timeZoneOffset):0===r&&t.week?e=>function(e,t,n,r,o){let a=[];return"long"===o?a.push(n):"short"!==o&&"narrow"!==o||a.push(t),"long"!==o&&"short"!==o||a.push(" "),a.push(r.simpleNumberFormat.format(e)),"rtl"===r.options.direction&&a.reverse(),a.join("")}(n.computeWeekNumber(e.marker),n.weekText,n.weekTextLong,n.locale,t.week):function(e,t,n){e=Object.assign({},e),t=Object.assign({},t),function(e,t){e.timeZoneName&&(e.hour||(e.hour="2-digit"),e.minute||(e.minute="2-digit")),"long"===e.timeZoneName&&(e.timeZoneName="short"),t.omitZeroMinute&&(e.second||e.millisecond)&&delete t.omitZeroMinute}(e,t),e.timeZone="UTC";let r,o=new Intl.DateTimeFormat(n.locale.codes,e);if(t.omitZeroMinute){let t=Object.assign({},e);delete t.minute,r=new Intl.DateTimeFormat(n.locale.codes,t)}return a=>{let s,{marker:i}=a;return s=r&&!i.getUTCMinutes()?r:o,function(e,t,n,r,o){return e=e.replace(hM,""),"short"===n.timeZoneName&&(e=function(e,t){let n=!1;return e=e.replace(mM,(()=>(n=!0,t))),n||(e+=` ${t}`),e}(e,"UTC"===o.timeZone||null==t.timeZoneOffset?"UTC":aM(t.timeZoneOffset))),r.omitCommas&&(e=e.replace(uM,"").trim()),r.omitZeroMinute&&(e=e.replace(":00","")),!1===r.meridiem?e=e.replace(dM,"").trim():"narrow"===r.meridiem?e=e.replace(dM,((e,t)=>t.toLocaleLowerCase())):"short"===r.meridiem?e=e.replace(dM,((e,t)=>`${t.toLocaleLowerCase()}m`)):"lowercase"===r.meridiem&&(e=e.replace(dM,(e=>e.toLocaleLowerCase()))),e=(e=e.replace(fM," ")).trim()}(s.format(i),a,e,t,n)}}(e,t,n)}function vM(e,t){let n=t.markerToArray(e.marker);return{marker:e.marker,timeZoneOffset:e.timeZoneOffset,array:n,year:n[0],month:n[1],day:n[2],hour:n[3],minute:n[4],second:n[5],millisecond:n[6]}}function yM(e,t,n,r){let o=vM(e,n.calendarSystem);return{date:o,start:o,end:t?vM(t,n.calendarSystem):null,timeZone:n.timeZone,localeCodes:n.locale.codes,defaultSeparator:r||n.defaultSeparator}}class bM{constructor(e){this.cmdStr=e}format(e,t,n){return t.cmdFormatter(this.cmdStr,yM(e,null,t,n))}formatRange(e,t,n,r){return n.cmdFormatter(this.cmdStr,yM(e,t,n,r))}}class xM{constructor(e){this.func=e}format(e,t,n){return this.func(yM(e,null,t,n))}formatRange(e,t,n,r){return this.func(yM(e,t,n,r))}}function wM(e){return"object"==typeof e&&e?new pM(e):"string"==typeof e?new bM(e):"function"==typeof e?new xM(e):null}const kM={navLinkDayClick:RM,navLinkWeekClick:RM,duration:OR,bootstrapFontAwesome:RM,buttonIcons:RM,customButtons:RM,defaultAllDayEventDuration:OR,defaultTimedEventDuration:OR,nextDayThreshold:OR,scrollTime:OR,scrollTimeReset:Boolean,slotMinTime:OR,slotMaxTime:OR,dayPopoverFormat:wM,slotDuration:OR,snapDuration:OR,headerToolbar:RM,footerToolbar:RM,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:wM,dayHeaderClassNames:RM,dayHeaderContent:RM,dayHeaderDidMount:RM,dayHeaderWillUnmount:RM,dayCellClassNames:RM,dayCellContent:RM,dayCellDidMount:RM,dayCellWillUnmount:RM,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:RM,weekNumbers:Boolean,weekNumberClassNames:RM,weekNumberContent:RM,weekNumberDidMount:RM,weekNumberWillUnmount:RM,editable:Boolean,viewClassNames:RM,viewDidMount:RM,viewWillUnmount:RM,nowIndicator:Boolean,nowIndicatorSnap:RM,nowIndicatorClassNames:RM,nowIndicatorContent:RM,nowIndicatorDidMount:RM,nowIndicatorWillUnmount:RM,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:RM,locale:RM,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:RM,eventOrder:function(e){let t,n,r=[],o=[];for("string"==typeof e?o=e.split(/\s*,\s*/):"function"==typeof e?o=[e]:Array.isArray(e)&&(o=e),t=0;t<o.length;t+=1)n=o[t],"string"==typeof n?r.push("-"===n.charAt(0)?{field:n.substring(1),order:-1}:{field:n,order:1}):"function"==typeof n&&r.push({func:n});return r},eventOrderStrict:Boolean,handleWindowResize:Boolean,windowResizeDelay:Number,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:RM,contentHeight:RM,direction:String,weekNumberFormat:wM,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,weekText:String,weekTextLong:String,progressiveEventRendering:Boolean,businessHours:RM,initialDate:RM,now:RM,eventDataTransform:RM,stickyHeaderDates:RM,stickyFooterScrollbar:RM,viewHeight:RM,defaultAllDay:Boolean,eventSourceFailure:RM,eventSourceSuccess:RM,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:RM,eventConstraint:RM,eventAllow:RM,eventBackgroundColor:String,eventBorderColor:String,eventTextColor:String,eventColor:String,eventClassNames:RM,eventContent:RM,eventDidMount:RM,eventWillUnmount:RM,selectConstraint:RM,selectOverlap:RM,selectAllow:RM,droppable:Boolean,unselectCancel:String,slotLabelFormat:RM,slotLaneClassNames:RM,slotLaneContent:RM,slotLaneDidMount:RM,slotLaneWillUnmount:RM,slotLabelClassNames:RM,slotLabelContent:RM,slotLabelDidMount:RM,slotLabelWillUnmount:RM,dayMaxEvents:RM,dayMaxEventRows:RM,dayMinWidth:Number,slotLabelInterval:OR,allDayText:String,allDayClassNames:RM,allDayContent:RM,allDayDidMount:RM,allDayWillUnmount:RM,slotMinWidth:Number,navLinks:Boolean,eventTimeFormat:wM,rerenderDelay:Number,moreLinkText:RM,moreLinkHint:RM,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMaxStack:Number,eventMinHeight:Number,eventMinWidth:Number,eventShortHeight:Number,slotEventOverlap:Boolean,plugins:RM,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:OR,hiddenDays:RM,fixedWeekCount:Boolean,validRange:RM,visibleRange:RM,titleFormat:RM,eventInteractive:Boolean,noEventsText:String,viewHint:RM,navLinkHint:RM,closeHint:String,timeHint:String,eventHint:String,moreLinkClick:RM,moreLinkClassNames:RM,moreLinkContent:RM,moreLinkDidMount:RM,moreLinkWillUnmount:RM,monthStartFormat:wM,handleCustomRendering:RM,customRenderingMetaMap:RM,customRenderingReplaces:Boolean},SM={eventDisplay:"auto",defaultRangeSeparator:" - ",titleRangeSeparator:" – ",defaultTimedEventDuration:"01:00:00",defaultAllDayEventDuration:{day:1},forceEventDuration:!1,nextDayThreshold:"00:00:00",dayHeaders:!0,initialView:"",aspectRatio:1.35,headerToolbar:{start:"title",center:"",end:"today prev,next"},weekends:!0,weekNumbers:!1,weekNumberCalculation:"local",editable:!1,nowIndicator:!1,scrollTime:"06:00:00",scrollTimeReset:!0,slotMinTime:"00:00:00",slotMaxTime:"24:00:00",showNonCurrentDates:!0,lazyFetching:!0,startParam:"start",endParam:"end",timeZoneParam:"timeZone",timeZone:"local",locales:[],locale:"",themeSystem:"standard",dragRevertDuration:500,dragScroll:!0,allDayMaintainDuration:!1,unselectAuto:!0,dropAccept:"*",eventOrder:"start,-duration,allDay,title",dayPopoverFormat:{month:"long",day:"numeric",year:"numeric"},handleWindowResize:!0,windowResizeDelay:100,longPressDelay:1e3,eventDragMinDistance:5,expandRows:!1,navLinks:!1,selectable:!1,eventMinHeight:15,eventMinWidth:30,eventShortHeight:30,monthStartFormat:{month:"long",day:"numeric"},nowIndicatorSnap:"auto"},CM={datesSet:RM,eventsSet:RM,eventAdd:RM,eventChange:RM,eventRemove:RM,windowResize:RM,eventClick:RM,eventMouseEnter:RM,eventMouseLeave:RM,select:RM,unselect:RM,loading:RM,_unmount:RM,_beforeprint:RM,_afterprint:RM,_noEventDrop:RM,_noEventResize:RM,_resize:RM,_scrollRequest:RM},_M={buttonText:RM,buttonHints:RM,views:RM,plugins:RM,initialEvents:RM,events:RM,eventSources:RM},jM={headerToolbar:EM,footerToolbar:EM,buttonText:EM,buttonHints:EM,buttonIcons:EM,dateIncrement:EM,plugins:NM,events:NM,eventSources:NM,resources:NM};function EM(e,t){return"object"==typeof e&&"object"==typeof t&&e&&t?zM(e,t):e===t}function NM(e,t){return Array.isArray(e)&&Array.isArray(t)?VR(e,t):e===t}const DM={type:String,component:RM,buttonText:String,buttonTextKey:String,dateProfileGeneratorClass:RM,usesMinMaxTime:Boolean,classNames:RM,content:RM,didMount:RM,willUnmount:RM};function TM(e){return OM(e,jM)}function AM(e,t){let n={},r={};for(let r in t)r in e&&(n[r]=t[r](e[r]));for(let n in e)n in t||(r[n]=e[n]);return{refined:n,extra:r}}function RM(e){return e}const{hasOwnProperty:MM}=Object.prototype;function OM(e,t){let n={};if(t)for(let r in t)if(t[r]===EM){let t=[];for(let o=e.length-1;o>=0;o-=1){let a=e[o][r];if("object"==typeof a&&a)t.unshift(a);else if(void 0!==a){n[r]=a;break}}t.length&&(n[r]=OM(t))}for(let t=e.length-1;t>=0;t-=1){let r=e[t];for(let e in r)e in n||(n[e]=r[e])}return n}function IM(e,t){let n={};for(let r in e)t(e[r],r)&&(n[r]=e[r]);return n}function PM(e,t){let n={};for(let r in e)n[r]=t(e[r],r);return n}function LM(e){let t={};for(let n of e)t[n]=!0;return t}function FM(e){let t=[];for(let n in e)t.push(e[n]);return t}function zM(e,t){if(e===t)return!0;for(let n in e)if(MM.call(e,n)&&!(n in t))return!1;for(let n in t)if(MM.call(t,n)&&e[n]!==t[n])return!1;return!0}const HM=/^on[A-Z]/;function VM(e,t,n={}){if(e===t)return!0;for(let s in t)if(!(s in e&&(r=e[s],o=t[s],a=n[s],r===o||!0===a||a&&a(r,o))))return!1;var r,o,a;for(let n in e)if(!(n in t))return!1;return!0}let BM={};var WM;WM=class{getMarkerYear(e){return e.getUTCFullYear()}getMarkerMonth(e){return e.getUTCMonth()}getMarkerDay(e){return e.getUTCDate()}arrayToMarker(e){return eM(e)}markerToArray(e){return XR(e)}},BM.gregory=WM;const UM=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;class $M{constructor(e){let t=this.timeZone=e.timeZone,n="local"!==t&&"UTC"!==t;e.namedTimeZoneImpl&&n&&(this.namedTimeZoneImpl=new e.namedTimeZoneImpl(t)),this.canComputeOffset=Boolean(!n||this.namedTimeZoneImpl),this.calendarSystem=function(e){return new BM[e]}(e.calendarSystem),this.locale=e.locale,this.weekDow=e.locale.week.dow,this.weekDoy=e.locale.week.doy,"ISO"===e.weekNumberCalculation&&(this.weekDow=1,this.weekDoy=4),"number"==typeof e.firstDay&&(this.weekDow=e.firstDay),"function"==typeof e.weekNumberCalculation&&(this.weekNumberFunc=e.weekNumberCalculation),this.weekText=null!=e.weekText?e.weekText:e.locale.options.weekText,this.weekTextLong=(null!=e.weekTextLong?e.weekTextLong:e.locale.options.weekTextLong)||this.weekText,this.cmdFormatter=e.cmdFormatter,this.defaultSeparator=e.defaultSeparator}createMarker(e){let t=this.createMarkerMeta(e);return null===t?null:t.marker}createNowMarker(){return this.canComputeOffset?this.timestampToMarker((new Date).valueOf()):eM(QR(new Date))}createMarkerMeta(e){if("string"==typeof e)return this.parse(e);let t=null;return"number"==typeof e?t=this.timestampToMarker(e):e instanceof Date?(e=e.valueOf(),isNaN(e)||(t=this.timestampToMarker(e))):Array.isArray(e)&&(t=eM(e)),null!==t&&tM(t)?{marker:t,isTimeUnspecified:!1,forcedTzo:null}:null}parse(e){let t=function(e){let t=UM.exec(e);if(t){let e=new Date(Date.UTC(Number(t[1]),t[3]?Number(t[3])-1:0,Number(t[5]||1),Number(t[7]||0),Number(t[8]||0),Number(t[10]||0),t[12]?1e3*Number(`0.${t[12]}`):0));if(tM(e)){let n=null;return t[13]&&(n=("-"===t[15]?-1:1)*(60*Number(t[16]||0)+Number(t[18]||0))),{marker:e,isTimeUnspecified:!t[6],timeZoneOffset:n}}}return null}(e);if(null===t)return null;let{marker:n}=t,r=null;return null!==t.timeZoneOffset&&(this.canComputeOffset?n=this.timestampToMarker(n.valueOf()-60*t.timeZoneOffset*1e3):r=t.timeZoneOffset),{marker:n,isTimeUnspecified:t.isTimeUnspecified,forcedTzo:r}}getYear(e){return this.calendarSystem.getMarkerYear(e)}getMonth(e){return this.calendarSystem.getMarkerMonth(e)}getDay(e){return this.calendarSystem.getMarkerDay(e)}add(e,t){let n=this.calendarSystem.markerToArray(e);return n[0]+=t.years,n[1]+=t.months,n[2]+=t.days,n[6]+=t.milliseconds,this.calendarSystem.arrayToMarker(n)}subtract(e,t){let n=this.calendarSystem.markerToArray(e);return n[0]-=t.years,n[1]-=t.months,n[2]-=t.days,n[6]-=t.milliseconds,this.calendarSystem.arrayToMarker(n)}addYears(e,t){let n=this.calendarSystem.markerToArray(e);return n[0]+=t,this.calendarSystem.arrayToMarker(n)}addMonths(e,t){let n=this.calendarSystem.markerToArray(e);return n[1]+=t,this.calendarSystem.arrayToMarker(n)}diffWholeYears(e,t){let{calendarSystem:n}=this;return nM(e)===nM(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)&&n.getMarkerMonth(e)===n.getMarkerMonth(t)?n.getMarkerYear(t)-n.getMarkerYear(e):null}diffWholeMonths(e,t){let{calendarSystem:n}=this;return nM(e)===nM(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)?n.getMarkerMonth(t)-n.getMarkerMonth(e)+12*(n.getMarkerYear(t)-n.getMarkerYear(e)):null}greatestWholeUnit(e,t){let n=this.diffWholeYears(e,t);return null!==n?{unit:"year",value:n}:(n=this.diffWholeMonths(e,t),null!==n?{unit:"month",value:n}:(n=function(e,t){let n=YR(e,t);return null!==n&&n%7==0?n/7:null}(e,t),null!==n?{unit:"week",value:n}:(n=YR(e,t),null!==n?{unit:"day",value:n}:(n=function(e,t){return(t.valueOf()-e.valueOf())/36e5}(e,t),TR(n)?{unit:"hour",value:n}:(n=function(e,t){return(t.valueOf()-e.valueOf())/6e4}(e,t),TR(n)?{unit:"minute",value:n}:(n=function(e,t){return(t.valueOf()-e.valueOf())/1e3}(e,t),TR(n)?{unit:"second",value:n}:{unit:"millisecond",value:t.valueOf()-e.valueOf()}))))))}countDurationsBetween(e,t,n){let r;return n.years&&(r=this.diffWholeYears(e,t),null!==r)?r/(LR(n)/365):n.months&&(r=this.diffWholeMonths(e,t),null!==r)?r/(LR(n)/30):n.days&&(r=YR(e,t),null!==r)?r/LR(n):(t.valueOf()-e.valueOf())/FR(n)}startOf(e,t){return"year"===t?this.startOfYear(e):"month"===t?this.startOfMonth(e):"week"===t?this.startOfWeek(e):"day"===t?qR(e):"hour"===t?function(e){return eM([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours()])}(e):"minute"===t?function(e){return eM([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes()])}(e):"second"===t?function(e){return eM([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds()])}(e):null}startOfYear(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e)])}startOfMonth(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e)])}startOfWeek(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e),e.getUTCDate()-(e.getUTCDay()-this.weekDow+7)%7])}computeWeekNumber(e){return this.weekNumberFunc?this.weekNumberFunc(this.toDate(e)):function(e,t,n){let r=e.getUTCFullYear(),o=ZR(e,r,t,n);if(o<1)return ZR(e,r-1,t,n);let a=ZR(e,r+1,t,n);return a>=1?Math.min(o,a):o}(e,this.weekDow,this.weekDoy)}format(e,t,n={}){return t.format({marker:e,timeZoneOffset:null!=n.forcedTzo?n.forcedTzo:this.offsetForMarker(e)},this)}formatRange(e,t,n,r={}){return r.isEndExclusive&&(t=$R(t,-1)),n.formatRange({marker:e,timeZoneOffset:null!=r.forcedStartTzo?r.forcedStartTzo:this.offsetForMarker(e)},{marker:t,timeZoneOffset:null!=r.forcedEndTzo?r.forcedEndTzo:this.offsetForMarker(t)},this,r.defaultSeparator)}formatIso(e,t={}){let n=null;return t.omitTimeZoneOffset||(n=null!=t.forcedTzo?t.forcedTzo:this.offsetForMarker(e)),rM(e,n,t.omitTime)}timestampToMarker(e){return"local"===this.timeZone?eM(QR(new Date(e))):"UTC"!==this.timeZone&&this.namedTimeZoneImpl?eM(this.namedTimeZoneImpl.timestampToArray(e)):new Date(e)}offsetForMarker(e){return"local"===this.timeZone?-JR(XR(e)).getTimezoneOffset():"UTC"===this.timeZone?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(XR(e)):null}toDate(e,t){return"local"===this.timeZone?JR(XR(e)):"UTC"===this.timeZone?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-1e3*this.namedTimeZoneImpl.offsetForArray(XR(e))*60):new Date(e.valueOf()-(t||0))}}class GM{constructor(e){this.iconOverrideOption&&this.setIconOverride(e[this.iconOverrideOption])}setIconOverride(e){let t,n;if("object"==typeof e&&e){for(n in t=Object.assign({},this.iconClasses),e)t[n]=this.applyIconOverridePrefix(e[n]);this.iconClasses=t}else!1===e&&(this.iconClasses={})}applyIconOverridePrefix(e){let t=this.iconOverridePrefix;return t&&0!==e.indexOf(t)&&(e=t+e),e}getClass(e){return this.classes[e]||""}getIconClass(e,t){let n;return n=t&&this.rtlIconClasses&&this.rtlIconClasses[e]||this.iconClasses[e],n?`${this.baseIconClass} ${n}`:""}getCustomButtonIconClass(e){let t;return this.iconOverrideCustomButtonOption&&(t=e[this.iconOverrideCustomButtonOption],t)?`${this.baseIconClass} ${this.applyIconOverridePrefix(t)}`:""}}function YM(e){e();let t=LT.debounceRendering,n=[];for(LT.debounceRendering=function(e){n.push(e)},kA(JT(qM,{}),document.createElement("div"));n.length;)n.shift()();LT.debounceRendering=t}GM.prototype.classes={},GM.prototype.iconClasses={},GM.prototype.baseIconClass="",GM.prototype.iconOverridePrefix="";class qM extends aA{render(){return JT("div",{})}componentDidMount(){this.setState({})}}function ZM(e){let t=function(e,t){var n={__c:t="__cC"+UT++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,cA(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}(e),n=t.Provider;return t.Provider=function(){let e=!this.getChildContext,t=n.apply(this,arguments);if(e){let e=[];this.shouldComponentUpdate=t=>{this.props.value!==t.value&&e.forEach((e=>{e.context=t.value,e.forceUpdate()}))},this.sub=t=>{e.push(t);let n=t.componentWillUnmount;t.componentWillUnmount=()=>{e.splice(e.indexOf(t),1),n&&n.call(t)}}}return t},t}class KM{constructor(e,t,n,r){this.execFunc=e,this.emitter=t,this.scrollTime=n,this.scrollTimeReset=r,this.handleScrollRequest=e=>{this.queuedRequest=Object.assign({},this.queuedRequest||{},e),this.drain()},t.on("_scrollRequest",this.handleScrollRequest),this.fireInitialScroll()}detach(){this.emitter.off("_scrollRequest",this.handleScrollRequest)}update(e){e&&this.scrollTimeReset?this.fireInitialScroll():this.drain()}fireInitialScroll(){this.handleScrollRequest({time:this.scrollTime})}drain(){this.queuedRequest&&this.execFunc(this.queuedRequest)&&(this.queuedRequest=null)}}const QM=ZM({});function JM(e,t,n,r,o,a,s,i,l,c,d,u,f,h){return{dateEnv:o,nowManager:a,options:n,pluginHooks:i,emitter:d,dispatch:l,getCurrentData:c,calendarApi:u,viewSpec:e,viewApi:t,dateProfileGenerator:r,theme:s,isRtl:"rtl"===n.direction,addResizeHandler(e){d.on("_resize",e)},removeResizeHandler(e){d.off("_resize",e)},createScrollResponder:e=>new KM(e,d,OR(n.scrollTime),n.scrollTimeReset),registerInteractiveComponent:f,unregisterInteractiveComponent:h}}class XM extends aA{shouldComponentUpdate(e,t){return!VM(this.props,e,this.propEquality)||!VM(this.state,t,this.stateEquality)}safeSetState(e){VM(this.state,Object.assign(Object.assign({},this.state),e),this.stateEquality)||this.setState(e)}}XM.addPropsEquality=function(e){let t=Object.create(this.prototype.propEquality);Object.assign(t,e),this.prototype.propEquality=t},XM.addStateEquality=function(e){let t=Object.create(this.prototype.stateEquality);Object.assign(t,e),this.prototype.stateEquality=t},XM.contextType=QM,XM.prototype.propEquality={},XM.prototype.stateEquality={};class eO extends XM{}function tO(e,t){"function"==typeof e?e(t):e&&(e.current=t)}eO.contextType=QM;class nO extends eO{constructor(){super(...arguments),this.id=jR(),this.queuedDomNodes=[],this.currentDomNodes=[],this.handleEl=e=>{const{options:t}=this.context,{generatorName:n}=this.props;t.customRenderingReplaces&&rO(n,t)||this.updateElRef(e)},this.updateElRef=e=>{this.props.elRef&&tO(this.props.elRef,e)}}render(){const{props:e,context:t}=this,{options:n}=t,{customGenerator:r,defaultGenerator:o,renderProps:a}=e,s=oO(e,[],this.handleEl);let i,l,c=!1,d=[];if(null!=r){const e="function"==typeof r?r(a,JT):r;if(!0===e)c=!0;else{const t=e&&"object"==typeof e;t&&"html"in e?s.dangerouslySetInnerHTML={__html:e.html}:t&&"domNodes"in e?d=Array.prototype.slice.call(e.domNodes):(t?zT(e):"function"!=typeof e)?i=e:l=e}}else c=!rO(e.generatorName,n);return c&&o&&(i=o(a)),this.queuedDomNodes=d,this.currentGeneratorMeta=l,JT(e.elTag,s,i)}componentDidMount(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentDidUpdate(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentWillUnmount(){this.triggerCustomRendering(!1)}triggerCustomRendering(e){var t;const{props:n,context:r}=this,{handleCustomRendering:o,customRenderingMetaMap:a}=r.options;if(o){const r=null!==(t=this.currentGeneratorMeta)&&void 0!==t?t:null==a?void 0:a[n.generatorName];r&&o(Object.assign(Object.assign({id:this.id,isActive:e,containerEl:this.base,reportNewContainerEl:this.updateElRef,generatorMeta:r},n),{elClasses:(n.elClasses||[]).filter(aO)}))}}applyQueueudDomNodes(){const{queuedDomNodes:e,currentDomNodes:t}=this,n=this.base;if(!VR(e,t)){t.forEach(pR);for(let t of e)n.appendChild(t);this.currentDomNodes=e}}}function rO(e,t){var n;return Boolean(t.handleCustomRendering&&e&&(null===(n=t.customRenderingMetaMap)||void 0===n?void 0:n[e]))}function oO(e,t,n){const r=Object.assign(Object.assign({},e.elAttrs),{ref:n});return(e.elClasses||t)&&(r.className=(e.elClasses||[]).concat(t||[]).concat(r.className||[]).filter(Boolean).join(" ")),e.elStyle&&(r.style=e.elStyle),r}function aO(e){return Boolean(e)}nO.addPropsEquality({elClasses:VR,elStyle:zM,elAttrs:function(e,t){const n=function(e,t){let n=[];for(let r in e)MM.call(e,r)&&(r in t||n.push(r));for(let r in t)MM.call(t,r)&&e[r]!==t[r]&&n.push(r);return n}(e,t);for(let e of n)if(!HM.test(e))return!1;return!0},renderProps:zM});const sO=ZM(0);class iO extends aA{constructor(){super(...arguments),this.InnerContent=lO.bind(void 0,this),this.handleEl=e=>{this.el=e,this.props.elRef&&(tO(this.props.elRef,e),e&&this.didMountMisfire&&this.componentDidMount())}}render(){const{props:e}=this,t=function(e,t){const n="function"==typeof e?e(t):e||[];return"string"==typeof n?[n]:n}(e.classNameGenerator,e.renderProps);if(e.children){const n=oO(e,t,this.handleEl),r=e.children(this.InnerContent,e.renderProps,n);return e.elTag?JT(e.elTag,n,r):r}return JT(nO,Object.assign(Object.assign({},e),{elRef:this.handleEl,elTag:e.elTag||"div",elClasses:(e.elClasses||[]).concat(t),renderId:this.context}))}componentDidMount(){var e,t;this.el?null===(t=(e=this.props).didMount)||void 0===t||t.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.el})):this.didMountMisfire=!0}componentWillUnmount(){var e,t;null===(t=(e=this.props).willUnmount)||void 0===t||t.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.el}))}}function lO(e,t){const n=e.props;return JT(nO,Object.assign({renderProps:n.renderProps,generatorName:n.generatorName,customGenerator:n.customGenerator,defaultGenerator:n.defaultGenerator,renderId:e.context},t))}iO.contextType=sO;class cO extends eO{render(){let{props:e,context:t}=this,{options:n}=t,r={view:t.viewApi};return JT(iO,{elRef:e.elRef,elTag:e.elTag||"div",elAttrs:e.elAttrs,elClasses:[...dO(e.viewSpec),...e.elClasses||[]],elStyle:e.elStyle,renderProps:r,classNameGenerator:n.viewClassNames,generatorName:void 0,didMount:n.viewDidMount,willUnmount:n.viewWillUnmount},(()=>e.children))}}function dO(e){return[`fc-${e.type}-view`,"fc-view"]}function uO(e,t){let n,r,o=[],{start:a}=t;for(e.sort(fO),n=0;n<e.length;n+=1)r=e[n],r.start>a&&o.push({start:a,end:r.start}),r.end>a&&(a=r.end);return a<t.end&&o.push({start:a,end:t.end}),o}function fO(e,t){return e.start.valueOf()-t.start.valueOf()}function hO(e,t){let{start:n,end:r}=e,o=null;return null!==t.start&&(n=null===n?t.start:new Date(Math.max(n.valueOf(),t.start.valueOf()))),null!=t.end&&(r=null===r?t.end:new Date(Math.min(r.valueOf(),t.end.valueOf()))),(null===n||null===r||n<r)&&(o={start:n,end:r}),o}function mO(e,t){return(null===e.start||t>=e.start)&&(null===e.end||t<e.end)}function pO(e){let t=Math.floor(GR(e.start,e.end))||1,n=qR(e.start);return{start:n,end:UR(n,t)}}function gO(e,t=OR(0)){let n=null,r=null;if(e.end){r=qR(e.end);let n=e.end.valueOf()-r.valueOf();n&&n>=FR(t)&&(r=UR(r,1))}return e.start&&(n=qR(e.start),r&&r<=n&&(r=UR(n,1))),{start:n,end:r}}function vO(e,t,n,r){return"year"===r?OR(n.diffWholeYears(e,t),"year"):"month"===r?OR(n.diffWholeMonths(e,t),"month"):function(e,t){let n=qR(e),r=qR(t);return{years:0,months:0,days:Math.round(GR(n,r)),milliseconds:t.valueOf()-r.valueOf()-(e.valueOf()-n.valueOf())}}(e,t)}class yO{constructor(e){this.props=e,this.initHiddenDays()}buildPrev(e,t,n){let{dateEnv:r}=this.props,o=r.subtract(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(o,-1,n)}buildNext(e,t,n){let{dateEnv:r}=this.props,o=r.add(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(o,1,n)}build(e,t,n=!0){let r,o,a,s,i,l,{props:c}=this;return r=this.buildValidRange(),r=this.trimHiddenDays(r),n&&(e=function(e,t){return null!=t.start&&e<t.start?t.start:null!=t.end&&e>=t.end?new Date(t.end.valueOf()-1):e}(e,r)),o=this.buildCurrentRangeInfo(e,t),a=/^(year|month|week|day)$/.test(o.unit),s=this.buildRenderRange(this.trimHiddenDays(o.range),o.unit,a),s=this.trimHiddenDays(s),i=s,c.showNonCurrentDates||(i=hO(i,o.range)),i=this.adjustActiveRange(i),i=hO(i,r),d=o.range,u=r,l=(null===d.end||null===u.start||d.end>u.start)&&(null===d.start||null===u.end||d.start<u.end),mO(s,e)||(e=s.start),{currentDate:e,validRange:r,currentRange:o.range,currentRangeUnit:o.unit,isRangeAllDay:a,activeRange:i,renderRange:s,slotMinTime:c.slotMinTime,slotMaxTime:c.slotMaxTime,isValid:l,dateIncrement:this.buildDateIncrement(o.duration)};var d,u}buildValidRange(){let e=this.props.validRangeInput,t="function"==typeof e?e.call(this.props.calendarApi,this.props.dateEnv.toDate(this.props.nowManager.getDateMarker())):e;return this.refineRange(t)||{start:null,end:null}}buildCurrentRangeInfo(e,t){let n,{props:r}=this,o=null,a=null,s=null;return r.duration?(o=r.duration,a=r.durationUnit,s=this.buildRangeFromDuration(e,t,o,a)):(n=this.props.dayCount)?(a="day",s=this.buildRangeFromDayCount(e,t,n)):(s=this.buildCustomVisibleRange(e))?a=r.dateEnv.greatestWholeUnit(s.start,s.end).unit:(o=this.getFallbackDuration(),a=HR(o).unit,s=this.buildRangeFromDuration(e,t,o,a)),{duration:o,unit:a,range:s}}getFallbackDuration(){return OR({day:1})}adjustActiveRange(e){let{dateEnv:t,usesMinMaxTime:n,slotMinTime:r,slotMaxTime:o}=this.props,{start:a,end:s}=e;return n&&(LR(r)<0&&(a=qR(a),a=t.add(a,r)),LR(o)>1&&(s=qR(s),s=UR(s,-1),s=t.add(s,o))),{start:a,end:s}}buildRangeFromDuration(e,t,n,r){let o,a,s,{dateEnv:i,dateAlignment:l}=this.props;if(!l){let{dateIncrement:e}=this.props;l=e&&FR(e)<FR(n)?HR(e).unit:r}function c(){o=i.startOf(e,l),a=i.add(o,n),s={start:o,end:a}}return LR(n)<=1&&this.isHiddenDay(o)&&(o=this.skipHiddenDays(o,t),o=qR(o)),c(),this.trimHiddenDays(s)||(e=this.skipHiddenDays(e,t),c()),s}buildRangeFromDayCount(e,t,n){let r,{dateEnv:o,dateAlignment:a}=this.props,s=0,i=e;a&&(i=o.startOf(i,a)),i=qR(i),i=this.skipHiddenDays(i,t),r=i;do{r=UR(r,1),this.isHiddenDay(r)||(s+=1)}while(s<n);return{start:i,end:r}}buildCustomVisibleRange(e){let{props:t}=this,n=t.visibleRangeInput,r="function"==typeof n?n.call(t.calendarApi,t.dateEnv.toDate(e)):n,o=this.refineRange(r);return!o||null!=o.start&&null!=o.end?o:null}buildRenderRange(e,t,n){return e}buildDateIncrement(e){let t,{dateIncrement:n}=this.props;return n||((t=this.props.dateAlignment)?OR(1,t):e||OR({days:1}))}refineRange(e){if(e){let t=function(e,t){let n=null,r=null;return e.start&&(n=t.createMarker(e.start)),e.end&&(r=t.createMarker(e.end)),n||r?n&&r&&r<n?null:{start:n,end:r}:null}(e,this.props.dateEnv);return t&&(t=gO(t)),t}return null}initHiddenDays(){let e,t=this.props.hiddenDays||[],n=[],r=0;for(!1===this.props.weekends&&t.push(0,6),e=0;e<7;e+=1)(n[e]=-1!==t.indexOf(e))||(r+=1);if(!r)throw new Error("invalid hiddenDays");this.isHiddenDayHash=n}trimHiddenDays(e){let{start:t,end:n}=e;return t&&(t=this.skipHiddenDays(t)),n&&(n=this.skipHiddenDays(n,-1,!0)),null==t||null==n||t<n?{start:t,end:n}:null}isHiddenDay(e){return e instanceof Date&&(e=e.getUTCDay()),this.isHiddenDayHash[e]}skipHiddenDays(e,t=1,n=!1){for(;this.isHiddenDayHash[(e.getUTCDay()+(n?t:0)+7)%7];)e=UR(e,t);return e}}function bO(e,t,n,r){return{instanceId:jR(),defId:e,range:t,forcedStartTzo:null==n?null:n,forcedEndTzo:null==r?null:r}}function xO(e,t,n){let{dateEnv:r,pluginHooks:o,options:a}=n,{defs:s,instances:i}=e;i=IM(i,(e=>!s[e.defId].recurringDef));for(let e in s){let n=s[e];if(n.recurringDef){let{duration:s}=n.recurringDef;s||(s=n.allDay?a.defaultAllDayEventDuration:a.defaultTimedEventDuration);let l=wO(n,s,t,r,o.recurringTypes);for(let t of l){let n=bO(e,{start:t,end:r.add(t,s)});i[n.instanceId]=n}}}return{defs:s,instances:i}}function wO(e,t,n,r,o){let a=o[e.recurringDef.typeId].expand(e.recurringDef.typeData,{start:r.subtract(n.start,t),end:n.end},r);return e.allDay&&(a=a.map(qR)),a}const kO={id:String,groupId:String,title:String,url:String,interactive:Boolean},SO={start:RM,end:RM,date:RM,allDay:Boolean},CO=Object.assign(Object.assign(Object.assign({},kO),SO),{extendedProps:RM});function _O(e,t,n,r,o=EO(n),a,s){let{refined:i,extra:l}=jO(e,n,o),c=function(e,t){let n=null;return e&&(n=e.defaultAllDay),null==n&&(n=t.options.defaultAllDay),n}(t,n),d=function(e,t,n,r){for(let o=0;o<r.length;o+=1){let a=r[o].parse(e,n);if(a){let{allDay:n}=e;return null==n&&(n=t,null==n&&(n=a.allDayGuess,null==n&&(n=!1))),{allDay:n,duration:a.duration,typeData:a.typeData,typeId:o}}}return null}(i,c,n.dateEnv,n.pluginHooks.recurringTypes);if(d){let e=NO(i,l,t?t.sourceId:"",d.allDay,Boolean(d.duration),n,a);return e.recurringDef={typeId:d.typeId,typeData:d.typeData,duration:d.duration},{def:e,instance:null}}let u=function(e,t,n,r){let o,a,{allDay:s}=e,i=null,l=!1,c=null,d=null!=e.start?e.start:e.date;if(o=n.dateEnv.createMarkerMeta(d),o)i=o.marker;else if(!r)return null;return null!=e.end&&(a=n.dateEnv.createMarkerMeta(e.end)),null==s&&(s=null!=t?t:(!o||o.isTimeUnspecified)&&(!a||a.isTimeUnspecified)),s&&i&&(i=qR(i)),a&&(c=a.marker,s&&(c=qR(c)),i&&c<=i&&(c=null)),c?l=!0:r||(l=n.options.forceEventDuration||!1,c=n.dateEnv.add(i,s?n.options.defaultAllDayEventDuration:n.options.defaultTimedEventDuration)),{allDay:s,hasEnd:l,range:{start:i,end:c},forcedStartTzo:o?o.forcedTzo:null,forcedEndTzo:a?a.forcedTzo:null}}(i,c,n,r);if(u){let e=NO(i,l,t?t.sourceId:"",u.allDay,u.hasEnd,n,a),r=bO(e.defId,u.range,u.forcedStartTzo,u.forcedEndTzo);return s&&e.publicId&&s[e.publicId]&&(r.instanceId=s[e.publicId]),{def:e,instance:r}}return null}function jO(e,t,n=EO(t)){return AM(e,n)}function EO(e){return Object.assign(Object.assign(Object.assign({},OO),CO),e.pluginHooks.eventRefiners)}function NO(e,t,n,r,o,a,s){let i={title:e.title||"",groupId:e.groupId||"",publicId:e.id||"",url:e.url||"",recurringDef:null,defId:(s&&e.id?s[e.id]:"")||jR(),sourceId:n,allDay:r,hasEnd:o,interactive:e.interactive,ui:PO(e,a),extendedProps:Object.assign(Object.assign({},e.extendedProps||{}),t)};for(let t of a.pluginHooks.eventDefMemberAdders)Object.assign(i,t(e));return Object.freeze(i.ui.classNames),Object.freeze(i.extendedProps),i}function DO(e,t,n,r,o,a){let s={defs:{},instances:{}},i=EO(n);for(let l of e){let e=_O(l,t,n,r,i,o,a);e&&TO(e,s)}return s}function TO(e,t={defs:{},instances:{}}){return t.defs[e.def.defId]=e.def,e.instance&&(t.instances[e.instance.instanceId]=e.instance),t}function AO(e,t){return{defs:Object.assign(Object.assign({},e.defs),t.defs),instances:Object.assign(Object.assign({},e.instances),t.instances)}}function RO(e,t){let n=IM(e.defs,t),r=IM(e.instances,(e=>n[e.defId]));return{defs:n,instances:r}}function MO(e){return Array.isArray(e)?e:"string"==typeof e?e.split(/\s+/):[]}const OO={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:RM,overlap:RM,allow:RM,className:MO,classNames:MO,color:String,backgroundColor:String,borderColor:String,textColor:String},IO={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]};function PO(e,t){let n=function(e,t){return Array.isArray(e)?DO(e,null,t,!0):"object"==typeof e&&e?DO([e],null,t,!0):null!=e?String(e):null}(e.constraint,t);return{display:e.display||null,startEditable:null!=e.startEditable?e.startEditable:e.editable,durationEditable:null!=e.durationEditable?e.durationEditable:e.editable,constraints:null!=n?[n]:[],overlap:null!=e.overlap?e.overlap:null,allows:null!=e.allow?[e.allow]:[],backgroundColor:e.backgroundColor||e.color||"",borderColor:e.borderColor||e.color||"",textColor:e.textColor||"",classNames:(e.className||[]).concat(e.classNames||[])}}function LO(e){return e.reduce(FO,IO)}function FO(e,t){return{display:null!=t.display?t.display:e.display,startEditable:null!=t.startEditable?t.startEditable:e.startEditable,durationEditable:null!=t.durationEditable?t.durationEditable:e.durationEditable,constraints:e.constraints.concat(t.constraints),overlap:"boolean"==typeof t.overlap?t.overlap:e.overlap,allows:e.allows.concat(t.allows),backgroundColor:t.backgroundColor||e.backgroundColor,borderColor:t.borderColor||e.borderColor,textColor:t.textColor||e.textColor,classNames:e.classNames.concat(t.classNames)}}const zO={id:String,defaultAllDay:Boolean,url:String,format:String,events:RM,eventDataTransform:RM,success:RM,failure:RM};function HO(e,t,n=VO(t)){let r;if("string"==typeof e?r={url:e}:"function"==typeof e||Array.isArray(e)?r={events:e}:"object"==typeof e&&e&&(r=e),r){let{refined:o,extra:a}=AM(r,n),s=function(e,t){let n=t.pluginHooks.eventSourceDefs;for(let t=n.length-1;t>=0;t-=1){let r=n[t].parseMeta(e);if(r)return{sourceDefId:t,meta:r}}return null}(o,t);if(s)return{_raw:e,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:o.defaultAllDay,eventDataTransform:o.eventDataTransform,success:o.success,failure:o.failure,publicId:o.id||"",sourceId:jR(),sourceDefId:s.sourceDefId,meta:s.meta,ui:PO(o,t),extendedProps:a}}return null}function VO(e){return Object.assign(Object.assign(Object.assign({},OO),zO),e.pluginHooks.eventSourceRefiners)}function BO(e,t,n){let r=n.options.eventDataTransform,o=t?t.eventDataTransform:null;return o&&(e=WO(e,o)),r&&(e=WO(e,r)),e}function WO(e,t){let n;if(t){n=[];for(let r of e){let e=t(r);e?n.push(e):null==e&&n.push(r)}}else n=e;return n}function UO(e,t,n){let{defs:r}=e,o=PM(e.instances,(e=>r[e.defId].allDay?e:Object.assign(Object.assign({},e),{range:{start:n.createMarker(t.toDate(e.range.start,e.forcedStartTzo)),end:n.createMarker(t.toDate(e.range.end,e.forcedEndTzo))},forcedStartTzo:n.canComputeOffset?null:e.forcedStartTzo,forcedEndTzo:n.canComputeOffset?null:e.forcedEndTzo})));return{defs:r,instances:o}}function $O(e,t){return RO(e,(e=>e.sourceId!==t))}class GO{constructor(){this.handlers={},this.thisContext=null}setThisContext(e){this.thisContext=e}setOptions(e){this.options=e}on(e,t){!function(e,t,n){(e[t]||(e[t]=[])).push(n)}(this.handlers,e,t)}off(e,t){!function(e,t,n){n?e[t]&&(e[t]=e[t].filter((e=>e!==n))):delete e[t]}(this.handlers,e,t)}trigger(e,...t){let n=this.handlers[e]||[],r=this.options&&this.options[e],o=[].concat(r||[],n);for(let e of o)e.apply(this.thisContext,t)}hasHandlers(e){return Boolean(this.handlers[e]&&this.handlers[e].length||this.options&&this.options[e])}}const YO={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",classNames:"fc-non-business",groupId:"_businessHours"};function qO(e,t,n){let{dateEnv:r,options:o}=n,a=t;return e?(a=qR(a),a=r.add(a,o.defaultAllDayEventDuration)):a=r.add(a,o.defaultTimedEventDuration),a}function ZO(e,t,n,r){let o=n.standardProps||{};null==o.hasEnd&&t.durationEditable&&(n.startDelta||n.endDelta)&&(o.hasEnd=!0);let a=Object.assign(Object.assign(Object.assign({},e),o),{ui:Object.assign(Object.assign({},e.ui),o.ui)});n.extendedProps&&(a.extendedProps=Object.assign(Object.assign({},a.extendedProps),n.extendedProps));for(let e of r.pluginHooks.eventDefMutationAppliers)e(a,n,r);return!a.hasEnd&&r.options.forceEventDuration&&(a.hasEnd=!0),a}function KO(e,t,n,r,o){let{dateEnv:a}=o,s=r.standardProps&&!0===r.standardProps.allDay,i=r.standardProps&&!1===r.standardProps.hasEnd,l=Object.assign({},e);return s&&(l.range=pO(l.range)),r.datesDelta&&n.startEditable&&(l.range={start:a.add(l.range.start,r.datesDelta),end:a.add(l.range.end,r.datesDelta)}),r.startDelta&&n.durationEditable&&(l.range={start:a.add(l.range.start,r.startDelta),end:l.range.end}),r.endDelta&&n.durationEditable&&(l.range={start:l.range.start,end:a.add(l.range.end,r.endDelta)}),i&&(l.range={start:l.range.start,end:qO(t.allDay,l.range.start,o)}),t.allDay&&(l.range={start:qR(l.range.start),end:qR(l.range.end)}),l.range.end<l.range.start&&(l.range.end=qO(t.allDay,l.range.start,o)),l}class QO{constructor(e,t){this.context=e,this.internalEventSource=t}remove(){this.context.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:this.internalEventSource.sourceId})}refetch(){this.context.dispatch({type:"FETCH_EVENT_SOURCES",sourceIds:[this.internalEventSource.sourceId],isRefetch:!0})}get id(){return this.internalEventSource.publicId}get url(){return this.internalEventSource.meta.url}get format(){return this.internalEventSource.meta.format}}class JO{constructor(e,t,n){this._context=e,this._def=t,this._instance=n||null}setProp(e,t){if(e in SO)console.warn("Could not set date-related prop 'name'. Use one of the date-related methods instead.");else if("id"===e)t=kO[e](t),this.mutate({standardProps:{publicId:t}});else if(e in kO)t=kO[e](t),this.mutate({standardProps:{[e]:t}});else if(e in OO){let n=OO[e](t);n="color"===e?{backgroundColor:t,borderColor:t}:"editable"===e?{startEditable:t,durationEditable:t}:{[e]:t},this.mutate({standardProps:{ui:n}})}else console.warn(`Could not set prop '${e}'. Use setExtendedProp instead.`)}setExtendedProp(e,t){this.mutate({extendedProps:{[e]:t}})}setStart(e,t={}){let{dateEnv:n}=this._context,r=n.createMarker(e);if(r&&this._instance){let e=vO(this._instance.range.start,r,n,t.granularity);t.maintainDuration?this.mutate({datesDelta:e}):this.mutate({startDelta:e})}}setEnd(e,t={}){let n,{dateEnv:r}=this._context;if((null==e||(n=r.createMarker(e),n))&&this._instance)if(n){let e=vO(this._instance.range.end,n,r,t.granularity);this.mutate({endDelta:e})}else this.mutate({standardProps:{hasEnd:!1}})}setDates(e,t,n={}){let r,{dateEnv:o}=this._context,a={allDay:n.allDay},s=o.createMarker(e);var i,l;if(s&&(null==t||(r=o.createMarker(t),r))&&this._instance){let e=this._instance.range;!0===n.allDay&&(e=pO(e));let t=vO(e.start,s,o,n.granularity);if(r){let s=vO(e.end,r,o,n.granularity);l=s,(i=t).years===l.years&&i.months===l.months&&i.days===l.days&&i.milliseconds===l.milliseconds?this.mutate({datesDelta:t,standardProps:a}):this.mutate({startDelta:t,endDelta:s,standardProps:a})}else a.hasEnd=!1,this.mutate({datesDelta:t,standardProps:a})}}moveStart(e){let t=OR(e);t&&this.mutate({startDelta:t})}moveEnd(e){let t=OR(e);t&&this.mutate({endDelta:t})}moveDates(e){let t=OR(e);t&&this.mutate({datesDelta:t})}setAllDay(e,t={}){let n={allDay:e},{maintainDuration:r}=t;null==r&&(r=this._context.options.allDayMaintainDuration),this._def.allDay!==e&&(n.hasEnd=r),this.mutate({standardProps:n})}formatRange(e){let{dateEnv:t}=this._context,n=this._instance,r=wM(e);return this._def.hasEnd?t.formatRange(n.range.start,n.range.end,r,{forcedStartTzo:n.forcedStartTzo,forcedEndTzo:n.forcedEndTzo}):t.format(n.range.start,r,{forcedTzo:n.forcedStartTzo})}mutate(e){let t=this._instance;if(t){let n=this._def,r=this._context,{eventStore:o}=r.getCurrentData(),a=function(e,t){let n=e.instances[t];if(n){let t=e.defs[n.defId],r=RO(e,(e=>{return n=t,r=e,Boolean(n.groupId&&n.groupId===r.groupId);var n,r}));return r.defs[t.defId]=t,r.instances[n.instanceId]=n,r}return{defs:{},instances:{}}}(o,t.instanceId);a=function(e,t,n,r){let o=oI(e.defs,{"":{display:"",startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]}}),a={defs:{},instances:{}};for(let t in e.defs){let s=e.defs[t];a.defs[t]=ZO(s,o[t],n,r)}for(let t in e.instances){let s=e.instances[t],i=a.defs[s.defId];a.instances[t]=KO(s,i,o[s.defId],n,r)}return a}(a,0,e,r);let s=new JO(r,n,t);this._def=a.defs[n.defId],this._instance=a.instances[t.instanceId],r.dispatch({type:"MERGE_EVENTS",eventStore:a}),r.emitter.trigger("eventChange",{oldEvent:s,event:this,relatedEvents:eI(a,r,t),revert(){r.dispatch({type:"RESET_EVENTS",eventStore:o})}})}}remove(){let e=this._context,t=XO(this);e.dispatch({type:"REMOVE_EVENTS",eventStore:t}),e.emitter.trigger("eventRemove",{event:this,relatedEvents:[],revert(){e.dispatch({type:"MERGE_EVENTS",eventStore:t})}})}get source(){let{sourceId:e}=this._def;return e?new QO(this._context,this._context.getCurrentData().eventSources[e]):null}get start(){return this._instance?this._context.dateEnv.toDate(this._instance.range.start):null}get end(){return this._instance&&this._def.hasEnd?this._context.dateEnv.toDate(this._instance.range.end):null}get startStr(){let e=this._instance;return e?this._context.dateEnv.formatIso(e.range.start,{omitTime:this._def.allDay,forcedTzo:e.forcedStartTzo}):""}get endStr(){let e=this._instance;return e&&this._def.hasEnd?this._context.dateEnv.formatIso(e.range.end,{omitTime:this._def.allDay,forcedTzo:e.forcedEndTzo}):""}get id(){return this._def.publicId}get groupId(){return this._def.groupId}get allDay(){return this._def.allDay}get title(){return this._def.title}get url(){return this._def.url}get display(){return this._def.ui.display||"auto"}get startEditable(){return this._def.ui.startEditable}get durationEditable(){return this._def.ui.durationEditable}get constraint(){return this._def.ui.constraints[0]||null}get overlap(){return this._def.ui.overlap}get allow(){return this._def.ui.allows[0]||null}get backgroundColor(){return this._def.ui.backgroundColor}get borderColor(){return this._def.ui.borderColor}get textColor(){return this._def.ui.textColor}get classNames(){return this._def.ui.classNames}get extendedProps(){return this._def.extendedProps}toPlainObject(e={}){let t=this._def,{ui:n}=t,{startStr:r,endStr:o}=this,a={allDay:t.allDay};return t.title&&(a.title=t.title),r&&(a.start=r),o&&(a.end=o),t.publicId&&(a.id=t.publicId),t.groupId&&(a.groupId=t.groupId),t.url&&(a.url=t.url),n.display&&"auto"!==n.display&&(a.display=n.display),e.collapseColor&&n.backgroundColor&&n.backgroundColor===n.borderColor?a.color=n.backgroundColor:(n.backgroundColor&&(a.backgroundColor=n.backgroundColor),n.borderColor&&(a.borderColor=n.borderColor)),n.textColor&&(a.textColor=n.textColor),n.classNames.length&&(a.classNames=n.classNames),Object.keys(t.extendedProps).length&&(e.collapseExtendedProps?Object.assign(a,t.extendedProps):a.extendedProps=t.extendedProps),a}toJSON(){return this.toPlainObject()}}function XO(e){let t=e._def,n=e._instance;return{defs:{[t.defId]:t},instances:n?{[n.instanceId]:n}:{}}}function eI(e,t,n){let{defs:r,instances:o}=e,a=[],s=n?n.instanceId:"";for(let e in o){let n=o[e],i=r[n.defId];n.instanceId!==s&&a.push(new JO(t,i,n))}return a}function tI(e,t,n,r){let o={},a={},s={},i=[],l=[],c=oI(e.defs,t);for(let t in e.defs){let n=e.defs[t];"inverse-background"===c[n.defId].display&&(n.groupId?(o[n.groupId]=[],s[n.groupId]||(s[n.groupId]=n)):a[t]=[])}for(let t in e.instances){let s=e.instances[t],d=e.defs[s.defId],u=c[d.defId],f=s.range,h=!d.allDay&&r?gO(f,r):f,m=hO(h,n);m&&("inverse-background"===u.display?d.groupId?o[d.groupId].push(m):a[s.defId].push(m):"none"!==u.display&&("background"===u.display?i:l).push({def:d,ui:u,instance:s,range:m,isStart:h.start&&h.start.valueOf()===m.start.valueOf(),isEnd:h.end&&h.end.valueOf()===m.end.valueOf()}))}for(let e in o){let t=uO(o[e],n);for(let n of t){let t=s[e],r=c[t.defId];i.push({def:t,ui:r,instance:null,range:n,isStart:!1,isEnd:!1})}}for(let t in a){let r=uO(a[t],n);for(let n of r)i.push({def:e.defs[t],ui:c[t],instance:null,range:n,isStart:!1,isEnd:!1})}return{bg:i,fg:l}}function nI(e,t){e.fcSeg=t}function rI(e){return e.fcSeg||e.parentNode.fcSeg||null}function oI(e,t){return PM(e,(e=>aI(e,t)))}function aI(e,t){let n=[];return t[""]&&n.push(t[""]),t[e.defId]&&n.push(t[e.defId]),n.push(e.ui),LO(n)}function sI(e,t){let n=e.map(iI);return n.sort(((e,n)=>function(e,t,n){let r,o;for(r=0;r<n.length;r+=1)if(o=ER(e,t,n[r]),o)return o;return 0}(e,n,t))),n.map((e=>e._seg))}function iI(e){let{eventRange:t}=e,n=t.def,r=t.instance?t.instance.range:t.range,o=r.start?r.start.valueOf():0,a=r.end?r.end.valueOf():0;return Object.assign(Object.assign(Object.assign({},n.extendedProps),n),{id:n.publicId,start:o,end:a,duration:a-o,allDay:Number(n.allDay),_seg:e})}function lI(e,t){let{pluginHooks:n}=t,r=n.isDraggableTransformers,{def:o,ui:a}=e.eventRange,s=a.startEditable;for(let e of r)s=e(s,o,a,t);return s}function cI(e,t){return e.isStart&&e.eventRange.ui.durationEditable&&t.options.eventResizableFromStart}function dI(e,t){return e.isEnd&&e.eventRange.ui.durationEditable}function uI(e,t,n,r,o,a,s){let{dateEnv:i,options:l}=n,{displayEventTime:c,displayEventEnd:d}=l,u=e.eventRange.def,f=e.eventRange.instance;null==c&&(c=!1!==r),null==d&&(d=!1!==o);let h=f.range.start,m=f.range.end,p=a||e.start||e.eventRange.range.start,g=s||e.end||e.eventRange.range.end,v=qR(h).valueOf()===qR(p).valueOf(),y=qR($R(m,-1)).valueOf()===qR($R(g,-1)).valueOf();return c&&!u.allDay&&(v||y)?(p=v?h:p,g=y?m:g,d&&u.hasEnd?i.formatRange(p,g,t,{forcedStartTzo:a?null:f.forcedStartTzo,forcedEndTzo:s?null:f.forcedEndTzo}):i.format(p,t,{forcedTzo:a?null:f.forcedStartTzo})):""}function fI(e,t,n){let r=e.eventRange.range;return{isPast:r.end<=(n||t.start),isFuture:r.start>=(n||t.end),isToday:t&&mO(t,r.start)}}function hI(e){let t=["fc-event"];return e.isMirror&&t.push("fc-event-mirror"),e.isDraggable&&t.push("fc-event-draggable"),(e.isStartResizable||e.isEndResizable)&&t.push("fc-event-resizable"),e.isDragging&&t.push("fc-event-dragging"),e.isResizing&&t.push("fc-event-resizing"),e.isSelected&&t.push("fc-event-selected"),e.isStart&&t.push("fc-event-start"),e.isEnd&&t.push("fc-event-end"),e.isPast&&t.push("fc-event-past"),e.isToday&&t.push("fc-event-today"),e.isFuture&&t.push("fc-event-future"),t}function mI(e){return e.instance?e.instance.instanceId:`${e.def.defId}:${e.range.start.toISOString()}`}function pI(e,t){let{def:n,instance:r}=e.eventRange,{url:o}=n;if(o)return{href:o};let{emitter:a,options:s}=t,{eventInteractive:i}=s;return null==i&&(i=n.interactive,null==i&&(i=Boolean(a.hasHandlers("eventClick")))),i?CR((e=>{a.trigger("eventClick",{el:e.target,event:new JO(t,n,r),jsEvent:e,view:t.viewApi})})):{}}const gI={start:RM,end:RM,allDay:Boolean};function vI(e,t,n){return Object.assign(Object.assign({},yI(e,t,n)),{timeZone:t.timeZone})}function yI(e,t,n){return{start:t.toDate(e.start),end:t.toDate(e.end),startStr:t.formatIso(e.start,{omitTime:n}),endStr:t.formatIso(e.end,{omitTime:n})}}class bI extends Error{constructor(e,t){super(e),this.response=t}}let xI;function wI(){return null==xI&&(xI=function(){if("undefined"==typeof document)return!0;let e=document.createElement("div");e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.innerHTML="<table><tr><td><div></div></td></tr></table>",e.querySelector("table").style.height="100px",e.querySelector("div").style.height="100%",document.body.appendChild(e);let t=e.querySelector("div").offsetHeight>0;return document.body.removeChild(e),t}()),xI}class kI extends eO{constructor(){super(...arguments),this.state={forPrint:!1},this.handleBeforePrint=()=>{YM((()=>{this.setState({forPrint:!0})}))},this.handleAfterPrint=()=>{YM((()=>{this.setState({forPrint:!1})}))}}render(){let{props:e}=this,{options:t}=e,{forPrint:n}=this.state,r=n||"auto"===t.height||"auto"===t.contentHeight,o=r||null==t.height?"":t.height,a=["fc",n?"fc-media-print":"fc-media-screen",`fc-direction-${t.direction}`,e.theme.getClass("root")];return wI()||a.push("fc-liquid-hack"),e.children(a,o,r,n)}componentDidMount(){let{emitter:e}=this.props;e.on("_beforeprint",this.handleBeforePrint),e.on("_afterprint",this.handleAfterPrint)}componentWillUnmount(){let{emitter:e}=this.props;e.off("_beforeprint",this.handleBeforePrint),e.off("_afterprint",this.handleAfterPrint)}}class SI{constructor(e){this.component=e.component,this.isHitComboAllowed=e.isHitComboAllowed||null}destroy(){}}const CI={};class _I extends aA{constructor(e,t){super(e,t),this.handleRefresh=()=>{let e=this.computeTiming();e.state.nowDate.valueOf()!==this.state.nowDate.valueOf()&&this.setState(e.state),this.clearTimeout(),this.setTimeout(e.waitMs)},this.handleVisibilityChange=()=>{document.hidden||this.handleRefresh()},this.state=this.computeTiming().state}render(){let{props:e,state:t}=this;return e.children(t.nowDate,t.todayRange)}componentDidMount(){this.setTimeout(),this.context.nowManager.addResetListener(this.handleRefresh),document.addEventListener("visibilitychange",this.handleVisibilityChange)}componentDidUpdate(e){e.unit!==this.props.unit&&(this.clearTimeout(),this.setTimeout())}componentWillUnmount(){this.clearTimeout(),this.context.nowManager.removeResetListener(this.handleRefresh),document.removeEventListener("visibilitychange",this.handleVisibilityChange)}computeTiming(){let e,t,{props:n,context:r}=this,o=r.nowManager.getDateMarker(),{nowIndicatorSnap:a}=r.options;return"auto"===a&&(a=/year|month|week|day/.test(n.unit)||1===(n.unitValue||1)),a?(e=r.dateEnv.startOf(o,n.unit),t=r.dateEnv.add(e,OR(1,n.unit)).valueOf()-o.valueOf()):(e=o,t=6e4),t=Math.min(864e5,t),{state:{nowDate:e,todayRange:jI(e)},waitMs:t}}setTimeout(e=this.computeTiming().waitMs){this.timeoutId=setTimeout((()=>{const e=this.computeTiming();this.setState(e.state,(()=>{this.setTimeout(e.waitMs)}))}),e)}clearTimeout(){this.timeoutId&&clearTimeout(this.timeoutId)}}function jI(e){let t=qR(e);return{start:t,end:UR(t,1)}}_I.contextType=QM;class EI{getCurrentData(){return this.currentDataManager.getCurrentData()}dispatch(e){this.currentDataManager.dispatch(e)}get view(){return this.getCurrentData().viewApi}batchRendering(e){e()}updateSize(){this.trigger("_resize",!0)}setOption(e,t){this.dispatch({type:"SET_OPTION",optionName:e,rawOptionValue:t})}getOption(e){return this.currentDataManager.currentCalendarOptionsInput[e]}getAvailableLocaleCodes(){return Object.keys(this.getCurrentData().availableRawLocales)}on(e,t){let{currentDataManager:n}=this;n.currentCalendarOptionsRefiners[e]?n.emitter.on(e,t):console.warn(`Unknown listener name '${e}'`)}off(e,t){this.currentDataManager.emitter.off(e,t)}trigger(e,...t){this.currentDataManager.emitter.trigger(e,...t)}changeView(e,t){this.batchRendering((()=>{if(this.unselect(),t)if(t.start&&t.end)this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e}),this.dispatch({type:"SET_OPTION",optionName:"visibleRange",rawOptionValue:t});else{let{dateEnv:n}=this.getCurrentData();this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e,dateMarker:n.createMarker(t)})}else this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e})}))}zoomTo(e,t){let n;t=t||"day",n=this.getCurrentData().viewSpecs[t]||this.getUnitViewSpec(t),this.unselect(),n?this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:n.type,dateMarker:e}):this.dispatch({type:"CHANGE_DATE",dateMarker:e})}getUnitViewSpec(e){let t,n,{viewSpecs:r,toolbarConfig:o}=this.getCurrentData(),a=[].concat(o.header?o.header.viewsWithButtons:[],o.footer?o.footer.viewsWithButtons:[]);for(let e in r)a.push(e);for(t=0;t<a.length;t+=1)if(n=r[a[t]],n&&n.singleUnit===e)return n;return null}prev(){this.unselect(),this.dispatch({type:"PREV"})}next(){this.unselect(),this.dispatch({type:"NEXT"})}prevYear(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,-1)})}nextYear(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,1)})}today(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.nowManager.getDateMarker()})}gotoDate(e){let t=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:t.dateEnv.createMarker(e)})}incrementDate(e){let t=this.getCurrentData(),n=OR(e);n&&(this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:t.dateEnv.add(t.currentDate,n)}))}getDate(){let e=this.getCurrentData();return e.dateEnv.toDate(e.currentDate)}formatDate(e,t){let{dateEnv:n}=this.getCurrentData();return n.format(n.createMarker(e),wM(t))}formatRange(e,t,n){let{dateEnv:r}=this.getCurrentData();return r.formatRange(r.createMarker(e),r.createMarker(t),wM(n),n)}formatIso(e,t){let{dateEnv:n}=this.getCurrentData();return n.formatIso(n.createMarker(e),{omitTime:t})}select(e,t){let n;n=null==t?null!=e.start?e:{start:e,end:null}:{start:e,end:t};let r=this.getCurrentData(),o=function(e,t,n){let r=function(e,t){let{refined:n,extra:r}=AM(e,gI),o=n.start?t.createMarkerMeta(n.start):null,a=n.end?t.createMarkerMeta(n.end):null,{allDay:s}=n;return null==s&&(s=o&&o.isTimeUnspecified&&(!a||a.isTimeUnspecified)),Object.assign({range:{start:o?o.marker:null,end:a?a.marker:null},allDay:s},r)}(e,t),{range:o}=r;if(!o.start)return null;if(!o.end){if(null==n)return null;o.end=t.add(o.start,n)}return r}(n,r.dateEnv,OR({days:1}));o&&(this.dispatch({type:"SELECT_DATES",selection:o}),function(e,t,n){n.emitter.trigger("select",Object.assign(Object.assign({},function(e,t){let n={};for(let r of t.pluginHooks.dateSpanTransforms)Object.assign(n,r(e,t));var r,o;return Object.assign(n,(r=e,o=t.dateEnv,Object.assign(Object.assign({},yI(r.range,o,r.allDay)),{allDay:r.allDay}))),n}(e,n)),{jsEvent:null,view:n.viewApi||n.calendarApi.view}))}(o,0,r))}unselect(e){let t=this.getCurrentData();t.dateSelection&&(this.dispatch({type:"UNSELECT_DATES"}),function(e,t){t.emitter.trigger("unselect",{jsEvent:e?e.origEvent:null,view:t.viewApi||t.calendarApi.view})}(e,t))}addEvent(e,t){if(e instanceof JO){let t=e._def,n=e._instance;return this.getCurrentData().eventStore.defs[t.defId]||(this.dispatch({type:"ADD_EVENTS",eventStore:TO({def:t,instance:n})}),this.triggerEventAdd(e)),e}let n,r=this.getCurrentData();if(t instanceof QO)n=t.internalEventSource;else if("boolean"==typeof t)t&&([n]=FM(r.eventSources));else if(null!=t){let e=this.getEventSourceById(t);if(!e)return console.warn(`Could not find an event source with ID "${t}"`),null;n=e.internalEventSource}let o=_O(e,n,r,!1);if(o){let e=new JO(r,o.def,o.def.recurringDef?null:o.instance);return this.dispatch({type:"ADD_EVENTS",eventStore:TO(o)}),this.triggerEventAdd(e),e}return null}triggerEventAdd(e){let{emitter:t}=this.getCurrentData();t.trigger("eventAdd",{event:e,relatedEvents:[],revert:()=>{this.dispatch({type:"REMOVE_EVENTS",eventStore:XO(e)})}})}getEventById(e){let t=this.getCurrentData(),{defs:n,instances:r}=t.eventStore;e=String(e);for(let o in n){let a=n[o];if(a.publicId===e){if(a.recurringDef)return new JO(t,a,null);for(let e in r){let n=r[e];if(n.defId===a.defId)return new JO(t,a,n)}}}return null}getEvents(){let e=this.getCurrentData();return eI(e.eventStore,e)}removeAllEvents(){this.dispatch({type:"REMOVE_ALL_EVENTS"})}getEventSources(){let e=this.getCurrentData(),t=e.eventSources,n=[];for(let r in t)n.push(new QO(e,t[r]));return n}getEventSourceById(e){let t=this.getCurrentData(),n=t.eventSources;e=String(e);for(let r in n)if(n[r].publicId===e)return new QO(t,n[r]);return null}addEventSource(e){let t=this.getCurrentData();if(e instanceof QO)return t.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[e.internalEventSource]}),e;let n=HO(e,t);return n?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[n]}),new QO(t,n)):null}removeAllEventSources(){this.dispatch({type:"REMOVE_ALL_EVENT_SOURCES"})}refetchEvents(){this.dispatch({type:"FETCH_EVENT_SOURCES",isRefetch:!0})}scrollToTime(e){let t=OR(e);t&&this.trigger("_scrollRequest",{time:t})}}function NI(e,t){let n={left:Math.max(e.left,t.left),right:Math.min(e.right,t.right),top:Math.max(e.top,t.top),bottom:Math.min(e.bottom,t.bottom)};return n.left<n.right&&n.top<n.bottom&&n}const DI={defs:{},instances:{}};class TI{constructor(){this.getKeysForEventDefs=sM(this._getKeysForEventDefs),this.splitDateSelection=sM(this._splitDateSpan),this.splitEventStore=sM(this._splitEventStore),this.splitIndividualUi=sM(this._splitIndividualUi),this.splitEventDrag=sM(this._splitInteraction),this.splitEventResize=sM(this._splitInteraction),this.eventUiBuilders={}}splitProps(e){let t=this.getKeyInfo(e),n=this.getKeysForEventDefs(e.eventStore),r=this.splitDateSelection(e.dateSelection),o=this.splitIndividualUi(e.eventUiBases,n),a=this.splitEventStore(e.eventStore,n),s=this.splitEventDrag(e.eventDrag),i=this.splitEventResize(e.eventResize),l={};this.eventUiBuilders=PM(t,((e,t)=>this.eventUiBuilders[t]||sM(AI)));for(let n in t){let c=t[n],d=a[n]||DI,u=this.eventUiBuilders[n];l[n]={businessHours:c.businessHours||e.businessHours,dateSelection:r[n]||null,eventStore:d,eventUiBases:u(e.eventUiBases[""],c.ui,o[n]),eventSelection:d.instances[e.eventSelection]?e.eventSelection:"",eventDrag:s[n]||null,eventResize:i[n]||null}}return l}_splitDateSpan(e){let t={};if(e){let n=this.getKeysForDateSpan(e);for(let r of n)t[r]=e}return t}_getKeysForEventDefs(e){return PM(e.defs,(e=>this.getKeysForEventDef(e)))}_splitEventStore(e,t){let{defs:n,instances:r}=e,o={};for(let e in n)for(let r of t[e])o[r]||(o[r]={defs:{},instances:{}}),o[r].defs[e]=n[e];for(let e in r){let n=r[e];for(let r of t[n.defId])o[r]&&(o[r].instances[e]=n)}return o}_splitIndividualUi(e,t){let n={};for(let r in e)if(r)for(let o of t[r])n[o]||(n[o]={}),n[o][r]=e[r];return n}_splitInteraction(e){let t={};if(e){let n=this._splitEventStore(e.affectedEvents,this._getKeysForEventDefs(e.affectedEvents)),r=this._getKeysForEventDefs(e.mutatedEvents),o=this._splitEventStore(e.mutatedEvents,r),a=r=>{t[r]||(t[r]={affectedEvents:n[r]||DI,mutatedEvents:o[r]||DI,isEvent:e.isEvent})};for(let e in n)a(e);for(let e in o)a(e)}return t}}function AI(e,t,n){let r=[];e&&r.push(e),t&&r.push(t);let o={"":LO(r)};return n&&Object.assign(o,n),o}function RI(e,t,n,r){return{dow:e.getUTCDay(),isDisabled:Boolean(r&&(!r.activeRange||!mO(r.activeRange,e))),isOther:Boolean(r&&!mO(r.currentRange,e)),isToday:Boolean(t&&mO(t,e)),isPast:Boolean(n?e<n:!!t&&e<t.start),isFuture:Boolean(n?e>n:!!t&&e>=t.end)}}function MI(e,t){let n=["fc-day",`fc-day-${BR[e.dow]}`];return e.isDisabled?n.push("fc-day-disabled"):(e.isToday&&(n.push("fc-day-today"),n.push(t.getClass("today"))),e.isPast&&n.push("fc-day-past"),e.isFuture&&n.push("fc-day-future"),e.isOther&&n.push("fc-day-other")),n}const OI=wM({year:"numeric",month:"long",day:"numeric"}),II=wM({week:"long"});function PI(e,t,n="day",r=!0){const{dateEnv:o,options:a,calendarApi:s}=e;let i=o.format(t,"week"===n?II:OI);if(a.navLinks){let e=o.toDate(t);const l=e=>{let r="day"===n?a.navLinkDayClick:"week"===n?a.navLinkWeekClick:null;"function"==typeof r?r.call(s,o.toDate(t),e):("string"==typeof r&&(n=r),s.zoomTo(t,n))};return Object.assign({title:DR(a.navLinkHint,[i,e],i),"data-navlink":""},r?SR(l):{onClick:l})}return{"aria-label":i}}let LI;class FI{constructor(e,t,n,r){this.els=t;let o=this.originClientRect=e.getBoundingClientRect();n&&this.buildElHorizontals(o.left),r&&this.buildElVerticals(o.top)}buildElHorizontals(e){let t=[],n=[];for(let r of this.els){let o=r.getBoundingClientRect();t.push(o.left-e),n.push(o.right-e)}this.lefts=t,this.rights=n}buildElVerticals(e){let t=[],n=[];for(let r of this.els){let o=r.getBoundingClientRect();t.push(o.top-e),n.push(o.bottom-e)}this.tops=t,this.bottoms=n}leftToIndex(e){let t,{lefts:n,rights:r}=this,o=n.length;for(t=0;t<o;t+=1)if(e>=n[t]&&e<r[t])return t}topToIndex(e){let t,{tops:n,bottoms:r}=this,o=n.length;for(t=0;t<o;t+=1)if(e>=n[t]&&e<r[t])return t}getWidth(e){return this.rights[e]-this.lefts[e]}getHeight(e){return this.bottoms[e]-this.tops[e]}similarTo(e){return zI(this.tops||[],e.tops||[])&&zI(this.bottoms||[],e.bottoms||[])&&zI(this.lefts||[],e.lefts||[])&&zI(this.rights||[],e.rights||[])}}function zI(e,t){const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(Math.round(e[r])!==Math.round(t[r]))return!1;return!0}class HI extends eO{constructor(){super(...arguments),this.uid=jR()}prepareHits(){}queryHit(e,t,n,r){return null}isValidSegDownEl(e){return!this.props.eventDrag&&!this.props.eventResize&&!gR(e,".fc-event-mirror")}isValidDateDownEl(e){return!(gR(e,".fc-event:not(.fc-bg-event)")||gR(e,".fc-more-link")||gR(e,"a[data-navlink]")||gR(e,".fc-popover"))}}class VI{constructor(e){this.timeZoneName=e}}class BI{constructor(e=e=>e.thickness||1){this.getEntryThickness=e,this.strictOrder=!1,this.allowReslicing=!1,this.maxCoord=-1,this.maxStackCnt=-1,this.levelCoords=[],this.entriesByLevel=[],this.stackCnts={}}addSegs(e){let t=[];for(let n of e)this.insertEntry(n,t);return t}insertEntry(e,t){let n=this.findInsertion(e);this.isInsertionValid(n,e)?this.insertEntryAt(e,n):this.handleInvalidInsertion(n,e,t)}isInsertionValid(e,t){return(-1===this.maxCoord||e.levelCoord+this.getEntryThickness(t)<=this.maxCoord)&&(-1===this.maxStackCnt||e.stackCnt<this.maxStackCnt)}handleInvalidInsertion(e,t,n){if(this.allowReslicing&&e.touchingEntry){const r=Object.assign(Object.assign({},t),{span:$I(t.span,e.touchingEntry.span)});n.push(r),this.splitEntry(t,e.touchingEntry,n)}else n.push(t)}splitEntry(e,t,n){let r=e.span,o=t.span;r.start<o.start&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:r.start,end:o.start}},n),r.end>o.end&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:o.end,end:r.end}},n)}insertEntryAt(e,t){let{entriesByLevel:n,levelCoords:r}=this;-1===t.lateral?(GI(r,t.level,t.levelCoord),GI(n,t.level,[e])):GI(n[t.level],t.lateral,e),this.stackCnts[UI(e)]=t.stackCnt}findInsertion(e){let{levelCoords:t,entriesByLevel:n,strictOrder:r,stackCnts:o}=this,a=t.length,s=0,i=-1,l=-1,c=null,d=0;for(let u=0;u<a;u+=1){const a=t[u];if(!r&&a>=s+this.getEntryThickness(e))break;let f,h=n[u],m=YI(h,e.span.start,WI),p=m[0]+m[1];for(;(f=h[p])&&f.span.start<e.span.end;){let e=a+this.getEntryThickness(f);e>s&&(s=e,c=f,i=u,l=p),e===s&&(d=Math.max(d,o[UI(f)]+1)),p+=1}}let u=0;if(c)for(u=i+1;u<a&&t[u]<s;)u+=1;let f=-1;return u<a&&t[u]===s&&(f=YI(n[u],e.span.end,WI)[0]),{touchingLevel:i,touchingLateral:l,touchingEntry:c,stackCnt:d,levelCoord:s,level:u,lateral:f}}toRects(){let{entriesByLevel:e,levelCoords:t}=this,n=e.length,r=[];for(let o=0;o<n;o+=1){let n=e[o],a=t[o];for(let e of n)r.push(Object.assign(Object.assign({},e),{thickness:this.getEntryThickness(e),levelCoord:a}))}return r}}function WI(e){return e.span.end}function UI(e){return e.index+":"+e.span.start}function $I(e,t){let n=Math.max(e.start,t.start),r=Math.min(e.end,t.end);return n<r?{start:n,end:r}:null}function GI(e,t,n){e.splice(t,0,n)}function YI(e,t,n){let r=0,o=e.length;if(!o||t<n(e[r]))return[0,0];if(t>n(e[o-1]))return[o,0];for(;r<o;){let a=Math.floor(r+(o-r)/2),s=n(e[a]);if(t<s)o=a;else{if(!(t>s))return[a,1];r=a+1}}return[r,0]}Boolean;const qI="fc-col-header-cell";function ZI(e){return e.text}class KI extends eO{render(){let{dateEnv:e,options:t,theme:n,viewApi:r}=this.context,{props:o}=this,{date:a,dateProfile:s}=o,i=RI(a,o.todayRange,null,s),l=[qI].concat(MI(i,n)),c=e.format(a,o.dayHeaderFormat),d=!i.isDisabled&&o.colCnt>1?PI(this.context,a):{},u=e.toDate(a);e.namedTimeZoneImpl&&(u=$R(u,36e5));let f=Object.assign(Object.assign(Object.assign({date:u,view:r},o.extraRenderProps),{text:c}),i);return JT(iO,{elTag:"th",elClasses:l,elAttrs:Object.assign({role:"columnheader",colSpan:o.colSpan,"data-date":i.isDisabled?void 0:oM(a)},o.extraDataAttrs),renderProps:f,generatorName:"dayHeaderContent",customGenerator:t.dayHeaderContent,defaultGenerator:ZI,classNameGenerator:t.dayHeaderClassNames,didMount:t.dayHeaderDidMount,willUnmount:t.dayHeaderWillUnmount},(e=>JT("div",{className:"fc-scrollgrid-sync-inner"},!i.isDisabled&&JT(e,{elTag:"a",elAttrs:d,elClasses:["fc-col-header-cell-cushion",o.isSticky&&"fc-sticky"]}))))}}const QI=wM({weekday:"long"});class JI extends eO{render(){let{props:e}=this,{dateEnv:t,theme:n,viewApi:r,options:o}=this.context,a=UR(new Date(2592e5),e.dow),s={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},i=t.format(a,e.dayHeaderFormat),l=Object.assign(Object.assign(Object.assign(Object.assign({date:a},s),{view:r}),e.extraRenderProps),{text:i});return JT(iO,{elTag:"th",elClasses:[qI,...MI(s,n),...e.extraClassNames||[]],elAttrs:Object.assign({role:"columnheader",colSpan:e.colSpan},e.extraDataAttrs),renderProps:l,generatorName:"dayHeaderContent",customGenerator:o.dayHeaderContent,defaultGenerator:ZI,classNameGenerator:o.dayHeaderClassNames,didMount:o.dayHeaderDidMount,willUnmount:o.dayHeaderWillUnmount},(n=>JT("div",{className:"fc-scrollgrid-sync-inner"},JT(n,{elTag:"a",elClasses:["fc-col-header-cell-cushion",e.isSticky&&"fc-sticky"],elAttrs:{"aria-label":t.format(a,QI)}}))))}}class XI extends eO{constructor(){super(...arguments),this.createDayHeaderFormatter=sM(eP)}render(){let{context:e}=this,{dates:t,dateProfile:n,datesRepDistinctDays:r,renderIntro:o}=this.props,a=this.createDayHeaderFormatter(e.options.dayHeaderFormat,r,t.length);return JT(_I,{unit:"day"},((e,s)=>JT("tr",{role:"row"},o&&o("day"),t.map((e=>r?JT(KI,{key:e.toISOString(),date:e,dateProfile:n,todayRange:s,colCnt:t.length,dayHeaderFormat:a}):JT(JI,{key:e.getUTCDay(),dow:e.getUTCDay(),dayHeaderFormat:a}))))))}}function eP(e,t,n){return e||function(e,t){return wM(!e||t>10?{weekday:"short"}:t>1?{weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}:{weekday:"long"})}(t,n)}class tP{constructor(e,t){let n=e.start,{end:r}=e,o=[],a=[],s=-1;for(;n<r;)t.isHiddenDay(n)?o.push(s+.5):(s+=1,o.push(s),a.push(n)),n=UR(n,1);this.dates=a,this.indices=o,this.cnt=a.length}sliceRange(e){let t=this.getDateDayIndex(e.start),n=this.getDateDayIndex(UR(e.end,-1)),r=Math.max(0,t),o=Math.min(this.cnt-1,n);return r=Math.ceil(r),o=Math.floor(o),r<=o?{firstIndex:r,lastIndex:o,isStart:t===r,isEnd:n===o}:null}getDateDayIndex(e){let{indices:t}=this,n=Math.floor(GR(this.dates[0],e));return n<0?t[0]-1:n>=t.length?t[t.length-1]+1:t[n]}}class nP{constructor(e,t){let n,r,o,{dates:a}=e;if(t){for(r=a[0].getUTCDay(),n=1;n<a.length&&a[n].getUTCDay()!==r;n+=1);o=Math.ceil(a.length/n)}else o=1,n=a.length;this.rowCnt=o,this.colCnt=n,this.daySeries=e,this.cells=this.buildCells(),this.headerDates=this.buildHeaderDates()}buildCells(){let e=[];for(let t=0;t<this.rowCnt;t+=1){let n=[];for(let e=0;e<this.colCnt;e+=1)n.push(this.buildCell(t,e));e.push(n)}return e}buildCell(e,t){let n=this.daySeries.dates[e*this.colCnt+t];return{key:n.toISOString(),date:n}}buildHeaderDates(){let e=[];for(let t=0;t<this.colCnt;t+=1)e.push(this.cells[0][t].date);return e}sliceRange(e){let{colCnt:t}=this,n=this.daySeries.sliceRange(e),r=[];if(n){let{firstIndex:e,lastIndex:o}=n,a=e;for(;a<=o;){let s=Math.floor(a/t),i=Math.min((s+1)*t,o+1);r.push({row:s,firstCol:a%t,lastCol:(i-1)%t,isStart:n.isStart&&a===e,isEnd:n.isEnd&&i-1===o}),a=i}}return r}}class rP{constructor(){this.sliceBusinessHours=sM(this._sliceBusinessHours),this.sliceDateSelection=sM(this._sliceDateSpan),this.sliceEventStore=sM(this._sliceEventStore),this.sliceEventDrag=sM(this._sliceInteraction),this.sliceEventResize=sM(this._sliceInteraction),this.forceDayIfListItem=!1}sliceProps(e,t,n,r,...o){let{eventUiBases:a}=e,s=this.sliceEventStore(e.eventStore,a,t,n,...o);return{dateSelectionSegs:this.sliceDateSelection(e.dateSelection,t,n,a,r,...o),businessHourSegs:this.sliceBusinessHours(e.businessHours,t,n,r,...o),fgEventSegs:s.fg,bgEventSegs:s.bg,eventDrag:this.sliceEventDrag(e.eventDrag,a,t,n,...o),eventResize:this.sliceEventResize(e.eventResize,a,t,n,...o),eventSelection:e.eventSelection}}sliceNowDate(e,t,n,r,...o){return this._sliceDateSpan({range:{start:e,end:$R(e,1)},allDay:!1},t,n,{},r,...o)}_sliceBusinessHours(e,t,n,r,...o){return e?this._sliceEventStore(xO(e,oP(t,Boolean(n)),r),{},t,n,...o).bg:[]}_sliceEventStore(e,t,n,r,...o){if(e){let a=tI(e,t,oP(n,Boolean(r)),r);return{bg:this.sliceEventRanges(a.bg,o),fg:this.sliceEventRanges(a.fg,o)}}return{bg:[],fg:[]}}_sliceInteraction(e,t,n,r,...o){if(!e)return null;let a=tI(e.mutatedEvents,t,oP(n,Boolean(r)),r);return{segs:this.sliceEventRanges(a.fg,o),affectedInstances:e.affectedEvents.instances,isEvent:e.isEvent}}_sliceDateSpan(e,t,n,r,o,...a){if(!e)return[];let s=oP(t,Boolean(n)),i=hO(e.range,s);if(i){let t=function(e,t,n){let r=jO({editable:!1},n),o=NO(r.refined,r.extra,"",e.allDay,!0,n);return{def:o,ui:aI(o,t),instance:bO(o.defId,e.range),range:e.range,isStart:!0,isEnd:!0}}(e=Object.assign(Object.assign({},e),{range:i}),r,o),n=this.sliceRange(e.range,...a);for(let e of n)e.eventRange=t;return n}return[]}sliceEventRanges(e,t){let n=[];for(let r of e)n.push(...this.sliceEventRange(r,t));return n}sliceEventRange(e,t){let n=e.range;this.forceDayIfListItem&&"list-item"===e.ui.display&&(n={start:n.start,end:UR(n.start,1)});let r=this.sliceRange(n,...t);for(let t of r)t.eventRange=e,t.isStart=e.isStart&&t.isStart,t.isEnd=e.isEnd&&t.isEnd;return r}}function oP(e,t){let n=e.activeRange;return t?n:{start:$R(n.start,e.slotMinTime.milliseconds),end:$R(n.end,e.slotMaxTime.milliseconds-864e5)}}const aP=/^(visible|hidden)$/;class sP extends eO{constructor(){super(...arguments),this.handleEl=e=>{this.el=e,tO(this.props.elRef,e)}}render(){let{props:e}=this,{liquid:t,liquidIsAbsolute:n}=e,r=t&&n,o=["fc-scroller"];return t&&(n?o.push("fc-scroller-liquid-absolute"):o.push("fc-scroller-liquid")),JT("div",{ref:this.handleEl,className:o.join(" "),style:{overflowX:e.overflowX,overflowY:e.overflowY,left:r&&-(e.overcomeLeft||0)||"",right:r&&-(e.overcomeRight||0)||"",bottom:r&&-(e.overcomeBottom||0)||"",marginLeft:!r&&-(e.overcomeLeft||0)||"",marginRight:!r&&-(e.overcomeRight||0)||"",marginBottom:!r&&-(e.overcomeBottom||0)||"",maxHeight:e.maxHeight||""}},e.children)}needsXScrolling(){if(aP.test(this.props.overflowX))return!1;let{el:e}=this,t=this.el.getBoundingClientRect().width-this.getYScrollbarWidth(),{children:n}=e;for(let e=0;e<n.length;e+=1)if(n[e].getBoundingClientRect().width>t)return!0;return!1}needsYScrolling(){if(aP.test(this.props.overflowY))return!1;let{el:e}=this,t=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),{children:n}=e;for(let e=0;e<n.length;e+=1)if(n[e].getBoundingClientRect().height>t)return!0;return!1}getXScrollbarWidth(){return aP.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight}getYScrollbarWidth(){return aP.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth}}class iP{constructor(e){this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=(e,t)=>{let{depths:n,currentMap:r}=this,o=!1,a=!1;null!==e?(o=t in r,r[t]=e,n[t]=(n[t]||0)+1,a=!0):(n[t]-=1,n[t]||(delete r[t],delete this.callbackMap[t],o=!0)),this.masterCallback&&(o&&this.masterCallback(null,String(t)),a&&this.masterCallback(e,String(t)))}}createRef(e){let t=this.callbackMap[e];return t||(t=this.callbackMap[e]=t=>{this.handleValue(t,String(e))}),t}collect(e,t,n){return function(e,t=0,n,r=1){let o=[];null==n&&(n=Object.keys(e).length);for(let a=t;a<n;a+=r){let t=e[a];void 0!==t&&o.push(t)}return o}(this.currentMap,e,t,n)}getAll(){return FM(this.currentMap)}}function lP(e,t){return e.liquid&&t.liquid}function cP(e,t){return VR(e,t,zM)}function dP(e,t){let n=[];for(let r of e){let e=r.span||1;for(let o=0;o<e;o+=1)n.push(JT("col",{style:{width:"shrink"===r.width?uP(t):r.width||"",minWidth:r.minWidth||""}}))}return JT("colgroup",{},...n)}function uP(e){return null==e?4:e}function fP(e,t){let n=["fc-scrollgrid-section",`fc-scrollgrid-section-${e.type}`,e.className];return t&&e.liquid&&null==e.maxHeight&&n.push("fc-scrollgrid-section-liquid"),e.isSticky&&n.push("fc-scrollgrid-section-sticky"),n}function hP(e){return JT("div",{className:"fc-scrollgrid-sticky-shim",style:{width:e.clientWidth,minWidth:e.tableMinWidth}})}function mP(e){let{stickyHeaderDates:t}=e;return null!=t&&"auto"!==t||(t="auto"===e.height||"auto"===e.viewHeight),t}function pP(e){let{stickyFooterScrollbar:t}=e;return null!=t&&"auto"!==t||(t="auto"===e.height||"auto"===e.viewHeight),t}class gP extends eO{constructor(){super(...arguments),this.processCols=sM((e=>e),cP),this.renderMicroColGroup=sM(dP),this.scrollerRefs=new iP,this.scrollerElRefs=new iP(this._handleScrollerEl.bind(this)),this.state={shrinkWidth:null,forceYScrollbars:!1,scrollerClientWidths:{},scrollerClientHeights:{}},this.handleSizing=()=>{this.safeSetState(Object.assign({shrinkWidth:this.computeShrinkWidth()},this.computeScrollerDims()))}}render(){let{props:e,state:t,context:n}=this,r=e.sections||[],o=this.processCols(e.cols),a=this.renderMicroColGroup(o,t.shrinkWidth),s=function(e,t){let n=["fc-scrollgrid",t.theme.getClass("table")];return e&&n.push("fc-scrollgrid-liquid"),n}(e.liquid,n);e.collapsibleWidth&&s.push("fc-scrollgrid-collapsible");let i,l=r.length,c=0,d=[],u=[],f=[];for(;c<l&&"header"===(i=r[c]).type;)d.push(this.renderSection(i,a,!0)),c+=1;for(;c<l&&"body"===(i=r[c]).type;)u.push(this.renderSection(i,a,!1)),c+=1;for(;c<l&&"footer"===(i=r[c]).type;)f.push(this.renderSection(i,a,!0)),c+=1;let h=!wI();const m={role:"rowgroup"};return JT("table",{role:"grid",className:s.join(" "),style:{height:e.height}},Boolean(!h&&d.length)&&JT("thead",m,...d),Boolean(!h&&u.length)&&JT("tbody",m,...u),Boolean(!h&&f.length)&&JT("tfoot",m,...f),h&&JT("tbody",m,...d,...u,...f))}renderSection(e,t,n){return"outerContent"in e?JT(eA,{key:e.key},e.outerContent):JT("tr",{key:e.key,role:"presentation",className:fP(e,this.props.liquid).join(" ")},this.renderChunkTd(e,t,e.chunk,n))}renderChunkTd(e,t,n,r){if("outerContent"in n)return n.outerContent;let{props:o}=this,{forceYScrollbars:a,scrollerClientWidths:s,scrollerClientHeights:i}=this.state,l=function(e,t){return null!=t.maxHeight||lP(e,t)}(o,e),c=lP(o,e),d=o.liquid?a?"scroll":l?"auto":"hidden":"visible",u=e.key,f=function(e,t,n,r){let{expandRows:o}=n;return"function"==typeof t.content?t.content(n):JT("table",{role:"presentation",className:[t.tableClassName,e.syncRowHeights?"fc-scrollgrid-sync-table":""].join(" "),style:{minWidth:n.tableMinWidth,width:n.clientWidth,height:o?n.clientHeight:""}},n.tableColGroupNode,JT(r?"thead":"tbody",{role:"presentation"},"function"==typeof t.rowContent?t.rowContent(n):t.rowContent))}(e,n,{tableColGroupNode:t,tableMinWidth:"",clientWidth:o.collapsibleWidth||void 0===s[u]?null:s[u],clientHeight:void 0!==i[u]?i[u]:null,expandRows:e.expandRows,syncRowHeights:!1,rowSyncHeights:[],reportRowHeightChange:()=>{}},r);return JT(r?"th":"td",{ref:n.elRef,role:"presentation"},JT("div",{className:"fc-scroller-harness"+(c?" fc-scroller-harness-liquid":"")},JT(sP,{ref:this.scrollerRefs.createRef(u),elRef:this.scrollerElRefs.createRef(u),overflowY:d,overflowX:o.liquid?"hidden":"visible",maxHeight:e.maxHeight,liquid:c,liquidIsAbsolute:!0},f)))}_handleScrollerEl(e,t){let n=function(e,t){for(let n of e)if(n.key===t)return n;return null}(this.props.sections,t);n&&tO(n.chunk.scrollerElRef,e)}componentDidMount(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)}componentDidUpdate(){this.handleSizing()}componentWillUnmount(){this.context.removeResizeHandler(this.handleSizing)}computeShrinkWidth(){return function(e){for(let t of e)if("shrink"===t.width)return!0;return!1}(this.props.cols)?function(e){let t=function(e){let t=e instanceof HTMLElement?[e]:e,n=[];for(let e=0;e<t.length;e+=1){let r=t[e].querySelectorAll(".fc-scrollgrid-shrink");for(let e=0;e<r.length;e+=1)n.push(r[e])}return n}(e),n=0;for(let e of t)n=Math.max(n,AR(e));return Math.ceil(n)}(this.scrollerElRefs.getAll()):0}computeScrollerDims(){let e=(LI||(LI=function(){let e=document.createElement("div");e.style.overflow="scroll",e.style.position="absolute",e.style.top="-9999px",e.style.left="-9999px",document.body.appendChild(e);let t=function(e){return{x:e.offsetHeight-e.clientHeight,y:e.offsetWidth-e.clientWidth}}(e);return document.body.removeChild(e),t}()),LI),{scrollerRefs:t,scrollerElRefs:n}=this,r=!1,o={},a={};for(let e in t.currentMap){let n=t.currentMap[e];if(n&&n.needsYScrolling()){r=!0;break}}for(let t of this.props.sections){let s=t.key,i=n.currentMap[s];if(i){let t=i.parentNode;o[s]=Math.floor(t.getBoundingClientRect().width-(r?e.y:0)),a[s]=Math.floor(t.getBoundingClientRect().height)}}return{forceYScrollbars:r,scrollerClientWidths:o,scrollerClientHeights:a}}}gP.addStateEquality({scrollerClientWidths:zM,scrollerClientHeights:zM});class vP extends eO{constructor(){super(...arguments),this.buildPublicEvent=sM(((e,t,n)=>new JO(e,t,n))),this.handleEl=e=>{this.el=e,tO(this.props.elRef,e),e&&nI(e,this.props.seg)}}render(){const{props:e,context:t}=this,{options:n}=t,{seg:r}=e,{eventRange:o}=r,{ui:a}=o,s={event:this.buildPublicEvent(t,o.def,o.instance),view:t.viewApi,timeText:e.timeText,textColor:a.textColor,backgroundColor:a.backgroundColor,borderColor:a.borderColor,isDraggable:!e.disableDragging&&lI(r,t),isStartResizable:!e.disableResizing&&cI(r,t),isEndResizable:!e.disableResizing&&dI(r),isMirror:Boolean(e.isDragging||e.isResizing||e.isDateSelecting),isStart:Boolean(r.isStart),isEnd:Boolean(r.isEnd),isPast:Boolean(e.isPast),isFuture:Boolean(e.isFuture),isToday:Boolean(e.isToday),isSelected:Boolean(e.isSelected),isDragging:Boolean(e.isDragging),isResizing:Boolean(e.isResizing)};return JT(iO,{elRef:this.handleEl,elTag:e.elTag,elAttrs:e.elAttrs,elClasses:[...hI(s),...r.eventRange.ui.classNames,...e.elClasses||[]],elStyle:e.elStyle,renderProps:s,generatorName:"eventContent",customGenerator:n.eventContent,defaultGenerator:e.defaultGenerator,classNameGenerator:n.eventClassNames,didMount:n.eventDidMount,willUnmount:n.eventWillUnmount},e.children)}componentDidUpdate(e){this.el&&this.props.seg!==e.seg&&nI(this.el,this.props.seg)}}class yP extends eO{render(){let{props:e,context:t}=this,{options:n}=t,{seg:r}=e,{ui:o}=r.eventRange,a=uI(r,n.eventTimeFormat||e.defaultTimeFormat,t,e.defaultDisplayEventTime,e.defaultDisplayEventEnd);return JT(vP,Object.assign({},e,{elTag:"a",elStyle:{borderColor:o.borderColor,backgroundColor:o.backgroundColor},elAttrs:pI(r,t),defaultGenerator:bP,timeText:a}),((e,t)=>JT(eA,null,JT(e,{elTag:"div",elClasses:["fc-event-main"],elStyle:{color:t.textColor}}),Boolean(t.isStartResizable)&&JT("div",{className:"fc-event-resizer fc-event-resizer-start"}),Boolean(t.isEndResizable)&&JT("div",{className:"fc-event-resizer fc-event-resizer-end"}))))}}function bP(e){return JT("div",{className:"fc-event-main-frame"},e.timeText&&JT("div",{className:"fc-event-time"},e.timeText),JT("div",{className:"fc-event-title-container"},JT("div",{className:"fc-event-title fc-sticky"},e.event.title||JT(eA,null," "))))}yP.addPropsEquality({seg:zM});const xP=e=>JT(QM.Consumer,null,(t=>{let{options:n}=t,r={isAxis:e.isAxis,date:t.dateEnv.toDate(e.date),view:t.viewApi};return JT(iO,{elRef:e.elRef,elTag:e.elTag||"div",elAttrs:e.elAttrs,elClasses:e.elClasses,elStyle:e.elStyle,renderProps:r,generatorName:"nowIndicatorContent",customGenerator:n.nowIndicatorContent,classNameGenerator:n.nowIndicatorClassNames,didMount:n.nowIndicatorDidMount,willUnmount:n.nowIndicatorWillUnmount},e.children)})),wP=wM({day:"numeric"});class kP extends eO{constructor(){super(...arguments),this.refineRenderProps=iM(CP)}render(){let{props:e,context:t}=this,{options:n}=t,r=this.refineRenderProps({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,isMonthStart:e.isMonthStart||!1,showDayNumber:e.showDayNumber,extraRenderProps:e.extraRenderProps,viewApi:t.viewApi,dateEnv:t.dateEnv,monthStartFormat:n.monthStartFormat});return JT(iO,{elRef:e.elRef,elTag:e.elTag,elAttrs:Object.assign(Object.assign({},e.elAttrs),r.isDisabled?{}:{"data-date":oM(e.date)}),elClasses:[...MI(r,t.theme),...e.elClasses||[]],elStyle:e.elStyle,renderProps:r,generatorName:"dayCellContent",customGenerator:n.dayCellContent,defaultGenerator:e.defaultGenerator,classNameGenerator:r.isDisabled?void 0:n.dayCellClassNames,didMount:n.dayCellDidMount,willUnmount:n.dayCellWillUnmount},e.children)}}function SP(e){return Boolean(e.dayCellContent||rO("dayCellContent",e))}function CP(e){let{date:t,dateEnv:n,dateProfile:r,isMonthStart:o}=e,a=RI(t,e.todayRange,null,r),s=e.showDayNumber?n.format(t,o?e.monthStartFormat:wP):"";return Object.assign(Object.assign(Object.assign({date:n.toDate(t),view:e.viewApi},a),{isMonthStart:o,dayNumberText:s}),e.extraRenderProps)}class _P extends eO{render(){let{props:e}=this,{seg:t}=e;return JT(vP,{elTag:"div",elClasses:["fc-bg-event"],elStyle:{backgroundColor:t.eventRange.ui.backgroundColor},defaultGenerator:jP,seg:t,timeText:"",isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday,disableDragging:!0,disableResizing:!0})}}function jP(e){let{title:t}=e.event;return t&&JT("div",{className:"fc-event-title"},e.event.title)}function EP(e){return JT("div",{className:`fc-${e}`})}const NP=e=>JT(QM.Consumer,null,(t=>{let{dateEnv:n,options:r}=t,{date:o}=e,a=r.weekNumberFormat||e.defaultFormat,s={num:n.computeWeekNumber(o),text:n.format(o,a),date:o};return JT(iO,{elRef:e.elRef,elTag:e.elTag,elAttrs:e.elAttrs,elClasses:e.elClasses,elStyle:e.elStyle,renderProps:s,generatorName:"weekNumberContent",customGenerator:r.weekNumberContent,defaultGenerator:DP,classNameGenerator:r.weekNumberClassNames,didMount:r.weekNumberDidMount,willUnmount:r.weekNumberWillUnmount},e.children)}));function DP(e){return e.text}class TP extends eO{constructor(){super(...arguments),this.state={titleId:wR()},this.handleRootEl=e=>{this.rootEl=e,this.props.elRef&&tO(this.props.elRef,e)},this.handleDocumentMouseDown=e=>{const t=function(e){var t,n;return null!==(n=null===(t=e.composedPath)||void 0===t?void 0:t.call(e)[0])&&void 0!==n?n:e.target}(e);this.rootEl.contains(t)||this.handleCloseClick()},this.handleDocumentKeyDown=e=>{"Escape"===e.key&&this.handleCloseClick()},this.handleCloseClick=()=>{let{onClose:e}=this.props;e&&e()}}render(){let{theme:e,options:t}=this.context,{props:n,state:r}=this,o=["fc-popover",e.getClass("popover")].concat(n.extraClassNames||[]);return function(e,t){var n=JT(KA,{__v:e,i:t});return n.containerInfo=t,n}(JT("div",Object.assign({},n.extraAttrs,{id:n.id,className:o.join(" "),"aria-labelledby":r.titleId,ref:this.handleRootEl}),JT("div",{className:"fc-popover-header "+e.getClass("popoverHeader")},JT("span",{className:"fc-popover-title",id:r.titleId},n.title),JT("span",{className:"fc-popover-close "+e.getIconClass("close"),title:t.closeHint,onClick:this.handleCloseClick})),JT("div",{className:"fc-popover-body "+e.getClass("popoverContent")},n.children)),n.parentEl)}componentDidMount(){document.addEventListener("mousedown",this.handleDocumentMouseDown),document.addEventListener("keydown",this.handleDocumentKeyDown),this.updateSize()}componentWillUnmount(){document.removeEventListener("mousedown",this.handleDocumentMouseDown),document.removeEventListener("keydown",this.handleDocumentKeyDown)}updateSize(){let{isRtl:e}=this.context,{alignmentEl:t,alignGridTop:n}=this.props,{rootEl:r}=this,o=function(e){let t=function(e){let t=[];for(;e instanceof HTMLElement;){let n=window.getComputedStyle(e);if("fixed"===n.position)break;/(auto|scroll)/.test(n.overflow+n.overflowY+n.overflowX)&&t.push(e),e=e.parentNode}return t}(e),n=e.getBoundingClientRect();for(let e of t){let t=NI(n,e.getBoundingClientRect());if(!t)return null;n=t}return n}(t);if(o){let a=r.getBoundingClientRect(),s=n?gR(t,".fc-scrollgrid").getBoundingClientRect().top:o.top,i=e?o.right-a.width:o.left;s=Math.max(s,10),i=Math.min(i,document.documentElement.clientWidth-10-a.width),i=Math.max(i,10);let l=r.offsetParent.getBoundingClientRect();!function(e,t){for(let n in t)bR(e,n,t[n])}(r,{top:s-l.top,left:i-l.left})}}}class AP extends HI{constructor(){super(...arguments),this.handleRootEl=e=>{this.rootEl=e,e?this.context.registerInteractiveComponent(this,{el:e,useEventCenter:!1}):this.context.unregisterInteractiveComponent(this)}}render(){let{options:e,dateEnv:t}=this.context,{props:n}=this,{startDate:r,todayRange:o,dateProfile:a}=n,s=t.format(r,e.dayPopoverFormat);return JT(kP,{elRef:this.handleRootEl,date:r,dateProfile:a,todayRange:o},((t,r,o)=>JT(TP,{elRef:o.ref,id:n.id,title:s,extraClassNames:["fc-more-popover"].concat(o.className||[]),extraAttrs:o,parentEl:n.parentEl,alignmentEl:n.alignmentEl,alignGridTop:n.alignGridTop,onClose:n.onClose},SP(e)&&JT(t,{elTag:"div",elClasses:["fc-more-popover-misc"]}),n.children)))}queryHit(e,t,n,r){let{rootEl:o,props:a}=this;return e>=0&&e<n&&t>=0&&t<r?{dateProfile:a.dateProfile,dateSpan:Object.assign({allDay:!a.forceTimed,range:{start:a.startDate,end:a.endDate}},a.extraDateSpan),dayEl:o,rect:{left:0,top:0,right:n,bottom:r},layer:1}:null}}class RP extends eO{constructor(){super(...arguments),this.state={isPopoverOpen:!1,popoverId:wR()},this.handleLinkEl=e=>{this.linkEl=e,this.props.elRef&&tO(this.props.elRef,e)},this.handleClick=e=>{let{props:t,context:n}=this,{moreLinkClick:r}=n.options,o=OP(t).start;function a(e){let{def:t,instance:r,range:o}=e.eventRange;return{event:new JO(n,t,r),start:n.dateEnv.toDate(o.start),end:n.dateEnv.toDate(o.end),isStart:e.isStart,isEnd:e.isEnd}}"function"==typeof r&&(r=r({date:o,allDay:Boolean(t.allDayDate),allSegs:t.allSegs.map(a),hiddenSegs:t.hiddenSegs.map(a),jsEvent:e,view:n.viewApi})),r&&"popover"!==r?"string"==typeof r&&n.calendarApi.zoomTo(o,r):this.setState({isPopoverOpen:!0})},this.handlePopoverClose=()=>{this.setState({isPopoverOpen:!1})}}render(){let{props:e,state:t}=this;return JT(QM.Consumer,null,(n=>{let{viewApi:r,options:o,calendarApi:a}=n,{moreLinkText:s}=o,{moreCnt:i}=e,l=OP(e),c="function"==typeof s?s.call(a,i):`+${i} ${s}`,d=DR(o.moreLinkHint,[i],c),u={num:i,shortText:`+${i}`,text:c,view:r};return JT(eA,null,Boolean(e.moreCnt)&&JT(iO,{elTag:e.elTag||"a",elRef:this.handleLinkEl,elClasses:[...e.elClasses||[],"fc-more-link"],elStyle:e.elStyle,elAttrs:Object.assign(Object.assign(Object.assign({},e.elAttrs),SR(this.handleClick)),{title:d,"aria-expanded":t.isPopoverOpen,"aria-controls":t.isPopoverOpen?t.popoverId:""}),renderProps:u,generatorName:"moreLinkContent",customGenerator:o.moreLinkContent,defaultGenerator:e.defaultGenerator||MP,classNameGenerator:o.moreLinkClassNames,didMount:o.moreLinkDidMount,willUnmount:o.moreLinkWillUnmount},e.children),t.isPopoverOpen&&JT(AP,{id:t.popoverId,startDate:l.start,endDate:l.end,dateProfile:e.dateProfile,todayRange:e.todayRange,extraDateSpan:e.extraDateSpan,parentEl:this.parentEl,alignmentEl:e.alignmentElRef?e.alignmentElRef.current:this.linkEl,alignGridTop:e.alignGridTop,forceTimed:e.forceTimed,onClose:this.handlePopoverClose},e.popoverContent()))}))}componentDidMount(){this.updateParentEl()}componentDidUpdate(){this.updateParentEl()}updateParentEl(){this.linkEl&&(this.parentEl=gR(this.linkEl,".fc-view-harness"))}}function MP(e){return e.text}function OP(e){if(e.allDayDate)return{start:e.allDayDate,end:UR(e.allDayDate,1)};let{hiddenSegs:t}=e;return{start:IP(t),end:(n=t,n.reduce(LP).eventRange.range.end)};var n}function IP(e){return e.reduce(PP).eventRange.range.start}function PP(e,t){return e.eventRange.range.start<t.eventRange.range.start?e:t}function LP(e,t){return e.eventRange.range.end>t.eventRange.range.end?e:t}class FP{constructor(){this.handlers=[]}set(e){this.currentValue=e;for(let t of this.handlers)t(e)}subscribe(e){this.handlers.push(e),void 0!==this.currentValue&&e(this.currentValue)}}class zP extends FP{constructor(){super(...arguments),this.map=new Map}handle(e){const{map:t}=this;let n=!1;e.isActive?(t.set(e.id,e),n=!0):t.has(e.id)&&(t.delete(e.id),n=!0),n&&this.set(t)}}const HP=[],VP={code:"en",week:{dow:0,doy:4},direction:"ltr",buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day",list:"list"},weekText:"W",weekTextLong:"Week",closeHint:"Close",timeHint:"Time",eventHint:"Event",allDayText:"all-day",moreLinkText:"more",noEventsText:"No events to display"},BP=Object.assign(Object.assign({},VP),{buttonHints:{prev:"Previous $0",next:"Next $0",today:(e,t)=>"day"===t?"Today":`This ${e}`},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint:e=>`Show ${e} more event${1===e?"":"s"}`});function WP(e){let t=e.length>0?e[0].code:"en",n=HP.concat(e),r={en:BP};for(let e of n)r[e.code]=e;return{map:r,defaultCode:t}}function UP(e,t){return"object"!=typeof e||Array.isArray(e)?function(e,t){let n=[].concat(e||[]),r=function(e,t){for(let n=0;n<e.length;n+=1){let r=e[n].toLocaleLowerCase().split("-");for(let e=r.length;e>0;e-=1){let n=r.slice(0,e).join("-");if(t[n])return t[n]}}return null}(n,t)||BP;return $P(e,n,r)}(e,t):$P(e.code,[e.code],e)}function $P(e,t,n){let r=OM([VP,n],["buttonText"]);delete r.code;let{week:o}=r;return delete r.week,{codeArg:e,codes:t,week:o,simpleNumberFormat:new Intl.NumberFormat(e),options:r}}function GP(e){return{id:jR(),name:e.name,premiumReleaseDate:e.premiumReleaseDate?new Date(e.premiumReleaseDate):void 0,deps:e.deps||[],reducers:e.reducers||[],isLoadingFuncs:e.isLoadingFuncs||[],contextInit:[].concat(e.contextInit||[]),eventRefiners:e.eventRefiners||{},eventDefMemberAdders:e.eventDefMemberAdders||[],eventSourceRefiners:e.eventSourceRefiners||{},isDraggableTransformers:e.isDraggableTransformers||[],eventDragMutationMassagers:e.eventDragMutationMassagers||[],eventDefMutationAppliers:e.eventDefMutationAppliers||[],dateSelectionTransformers:e.dateSelectionTransformers||[],datePointTransforms:e.datePointTransforms||[],dateSpanTransforms:e.dateSpanTransforms||[],views:e.views||{},viewPropsTransformers:e.viewPropsTransformers||[],isPropsValid:e.isPropsValid||null,externalDefTransforms:e.externalDefTransforms||[],viewContainerAppends:e.viewContainerAppends||[],eventDropTransformers:e.eventDropTransformers||[],componentInteractions:e.componentInteractions||[],calendarInteractions:e.calendarInteractions||[],themeClasses:e.themeClasses||{},eventSourceDefs:e.eventSourceDefs||[],cmdFormatter:e.cmdFormatter,recurringTypes:e.recurringTypes||[],namedTimeZonedImpl:e.namedTimeZonedImpl,initialView:e.initialView||"",elementDraggingImpl:e.elementDraggingImpl,optionChangeHandlers:e.optionChangeHandlers||{},scrollGridImpl:e.scrollGridImpl||null,listenerRefiners:e.listenerRefiners||{},optionRefiners:e.optionRefiners||{},propSetHandlers:e.propSetHandlers||{}}}class YP extends GM{}function qP(e,t,n,r){if(t[e])return t[e];let o=function(e,t,n,r){let o=n[e],a=r[e],s=e=>o&&null!==o[e]?o[e]:a&&null!==a[e]?a[e]:null,i=s("component"),l=s("superType"),c=null;if(l){if(l===e)throw new Error("Can't have a custom view type that references itself");c=qP(l,t,n,r)}return!i&&c&&(i=c.component),i?{type:e,component:i,defaults:Object.assign(Object.assign({},c?c.defaults:{}),o?o.rawOptions:{}),overrides:Object.assign(Object.assign({},c?c.overrides:{}),a?a.rawOptions:{})}:null}(e,t,n,r);return o&&(t[e]=o),o}function ZP(e){return PM(e,KP)}function KP(e){let t="function"==typeof e?{component:e}:e,{component:n}=t;return t.content?n=QP(t):!n||n.prototype instanceof eO||(n=QP(Object.assign(Object.assign({},t),{content:n}))),{superType:t.type,component:n,rawOptions:t}}function QP(e){return t=>JT(QM.Consumer,null,(n=>JT(iO,{elTag:"div",elClasses:dO(n.viewSpec),renderProps:Object.assign(Object.assign({},t),{nextDayThreshold:n.options.nextDayThreshold}),generatorName:void 0,customGenerator:e.content,classNameGenerator:e.classNames,didMount:e.didMount,willUnmount:e.willUnmount})))}function JP(e,t,n,r){let o=ZP(e),a=ZP(t.views),s=function(e,t){let n,r={};for(n in e)qP(n,r,e,t);for(n in t)qP(n,r,e,t);return r}(o,a);return PM(s,(e=>function(e,t,n,r,o){let a=e.overrides.duration||e.defaults.duration||r.duration||n.duration,s=null,i="",l="",c={};if(a&&(s=function(e){let t=JSON.stringify(e),n=XP[t];return void 0===n&&(n=OR(e),XP[t]=n),n}(a),s)){let e=HR(s);i=e.unit,1===e.value&&(l=i,c=t[i]?t[i].rawOptions:{})}let d=t=>{let n=t.buttonText||{},r=e.defaults.buttonTextKey;return null!=r&&null!=n[r]?n[r]:null!=n[e.type]?n[e.type]:null!=n[l]?n[l]:null},u=t=>{let n=t.buttonHints||{},r=e.defaults.buttonTextKey;return null!=r&&null!=n[r]?n[r]:null!=n[e.type]?n[e.type]:null!=n[l]?n[l]:null};return{type:e.type,component:e.component,duration:s,durationUnit:i,singleUnit:l,optionDefaults:e.defaults,optionOverrides:Object.assign(Object.assign({},c),e.overrides),buttonTextOverride:d(r)||d(n)||e.overrides.buttonText,buttonTextDefault:d(o)||e.defaults.buttonText||d(SM)||e.type,buttonTitleOverride:u(r)||u(n)||e.overrides.buttonHint,buttonTitleDefault:u(o)||e.defaults.buttonHint||u(SM)}}(e,a,t,n,r)))}YP.prototype.classes={root:"fc-theme-standard",tableCellShaded:"fc-cell-shaded",buttonGroup:"fc-button-group",button:"fc-button fc-button-primary",buttonActive:"fc-button-active"},YP.prototype.baseIconClass="fc-icon",YP.prototype.iconClasses={close:"fc-icon-x",prev:"fc-icon-chevron-left",next:"fc-icon-chevron-right",prevYear:"fc-icon-chevrons-left",nextYear:"fc-icon-chevrons-right"},YP.prototype.rtlIconClasses={prev:"fc-icon-chevron-right",next:"fc-icon-chevron-left",prevYear:"fc-icon-chevrons-right",nextYear:"fc-icon-chevrons-left"},YP.prototype.iconOverrideOption="buttonIcons",YP.prototype.iconOverrideCustomButtonOption="icon",YP.prototype.iconOverridePrefix="fc-icon-";let XP={};function eL(e){for(let t in e)if(e[t].isFetching)return!0;return!1}function tL(e,t,n,r){let o={};for(let e of t)o[e.sourceId]=e;return n&&(o=nL(o,n,r)),Object.assign(Object.assign({},e),o)}function nL(e,t,n){return rL(e,IM(e,(e=>function(e,t,n){return sL(e,n)?!n.options.lazyFetching||!e.fetchRange||e.isFetching||t.start<e.fetchRange.start||t.end>e.fetchRange.end:!e.latestFetchId}(e,t,n))),t,!1,n)}function rL(e,t,n,r,o){let a={};for(let s in e){let i=e[s];t[s]?a[s]=oL(i,n,r,o):a[s]=i}return a}function oL(e,t,n,r){let{options:o,calendarApi:a}=r,s=r.pluginHooks.eventSourceDefs[e.sourceDefId],i=jR();return s.fetch({eventSource:e,range:t,isRefetch:n,context:r},(n=>{let{rawEvents:s}=n;o.eventSourceSuccess&&(s=o.eventSourceSuccess.call(a,s,n.response)||s),e.success&&(s=e.success.call(a,s,n.response)||s),r.dispatch({type:"RECEIVE_EVENTS",sourceId:e.sourceId,fetchId:i,fetchRange:t,rawEvents:s})}),(n=>{let s=!1;o.eventSourceFailure&&(o.eventSourceFailure.call(a,n),s=!0),e.failure&&(e.failure(n),s=!0),s||console.warn(n.message,n),r.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:e.sourceId,fetchId:i,fetchRange:t,error:n})})),Object.assign(Object.assign({},e),{isFetching:!0,latestFetchId:i})}function aL(e,t){return IM(e,(e=>sL(e,t)))}function sL(e,t){return!t.pluginHooks.eventSourceDefs[e.sourceDefId].ignoreRange}function iL(e,t){switch(t.type){case"UNSELECT_DATES":return null;case"SELECT_DATES":return t.selection;default:return e}}function lL(e,t){switch(t.type){case"UNSELECT_EVENT":return"";case"SELECT_EVENT":return t.eventInstanceId;default:return e}}function cL(e,t){let n;switch(t.type){case"UNSET_EVENT_DRAG":return null;case"SET_EVENT_DRAG":return n=t.state,{affectedEvents:n.affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function dL(e,t){let n;switch(t.type){case"UNSET_EVENT_RESIZE":return null;case"SET_EVENT_RESIZE":return n=t.state,{affectedEvents:n.affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function uL(e,t,n,r,o){return{header:e.headerToolbar?fL(e.headerToolbar,e,t,n,r,o):null,footer:e.footerToolbar?fL(e.footerToolbar,e,t,n,r,o):null}}function fL(e,t,n,r,o,a){let s={},i=[],l=!1;for(let c in e){let d=hL(e[c],t,n,r,o,a);s[c]=d.widgets,i.push(...d.viewsWithButtons),l=l||d.hasTitle}return{sectionWidgets:s,viewsWithButtons:i,hasTitle:l}}function hL(e,t,n,r,o,a){let s="rtl"===t.direction,i=t.customButtons||{},l=n.buttonText||{},c=t.buttonText||{},d=n.buttonHints||{},u=t.buttonHints||{},f=e?e.split(" "):[],h=[],m=!1;return{widgets:f.map((e=>e.split(",").map((e=>{if("title"===e)return m=!0,{buttonName:e};let n,f,p,g,v,y;if(n=i[e])p=e=>{n.click&&n.click.call(e.target,e,e.target)},(g=r.getCustomButtonIconClass(n))||(g=r.getIconClass(e,s))||(v=n.text),y=n.hint||n.text;else if(f=o[e]){h.push(e),p=()=>{a.changeView(e)},(v=f.buttonTextOverride)||(g=r.getIconClass(e,s))||(v=f.buttonTextDefault);let n=f.buttonTextOverride||f.buttonTextDefault;y=DR(f.buttonTitleOverride||f.buttonTitleDefault||t.viewHint,[n,e],n)}else if(a[e])if(p=()=>{a[e]()},(v=l[e])||(g=r.getIconClass(e,s))||(v=c[e]),"prevYear"===e||"nextYear"===e){let t="prevYear"===e?"prev":"next";y=DR(d[t]||u[t],[c.year||"year","year"],c[e])}else y=t=>DR(d[e]||u[e],[c[t]||t,t],c[e]);return{buttonName:e,buttonClick:p,buttonIcon:g,buttonText:v,buttonHint:y}})))),viewsWithButtons:h,hasTitle:m}}class mL{constructor(e,t,n){this.type=e,this.getCurrentData=t,this.dateEnv=n}get calendar(){return this.getCurrentData().calendarApi}get title(){return this.getCurrentData().viewTitle}get activeStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.start)}get activeEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.end)}get currentStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.start)}get currentEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.end)}getOption(e){return this.getCurrentData().options[e]}}const pL=GP({name:"array-event-source",eventSourceDefs:[{ignoreRange:!0,parseMeta:e=>Array.isArray(e.events)?e.events:null,fetch(e,t){t({rawEvents:e.eventSource.meta})}}]}),gL=GP({name:"func-event-source",eventSourceDefs:[{parseMeta:e=>"function"==typeof e.events?e.events:null,fetch(e,t,n){const{dateEnv:r}=e.context;!function(e,n,r){let o=!1,a=function(e){o||(o=!0,t({rawEvents:e}))},s=function(e){o||(o=!0,r(e))},i=e(a,s);i&&"function"==typeof i.then&&i.then(a,s)}(e.eventSource.meta.bind(null,vI(e.range,r)),0,n)}}]}),vL={method:String,extraParams:RM,startParam:String,endParam:String,timeZoneParam:String};let yL={parseMeta:e=>!e.url||"json"!==e.format&&e.format?null:{url:e.url,format:"json",method:(e.method||"GET").toUpperCase(),extraParams:e.extraParams,startParam:e.startParam,endParam:e.endParam,timeZoneParam:e.timeZoneParam},fetch(e,t,n){const{meta:r}=e.eventSource,o=function(e,t,n){let r,o,a,s,{dateEnv:i,options:l}=n,c={};return r=e.startParam,null==r&&(r=l.startParam),o=e.endParam,null==o&&(o=l.endParam),a=e.timeZoneParam,null==a&&(a=l.timeZoneParam),s="function"==typeof e.extraParams?e.extraParams():e.extraParams||{},Object.assign(c,s),c[r]=i.formatIso(t.start),c[o]=i.formatIso(t.end),"local"!==i.timeZone&&(c[a]=i.timeZone),c}(r,e.range,e.context);(function(e,t,n){const r={method:e=e.toUpperCase()};return"GET"===e?t+=(-1===t.indexOf("?")?"?":"&")+new URLSearchParams(n):(r.body=new URLSearchParams(n),r.headers={"Content-Type":"application/x-www-form-urlencoded"}),fetch(t,r).then((e=>{if(e.ok)return e.json().then((t=>[t,e]),(()=>{throw new bI("Failure parsing JSON",e)}));throw new bI("Request failed",e)}))})(r.method,r.url,o).then((([e,n])=>{t({rawEvents:e,response:n})}),n)}};const bL={daysOfWeek:RM,startTime:OR,endTime:OR,duration:OR,startRecur:RM,endRecur:RM};function xL(e,t){let n=FM(t.getCurrentData().eventSources);if(1===n.length&&1===e.length&&Array.isArray(n[0]._raw)&&Array.isArray(e[0]))return void t.dispatch({type:"RESET_RAW_EVENTS",sourceId:n[0].sourceId,rawEvents:e[0]});let r=[];for(let t of e){let e=!1;for(let r=0;r<n.length;r+=1)if(n[r]._raw===t){n.splice(r,1),e=!0;break}e||r.push(t)}for(let e of n)t.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:e.sourceId});for(let e of r)t.calendarApi.addEventSource(e)}const wL=[pL,gL,GP({name:"json-event-source",eventSourceRefiners:vL,eventSourceDefs:[yL]}),GP({name:"simple-recurring-event",recurringTypes:[{parse(e,t){if(e.daysOfWeek||e.startTime||e.endTime||e.startRecur||e.endRecur){let o,a={daysOfWeek:e.daysOfWeek||null,startTime:e.startTime||null,endTime:e.endTime||null,startRecur:e.startRecur?t.createMarker(e.startRecur):null,endRecur:e.endRecur?t.createMarker(e.endRecur):null,dateEnv:t};return e.duration&&(o=e.duration),!o&&e.startTime&&e.endTime&&(n=e.endTime,r=e.startTime,o={years:n.years-r.years,months:n.months-r.months,days:n.days-r.days,milliseconds:n.milliseconds-r.milliseconds}),{allDayGuess:Boolean(!e.startTime&&!e.endTime),duration:o,typeData:a}}var n,r;return null},expand(e,t,n){let r=hO(t,{start:e.startRecur,end:e.endRecur});return r?function(e,t,n,r,o){let a=e?LM(e):null,s=qR(o.start),i=o.end,l=[];for(t&&(t.milliseconds<0?i=UR(i,1):t.milliseconds>=864e5&&(s=UR(s,-1)));s<i;){let e;a&&!a[s.getUTCDay()]||(e=t?r.add(s,t):s,l.push(r.createMarker(n.toDate(e)))),s=UR(s,1)}return l}(e.daysOfWeek,e.startTime,e.dateEnv,n,r):[]}}],eventRefiners:bL}),GP({name:"change-handler",optionChangeHandlers:{events(e,t){xL([e],t)},eventSources:xL}}),GP({name:"misc",isLoadingFuncs:[e=>eL(e.eventSources)],propSetHandlers:{dateProfile:function(e,t){t.emitter.trigger("datesSet",Object.assign(Object.assign({},vI(e.activeRange,t.dateEnv)),{view:t.viewApi}))},eventStore:function(e,t){let{emitter:n}=t;n.hasHandlers("eventsSet")&&n.trigger("eventsSet",eI(e,t))}}})];class kL{constructor(e,t){this.runTaskOption=e,this.drainedOption=t,this.queue=[],this.delayedRunner=new mR(this.drain.bind(this))}request(e,t){this.queue.push(e),this.delayedRunner.request(t)}pause(e){this.delayedRunner.pause(e)}resume(e,t){this.delayedRunner.resume(e,t)}drain(){let{queue:e}=this;for(;e.length;){let t,n=[];for(;t=e.shift();)this.runTask(t),n.push(t);this.drained(n)}}runTask(e){this.runTaskOption&&this.runTaskOption(e)}drained(e){this.drainedOption&&this.drainedOption(e)}}function SL(e,t,n){let r;return r=/^(year|month)$/.test(e.currentRangeUnit)?e.currentRange:e.activeRange,n.formatRange(r.start,r.end,wM(t.titleFormat||function(e){let{currentRangeUnit:t}=e;if("year"===t)return{year:"numeric"};if("month"===t)return{year:"numeric",month:"long"};let n=YR(e.currentRange.start,e.currentRange.end);return null!==n&&n>1?{year:"numeric",month:"short",day:"numeric"}:{year:"numeric",month:"long",day:"numeric"}}(e)),{isEndExclusive:e.isRangeAllDay,defaultSeparator:t.titleRangeSeparator})}class CL{constructor(){this.resetListeners=new Set}handleInput(e,t){const n=this.dateEnv;if(e!==n&&("function"==typeof t?this.nowFn=t:n||(this.nowAnchorDate=e.toDate(t?e.createMarker(t):e.createNowMarker()),this.nowAnchorQueried=Date.now()),this.dateEnv=e,n))for(const e of this.resetListeners.values())e()}getDateMarker(){return this.nowAnchorDate?this.dateEnv.timestampToMarker(this.nowAnchorDate.valueOf()+(Date.now()-this.nowAnchorQueried)):this.dateEnv.createMarker(this.nowFn())}addResetListener(e){this.resetListeners.add(e)}removeResetListener(e){this.resetListeners.delete(e)}}class _L{constructor(e){this.computeCurrentViewData=sM(this._computeCurrentViewData),this.organizeRawLocales=sM(WP),this.buildLocale=sM(UP),this.buildPluginHooks=function(){let e,t=[],n=[];return(r,o)=>(e&&VR(r,t)&&VR(o,n)||(e=function(e,t){let n={},r={premiumReleaseDate:void 0,reducers:[],isLoadingFuncs:[],contextInit:[],eventRefiners:{},eventDefMemberAdders:[],eventSourceRefiners:{},isDraggableTransformers:[],eventDragMutationMassagers:[],eventDefMutationAppliers:[],dateSelectionTransformers:[],datePointTransforms:[],dateSpanTransforms:[],views:{},viewPropsTransformers:[],isPropsValid:null,externalDefTransforms:[],viewContainerAppends:[],eventDropTransformers:[],componentInteractions:[],calendarInteractions:[],themeClasses:{},eventSourceDefs:[],cmdFormatter:null,recurringTypes:[],namedTimeZonedImpl:null,initialView:"",elementDraggingImpl:null,optionChangeHandlers:{},scrollGridImpl:null,listenerRefiners:{},optionRefiners:{},propSetHandlers:{}};function o(e){for(let l of e){const e=l.name,c=n[e];void 0===c?(n[e]=l.id,o(l.deps),i=l,r={premiumReleaseDate:(t=(s=r).premiumReleaseDate,a=i.premiumReleaseDate,void 0===t?a:void 0===a?t:new Date(Math.max(t.valueOf(),a.valueOf()))),reducers:s.reducers.concat(i.reducers),isLoadingFuncs:s.isLoadingFuncs.concat(i.isLoadingFuncs),contextInit:s.contextInit.concat(i.contextInit),eventRefiners:Object.assign(Object.assign({},s.eventRefiners),i.eventRefiners),eventDefMemberAdders:s.eventDefMemberAdders.concat(i.eventDefMemberAdders),eventSourceRefiners:Object.assign(Object.assign({},s.eventSourceRefiners),i.eventSourceRefiners),isDraggableTransformers:s.isDraggableTransformers.concat(i.isDraggableTransformers),eventDragMutationMassagers:s.eventDragMutationMassagers.concat(i.eventDragMutationMassagers),eventDefMutationAppliers:s.eventDefMutationAppliers.concat(i.eventDefMutationAppliers),dateSelectionTransformers:s.dateSelectionTransformers.concat(i.dateSelectionTransformers),datePointTransforms:s.datePointTransforms.concat(i.datePointTransforms),dateSpanTransforms:s.dateSpanTransforms.concat(i.dateSpanTransforms),views:Object.assign(Object.assign({},s.views),i.views),viewPropsTransformers:s.viewPropsTransformers.concat(i.viewPropsTransformers),isPropsValid:i.isPropsValid||s.isPropsValid,externalDefTransforms:s.externalDefTransforms.concat(i.externalDefTransforms),viewContainerAppends:s.viewContainerAppends.concat(i.viewContainerAppends),eventDropTransformers:s.eventDropTransformers.concat(i.eventDropTransformers),calendarInteractions:s.calendarInteractions.concat(i.calendarInteractions),componentInteractions:s.componentInteractions.concat(i.componentInteractions),themeClasses:Object.assign(Object.assign({},s.themeClasses),i.themeClasses),eventSourceDefs:s.eventSourceDefs.concat(i.eventSourceDefs),cmdFormatter:i.cmdFormatter||s.cmdFormatter,recurringTypes:s.recurringTypes.concat(i.recurringTypes),namedTimeZonedImpl:i.namedTimeZonedImpl||s.namedTimeZonedImpl,initialView:s.initialView||i.initialView,elementDraggingImpl:s.elementDraggingImpl||i.elementDraggingImpl,optionChangeHandlers:Object.assign(Object.assign({},s.optionChangeHandlers),i.optionChangeHandlers),scrollGridImpl:i.scrollGridImpl||s.scrollGridImpl,listenerRefiners:Object.assign(Object.assign({},s.listenerRefiners),i.listenerRefiners),optionRefiners:Object.assign(Object.assign({},s.optionRefiners),i.optionRefiners),propSetHandlers:Object.assign(Object.assign({},s.propSetHandlers),i.propSetHandlers)}):c!==l.id&&console.warn(`Duplicate plugin '${e}'`)}var t,a,s,i}return e&&o(e),o(t),r}(r,o)),t=r,n=o,e)}(),this.buildDateEnv=sM(jL),this.buildTheme=sM(EL),this.parseToolbars=sM(uL),this.buildViewSpecs=sM(JP),this.buildDateProfileGenerator=iM(NL),this.buildViewApi=sM(DL),this.buildViewUiProps=iM(RL),this.buildEventUiBySource=sM(TL,zM),this.buildEventUiBases=sM(AL),this.parseContextBusinessHours=iM(OL),this.buildTitle=sM(SL),this.nowManager=new CL,this.emitter=new GO,this.actionRunner=new kL(this._handleAction.bind(this),this.updateData.bind(this)),this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.currentCalendarOptionsRefiners={},this.optionsForRefining=[],this.optionsForHandling=[],this.getCurrentData=()=>this.data,this.dispatch=e=>{this.actionRunner.request(e)},this.props=e,this.actionRunner.pause(),this.nowManager=new CL;let t={},n=this.computeOptionsData(e.optionOverrides,t,e.calendarApi),r=n.calendarOptions.initialView||n.pluginHooks.initialView,o=this.computeCurrentViewData(r,n,e.optionOverrides,t);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(o.options);let a={nowManager:this.nowManager,dateEnv:n.dateEnv,options:n.calendarOptions,pluginHooks:n.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},s=function(e,t,n){let r=e.initialDate;return null!=r?t.createMarker(r):n.getDateMarker()}(n.calendarOptions,n.dateEnv,this.nowManager),i=o.dateProfileGenerator.build(s);mO(i.activeRange,s)||(s=i.currentRange.start);for(let e of n.pluginHooks.contextInit)e(a);let l=function(e,t,n){let r=t?t.activeRange:null;return tL({},function(e,t){let n=VO(t),r=[].concat(e.eventSources||[]),o=[];e.initialEvents&&r.unshift(e.initialEvents),e.events&&r.unshift(e.events);for(let e of r){let r=HO(e,t,n);r&&o.push(r)}return o}(e,n),r,n)}(n.calendarOptions,i,a),c={dynamicOptionOverrides:t,currentViewType:r,currentDate:s,dateProfile:i,businessHours:this.parseContextBusinessHours(a),eventSources:l,eventUiBases:{},eventStore:{defs:{},instances:{}},renderableEventStore:{defs:{},instances:{}},dateSelection:null,eventSelection:"",eventDrag:null,eventResize:null,selectionConfig:this.buildViewUiProps(a).selectionConfig},d=Object.assign(Object.assign({},a),c);for(let e of n.pluginHooks.reducers)Object.assign(c,e(null,null,d));ML(c,a)&&this.emitter.trigger("loading",!0),this.state=c,this.updateData(),this.actionRunner.resume()}resetOptions(e,t){let{props:n}=this;void 0===t?n.optionOverrides=e:(n.optionOverrides=Object.assign(Object.assign({},n.optionOverrides||{}),e),this.optionsForRefining.push(...t)),(void 0===t||t.length)&&this.actionRunner.request({type:"NOTHING"})}_handleAction(e){let{props:t,state:n,emitter:r}=this,o=function(e,t){return"SET_OPTION"===t.type?Object.assign(Object.assign({},e),{[t.optionName]:t.rawOptionValue}):e}(n.dynamicOptionOverrides,e),a=this.computeOptionsData(t.optionOverrides,o,t.calendarApi),s=function(e,t){return"CHANGE_VIEW_TYPE"===t.type&&(e=t.viewType),e}(n.currentViewType,e),i=this.computeCurrentViewData(s,a,t.optionOverrides,o);t.calendarApi.currentDataManager=this,r.setThisContext(t.calendarApi),r.setOptions(i.options);let l={nowManager:this.nowManager,dateEnv:a.dateEnv,options:a.calendarOptions,pluginHooks:a.pluginHooks,calendarApi:t.calendarApi,dispatch:this.dispatch,emitter:r,getCurrentData:this.getCurrentData},{currentDate:c,dateProfile:d}=n;this.data&&this.data.dateProfileGenerator!==i.dateProfileGenerator&&(d=i.dateProfileGenerator.build(c)),c=function(e,t){return"CHANGE_DATE"===t.type?t.dateMarker:e}(c,e),d=function(e,t,n,r){let o;switch(t.type){case"CHANGE_VIEW_TYPE":return r.build(t.dateMarker||n);case"CHANGE_DATE":return r.build(t.dateMarker);case"PREV":if(o=r.buildPrev(e,n),o.isValid)return o;break;case"NEXT":if(o=r.buildNext(e,n),o.isValid)return o}return e}(d,e,c,i.dateProfileGenerator),"PREV"!==e.type&&"NEXT"!==e.type&&mO(d.currentRange,c)||(c=d.currentRange.start);let u=function(e,t,n,r){let o=n?n.activeRange:null;switch(t.type){case"ADD_EVENT_SOURCES":return tL(e,t.sources,o,r);case"REMOVE_EVENT_SOURCE":return a=e,s=t.sourceId,IM(a,(e=>e.sourceId!==s));case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return n?nL(e,o,r):e;case"FETCH_EVENT_SOURCES":return rL(e,t.sourceIds?LM(t.sourceIds):aL(e,r),o,t.isRefetch||!1,r);case"RECEIVE_EVENTS":case"RECEIVE_EVENT_ERROR":return function(e,t,n,r){let o=e[t];return o&&n===o.latestFetchId?Object.assign(Object.assign({},e),{[t]:Object.assign(Object.assign({},o),{isFetching:!1,fetchRange:r})}):e}(e,t.sourceId,t.fetchId,t.fetchRange);case"REMOVE_ALL_EVENT_SOURCES":return{};default:return e}var a,s}(n.eventSources,e,d,l),f=function(e,t,n,r,o){switch(t.type){case"RECEIVE_EVENTS":return function(e,t,n,r,o,a){if(t&&n===t.latestFetchId){let n=DO(BO(o,t,a),t,a);return r&&(n=xO(n,r,a)),AO($O(e,t.sourceId),n)}return e}(e,n[t.sourceId],t.fetchId,t.fetchRange,t.rawEvents,o);case"RESET_RAW_EVENTS":return function(e,t,n,r,o){const{defIdMap:a,instanceIdMap:s}=function(e){const{defs:t,instances:n}=e,r={},o={};for(let e in t){const n=t[e],{publicId:o}=n;o&&(r[o]=e)}for(let e in n){const r=t[n[e].defId],{publicId:a}=r;a&&(o[a]=e)}return{defIdMap:r,instanceIdMap:o}}(e);return xO(DO(BO(n,t,o),t,o,!1,a,s),r,o)}(e,n[t.sourceId],t.rawEvents,r.activeRange,o);case"ADD_EVENTS":return function(e,t,n,r){return n&&(t=xO(t,n,r)),AO(e,t)}(e,t.eventStore,r?r.activeRange:null,o);case"RESET_EVENTS":return t.eventStore;case"MERGE_EVENTS":return AO(e,t.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return r?xO(e,r.activeRange,o):e;case"REMOVE_EVENTS":return function(e,t){let{defs:n,instances:r}=e,o={},a={};for(let e in n)t.defs[e]||(o[e]=n[e]);for(let e in r)!t.instances[e]&&o[r[e].defId]&&(a[e]=r[e]);return{defs:o,instances:a}}(e,t.eventStore);case"REMOVE_EVENT_SOURCE":return $O(e,t.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return RO(e,(e=>!e.sourceId));case"REMOVE_ALL_EVENTS":return{defs:{},instances:{}};default:return e}}(n.eventStore,e,u,d,l),h=eL(u)&&!i.options.progressiveEventRendering&&n.renderableEventStore||f,{eventUiSingleBase:m,selectionConfig:p}=this.buildViewUiProps(l),g=this.buildEventUiBySource(u),v={dynamicOptionOverrides:o,currentViewType:s,currentDate:c,dateProfile:d,eventSources:u,eventStore:f,renderableEventStore:h,selectionConfig:p,eventUiBases:this.buildEventUiBases(h.defs,m,g),businessHours:this.parseContextBusinessHours(l),dateSelection:iL(n.dateSelection,e),eventSelection:lL(n.eventSelection,e),eventDrag:cL(n.eventDrag,e),eventResize:dL(n.eventResize,e)},y=Object.assign(Object.assign({},l),v);for(let t of a.pluginHooks.reducers)Object.assign(v,t(n,e,y));let b=ML(n,l),x=ML(v,l);!b&&x?r.trigger("loading",!0):b&&!x&&r.trigger("loading",!1),this.state=v,t.onAction&&t.onAction(e)}updateData(){let{props:e,state:t}=this,n=this.data,r=this.computeOptionsData(e.optionOverrides,t.dynamicOptionOverrides,e.calendarApi),o=this.computeCurrentViewData(t.currentViewType,r,e.optionOverrides,t.dynamicOptionOverrides),a=this.data=Object.assign(Object.assign(Object.assign({nowManager:this.nowManager,viewTitle:this.buildTitle(t.dateProfile,o.options,r.dateEnv),calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},r),o),t),s=r.pluginHooks.optionChangeHandlers,i=n&&n.calendarOptions,l=r.calendarOptions;if(i&&i!==l){i.timeZone!==l.timeZone&&(t.eventSources=a.eventSources=function(e,t,n){let r=t?t.activeRange:null;return rL(e,aL(e,n),r,!0,n)}(a.eventSources,t.dateProfile,a),t.eventStore=a.eventStore=UO(a.eventStore,n.dateEnv,a.dateEnv),t.renderableEventStore=a.renderableEventStore=UO(a.renderableEventStore,n.dateEnv,a.dateEnv));for(let e in s)-1===this.optionsForHandling.indexOf(e)&&i[e]===l[e]||s[e](l[e],a)}this.optionsForHandling=[],e.onData&&e.onData(a)}computeOptionsData(e,t,n){if(!this.optionsForRefining.length&&e===this.stableOptionOverrides&&t===this.stableDynamicOptionOverrides)return this.stableCalendarOptionsData;let{refinedOptions:r,pluginHooks:o,localeDefaults:a,availableLocaleData:s,extra:i}=this.processRawCalendarOptions(e,t);IL(i);let l=this.buildDateEnv(r.timeZone,r.locale,r.weekNumberCalculation,r.firstDay,r.weekText,o,s,r.defaultRangeSeparator),c=this.buildViewSpecs(o.views,this.stableOptionOverrides,this.stableDynamicOptionOverrides,a),d=this.buildTheme(r,o),u=this.parseToolbars(r,this.stableOptionOverrides,d,c,n);return this.stableCalendarOptionsData={calendarOptions:r,pluginHooks:o,dateEnv:l,viewSpecs:c,theme:d,toolbarConfig:u,localeDefaults:a,availableRawLocales:s.map}}processRawCalendarOptions(e,t){let{locales:n,locale:r}=TM([SM,e,t]),o=this.organizeRawLocales(n),a=o.map,s=this.buildLocale(r||o.defaultCode,a).options,i=this.buildPluginHooks(e.plugins||[],wL),l=this.currentCalendarOptionsRefiners=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},kM),CM),_M),i.listenerRefiners),i.optionRefiners),c={},d=TM([SM,s,e,t]),u={},f=this.currentCalendarOptionsInput,h=this.currentCalendarOptionsRefined,m=!1;for(let e in d)-1===this.optionsForRefining.indexOf(e)&&(d[e]===f[e]||jM[e]&&e in f&&jM[e](f[e],d[e]))?u[e]=h[e]:l[e]?(u[e]=l[e](d[e]),m=!0):c[e]=f[e];return m&&(this.currentCalendarOptionsInput=d,this.currentCalendarOptionsRefined=u,this.stableOptionOverrides=e,this.stableDynamicOptionOverrides=t),this.optionsForHandling.push(...this.optionsForRefining),this.optionsForRefining=[],{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:i,availableLocaleData:o,localeDefaults:s,extra:c}}_computeCurrentViewData(e,t,n,r){let o=t.viewSpecs[e];if(!o)throw new Error(`viewType "${e}" is not available. Please make sure you've loaded all neccessary plugins`);let{refinedOptions:a,extra:s}=this.processRawViewOptions(o,t.pluginHooks,t.localeDefaults,n,r);return IL(s),this.nowManager.handleInput(t.dateEnv,a.now),{viewSpec:o,options:a,dateProfileGenerator:this.buildDateProfileGenerator({dateProfileGeneratorClass:o.optionDefaults.dateProfileGeneratorClass,nowManager:this.nowManager,duration:o.duration,durationUnit:o.durationUnit,usesMinMaxTime:o.optionDefaults.usesMinMaxTime,dateEnv:t.dateEnv,calendarApi:this.props.calendarApi,slotMinTime:a.slotMinTime,slotMaxTime:a.slotMaxTime,showNonCurrentDates:a.showNonCurrentDates,dayCount:a.dayCount,dateAlignment:a.dateAlignment,dateIncrement:a.dateIncrement,hiddenDays:a.hiddenDays,weekends:a.weekends,validRangeInput:a.validRange,visibleRangeInput:a.visibleRange,fixedWeekCount:a.fixedWeekCount}),viewApi:this.buildViewApi(e,this.getCurrentData,t.dateEnv)}}processRawViewOptions(e,t,n,r,o){let a=TM([SM,e.optionDefaults,n,r,e.optionOverrides,o]),s=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},kM),CM),_M),DM),t.listenerRefiners),t.optionRefiners),i={},l=this.currentViewOptionsInput,c=this.currentViewOptionsRefined,d=!1,u={};for(let e in a)a[e]===l[e]||jM[e]&&jM[e](a[e],l[e])?i[e]=c[e]:(a[e]===this.currentCalendarOptionsInput[e]||jM[e]&&jM[e](a[e],this.currentCalendarOptionsInput[e])?e in this.currentCalendarOptionsRefined&&(i[e]=this.currentCalendarOptionsRefined[e]):s[e]?i[e]=s[e](a[e]):u[e]=a[e],d=!0);return d&&(this.currentViewOptionsInput=a,this.currentViewOptionsRefined=i),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined,extra:u}}}function jL(e,t,n,r,o,a,s,i){let l=UP(t||s.defaultCode,s.map);return new $M({calendarSystem:"gregory",timeZone:e,namedTimeZoneImpl:a.namedTimeZonedImpl,locale:l,weekNumberCalculation:n,firstDay:r,weekText:o,cmdFormatter:a.cmdFormatter,defaultSeparator:i})}function EL(e,t){return new(t.themeClasses[e.themeSystem]||YP)(e)}function NL(e){return new(e.dateProfileGeneratorClass||yO)(e)}function DL(e,t,n){return new mL(e,t,n)}function TL(e){return PM(e,(e=>e.ui))}function AL(e,t,n){let r={"":t};for(let t in e){let o=e[t];o.sourceId&&n[o.sourceId]&&(r[t]=n[o.sourceId])}return r}function RL(e){let{options:t}=e;return{eventUiSingleBase:PO({display:t.eventDisplay,editable:t.editable,startEditable:t.eventStartEditable,durationEditable:t.eventDurationEditable,constraint:t.eventConstraint,overlap:"boolean"==typeof t.eventOverlap?t.eventOverlap:void 0,allow:t.eventAllow,backgroundColor:t.eventBackgroundColor,borderColor:t.eventBorderColor,textColor:t.eventTextColor,color:t.eventColor},e),selectionConfig:PO({constraint:t.selectConstraint,overlap:"boolean"==typeof t.selectOverlap?t.selectOverlap:void 0,allow:t.selectAllow},e)}}function ML(e,t){for(let n of t.pluginHooks.isLoadingFuncs)if(n(e))return!0;return!1}function OL(e){return t=e.options.businessHours,n=e,DO(function(e){let t;return t=!0===e?[{}]:Array.isArray(e)?e.filter((e=>e.daysOfWeek)):"object"==typeof e&&e?[e]:[],t=t.map((e=>Object.assign(Object.assign({},YO),e))),t}(t),null,n);var t,n}function IL(e,t){for(let n in e)console.warn(`Unknown option '${n}'`+(t?` for view '${t}'`:""))}class PL extends eO{render(){return JT("div",{className:"fc-toolbar-chunk"},...this.props.widgetGroups.map((e=>this.renderWidgetGroup(e))))}renderWidgetGroup(e){let{props:t}=this,{theme:n}=this.context,r=[],o=!0;for(let a of e){let{buttonName:e,buttonClick:s,buttonText:i,buttonIcon:l,buttonHint:c}=a;if("title"===e)o=!1,r.push(JT("h2",{className:"fc-toolbar-title",id:t.titleId},t.title));else{let o=e===t.activeButton,a=!t.isTodayEnabled&&"today"===e||!t.isPrevEnabled&&"prev"===e||!t.isNextEnabled&&"next"===e,d=[`fc-${e}-button`,n.getClass("button")];o&&d.push(n.getClass("buttonActive")),r.push(JT("button",{type:"button",title:"function"==typeof c?c(t.navUnit):c,disabled:a,"aria-pressed":o,className:d.join(" "),onClick:s},i||(l?JT("span",{className:l,role:"img"}):"")))}}return r.length>1?JT("div",{className:o&&n.getClass("buttonGroup")||""},...r):r[0]}}class LL extends eO{render(){let e,t,{model:n,extraClassName:r}=this.props,o=!1,a=n.sectionWidgets,s=a.center;return a.left?(o=!0,e=a.left):e=a.start,a.right?(o=!0,t=a.right):t=a.end,JT("div",{className:[r||"","fc-toolbar",o?"fc-toolbar-ltr":""].join(" ")},this.renderSection("start",e||[]),this.renderSection("center",s||[]),this.renderSection("end",t||[]))}renderSection(e,t){let{props:n}=this;return JT(PL,{key:e,widgetGroups:t,title:n.title,navUnit:n.navUnit,activeButton:n.activeButton,isTodayEnabled:n.isTodayEnabled,isPrevEnabled:n.isPrevEnabled,isNextEnabled:n.isNextEnabled,titleId:n.titleId})}}class FL extends eO{constructor(){super(...arguments),this.state={availableWidth:null},this.handleEl=e=>{this.el=e,tO(this.props.elRef,e),this.updateAvailableWidth()},this.handleResize=()=>{this.updateAvailableWidth()}}render(){let{props:e,state:t}=this,{aspectRatio:n}=e,r=["fc-view-harness",n||e.liquid||e.height?"fc-view-harness-active":"fc-view-harness-passive"],o="",a="";return n?null!==t.availableWidth?o=t.availableWidth/n:a=1/n*100+"%":o=e.height||"",JT("div",{"aria-labelledby":e.labeledById,ref:this.handleEl,className:r.join(" "),style:{height:o,paddingBottom:a}},e.children)}componentDidMount(){this.context.addResizeHandler(this.handleResize)}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}updateAvailableWidth(){this.el&&this.props.aspectRatio&&this.setState({availableWidth:this.el.offsetWidth})}}class zL extends SI{constructor(e){super(e),this.handleSegClick=(e,t)=>{let{component:n}=this,{context:r}=n,o=rI(t);if(o&&n.isValidSegDownEl(e.target)){let a=gR(e.target,".fc-event-forced-url"),s=a?a.querySelector("a[href]").href:"";r.emitter.trigger("eventClick",{el:t,event:new JO(n.context,o.eventRange.def,o.eventRange.instance),jsEvent:e,view:r.viewApi}),s&&!e.defaultPrevented&&(window.location.href=s)}},this.destroy=kR(e.el,"click",".fc-event",this.handleSegClick)}}class HL extends SI{constructor(e){super(e),this.handleEventElRemove=e=>{e===this.currentSegEl&&this.handleSegLeave(null,this.currentSegEl)},this.handleSegEnter=(e,t)=>{rI(t)&&(this.currentSegEl=t,this.triggerEvent("eventMouseEnter",e,t))},this.handleSegLeave=(e,t)=>{this.currentSegEl&&(this.currentSegEl=null,this.triggerEvent("eventMouseLeave",e,t))},this.removeHoverListeners=function(e,t,n,r){let o;return kR(e,"mouseover",".fc-event",((e,t)=>{if(t!==o){o=t,n(e,t);let a=e=>{o=null,r(e,t),t.removeEventListener("mouseleave",a)};t.addEventListener("mouseleave",a)}}))}(e.el,0,this.handleSegEnter,this.handleSegLeave)}destroy(){this.removeHoverListeners()}triggerEvent(e,t,n){let{component:r}=this,{context:o}=r,a=rI(n);t&&!r.isValidSegDownEl(t.target)||o.emitter.trigger(e,{el:n,event:new JO(o,a.eventRange.def,a.eventRange.instance),jsEvent:t,view:o.viewApi})}}class VL extends XM{constructor(){super(...arguments),this.buildViewContext=sM(JM),this.buildViewPropTransformers=sM(WL),this.buildToolbarProps=sM(BL),this.headerRef={current:null},this.footerRef={current:null},this.interactionsStore={},this.state={viewLabelId:wR()},this.registerInteractiveComponent=(e,t)=>{let n=function(e,t){return{component:e,el:t.el,useEventCenter:null==t.useEventCenter||t.useEventCenter,isHitComboAllowed:t.isHitComboAllowed||null}}(e,t),r=[zL,HL].concat(this.props.pluginHooks.componentInteractions).map((e=>new e(n)));this.interactionsStore[e.uid]=r,CI[e.uid]=n},this.unregisterInteractiveComponent=e=>{let t=this.interactionsStore[e.uid];if(t){for(let e of t)e.destroy();delete this.interactionsStore[e.uid]}delete CI[e.uid]},this.resizeRunner=new mR((()=>{this.props.emitter.trigger("_resize",!0),this.props.emitter.trigger("windowResize",{view:this.props.viewApi})})),this.handleWindowResize=e=>{let{options:t}=this.props;t.handleWindowResize&&e.target===window&&this.resizeRunner.request(t.windowResizeDelay)}}render(){let e,{props:t}=this,{toolbarConfig:n,options:r}=t,o=!1,a="";t.isHeightAuto||t.forPrint?a="":null!=r.height?o=!0:null!=r.contentHeight?a=r.contentHeight:e=Math.max(r.aspectRatio,.5);let s=this.buildViewContext(t.viewSpec,t.viewApi,t.options,t.dateProfileGenerator,t.dateEnv,t.nowManager,t.theme,t.pluginHooks,t.dispatch,t.getCurrentData,t.emitter,t.calendarApi,this.registerInteractiveComponent,this.unregisterInteractiveComponent),i=n.header&&n.header.hasTitle?this.state.viewLabelId:void 0;return JT(QM.Provider,{value:s},JT(_I,{unit:"day"},(r=>{let s=this.buildToolbarProps(t.viewSpec,t.dateProfile,t.dateProfileGenerator,t.currentDate,r,t.viewTitle);return JT(eA,null,n.header&&JT(LL,Object.assign({ref:this.headerRef,extraClassName:"fc-header-toolbar",model:n.header,titleId:i},s)),JT(FL,{liquid:o,height:a,aspectRatio:e,labeledById:i},this.renderView(t),this.buildAppendContent()),n.footer&&JT(LL,Object.assign({ref:this.footerRef,extraClassName:"fc-footer-toolbar",model:n.footer,titleId:""},s)))})))}componentDidMount(){let{props:e}=this;this.calendarInteractions=e.pluginHooks.calendarInteractions.map((t=>new t(e))),window.addEventListener("resize",this.handleWindowResize);let{propSetHandlers:t}=e.pluginHooks;for(let n in t)t[n](e[n],e)}componentDidUpdate(e){let{props:t}=this,{propSetHandlers:n}=t.pluginHooks;for(let r in n)t[r]!==e[r]&&n[r](t[r],t)}componentWillUnmount(){window.removeEventListener("resize",this.handleWindowResize),this.resizeRunner.clear();for(let e of this.calendarInteractions)e.destroy();this.props.emitter.trigger("_unmount")}buildAppendContent(){let{props:e}=this;return JT(eA,{},...e.pluginHooks.viewContainerAppends.map((t=>t(e))))}renderView(e){let{pluginHooks:t}=e,{viewSpec:n}=e,r={dateProfile:e.dateProfile,businessHours:e.businessHours,eventStore:e.renderableEventStore,eventUiBases:e.eventUiBases,dateSelection:e.dateSelection,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,isHeightAuto:e.isHeightAuto,forPrint:e.forPrint},o=this.buildViewPropTransformers(t.viewPropsTransformers);for(let t of o)Object.assign(r,t.transform(r,e));return JT(n.component,Object.assign({},r))}}function BL(e,t,n,r,o,a){let s=n.build(o,void 0,!1),i=n.buildPrev(t,r,!1),l=n.buildNext(t,r,!1);return{title:a,activeButton:e.type,navUnit:e.singleUnit,isTodayEnabled:s.isValid&&!mO(t.currentRange,o),isPrevEnabled:i.isValid,isNextEnabled:l.isValid}}function WL(e){return e.map((e=>new e))}class UL extends EI{constructor(e,t={}){super(),this.isRendering=!1,this.isRendered=!1,this.currentClassNames=[],this.customContentRenderId=0,this.handleAction=e=>{switch(e.type){case"SET_EVENT_DRAG":case"SET_EVENT_RESIZE":this.renderRunner.tryDrain()}},this.handleData=e=>{this.currentData=e,this.renderRunner.request(e.calendarOptions.rerenderDelay)},this.handleRenderRequest=()=>{if(this.isRendering){this.isRendered=!0;let{currentData:e}=this;YM((()=>{kA(JT(kI,{options:e.calendarOptions,theme:e.theme,emitter:e.emitter},((t,n,r,o)=>(this.setClassNames(t),this.setHeight(n),JT(sO.Provider,{value:this.customContentRenderId},JT(VL,Object.assign({isHeightAuto:r,forPrint:o},e)))))),this.el)}))}else this.isRendered&&(this.isRendered=!1,kA(null,this.el),this.setClassNames([]),this.setHeight(""))},function(e){e.isConnected&&e.getRootNode&&uR(e.getRootNode())}(e),this.el=e,this.renderRunner=new mR(this.handleRenderRequest),new _L({optionOverrides:t,calendarApi:this,onAction:this.handleAction,onData:this.handleData})}render(){let e=this.isRendering;e?this.customContentRenderId+=1:this.isRendering=!0,this.renderRunner.request(),e&&this.updateSize()}destroy(){this.isRendering&&(this.isRendering=!1,this.renderRunner.request())}updateSize(){YM((()=>{super.updateSize()}))}batchRendering(e){this.renderRunner.pause("batchRendering"),e(),this.renderRunner.resume("batchRendering")}pauseRendering(){this.renderRunner.pause("pauseRendering")}resumeRendering(){this.renderRunner.resume("pauseRendering",!0)}resetOptions(e,t){this.currentDataManager.resetOptions(e,t)}setClassNames(e){if(!VR(e,this.currentClassNames)){let{classList:t}=this.el;for(let e of this.currentClassNames)t.remove(e);for(let n of e)t.add(n);this.currentClassNames=e}}setHeight(e){bR(this.el,"height",e)}}class $L extends HI{constructor(){super(...arguments),this.headerElRef={current:null}}renderSimpleLayout(e,t){let{props:n,context:r}=this,o=[],a=mP(r.options);return e&&o.push({type:"header",key:"header",isSticky:a,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),o.push({type:"body",key:"body",liquid:!0,chunk:{content:t}}),JT(cO,{elClasses:["fc-daygrid"],viewSpec:r.viewSpec},JT(gP,{liquid:!n.isHeightAuto&&!n.forPrint,collapsibleWidth:n.forPrint,cols:[],sections:o}))}renderHScrollLayout(e,t,n,r){let o=this.context.pluginHooks.scrollGridImpl;if(!o)throw new Error("No ScrollGrid implementation");let{props:a,context:s}=this,i=!a.forPrint&&mP(s.options),l=!a.forPrint&&pP(s.options),c=[];return e&&c.push({type:"header",key:"header",isSticky:i,chunks:[{key:"main",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),c.push({type:"body",key:"body",liquid:!0,chunks:[{key:"main",content:t}]}),l&&c.push({type:"footer",key:"footer",isSticky:!0,chunks:[{key:"main",content:hP}]}),JT(cO,{elClasses:["fc-daygrid"],viewSpec:s.viewSpec},JT(o,{liquid:!a.isHeightAuto&&!a.forPrint,forPrint:a.forPrint,collapsibleWidth:a.forPrint,colGroups:[{cols:[{span:n,minWidth:r}]}],sections:c}))}}function GL(e,t){let n=[];for(let e=0;e<t;e+=1)n[e]=[];for(let t of e)n[t.row].push(t);return n}function YL(e,t){let n=[];for(let e=0;e<t;e+=1)n[e]=[];for(let t of e)n[t.firstCol].push(t);return n}function qL(e,t){let n=[];if(e){for(let r=0;r<t;r+=1)n[r]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(let t of e.segs)n[t.row].segs.push(t)}else for(let e=0;e<t;e+=1)n[e]=null;return n}const ZL=wM({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});function KL(e){let{display:t}=e.eventRange.ui;return"list-item"===t||"auto"===t&&!e.eventRange.def.allDay&&e.firstCol===e.lastCol&&e.isStart&&e.isEnd}class QL extends eO{render(){let{props:e}=this;return JT(yP,Object.assign({},e,{elClasses:["fc-daygrid-event","fc-daygrid-block-event","fc-h-event"],defaultTimeFormat:ZL,defaultDisplayEventEnd:e.defaultDisplayEventEnd,disableResizing:!e.seg.eventRange.def.allDay}))}}class JL extends eO{render(){let{props:e,context:t}=this,{options:n}=t,{seg:r}=e,o=uI(r,n.eventTimeFormat||ZL,t,!0,e.defaultDisplayEventEnd);return JT(vP,Object.assign({},e,{elTag:"a",elClasses:["fc-daygrid-event","fc-daygrid-dot-event"],elAttrs:pI(e.seg,t),defaultGenerator:XL,timeText:o,isResizing:!1,isDateSelecting:!1}))}}function XL(e){return JT(eA,null,JT("div",{className:"fc-daygrid-event-dot",style:{borderColor:e.borderColor||e.backgroundColor}}),e.timeText&&JT("div",{className:"fc-event-time"},e.timeText),JT("div",{className:"fc-event-title"},e.event.title||JT(eA,null," ")))}class eF extends eO{constructor(){super(...arguments),this.compileSegs=sM(tF)}render(){let{props:e}=this,{allSegs:t,invisibleSegs:n}=this.compileSegs(e.singlePlacements);return JT(RP,{elClasses:["fc-daygrid-more-link"],dateProfile:e.dateProfile,todayRange:e.todayRange,allDayDate:e.allDayDate,moreCnt:e.moreCnt,allSegs:t,hiddenSegs:n,alignmentElRef:e.alignmentElRef,alignGridTop:e.alignGridTop,extraDateSpan:e.extraDateSpan,popoverContent:()=>{let n=(e.eventDrag?e.eventDrag.affectedInstances:null)||(e.eventResize?e.eventResize.affectedInstances:null)||{};return JT(eA,null,t.map((t=>{let r=t.eventRange.instance.instanceId;return JT("div",{className:"fc-daygrid-event-harness",key:r,style:{visibility:n[r]?"hidden":""}},KL(t)?JT(JL,Object.assign({seg:t,isDragging:!1,isSelected:r===e.eventSelection,defaultDisplayEventEnd:!1},fI(t,e.todayRange))):JT(QL,Object.assign({seg:t,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:r===e.eventSelection,defaultDisplayEventEnd:!1},fI(t,e.todayRange))))})))}})}}function tF(e){let t=[],n=[];for(let r of e)t.push(r.seg),r.isVisible||n.push(r.seg);return{allSegs:t,invisibleSegs:n}}const nF=wM({week:"narrow"});class rF extends HI{constructor(){super(...arguments),this.rootElRef={current:null},this.state={dayNumberId:wR()},this.handleRootEl=e=>{tO(this.rootElRef,e),tO(this.props.elRef,e)}}render(){let{context:e,props:t,state:n,rootElRef:r}=this,{options:o,dateEnv:a}=e,{date:s,dateProfile:i}=t;const l=t.showDayNumber&&function(e,t,n){const{start:r,end:o}=t,a=$R(o,-1),s=n.getYear(r),i=n.getMonth(r),l=n.getYear(a),c=n.getMonth(a);return!(s===l&&i===c)&&Boolean(e.valueOf()===r.valueOf()||1===n.getDay(e)&&e.valueOf()<o.valueOf())}(s,i.currentRange,a);return JT(kP,{elTag:"td",elRef:this.handleRootEl,elClasses:["fc-daygrid-day",...t.extraClassNames||[]],elAttrs:Object.assign(Object.assign(Object.assign({},t.extraDataAttrs),t.showDayNumber?{"aria-labelledby":n.dayNumberId}:{}),{role:"gridcell"}),defaultGenerator:oF,date:s,dateProfile:i,todayRange:t.todayRange,showDayNumber:t.showDayNumber,isMonthStart:l,extraRenderProps:t.extraRenderProps},((a,i)=>JT("div",{ref:t.innerElRef,className:"fc-daygrid-day-frame fc-scrollgrid-sync-inner",style:{minHeight:t.minHeight}},t.showWeekNumber&&JT(NP,{elTag:"a",elClasses:["fc-daygrid-week-number"],elAttrs:PI(e,s,"week"),date:s,defaultFormat:nF}),!i.isDisabled&&(t.showDayNumber||SP(o)||t.forceDayTop)?JT("div",{className:"fc-daygrid-day-top"},JT(a,{elTag:"a",elClasses:["fc-daygrid-day-number",l&&"fc-daygrid-month-start"],elAttrs:Object.assign(Object.assign({},PI(e,s)),{id:n.dayNumberId})})):t.showDayNumber?JT("div",{className:"fc-daygrid-day-top",style:{visibility:"hidden"}},JT("a",{className:"fc-daygrid-day-number"}," ")):void 0,JT("div",{className:"fc-daygrid-day-events",ref:t.fgContentElRef},t.fgContent,JT("div",{className:"fc-daygrid-day-bottom",style:{marginTop:t.moreMarginTop}},JT(eF,{allDayDate:s,singlePlacements:t.singlePlacements,moreCnt:t.moreCnt,alignmentElRef:r,alignGridTop:!t.showDayNumber,extraDateSpan:t.extraDateSpan,dateProfile:t.dateProfile,eventSelection:t.eventSelection,eventDrag:t.eventDrag,eventResize:t.eventResize,todayRange:t.todayRange}))),JT("div",{className:"fc-daygrid-day-bg"},t.bgContent))))}}function oF(e){return e.dayNumberText||JT(eA,null," ")}function aF(e){return e.eventRange.instance.instanceId+":"+e.firstCol}function sF(e){return aF(e)+":"+e.lastCol}function iF(e,t,n,r){if(e.firstCol===t&&e.lastCol===n-1)return e;let o=e.eventRange,a=o.range,s=hO(a,{start:r[t].date,end:UR(r[n-1].date,1)});return Object.assign(Object.assign({},e),{firstCol:t,lastCol:n-1,eventRange:{def:o.def,ui:Object.assign(Object.assign({},o.ui),{durationEditable:!1}),instance:o.instance,range:s},isStart:e.isStart&&s.start.valueOf()===a.start.valueOf(),isEnd:e.isEnd&&s.end.valueOf()===a.end.valueOf()})}class lF extends BI{constructor(){super(...arguments),this.hiddenConsumes=!1,this.forceHidden={}}addSegs(e){const t=super.addSegs(e),{entriesByLevel:n}=this,r=e=>!this.forceHidden[UI(e)];for(let e=0;e<n.length;e+=1)n[e]=n[e].filter(r);return t}handleInvalidInsertion(e,t,n){const{entriesByLevel:r,forceHidden:o}=this,{touchingEntry:a,touchingLevel:s,touchingLateral:i}=e;if(this.hiddenConsumes&&a){const e=UI(a);if(!o[e])if(this.allowReslicing){const e=Object.assign(Object.assign({},a),{span:$I(a.span,t.span)});o[UI(e)]=!0,r[s][i]=e,n.push(e),this.splitEntry(a,t,n)}else o[e]=!0,n.push(a)}super.handleInvalidInsertion(e,t,n)}}class cF extends HI{constructor(){super(...arguments),this.cellElRefs=new iP,this.frameElRefs=new iP,this.fgElRefs=new iP,this.segHarnessRefs=new iP,this.rootElRef={current:null},this.state={framePositions:null,maxContentHeight:null,segHeights:{}},this.handleResize=e=>{e&&this.updateSizing(!0)}}render(){let{props:e,state:t,context:n}=this,{options:r}=n,o=e.cells.length,a=YL(e.businessHourSegs,o),s=YL(e.bgEventSegs,o),i=YL(this.getHighlightSegs(),o),l=YL(this.getMirrorSegs(),o),{singleColPlacements:c,multiColPlacements:d,moreCnts:u,moreMarginTops:f}=function(e,t,n,r,o,a,s){let i=new lF((t=>{let n=e[t.index].eventRange.instance.instanceId+":"+t.span.start+":"+(t.span.end-1);return o[n]||1}));i.allowReslicing=!0,i.strictOrder=r,!0===t||!0===n?(i.maxCoord=a,i.hiddenConsumes=!0):"number"==typeof t?i.maxStackCnt=t:"number"==typeof n&&(i.maxStackCnt=n,i.hiddenConsumes=!0);let l=[],c=[];for(let t=0;t<e.length;t+=1){let n=e[t],r=sF(n);null!=o[r]?l.push({index:t,span:{start:n.firstCol,end:n.lastCol+1}}):c.push(n)}let d=i.addSegs(l),u=i.toRects(),{singleColPlacements:f,multiColPlacements:h,leftoverMargins:m}=function(e,t,n){let r=function(e,t){let n=[];for(let e=0;e<t;e+=1)n.push([]);for(let t of e)for(let e=t.span.start;e<t.span.end;e+=1)n[e].push(t);return n}(e,n.length),o=[],a=[],s=[];for(let e=0;e<n.length;e+=1){let i=r[e],l=[],c=0,d=0;for(let r of i){let o=t[r.index];l.push({seg:iF(o,e,e+1,n),isVisible:!0,isAbsolute:!1,absoluteTop:r.levelCoord,marginTop:r.levelCoord-c}),c=r.levelCoord+r.thickness}let u=[];c=0,d=0;for(let r of i){let o=t[r.index],a=r.span.end-r.span.start>1,s=r.span.start===e;d+=r.levelCoord-c,c=r.levelCoord+r.thickness,a?(d+=r.thickness,s&&u.push({seg:iF(o,r.span.start,r.span.end,n),isVisible:!0,isAbsolute:!0,absoluteTop:r.levelCoord,marginTop:0})):s&&(u.push({seg:iF(o,r.span.start,r.span.end,n),isVisible:!0,isAbsolute:!1,absoluteTop:r.levelCoord,marginTop:d}),d=0)}o.push(l),a.push(u),s.push(d)}return{singleColPlacements:o,multiColPlacements:a,leftoverMargins:s}}(u,e,s),p=[],g=[];for(let e of c){h[e.firstCol].push({seg:e,isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let t=e.firstCol;t<=e.lastCol;t+=1)f[t].push({seg:iF(e,t,t+1,s),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let e=0;e<s.length;e+=1)p.push(0);for(let t of d){let n=e[t.index],r=t.span;h[r.start].push({seg:iF(n,r.start,r.end,s),isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let e=r.start;e<r.end;e+=1)p[e]+=1,f[e].push({seg:iF(n,e,e+1,s),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let e=0;e<s.length;e+=1)g.push(m[e]);return{singleColPlacements:f,multiColPlacements:h,moreCnts:p,moreMarginTops:g}}(sI(e.fgEventSegs,r.eventOrder),e.dayMaxEvents,e.dayMaxEventRows,r.eventOrderStrict,t.segHeights,t.maxContentHeight,e.cells),h=e.eventDrag&&e.eventDrag.affectedInstances||e.eventResize&&e.eventResize.affectedInstances||{};return JT("tr",{ref:this.rootElRef,role:"row"},e.renderIntro&&e.renderIntro(),e.cells.map(((t,n)=>{let r=this.renderFgSegs(n,e.forPrint?c[n]:d[n],e.todayRange,h),o=this.renderFgSegs(n,function(e,t){if(!e.length)return[];let n=function(e){let t={};for(let n of e)for(let e of n)t[e.seg.eventRange.instance.instanceId]=e.absoluteTop;return t}(t);return e.map((e=>({seg:e,isVisible:!0,isAbsolute:!0,absoluteTop:n[e.eventRange.instance.instanceId],marginTop:0})))}(l[n],d),e.todayRange,{},Boolean(e.eventDrag),Boolean(e.eventResize),!1);return JT(rF,{key:t.key,elRef:this.cellElRefs.createRef(t.key),innerElRef:this.frameElRefs.createRef(t.key),dateProfile:e.dateProfile,date:t.date,showDayNumber:e.showDayNumbers,showWeekNumber:e.showWeekNumbers&&0===n,forceDayTop:e.showWeekNumbers,todayRange:e.todayRange,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,extraRenderProps:t.extraRenderProps,extraDataAttrs:t.extraDataAttrs,extraClassNames:t.extraClassNames,extraDateSpan:t.extraDateSpan,moreCnt:u[n],moreMarginTop:f[n],singlePlacements:c[n],fgContentElRef:this.fgElRefs.createRef(t.key),fgContent:JT(eA,null,JT(eA,null,r),JT(eA,null,o)),bgContent:JT(eA,null,this.renderFillSegs(i[n],"highlight"),this.renderFillSegs(a[n],"non-business"),this.renderFillSegs(s[n],"bg-event")),minHeight:e.cellMinHeight})})))}componentDidMount(){this.updateSizing(!0),this.context.addResizeHandler(this.handleResize)}componentDidUpdate(e,t){let n=this.props;this.updateSizing(!zM(e,n))}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}getHighlightSegs(){let{props:e}=this;return e.eventDrag&&e.eventDrag.segs.length?e.eventDrag.segs:e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:e.dateSelectionSegs}getMirrorSegs(){let{props:e}=this;return e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:[]}renderFgSegs(e,t,n,r,o,a,s){let{context:i}=this,{eventSelection:l}=this.props,{framePositions:c}=this.state,d=1===this.props.cells.length,u=o||a||s,f=[];if(c)for(let e of t){let{seg:t}=e,{instanceId:h}=t.eventRange.instance,m=e.isVisible&&!r[h],p=e.isAbsolute,g="",v="";p&&(i.isRtl?(v=0,g=c.lefts[t.lastCol]-c.lefts[t.firstCol]):(g=0,v=c.rights[t.firstCol]-c.rights[t.lastCol])),f.push(JT("div",{className:"fc-daygrid-event-harness"+(p?" fc-daygrid-event-harness-abs":""),key:aF(t),ref:u?null:this.segHarnessRefs.createRef(sF(t)),style:{visibility:m?"":"hidden",marginTop:p?"":e.marginTop,top:p?e.absoluteTop:"",left:g,right:v}},KL(t)?JT(JL,Object.assign({seg:t,isDragging:o,isSelected:h===l,defaultDisplayEventEnd:d},fI(t,n))):JT(QL,Object.assign({seg:t,isDragging:o,isResizing:a,isDateSelecting:s,isSelected:h===l,defaultDisplayEventEnd:d},fI(t,n)))))}return f}renderFillSegs(e,t){let{isRtl:n}=this.context,{todayRange:r}=this.props,{framePositions:o}=this.state,a=[];if(o)for(let s of e){let e=n?{right:0,left:o.lefts[s.lastCol]-o.lefts[s.firstCol]}:{left:0,right:o.rights[s.firstCol]-o.rights[s.lastCol]};a.push(JT("div",{key:mI(s.eventRange),className:"fc-daygrid-bg-harness",style:e},"bg-event"===t?JT(_P,Object.assign({seg:s},fI(s,r))):EP(t)))}return JT(eA,{},...a)}updateSizing(e){let{props:t,state:n,frameElRefs:r}=this;if(!t.forPrint&&null!==t.clientWidth){if(e){let e=t.cells.map((e=>r.currentMap[e.key]));if(e.length){let t=this.rootElRef.current,r=new FI(t,e,!0,!1);n.framePositions&&n.framePositions.similarTo(r)||this.setState({framePositions:new FI(t,e,!0,!1)})}}const o=this.state.segHeights,a=this.querySegHeights(),s=!0===t.dayMaxEvents||!0===t.dayMaxEventRows;this.safeSetState({segHeights:Object.assign(Object.assign({},o),a),maxContentHeight:s?this.computeMaxContentHeight():null})}}querySegHeights(){let e=this.segHarnessRefs.currentMap,t={};for(let n in e){let r=Math.round(e[n].getBoundingClientRect().height);t[n]=Math.max(t[n]||0,r)}return t}computeMaxContentHeight(){let e=this.props.cells[0].key,t=this.cellElRefs.currentMap[e],n=this.fgElRefs.currentMap[e];return t.getBoundingClientRect().bottom-n.getBoundingClientRect().top}getCellEls(){let e=this.cellElRefs.currentMap;return this.props.cells.map((t=>e[t.key]))}}cF.addStateEquality({segHeights:zM});class dF extends HI{constructor(){super(...arguments),this.splitBusinessHourSegs=sM(GL),this.splitBgEventSegs=sM(GL),this.splitFgEventSegs=sM(GL),this.splitDateSelectionSegs=sM(GL),this.splitEventDrag=sM(qL),this.splitEventResize=sM(qL),this.rowRefs=new iP}render(){let{props:e,context:t}=this,n=e.cells.length,r=this.splitBusinessHourSegs(e.businessHourSegs,n),o=this.splitBgEventSegs(e.bgEventSegs,n),a=this.splitFgEventSegs(e.fgEventSegs,n),s=this.splitDateSelectionSegs(e.dateSelectionSegs,n),i=this.splitEventDrag(e.eventDrag,n),l=this.splitEventResize(e.eventResize,n),c=n>=7&&e.clientWidth?e.clientWidth/t.options.aspectRatio/6:null;return JT(_I,{unit:"day"},((t,d)=>JT(eA,null,e.cells.map(((t,u)=>JT(cF,{ref:this.rowRefs.createRef(u),key:t.length?t[0].date.toISOString():u,showDayNumbers:n>1,showWeekNumbers:e.showWeekNumbers,todayRange:d,dateProfile:e.dateProfile,cells:t,renderIntro:e.renderRowIntro,businessHourSegs:r[u],eventSelection:e.eventSelection,bgEventSegs:o[u].filter(uF),fgEventSegs:a[u],dateSelectionSegs:s[u],eventDrag:i[u],eventResize:l[u],dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,clientWidth:e.clientWidth,clientHeight:e.clientHeight,cellMinHeight:c,forPrint:e.forPrint}))))))}componentDidMount(){this.registerInteractiveComponent()}componentDidUpdate(){this.registerInteractiveComponent()}registerInteractiveComponent(){if(!this.rootEl){const e=this.rowRefs.currentMap[0].getCellEls()[0],t=e?e.closest(".fc-daygrid-body"):null;t&&(this.rootEl=t,this.context.registerInteractiveComponent(this,{el:t,isHitComboAllowed:this.props.isHitComboAllowed}))}}componentWillUnmount(){this.rootEl&&(this.context.unregisterInteractiveComponent(this),this.rootEl=null)}prepareHits(){this.rowPositions=new FI(this.rootEl,this.rowRefs.collect().map((e=>e.getCellEls()[0])),!1,!0),this.colPositions=new FI(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)}queryHit(e,t){let{colPositions:n,rowPositions:r}=this,o=n.leftToIndex(e),a=r.topToIndex(t);if(null!=a&&null!=o){let e=this.props.cells[a][o];return{dateProfile:this.props.dateProfile,dateSpan:Object.assign({range:this.getCellRange(a,o),allDay:!0},e.extraDateSpan),dayEl:this.getCellEl(a,o),rect:{left:n.lefts[o],right:n.rights[o],top:r.tops[a],bottom:r.bottoms[a]},layer:0}}return null}getCellEl(e,t){return this.rowRefs.currentMap[e].getCellEls()[t]}getCellRange(e,t){let n=this.props.cells[e][t].date;return{start:n,end:UR(n,1)}}}function uF(e){return e.eventRange.def.allDay}class fF extends HI{constructor(){super(...arguments),this.elRef={current:null},this.needsScrollReset=!1}render(){let{props:e}=this,{dayMaxEventRows:t,dayMaxEvents:n,expandRows:r}=e,o=!0===n||!0===t;o&&!r&&(o=!1,t=null,n=null);let a=["fc-daygrid-body",o?"fc-daygrid-body-balanced":"fc-daygrid-body-unbalanced",r?"":"fc-daygrid-body-natural"];return JT("div",{ref:this.elRef,className:a.join(" "),style:{width:e.clientWidth,minWidth:e.tableMinWidth}},JT("table",{role:"presentation",className:"fc-scrollgrid-sync-table",style:{width:e.clientWidth,minWidth:e.tableMinWidth,height:r?e.clientHeight:""}},e.colGroupNode,JT("tbody",{role:"presentation"},JT(dF,{dateProfile:e.dateProfile,cells:e.cells,renderRowIntro:e.renderRowIntro,showWeekNumbers:e.showWeekNumbers,clientWidth:e.clientWidth,clientHeight:e.clientHeight,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,dayMaxEvents:n,dayMaxEventRows:t,forPrint:e.forPrint,isHitComboAllowed:e.isHitComboAllowed}))))}componentDidMount(){this.requestScrollReset()}componentDidUpdate(e){e.dateProfile!==this.props.dateProfile?this.requestScrollReset():this.flushScrollReset()}requestScrollReset(){this.needsScrollReset=!0,this.flushScrollReset()}flushScrollReset(){if(this.needsScrollReset&&this.props.clientWidth){const e=function(e,t){let n;var r;return t.currentRangeUnit.match(/year|month/)&&(n=e.querySelector(`[data-date="${r=t.currentDate,r.toISOString().match(/^\d{4}-\d{2}/)[0]}-01"]`)),n||(n=e.querySelector(`[data-date="${oM(t.currentDate)}"]`)),n}(this.elRef.current,this.props.dateProfile);if(e){const t=e.closest(".fc-daygrid-body"),n=t.closest(".fc-scroller"),r=e.getBoundingClientRect().top-t.getBoundingClientRect().top;n.scrollTop=r?r+1:0}this.needsScrollReset=!1}}}class hF extends rP{constructor(){super(...arguments),this.forceDayIfListItem=!0}sliceRange(e,t){return t.sliceRange(e)}}class mF extends HI{constructor(){super(...arguments),this.slicer=new hF,this.tableRef={current:null}}render(){let{props:e,context:t}=this;return JT(fF,Object.assign({ref:this.tableRef},this.slicer.sliceProps(e,e.dateProfile,e.nextDayThreshold,t,e.dayTableModel),{dateProfile:e.dateProfile,cells:e.dayTableModel.cells,colGroupNode:e.colGroupNode,tableMinWidth:e.tableMinWidth,renderRowIntro:e.renderRowIntro,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.showWeekNumbers,expandRows:e.expandRows,headerAlignElRef:e.headerAlignElRef,clientWidth:e.clientWidth,clientHeight:e.clientHeight,forPrint:e.forPrint}))}}function pF(e,t){let n=new tP(e.renderRange,t);return new nP(n,/year|month|week/.test(e.currentRangeUnit))}dR(':root{--fc-daygrid-event-dot-width:8px}.fc-daygrid-day-events:after,.fc-daygrid-day-events:before,.fc-daygrid-day-frame:after,.fc-daygrid-day-frame:before,.fc-daygrid-event-harness:after,.fc-daygrid-event-harness:before{clear:both;content:"";display:table}.fc .fc-daygrid-body{position:relative;z-index:1}.fc .fc-daygrid-day.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-daygrid-day-frame{min-height:100%;position:relative}.fc .fc-daygrid-day-top{display:flex;flex-direction:row-reverse}.fc .fc-day-other .fc-daygrid-day-top{opacity:.3}.fc .fc-daygrid-day-number{padding:4px;position:relative;z-index:4}.fc .fc-daygrid-month-start{font-size:1.1em;font-weight:700}.fc .fc-daygrid-day-events{margin-top:1px}.fc .fc-daygrid-body-balanced .fc-daygrid-day-events{left:0;position:absolute;right:0}.fc .fc-daygrid-body-unbalanced .fc-daygrid-day-events{min-height:2em;position:relative}.fc .fc-daygrid-body-natural .fc-daygrid-day-events{margin-bottom:1em}.fc .fc-daygrid-event-harness{position:relative}.fc .fc-daygrid-event-harness-abs{left:0;position:absolute;right:0;top:0}.fc .fc-daygrid-bg-harness{bottom:0;position:absolute;top:0}.fc .fc-daygrid-day-bg .fc-non-business{z-index:1}.fc .fc-daygrid-day-bg .fc-bg-event{z-index:2}.fc .fc-daygrid-day-bg .fc-highlight{z-index:3}.fc .fc-daygrid-event{margin-top:1px;z-index:6}.fc .fc-daygrid-event.fc-event-mirror{z-index:7}.fc .fc-daygrid-day-bottom{font-size:.85em;margin:0 2px}.fc .fc-daygrid-day-bottom:after,.fc .fc-daygrid-day-bottom:before{clear:both;content:"";display:table}.fc .fc-daygrid-more-link{border-radius:3px;cursor:pointer;line-height:1;margin-top:1px;max-width:100%;overflow:hidden;padding:2px;position:relative;white-space:nowrap;z-index:4}.fc .fc-daygrid-more-link:hover{background-color:rgba(0,0,0,.1)}.fc .fc-daygrid-week-number{background-color:var(--fc-neutral-bg-color);color:var(--fc-neutral-text-color);min-width:1.5em;padding:2px;position:absolute;text-align:center;top:0;z-index:5}.fc .fc-more-popover .fc-popover-body{min-width:220px;padding:10px}.fc-direction-ltr .fc-daygrid-event.fc-event-start,.fc-direction-rtl .fc-daygrid-event.fc-event-end{margin-left:2px}.fc-direction-ltr .fc-daygrid-event.fc-event-end,.fc-direction-rtl .fc-daygrid-event.fc-event-start{margin-right:2px}.fc-direction-ltr .fc-daygrid-more-link{float:left}.fc-direction-ltr .fc-daygrid-week-number{border-radius:0 0 3px 0;left:0}.fc-direction-rtl .fc-daygrid-more-link{float:right}.fc-direction-rtl .fc-daygrid-week-number{border-radius:0 0 0 3px;right:0}.fc-liquid-hack .fc-daygrid-day-frame{position:static}.fc-daygrid-event{border-radius:3px;font-size:var(--fc-small-font-size);position:relative;white-space:nowrap}.fc-daygrid-block-event .fc-event-time{font-weight:700}.fc-daygrid-block-event .fc-event-time,.fc-daygrid-block-event .fc-event-title{padding:1px}.fc-daygrid-dot-event{align-items:center;display:flex;padding:2px 0}.fc-daygrid-dot-event .fc-event-title{flex-grow:1;flex-shrink:1;font-weight:700;min-width:0;overflow:hidden}.fc-daygrid-dot-event.fc-event-mirror,.fc-daygrid-dot-event:hover{background:rgba(0,0,0,.1)}.fc-daygrid-dot-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-daygrid-event-dot{border:calc(var(--fc-daygrid-event-dot-width)/2) solid var(--fc-event-border-color);border-radius:calc(var(--fc-daygrid-event-dot-width)/2);box-sizing:content-box;height:0;margin:0 4px;width:0}.fc-direction-ltr .fc-daygrid-event .fc-event-time{margin-right:3px}.fc-direction-rtl .fc-daygrid-event .fc-event-time{margin-left:3px}');var gF=GP({name:"@fullcalendar/daygrid",initialView:"dayGridMonth",views:{dayGrid:{component:class extends $L{constructor(){super(...arguments),this.buildDayTableModel=sM(pF),this.headerRef={current:null},this.tableRef={current:null}}render(){let{options:e,dateProfileGenerator:t}=this.context,{props:n}=this,r=this.buildDayTableModel(n.dateProfile,t),o=e.dayHeaders&&JT(XI,{ref:this.headerRef,dateProfile:n.dateProfile,dates:r.headerDates,datesRepDistinctDays:1===r.rowCnt}),a=t=>JT(mF,{ref:this.tableRef,dateProfile:n.dateProfile,dayTableModel:r,businessHours:n.businessHours,dateSelection:n.dateSelection,eventStore:n.eventStore,eventUiBases:n.eventUiBases,eventSelection:n.eventSelection,eventDrag:n.eventDrag,eventResize:n.eventResize,nextDayThreshold:e.nextDayThreshold,colGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.weekNumbers,expandRows:!n.isHeightAuto,headerAlignElRef:this.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:n.forPrint});return e.dayMinWidth?this.renderHScrollLayout(o,a,r.colCnt,e.dayMinWidth):this.renderSimpleLayout(o,a)}},dateProfileGeneratorClass:class extends yO{buildRenderRange(e,t,n){let r=super.buildRenderRange(e,t,n),{props:o}=this;return function(e){let t,{dateEnv:n,currentRange:r}=e,{start:o,end:a}=r;if(e.snapToWeek&&(o=n.startOfWeek(o),t=n.startOfWeek(a),t.valueOf()!==a.valueOf()&&(a=WR(t,1))),e.fixedWeekCount){let e=n.startOfWeek(n.startOfMonth(UR(r.end,-1)));a=WR(a,6-Math.ceil(GR(e,a)/7))}return{start:o,end:a}}({currentRange:r,snapToWeek:/^(year|month)$/.test(t),fixedWeekCount:o.fixedWeekCount,dateEnv:o.dateEnv})}}},dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},fixedWeekCount:!0},dayGridYear:{type:"dayGrid",duration:{years:1}}}});class vF extends eO{constructor(){super(...arguments),this.state={textId:wR()}}render(){let{theme:e,dateEnv:t,options:n,viewApi:r}=this.context,{cellId:o,dayDate:a,todayRange:s}=this.props,{textId:i}=this.state,l=RI(a,s),c=n.listDayFormat?t.format(a,n.listDayFormat):"",d=n.listDaySideFormat?t.format(a,n.listDaySideFormat):"",u=Object.assign({date:t.toDate(a),view:r,textId:i,text:c,sideText:d,navLinkAttrs:PI(this.context,a),sideNavLinkAttrs:PI(this.context,a,"day",!1)},l);return JT(iO,{elTag:"tr",elClasses:["fc-list-day",...MI(l,e)],elAttrs:{"data-date":oM(a)},renderProps:u,generatorName:"dayHeaderContent",customGenerator:n.dayHeaderContent,defaultGenerator:yF,classNameGenerator:n.dayHeaderClassNames,didMount:n.dayHeaderDidMount,willUnmount:n.dayHeaderWillUnmount},(t=>JT("th",{scope:"colgroup",colSpan:3,id:o,"aria-labelledby":i},JT(t,{elTag:"div",elClasses:["fc-list-day-cushion",e.getClass("tableCellShaded")]}))))}}function yF(e){return JT(eA,null,e.text&&JT("a",Object.assign({id:e.textId,className:"fc-list-day-text"},e.navLinkAttrs),e.text),e.sideText&&JT("a",Object.assign({"aria-hidden":!0,className:"fc-list-day-side-text"},e.sideNavLinkAttrs),e.sideText))}const bF=wM({hour:"numeric",minute:"2-digit",meridiem:"short"});class xF extends eO{render(){let{props:e,context:t}=this,{options:n}=t,{seg:r,timeHeaderId:o,eventHeaderId:a,dateHeaderId:s}=e,i=n.eventTimeFormat||bF;return JT(vP,Object.assign({},e,{elTag:"tr",elClasses:["fc-list-event",r.eventRange.def.url&&"fc-event-forced-url"],defaultGenerator:()=>function(e,t){let n=pI(e,t);return JT("a",Object.assign({},n),e.eventRange.def.title)}(r,t),seg:r,timeText:"",disableDragging:!0,disableResizing:!0}),((e,n)=>JT(eA,null,function(e,t,n,r,o){let{options:a}=n;if(!1!==a.displayEventTime){let s,i=e.eventRange.def,l=e.eventRange.instance,c=!1;if(i.allDay?c=!0:function(e){let t=gO(e);return GR(t.start,t.end)>1}(e.eventRange.range)?e.isStart?s=uI(e,t,n,null,null,l.range.start,e.end):e.isEnd?s=uI(e,t,n,null,null,e.start,l.range.end):c=!0:s=uI(e,t,n),c){let e={text:n.options.allDayText,view:n.viewApi};return JT(iO,{elTag:"td",elClasses:["fc-list-event-time"],elAttrs:{headers:`${r} ${o}`},renderProps:e,generatorName:"allDayContent",customGenerator:a.allDayContent,defaultGenerator:wF,classNameGenerator:a.allDayClassNames,didMount:a.allDayDidMount,willUnmount:a.allDayWillUnmount})}return JT("td",{className:"fc-list-event-time"},s)}return null}(r,i,t,o,s),JT("td",{"aria-hidden":!0,className:"fc-list-event-graphic"},JT("span",{className:"fc-list-event-dot",style:{borderColor:n.borderColor||n.backgroundColor}})),JT(e,{elTag:"td",elClasses:["fc-list-event-title"],elAttrs:{headers:`${a} ${s}`}}))))}}function wF(e){return e.text}function kF(e){return e.text}function SF(e){let t=qR(e.renderRange.start),n=e.renderRange.end,r=[],o=[];for(;t<n;)r.push(t),o.push({start:t,end:UR(t,1)}),t=UR(t,1);return{dayDates:r,dayRanges:o}}function CF(e){return!1===e?null:wM(e)}dR(':root{--fc-list-event-dot-width:10px;--fc-list-event-hover-bg-color:#f5f5f5}.fc-theme-standard .fc-list{border:1px solid var(--fc-border-color)}.fc .fc-list-empty{align-items:center;background-color:var(--fc-neutral-bg-color);display:flex;height:100%;justify-content:center}.fc .fc-list-empty-cushion{margin:5em 0}.fc .fc-list-table{border-style:hidden;width:100%}.fc .fc-list-table tr>*{border-left:0;border-right:0}.fc .fc-list-sticky .fc-list-day>*{background:var(--fc-page-bg-color);position:sticky;top:0}.fc .fc-list-table thead{left:-10000px;position:absolute}.fc .fc-list-table tbody>tr:first-child th{border-top:0}.fc .fc-list-table th{padding:0}.fc .fc-list-day-cushion,.fc .fc-list-table td{padding:8px 14px}.fc .fc-list-day-cushion:after{clear:both;content:"";display:table}.fc-theme-standard .fc-list-day-cushion{background-color:var(--fc-neutral-bg-color)}.fc-direction-ltr .fc-list-day-text,.fc-direction-rtl .fc-list-day-side-text{float:left}.fc-direction-ltr .fc-list-day-side-text,.fc-direction-rtl .fc-list-day-text{float:right}.fc-direction-ltr .fc-list-table .fc-list-event-graphic{padding-right:0}.fc-direction-rtl .fc-list-table .fc-list-event-graphic{padding-left:0}.fc .fc-list-event.fc-event-forced-url{cursor:pointer}.fc .fc-list-event:hover td{background-color:var(--fc-list-event-hover-bg-color)}.fc .fc-list-event-graphic,.fc .fc-list-event-time{white-space:nowrap;width:1px}.fc .fc-list-event-dot{border:calc(var(--fc-list-event-dot-width)/2) solid var(--fc-event-border-color);border-radius:calc(var(--fc-list-event-dot-width)/2);box-sizing:content-box;display:inline-block;height:0;width:0}.fc .fc-list-event-title a{color:inherit;text-decoration:none}.fc .fc-list-event.fc-event-forced-url:hover a{text-decoration:underline}');var _F=GP({name:"@fullcalendar/list",optionRefiners:{listDayFormat:CF,listDaySideFormat:CF,noEventsClassNames:RM,noEventsContent:RM,noEventsDidMount:RM,noEventsWillUnmount:RM},views:{list:{component:class extends HI{constructor(){super(...arguments),this.computeDateVars=sM(SF),this.eventStoreToSegs=sM(this._eventStoreToSegs),this.state={timeHeaderId:wR(),eventHeaderId:wR(),dateHeaderIdRoot:wR()},this.setRootEl=e=>{e?this.context.registerInteractiveComponent(this,{el:e}):this.context.unregisterInteractiveComponent(this)}}render(){let{props:e,context:t}=this,{dayDates:n,dayRanges:r}=this.computeDateVars(e.dateProfile),o=this.eventStoreToSegs(e.eventStore,e.eventUiBases,r);return JT(cO,{elRef:this.setRootEl,elClasses:["fc-list",t.theme.getClass("table"),!1!==t.options.stickyHeaderDates?"fc-list-sticky":""],viewSpec:t.viewSpec},JT(sP,{liquid:!e.isHeightAuto,overflowX:e.isHeightAuto?"visible":"hidden",overflowY:e.isHeightAuto?"visible":"auto"},o.length>0?this.renderSegList(o,n):this.renderEmptyMessage()))}renderEmptyMessage(){let{options:e,viewApi:t}=this.context,n={text:e.noEventsText,view:t};return JT(iO,{elTag:"div",elClasses:["fc-list-empty"],renderProps:n,generatorName:"noEventsContent",customGenerator:e.noEventsContent,defaultGenerator:kF,classNameGenerator:e.noEventsClassNames,didMount:e.noEventsDidMount,willUnmount:e.noEventsWillUnmount},(e=>JT(e,{elTag:"div",elClasses:["fc-list-empty-cushion"]})))}renderSegList(e,t){let{theme:n,options:r}=this.context,{timeHeaderId:o,eventHeaderId:a,dateHeaderIdRoot:s}=this.state,i=function(e){let t,n,r=[];for(t=0;t<e.length;t+=1)n=e[t],(r[n.dayIndex]||(r[n.dayIndex]=[])).push(n);return r}(e);return JT(_I,{unit:"day"},((e,l)=>{let c=[];for(let n=0;n<i.length;n+=1){let d=i[n];if(d){let i=oM(t[n]),u=s+"-"+i;c.push(JT(vF,{key:i,cellId:u,dayDate:t[n],todayRange:l})),d=sI(d,r.eventOrder);for(let t of d)c.push(JT(xF,Object.assign({key:i+":"+t.eventRange.instance.instanceId,seg:t,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,timeHeaderId:o,eventHeaderId:a,dateHeaderId:u},fI(t,l,e))))}}return JT("table",{className:"fc-list-table "+n.getClass("table")},JT("thead",null,JT("tr",null,JT("th",{scope:"col",id:o},r.timeHint),JT("th",{scope:"col","aria-hidden":!0}),JT("th",{scope:"col",id:a},r.eventHint))),JT("tbody",null,c))}))}_eventStoreToSegs(e,t,n){return this.eventRangesToSegs(tI(e,t,this.props.dateProfile.activeRange,this.context.options.nextDayThreshold).fg,n)}eventRangesToSegs(e,t){let n=[];for(let r of e)n.push(...this.eventRangeToSegs(r,t));return n}eventRangeToSegs(e,t){let n,r,o,{dateEnv:a}=this.context,{nextDayThreshold:s}=this.context.options,i=e.range,l=e.def.allDay,c=[];for(n=0;n<t.length;n+=1)if(r=hO(i,t[n]),r&&(o={component:this,eventRange:e,start:r.start,end:r.end,isStart:e.isStart&&r.start.valueOf()===i.start.valueOf(),isEnd:e.isEnd&&r.end.valueOf()===i.end.valueOf(),dayIndex:n},c.push(o),!o.isEnd&&!l&&n+1<t.length&&i.end<a.add(t[n+1].start,s))){o.end=i.end,o.isEnd=!0;break}return c}},buttonTextKey:"list",listDayFormat:{month:"long",day:"numeric",year:"numeric"}},listDay:{type:"list",duration:{days:1},listDayFormat:{weekday:"long"}},listWeek:{type:"list",duration:{weeks:1},listDayFormat:{weekday:"long"},listDaySideFormat:{month:"long",day:"numeric",year:"numeric"}},listMonth:{type:"list",duration:{month:1},listDaySideFormat:{weekday:"long"}},listYear:{type:"list",duration:{year:1},listDaySideFormat:{weekday:"long"}}}});function jF(e,t,n){return vs.fromObject({year:e[0],month:e[1]+1,day:e[2],hour:e[3],minute:e[4],second:e[5],millisecond:e[6]},{locale:n,zone:t})}function EF(e){let t=e.match(/^(.*?)\{(.*)\}(.*)$/);if(t){let e=EF(t[2]);return{head:t[1],middle:e,tail:t[3],whole:t[1]+e.whole+t[3]}}return{head:null,middle:null,tail:null,whole:e}}function NF(e,t,n,r){if(e.middle){let o=t(e.head),a=NF(e.middle,t,n,r),s=t(e.tail),i=n(e.head),l=NF(e.middle,t,n,r),c=n(e.tail);if(o===i&&s===c)return o+(a===l?a:a+r+l)+s}let o=t(e.whole),a=n(e.whole);return o===a?o:o+r+a}var DF=GP({name:"@fullcalendar/luxon3",cmdFormatter:function(e,t){let n=EF(e);if(t.end){let e=jF(t.start.array,t.timeZone,t.localeCodes[0]),r=jF(t.end.array,t.timeZone,t.localeCodes[0]);return NF(n,e.toFormat.bind(e),r.toFormat.bind(r),t.defaultSeparator)}return jF(t.date.array,t.timeZone,t.localeCodes[0]).toFormat(n.whole)},namedTimeZonedImpl:class extends VI{offsetForArray(e){return jF(e,this.timeZoneName).offset}timestampToArray(e){return[(t=vs.fromMillis(e,{zone:this.timeZoneName})).year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond];var t}}});const TF=parseInt(String(e.version).split(".")[0])<18;class AF extends e.Component{constructor(){super(...arguments),this.elRef=(0,e.createRef)(),this.isUpdating=!1,this.isUnmounting=!1,this.state={customRenderingMap:new Map},this.requestResize=()=>{this.isUnmounting||(this.cancelResize(),this.resizeId=requestAnimationFrame((()=>{this.doResize()})))}}render(){const t=[];for(const n of this.state.customRenderingMap.values())t.push(e.createElement(RF,{key:n.id,customRendering:n}));return e.createElement("div",{ref:this.elRef},t)}componentDidMount(){this.isUnmounting=!1;const e=new zP;let t;this.handleCustomRendering=e.handle.bind(e),this.calendar=new UL(this.elRef.current,Object.assign(Object.assign({},this.props),{handleCustomRendering:this.handleCustomRendering})),this.calendar.render(),this.calendar.on("_beforeprint",(()=>{(0,pe.flushSync)((()=>{}))})),e.subscribe((e=>{const n=Date.now(),r=!t;(TF||r||this.isUpdating||this.isUnmounting||n-t<100?MF:pe.flushSync)((()=>{this.setState({customRenderingMap:e},(()=>{t=n,r?this.doResize():this.requestResize()}))}))}))}componentDidUpdate(){this.isUpdating=!0,this.calendar.resetOptions(Object.assign(Object.assign({},this.props),{handleCustomRendering:this.handleCustomRendering})),this.isUpdating=!1}componentWillUnmount(){this.isUnmounting=!0,this.cancelResize(),this.calendar.destroy()}doResize(){this.calendar.updateSize()}cancelResize(){void 0!==this.resizeId&&(cancelAnimationFrame(this.resizeId),this.resizeId=void 0)}getApi(){return this.calendar}}AF.act=MF;class RF extends e.PureComponent{render(){const{customRendering:e}=this.props,{generatorMeta:t}=e,n="function"==typeof t?t(e.renderProps):t;return(0,pe.createPortal)(n,e.containerEl)}}function MF(e){e()}class OF extends TI{getKeyInfo(){return{allDay:{},timed:{}}}getKeysForDateSpan(e){return e.allDay?["allDay"]:["timed"]}getKeysForEventDef(e){return e.allDay?"background"===(t=e).ui.display||"inverse-background"===t.ui.display?["timed","allDay"]:["allDay"]:["timed"];var t}}const IF=wM({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"});function PF(e){let t=["fc-timegrid-slot","fc-timegrid-slot-label",e.isLabeled?"fc-scrollgrid-shrink":"fc-timegrid-slot-minor"];return JT(QM.Consumer,null,(n=>{if(!e.isLabeled)return JT("td",{className:t.join(" "),"data-time":e.isoTimeStr});let{dateEnv:r,options:o,viewApi:a}=n,s=null==o.slotLabelFormat?IF:Array.isArray(o.slotLabelFormat)?wM(o.slotLabelFormat[0]):wM(o.slotLabelFormat),i={level:0,time:e.time,date:r.toDate(e.date),view:a,text:r.format(e.date,s)};return JT(iO,{elTag:"td",elClasses:t,elAttrs:{"data-time":e.isoTimeStr},renderProps:i,generatorName:"slotLabelContent",customGenerator:o.slotLabelContent,defaultGenerator:LF,classNameGenerator:o.slotLabelClassNames,didMount:o.slotLabelDidMount,willUnmount:o.slotLabelWillUnmount},(e=>JT("div",{className:"fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame"},JT(e,{elTag:"div",elClasses:["fc-timegrid-slot-label-cushion","fc-scrollgrid-shrink-cushion"]}))))}))}function LF(e){return e.text}class FF extends eO{render(){return this.props.slatMetas.map((e=>JT("tr",{key:e.key},JT(PF,Object.assign({},e)))))}}const zF=wM({week:"short"});class HF extends HI{constructor(){super(...arguments),this.allDaySplitter=new OF,this.headerElRef={current:null},this.rootElRef={current:null},this.scrollerElRef={current:null},this.state={slatCoords:null},this.handleScrollTopRequest=e=>{let t=this.scrollerElRef.current;t&&(t.scrollTop=e)},this.renderHeadAxis=(e,t="")=>{let{options:n}=this.context,{dateProfile:r}=this.props,o=r.renderRange,a=1===GR(o.start,o.end)?PI(this.context,o.start,"week"):{};return n.weekNumbers&&"day"===e?JT(NP,{elTag:"th",elClasses:["fc-timegrid-axis","fc-scrollgrid-shrink"],elAttrs:{"aria-hidden":!0},date:o.start,defaultFormat:zF},(e=>JT("div",{className:["fc-timegrid-axis-frame","fc-scrollgrid-shrink-frame","fc-timegrid-axis-frame-liquid"].join(" "),style:{height:t}},JT(e,{elTag:"a",elClasses:["fc-timegrid-axis-cushion","fc-scrollgrid-shrink-cushion","fc-scrollgrid-sync-inner"],elAttrs:a})))):JT("th",{"aria-hidden":!0,className:"fc-timegrid-axis"},JT("div",{className:"fc-timegrid-axis-frame",style:{height:t}}))},this.renderTableRowAxis=e=>{let{options:t,viewApi:n}=this.context,r={text:t.allDayText,view:n};return JT(iO,{elTag:"td",elClasses:["fc-timegrid-axis","fc-scrollgrid-shrink"],elAttrs:{"aria-hidden":!0},renderProps:r,generatorName:"allDayContent",customGenerator:t.allDayContent,defaultGenerator:VF,classNameGenerator:t.allDayClassNames,didMount:t.allDayDidMount,willUnmount:t.allDayWillUnmount},(t=>JT("div",{className:["fc-timegrid-axis-frame","fc-scrollgrid-shrink-frame",null==e?" fc-timegrid-axis-frame-liquid":""].join(" "),style:{height:e}},JT(t,{elTag:"span",elClasses:["fc-timegrid-axis-cushion","fc-scrollgrid-shrink-cushion","fc-scrollgrid-sync-inner"]}))))},this.handleSlatCoords=e=>{this.setState({slatCoords:e})}}renderSimpleLayout(e,t,n){let{context:r,props:o}=this,a=[],s=mP(r.options);return e&&a.push({type:"header",key:"header",isSticky:s,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),t&&(a.push({type:"body",key:"all-day",chunk:{content:t}}),a.push({type:"body",key:"all-day-divider",outerContent:JT("tr",{role:"presentation",className:"fc-scrollgrid-section"},JT("td",{className:"fc-timegrid-divider "+r.theme.getClass("tableCellShaded")}))})),a.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(r.options.expandRows),chunk:{scrollerElRef:this.scrollerElRef,content:n}}),JT(cO,{elRef:this.rootElRef,elClasses:["fc-timegrid"],viewSpec:r.viewSpec},JT(gP,{liquid:!o.isHeightAuto&&!o.forPrint,collapsibleWidth:o.forPrint,cols:[{width:"shrink"}],sections:a}))}renderHScrollLayout(e,t,n,r,o,a,s){let i=this.context.pluginHooks.scrollGridImpl;if(!i)throw new Error("No ScrollGrid implementation");let{context:l,props:c}=this,d=!c.forPrint&&mP(l.options),u=!c.forPrint&&pP(l.options),f=[];e&&f.push({type:"header",key:"header",isSticky:d,syncRowHeights:!0,chunks:[{key:"axis",rowContent:e=>JT("tr",{role:"presentation"},this.renderHeadAxis("day",e.rowSyncHeights[0]))},{key:"cols",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),t&&(f.push({type:"body",key:"all-day",syncRowHeights:!0,chunks:[{key:"axis",rowContent:e=>JT("tr",{role:"presentation"},this.renderTableRowAxis(e.rowSyncHeights[0]))},{key:"cols",content:t}]}),f.push({key:"all-day-divider",type:"body",outerContent:JT("tr",{role:"presentation",className:"fc-scrollgrid-section"},JT("td",{colSpan:2,className:"fc-timegrid-divider "+l.theme.getClass("tableCellShaded")}))}));let h=l.options.nowIndicator;return f.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(l.options.expandRows),chunks:[{key:"axis",content:e=>JT("div",{className:"fc-timegrid-axis-chunk"},JT("table",{"aria-hidden":!0,style:{height:e.expandRows?e.clientHeight:""}},e.tableColGroupNode,JT("tbody",null,JT(FF,{slatMetas:a}))),JT("div",{className:"fc-timegrid-now-indicator-container"},JT(_I,{unit:h?"minute":"day"},(e=>{let t=h&&s&&s.safeComputeTop(e);return"number"==typeof t?JT(xP,{elClasses:["fc-timegrid-now-indicator-arrow"],elStyle:{top:t},isAxis:!0,date:e}):null}))))},{key:"cols",scrollerElRef:this.scrollerElRef,content:n}]}),u&&f.push({key:"footer",type:"footer",isSticky:!0,chunks:[{key:"axis",content:hP},{key:"cols",content:hP}]}),JT(cO,{elRef:this.rootElRef,elClasses:["fc-timegrid"],viewSpec:l.viewSpec},JT(i,{liquid:!c.isHeightAuto&&!c.forPrint,forPrint:c.forPrint,collapsibleWidth:!1,colGroups:[{width:"shrink",cols:[{width:"shrink"}]},{cols:[{span:r,minWidth:o}]}],sections:f}))}getAllDayMaxEventProps(){let{dayMaxEvents:e,dayMaxEventRows:t}=this.context.options;return!0!==e&&!0!==t||(e=void 0,t=5),{dayMaxEvents:e,dayMaxEventRows:t}}}function VF(e){return e.text}class BF{constructor(e,t,n){this.positions=e,this.dateProfile=t,this.slotDuration=n}safeComputeTop(e){let{dateProfile:t}=this;if(mO(t.currentRange,e)){let n=qR(e),r=e.valueOf()-n.valueOf();if(r>=FR(t.slotMinTime)&&r<FR(t.slotMaxTime))return this.computeTimeTop(OR(r))}return null}computeDateTop(e,t){return t||(t=qR(e)),this.computeTimeTop(OR(e.valueOf()-t.valueOf()))}computeTimeTop(e){let t,n,{positions:r,dateProfile:o}=this,a=r.els.length,s=(e.milliseconds-FR(o.slotMinTime))/FR(this.slotDuration);return s=Math.max(0,s),s=Math.min(a,s),t=Math.floor(s),t=Math.min(t,a-1),n=s-t,r.tops[t]+r.getHeight(t)*n}}class WF extends eO{render(){let{props:e,context:t}=this,{options:n}=t,{slatElRefs:r}=e;return JT("tbody",null,e.slatMetas.map(((o,a)=>{let s={time:o.time,date:t.dateEnv.toDate(o.date),view:t.viewApi};return JT("tr",{key:o.key,ref:r.createRef(o.key)},e.axis&&JT(PF,Object.assign({},o)),JT(iO,{elTag:"td",elClasses:["fc-timegrid-slot","fc-timegrid-slot-lane",!o.isLabeled&&"fc-timegrid-slot-minor"],elAttrs:{"data-time":o.isoTimeStr},renderProps:s,generatorName:"slotLaneContent",customGenerator:n.slotLaneContent,classNameGenerator:n.slotLaneClassNames,didMount:n.slotLaneDidMount,willUnmount:n.slotLaneWillUnmount}))})))}}class UF extends eO{constructor(){super(...arguments),this.rootElRef={current:null},this.slatElRefs=new iP}render(){let{props:e,context:t}=this;return JT("div",{ref:this.rootElRef,className:"fc-timegrid-slots"},JT("table",{"aria-hidden":!0,className:t.theme.getClass("table"),style:{minWidth:e.tableMinWidth,width:e.clientWidth,height:e.minHeight}},e.tableColGroupNode,JT(WF,{slatElRefs:this.slatElRefs,axis:e.axis,slatMetas:e.slatMetas})))}componentDidMount(){this.updateSizing()}componentDidUpdate(){this.updateSizing()}componentWillUnmount(){this.props.onCoords&&this.props.onCoords(null)}updateSizing(){let{context:e,props:t}=this;var n;t.onCoords&&null!==t.clientWidth&&this.rootElRef.current.offsetHeight&&t.onCoords(new BF(new FI(this.rootElRef.current,(n=this.slatElRefs.currentMap,t.slatMetas.map((e=>n[e.key]))),!1,!0),this.props.dateProfile,e.options.slotDuration))}}function $F(e,t){let n,r=[];for(n=0;n<t;n+=1)r.push([]);if(e)for(n=0;n<e.length;n+=1)r[e[n].col].push(e[n]);return r}function GF(e,t){let n=[];if(e){for(let r=0;r<t;r+=1)n[r]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(let t of e.segs)n[t.col].segs.push(t)}else for(let e=0;e<t;e+=1)n[e]=null;return n}class YF extends eO{render(){let{props:e}=this;return JT(RP,{elClasses:["fc-timegrid-more-link"],elStyle:{top:e.top,bottom:e.bottom},allDayDate:null,moreCnt:e.hiddenSegs.length,allSegs:e.hiddenSegs,hiddenSegs:e.hiddenSegs,extraDateSpan:e.extraDateSpan,dateProfile:e.dateProfile,todayRange:e.todayRange,popoverContent:()=>rz(e.hiddenSegs,e),defaultGenerator:qF,forceTimed:!0},(e=>JT(e,{elTag:"div",elClasses:["fc-timegrid-more-link-inner","fc-sticky"]})))}}function qF(e){return e.shortText}function ZF(e,t){if(!e)return[[],0];let{level:n,lateralStart:r,lateralEnd:o}=e,a=r,s=[];for(;a<o;)s.push(t(n,a)),a+=1;return s.sort(KF),[s.map(QF),s[0][1]]}function KF(e,t){return t[1]-e[1]}function QF(e){return e[0]}function JF(e,t){const n={};return(...r)=>{let o=e(...r);return o in n?n[o]:n[o]=t(...r)}}function XF(e,t,n=null,r=0){let o=[];if(n)for(let a=0;a<e.length;a+=1){let s=e[a],i=n.computeDateTop(s.start,t),l=Math.max(i+(r||0),n.computeDateTop(s.end,t));o.push({start:Math.round(i),end:Math.round(l)})}return o}const ez=wM({hour:"numeric",minute:"2-digit",meridiem:!1});class tz extends eO{render(){return JT(yP,Object.assign({},this.props,{elClasses:["fc-timegrid-event","fc-v-event",this.props.isShort&&"fc-timegrid-event-short"],defaultTimeFormat:ez}))}}class nz extends eO{constructor(){super(...arguments),this.sortEventSegs=sM(sI)}render(){let{props:e,context:t}=this,{options:n}=t,r=n.selectMirror,o=e.eventDrag&&e.eventDrag.segs||e.eventResize&&e.eventResize.segs||r&&e.dateSelectionSegs||[],a=e.eventDrag&&e.eventDrag.affectedInstances||e.eventResize&&e.eventResize.affectedInstances||{},s=this.sortEventSegs(e.fgEventSegs,n.eventOrder);return JT(kP,{elTag:"td",elRef:e.elRef,elClasses:["fc-timegrid-col",...e.extraClassNames||[]],elAttrs:Object.assign({role:"gridcell"},e.extraDataAttrs),date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,extraRenderProps:e.extraRenderProps},(t=>JT("div",{className:"fc-timegrid-col-frame"},JT("div",{className:"fc-timegrid-col-bg"},this.renderFillSegs(e.businessHourSegs,"non-business"),this.renderFillSegs(e.bgEventSegs,"bg-event"),this.renderFillSegs(e.dateSelectionSegs,"highlight")),JT("div",{className:"fc-timegrid-col-events"},this.renderFgSegs(s,a,!1,!1,!1)),JT("div",{className:"fc-timegrid-col-events"},this.renderFgSegs(o,{},Boolean(e.eventDrag),Boolean(e.eventResize),Boolean(r),"mirror")),JT("div",{className:"fc-timegrid-now-indicator-container"},this.renderNowIndicator(e.nowIndicatorSegs)),SP(n)&&JT(t,{elTag:"div",elClasses:["fc-timegrid-col-misc"]}))))}renderFgSegs(e,t,n,r,o,a){let{props:s}=this;return s.forPrint?rz(e,s):this.renderPositionedFgSegs(e,t,n,r,o,a)}renderPositionedFgSegs(e,t,n,r,o,a){let{eventMaxStack:s,eventShortHeight:i,eventOrderStrict:l,eventMinHeight:c}=this.context.options,{date:d,slatCoords:u,eventSelection:f,todayRange:h,nowDate:m}=this.props,p=n||r||o,g=XF(e,d,u,c),{segPlacements:v,hiddenGroups:y}=function(e,t,n,r){let o=[],a=[];for(let n=0;n<e.length;n+=1){let r=t[n];r?o.push({index:n,thickness:1,span:r}):a.push(e[n])}let{segRects:s,hiddenGroups:i}=function(e,t,n){let r=new BI;null!=t&&(r.strictOrder=t),null!=n&&(r.maxStackCnt=n);let o=function(e){let t=[];for(let o of e){let e=[],a={span:o.span,entries:[o]};for(let o of t)$I(o.span,a.span)?a={entries:o.entries.concat(a.entries),span:(n=o.span,r=a.span,{start:Math.min(n.start,r.start),end:Math.max(n.end,r.end)})}:e.push(o);e.push(a),t=e}var n,r;return t}(r.addSegs(e)),a=function(e){const{entriesByLevel:t}=e,n=JF(((e,t)=>e+":"+t),((r,o)=>{let a=function(e,t,n){let{levelCoords:r,entriesByLevel:o}=e,a=o[t][n],s=r[t]+a.thickness,i=r.length,l=t;for(;l<i&&r[l]<s;l+=1);for(;l<i;l+=1){let e,t=o[l],n=YI(t,a.span.start,WI),r=n[0]+n[1],s=r;for(;(e=t[s])&&e.span.start<a.span.end;)s+=1;if(r<s)return{level:l,lateralStart:r,lateralEnd:s}}return null}(e,r,o),s=ZF(a,n),i=t[r][o];return[Object.assign(Object.assign({},i),{nextLevelNodes:s[0]}),i.thickness+s[1]]}));return ZF(t.length?{level:0,lateralStart:0,lateralEnd:t[0].length}:null,n)[0]}(r);a=function(e){const t=JF(((e,t,n)=>UI(e)),((e,n,r)=>{let o,{nextLevelNodes:a,thickness:s}=e,i=s+r,l=s/i,c=[];if(a.length)for(let e of a)if(void 0===o){let r=t(e,n,i);o=r[0],c.push(r[1])}else{let n=t(e,o,0);c.push(n[1])}else o=1;let d=(o-n)*l;return[o-d,Object.assign(Object.assign({},e),{thickness:d,nextLevelNodes:c})]}));return e.map((e=>t(e,0,0)[1]))}(a);let s=function(e){let t=[];const n=JF(((e,t,n)=>UI(e)),((e,n,o)=>{let a=Object.assign(Object.assign({},e),{levelCoord:n,stackDepth:o,stackForward:0});return t.push(a),a.stackForward=r(e.nextLevelNodes,n+e.thickness,o+1)+1}));function r(e,t,r){let o=0;for(let a of e)o=Math.max(n(a,t,r),o);return o}return r(e,0,0),t}(a);return{segRects:s,hiddenGroups:o}}(o,n,r),l=[];for(let t of s)l.push({seg:e[t.index],rect:t});for(let e of a)l.push({seg:e,rect:null});return{segPlacements:l,hiddenGroups:i}}(e,g,l,s);return JT(eA,null,this.renderHiddenGroups(y,e),v.map((e=>{let{seg:s,rect:l}=e,c=s.eventRange.instance.instanceId,d=p||Boolean(!t[c]&&l),u=oz(l&&l.span),g=!p&&l?this.computeSegHStyle(l):{left:0,right:0},v=Boolean(l)&&l.stackForward>0,y=Boolean(l)&&l.span.end-l.span.start<i;return JT("div",{className:"fc-timegrid-event-harness"+(v?" fc-timegrid-event-harness-inset":""),key:a||c,style:Object.assign(Object.assign({visibility:d?"":"hidden"},u),g)},JT(tz,Object.assign({seg:s,isDragging:n,isResizing:r,isDateSelecting:o,isSelected:c===f,isShort:y},fI(s,h,m))))})))}renderHiddenGroups(e,t){let{extraDateSpan:n,dateProfile:r,todayRange:o,nowDate:a,eventSelection:s,eventDrag:i,eventResize:l}=this.props;return JT(eA,null,e.map((e=>{let c=oz(e.span),d=(u=e.entries,f=t,u.map((e=>f[e.index])));var u,f;return JT(YF,{key:rM(IP(d)),hiddenSegs:d,top:c.top,bottom:c.bottom,extraDateSpan:n,dateProfile:r,todayRange:o,nowDate:a,eventSelection:s,eventDrag:i,eventResize:l})})))}renderFillSegs(e,t){let{props:n,context:r}=this,o=XF(e,n.date,n.slatCoords,r.options.eventMinHeight).map(((r,o)=>{let a=e[o];return JT("div",{key:mI(a.eventRange),className:"fc-timegrid-bg-harness",style:oz(r)},"bg-event"===t?JT(_P,Object.assign({seg:a},fI(a,n.todayRange,n.nowDate))):EP(t))}));return JT(eA,null,o)}renderNowIndicator(e){let{slatCoords:t,date:n}=this.props;return t?e.map(((e,r)=>JT(xP,{key:r,elClasses:["fc-timegrid-now-indicator-line"],elStyle:{top:t.computeDateTop(e.start,n)},isAxis:!1,date:n}))):null}computeSegHStyle(e){let t,n,{isRtl:r,options:o}=this.context,a=o.slotEventOverlap,s=e.levelCoord,i=e.levelCoord+e.thickness;a&&(i=Math.min(1,s+2*(i-s))),r?(t=1-i,n=s):(t=s,n=1-i);let l={zIndex:e.stackDepth+1,left:100*t+"%",right:100*n+"%"};return a&&!e.stackForward&&(l[r?"marginLeft":"marginRight"]=20),l}}function rz(e,{todayRange:t,nowDate:n,eventSelection:r,eventDrag:o,eventResize:a}){let s=(o?o.affectedInstances:null)||(a?a.affectedInstances:null)||{};return JT(eA,null,e.map((e=>{let o=e.eventRange.instance.instanceId;return JT("div",{key:o,style:{visibility:s[o]?"hidden":""}},JT(tz,Object.assign({seg:e,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:o===r,isShort:!1},fI(e,t,n))))})))}function oz(e){return e?{top:e.start,bottom:-e.end}:{top:"",bottom:""}}class az extends eO{constructor(){super(...arguments),this.splitFgEventSegs=sM($F),this.splitBgEventSegs=sM($F),this.splitBusinessHourSegs=sM($F),this.splitNowIndicatorSegs=sM($F),this.splitDateSelectionSegs=sM($F),this.splitEventDrag=sM(GF),this.splitEventResize=sM(GF),this.rootElRef={current:null},this.cellElRefs=new iP}render(){let{props:e,context:t}=this,n=t.options.nowIndicator&&e.slatCoords&&e.slatCoords.safeComputeTop(e.nowDate),r=e.cells.length,o=this.splitFgEventSegs(e.fgEventSegs,r),a=this.splitBgEventSegs(e.bgEventSegs,r),s=this.splitBusinessHourSegs(e.businessHourSegs,r),i=this.splitNowIndicatorSegs(e.nowIndicatorSegs,r),l=this.splitDateSelectionSegs(e.dateSelectionSegs,r),c=this.splitEventDrag(e.eventDrag,r),d=this.splitEventResize(e.eventResize,r);return JT("div",{className:"fc-timegrid-cols",ref:this.rootElRef},JT("table",{role:"presentation",style:{minWidth:e.tableMinWidth,width:e.clientWidth}},e.tableColGroupNode,JT("tbody",{role:"presentation"},JT("tr",{role:"row"},e.axis&&JT("td",{"aria-hidden":!0,className:"fc-timegrid-col fc-timegrid-axis"},JT("div",{className:"fc-timegrid-col-frame"},JT("div",{className:"fc-timegrid-now-indicator-container"},"number"==typeof n&&JT(xP,{elClasses:["fc-timegrid-now-indicator-arrow"],elStyle:{top:n},isAxis:!0,date:e.nowDate})))),e.cells.map(((t,n)=>JT(nz,{key:t.key,elRef:this.cellElRefs.createRef(t.key),dateProfile:e.dateProfile,date:t.date,nowDate:e.nowDate,todayRange:e.todayRange,extraRenderProps:t.extraRenderProps,extraDataAttrs:t.extraDataAttrs,extraClassNames:t.extraClassNames,extraDateSpan:t.extraDateSpan,fgEventSegs:o[n],bgEventSegs:a[n],businessHourSegs:s[n],nowIndicatorSegs:i[n],dateSelectionSegs:l[n],eventDrag:c[n],eventResize:d[n],slatCoords:e.slatCoords,eventSelection:e.eventSelection,forPrint:e.forPrint})))))))}componentDidMount(){this.updateCoords()}componentDidUpdate(){this.updateCoords()}updateCoords(){let{props:e}=this;var t;e.onColCoords&&null!==e.clientWidth&&e.onColCoords(new FI(this.rootElRef.current,(t=this.cellElRefs.currentMap,e.cells.map((e=>t[e.key]))),!0,!1))}}class sz extends HI{constructor(){super(...arguments),this.processSlotOptions=sM(iz),this.state={slatCoords:null},this.handleRootEl=e=>{e?this.context.registerInteractiveComponent(this,{el:e,isHitComboAllowed:this.props.isHitComboAllowed}):this.context.unregisterInteractiveComponent(this)},this.handleScrollRequest=e=>{let{onScrollTopRequest:t}=this.props,{slatCoords:n}=this.state;if(t&&n){if(e.time){let r=n.computeTimeTop(e.time);r=Math.ceil(r),r&&(r+=1),t(r)}return!0}return!1},this.handleColCoords=e=>{this.colCoords=e},this.handleSlatCoords=e=>{this.setState({slatCoords:e}),this.props.onSlatCoords&&this.props.onSlatCoords(e)}}render(){let{props:e,state:t}=this;return JT("div",{className:"fc-timegrid-body",ref:this.handleRootEl,style:{width:e.clientWidth,minWidth:e.tableMinWidth}},JT(UF,{axis:e.axis,dateProfile:e.dateProfile,slatMetas:e.slatMetas,clientWidth:e.clientWidth,minHeight:e.expandRows?e.clientHeight:"",tableMinWidth:e.tableMinWidth,tableColGroupNode:e.axis?e.tableColGroupNode:null,onCoords:this.handleSlatCoords}),JT(az,{cells:e.cells,axis:e.axis,dateProfile:e.dateProfile,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,todayRange:e.todayRange,nowDate:e.nowDate,nowIndicatorSegs:e.nowIndicatorSegs,clientWidth:e.clientWidth,tableMinWidth:e.tableMinWidth,tableColGroupNode:e.tableColGroupNode,slatCoords:t.slatCoords,onColCoords:this.handleColCoords,forPrint:e.forPrint}))}componentDidMount(){this.scrollResponder=this.context.createScrollResponder(this.handleScrollRequest)}componentDidUpdate(e){this.scrollResponder.update(e.dateProfile!==this.props.dateProfile)}componentWillUnmount(){this.scrollResponder.detach()}queryHit(e,t){let{dateEnv:n,options:r}=this.context,{colCoords:o}=this,{dateProfile:a}=this.props,{slatCoords:s}=this.state,{snapDuration:i,snapsPerSlot:l}=this.processSlotOptions(this.props.slotDuration,r.snapDuration),c=o.leftToIndex(e),d=s.positions.topToIndex(t);if(null!=c&&null!=d){let e=this.props.cells[c],r=s.positions.tops[d],u=s.positions.getHeight(d),f=(t-r)/u,h=d*l+Math.floor(f*l),m=this.props.cells[c].date,p=PR(a.slotMinTime,function(e,t){return{years:e.years*t,months:e.months*t,days:e.days*t,milliseconds:e.milliseconds*t}}(i,h)),g=n.add(m,p),v=n.add(g,i);return{dateProfile:a,dateSpan:Object.assign({range:{start:g,end:v},allDay:!1},e.extraDateSpan),dayEl:o.els[c],rect:{left:o.lefts[c],right:o.rights[c],top:r,bottom:r+u},layer:0}}return null}}function iz(e,t){let n=t||e,r=zR(e,n);return null===r&&(n=e,r=1),{snapDuration:n,snapsPerSlot:r}}class lz extends rP{sliceRange(e,t){let n=[];for(let r=0;r<t.length;r+=1){let o=hO(e,t[r]);o&&n.push({start:o.start,end:o.end,isStart:o.start.valueOf()===e.start.valueOf(),isEnd:o.end.valueOf()===e.end.valueOf(),col:r})}return n}}class cz extends HI{constructor(){super(...arguments),this.buildDayRanges=sM(dz),this.slicer=new lz,this.timeColsRef={current:null}}render(){let{props:e,context:t}=this,{dateProfile:n,dayTableModel:r}=e,{nowIndicator:o,nextDayThreshold:a}=t.options,s=this.buildDayRanges(r,n,t.dateEnv);return JT(_I,{unit:o?"minute":"day"},((i,l)=>JT(sz,Object.assign({ref:this.timeColsRef},this.slicer.sliceProps(e,n,null,t,s),{forPrint:e.forPrint,axis:e.axis,dateProfile:n,slatMetas:e.slatMetas,slotDuration:e.slotDuration,cells:r.cells[0],tableColGroupNode:e.tableColGroupNode,tableMinWidth:e.tableMinWidth,clientWidth:e.clientWidth,clientHeight:e.clientHeight,expandRows:e.expandRows,nowDate:i,nowIndicatorSegs:o&&this.slicer.sliceNowDate(i,n,a,t,s),todayRange:l,onScrollTopRequest:e.onScrollTopRequest,onSlatCoords:e.onSlatCoords}))))}}function dz(e,t,n){let r=[];for(let o of e.headerDates)r.push({start:n.add(o,t.slotMinTime),end:n.add(o,t.slotMaxTime)});return r}const uz=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}];function fz(e,t,n,r,o){let a=new Date(0),s=e,i=OR(0),l=n||function(e){let t,n,r;for(t=uz.length-1;t>=0;t-=1)if(n=OR(uz[t]),r=zR(n,e),null!==r&&r>1)return n;return e}(r),c=[];for(;FR(s)<FR(t);){let e=o.add(a,s),t=null!==zR(i,l);c.push({date:e,time:s,key:e.toISOString(),isoTimeStr:(d=e,NR(d.getUTCHours(),2)+":"+NR(d.getUTCMinutes(),2)+":"+NR(d.getUTCSeconds(),2)),isLabeled:t}),s=PR(s,r),i=PR(i,r)}var d;return c}function hz(e,t){let n=new tP(e.renderRange,t);return new nP(n,!1)}dR('.fc-v-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-v-event .fc-event-main{color:var(--fc-event-text-color);height:100%}.fc-v-event .fc-event-main-frame{display:flex;flex-direction:column;height:100%}.fc-v-event .fc-event-time{flex-grow:0;flex-shrink:0;max-height:100%;overflow:hidden}.fc-v-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-height:0}.fc-v-event .fc-event-title{bottom:0;max-height:100%;overflow:hidden;top:0}.fc-v-event:not(.fc-event-start){border-top-left-radius:0;border-top-right-radius:0;border-top-width:0}.fc-v-event:not(.fc-event-end){border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-width:0}.fc-v-event.fc-event-selected:before{left:-10px;right:-10px}.fc-v-event .fc-event-resizer-start{cursor:n-resize}.fc-v-event .fc-event-resizer-end{cursor:s-resize}.fc-v-event:not(.fc-event-selected) .fc-event-resizer{height:var(--fc-event-resizer-thickness);left:0;right:0}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-start{top:calc(var(--fc-event-resizer-thickness)/-2)}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-end{bottom:calc(var(--fc-event-resizer-thickness)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer{left:50%;margin-left:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer-start{top:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer-end{bottom:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc .fc-timegrid .fc-daygrid-body{z-index:2}.fc .fc-timegrid-divider{padding:0 0 2px}.fc .fc-timegrid-body{min-height:100%;position:relative;z-index:1}.fc .fc-timegrid-axis-chunk{position:relative}.fc .fc-timegrid-axis-chunk>table,.fc .fc-timegrid-slots{position:relative;z-index:1}.fc .fc-timegrid-slot{border-bottom:0;height:1.5em}.fc .fc-timegrid-slot:empty:before{content:"\\00a0"}.fc .fc-timegrid-slot-minor{border-top-style:dotted}.fc .fc-timegrid-slot-label-cushion{display:inline-block;white-space:nowrap}.fc .fc-timegrid-slot-label{vertical-align:middle}.fc .fc-timegrid-axis-cushion,.fc .fc-timegrid-slot-label-cushion{padding:0 4px}.fc .fc-timegrid-axis-frame-liquid{height:100%}.fc .fc-timegrid-axis-frame{align-items:center;display:flex;justify-content:flex-end;overflow:hidden}.fc .fc-timegrid-axis-cushion{flex-shrink:0;max-width:60px}.fc-direction-ltr .fc-timegrid-slot-label-frame{text-align:right}.fc-direction-rtl .fc-timegrid-slot-label-frame{text-align:left}.fc-liquid-hack .fc-timegrid-axis-frame-liquid{bottom:0;height:auto;left:0;position:absolute;right:0;top:0}.fc .fc-timegrid-col.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-timegrid-col-frame{min-height:100%;position:relative}.fc-media-screen.fc-liquid-hack .fc-timegrid-col-frame{bottom:0;height:auto;left:0;position:absolute;right:0;top:0}.fc-media-screen .fc-timegrid-cols{bottom:0;left:0;position:absolute;right:0;top:0}.fc-media-screen .fc-timegrid-cols>table{height:100%}.fc-media-screen .fc-timegrid-col-bg,.fc-media-screen .fc-timegrid-col-events,.fc-media-screen .fc-timegrid-now-indicator-container{left:0;position:absolute;right:0;top:0}.fc .fc-timegrid-col-bg{z-index:2}.fc .fc-timegrid-col-bg .fc-non-business{z-index:1}.fc .fc-timegrid-col-bg .fc-bg-event{z-index:2}.fc .fc-timegrid-col-bg .fc-highlight{z-index:3}.fc .fc-timegrid-bg-harness{left:0;position:absolute;right:0}.fc .fc-timegrid-col-events{z-index:3}.fc .fc-timegrid-now-indicator-container{bottom:0;overflow:hidden}.fc-direction-ltr .fc-timegrid-col-events{margin:0 2.5% 0 2px}.fc-direction-rtl .fc-timegrid-col-events{margin:0 2px 0 2.5%}.fc-timegrid-event-harness{position:absolute}.fc-timegrid-event-harness>.fc-timegrid-event{bottom:0;left:0;position:absolute;right:0;top:0}.fc-timegrid-event-harness-inset .fc-timegrid-event,.fc-timegrid-event.fc-event-mirror,.fc-timegrid-more-link{box-shadow:0 0 0 1px var(--fc-page-bg-color)}.fc-timegrid-event,.fc-timegrid-more-link{border-radius:3px;font-size:var(--fc-small-font-size)}.fc-timegrid-event{margin-bottom:1px}.fc-timegrid-event .fc-event-main{padding:1px 1px 0}.fc-timegrid-event .fc-event-time{font-size:var(--fc-small-font-size);margin-bottom:1px;white-space:nowrap}.fc-timegrid-event-short .fc-event-main-frame{flex-direction:row;overflow:hidden}.fc-timegrid-event-short .fc-event-time:after{content:"\\00a0-\\00a0"}.fc-timegrid-event-short .fc-event-title{font-size:var(--fc-small-font-size)}.fc-timegrid-more-link{background:var(--fc-more-link-bg-color);color:var(--fc-more-link-text-color);cursor:pointer;margin-bottom:1px;position:absolute;z-index:9999}.fc-timegrid-more-link-inner{padding:3px 2px;top:0}.fc-direction-ltr .fc-timegrid-more-link{right:0}.fc-direction-rtl .fc-timegrid-more-link{left:0}.fc .fc-timegrid-now-indicator-arrow,.fc .fc-timegrid-now-indicator-line{pointer-events:none}.fc .fc-timegrid-now-indicator-line{border-color:var(--fc-now-indicator-color);border-style:solid;border-width:1px 0 0;left:0;position:absolute;right:0;z-index:4}.fc .fc-timegrid-now-indicator-arrow{border-color:var(--fc-now-indicator-color);border-style:solid;margin-top:-5px;position:absolute;z-index:4}.fc-direction-ltr .fc-timegrid-now-indicator-arrow{border-bottom-color:transparent;border-top-color:transparent;border-width:5px 0 5px 6px;left:0}.fc-direction-rtl .fc-timegrid-now-indicator-arrow{border-bottom-color:transparent;border-top-color:transparent;border-width:5px 6px 5px 0;right:0}');var mz=GP({name:"@fullcalendar/timegrid",initialView:"timeGridWeek",optionRefiners:{allDaySlot:Boolean},views:{timeGrid:{component:class extends HF{constructor(){super(...arguments),this.buildTimeColsModel=sM(hz),this.buildSlatMetas=sM(fz)}render(){let{options:e,dateEnv:t,dateProfileGenerator:n}=this.context,{props:r}=this,{dateProfile:o}=r,a=this.buildTimeColsModel(o,n),s=this.allDaySplitter.splitProps(r),i=this.buildSlatMetas(o.slotMinTime,o.slotMaxTime,e.slotLabelInterval,e.slotDuration,t),{dayMinWidth:l}=e,c=!l,d=l,u=e.dayHeaders&&JT(XI,{dates:a.headerDates,dateProfile:o,datesRepDistinctDays:!0,renderIntro:c?this.renderHeadAxis:null}),f=!1!==e.allDaySlot&&(t=>JT(mF,Object.assign({},s.allDay,{dateProfile:o,dayTableModel:a,nextDayThreshold:e.nextDayThreshold,tableMinWidth:t.tableMinWidth,colGroupNode:t.tableColGroupNode,renderRowIntro:c?this.renderTableRowAxis:null,showWeekNumbers:!1,expandRows:!1,headerAlignElRef:this.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:r.forPrint},this.getAllDayMaxEventProps()))),h=t=>JT(cz,Object.assign({},s.timed,{dayTableModel:a,dateProfile:o,axis:c,slotDuration:e.slotDuration,slatMetas:i,forPrint:r.forPrint,tableColGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,clientWidth:t.clientWidth,clientHeight:t.clientHeight,onSlatCoords:this.handleSlatCoords,expandRows:t.expandRows,onScrollTopRequest:this.handleScrollTopRequest}));return d?this.renderHScrollLayout(u,f,h,a.colCnt,l,i,this.state.slatCoords):this.renderSimpleLayout(u,f,h)}},usesMinMaxTime:!0,allDaySlot:!0,slotDuration:"00:30:00",slotEventOverlap:!0},timeGridDay:{type:"timeGrid",duration:{days:1}},timeGridWeek:{type:"timeGrid",duration:{weeks:1}}}});const pz=e=>{const{colors:t,attributes:n,setAttributes:r}=e;return(0,De.jsx)("div",{className:"color-block-support-panel__inner-wrapper",children:t.map((function(e,t){var o=e.default?e.default:void 0;return e.label?(0,De.jsx)(aD.__experimentalToolsPanelItem,{hasValue:()=>n[e.value]!=o,label:e.label,onDeselect:()=>r({[e.value]:o}),isShownByDefault:!0,className:`block-editor-tools-panel-color-gradient-settings__item ${0==t&&"first"}`,children:(0,De.jsx)(aD.Dropdown,{className:"block-editor-tools-panel-color-gradient-settings__dropdown",contentClassName:"my-popover-content-classname",popoverProps:{placement:"left-start",offset:36},renderToggle:({isOpen:t,onToggle:r})=>(0,De.jsx)(aD.Button,{onClick:r,"aria-expanded":t,className:t?"block-editor-panel-color-gradient-settings__dropdown is-open":"block-editor-panel-color-gradient-settings__dropdown",children:(0,De.jsxs)(aD.__experimentalHStack,{justify:"flex-start",children:[(0,De.jsx)(aD.ColorIndicator,{className:"block-editor-panel-color-gradient-settings__color-indicator",colorValue:n[e.value]}),(0,De.jsx)(aD.FlexItem,{children:e.label})]})}),renderContent:()=>(0,De.jsx)("div",{className:"components-dropdown-content-wrapper",children:(0,De.jsxs)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content",children:[(0,De.jsx)(aD.ColorPicker,{color:n[e.value]?n[e.value]:"",onChange:t=>r({[e.value]:t})}),n[e.value]&&(0,De.jsx)(aD.Button,{variant:"link",className:"ng-clear-color",onClick:()=>{e.required?r({[e.value]:""}):r({[e.value]:void 0})},children:(0,Ms.__)("Clear","newsletter-glue")})]})})})},`panelItem-${t}`):null}))})};var gz=o(106);const vz=t=>{const[n,r]=(0,e.useState)([]),{attributes:o,setAttributes:a,calendar:s,setView:i}=t,l=o?.startday?o.startday:s?.startday,c=o?.timeframe?o.timeframe:s?.timeframe,d=[{value:"color",label:(0,Ms.__)("Accent","eventkoi")}];return(0,e.useEffect)((()=>{(async()=>{await Ne()({path:`${eventkoi_params.api}/calendars`,method:"get"}).then((e=>{if(e){let t=[];e.map(((e,n)=>{t.push({label:e.name,value:e.id})})),r(t)}})).catch((e=>{}))})()}),[]),(0,e.useEffect)((()=>{n.length>0&&(!o.calendars||0===o.calendars.length)&&a({calendars:[Number(eventkoi_params.default_cal)]})}),[n,o.calendars]),(0,De.jsxs)(De.Fragment,{children:[(0,De.jsxs)(aD.PanelBody,{title:(0,Ms.__)("Display options","eventkoi"),initialOpen:!0,children:[n&&n.length>0&&(0,De.jsx)(gz.MultiSelectControl,{label:(0,Ms.__)("Select calendar(s)","eventkoi"),value:o.calendars||[],options:n,onChange:e=>{a({calendars:e})},__nextHasNoMarginBottom:!0}),(0,De.jsxs)(aD.__experimentalToggleGroupControl,{label:(0,Ms.__)("Timeframe defaults to","eventkoi"),value:c,isBlock:!0,onChange:e=>{a({timeframe:e}),i("week"===e?"timeGridWeek":"dayGridMonth")},__nextHasNoMarginBottom:!0,children:[(0,De.jsx)(aD.__experimentalToggleGroupControlOption,{value:"month",label:"Month"}),(0,De.jsx)(aD.__experimentalToggleGroupControlOption,{value:"week",label:"Week"})]}),(0,De.jsx)(aD.SelectControl,{label:(0,Ms.__)("Default month to display","eventkoi"),value:o.default_month||"",options:[{label:(0,Ms.__)("Current month","eventkoi"),value:""},{label:(0,Ms.__)("January","eventkoi"),value:"january"},{label:(0,Ms.__)("February","eventkoi"),value:"february"},{label:(0,Ms.__)("March","eventkoi"),value:"march"},{label:(0,Ms.__)("April","eventkoi"),value:"april"},{label:(0,Ms.__)("May","eventkoi"),value:"may"},{label:(0,Ms.__)("June","eventkoi"),value:"june"},{label:(0,Ms.__)("July","eventkoi"),value:"july"},{label:(0,Ms.__)("August","eventkoi"),value:"august"},{label:(0,Ms.__)("September","eventkoi"),value:"september"},{label:(0,Ms.__)("October","eventkoi"),value:"october"},{label:(0,Ms.__)("November","eventkoi"),value:"november"},{label:(0,Ms.__)("December","eventkoi"),value:"december"}],onChange:e=>a({default_month:e}),__nextHasNoMarginBottom:!0}),(0,De.jsx)(aD.SelectControl,{label:(0,Ms.__)("Default year to display","eventkoi"),value:o.default_year||"",options:[{label:(0,Ms.__)("Current year","eventkoi"),value:""},...Array.from({length:10},((e,t)=>{const n=(new Date).getFullYear()+t+1;return{label:String(n),value:String(n)}}))],onChange:e=>a({default_year:e}),__nextHasNoMarginBottom:!0}),(0,De.jsx)(aD.SelectControl,{label:(0,Ms.__)("Week starts on","eventkoi"),value:l,options:[{label:"Monday",value:"monday"},{label:"Tuesday",value:"tuesday"},{label:"Wednesday",value:"wednesday"},{label:"Thursday",value:"thursday"},{label:"Friday",value:"friday"},{label:"Saturday",value:"saturday"},{label:"Sunday",value:"sunday"}],onChange:e=>a({startday:e}),__nextHasNoMarginBottom:!0})]}),(0,De.jsx)(aD.__experimentalToolsPanel,{label:(0,Ms.__)("Colors"),resetAll:()=>{a({color:void 0})},hasInnerWrapper:!0,className:"color-block-support-panel",children:(0,De.jsx)(pz,{attributes:o,setAttributes:a,colors:d})})]})},yz={sunday:0,monday:1,tuesday:2,wednesday:3,thursday:4,friday:5,saturday:6},bz=(("undefined"!=typeof window&&window.eventkoi_params?window.eventkoi_params.locale:"en")||"").split("_")[0]||"en",xz=GT.some((e=>e.code===bz));let wz=xz?bz:"en";try{new Intl.DateTimeFormat(wz)}catch{wz="en"}(0,MD.registerBlockType)("eventkoi/calendar",{apiVersion:2,title:(0,Ms.__)("EK Events Calendar","eventkoi"),category:"eventkoi-blocks",icon:function({width:e="16.918",height:t="21.89"}){return(0,De.jsx)(Di.SVG,{xmlns:"http://www.w3.org/2000/svg",width:e,height:t,viewBox:"0 0 16.918 21.89",children:(0,De.jsxs)("g",{transform:"translate(0 -13.696)",children:[(0,De.jsx)("g",{transform:"translate(0 13.696)",children:(0,De.jsx)(Di.Path,{d:"M6.19-72.725A3.818,3.818,0,0,0,4.837-75.38a3.359,3.359,0,0,0-2.484-.876A1.885,1.885,0,0,0,.611-74.9a1.612,1.612,0,0,0-.092,1.06,6.23,6.23,0,0,0,.518,1.178,8.55,8.55,0,0,1,.4.832,4.387,4.387,0,0,1,.224.775,7.582,7.582,0,0,0,.984,2.5,4.542,4.542,0,0,0,1.52,1.613,1.022,1.022,0,0,0,1.363-.107q.563-.391.693-2.332A18.33,18.33,0,0,0,6.19-72.725Zm-.09,7.2q-1.034,0-1.242,2.7a18.162,18.162,0,0,0,.413,5.442q.622,2.739,1.677,2.878,2.3.313,2.729-2.422a10.636,10.636,0,0,0-.736-5.668Q7.773-65.521,6.1-65.521Zm2.05-1.52a.88.88,0,0,0,.941.487,2.49,2.49,0,0,0,1.12-.657q.583-.539,1.389-1.4.481-.627.9-1.091a5.462,5.462,0,0,1,.805-.754,4.378,4.378,0,0,0,2.051-2.931,2.483,2.483,0,0,0-.917-2.533,2.674,2.674,0,0,0-2.914-.028A5.715,5.715,0,0,0,9.343-73.55,12.509,12.509,0,0,0,7.9-69.78,3.422,3.422,0,0,0,8.149-67.041Z",transform:"translate(-0.467 76.356)"})}),(0,De.jsx)("g",{transform:"translate(7.301 20.061)",children:(0,De.jsx)(Di.Path,{d:"M34.564-32.511a2.816,2.816,0,0,0-.269,1.24,1.461,1.461,0,0,0,.269.913c.535.852.818,1.139,1.1,1.59a15.006,15.006,0,0,0,3.8,4.125q2.223,1.635,3.58.774a1.555,1.555,0,0,0,.865-1.448,3.235,3.235,0,0,0-.619-1.622A17.131,17.131,0,0,0,41.85-28.67l-.332-.386a20.805,20.805,0,0,0-2.5-2.265,10.6,10.6,0,0,0-2.8-1.656Q34.936-33.447,34.564-32.511Z",transform:"translate(-34.295 33.134)"})})]})})},example:{attributes:{}},description:(0,Ms.__)("Add an EventKoi calendar.","newsletter-glue"),keywords:["eventkoi","events"],attributes:{calendars:{type:"array"},startday:{type:"string"},timeframe:{type:"string"},default_month:{type:"string",default:""},default_year:{type:"string",default:""},color:{type:"string"}},supports:{layout:{type:"constrained",allowJustification:!1,allowWide:!1}},edit:function({attributes:t,setAttributes:n,className:r,isSelected:o,clientId:a}){(0,e.useEffect)((()=>{o?document.body.classList.add("eventkoi-active"):document.body.classList.remove("eventkoi-active")}),[o]);const s="calendar",i=t?.timeframe||"month",[l,c]=(0,e.useState)(null),[d,u]=(0,e.useState)(Rs(t)),[f,h]=(0,e.useState)(""),[m,p]=(0,e.useState)(null),[g,v]=(0,e.useState)(null),[y,b]=(0,e.useState)(!1),[x,w]=(0,e.useState)(Rs(t)),k=(0,e.useRef)(null),S=new URLSearchParams(window.location.search).get("tz"),[C,_]=(0,e.useState)("24"===eventkoi_params?.time_format?"24":"12"),j=S||eventkoi_params?.timezone_override||eventkoi_params?.timezone||"UTC",[E,N]=(0,e.useState)(As(j)),D=(0,e.useRef)(null),T=(0,e.useRef)(!1),A=(0,e.useRef)(null),R=(0,e.useRef)(null),{layout:M}=t,O=(0,RT.useBlockProps)({className:"eventkoi-admin",style:{marginLeft:"auto",marginRight:"auto"}}),[I,P]=(0,e.useState)({}),[L,F]=(0,e.useState)([]),[z,H]=(0,e.useState)([]),[V,B]=(0,e.useState)(),W=t.calendars&&t.calendars.length>0?t.calendars.map(String).join(","):null;let U=t.calendar_id;U||(U=eventkoi_params.default_cal),W&&(U=W);const $=async(e,t,n=U)=>{try{b(!0);const r=new URLSearchParams({id:n,display:s});e&&r.set("start",e.toISOString()),t&&r.set("end",t.toISOString());const o=`${eventkoi_params.api}/calendar_events?${r.toString()}`,a=await Ne()({path:o,method:"get"});F(a.events),P(a.calendar)}catch(e){console.error("Failed to load events",e)}finally{b(!1)}};(0,e.useEffect)((()=>{const e=Rs(t);l?(l.gotoDate(e),u(new Date(e))):w(e)}),[t.default_year,t.default_month]),(0,e.useEffect)((()=>{(async()=>{W&&(U=W);try{const e=await Ne()({path:`${eventkoi_params.api}/calendar_events?id=${U}&display=${s}&initial=true`,method:"get"});P(e.calendar);const t="week"===i||"week"===e.calendar.timeframe?"timeGridWeek":"dayGridMonth";B(t)}catch(e){console.error("Failed to load calendar info",e)}})(),(async()=>{try{const e=new URLSearchParams({id:U,display:s}),t=await Ne()({path:`${eventkoi_params.api}/calendar_events?${e.toString()}`,method:"get"});H(t.events)}catch(e){console.error("Failed to load all events",e)}})()}),[U]),(0,e.useEffect)((()=>{if(!l)return;const{activeStart:e,activeEnd:t}=l.view;k.current=null,$(e,t,U)}),[U,l]),(0,e.useEffect)((()=>{if(D.current&&V){const e=D.current.getApi();e.changeView(V),c(e);const{activeStart:t,activeEnd:n}=e.view,r=`${t.toISOString()}_${n.toISOString()}`;k.current||(k.current=r,$(t,n))}}),[V]),(0,e.useEffect)((()=>{document.body.style.position="relative"}),[]),(0,e.useEffect)((()=>{function e(e){if(T.current)return void(T.current=!1);const t=e.target.closest("[data-event-popover]"),n=e.target.closest("[data-radix-popper-content-wrapper]"),r="true"===document.body.getAttribute("data-calendar-menu-open"),o="true"===document.body.getAttribute("data-share-modal-open");t||n||o||r||(p(null),v(null))}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[]),(0,e.useEffect)((()=>{if(!l||!d)return;const e=setInterval((()=>{const t=document.querySelector(".fc-today-button");if(t&&!document.getElementById("eventkoi-month-portal")){const n=document.createElement("div");n.id="eventkoi-month-portal",n.className="flex m-0",t.parentNode.insertBefore(n,t),R.current=n,A.current=createRoot(n),A.current.render((0,De.jsx)(CalendarHeaderPopover,{calendarApi:l,currentDate:d,setCurrentDate:u})),clearInterval(e)}}),100);return()=>clearInterval(e)}),[l]);const G=t?.startday?t.startday:I?.startday,Y=t?.color?t.color:eventkoi_params.default_color,q={hour:"24"===C?"2-digit":"numeric",minute:"2-digit",hour12:"24"!==C,..."24"!==C&&{omitZeroMinute:!0,meridiem:"short"}};return(0,De.jsxs)("div",{...O,children:[(0,De.jsx)(RT.InspectorControls,{children:(0,De.jsx)(vz,{calendar:I,attributes:t,setAttributes:n,className:r,isSelected:o,clientId:a,setView:B})}),(0,De.jsx)("div",{id:"dayGridMonth"===V?"month":"timeGridWeek"===V?"week":"day",children:(0,De.jsxs)("div",{className:"relative",children:[(0,De.jsx)(gT,{calendarApi:l,currentDate:d,setCurrentDate:u,view:V,setView:B,search:f,setSearch:h,events:z,timezone:E||void 0,timeFormat:C}),(0,De.jsx)("div",{className:"flex justify-start md:justify-end py-4 text-sm text-foreground",children:(0,De.jsx)(AT,{timezone:E,setTimezone:N,timeFormat:C,setTimeFormat:_})}),(0,De.jsx)(AF,{ref:D,locales:GT,locale:wz,plugins:[gF,mz,_F,DF],events:L,initialView:V,initialDate:x,weekends:!0,timeZone:E,firstDay:yz[G],eventColor:Y,headerToolbar:!1,contentHeight:"auto",expandRows:!0,height:"auto",eventTimeFormat:q,dayHeaderContent:e=>{const{date:t,view:n}=e,r=t.toLocaleDateString(wz,{weekday:"short"});if(n.type.startsWith("timeGrid")){const e=t.getDate();return(0,De.jsxs)("div",{className:"flex flex-col items-center leading-tight",children:[(0,De.jsx)("span",{children:r}),(0,De.jsx)("span",{className:"font-semibold text-base",children:e})]})}return(0,De.jsx)("span",{children:r})},datesSet:({start:e,end:t,view:n})=>{const r=`${e.toISOString()}_${t.toISOString()}`;k.current!==r&&(k.current=r,$(e,t,U),u(n.currentStart),A.current&&R.current&&A.current.render((0,De.jsx)(CalendarHeaderPopover,{calendarApi:l,currentDate:n.currentStart,setCurrentDate:u})))},eventClick:e=>{e.jsEvent.preventDefault(),e.jsEvent.stopPropagation();const t={...e.event.extendedProps,title:e.event.title,start:e.event.startStr,end:e.event.endStr,allDay:e.event.allDay,url:e.event.url},n=e.el;n&&(requestAnimationFrame((()=>{setTimeout((()=>{const e=document.querySelector(".fc").getBoundingClientRect(),t=n.getBoundingClientRect(),r=t.bottom-e.top+6;let o;o=t.right-e.left+370>e.width?t.right-e.left-370:t.left-e.left,window.innerWidth<768?v({x:0,y:r}):v({x:Math.max(0,o),y:r})}),0)})),p(t))}}),m&&g&&(0,De.jsx)(TT,{event:m,anchor:g,onClose:()=>{p(null),v(null)},ignoreNextOutsideClick:T,timezone:E||void 0})]})})]})},save:function(){return null}});var kz=function(){return kz=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},kz.apply(this,arguments)};function Sz(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var Cz=o(833),_z=o.n(Cz),jz="-ms-",Ez="-moz-",Nz="-webkit-",Dz="comm",Tz="rule",Az="decl",Rz="@keyframes",Mz=Math.abs,Oz=String.fromCharCode,Iz=Object.assign;function Pz(e){return e.trim()}function Lz(e,t){return(e=t.exec(e))?e[0]:e}function Fz(e,t,n){return e.replace(t,n)}function zz(e,t,n){return e.indexOf(t,n)}function Hz(e,t){return 0|e.charCodeAt(t)}function Vz(e,t,n){return e.slice(t,n)}function Bz(e){return e.length}function Wz(e){return e.length}function Uz(e,t){return t.push(e),e}function $z(e,t){return e.filter((function(e){return!Lz(e,t)}))}var Gz=1,Yz=1,qz=0,Zz=0,Kz=0,Qz="";function Jz(e,t,n,r,o,a,s,i){return{value:e,root:t,parent:n,type:r,props:o,children:a,line:Gz,column:Yz,length:s,return:"",siblings:i}}function Xz(e,t){return Iz(Jz("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function eH(e){for(;e.root;)e=Xz(e.root,{children:[e]});Uz(e,e.siblings)}function tH(){return Kz=Zz>0?Hz(Qz,--Zz):0,Yz--,10===Kz&&(Yz=1,Gz--),Kz}function nH(){return Kz=Zz<qz?Hz(Qz,Zz++):0,Yz++,10===Kz&&(Yz=1,Gz++),Kz}function rH(){return Hz(Qz,Zz)}function oH(){return Zz}function aH(e,t){return Vz(Qz,e,t)}function sH(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function iH(e){return Pz(aH(Zz-1,dH(91===e?e+2:40===e?e+1:e)))}function lH(e){for(;(Kz=rH())&&Kz<33;)nH();return sH(e)>2||sH(Kz)>3?"":" "}function cH(e,t){for(;--t&&nH()&&!(Kz<48||Kz>102||Kz>57&&Kz<65||Kz>70&&Kz<97););return aH(e,oH()+(t<6&&32==rH()&&32==nH()))}function dH(e){for(;nH();)switch(Kz){case e:return Zz;case 34:case 39:34!==e&&39!==e&&dH(Kz);break;case 40:41===e&&dH(e);break;case 92:nH()}return Zz}function uH(e,t){for(;nH()&&e+Kz!==57&&(e+Kz!==84||47!==rH()););return"/*"+aH(t,Zz-1)+"*"+Oz(47===e?e:nH())}function fH(e){for(;!sH(rH());)nH();return aH(e,Zz)}function hH(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function mH(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case Az:return e.return=e.return||e.value;case Dz:return"";case Rz:return e.return=e.value+"{"+hH(e.children,r)+"}";case Tz:if(!Bz(e.value=e.props.join(",")))return""}return Bz(n=hH(e.children,r))?e.return=e.value+"{"+n+"}":""}function pH(e,t,n){switch(function(e,t){return 45^Hz(e,0)?(((t<<2^Hz(e,0))<<2^Hz(e,1))<<2^Hz(e,2))<<2^Hz(e,3):0}(e,t)){case 5103:return Nz+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Nz+e+e;case 4789:return Ez+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Nz+e+Ez+e+jz+e+e;case 5936:switch(Hz(e,t+11)){case 114:return Nz+e+jz+Fz(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Nz+e+jz+Fz(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Nz+e+jz+Fz(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return Nz+e+jz+e+e;case 6165:return Nz+e+jz+"flex-"+e+e;case 5187:return Nz+e+Fz(e,/(\w+).+(:[^]+)/,Nz+"box-$1$2"+jz+"flex-$1$2")+e;case 5443:return Nz+e+jz+"flex-item-"+Fz(e,/flex-|-self/g,"")+(Lz(e,/flex-|baseline/)?"":jz+"grid-row-"+Fz(e,/flex-|-self/g,""))+e;case 4675:return Nz+e+jz+"flex-line-pack"+Fz(e,/align-content|flex-|-self/g,"")+e;case 5548:return Nz+e+jz+Fz(e,"shrink","negative")+e;case 5292:return Nz+e+jz+Fz(e,"basis","preferred-size")+e;case 6060:return Nz+"box-"+Fz(e,"-grow","")+Nz+e+jz+Fz(e,"grow","positive")+e;case 4554:return Nz+Fz(e,/([^-])(transform)/g,"$1"+Nz+"$2")+e;case 6187:return Fz(Fz(Fz(e,/(zoom-|grab)/,Nz+"$1"),/(image-set)/,Nz+"$1"),e,"")+e;case 5495:case 3959:return Fz(e,/(image-set\([^]*)/,Nz+"$1$`$1");case 4968:return Fz(Fz(e,/(.+:)(flex-)?(.*)/,Nz+"box-pack:$3"+jz+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Nz+e+e;case 4200:if(!Lz(e,/flex-|baseline/))return jz+"grid-column-align"+Vz(e,t)+e;break;case 2592:case 3360:return jz+Fz(e,"template-","")+e;case 4384:case 3616:return n&&n.some((function(e,n){return t=n,Lz(e.props,/grid-\w+-end/)}))?~zz(e+(n=n[t].value),"span",0)?e:jz+Fz(e,"-start","")+e+jz+"grid-row-span:"+(~zz(n,"span",0)?Lz(n,/\d+/):+Lz(n,/\d+/)-+Lz(e,/\d+/))+";":jz+Fz(e,"-start","")+e;case 4896:case 4128:return n&&n.some((function(e){return Lz(e.props,/grid-\w+-start/)}))?e:jz+Fz(Fz(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return Fz(e,/(.+)-inline(.+)/,Nz+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Bz(e)-1-t>6)switch(Hz(e,t+1)){case 109:if(45!==Hz(e,t+4))break;case 102:return Fz(e,/(.+:)(.+)-([^]+)/,"$1"+Nz+"$2-$3$1"+Ez+(108==Hz(e,t+3)?"$3":"$2-$3"))+e;case 115:return~zz(e,"stretch",0)?pH(Fz(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return Fz(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,(function(t,n,r,o,a,s,i){return jz+n+":"+r+i+(o?jz+n+"-span:"+(a?s:+s-+r)+i:"")+e}));case 4949:if(121===Hz(e,t+6))return Fz(e,":",":"+Nz)+e;break;case 6444:switch(Hz(e,45===Hz(e,14)?18:11)){case 120:return Fz(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+Nz+(45===Hz(e,14)?"inline-":"")+"box$3$1"+Nz+"$2$3$1"+jz+"$2box$3")+e;case 100:return Fz(e,":",":"+jz)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Fz(e,"scroll-","scroll-snap-")+e}return e}function gH(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Az:return void(e.return=pH(e.value,e.length,n));case Rz:return hH([Xz(e,{value:Fz(e.value,"@","@"+Nz)})],r);case Tz:if(e.length)return function(e,t){return e.map(t).join("")}(n=e.props,(function(t){switch(Lz(t,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":eH(Xz(e,{props:[Fz(t,/:(read-\w+)/,":-moz-$1")]})),eH(Xz(e,{props:[t]})),Iz(e,{props:$z(n,r)});break;case"::placeholder":eH(Xz(e,{props:[Fz(t,/:(plac\w+)/,":"+Nz+"input-$1")]})),eH(Xz(e,{props:[Fz(t,/:(plac\w+)/,":-moz-$1")]})),eH(Xz(e,{props:[Fz(t,/:(plac\w+)/,jz+"input-$1")]})),eH(Xz(e,{props:[t]})),Iz(e,{props:$z(n,r)})}return""}))}}function vH(e){return function(e){return Qz="",e}(yH("",null,null,null,[""],e=function(e){return Gz=Yz=1,qz=Bz(Qz=e),Zz=0,[]}(e),0,[0],e))}function yH(e,t,n,r,o,a,s,i,l){for(var c=0,d=0,u=s,f=0,h=0,m=0,p=1,g=1,v=1,y=0,b="",x=o,w=a,k=r,S=b;g;)switch(m=y,y=nH()){case 40:if(108!=m&&58==Hz(S,u-1)){-1!=zz(S+=Fz(iH(y),"&","&\f"),"&\f",Mz(c?i[c-1]:0))&&(v=-1);break}case 34:case 39:case 91:S+=iH(y);break;case 9:case 10:case 13:case 32:S+=lH(m);break;case 92:S+=cH(oH()-1,7);continue;case 47:switch(rH()){case 42:case 47:Uz(xH(uH(nH(),oH()),t,n,l),l);break;default:S+="/"}break;case 123*p:i[c++]=Bz(S)*v;case 125*p:case 59:case 0:switch(y){case 0:case 125:g=0;case 59+d:-1==v&&(S=Fz(S,/\f/g,"")),h>0&&Bz(S)-u&&Uz(h>32?wH(S+";",r,n,u-1,l):wH(Fz(S," ","")+";",r,n,u-2,l),l);break;case 59:S+=";";default:if(Uz(k=bH(S,t,n,c,d,o,i,b,x=[],w=[],u,a),a),123===y)if(0===d)yH(S,t,k,k,x,a,u,i,w);else switch(99===f&&110===Hz(S,3)?100:f){case 100:case 108:case 109:case 115:yH(e,k,k,r&&Uz(bH(e,k,k,0,0,o,i,b,o,x=[],u,w),w),o,w,u,i,r?x:w);break;default:yH(S,k,k,k,[""],w,0,i,w)}}c=d=h=0,p=v=1,b=S="",u=s;break;case 58:u=1+Bz(S),h=m;default:if(p<1)if(123==y)--p;else if(125==y&&0==p++&&125==tH())continue;switch(S+=Oz(y),y*p){case 38:v=d>0?1:(S+="\f",-1);break;case 44:i[c++]=(Bz(S)-1)*v,v=1;break;case 64:45===rH()&&(S+=iH(nH())),f=rH(),d=u=Bz(b=S+=fH(oH())),y++;break;case 45:45===m&&2==Bz(S)&&(p=0)}}return a}function bH(e,t,n,r,o,a,s,i,l,c,d,u){for(var f=o-1,h=0===o?a:[""],m=Wz(h),p=0,g=0,v=0;p<r;++p)for(var y=0,b=Vz(e,f+1,f=Mz(g=s[p])),x=e;y<m;++y)(x=Pz(g>0?h[y]+" "+b:Fz(b,/&\f/g,h[y])))&&(l[v++]=x);return Jz(e,t,n,0===o?Tz:i,l,c,d,u)}function xH(e,t,n,r){return Jz(e,t,n,Dz,Oz(Kz),Vz(e,2,-2),0,r)}function wH(e,t,n,r,o){return Jz(e,t,n,Az,Vz(e,0,r),Vz(e,r+1,-1),r,o)}var kH={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},SH="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",CH="active",_H="data-styled-version",jH="6.1.18",EH="/*!sc*/\n",NH="undefined"!=typeof window&&"undefined"!=typeof document,DH=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY&&"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY),TH=(new Set,Object.freeze([])),AH=Object.freeze({});var RH=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),MH=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,OH=/(^-|-$)/g;function IH(e){return e.replace(MH,"-").replace(OH,"")}var PH=/(a)(d)/gi,LH=function(e){return String.fromCharCode(e+(e>25?39:97))};function FH(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=LH(t%52)+n;return(LH(t%52)+n).replace(PH,"$1-$2")}var zH,HH=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},VH=function(e){return HH(5381,e)};function BH(e){return"string"==typeof e&&!0}var WH="function"==typeof Symbol&&Symbol.for,UH=WH?Symbol.for("react.memo"):60115,$H=WH?Symbol.for("react.forward_ref"):60112,GH={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},YH={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},qH={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},ZH=((zH={})[$H]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},zH[UH]=qH,zH);function KH(e){return("type"in(t=e)&&t.type.$$typeof)===UH?qH:"$$typeof"in e?ZH[e.$$typeof]:GH;var t}var QH=Object.defineProperty,JH=Object.getOwnPropertyNames,XH=Object.getOwnPropertySymbols,eV=Object.getOwnPropertyDescriptor,tV=Object.getPrototypeOf,nV=Object.prototype;function rV(e,t,n){if("string"!=typeof t){if(nV){var r=tV(t);r&&r!==nV&&rV(e,r,n)}var o=JH(t);XH&&(o=o.concat(XH(t)));for(var a=KH(e),s=KH(t),i=0;i<o.length;++i){var l=o[i];if(!(l in YH||n&&n[l]||s&&l in s||a&&l in a)){var c=eV(t,l);try{QH(e,l,c)}catch(e){}}}}return e}function oV(e){return"function"==typeof e}function aV(e){return"object"==typeof e&&"styledComponentId"in e}function sV(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function iV(e,t){if(0===e.length)return"";for(var n=e[0],r=1;r<e.length;r++)n+=t?t+e[r]:e[r];return n}function lV(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function cV(e,t,n){if(void 0===n&&(n=!1),!n&&!lV(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=cV(e[r],t[r]);else if(lV(t))for(var r in t)e[r]=cV(e[r],t[r]);return e}function dV(e,t){Object.defineProperty(e,"toString",{value:t})}function uV(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):""))}var fV=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)if((o<<=1)<0)throw uV(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var a=r;a<o;a++)this.groupSizes[a]=0}for(var s=this.indexOfGroup(e+1),i=(a=0,t.length);a<i;a++)this.tag.insertRule(s,t[a])&&(this.groupSizes[e]++,s++)},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,a=r;a<o;a++)t+="".concat(this.tag.getRule(a)).concat(EH);return t},e}(),hV=new Map,mV=new Map,pV=1,gV=function(e){if(hV.has(e))return hV.get(e);for(;mV.has(pV);)pV++;var t=pV++;return hV.set(e,t),mV.set(t,e),t},vV=function(e,t){pV=t+1,hV.set(e,t),mV.set(t,e)},yV="style[".concat(SH,"][").concat(_H,'="').concat(jH,'"]'),bV=new RegExp("^".concat(SH,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),xV=function(e,t,n){for(var r,o=n.split(","),a=0,s=o.length;a<s;a++)(r=o[a])&&e.registerName(t,r)},wV=function(e,t){for(var n,r=(null!==(n=t.textContent)&&void 0!==n?n:"").split(EH),o=[],a=0,s=r.length;a<s;a++){var i=r[a].trim();if(i){var l=i.match(bV);if(l){var c=0|parseInt(l[1],10),d=l[2];0!==c&&(vV(d,c),xV(e,d,l[3]),e.getTag().insertRules(c,o)),o.length=0}else o.push(i)}}},kV=function(e){for(var t=document.querySelectorAll(yV),n=0,r=t.length;n<r;n++){var o=t[n];o&&o.getAttribute(SH)!==CH&&(wV(e,o),o.parentNode&&o.parentNode.removeChild(o))}};function SV(){return o.nc}var CV=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){var t=Array.from(e.querySelectorAll("style[".concat(SH,"]")));return t[t.length-1]}(n),a=void 0!==o?o.nextSibling:null;r.setAttribute(SH,CH),r.setAttribute(_H,jH);var s=SV();return s&&r.setAttribute("nonce",s),n.insertBefore(r,a),r},_V=function(){function e(e){this.element=CV(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}throw uV(17)}(this.element),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""},e}(),jV=function(){function e(e){this.element=CV(e),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),EV=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),NV=NH,DV={isServer:!NH,useCSSOMInjection:!DH},TV=function(){function e(e,t,n){void 0===e&&(e=AH),void 0===t&&(t={});var r=this;this.options=kz(kz({},DV),e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&NH&&NV&&(NV=!1,kV(this)),dV(this,(function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=function(n){var o=function(e){return mV.get(e)}(n);if(void 0===o)return"continue";var a=e.names.get(o),s=t.getGroup(n);if(void 0===a||!a.size||0===s.length)return"continue";var i="".concat(SH,".g").concat(n,'[id="').concat(o,'"]'),l="";void 0!==a&&a.forEach((function(e){e.length>0&&(l+="".concat(e,","))})),r+="".concat(s).concat(i,'{content:"').concat(l,'"}').concat(EH)},a=0;a<n;a++)o(a);return r}(r)}))}return e.registerId=function(e){return gV(e)},e.prototype.rehydrate=function(){!this.server&&NH&&kV(this)},e.prototype.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(kz(kz({},this.options),t),this.gs,n&&this.names||void 0)},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.useCSSOMInjection,n=e.target;return e.isServer?new EV(n):t?new _V(n):new jV(n)}(this.options),new fV(e)));var e},e.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},e.prototype.registerName=function(e,t){if(gV(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},e.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(gV(e),n)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(gV(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e}(),AV=/&/g,RV=/^\s*\/\/.*$/gm;function MV(e,t){return e.map((function(e){return"rule"===e.type&&(e.value="".concat(t," ").concat(e.value),e.value=e.value.replaceAll(",",",".concat(t," ")),e.props=e.props.map((function(e){return"".concat(t," ").concat(e)}))),Array.isArray(e.children)&&"@keyframes"!==e.type&&(e.children=MV(e.children,t)),e}))}function OV(e){var t,n,r,o=void 0===e?AH:e,a=o.options,s=void 0===a?AH:a,i=o.plugins,l=void 0===i?TH:i,c=function(e,r,o){return o.startsWith(n)&&o.endsWith(n)&&o.replaceAll(n,"").length>0?".".concat(t):e},d=l.slice();d.push((function(e){e.type===Tz&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(AV,n).replace(r,c))})),s.prefix&&d.push(gH),d.push(mH);var u=function(e,o,a,i){void 0===o&&(o=""),void 0===a&&(a=""),void 0===i&&(i="&"),t=i,n=o,r=new RegExp("\\".concat(n,"\\b"),"g");var l=e.replace(RV,""),c=vH(a||o?"".concat(a," ").concat(o," { ").concat(l," }"):l);s.namespace&&(c=MV(c,s.namespace));var u,f,h,m=[];return hH(c,(u=d.concat((h=function(e){return m.push(e)},function(e){e.root||(e=e.return)&&h(e)})),f=Wz(u),function(e,t,n,r){for(var o="",a=0;a<f;a++)o+=u[a](e,t,n,r)||"";return o})),m};return u.hash=l.length?l.reduce((function(e,t){return t.name||uV(15),HH(e,t.name)}),5381).toString():"",u}var IV=new TV,PV=OV(),LV=r().createContext({shouldForwardProp:void 0,styleSheet:IV,stylis:PV}),FV=(LV.Consumer,r().createContext(void 0));function zV(){return(0,e.useContext)(LV)}function HV(t){var n=(0,e.useState)(t.stylisPlugins),o=n[0],a=n[1],s=zV().styleSheet,i=(0,e.useMemo)((function(){var e=s;return t.sheet?e=t.sheet:t.target&&(e=e.reconstructWithOptions({target:t.target},!1)),t.disableCSSOMInjection&&(e=e.reconstructWithOptions({useCSSOMInjection:!1})),e}),[t.disableCSSOMInjection,t.sheet,t.target,s]),l=(0,e.useMemo)((function(){return OV({options:{namespace:t.namespace,prefix:t.enableVendorPrefixes},plugins:o})}),[t.enableVendorPrefixes,t.namespace,o]);(0,e.useEffect)((function(){_z()(o,t.stylisPlugins)||a(t.stylisPlugins)}),[t.stylisPlugins]);var c=(0,e.useMemo)((function(){return{shouldForwardProp:t.shouldForwardProp,styleSheet:i,stylis:l}}),[t.shouldForwardProp,i,l]);return r().createElement(LV.Provider,{value:c},r().createElement(FV.Provider,{value:l},t.children))}var VV=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=PV);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t,dV(this,(function(){throw uV(12,String(n.name))}))}return e.prototype.getName=function(e){return void 0===e&&(e=PV),this.name+e.hash},e}(),BV=function(e){return e>="A"&&e<="Z"};function WV(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(1===n&&"-"===r&&"-"===e[0])return e;BV(r)?t+="-"+r.toLowerCase():t+=r}return t.startsWith("ms-")?"-"+t:t}var UV=function(e){return null==e||!1===e||""===e},$V=function(e){var t,n,r=[];for(var o in e){var a=e[o];e.hasOwnProperty(o)&&!UV(a)&&(Array.isArray(a)&&a.isCss||oV(a)?r.push("".concat(WV(o),":"),a,";"):lV(a)?r.push.apply(r,Sz(Sz(["".concat(o," {")],$V(a),!1),["}"],!1)):r.push("".concat(WV(o),": ").concat((t=o,null==(n=a)||"boolean"==typeof n||""===n?"":"number"!=typeof n||0===n||t in kH||t.startsWith("--")?String(n).trim():"".concat(n,"px")),";")))}return r};function GV(e,t,n,r){return UV(e)?[]:aV(e)?[".".concat(e.styledComponentId)]:oV(e)?!oV(o=e)||o.prototype&&o.prototype.isReactComponent||!t?[e]:GV(e(t),t,n,r):e instanceof VV?n?(e.inject(n,r),[e.getName(r)]):[e]:lV(e)?$V(e):Array.isArray(e)?Array.prototype.concat.apply(TH,e.map((function(e){return GV(e,t,n,r)}))):[e.toString()];var o}function YV(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(oV(n)&&!aV(n))return!1}return!0}var qV=VH(jH),ZV=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===n||n.isStatic)&&YV(e),this.componentId=t,this.baseHash=HH(qV,t),this.baseStyle=n,TV.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n):"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))r=sV(r,this.staticRulesId);else{var o=iV(GV(this.rules,e,t,n)),a=FH(HH(this.baseHash,o)>>>0);if(!t.hasNameForId(this.componentId,a)){var s=n(o,".".concat(a),void 0,this.componentId);t.insertRules(this.componentId,a,s)}r=sV(r,a),this.staticRulesId=a}else{for(var i=HH(this.baseHash,n.hash),l="",c=0;c<this.rules.length;c++){var d=this.rules[c];if("string"==typeof d)l+=d;else if(d){var u=iV(GV(d,e,t,n));i=HH(i,u+c),l+=u}}if(l){var f=FH(i>>>0);t.hasNameForId(this.componentId,f)||t.insertRules(this.componentId,f,n(l,".".concat(f),void 0,this.componentId)),r=sV(r,f)}}return r},e}(),KV=r().createContext(void 0);KV.Consumer;var QV={};function JV(t,n,o){var a=aV(t),s=t,i=!BH(t),l=n.attrs,c=void 0===l?TH:l,d=n.componentId,u=void 0===d?function(e,t){var n="string"!=typeof e?"sc":IH(e);QV[n]=(QV[n]||0)+1;var r="".concat(n,"-").concat(function(e){return FH(VH(e)>>>0)}(jH+n+QV[n]));return t?"".concat(t,"-").concat(r):r}(n.displayName,n.parentComponentId):d,f=n.displayName,h=void 0===f?function(e){return BH(e)?"styled.".concat(e):"Styled(".concat(function(e){return e.displayName||e.name||"Component"}(e),")")}(t):f,m=n.displayName&&n.componentId?"".concat(IH(n.displayName),"-").concat(n.componentId):n.componentId||u,p=a&&s.attrs?s.attrs.concat(c).filter(Boolean):c,g=n.shouldForwardProp;if(a&&s.shouldForwardProp){var v=s.shouldForwardProp;if(n.shouldForwardProp){var y=n.shouldForwardProp;g=function(e,t){return v(e,t)&&y(e,t)}}else g=v}var b=new ZV(o,m,a?s.componentStyle:void 0);function x(t,n){return function(t,n,o){var a=t.attrs,s=t.componentStyle,i=t.defaultProps,l=t.foldedComponentIds,c=t.styledComponentId,d=t.target,u=r().useContext(KV),f=zV(),h=t.shouldForwardProp||f.shouldForwardProp,m=function(e,t,n){return void 0===n&&(n=AH),e.theme!==n.theme&&e.theme||t||n.theme}(n,u,i)||AH,p=function(e,t,n){for(var r,o=kz(kz({},t),{className:void 0,theme:n}),a=0;a<e.length;a+=1){var s=oV(r=e[a])?r(o):r;for(var i in s)o[i]="className"===i?sV(o[i],s[i]):"style"===i?kz(kz({},o[i]),s[i]):s[i]}return t.className&&(o.className=sV(o.className,t.className)),o}(a,n,m),g=p.as||d,v={};for(var y in p)void 0===p[y]||"$"===y[0]||"as"===y||"theme"===y&&p.theme===m||("forwardedAs"===y?v.as=p.forwardedAs:h&&!h(y,g)||(v[y]=p[y]));var b=function(e,t){var n=zV();return e.generateAndInjectStyles(t,n.styleSheet,n.stylis)}(s,p),x=sV(l,c);return b&&(x+=" "+b),p.className&&(x+=" "+p.className),v[BH(g)&&!RH.has(g)?"class":"className"]=x,o&&(v.ref=o),(0,e.createElement)(g,v)}(w,t,n)}x.displayName=h;var w=r().forwardRef(x);return w.attrs=p,w.componentStyle=b,w.displayName=h,w.shouldForwardProp=g,w.foldedComponentIds=a?sV(s.foldedComponentIds,s.styledComponentId):"",w.styledComponentId=m,w.target=a?s.target:t,Object.defineProperty(w,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=a?function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0,o=t;r<o.length;r++)cV(e,o[r],!0);return e}({},s.defaultProps,e):e}}),dV(w,(function(){return".".concat(w.styledComponentId)})),i&&rV(w,t,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),w}function XV(e,t){for(var n=[e[0]],r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n}new Set;var eB=function(e){return Object.assign(e,{isCss:!0})};function tB(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(oV(e)||lV(e))return eB(GV(XV(TH,Sz([e],t,!0))));var r=e;return 0===t.length&&1===r.length&&"string"==typeof r[0]?GV(r):eB(GV(XV(r,t)))}function nB(e,t,n){if(void 0===n&&(n=AH),!t)throw uV(1,t);var r=function(r){for(var o=[],a=1;a<arguments.length;a++)o[a-1]=arguments[a];return e(t,n,tB.apply(void 0,Sz([r],o,!1)))};return r.attrs=function(r){return nB(e,t,kz(kz({},n),{attrs:Array.prototype.concat(n.attrs,r).filter(Boolean)}))},r.withConfig=function(r){return nB(e,t,kz(kz({},n),r))},r}var rB=function(e){return nB(JV,e)},oB=rB;function aB({children:e}){const t=oB.div`
    22    display: grid;
    33    gap: calc(16px);
  • eventkoi-lite/trunk/scripts/backend/build/tailwind.css

    r3381596 r3392960  
    1 *,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)):after,:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)):before{border:0 solid #e5e7eb;box-sizing:border-box}:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)):after,:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)):before{--tw-content:""}.eventkoi-admin:where(:not(.no-eventkoi,.no-eventkoi *)){line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}.eventkoi-admin:where(:not(.no-eventkoi,.no-eventkoi *)){line-height:inherit;margin:0}hr:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){border-top-width:1px;color:inherit;height:0}abbr:where([title]):where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),h2:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),h3:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),h4:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),h5:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),h6:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){font-size:inherit;font-weight:inherit}a:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){color:inherit;text-decoration:inherit}b:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),strong:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){font-weight:bolder}code:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),kbd:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),pre:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),samp:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){font-size:80%}sub:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),sup:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){bottom:-.25em}sup:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){top:-.5em}table:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){border-collapse:collapse;border-color:inherit;text-indent:0}button:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),input:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),optgroup:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),select:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),textarea:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),select:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){text-transform:none}button:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),input:where([type=button]):where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),input:where([type=reset]):where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),input:where([type=submit]):where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){outline:auto}:-moz-ui-invalid:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){box-shadow:none}progress:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){vertical-align:baseline}:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)) ::-webkit-inner-spin-button,:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)) ::-webkit-outer-spin-button{height:auto}[type=search]:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){-webkit-appearance:textfield;outline-offset:-2px}:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)) ::-webkit-search-decoration{-webkit-appearance:none}:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)) ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){display:list-item}blockquote:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),dd:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),dl:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),figure:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),h1:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),h2:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),h3:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),h4:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),h5:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),h6:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),hr:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),p:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),pre:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){margin:0}fieldset:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){margin:0;padding:0}legend:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){padding:0}menu:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),ol:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),ul:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){list-style:none;margin:0;padding:0}dialog:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){padding:0}textarea:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){resize:vertical}:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)) input::-moz-placeholder,:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)) textarea::-moz-placeholder{color:#9ca3af;opacity:1}:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)) input::placeholder,:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)) textarea::placeholder{color:#9ca3af;opacity:1}[role=button]:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),button:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){cursor:pointer}:disabled:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){cursor:default}audio:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),canvas:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),embed:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),iframe:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),img:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),object:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),svg:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),video:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){display:block;vertical-align:middle}img:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),video:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])):where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){display:none}:root{--background:0 0% 100%;--card:0 0% 100%;--popover:0 0% 100%;--destructive-foreground:0 0% 100%;--primary-foreground:0 0% 100%;--secondary:0 0% 96%;--muted:0 0% 96%;--accent:0 0% 96%;--primary:0 1% 22%;--foreground:0 1% 22%;--card-foreground:0 1% 22%;--popover-foreground:0 1% 22%;--secondary-foreground:0 1% 22%;--accent-foreground:0 1% 22%;--border:0 0% 92%;--input:0 0% 92%;--ring:0 0% 50%;--muted-foreground:0 0% 43%;--destructive:0 62% 53%;--radius:0.5rem;--warning:38 92% 50%;--warning-foreground:48 96% 89%;--success:158 48% 45%}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--muted));color:hsl(var(--foreground))}.container{margin-left:auto;margin-right:auto;padding-left:2rem;padding-right:2rem;width:100%}@media (min-width:1400px){.container{max-width:1400px}}.sr-only{height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;width:1px!important;clip:rect(0,0,0,0)!important;border-width:0!important;white-space:nowrap!important}.pointer-events-none{pointer-events:none!important}.pointer-events-auto{pointer-events:auto!important}.visible{visibility:visible!important}.invisible{visibility:hidden!important}.collapse{visibility:collapse!important}.fixed{position:fixed!important}.absolute{position:absolute!important}.relative{position:relative!important}.sticky{position:sticky!important}.inset-0{inset:0!important}.inset-x-0{left:0!important;right:0!important}.inset-y-0{bottom:0!important;top:0!important}.-bottom-12{bottom:-3rem!important}.-left-12{left:-3rem!important}.-right-12{right:-3rem!important}.-right-2\.5{right:-.625rem!important}.-top-12{top:-3rem!important}.bottom-0{bottom:0!important}.left-0{left:0!important}.left-1{left:.25rem!important}.left-1\/2{left:50%!important}.left-2{left:.5rem!important}.left-2\.5{left:.625rem!important}.left-3{left:.75rem!important}.left-4{left:1rem!important}.left-\[0px\]{left:0!important}.left-\[50\%\]{left:50%!important}.right-0{right:0!important}.right-1{right:.25rem!important}.right-2{right:.5rem!important}.right-4{right:1rem!important}.right-\[4px\]{right:4px!important}.right-\[5px\]{right:5px!important}.right-\[9px\]{right:9px!important}.top-0{top:0!important}.top-1{top:.25rem!important}.top-1\/2{top:50%!important}.top-12{top:3rem!important}.top-2{top:.5rem!important}.top-3{top:.75rem!important}.top-4{top:1rem!important}.top-8{top:2rem!important}.top-\[0px\]{top:0!important}.top-\[1px\]{top:1px!important}.top-\[3px\]{top:3px!important}.top-\[4px\]{top:4px!important}.top-\[50\%\]{top:50%!important}.top-\[60\%\]{top:60%!important}.top-\[9px\]{top:9px!important}.top-full{top:100%!important}.z-10{z-index:10!important}.z-50{z-index:50!important}.z-\[100000\]{z-index:100000!important}.z-\[100\]{z-index:100!important}.z-\[1\]{z-index:1!important}.z-\[500\]{z-index:500!important}.z-\[510000\]{z-index:510000!important}.z-\[900\]{z-index:900!important}.col-span-3{grid-column:span 3/span 3!important}.\!m-0,.m-0{margin:0!important}.-mx-1{margin-left:-.25rem!important;margin-right:-.25rem!important}.mx-auto{margin-left:auto!important;margin-right:auto!important}.my-1{margin-bottom:.25rem!important;margin-top:.25rem!important}.my-8{margin-bottom:2rem!important;margin-top:2rem!important}.-ml-4{margin-left:-1rem!important}.-mt-4{margin-top:-1rem!important}.-mt-6{margin-top:-1.5rem!important}.mb-0{margin-bottom:0!important}.mb-1{margin-bottom:.25rem!important}.mb-2{margin-bottom:.5rem!important}.mb-3{margin-bottom:.75rem!important}.mb-4{margin-bottom:1rem!important}.mb-6{margin-bottom:1.5rem!important}.mb-8{margin-bottom:2rem!important}.ml-0{margin-left:0!important}.ml-1{margin-left:.25rem!important}.ml-2{margin-left:.5rem!important}.ml-3{margin-left:.75rem!important}.ml-4{margin-left:1rem!important}.ml-auto{margin-left:auto!important}.mr-1{margin-right:.25rem!important}.mr-2{margin-right:.5rem!important}.mr-4{margin-right:1rem!important}.mr-6{margin-right:1.5rem!important}.ms-2{margin-inline-start:.5rem!important}.mt-0\.5{margin-top:.125rem!important}.mt-1{margin-top:.25rem!important}.mt-1\.5{margin-top:.375rem!important}.mt-2{margin-top:.5rem!important}.mt-24{margin-top:6rem!important}.mt-4{margin-top:1rem!important}.mt-6{margin-top:1.5rem!important}.mt-\[2px\]{margin-top:2px!important}.mt-\[4px\]{margin-top:4px!important}.mt-auto{margin-top:auto!important}.box-border{box-sizing:border-box!important}.line-clamp-2{-webkit-line-clamp:2!important}.line-clamp-2,.line-clamp-3{display:-webkit-box!important;overflow:hidden!important;-webkit-box-orient:vertical!important}.line-clamp-3{-webkit-line-clamp:3!important}.block{display:block!important}.inline-block{display:inline-block!important}.inline{display:inline!important}.flex{display:flex!important}.inline-flex{display:inline-flex!important}.\!table,.table{display:table!important}.grid{display:grid!important}.contents{display:contents!important}.hidden{display:none!important}.aspect-square{aspect-ratio:1/1!important}.size-12{height:3rem!important;width:3rem!important}.size-6{height:1.5rem!important;width:1.5rem!important}.size-8{height:2rem!important;width:2rem!important}.h-1\.5{height:.375rem!important}.h-10{height:2.5rem!important}.h-11{height:2.75rem!important}.h-12{height:3rem!important}.h-16{height:4rem!important}.h-2{height:.5rem!important}.h-2\.5{height:.625rem!important}.h-20{height:5rem!important}.h-3{height:.75rem!important}.h-3\.5{height:.875rem!important}.h-4{height:1rem!important}.h-40{height:10rem!important}.h-5{height:1.25rem!important}.h-6{height:1.5rem!important}.h-7{height:1.75rem!important}.h-8{height:2rem!important}.h-9{height:2.25rem!important}.h-\[1px\]{height:1px!important}.h-\[70px\]{height:70px!important}.h-\[var\(--radix-navigation-menu-viewport-height\)\]{height:var(--radix-navigation-menu-viewport-height)!important}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)!important}.h-auto{height:auto!important}.h-full{height:100%!important}.h-px{height:1px!important}.max-h-48{max-height:12rem!important}.max-h-60{max-height:15rem!important}.max-h-96{max-height:24rem!important}.max-h-\[--radix-popover-content-available-height\]{max-height:var(--radix-popover-content-available-height)!important}.max-h-\[300px\]{max-height:300px!important}.max-h-\[400px\]{max-height:400px!important}.max-h-screen{max-height:100vh!important}.min-h-0{min-height:0!important}.min-h-6{min-height:1.5rem!important}.min-h-\[250px\]{min-height:250px!important}.min-h-\[66px\]{min-height:66px!important}.min-h-\[80px\]{min-height:80px!important}.min-h-\[calc\(100vh-46px\)\]{min-height:calc(100vh - 46px)!important}.w-10{width:2.5rem!important}.w-16{width:4rem!important}.w-2{width:.5rem!important}.w-2\.5{width:.625rem!important}.w-20{width:5rem!important}.w-3{width:.75rem!important}.w-3\.5{width:.875rem!important}.w-3\/4{width:75%!important}.w-32{width:8rem!important}.w-4{width:1rem!important}.w-40{width:10rem!important}.w-44{width:11rem!important}.w-48{width:12rem!important}.w-5{width:1.25rem!important}.w-56{width:14rem!important}.w-6{width:1.5rem!important}.w-60{width:15rem!important}.w-64{width:16rem!important}.w-7{width:1.75rem!important}.w-72{width:18rem!important}.w-8{width:2rem!important}.w-9{width:2.25rem!important}.w-\[--radix-popover-trigger-width\]{width:var(--radix-popover-trigger-width)!important}.w-\[100px\]{width:100px!important}.w-\[116px\]{width:116px!important}.w-\[15\%\]{width:15%!important}.w-\[150px\]{width:150px!important}.w-\[180px\]{width:180px!important}.w-\[1px\]{width:1px!important}.w-\[220px\]{width:220px!important}.w-\[240px\]{width:240px!important}.w-\[250px\]{width:250px!important}.w-\[260px\]{width:260px!important}.w-\[280px\]{width:280px!important}.w-\[30\%\]{width:30%!important}.w-\[350px\]{width:350px!important}.w-\[36px\]{width:36px!important}.w-\[370px\]{width:370px!important}.w-\[40\%\]{width:40%!important}.w-\[48px\]{width:48px!important}.w-\[50px\]{width:50px!important}.w-\[60\%\]{width:60%!important}.w-\[70px\]{width:70px!important}.w-\[8\%\]{width:8%!important}.w-\[80\%\]{width:80%!important}.w-\[90px\]{width:90px!important}.w-auto{width:auto!important}.w-fit{width:-moz-fit-content!important;width:fit-content!important}.w-full{width:100%!important}.w-max{width:-moz-max-content!important;width:max-content!important}.w-px{width:1px!important}.min-w-0{min-width:0!important}.min-w-4{min-width:1rem!important}.min-w-5{min-width:1.25rem!important}.min-w-\[12rem\]{min-width:12rem!important}.min-w-\[140px\]{min-width:140px!important}.min-w-\[170px\]{min-width:170px!important}.min-w-\[200px\]{min-width:200px!important}.min-w-\[260px\]{min-width:260px!important}.min-w-\[82px\]{min-width:82px!important}.min-w-\[8rem\]{min-width:8rem!important}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)!important}.max-w-2xl{max-width:42rem!important}.max-w-\[1180px\]{max-width:1180px!important}.max-w-\[1280px\]{max-width:1280px!important}.max-w-\[220px\]{max-width:220px!important}.max-w-\[250px\]{max-width:250px!important}.max-w-\[260px\]{max-width:260px!important}.max-w-\[280px\]{max-width:280px!important}.max-w-\[422px\]{max-width:422px!important}.max-w-\[450px\]{max-width:450px!important}.max-w-\[685px\]{max-width:685px!important}.max-w-\[800px\]{max-width:800px!important}.max-w-full{max-width:100%!important}.max-w-lg{max-width:32rem!important}.max-w-max{max-width:-moz-max-content!important;max-width:max-content!important}.max-w-md{max-width:28rem!important}.flex-1{flex:1 1 0%!important}.flex-shrink-0,.shrink-0{flex-shrink:0!important}.grow{flex-grow:1!important}.grow-0{flex-grow:0!important}.basis-full{flex-basis:100%!important}.caption-bottom{caption-side:bottom!important}.border-collapse{border-collapse:collapse!important}.-translate-x-1\/2{--tw-translate-x:-50%!important}.-translate-x-1\/2,.-translate-y-1\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-translate-y-1\/2{--tw-translate-y:-50%!important}.translate-x-\[-50\%\]{--tw-translate-x:-50%!important}.translate-x-\[-50\%\],.translate-y-\[-50\%\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.translate-y-\[-50\%\]{--tw-translate-y:-50%!important}.rotate-45{--tw-rotate:45deg!important}.rotate-45,.rotate-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-90{--tw-rotate:90deg!important}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite!important}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite!important}.cursor-default{cursor:default!important}.cursor-not-allowed{cursor:not-allowed!important}.cursor-pointer{cursor:pointer!important}.touch-none{touch-action:none!important}.select-none{-webkit-user-select:none!important;-moz-user-select:none!important;user-select:none!important}.resize-none{resize:none!important}.resize{resize:both!important}.scroll-m-20{scroll-margin:5rem!important}.list-decimal{list-style-type:decimal!important}.list-none{list-style-type:none!important}.appearance-none{-webkit-appearance:none!important;-moz-appearance:none!important;appearance:none!important}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))!important}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))!important}.flex-row{flex-direction:row!important}.flex-col{flex-direction:column!important}.flex-col-reverse{flex-direction:column-reverse!important}.flex-wrap{flex-wrap:wrap!important}.items-start{align-items:flex-start!important}.items-end{align-items:flex-end!important}.items-center{align-items:center!important}.justify-start{justify-content:flex-start!important}.justify-end{justify-content:flex-end!important}.justify-center{justify-content:center!important}.justify-between{justify-content:space-between!important}.gap-1{gap:.25rem!important}.gap-1\.5{gap:.375rem!important}.gap-10{gap:2.5rem!important}.gap-2{gap:.5rem!important}.gap-3{gap:.75rem!important}.gap-4{gap:1rem!important}.gap-6{gap:1.5rem!important}.gap-8{gap:2rem!important}.gap-\[10px\]{gap:10px!important}.gap-\[1px\]{gap:1px!important}.gap-\[2px\]{gap:2px!important}.gap-\[6px\]{gap:6px!important}.gap-x-1{-moz-column-gap:.25rem!important;column-gap:.25rem!important}.gap-x-4{-moz-column-gap:1rem!important;column-gap:1rem!important}.gap-x-8{-moz-column-gap:2rem!important;column-gap:2rem!important}.gap-y-1{row-gap:.25rem!important}.gap-y-2{row-gap:.5rem!important}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0!important;margin-left:calc(.25rem*(1 - var(--tw-space-x-reverse)))!important;margin-right:calc(.25rem*var(--tw-space-x-reverse))!important}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0!important;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)))!important;margin-right:calc(.5rem*var(--tw-space-x-reverse))!important}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0!important;margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)))!important;margin-right:calc(1rem*var(--tw-space-x-reverse))!important}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0!important;margin-bottom:calc(.25rem*var(--tw-space-y-reverse))!important;margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)))!important}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0!important;margin-bottom:calc(.375rem*var(--tw-space-y-reverse))!important;margin-top:calc(.375rem*(1 - var(--tw-space-y-reverse)))!important}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0!important;margin-bottom:calc(.5rem*var(--tw-space-y-reverse))!important;margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))!important}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0!important;margin-bottom:calc(.75rem*var(--tw-space-y-reverse))!important;margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))!important}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0!important;margin-bottom:calc(1rem*var(--tw-space-y-reverse))!important;margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))!important}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0!important;margin-bottom:calc(1.5rem*var(--tw-space-y-reverse))!important;margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)))!important}.space-y-\[1px\]>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0!important;margin-bottom:calc(1px*var(--tw-space-y-reverse))!important;margin-top:calc(1px*(1 - var(--tw-space-y-reverse)))!important}.space-y-\[2px\]>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0!important;margin-bottom:calc(2px*var(--tw-space-y-reverse))!important;margin-top:calc(2px*(1 - var(--tw-space-y-reverse)))!important}.self-start{align-self:flex-start!important}.self-center{align-self:center!important}.overflow-auto{overflow:auto!important}.overflow-hidden{overflow:hidden!important}.overflow-x-auto{overflow-x:auto!important}.overflow-y-auto{overflow-y:auto!important}.overflow-x-hidden{overflow-x:hidden!important}.truncate{overflow:hidden!important;text-overflow:ellipsis!important}.truncate,.whitespace-nowrap{white-space:nowrap!important}.whitespace-pre-line{white-space:pre-line!important}.break-words{overflow-wrap:break-word!important}.break-all{word-break:break-all!important}.rounded{border-radius:.25rem!important}.rounded-2xl{border-radius:1rem!important}.rounded-\[inherit\]{border-radius:inherit!important}.rounded-full{border-radius:9999px!important}.rounded-lg{border-radius:var(--radius)!important}.rounded-md{border-radius:calc(var(--radius) - 2px)!important}.rounded-none{border-radius:0!important}.rounded-sm{border-radius:calc(var(--radius) - 4px)!important}.rounded-xl{border-radius:.75rem!important}.rounded-l-none{border-bottom-left-radius:0!important;border-top-left-radius:0!important}.rounded-r-none{border-bottom-right-radius:0!important;border-top-right-radius:0!important}.rounded-t-\[10px\]{border-top-left-radius:10px!important;border-top-right-radius:10px!important}.rounded-tl-sm{border-top-left-radius:calc(var(--radius) - 4px)!important}.border{border-width:1px!important}.border-0{border-width:0!important}.border-2{border-width:2px!important}.border-\[1px\]{border-width:1px!important}.border-y{border-top-width:1px!important}.border-b,.border-y{border-bottom-width:1px!important}.border-b-0{border-bottom-width:0!important}.border-b-2{border-bottom-width:2px!important}.border-l{border-left-width:1px!important}.border-l-0{border-left-width:0!important}.border-r{border-right-width:1px!important}.border-r-0{border-right-width:0!important}.border-t{border-top-width:1px!important}.border-t-0{border-top-width:0!important}.border-t-\[1px\]{border-top-width:1px!important}.border-solid{border-style:solid!important}.border-dashed{border-style:dashed!important}.border-none{border-style:none!important}.border-\[\#B8D7D4\]{--tw-border-opacity:1!important;border-color:rgb(184 215 212/var(--tw-border-opacity,1))!important}.border-\[\#D0E6FB\]{--tw-border-opacity:1!important;border-color:rgb(208 230 251/var(--tw-border-opacity,1))!important}.border-\[\#E1E7E8\]{--tw-border-opacity:1!important;border-color:rgb(225 231 232/var(--tw-border-opacity,1))!important}.border-\[\#F6EFD3\]{--tw-border-opacity:1!important;border-color:rgb(246 239 211/var(--tw-border-opacity,1))!important}.border-\[\#ddd\]{--tw-border-opacity:1!important;border-color:rgb(221 221 221/var(--tw-border-opacity,1))!important}.border-\[\#e9e9e9\]{--tw-border-opacity:1!important;border-color:rgb(233 233 233/var(--tw-border-opacity,1))!important}.border-border{border-color:hsl(var(--border))!important}.border-destructive{border-color:hsl(var(--destructive))!important}.border-destructive\/50{border-color:hsl(var(--destructive)/.5)!important}.border-foreground{border-color:hsl(var(--foreground))!important}.border-foreground\/40{border-color:hsl(var(--foreground)/.4)!important}.border-green-500{--tw-border-opacity:1!important;border-color:rgb(34 197 94/var(--tw-border-opacity,1))!important}.border-input{border-color:hsl(var(--input))!important}.border-muted{border-color:hsl(var(--muted))!important}.border-neutral-800{--tw-border-opacity:1!important;border-color:rgb(38 38 38/var(--tw-border-opacity,1))!important}.border-primary{border-color:hsl(var(--primary))!important}.border-primary\/30{border-color:hsl(var(--primary)/.3)!important}.border-red-500{--tw-border-opacity:1!important;border-color:rgb(239 68 68/var(--tw-border-opacity,1))!important}.border-transparent{border-color:transparent!important}.border-l-transparent{border-left-color:transparent!important}.border-t-transparent{border-top-color:transparent!important}.\!bg-accent{background-color:hsl(var(--accent))!important}.bg-\[\#222222\]{--tw-bg-opacity:1!important;background-color:rgb(34 34 34/var(--tw-bg-opacity,1))!important}.bg-\[\#3A6667\]{--tw-bg-opacity:1!important;background-color:rgb(58 102 103/var(--tw-bg-opacity,1))!important}.bg-\[\#F0F8FF\]{--tw-bg-opacity:1!important;background-color:rgb(240 248 255/var(--tw-bg-opacity,1))!important}.bg-\[\#FBF9ED\]{--tw-bg-opacity:1!important;background-color:rgb(251 249 237/var(--tw-bg-opacity,1))!important}.bg-\[\#e9e9e9\]{--tw-bg-opacity:1!important;background-color:rgb(233 233 233/var(--tw-bg-opacity,1))!important}.bg-\[\#eeeeee\]{--tw-bg-opacity:1!important;background-color:rgb(238 238 238/var(--tw-bg-opacity,1))!important}.bg-accent{background-color:hsl(var(--accent))!important}.bg-background{background-color:hsl(var(--background))!important}.bg-background\/60{background-color:hsl(var(--background)/.6)!important}.bg-background\/70{background-color:hsl(var(--background)/.7)!important}.bg-black\/60{background-color:rgba(0,0,0,.6)!important}.bg-black\/80{background-color:rgba(0,0,0,.8)!important}.bg-border{background-color:hsl(var(--border))!important}.bg-card{background-color:hsl(var(--card))!important}.bg-destructive{background-color:hsl(var(--destructive))!important}.bg-foreground{background-color:hsl(var(--foreground))!important}.bg-foreground\/5{background-color:hsl(var(--foreground)/.05)!important}.bg-gray-50{background-color:rgb(249 250 251/var(--tw-bg-opacity,1))!important}.bg-gray-50,.bg-green-500{--tw-bg-opacity:1!important}.bg-green-500{background-color:rgb(34 197 94/var(--tw-bg-opacity,1))!important}.bg-green-600{--tw-bg-opacity:1!important;background-color:rgb(22 163 74/var(--tw-bg-opacity,1))!important}.bg-muted{background-color:hsl(var(--muted))!important}.bg-muted\/40{background-color:hsl(var(--muted)/.4)!important}.bg-muted\/50{background-color:hsl(var(--muted)/.5)!important}.bg-neutral-900{--tw-bg-opacity:1!important;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))!important}.bg-popover{background-color:hsl(var(--popover))!important}.bg-primary{background-color:hsl(var(--primary))!important}.bg-primary\/10{background-color:hsl(var(--primary)/.1)!important}.bg-red-100{background-color:rgb(254 226 226/var(--tw-bg-opacity,1))!important}.bg-red-100,.bg-red-500{--tw-bg-opacity:1!important}.bg-red-500{background-color:rgb(239 68 68/var(--tw-bg-opacity,1))!important}.bg-red-500\/80{background-color:rgba(239,68,68,.8)!important}.bg-red-600{--tw-bg-opacity:1!important;background-color:rgb(220 38 38/var(--tw-bg-opacity,1))!important}.bg-secondary{background-color:hsl(var(--secondary))!important}.bg-transparent{background-color:transparent!important}.bg-white{--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))!important}.bg-white\/20{background-color:hsla(0,0%,100%,.2)!important}.bg-zinc-900{--tw-bg-opacity:1!important;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))!important}.fill-current{fill:currentColor!important}.fill-white{fill:#fff!important}.object-cover{-o-object-fit:cover!important;object-fit:cover!important}.\!p-0,.p-0{padding:0!important}.p-1{padding:.25rem!important}.p-2{padding:.5rem!important}.p-3{padding:.75rem!important}.p-4{padding:1rem!important}.p-6{padding:1.5rem!important}.p-8{padding:2rem!important}.p-\[1px\]{padding:1px!important}.p-\[4px\]{padding:4px!important}.px-0{padding-left:0!important;padding-right:0!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.px-2\.5{padding-left:.625rem!important;padding-right:.625rem!important}.px-3{padding-left:.75rem!important;padding-right:.75rem!important}.px-4{padding-left:1rem!important;padding-right:1rem!important}.px-5{padding-left:1.25rem!important;padding-right:1.25rem!important}.px-6{padding-left:1.5rem!important;padding-right:1.5rem!important}.px-8{padding-left:2rem!important;padding-right:2rem!important}.px-\[0\.3rem\]{padding-left:.3rem!important;padding-right:.3rem!important}.px-\[60px\]{padding-left:60px!important;padding-right:60px!important}.px-\[6px\]{padding-left:6px!important;padding-right:6px!important}.py-0\.5{padding-bottom:.125rem!important;padding-top:.125rem!important}.py-1{padding-bottom:.25rem!important;padding-top:.25rem!important}.py-1\.5{padding-bottom:.375rem!important;padding-top:.375rem!important}.py-2{padding-bottom:.5rem!important;padding-top:.5rem!important}.py-24{padding-bottom:6rem!important;padding-top:6rem!important}.py-3{padding-bottom:.75rem!important;padding-top:.75rem!important}.py-4{padding-bottom:1rem!important;padding-top:1rem!important}.py-6{padding-bottom:1.5rem!important;padding-top:1.5rem!important}.py-8{padding-bottom:2rem!important;padding-top:2rem!important}.py-\[0\.2rem\]{padding-bottom:.2rem!important;padding-top:.2rem!important}.py-\[3px\]{padding-bottom:3px!important;padding-top:3px!important}.pb-0{padding-bottom:0!important}.pb-4{padding-bottom:1rem!important}.pb-\[10px\]{padding-bottom:10px!important}.pb-\[60px\]{padding-bottom:60px!important}.pe-\[58px\]{padding-inline-end:58px!important}.pl-0{padding-left:0!important}.pl-2{padding-left:.5rem!important}.pl-2\.5{padding-left:.625rem!important}.pl-3{padding-left:.75rem!important}.pl-4{padding-left:1rem!important}.pl-6{padding-left:1.5rem!important}.pl-8{padding-left:2rem!important}.pl-9{padding-left:2.25rem!important}.pr-10{padding-right:2.5rem!important}.pr-2{padding-right:.5rem!important}.pr-2\.5{padding-right:.625rem!important}.pr-8{padding-right:2rem!important}.pr-\[100px\]{padding-right:100px!important}.pt-0{padding-top:0!important}.pt-0\.5{padding-top:.125rem!important}.pt-1{padding-top:.25rem!important}.pt-2{padding-top:.5rem!important}.pt-4{padding-top:1rem!important}.pt-8{padding-top:2rem!important}.pt-\[30px\]{padding-top:30px!important}.text-left{text-align:left!important}.text-center{text-align:center!important}.text-right{text-align:right!important}.align-middle{vertical-align:middle!important}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace!important}.font-sans{font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji!important}.text-2xl{font-size:1.5rem!important;line-height:2rem!important}.text-\[0\.8rem\]{font-size:.8rem!important}.text-\[12px\]{font-size:12px!important}.text-\[13px\]{font-size:13px!important}.text-\[14px\]{font-size:14px!important}.text-\[15px\]{font-size:15px!important}.text-\[16px\]{font-size:16px!important}.text-\[1px\]{font-size:1px!important}.text-\[20px\]{font-size:20px!important}.text-\[60px\]{font-size:60px!important}.text-base{font-size:1rem!important;line-height:1.5rem!important}.text-lg{font-size:1.125rem!important;line-height:1.75rem!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.text-xl{font-size:1.25rem!important;line-height:1.75rem!important}.text-xs{font-size:.75rem!important;line-height:1rem!important}.font-bold{font-weight:700!important}.font-medium{font-weight:500!important}.font-normal{font-weight:400!important}.font-semibold{font-weight:600!important}.uppercase{text-transform:uppercase!important}.capitalize{text-transform:capitalize!important}.italic{font-style:italic!important}.ordinal{--tw-ordinal:ordinal!important}.ordinal,.tabular-nums{font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)!important}.tabular-nums{--tw-numeric-spacing:tabular-nums!important}.leading-5{line-height:1.25rem!important}.leading-\[1\.6\]{line-height:1.6!important}.leading-\[15px\]{line-height:15px!important}.leading-\[1\],.leading-none{line-height:1!important}.leading-snug{line-height:1.375!important}.leading-tight{line-height:1.25!important}.tracking-\[-3px\]{letter-spacing:-3px!important}.tracking-tight{letter-spacing:-.025em!important}.tracking-wide{letter-spacing:.025em!important}.tracking-widest{letter-spacing:.1em!important}.\!text-black{--tw-text-opacity:1!important;color:rgb(0 0 0/var(--tw-text-opacity,1))!important}.text-\[\#263130\]{--tw-text-opacity:1!important;color:rgb(38 49 48/var(--tw-text-opacity,1))!important}.text-\[\#3A6667\]{--tw-text-opacity:1!important;color:rgb(58 102 103/var(--tw-text-opacity,1))!important}.text-\[\#48BEFA\]{--tw-text-opacity:1!important;color:rgb(72 190 250/var(--tw-text-opacity,1))!important}.text-\[\#71ffca\]{--tw-text-opacity:1!important;color:rgb(113 255 202/var(--tw-text-opacity,1))!important}.text-\[\#9addff\]{--tw-text-opacity:1!important;color:rgb(154 221 255/var(--tw-text-opacity,1))!important}.text-\[\#d13d3d\]{--tw-text-opacity:1!important;color:rgb(209 61 61/var(--tw-text-opacity,1))!important}.text-\[\#ff8a88\]{--tw-text-opacity:1!important;color:rgb(255 138 136/var(--tw-text-opacity,1))!important}.text-accent-foreground{color:hsl(var(--accent-foreground))!important}.text-background{color:hsl(var(--background))!important}.text-black{color:rgb(0 0 0/var(--tw-text-opacity,1))!important}.text-black,.text-blue-700{--tw-text-opacity:1!important}.text-blue-700{color:rgb(29 78 216/var(--tw-text-opacity,1))!important}.text-card-foreground{color:hsl(var(--card-foreground))!important}.text-current{color:currentColor!important}.text-destructive{color:hsl(var(--destructive))!important}.text-destructive-foreground{color:hsl(var(--destructive-foreground))!important}.text-foreground{color:hsl(var(--foreground))!important}.text-foreground\/50{color:hsl(var(--foreground)/.5)!important}.text-foreground\/80{color:hsl(var(--foreground)/.8)!important}.text-foreground\/90{color:hsl(var(--foreground)/.9)!important}.text-inherit{color:inherit!important}.text-muted-foreground{color:hsl(var(--muted-foreground))!important}.text-muted-foreground\/40{color:hsl(var(--muted-foreground)/.4)!important}.text-muted-foreground\/50{color:hsl(var(--muted-foreground)/.5)!important}.text-muted-foreground\/80{color:hsl(var(--muted-foreground)/.8)!important}.text-muted-foreground\/90{color:hsl(var(--muted-foreground)/.9)!important}.text-popover-foreground{color:hsl(var(--popover-foreground))!important}.text-primary{color:hsl(var(--primary))!important}.text-primary-foreground{color:hsl(var(--primary-foreground))!important}.text-primary\/20{color:hsl(var(--primary)/.2)!important}.text-primary\/40{color:hsl(var(--primary)/.4)!important}.text-primary\/60{color:hsl(var(--primary)/.6)!important}.text-red-500{color:rgb(239 68 68/var(--tw-text-opacity,1))!important}.text-red-500,.text-red-600{--tw-text-opacity:1!important}.text-red-600{color:rgb(220 38 38/var(--tw-text-opacity,1))!important}.text-ring{color:hsl(var(--ring))!important}.text-secondary-foreground{color:hsl(var(--secondary-foreground))!important}.text-success{color:hsl(var(--success))!important}.text-white{--tw-text-opacity:1!important;color:rgb(255 255 255/var(--tw-text-opacity,1))!important}.underline{text-decoration-line:underline!important}.no-underline{text-decoration-line:none!important}.decoration-gray-200{text-decoration-color:#e5e7eb!important}.decoration-dotted{text-decoration-style:dotted!important}.underline-offset-2{text-underline-offset:2px!important}.underline-offset-4{text-underline-offset:4px!important}.caret-transparent{caret-color:transparent!important}.opacity-0{opacity:0!important}.opacity-100{opacity:1!important}.opacity-50{opacity:.5!important}.opacity-60{opacity:.6!important}.opacity-70{opacity:.7!important}.opacity-90{opacity:.9!important}.shadow-\[0_0_4px_\#bbb\]{--tw-shadow:0 0 4px #bbb!important;--tw-shadow-colored:0 0 4px var(--tw-shadow-color)!important}.shadow-\[0_0_4px_\#bbb\],.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1)!important;--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)!important}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1)!important;--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)!important}.shadow-md,.shadow-none{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.shadow-none{--tw-shadow:0 0 #0000!important;--tw-shadow-colored:0 0 #0000!important}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05)!important;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.outline-none{outline:2px solid transparent!important;outline-offset:2px!important}.outline{outline-style:solid!important}.ring-0{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color)!important}.ring-0,.ring-2{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}.ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)!important}.ring-ring{--tw-ring-color:hsl(var(--ring))!important}.ring-offset-background{--tw-ring-offset-color:hsl(var(--background))!important}.blur{--tw-blur:blur(8px)!important}.blur,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.transition{transition-duration:.15s!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.transition-all{transition-duration:.15s!important;transition-property:all!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.transition-colors{transition-duration:.15s!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.transition-none{transition-property:none!important}.transition-opacity{transition-duration:.15s!important;transition-property:opacity!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.transition-transform{transition-duration:.15s!important;transition-property:transform!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.duration-1000{transition-duration:1s!important}.duration-200{transition-duration:.2s!important}.duration-300{transition-duration:.3s!important}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)!important}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.animate-in{animation-duration:.15s!important;animation-name:enter!important;--tw-enter-opacity:initial!important;--tw-enter-scale:initial!important;--tw-enter-rotate:initial!important;--tw-enter-translate-x:initial!important;--tw-enter-translate-y:initial!important}.fade-in-0{--tw-enter-opacity:0!important}.fade-in-80{--tw-enter-opacity:0.8!important}.zoom-in-95{--tw-enter-scale:.95!important}.duration-1000{animation-duration:1s!important}.duration-200{animation-duration:.2s!important}.duration-300{animation-duration:.3s!important}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)!important}.file\:border-0::file-selector-button{border-width:0!important}.file\:bg-transparent::file-selector-button{background-color:transparent!important}.file\:text-sm::file-selector-button{font-size:.875rem!important;line-height:1.25rem!important}.file\:font-medium::file-selector-button{font-weight:500!important}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))!important}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))!important}.placeholder\:text-muted-foreground\/60::-moz-placeholder{color:hsl(var(--muted-foreground)/.6)!important}.placeholder\:text-muted-foreground\/60::placeholder{color:hsl(var(--muted-foreground)/.6)!important}.placeholder\:text-muted-foreground\/70::-moz-placeholder{color:hsl(var(--muted-foreground)/.7)!important}.placeholder\:text-muted-foreground\/70::placeholder{color:hsl(var(--muted-foreground)/.7)!important}.after\:absolute:after{content:var(--tw-content)!important;position:absolute!important}.after\:inset-y-0:after{bottom:0!important;content:var(--tw-content)!important;top:0!important}.after\:-bottom-\[1px\]:after{bottom:-1px!important;content:var(--tw-content)!important}.after\:left-1\/2:after{content:var(--tw-content)!important;left:50%!important}.after\:left-\[0px\]:after{content:var(--tw-content)!important;left:0!important}.after\:h-\[2px\]:after{content:var(--tw-content)!important;height:2px!important}.after\:w-1:after{content:var(--tw-content)!important;width:.25rem!important}.after\:w-full:after{content:var(--tw-content)!important;width:100%!important}.after\:-translate-x-1\/2:after{content:var(--tw-content)!important;--tw-translate-x:-50%!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.after\:bg-foreground:after{background-color:hsl(var(--foreground))!important;content:var(--tw-content)!important}.first\:rounded-l-md:first-child{border-bottom-left-radius:calc(var(--radius) - 2px)!important;border-top-left-radius:calc(var(--radius) - 2px)!important}.first\:border-l:first-child{border-left-width:1px!important}.last\:rounded-r-md:last-child{border-bottom-right-radius:calc(var(--radius) - 2px)!important;border-top-right-radius:calc(var(--radius) - 2px)!important}.focus-within\:relative:focus-within{position:relative!important}.focus-within\:z-20:focus-within{z-index:20!important}.focus-within\:ring-2:focus-within{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)!important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}.focus-within\:ring-ring:focus-within{--tw-ring-color:hsl(var(--ring))!important}.focus-within\:ring-offset-2:focus-within{--tw-ring-offset-width:2px!important}.hover\:cursor-pointer:hover{cursor:pointer!important}.hover\:border-\[\#e9e9e9\]:hover{--tw-border-opacity:1!important;border-color:rgb(233 233 233/var(--tw-border-opacity,1))!important}.hover\:border-card-foreground:hover{border-color:hsl(var(--card-foreground))!important}.hover\:border-foreground\/40:hover{border-color:hsl(var(--foreground)/.4)!important}.hover\:border-input:hover{border-color:hsl(var(--input))!important}.hover\:border-muted-foreground\/50:hover{border-color:hsl(var(--muted-foreground)/.5)!important}.hover\:border-muted-foreground\/60:hover{border-color:hsl(var(--muted-foreground)/.6)!important}.hover\:\!bg-accent:hover{background-color:hsl(var(--accent))!important}.hover\:bg-\[\#325c5c\]:hover{--tw-bg-opacity:1!important;background-color:rgb(50 92 92/var(--tw-bg-opacity,1))!important}.hover\:bg-\[\#e9e9e9\]:hover{--tw-bg-opacity:1!important;background-color:rgb(233 233 233/var(--tw-bg-opacity,1))!important}.hover\:bg-\[\#eeeeee\]:hover{--tw-bg-opacity:1!important;background-color:rgb(238 238 238/var(--tw-bg-opacity,1))!important}.hover\:bg-\[transparent\]:hover{background-color:transparent!important}.hover\:bg-accent:hover{background-color:hsl(var(--accent))!important}.hover\:bg-destructive\/80:hover{background-color:hsl(var(--destructive)/.8)!important}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive)/.9)!important}.hover\:bg-input:hover{background-color:hsl(var(--input))!important}.hover\:bg-muted:hover{background-color:hsl(var(--muted))!important}.hover\:bg-muted\/20:hover{background-color:hsl(var(--muted)/.2)!important}.hover\:bg-muted\/30:hover{background-color:hsl(var(--muted)/.3)!important}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted)/.5)!important}.hover\:bg-primary:hover{background-color:hsl(var(--primary))!important}.hover\:bg-primary\/80:hover{background-color:hsl(var(--primary)/.8)!important}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary)/.9)!important}.hover\:bg-red-600:hover{--tw-bg-opacity:1!important;background-color:rgb(220 38 38/var(--tw-bg-opacity,1))!important}.hover\:bg-secondary:hover{background-color:hsl(var(--secondary))!important}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary)/.8)!important}.hover\:bg-transparent:hover{background-color:transparent!important}.hover\:bg-white:hover{--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))!important}.hover\:bg-white\/30:hover{background-color:hsla(0,0%,100%,.3)!important}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))!important}.hover\:text-card-foreground:hover{color:hsl(var(--card-foreground))!important}.hover\:text-destructive:hover{color:hsl(var(--destructive))!important}.hover\:text-foreground:hover{color:hsl(var(--foreground))!important}.hover\:text-muted-foreground:hover{color:hsl(var(--muted-foreground))!important}.hover\:text-primary:hover{color:hsl(var(--primary))!important}.hover\:text-primary-foreground:hover{color:hsl(var(--primary-foreground))!important}.hover\:text-primary\/80:hover{color:hsl(var(--primary)/.8)!important}.hover\:underline:hover{text-decoration-line:underline!important}.hover\:no-underline:hover{text-decoration-line:none!important}.hover\:decoration-dotted:hover{text-decoration-style:dotted!important}.hover\:opacity-100:hover{opacity:1!important}.focus\:border-\[0px\]:focus{border-width:0!important}.focus\:border-none:focus{border-style:none!important}.focus\:border-input:focus{border-color:hsl(var(--input))!important}.focus\:border-transparent:focus{border-color:transparent!important}.focus\:bg-accent:focus{background-color:hsl(var(--accent))!important}.focus\:bg-primary:focus{background-color:hsl(var(--primary))!important}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))!important}.focus\:text-destructive:focus{color:hsl(var(--destructive))!important}.focus\:text-primary-foreground:focus{color:hsl(var(--primary-foreground))!important}.focus\:opacity-100:focus{opacity:1!important}.focus\:shadow-none:focus{--tw-shadow:0 0 #0000!important;--tw-shadow-colored:0 0 #0000!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.focus\:outline-none:focus{outline:2px solid transparent!important;outline-offset:2px!important}.focus\:ring-0:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color)!important}.focus\:ring-0:focus,.focus\:ring-2:focus{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)!important}.focus\:ring-ring:focus{--tw-ring-color:hsl(var(--ring))!important}.focus\:ring-offset-0:focus{--tw-ring-offset-width:0px!important}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px!important}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent!important;outline-offset:2px!important}.focus-visible\:ring-0:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color)!important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}.focus-visible\:ring-1:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)!important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)!important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}.focus-visible\:ring-ring:focus-visible{--tw-ring-color:hsl(var(--ring))!important}.focus-visible\:ring-transparent:focus-visible{--tw-ring-color:transparent!important}.focus-visible\:ring-offset-0:focus-visible{--tw-ring-offset-width:0px!important}.focus-visible\:ring-offset-1:focus-visible{--tw-ring-offset-width:1px!important}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px!important}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color:hsl(var(--background))!important}.focus-visible\:ring-offset-transparent:focus-visible{--tw-ring-offset-color:transparent!important}.active\:border-input:active{border-color:hsl(var(--input))!important}.active\:ring-2:active{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)!important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}.active\:ring-ring:active{--tw-ring-color:hsl(var(--ring))!important}.active\:ring-offset-2:active{--tw-ring-offset-width:2px!important}.disabled\:pointer-events-none:disabled{pointer-events:none!important}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed!important}.disabled\:bg-background:disabled{background-color:hsl(var(--background))!important}.disabled\:bg-muted:disabled{background-color:hsl(var(--muted))!important}.disabled\:bg-secondary:disabled{background-color:hsl(var(--secondary))!important}.disabled\:text-muted-foreground\/40:disabled{color:hsl(var(--muted-foreground)/.4)!important}.disabled\:text-muted-foreground\/50:disabled{color:hsl(var(--muted-foreground)/.5)!important}.disabled\:opacity-100:disabled{opacity:1!important}.disabled\:opacity-50:disabled{opacity:.5!important}.group:hover .group-hover\:visible{visibility:visible!important}.group:hover .group-hover\:bg-input{background-color:hsl(var(--input))!important}.group:hover .group-hover\:opacity-100{opacity:1!important}.group:hover .group-hover\:opacity-80{opacity:.8!important}.group.destructive .group-\[\.destructive\]\:border-muted\/40{border-color:hsl(var(--muted)/.4)!important}.group.toaster .group-\[\.toaster\]\:border-border{border-color:hsl(var(--border))!important}.group.toast .group-\[\.toast\]\:bg-muted{background-color:hsl(var(--muted))!important}.group.toast .group-\[\.toast\]\:bg-primary{background-color:hsl(var(--primary))!important}.group.toaster .group-\[\.toaster\]\:bg-background{background-color:hsl(var(--background))!important}.group.destructive .group-\[\.destructive\]\:text-red-300{--tw-text-opacity:1!important;color:rgb(252 165 165/var(--tw-text-opacity,1))!important}.group.toast .group-\[\.toast\]\:text-muted-foreground{color:hsl(var(--muted-foreground))!important}.group.toast .group-\[\.toast\]\:text-primary-foreground{color:hsl(var(--primary-foreground))!important}.group.toaster .group-\[\.toaster\]\:text-foreground{color:hsl(var(--foreground))!important}.group.toaster .group-\[\.toaster\]\:shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1)!important;--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.group.destructive .group-\[\.destructive\]\:hover\:border-destructive\/30:hover{border-color:hsl(var(--destructive)/.3)!important}.group.destructive .group-\[\.destructive\]\:hover\:bg-destructive:hover{background-color:hsl(var(--destructive))!important}.group.destructive .group-\[\.destructive\]\:hover\:text-destructive-foreground:hover{color:hsl(var(--destructive-foreground))!important}.group.destructive .group-\[\.destructive\]\:hover\:text-red-50:hover{--tw-text-opacity:1!important;color:rgb(254 242 242/var(--tw-text-opacity,1))!important}.group.destructive .group-\[\.destructive\]\:focus\:ring-destructive:focus{--tw-ring-color:hsl(var(--destructive))!important}.group.destructive .group-\[\.destructive\]\:focus\:ring-red-400:focus{--tw-ring-opacity:1!important;--tw-ring-color:rgb(248 113 113/var(--tw-ring-opacity,1))!important}.group.destructive .group-\[\.destructive\]\:focus\:ring-offset-red-600:focus{--tw-ring-offset-color:#dc2626!important}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed!important}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7!important}.has-\[\:disabled\]\:opacity-50:has(:disabled){opacity:.5!important}.aria-selected\:bg-accent[aria-selected=true]{background-color:hsl(var(--accent))!important}.aria-selected\:bg-accent\/50[aria-selected=true]{background-color:hsl(var(--accent)/.5)!important}.aria-selected\:bg-transparent[aria-selected=true]{background-color:transparent!important}.aria-selected\:text-accent-foreground[aria-selected=true]{color:hsl(var(--accent-foreground))!important}.aria-selected\:text-muted-foreground[aria-selected=true]{color:hsl(var(--muted-foreground))!important}.aria-selected\:opacity-100[aria-selected=true]{opacity:1!important}.aria-selected\:opacity-30[aria-selected=true]{opacity:.3!important}.aria-\[selected\=false\]\:hover\:bg-accent:hover[aria-selected=false],.aria-\[selected\=true\]\:hover\:bg-accent:hover[aria-selected=true]{background-color:hsl(var(--accent))!important}.aria-\[selected\=false\]\:hover\:text-accent-foreground:hover[aria-selected=false]{color:hsl(var(--accent-foreground))!important}.data-\[disabled\=true\]\:pointer-events-none[data-disabled=true],.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none!important}.data-\[panel-group-direction\=vertical\]\:h-px[data-panel-group-direction=vertical]{height:1px!important}.data-\[panel-group-direction\=vertical\]\:w-full[data-panel-group-direction=vertical]{width:100%!important}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y:0.25rem!important}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom],.data-\[side\=left\]\:-translate-x-1[data-side=left]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x:-0.25rem!important}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x:0.25rem!important}.data-\[side\=right\]\:translate-x-1[data-side=right],.data-\[side\=top\]\:-translate-y-1[data-side=top]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y:-0.25rem!important}.data-\[state\=checked\]\:translate-x-4[data-state=checked]{--tw-translate-x:1rem!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked],.data-\[swipe\=cancel\]\:translate-x-0[data-swipe=cancel]{--tw-translate-x:0px!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.data-\[swipe\=end\]\:translate-x-\[var\(--radix-toast-swipe-end-x\)\][data-swipe=end]{--tw-translate-x:var(--radix-toast-swipe-end-x)!important}.data-\[swipe\=end\]\:translate-x-\[var\(--radix-toast-swipe-end-x\)\][data-swipe=end],.data-\[swipe\=move\]\:translate-x-\[var\(--radix-toast-swipe-move-x\)\][data-swipe=move]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.data-\[swipe\=move\]\:translate-x-\[var\(--radix-toast-swipe-move-x\)\][data-swipe=move]{--tw-translate-x:var(--radix-toast-swipe-move-x)!important}@keyframes accordion-up{0%{height:var(--radix-accordion-content-height)}to{height:0}}.data-\[state\=closed\]\:animate-accordion-up[data-state=closed]{animation:accordion-up .2s ease-out!important}@keyframes accordion-down{0%{height:0}to{height:var(--radix-accordion-content-height)}}.data-\[state\=open\]\:animate-accordion-down[data-state=open]{animation:accordion-down .2s ease-out!important}.data-\[panel-group-direction\=vertical\]\:flex-col[data-panel-group-direction=vertical]{flex-direction:column!important}.data-\[active\]\:bg-accent\/50[data-active]{background-color:hsl(var(--accent)/.5)!important}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:hsl(var(--background))!important}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:hsl(var(--primary))!important}.data-\[state\=on\]\:bg-accent[data-state=on]{background-color:hsl(var(--accent))!important}.data-\[state\=on\]\:bg-white[data-state=on]{--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))!important}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent))!important}.data-\[state\=open\]\:bg-accent\/50[data-state=open]{background-color:hsl(var(--accent)/.5)!important}.data-\[state\=open\]\:bg-secondary[data-state=open]{background-color:hsl(var(--secondary))!important}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))!important}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:hsl(var(--input))!important}.data-\[state\=active\]\:font-semibold[data-state=active],.data-\[state\=on\]\:font-semibold[data-state=on]{font-weight:600!important}.data-\[state\=active\]\:text-foreground[data-state=active]{color:hsl(var(--foreground))!important}.data-\[state\=checked\]\:text-primary-foreground[data-state=checked]{color:hsl(var(--primary-foreground))!important}.data-\[state\=on\]\:text-accent-foreground[data-state=on],.data-\[state\=open\]\:text-accent-foreground[data-state=open]{color:hsl(var(--accent-foreground))!important}.data-\[disabled\=true\]\:opacity-50[data-disabled=true],.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5!important}.data-\[state\=active\]\:shadow-sm[data-state=active]{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05)!important;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.data-\[swipe\=move\]\:transition-none[data-swipe=move]{transition-property:none!important}.data-\[state\=closed\]\:duration-300[data-state=closed]{transition-duration:.3s!important}.data-\[state\=open\]\:duration-500[data-state=open]{transition-duration:.5s!important}.data-\[motion\^\=from-\]\:animate-in[data-motion^=from-],.data-\[state\=open\]\:animate-in[data-state=open],.data-\[state\=visible\]\:animate-in[data-state=visible]{animation-duration:.15s!important;animation-name:enter!important;--tw-enter-opacity:initial!important;--tw-enter-scale:initial!important;--tw-enter-rotate:initial!important;--tw-enter-translate-x:initial!important;--tw-enter-translate-y:initial!important}.data-\[motion\^\=to-\]\:animate-out[data-motion^=to-],.data-\[state\=closed\]\:animate-out[data-state=closed],.data-\[state\=hidden\]\:animate-out[data-state=hidden],.data-\[swipe\=end\]\:animate-out[data-swipe=end]{animation-duration:.15s!important;animation-name:exit!important;--tw-exit-opacity:initial!important;--tw-exit-scale:initial!important;--tw-exit-rotate:initial!important;--tw-exit-translate-x:initial!important;--tw-exit-translate-y:initial!important}.data-\[motion\^\=from-\]\:fade-in[data-motion^=from-]{--tw-enter-opacity:0!important}.data-\[motion\^\=to-\]\:fade-out[data-motion^=to-],.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity:0!important}.data-\[state\=closed\]\:fade-out-80[data-state=closed]{--tw-exit-opacity:0.8!important}.data-\[state\=hidden\]\:fade-out[data-state=hidden]{--tw-exit-opacity:0!important}.data-\[state\=open\]\:fade-in-0[data-state=open],.data-\[state\=visible\]\:fade-in[data-state=visible]{--tw-enter-opacity:0!important}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95!important}.data-\[state\=open\]\:zoom-in-90[data-state=open]{--tw-enter-scale:.9!important}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale:.95!important}.data-\[motion\=from-end\]\:slide-in-from-right-52[data-motion=from-end]{--tw-enter-translate-x:13rem!important}.data-\[motion\=from-start\]\:slide-in-from-left-52[data-motion=from-start]{--tw-enter-translate-x:-13rem!important}.data-\[motion\=to-end\]\:slide-out-to-right-52[data-motion=to-end]{--tw-exit-translate-x:13rem!important}.data-\[motion\=to-start\]\:slide-out-to-left-52[data-motion=to-start]{--tw-exit-translate-x:-13rem!important}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:-0.5rem!important}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:0.5rem!important}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:-0.5rem!important}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:0.5rem!important}.data-\[state\=closed\]\:slide-out-to-bottom[data-state=closed]{--tw-exit-translate-y:100%!important}.data-\[state\=closed\]\:slide-out-to-left[data-state=closed]{--tw-exit-translate-x:-100%!important}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x:-50%!important}.data-\[state\=closed\]\:slide-out-to-right-full[data-state=closed],.data-\[state\=closed\]\:slide-out-to-right[data-state=closed]{--tw-exit-translate-x:100%!important}.data-\[state\=closed\]\:slide-out-to-top[data-state=closed]{--tw-exit-translate-y:-100%!important}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y:-48%!important}.data-\[state\=open\]\:slide-in-from-bottom[data-state=open]{--tw-enter-translate-y:100%!important}.data-\[state\=open\]\:slide-in-from-left[data-state=open]{--tw-enter-translate-x:-100%!important}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x:-50%!important}.data-\[state\=open\]\:slide-in-from-right[data-state=open]{--tw-enter-translate-x:100%!important}.data-\[state\=open\]\:slide-in-from-top[data-state=open]{--tw-enter-translate-y:-100%!important}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y:-48%!important}.data-\[state\=open\]\:slide-in-from-top-full[data-state=open]{--tw-enter-translate-y:-100%!important}.data-\[state\=closed\]\:duration-300[data-state=closed]{animation-duration:.3s!important}.data-\[state\=open\]\:duration-500[data-state=open]{animation-duration:.5s!important}.data-\[panel-group-direction\=vertical\]\:after\:left-0[data-panel-group-direction=vertical]:after{content:var(--tw-content)!important;left:0!important}.data-\[panel-group-direction\=vertical\]\:after\:h-1[data-panel-group-direction=vertical]:after{content:var(--tw-content)!important;height:.25rem!important}.data-\[panel-group-direction\=vertical\]\:after\:w-full[data-panel-group-direction=vertical]:after{content:var(--tw-content)!important;width:100%!important}.data-\[panel-group-direction\=vertical\]\:after\:-translate-y-1\/2[data-panel-group-direction=vertical]:after{--tw-translate-y:-50%!important}.data-\[panel-group-direction\=vertical\]\:after\:-translate-y-1\/2[data-panel-group-direction=vertical]:after,.data-\[panel-group-direction\=vertical\]\:after\:translate-x-0[data-panel-group-direction=vertical]:after{content:var(--tw-content)!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.data-\[panel-group-direction\=vertical\]\:after\:translate-x-0[data-panel-group-direction=vertical]:after{--tw-translate-x:0px!important}.group[data-state=open] .group-data-\[state\=open\]\:rotate-180{--tw-rotate:180deg!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.dark\:border-destructive:is(.dark *){border-color:hsl(var(--destructive))!important}@media (min-width:640px){.sm\:bottom-0{bottom:0!important}.sm\:right-0{right:0!important}.sm\:top-auto{top:auto!important}.sm\:mt-0{margin-top:0!important}.sm\:inline{display:inline!important}.sm\:hidden{display:none!important}.sm\:w-\[250px\]{width:250px!important}.sm\:w-auto{width:auto!important}.sm\:w-full{width:100%!important}.sm\:max-w-sm{max-width:24rem!important}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}.sm\:flex-row{flex-direction:row!important}.sm\:flex-col{flex-direction:column!important}.sm\:items-center{align-items:center!important}.sm\:justify-end{justify-content:flex-end!important}.sm\:justify-center{justify-content:center!important}.sm\:justify-between{justify-content:space-between!important}.sm\:gap-0{gap:0!important}.sm\:gap-12{gap:3rem!important}.sm\:gap-2\.5{gap:.625rem!important}.sm\:gap-8{gap:2rem!important}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0!important;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)))!important;margin-right:calc(.5rem*var(--tw-space-x-reverse))!important}.sm\:space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0!important;margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)))!important;margin-right:calc(1rem*var(--tw-space-x-reverse))!important}.sm\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0!important;margin-bottom:calc(0px*var(--tw-space-y-reverse))!important;margin-top:calc(0px*(1 - var(--tw-space-y-reverse)))!important}.sm\:rounded-lg{border-radius:var(--radius)!important}.sm\:text-left{text-align:left!important}.data-\[state\=open\]\:sm\:slide-in-from-bottom-full[data-state=open]{--tw-enter-translate-y:100%!important}}@media (min-width:768px){.md\:absolute{position:absolute!important}.md\:block{display:block!important}.md\:flex{display:flex!important}.md\:hidden{display:none!important}.md\:min-h-\[calc\(100vh-32px\)\]{min-height:calc(100vh - 32px)!important}.md\:w-\[var\(--radix-navigation-menu-viewport-width\)\]{width:var(--radix-navigation-menu-viewport-width)!important}.md\:w-auto{width:auto!important}.md\:max-w-\[420px\]{max-width:420px!important}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}.md\:grid-cols-\[180px_1fr\]{grid-template-columns:180px 1fr!important}.md\:flex-row{flex-direction:row!important}.md\:items-end{align-items:flex-end!important}.md\:items-center{align-items:center!important}.md\:justify-start{justify-content:flex-start!important}.md\:justify-end{justify-content:flex-end!important}.md\:gap-10{gap:2.5rem!important}.md\:gap-2{gap:.5rem!important}.md\:gap-4{gap:1rem!important}.md\:gap-6{gap:1.5rem!important}.md\:bg-muted{background-color:hsl(var(--muted))!important}.md\:bg-transparent{background-color:transparent!important}.md\:p-8{padding:2rem!important}.md\:px-3{padding-left:.75rem!important;padding-right:.75rem!important}.md\:px-8{padding-left:2rem!important;padding-right:2rem!important}.md\:py-2{padding-bottom:.5rem!important;padding-top:.5rem!important}.md\:pl-4{padding-left:1rem!important}.md\:pl-6{padding-left:1.5rem!important}.md\:text-right{text-align:right!important}.md\:shadow-none{--tw-shadow:0 0 #0000!important;--tw-shadow-colored:0 0 #0000!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.md\:after\:-bottom-\[14px\]:after{bottom:-14px!important;content:var(--tw-content)!important}}@media (min-width:1024px){.lg\:flex{display:flex!important}.lg\:hidden{display:none!important}.lg\:min-w-\[350px\]{min-width:350px!important}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))!important}.lg\:gap-10{gap:2.5rem!important}}.\[\&\:\:-webkit-inner-spin-button\]\:appearance-none::-webkit-inner-spin-button{-webkit-appearance:none!important;appearance:none!important}.\[\&\:has\(\[aria-selected\]\)\]\:bg-accent:has([aria-selected]){background-color:hsl(var(--accent))!important}.first\:\[\&\:has\(\[aria-selected\]\)\]\:rounded-l-md:has([aria-selected]):first-child{border-bottom-left-radius:calc(var(--radius) - 2px)!important;border-top-left-radius:calc(var(--radius) - 2px)!important}.last\:\[\&\:has\(\[aria-selected\]\)\]\:rounded-r-md:has([aria-selected]):last-child{border-bottom-right-radius:calc(var(--radius) - 2px)!important;border-top-right-radius:calc(var(--radius) - 2px)!important}.\[\&\:has\(\[aria-selected\]\.day-outside\)\]\:bg-accent\/50:has([aria-selected].day-outside){background-color:hsl(var(--accent)/.5)!important}.\[\&\:has\(\[aria-selected\]\.day-range-end\)\]\:rounded-r-md:has([aria-selected].day-range-end){border-bottom-right-radius:calc(var(--radius) - 2px)!important;border-top-right-radius:calc(var(--radius) - 2px)!important}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0!important}.\[\&\:not\(\[aria-selected\=\'true\'\]\)\]\:rounded-md:not([aria-selected=true]){border-radius:calc(var(--radius) - 2px)!important}.\[\&\:not\(\[aria-selected\=\'true\'\]\)\]\:bg-white:not([aria-selected=true]){--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))!important}.hover\:\[\&\:not\(\[aria-selected\=\'true\'\]\)\]\:bg-accent:not([aria-selected=true]):hover{background-color:hsl(var(--accent))!important}.\[\&\>\*\]\:flex-1>*{flex:1 1 0%!important}.\[\&\>span\]\:line-clamp-1>span{display:-webkit-box!important;overflow:hidden!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:1!important}.\[\&\>svg\+div\]\:translate-y-\[-3px\]>svg+div{--tw-translate-y:-3px!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.\[\&\>svg\]\:absolute>svg{position:absolute!important}.\[\&\>svg\]\:left-4>svg{left:1rem!important}.\[\&\>svg\]\:top-4>svg{top:1rem!important}.\[\&\>svg\]\:size-3\.5>svg{height:.875rem!important;width:.875rem!important}.\[\&\>svg\]\:h-3>svg{height:.75rem!important}.\[\&\>svg\]\:w-3>svg{width:.75rem!important}.\[\&\>svg\]\:text-destructive>svg{color:hsl(var(--destructive))!important}.\[\&\>svg\]\:text-foreground>svg{color:hsl(var(--foreground))!important}.\[\&\>svg\~\*\]\:pl-7>svg~*{padding-left:1.75rem!important}.\[\&\>td\:first-child\>button\]\:rounded-l-md>td:first-child>button{border-bottom-left-radius:calc(var(--radius) - 2px)!important;border-top-left-radius:calc(var(--radius) - 2px)!important}.\[\&\>td\:last-child\>button\]\:rounded-r-md>td:last-child>button{border-bottom-right-radius:calc(var(--radius) - 2px)!important;border-top-right-radius:calc(var(--radius) - 2px)!important}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0!important}.\[\&\[data-panel-group-direction\=vertical\]\>div\]\:rotate-90[data-panel-group-direction=vertical]>div{--tw-rotate:90deg!important}.\[\&\[data-panel-group-direction\=vertical\]\>div\]\:rotate-90[data-panel-group-direction=vertical]>div,.\[\&\[data-state\=open\]\>svg\]\:rotate-180[data-state=open]>svg{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.\[\&\[data-state\=open\]\>svg\]\:rotate-180[data-state=open]>svg{--tw-rotate:180deg!important}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-left:.5rem!important;padding-right:.5rem!important}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-bottom:.375rem!important;padding-top:.375rem!important}.\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading]{font-size:.75rem!important;line-height:1rem!important}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{font-weight:500!important}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{color:hsl(var(--muted-foreground))!important}.\[\&_\[cmdk-group\]\:not\(\[hidden\]\)_\~\[cmdk-group\]\]\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0!important}.\[\&_\[cmdk-group\]\]\:px-2 [cmdk-group]{padding-left:.5rem!important;padding-right:.5rem!important}.\[\&_\[cmdk-input-wrapper\]_svg\]\:h-5 [cmdk-input-wrapper] svg{height:1.25rem!important}.\[\&_\[cmdk-input-wrapper\]_svg\]\:w-5 [cmdk-input-wrapper] svg{width:1.25rem!important}.\[\&_\[cmdk-input\]\]\:h-12 [cmdk-input]{height:3rem!important}.\[\&_\[cmdk-item\]\]\:px-2 [cmdk-item]{padding-left:.5rem!important;padding-right:.5rem!important}.\[\&_\[cmdk-item\]\]\:py-3 [cmdk-item]{padding-bottom:.75rem!important;padding-top:.75rem!important}.\[\&_\[cmdk-item\]_svg\]\:h-5 [cmdk-item] svg{height:1.25rem!important}.\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg{width:1.25rem!important}.\[\&_p\]\:leading-relaxed p{line-height:1.625!important}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0!important}.\[\&_tr\]\:border-b tr{border-bottom-width:1px!important}
     1*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)):after,:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)):before{border:0 solid #e5e7eb;box-sizing:border-box}:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)):after,:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)):before{--tw-content:""}.eventkoi-admin:where(:not(.no-eventkoi,.no-eventkoi *)){line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}.eventkoi-admin:where(:not(.no-eventkoi,.no-eventkoi *)){line-height:inherit;margin:0}hr:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){border-top-width:1px;color:inherit;height:0}abbr:where([title]):where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),h2:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),h3:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),h4:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),h5:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),h6:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){font-size:inherit;font-weight:inherit}a:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){color:inherit;text-decoration:inherit}b:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),strong:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){font-weight:bolder}code:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),kbd:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),pre:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),samp:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){font-size:80%}sub:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),sup:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){bottom:-.25em}sup:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){top:-.5em}table:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){border-collapse:collapse;border-color:inherit;text-indent:0}button:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),input:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),optgroup:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),select:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),textarea:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),select:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){text-transform:none}button:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),input:where([type=button]):where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),input:where([type=reset]):where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),input:where([type=submit]):where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){outline:auto}:-moz-ui-invalid:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){box-shadow:none}progress:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){vertical-align:baseline}:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)) ::-webkit-inner-spin-button,:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)) ::-webkit-outer-spin-button{height:auto}[type=search]:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){-webkit-appearance:textfield;outline-offset:-2px}:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)) ::-webkit-search-decoration{-webkit-appearance:none}:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)) ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){display:list-item}blockquote:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),dd:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),dl:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),figure:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),h1:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),h2:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),h3:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),h4:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),h5:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),h6:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),hr:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),p:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),pre:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){margin:0}fieldset:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){margin:0;padding:0}legend:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){padding:0}menu:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),ol:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),ul:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){list-style:none;margin:0;padding:0}dialog:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){padding:0}textarea:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){resize:vertical}:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)) input::-moz-placeholder,:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)) textarea::-moz-placeholder{color:#9ca3af;opacity:1}:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)) input::placeholder,:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)) textarea::placeholder{color:#9ca3af;opacity:1}[role=button]:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),button:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){cursor:pointer}:disabled:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){cursor:default}audio:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),canvas:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),embed:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),iframe:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),img:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),object:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),svg:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),video:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){display:block;vertical-align:middle}img:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)),video:where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])):where(.eventkoi-admin,.eventkoi-admin *):where(:not(.no-eventkoi,.no-eventkoi *)){display:none}:root{--background:0 0% 100%;--card:0 0% 100%;--popover:0 0% 100%;--destructive-foreground:0 0% 100%;--primary-foreground:0 0% 100%;--secondary:0 0% 96%;--muted:0 0% 96%;--accent:0 0% 96%;--primary:0 1% 22%;--foreground:0 1% 22%;--card-foreground:0 1% 22%;--popover-foreground:0 1% 22%;--secondary-foreground:0 1% 22%;--accent-foreground:0 1% 22%;--border:0 0% 92%;--input:0 0% 92%;--ring:0 0% 50%;--muted-foreground:0 0% 43%;--destructive:0 62% 53%;--radius:0.5rem;--warning:38 92% 50%;--warning-foreground:48 96% 89%;--success:158 48% 45%}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--muted));color:hsl(var(--foreground))}.container{margin-left:auto;margin-right:auto;padding-left:2rem;padding-right:2rem;width:100%}@media (min-width:1400px){.container{max-width:1400px}}.sr-only{height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;width:1px!important;clip:rect(0,0,0,0)!important;border-width:0!important;white-space:nowrap!important}.pointer-events-none{pointer-events:none!important}.pointer-events-auto{pointer-events:auto!important}.visible{visibility:visible!important}.invisible{visibility:hidden!important}.collapse{visibility:collapse!important}.fixed{position:fixed!important}.absolute{position:absolute!important}.relative{position:relative!important}.sticky{position:sticky!important}.inset-0{inset:0!important}.inset-x-0{left:0!important;right:0!important}.inset-y-0{bottom:0!important;top:0!important}.-bottom-12{bottom:-3rem!important}.-left-12{left:-3rem!important}.-right-12{right:-3rem!important}.-right-2\.5{right:-.625rem!important}.-top-12{top:-3rem!important}.bottom-0{bottom:0!important}.left-0{left:0!important}.left-1{left:.25rem!important}.left-1\/2{left:50%!important}.left-2{left:.5rem!important}.left-2\.5{left:.625rem!important}.left-3{left:.75rem!important}.left-4{left:1rem!important}.left-\[0px\]{left:0!important}.left-\[50\%\]{left:50%!important}.right-0{right:0!important}.right-1{right:.25rem!important}.right-2{right:.5rem!important}.right-4{right:1rem!important}.right-\[4px\]{right:4px!important}.right-\[5px\]{right:5px!important}.right-\[9px\]{right:9px!important}.top-0{top:0!important}.top-1{top:.25rem!important}.top-1\/2{top:50%!important}.top-12{top:3rem!important}.top-2{top:.5rem!important}.top-3{top:.75rem!important}.top-4{top:1rem!important}.top-8{top:2rem!important}.top-\[0px\]{top:0!important}.top-\[1px\]{top:1px!important}.top-\[3px\]{top:3px!important}.top-\[4px\]{top:4px!important}.top-\[50\%\]{top:50%!important}.top-\[60\%\]{top:60%!important}.top-\[9px\]{top:9px!important}.top-full{top:100%!important}.z-10{z-index:10!important}.z-50{z-index:50!important}.z-\[100000\]{z-index:100000!important}.z-\[100\]{z-index:100!important}.z-\[1\]{z-index:1!important}.z-\[500\]{z-index:500!important}.z-\[510000\]{z-index:510000!important}.z-\[900\]{z-index:900!important}.col-span-3{grid-column:span 3/span 3!important}.\!m-0,.m-0{margin:0!important}.-mx-1{margin-left:-.25rem!important;margin-right:-.25rem!important}.mx-\[8px\]{margin-left:8px!important;margin-right:8px!important}.mx-auto{margin-left:auto!important;margin-right:auto!important}.my-1{margin-bottom:.25rem!important;margin-top:.25rem!important}.my-8{margin-bottom:2rem!important;margin-top:2rem!important}.-ml-4{margin-left:-1rem!important}.-mt-4{margin-top:-1rem!important}.-mt-6{margin-top:-1.5rem!important}.mb-0{margin-bottom:0!important}.mb-1{margin-bottom:.25rem!important}.mb-2{margin-bottom:.5rem!important}.mb-3{margin-bottom:.75rem!important}.mb-4{margin-bottom:1rem!important}.mb-6{margin-bottom:1.5rem!important}.mb-8{margin-bottom:2rem!important}.ml-0{margin-left:0!important}.ml-1{margin-left:.25rem!important}.ml-2{margin-left:.5rem!important}.ml-3{margin-left:.75rem!important}.ml-4{margin-left:1rem!important}.ml-auto{margin-left:auto!important}.mr-1{margin-right:.25rem!important}.mr-2{margin-right:.5rem!important}.mr-4{margin-right:1rem!important}.mr-6{margin-right:1.5rem!important}.ms-2{margin-inline-start:.5rem!important}.mt-0\.5{margin-top:.125rem!important}.mt-1{margin-top:.25rem!important}.mt-1\.5{margin-top:.375rem!important}.mt-2{margin-top:.5rem!important}.mt-24{margin-top:6rem!important}.mt-4{margin-top:1rem!important}.mt-6{margin-top:1.5rem!important}.mt-\[2px\]{margin-top:2px!important}.mt-\[4px\]{margin-top:4px!important}.mt-auto{margin-top:auto!important}.box-border{box-sizing:border-box!important}.line-clamp-2{-webkit-line-clamp:2!important}.line-clamp-2,.line-clamp-3{display:-webkit-box!important;overflow:hidden!important;-webkit-box-orient:vertical!important}.line-clamp-3{-webkit-line-clamp:3!important}.block{display:block!important}.inline-block{display:inline-block!important}.inline{display:inline!important}.flex{display:flex!important}.inline-flex{display:inline-flex!important}.\!table,.table{display:table!important}.grid{display:grid!important}.contents{display:contents!important}.hidden{display:none!important}.aspect-square{aspect-ratio:1/1!important}.size-12{height:3rem!important;width:3rem!important}.size-6{height:1.5rem!important;width:1.5rem!important}.size-8{height:2rem!important;width:2rem!important}.h-1\.5{height:.375rem!important}.h-10{height:2.5rem!important}.h-11{height:2.75rem!important}.h-12{height:3rem!important}.h-16{height:4rem!important}.h-2{height:.5rem!important}.h-2\.5{height:.625rem!important}.h-20{height:5rem!important}.h-3{height:.75rem!important}.h-3\.5{height:.875rem!important}.h-4{height:1rem!important}.h-40{height:10rem!important}.h-5{height:1.25rem!important}.h-6{height:1.5rem!important}.h-7{height:1.75rem!important}.h-8{height:2rem!important}.h-9{height:2.25rem!important}.h-\[1px\]{height:1px!important}.h-\[70px\]{height:70px!important}.h-\[var\(--radix-navigation-menu-viewport-height\)\]{height:var(--radix-navigation-menu-viewport-height)!important}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)!important}.h-auto{height:auto!important}.h-full{height:100%!important}.h-px{height:1px!important}.max-h-48{max-height:12rem!important}.max-h-60{max-height:15rem!important}.max-h-96{max-height:24rem!important}.max-h-\[--radix-popover-content-available-height\]{max-height:var(--radix-popover-content-available-height)!important}.max-h-\[300px\]{max-height:300px!important}.max-h-\[400px\]{max-height:400px!important}.max-h-screen{max-height:100vh!important}.min-h-0{min-height:0!important}.min-h-6{min-height:1.5rem!important}.min-h-\[250px\]{min-height:250px!important}.min-h-\[66px\]{min-height:66px!important}.min-h-\[80px\]{min-height:80px!important}.min-h-\[calc\(100vh-46px\)\]{min-height:calc(100vh - 46px)!important}.w-10{width:2.5rem!important}.w-16{width:4rem!important}.w-2{width:.5rem!important}.w-2\.5{width:.625rem!important}.w-20{width:5rem!important}.w-3{width:.75rem!important}.w-3\.5{width:.875rem!important}.w-3\/4{width:75%!important}.w-32{width:8rem!important}.w-4{width:1rem!important}.w-40{width:10rem!important}.w-44{width:11rem!important}.w-48{width:12rem!important}.w-5{width:1.25rem!important}.w-56{width:14rem!important}.w-6{width:1.5rem!important}.w-60{width:15rem!important}.w-64{width:16rem!important}.w-7{width:1.75rem!important}.w-72{width:18rem!important}.w-8{width:2rem!important}.w-9{width:2.25rem!important}.w-\[--radix-popover-trigger-width\]{width:var(--radix-popover-trigger-width)!important}.w-\[100px\]{width:100px!important}.w-\[116px\]{width:116px!important}.w-\[15\%\]{width:15%!important}.w-\[150px\]{width:150px!important}.w-\[180px\]{width:180px!important}.w-\[1px\]{width:1px!important}.w-\[220px\]{width:220px!important}.w-\[240px\]{width:240px!important}.w-\[250px\]{width:250px!important}.w-\[260px\]{width:260px!important}.w-\[280px\]{width:280px!important}.w-\[30\%\]{width:30%!important}.w-\[350px\]{width:350px!important}.w-\[36px\]{width:36px!important}.w-\[370px\]{width:370px!important}.w-\[40\%\]{width:40%!important}.w-\[48px\]{width:48px!important}.w-\[50px\]{width:50px!important}.w-\[60\%\]{width:60%!important}.w-\[70px\]{width:70px!important}.w-\[8\%\]{width:8%!important}.w-\[80\%\]{width:80%!important}.w-\[90px\]{width:90px!important}.w-auto{width:auto!important}.w-fit{width:-moz-fit-content!important;width:fit-content!important}.w-full{width:100%!important}.w-max{width:-moz-max-content!important;width:max-content!important}.w-px{width:1px!important}.min-w-0{min-width:0!important}.min-w-4{min-width:1rem!important}.min-w-5{min-width:1.25rem!important}.min-w-\[12rem\]{min-width:12rem!important}.min-w-\[140px\]{min-width:140px!important}.min-w-\[170px\]{min-width:170px!important}.min-w-\[200px\]{min-width:200px!important}.min-w-\[260px\]{min-width:260px!important}.min-w-\[82px\]{min-width:82px!important}.min-w-\[8rem\]{min-width:8rem!important}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)!important}.max-w-2xl{max-width:42rem!important}.max-w-\[1180px\]{max-width:1180px!important}.max-w-\[1280px\]{max-width:1280px!important}.max-w-\[220px\]{max-width:220px!important}.max-w-\[250px\]{max-width:250px!important}.max-w-\[260px\]{max-width:260px!important}.max-w-\[280px\]{max-width:280px!important}.max-w-\[422px\]{max-width:422px!important}.max-w-\[450px\]{max-width:450px!important}.max-w-\[685px\]{max-width:685px!important}.max-w-\[800px\]{max-width:800px!important}.max-w-full{max-width:100%!important}.max-w-lg{max-width:32rem!important}.max-w-max{max-width:-moz-max-content!important;max-width:max-content!important}.max-w-md{max-width:28rem!important}.flex-1{flex:1 1 0%!important}.flex-shrink-0,.shrink-0{flex-shrink:0!important}.grow{flex-grow:1!important}.grow-0{flex-grow:0!important}.basis-full{flex-basis:100%!important}.caption-bottom{caption-side:bottom!important}.border-collapse{border-collapse:collapse!important}.-translate-x-1\/2{--tw-translate-x:-50%!important}.-translate-x-1\/2,.-translate-y-1\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-translate-y-1\/2{--tw-translate-y:-50%!important}.translate-x-\[-50\%\]{--tw-translate-x:-50%!important}.translate-x-\[-50\%\],.translate-y-\[-50\%\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.translate-y-\[-50\%\]{--tw-translate-y:-50%!important}.rotate-45{--tw-rotate:45deg!important}.rotate-45,.rotate-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-90{--tw-rotate:90deg!important}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite!important}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite!important}.cursor-default{cursor:default!important}.cursor-not-allowed{cursor:not-allowed!important}.cursor-pointer{cursor:pointer!important}.touch-none{touch-action:none!important}.select-none{-webkit-user-select:none!important;-moz-user-select:none!important;user-select:none!important}.resize-none{resize:none!important}.resize{resize:both!important}.scroll-m-20{scroll-margin:5rem!important}.list-decimal{list-style-type:decimal!important}.list-none{list-style-type:none!important}.appearance-none{-webkit-appearance:none!important;-moz-appearance:none!important;appearance:none!important}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))!important}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))!important}.flex-row{flex-direction:row!important}.flex-col{flex-direction:column!important}.flex-col-reverse{flex-direction:column-reverse!important}.flex-wrap{flex-wrap:wrap!important}.items-start{align-items:flex-start!important}.items-end{align-items:flex-end!important}.items-center{align-items:center!important}.justify-start{justify-content:flex-start!important}.justify-end{justify-content:flex-end!important}.justify-center{justify-content:center!important}.justify-between{justify-content:space-between!important}.gap-1{gap:.25rem!important}.gap-1\.5{gap:.375rem!important}.gap-10{gap:2.5rem!important}.gap-2{gap:.5rem!important}.gap-3{gap:.75rem!important}.gap-4{gap:1rem!important}.gap-6{gap:1.5rem!important}.gap-8{gap:2rem!important}.gap-\[10px\]{gap:10px!important}.gap-\[1px\]{gap:1px!important}.gap-\[2px\]{gap:2px!important}.gap-\[6px\]{gap:6px!important}.gap-x-1{-moz-column-gap:.25rem!important;column-gap:.25rem!important}.gap-x-4{-moz-column-gap:1rem!important;column-gap:1rem!important}.gap-x-8{-moz-column-gap:2rem!important;column-gap:2rem!important}.gap-y-1{row-gap:.25rem!important}.gap-y-2{row-gap:.5rem!important}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0!important;margin-left:calc(.25rem*(1 - var(--tw-space-x-reverse)))!important;margin-right:calc(.25rem*var(--tw-space-x-reverse))!important}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0!important;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)))!important;margin-right:calc(.5rem*var(--tw-space-x-reverse))!important}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0!important;margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)))!important;margin-right:calc(1rem*var(--tw-space-x-reverse))!important}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0!important;margin-bottom:calc(.25rem*var(--tw-space-y-reverse))!important;margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)))!important}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0!important;margin-bottom:calc(.375rem*var(--tw-space-y-reverse))!important;margin-top:calc(.375rem*(1 - var(--tw-space-y-reverse)))!important}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0!important;margin-bottom:calc(.5rem*var(--tw-space-y-reverse))!important;margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))!important}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0!important;margin-bottom:calc(.75rem*var(--tw-space-y-reverse))!important;margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))!important}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0!important;margin-bottom:calc(1rem*var(--tw-space-y-reverse))!important;margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))!important}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0!important;margin-bottom:calc(1.5rem*var(--tw-space-y-reverse))!important;margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)))!important}.space-y-\[1px\]>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0!important;margin-bottom:calc(1px*var(--tw-space-y-reverse))!important;margin-top:calc(1px*(1 - var(--tw-space-y-reverse)))!important}.space-y-\[2px\]>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0!important;margin-bottom:calc(2px*var(--tw-space-y-reverse))!important;margin-top:calc(2px*(1 - var(--tw-space-y-reverse)))!important}.self-start{align-self:flex-start!important}.self-center{align-self:center!important}.overflow-auto{overflow:auto!important}.overflow-hidden{overflow:hidden!important}.overflow-x-auto{overflow-x:auto!important}.overflow-y-auto{overflow-y:auto!important}.overflow-x-hidden{overflow-x:hidden!important}.truncate{overflow:hidden!important;text-overflow:ellipsis!important}.truncate,.whitespace-nowrap{white-space:nowrap!important}.whitespace-pre-line{white-space:pre-line!important}.break-words{overflow-wrap:break-word!important}.break-all{word-break:break-all!important}.rounded{border-radius:.25rem!important}.rounded-2xl{border-radius:1rem!important}.rounded-\[inherit\]{border-radius:inherit!important}.rounded-full{border-radius:9999px!important}.rounded-lg{border-radius:var(--radius)!important}.rounded-md{border-radius:calc(var(--radius) - 2px)!important}.rounded-none{border-radius:0!important}.rounded-sm{border-radius:calc(var(--radius) - 4px)!important}.rounded-xl{border-radius:.75rem!important}.rounded-l-none{border-bottom-left-radius:0!important;border-top-left-radius:0!important}.rounded-r-none{border-bottom-right-radius:0!important;border-top-right-radius:0!important}.rounded-t-\[10px\]{border-top-left-radius:10px!important;border-top-right-radius:10px!important}.rounded-tl-sm{border-top-left-radius:calc(var(--radius) - 4px)!important}.border{border-width:1px!important}.border-0{border-width:0!important}.border-2{border-width:2px!important}.border-\[1px\]{border-width:1px!important}.border-y{border-top-width:1px!important}.border-b,.border-y{border-bottom-width:1px!important}.border-b-0{border-bottom-width:0!important}.border-b-2{border-bottom-width:2px!important}.border-l{border-left-width:1px!important}.border-l-0{border-left-width:0!important}.border-r{border-right-width:1px!important}.border-r-0{border-right-width:0!important}.border-t{border-top-width:1px!important}.border-t-0{border-top-width:0!important}.border-t-\[1px\]{border-top-width:1px!important}.border-solid{border-style:solid!important}.border-dashed{border-style:dashed!important}.border-none{border-style:none!important}.border-\[\#B8D7D4\]{--tw-border-opacity:1!important;border-color:rgb(184 215 212/var(--tw-border-opacity,1))!important}.border-\[\#D0E6FB\]{--tw-border-opacity:1!important;border-color:rgb(208 230 251/var(--tw-border-opacity,1))!important}.border-\[\#E1E7E8\]{--tw-border-opacity:1!important;border-color:rgb(225 231 232/var(--tw-border-opacity,1))!important}.border-\[\#F6EFD3\]{--tw-border-opacity:1!important;border-color:rgb(246 239 211/var(--tw-border-opacity,1))!important}.border-\[\#ddd\]{--tw-border-opacity:1!important;border-color:rgb(221 221 221/var(--tw-border-opacity,1))!important}.border-\[\#e9e9e9\]{--tw-border-opacity:1!important;border-color:rgb(233 233 233/var(--tw-border-opacity,1))!important}.border-border{border-color:hsl(var(--border))!important}.border-destructive{border-color:hsl(var(--destructive))!important}.border-destructive\/50{border-color:hsl(var(--destructive)/.5)!important}.border-foreground{border-color:hsl(var(--foreground))!important}.border-foreground\/40{border-color:hsl(var(--foreground)/.4)!important}.border-green-500{--tw-border-opacity:1!important;border-color:rgb(34 197 94/var(--tw-border-opacity,1))!important}.border-input{border-color:hsl(var(--input))!important}.border-muted{border-color:hsl(var(--muted))!important}.border-neutral-800{--tw-border-opacity:1!important;border-color:rgb(38 38 38/var(--tw-border-opacity,1))!important}.border-primary{border-color:hsl(var(--primary))!important}.border-primary\/30{border-color:hsl(var(--primary)/.3)!important}.border-red-500{--tw-border-opacity:1!important;border-color:rgb(239 68 68/var(--tw-border-opacity,1))!important}.border-transparent{border-color:transparent!important}.border-l-transparent{border-left-color:transparent!important}.border-t-transparent{border-top-color:transparent!important}.\!bg-accent{background-color:hsl(var(--accent))!important}.bg-\[\#222222\]{--tw-bg-opacity:1!important;background-color:rgb(34 34 34/var(--tw-bg-opacity,1))!important}.bg-\[\#3A6667\]{--tw-bg-opacity:1!important;background-color:rgb(58 102 103/var(--tw-bg-opacity,1))!important}.bg-\[\#F0F8FF\]{--tw-bg-opacity:1!important;background-color:rgb(240 248 255/var(--tw-bg-opacity,1))!important}.bg-\[\#FBF9ED\]{--tw-bg-opacity:1!important;background-color:rgb(251 249 237/var(--tw-bg-opacity,1))!important}.bg-\[\#e9e9e9\]{--tw-bg-opacity:1!important;background-color:rgb(233 233 233/var(--tw-bg-opacity,1))!important}.bg-\[\#eeeeee\]{--tw-bg-opacity:1!important;background-color:rgb(238 238 238/var(--tw-bg-opacity,1))!important}.bg-accent{background-color:hsl(var(--accent))!important}.bg-background{background-color:hsl(var(--background))!important}.bg-background\/60{background-color:hsl(var(--background)/.6)!important}.bg-background\/70{background-color:hsl(var(--background)/.7)!important}.bg-black\/60{background-color:rgba(0,0,0,.6)!important}.bg-black\/80{background-color:rgba(0,0,0,.8)!important}.bg-border{background-color:hsl(var(--border))!important}.bg-card{background-color:hsl(var(--card))!important}.bg-destructive{background-color:hsl(var(--destructive))!important}.bg-foreground{background-color:hsl(var(--foreground))!important}.bg-foreground\/5{background-color:hsl(var(--foreground)/.05)!important}.bg-gray-50{background-color:rgb(249 250 251/var(--tw-bg-opacity,1))!important}.bg-gray-50,.bg-green-500{--tw-bg-opacity:1!important}.bg-green-500{background-color:rgb(34 197 94/var(--tw-bg-opacity,1))!important}.bg-green-600{--tw-bg-opacity:1!important;background-color:rgb(22 163 74/var(--tw-bg-opacity,1))!important}.bg-muted{background-color:hsl(var(--muted))!important}.bg-muted\/40{background-color:hsl(var(--muted)/.4)!important}.bg-muted\/50{background-color:hsl(var(--muted)/.5)!important}.bg-neutral-900{--tw-bg-opacity:1!important;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))!important}.bg-popover{background-color:hsl(var(--popover))!important}.bg-primary{background-color:hsl(var(--primary))!important}.bg-primary\/10{background-color:hsl(var(--primary)/.1)!important}.bg-red-100{background-color:rgb(254 226 226/var(--tw-bg-opacity,1))!important}.bg-red-100,.bg-red-500{--tw-bg-opacity:1!important}.bg-red-500{background-color:rgb(239 68 68/var(--tw-bg-opacity,1))!important}.bg-red-500\/80{background-color:rgba(239,68,68,.8)!important}.bg-red-600{--tw-bg-opacity:1!important;background-color:rgb(220 38 38/var(--tw-bg-opacity,1))!important}.bg-secondary{background-color:hsl(var(--secondary))!important}.bg-transparent{background-color:transparent!important}.bg-white{--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))!important}.bg-white\/20{background-color:hsla(0,0%,100%,.2)!important}.bg-zinc-900{--tw-bg-opacity:1!important;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))!important}.fill-current{fill:currentColor!important}.fill-white{fill:#fff!important}.object-cover{-o-object-fit:cover!important;object-fit:cover!important}.\!p-0,.p-0{padding:0!important}.p-1{padding:.25rem!important}.p-2{padding:.5rem!important}.p-3{padding:.75rem!important}.p-4{padding:1rem!important}.p-6{padding:1.5rem!important}.p-8{padding:2rem!important}.p-\[1px\]{padding:1px!important}.p-\[4px\]{padding:4px!important}.px-0{padding-left:0!important;padding-right:0!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.px-2\.5{padding-left:.625rem!important;padding-right:.625rem!important}.px-3{padding-left:.75rem!important;padding-right:.75rem!important}.px-4{padding-left:1rem!important;padding-right:1rem!important}.px-5{padding-left:1.25rem!important;padding-right:1.25rem!important}.px-6{padding-left:1.5rem!important;padding-right:1.5rem!important}.px-8{padding-left:2rem!important;padding-right:2rem!important}.px-\[0\.3rem\]{padding-left:.3rem!important;padding-right:.3rem!important}.px-\[60px\]{padding-left:60px!important;padding-right:60px!important}.px-\[6px\]{padding-left:6px!important;padding-right:6px!important}.py-0\.5{padding-bottom:.125rem!important;padding-top:.125rem!important}.py-1{padding-bottom:.25rem!important;padding-top:.25rem!important}.py-1\.5{padding-bottom:.375rem!important;padding-top:.375rem!important}.py-2{padding-bottom:.5rem!important;padding-top:.5rem!important}.py-24{padding-bottom:6rem!important;padding-top:6rem!important}.py-3{padding-bottom:.75rem!important;padding-top:.75rem!important}.py-4{padding-bottom:1rem!important;padding-top:1rem!important}.py-6{padding-bottom:1.5rem!important;padding-top:1.5rem!important}.py-8{padding-bottom:2rem!important;padding-top:2rem!important}.py-\[0\.2rem\]{padding-bottom:.2rem!important;padding-top:.2rem!important}.py-\[3px\]{padding-bottom:3px!important;padding-top:3px!important}.py-\[4px\]{padding-bottom:4px!important;padding-top:4px!important}.pb-0{padding-bottom:0!important}.pb-4{padding-bottom:1rem!important}.pb-\[10px\]{padding-bottom:10px!important}.pb-\[60px\]{padding-bottom:60px!important}.pe-\[58px\]{padding-inline-end:58px!important}.pl-0{padding-left:0!important}.pl-2{padding-left:.5rem!important}.pl-2\.5{padding-left:.625rem!important}.pl-3{padding-left:.75rem!important}.pl-4{padding-left:1rem!important}.pl-6{padding-left:1.5rem!important}.pl-8{padding-left:2rem!important}.pl-9{padding-left:2.25rem!important}.pr-10{padding-right:2.5rem!important}.pr-2{padding-right:.5rem!important}.pr-2\.5{padding-right:.625rem!important}.pr-8{padding-right:2rem!important}.pr-\[100px\]{padding-right:100px!important}.pt-0{padding-top:0!important}.pt-0\.5{padding-top:.125rem!important}.pt-1{padding-top:.25rem!important}.pt-2{padding-top:.5rem!important}.pt-4{padding-top:1rem!important}.pt-8{padding-top:2rem!important}.pt-\[30px\]{padding-top:30px!important}.text-left{text-align:left!important}.text-center{text-align:center!important}.text-right{text-align:right!important}.align-middle{vertical-align:middle!important}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace!important}.font-sans{font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji!important}.text-2xl{font-size:1.5rem!important;line-height:2rem!important}.text-\[0\.8rem\]{font-size:.8rem!important}.text-\[12px\]{font-size:12px!important}.text-\[13px\]{font-size:13px!important}.text-\[14px\]{font-size:14px!important}.text-\[15px\]{font-size:15px!important}.text-\[16px\]{font-size:16px!important}.text-\[1px\]{font-size:1px!important}.text-\[20px\]{font-size:20px!important}.text-\[60px\]{font-size:60px!important}.text-base{font-size:1rem!important;line-height:1.5rem!important}.text-lg{font-size:1.125rem!important;line-height:1.75rem!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.text-xl{font-size:1.25rem!important;line-height:1.75rem!important}.text-xs{font-size:.75rem!important;line-height:1rem!important}.font-bold{font-weight:700!important}.font-medium{font-weight:500!important}.font-normal{font-weight:400!important}.font-semibold{font-weight:600!important}.uppercase{text-transform:uppercase!important}.capitalize{text-transform:capitalize!important}.italic{font-style:italic!important}.ordinal{--tw-ordinal:ordinal!important}.ordinal,.tabular-nums{font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)!important}.tabular-nums{--tw-numeric-spacing:tabular-nums!important}.leading-5{line-height:1.25rem!important}.leading-\[1\.6\]{line-height:1.6!important}.leading-\[15px\]{line-height:15px!important}.leading-\[1\],.leading-none{line-height:1!important}.leading-snug{line-height:1.375!important}.leading-tight{line-height:1.25!important}.tracking-\[-3px\]{letter-spacing:-3px!important}.tracking-tight{letter-spacing:-.025em!important}.tracking-wide{letter-spacing:.025em!important}.tracking-widest{letter-spacing:.1em!important}.\!text-black{--tw-text-opacity:1!important;color:rgb(0 0 0/var(--tw-text-opacity,1))!important}.text-\[\#263130\]{--tw-text-opacity:1!important;color:rgb(38 49 48/var(--tw-text-opacity,1))!important}.text-\[\#374151\]{--tw-text-opacity:1!important;color:rgb(55 65 81/var(--tw-text-opacity,1))!important}.text-\[\#3A6667\]{--tw-text-opacity:1!important;color:rgb(58 102 103/var(--tw-text-opacity,1))!important}.text-\[\#48BEFA\]{--tw-text-opacity:1!important;color:rgb(72 190 250/var(--tw-text-opacity,1))!important}.text-\[\#71ffca\]{--tw-text-opacity:1!important;color:rgb(113 255 202/var(--tw-text-opacity,1))!important}.text-\[\#9addff\]{--tw-text-opacity:1!important;color:rgb(154 221 255/var(--tw-text-opacity,1))!important}.text-\[\#d13d3d\]{--tw-text-opacity:1!important;color:rgb(209 61 61/var(--tw-text-opacity,1))!important}.text-\[\#ff8a88\]{--tw-text-opacity:1!important;color:rgb(255 138 136/var(--tw-text-opacity,1))!important}.text-accent-foreground{color:hsl(var(--accent-foreground))!important}.text-background{color:hsl(var(--background))!important}.text-black{color:rgb(0 0 0/var(--tw-text-opacity,1))!important}.text-black,.text-blue-700{--tw-text-opacity:1!important}.text-blue-700{color:rgb(29 78 216/var(--tw-text-opacity,1))!important}.text-card-foreground{color:hsl(var(--card-foreground))!important}.text-current{color:currentColor!important}.text-destructive{color:hsl(var(--destructive))!important}.text-destructive-foreground{color:hsl(var(--destructive-foreground))!important}.text-foreground{color:hsl(var(--foreground))!important}.text-foreground\/50{color:hsl(var(--foreground)/.5)!important}.text-foreground\/80{color:hsl(var(--foreground)/.8)!important}.text-foreground\/90{color:hsl(var(--foreground)/.9)!important}.text-inherit{color:inherit!important}.text-muted-foreground{color:hsl(var(--muted-foreground))!important}.text-muted-foreground\/40{color:hsl(var(--muted-foreground)/.4)!important}.text-muted-foreground\/50{color:hsl(var(--muted-foreground)/.5)!important}.text-muted-foreground\/80{color:hsl(var(--muted-foreground)/.8)!important}.text-muted-foreground\/90{color:hsl(var(--muted-foreground)/.9)!important}.text-popover-foreground{color:hsl(var(--popover-foreground))!important}.text-primary{color:hsl(var(--primary))!important}.text-primary-foreground{color:hsl(var(--primary-foreground))!important}.text-primary\/20{color:hsl(var(--primary)/.2)!important}.text-primary\/40{color:hsl(var(--primary)/.4)!important}.text-primary\/60{color:hsl(var(--primary)/.6)!important}.text-red-500{color:rgb(239 68 68/var(--tw-text-opacity,1))!important}.text-red-500,.text-red-600{--tw-text-opacity:1!important}.text-red-600{color:rgb(220 38 38/var(--tw-text-opacity,1))!important}.text-ring{color:hsl(var(--ring))!important}.text-secondary-foreground{color:hsl(var(--secondary-foreground))!important}.text-success{color:hsl(var(--success))!important}.text-white{--tw-text-opacity:1!important;color:rgb(255 255 255/var(--tw-text-opacity,1))!important}.underline{text-decoration-line:underline!important}.no-underline{text-decoration-line:none!important}.decoration-gray-200{text-decoration-color:#e5e7eb!important}.decoration-dotted{text-decoration-style:dotted!important}.underline-offset-2{text-underline-offset:2px!important}.underline-offset-4{text-underline-offset:4px!important}.caret-transparent{caret-color:transparent!important}.opacity-0{opacity:0!important}.opacity-100{opacity:1!important}.opacity-50{opacity:.5!important}.opacity-60{opacity:.6!important}.opacity-70{opacity:.7!important}.opacity-90{opacity:.9!important}.shadow-\[0_0_4px_\#bbb\]{--tw-shadow:0 0 4px #bbb!important;--tw-shadow-colored:0 0 4px var(--tw-shadow-color)!important}.shadow-\[0_0_4px_\#bbb\],.shadow-\[0_1px_2px_rgba\(0\2c 0\2c 0\2c 0\.04\)\]{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.shadow-\[0_1px_2px_rgba\(0\2c 0\2c 0\2c 0\.04\)\]{--tw-shadow:0 1px 2px rgba(0,0,0,.04)!important;--tw-shadow-colored:0 1px 2px var(--tw-shadow-color)!important}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1)!important;--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)!important}.shadow-lg,.shadow-md{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1)!important;--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)!important}.shadow-none{--tw-shadow:0 0 #0000!important;--tw-shadow-colored:0 0 #0000!important}.shadow-none,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05)!important;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)!important}.outline-none{outline:2px solid transparent!important;outline-offset:2px!important}.outline{outline-style:solid!important}.ring-0{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color)!important}.ring-0,.ring-2{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}.ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)!important}.ring-ring{--tw-ring-color:hsl(var(--ring))!important}.ring-offset-background{--tw-ring-offset-color:hsl(var(--background))!important}.blur{--tw-blur:blur(8px)!important}.blur,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.transition{transition-duration:.15s!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.transition-all{transition-duration:.15s!important;transition-property:all!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.transition-colors{transition-duration:.15s!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.transition-none{transition-property:none!important}.transition-opacity{transition-duration:.15s!important;transition-property:opacity!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.transition-transform{transition-duration:.15s!important;transition-property:transform!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.duration-1000{transition-duration:1s!important}.duration-200{transition-duration:.2s!important}.duration-300{transition-duration:.3s!important}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)!important}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.animate-in{animation-duration:.15s!important;animation-name:enter!important;--tw-enter-opacity:initial!important;--tw-enter-scale:initial!important;--tw-enter-rotate:initial!important;--tw-enter-translate-x:initial!important;--tw-enter-translate-y:initial!important}.fade-in-0{--tw-enter-opacity:0!important}.fade-in-80{--tw-enter-opacity:0.8!important}.zoom-in-95{--tw-enter-scale:.95!important}.duration-1000{animation-duration:1s!important}.duration-200{animation-duration:.2s!important}.duration-300{animation-duration:.3s!important}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)!important}.file\:border-0::file-selector-button{border-width:0!important}.file\:bg-transparent::file-selector-button{background-color:transparent!important}.file\:text-sm::file-selector-button{font-size:.875rem!important;line-height:1.25rem!important}.file\:font-medium::file-selector-button{font-weight:500!important}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))!important}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))!important}.placeholder\:text-muted-foreground\/60::-moz-placeholder{color:hsl(var(--muted-foreground)/.6)!important}.placeholder\:text-muted-foreground\/60::placeholder{color:hsl(var(--muted-foreground)/.6)!important}.placeholder\:text-muted-foreground\/70::-moz-placeholder{color:hsl(var(--muted-foreground)/.7)!important}.placeholder\:text-muted-foreground\/70::placeholder{color:hsl(var(--muted-foreground)/.7)!important}.after\:absolute:after{content:var(--tw-content)!important;position:absolute!important}.after\:inset-y-0:after{bottom:0!important;content:var(--tw-content)!important;top:0!important}.after\:-bottom-\[1px\]:after{bottom:-1px!important;content:var(--tw-content)!important}.after\:left-1\/2:after{content:var(--tw-content)!important;left:50%!important}.after\:left-\[0px\]:after{content:var(--tw-content)!important;left:0!important}.after\:h-\[2px\]:after{content:var(--tw-content)!important;height:2px!important}.after\:w-1:after{content:var(--tw-content)!important;width:.25rem!important}.after\:w-full:after{content:var(--tw-content)!important;width:100%!important}.after\:-translate-x-1\/2:after{content:var(--tw-content)!important;--tw-translate-x:-50%!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.after\:bg-foreground:after{background-color:hsl(var(--foreground))!important;content:var(--tw-content)!important}.first\:rounded-l-md:first-child{border-bottom-left-radius:calc(var(--radius) - 2px)!important;border-top-left-radius:calc(var(--radius) - 2px)!important}.first\:border-l:first-child{border-left-width:1px!important}.last\:rounded-r-md:last-child{border-bottom-right-radius:calc(var(--radius) - 2px)!important;border-top-right-radius:calc(var(--radius) - 2px)!important}.focus-within\:relative:focus-within{position:relative!important}.focus-within\:z-20:focus-within{z-index:20!important}.focus-within\:ring-2:focus-within{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)!important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}.focus-within\:ring-ring:focus-within{--tw-ring-color:hsl(var(--ring))!important}.focus-within\:ring-offset-2:focus-within{--tw-ring-offset-width:2px!important}.hover\:cursor-pointer:hover{cursor:pointer!important}.hover\:border-\[\#e9e9e9\]:hover{--tw-border-opacity:1!important;border-color:rgb(233 233 233/var(--tw-border-opacity,1))!important}.hover\:border-card-foreground:hover{border-color:hsl(var(--card-foreground))!important}.hover\:border-foreground\/40:hover{border-color:hsl(var(--foreground)/.4)!important}.hover\:border-input:hover{border-color:hsl(var(--input))!important}.hover\:border-muted-foreground\/50:hover{border-color:hsl(var(--muted-foreground)/.5)!important}.hover\:border-muted-foreground\/60:hover{border-color:hsl(var(--muted-foreground)/.6)!important}.hover\:\!bg-accent:hover{background-color:hsl(var(--accent))!important}.hover\:bg-\[\#325c5c\]:hover{--tw-bg-opacity:1!important;background-color:rgb(50 92 92/var(--tw-bg-opacity,1))!important}.hover\:bg-\[\#e5e7eb\]:hover{--tw-bg-opacity:1!important;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))!important}.hover\:bg-\[\#e9e9e9\]:hover{--tw-bg-opacity:1!important;background-color:rgb(233 233 233/var(--tw-bg-opacity,1))!important}.hover\:bg-\[\#eeeeee\]:hover{--tw-bg-opacity:1!important;background-color:rgb(238 238 238/var(--tw-bg-opacity,1))!important}.hover\:bg-\[transparent\]:hover{background-color:transparent!important}.hover\:bg-accent:hover{background-color:hsl(var(--accent))!important}.hover\:bg-destructive\/80:hover{background-color:hsl(var(--destructive)/.8)!important}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive)/.9)!important}.hover\:bg-input:hover{background-color:hsl(var(--input))!important}.hover\:bg-muted:hover{background-color:hsl(var(--muted))!important}.hover\:bg-muted\/20:hover{background-color:hsl(var(--muted)/.2)!important}.hover\:bg-muted\/30:hover{background-color:hsl(var(--muted)/.3)!important}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted)/.5)!important}.hover\:bg-primary:hover{background-color:hsl(var(--primary))!important}.hover\:bg-primary\/80:hover{background-color:hsl(var(--primary)/.8)!important}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary)/.9)!important}.hover\:bg-red-600:hover{--tw-bg-opacity:1!important;background-color:rgb(220 38 38/var(--tw-bg-opacity,1))!important}.hover\:bg-secondary:hover{background-color:hsl(var(--secondary))!important}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary)/.8)!important}.hover\:bg-transparent:hover{background-color:transparent!important}.hover\:bg-white:hover{--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))!important}.hover\:bg-white\/30:hover{background-color:hsla(0,0%,100%,.3)!important}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))!important}.hover\:text-card-foreground:hover{color:hsl(var(--card-foreground))!important}.hover\:text-destructive:hover{color:hsl(var(--destructive))!important}.hover\:text-foreground:hover{color:hsl(var(--foreground))!important}.hover\:text-muted-foreground:hover{color:hsl(var(--muted-foreground))!important}.hover\:text-primary:hover{color:hsl(var(--primary))!important}.hover\:text-primary-foreground:hover{color:hsl(var(--primary-foreground))!important}.hover\:text-primary\/80:hover{color:hsl(var(--primary)/.8)!important}.hover\:underline:hover{text-decoration-line:underline!important}.hover\:no-underline:hover{text-decoration-line:none!important}.hover\:decoration-dotted:hover{text-decoration-style:dotted!important}.hover\:opacity-100:hover{opacity:1!important}.focus\:border-\[0px\]:focus{border-width:0!important}.focus\:border-none:focus{border-style:none!important}.focus\:border-input:focus{border-color:hsl(var(--input))!important}.focus\:border-transparent:focus{border-color:transparent!important}.focus\:bg-accent:focus{background-color:hsl(var(--accent))!important}.focus\:bg-primary:focus{background-color:hsl(var(--primary))!important}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))!important}.focus\:text-destructive:focus{color:hsl(var(--destructive))!important}.focus\:text-primary-foreground:focus{color:hsl(var(--primary-foreground))!important}.focus\:opacity-100:focus{opacity:1!important}.focus\:shadow-none:focus{--tw-shadow:0 0 #0000!important;--tw-shadow-colored:0 0 #0000!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.focus\:outline-none:focus{outline:2px solid transparent!important;outline-offset:2px!important}.focus\:ring-0:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color)!important}.focus\:ring-0:focus,.focus\:ring-2:focus{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)!important}.focus\:ring-ring:focus{--tw-ring-color:hsl(var(--ring))!important}.focus\:ring-offset-0:focus{--tw-ring-offset-width:0px!important}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px!important}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent!important;outline-offset:2px!important}.focus-visible\:ring-0:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color)!important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}.focus-visible\:ring-1:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)!important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)!important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}.focus-visible\:ring-ring:focus-visible{--tw-ring-color:hsl(var(--ring))!important}.focus-visible\:ring-transparent:focus-visible{--tw-ring-color:transparent!important}.focus-visible\:ring-offset-0:focus-visible{--tw-ring-offset-width:0px!important}.focus-visible\:ring-offset-1:focus-visible{--tw-ring-offset-width:1px!important}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px!important}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color:hsl(var(--background))!important}.focus-visible\:ring-offset-transparent:focus-visible{--tw-ring-offset-color:transparent!important}.active\:border-input:active{border-color:hsl(var(--input))!important}.active\:ring-2:active{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)!important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}.active\:ring-ring:active{--tw-ring-color:hsl(var(--ring))!important}.active\:ring-offset-2:active{--tw-ring-offset-width:2px!important}.disabled\:pointer-events-none:disabled{pointer-events:none!important}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed!important}.disabled\:bg-background:disabled{background-color:hsl(var(--background))!important}.disabled\:bg-muted:disabled{background-color:hsl(var(--muted))!important}.disabled\:bg-secondary:disabled{background-color:hsl(var(--secondary))!important}.disabled\:text-muted-foreground\/40:disabled{color:hsl(var(--muted-foreground)/.4)!important}.disabled\:text-muted-foreground\/50:disabled{color:hsl(var(--muted-foreground)/.5)!important}.disabled\:opacity-100:disabled{opacity:1!important}.disabled\:opacity-50:disabled{opacity:.5!important}.group:hover .group-hover\:visible{visibility:visible!important}.group:hover .group-hover\:bg-input{background-color:hsl(var(--input))!important}.group:hover .group-hover\:opacity-100{opacity:1!important}.group:hover .group-hover\:opacity-80{opacity:.8!important}.group.destructive .group-\[\.destructive\]\:border-muted\/40{border-color:hsl(var(--muted)/.4)!important}.group.toaster .group-\[\.toaster\]\:border-border{border-color:hsl(var(--border))!important}.group.toast .group-\[\.toast\]\:bg-muted{background-color:hsl(var(--muted))!important}.group.toast .group-\[\.toast\]\:bg-primary{background-color:hsl(var(--primary))!important}.group.toaster .group-\[\.toaster\]\:bg-background{background-color:hsl(var(--background))!important}.group.destructive .group-\[\.destructive\]\:text-red-300{--tw-text-opacity:1!important;color:rgb(252 165 165/var(--tw-text-opacity,1))!important}.group.toast .group-\[\.toast\]\:text-muted-foreground{color:hsl(var(--muted-foreground))!important}.group.toast .group-\[\.toast\]\:text-primary-foreground{color:hsl(var(--primary-foreground))!important}.group.toaster .group-\[\.toaster\]\:text-foreground{color:hsl(var(--foreground))!important}.group.toaster .group-\[\.toaster\]\:shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1)!important;--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.group.destructive .group-\[\.destructive\]\:hover\:border-destructive\/30:hover{border-color:hsl(var(--destructive)/.3)!important}.group.destructive .group-\[\.destructive\]\:hover\:bg-destructive:hover{background-color:hsl(var(--destructive))!important}.group.destructive .group-\[\.destructive\]\:hover\:text-destructive-foreground:hover{color:hsl(var(--destructive-foreground))!important}.group.destructive .group-\[\.destructive\]\:hover\:text-red-50:hover{--tw-text-opacity:1!important;color:rgb(254 242 242/var(--tw-text-opacity,1))!important}.group.destructive .group-\[\.destructive\]\:focus\:ring-destructive:focus{--tw-ring-color:hsl(var(--destructive))!important}.group.destructive .group-\[\.destructive\]\:focus\:ring-red-400:focus{--tw-ring-opacity:1!important;--tw-ring-color:rgb(248 113 113/var(--tw-ring-opacity,1))!important}.group.destructive .group-\[\.destructive\]\:focus\:ring-offset-red-600:focus{--tw-ring-offset-color:#dc2626!important}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed!important}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7!important}.has-\[\:disabled\]\:opacity-50:has(:disabled){opacity:.5!important}.aria-selected\:bg-accent[aria-selected=true]{background-color:hsl(var(--accent))!important}.aria-selected\:bg-accent\/50[aria-selected=true]{background-color:hsl(var(--accent)/.5)!important}.aria-selected\:bg-transparent[aria-selected=true]{background-color:transparent!important}.aria-selected\:text-accent-foreground[aria-selected=true]{color:hsl(var(--accent-foreground))!important}.aria-selected\:text-muted-foreground[aria-selected=true]{color:hsl(var(--muted-foreground))!important}.aria-selected\:opacity-100[aria-selected=true]{opacity:1!important}.aria-selected\:opacity-30[aria-selected=true]{opacity:.3!important}.aria-\[selected\=false\]\:hover\:bg-accent:hover[aria-selected=false],.aria-\[selected\=true\]\:hover\:bg-accent:hover[aria-selected=true]{background-color:hsl(var(--accent))!important}.aria-\[selected\=false\]\:hover\:text-accent-foreground:hover[aria-selected=false]{color:hsl(var(--accent-foreground))!important}.data-\[disabled\=true\]\:pointer-events-none[data-disabled=true],.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none!important}.data-\[panel-group-direction\=vertical\]\:h-px[data-panel-group-direction=vertical]{height:1px!important}.data-\[panel-group-direction\=vertical\]\:w-full[data-panel-group-direction=vertical]{width:100%!important}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y:0.25rem!important}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom],.data-\[side\=left\]\:-translate-x-1[data-side=left]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x:-0.25rem!important}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x:0.25rem!important}.data-\[side\=right\]\:translate-x-1[data-side=right],.data-\[side\=top\]\:-translate-y-1[data-side=top]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y:-0.25rem!important}.data-\[state\=checked\]\:translate-x-4[data-state=checked]{--tw-translate-x:1rem!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked],.data-\[swipe\=cancel\]\:translate-x-0[data-swipe=cancel]{--tw-translate-x:0px!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.data-\[swipe\=end\]\:translate-x-\[var\(--radix-toast-swipe-end-x\)\][data-swipe=end]{--tw-translate-x:var(--radix-toast-swipe-end-x)!important}.data-\[swipe\=end\]\:translate-x-\[var\(--radix-toast-swipe-end-x\)\][data-swipe=end],.data-\[swipe\=move\]\:translate-x-\[var\(--radix-toast-swipe-move-x\)\][data-swipe=move]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.data-\[swipe\=move\]\:translate-x-\[var\(--radix-toast-swipe-move-x\)\][data-swipe=move]{--tw-translate-x:var(--radix-toast-swipe-move-x)!important}@keyframes accordion-up{0%{height:var(--radix-accordion-content-height)}to{height:0}}.data-\[state\=closed\]\:animate-accordion-up[data-state=closed]{animation:accordion-up .2s ease-out!important}@keyframes accordion-down{0%{height:0}to{height:var(--radix-accordion-content-height)}}.data-\[state\=open\]\:animate-accordion-down[data-state=open]{animation:accordion-down .2s ease-out!important}.data-\[panel-group-direction\=vertical\]\:flex-col[data-panel-group-direction=vertical]{flex-direction:column!important}.data-\[active\]\:bg-accent\/50[data-active]{background-color:hsl(var(--accent)/.5)!important}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:hsl(var(--background))!important}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:hsl(var(--primary))!important}.data-\[state\=on\]\:bg-accent[data-state=on]{background-color:hsl(var(--accent))!important}.data-\[state\=on\]\:bg-white[data-state=on]{--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))!important}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent))!important}.data-\[state\=open\]\:bg-accent\/50[data-state=open]{background-color:hsl(var(--accent)/.5)!important}.data-\[state\=open\]\:bg-secondary[data-state=open]{background-color:hsl(var(--secondary))!important}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))!important}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:hsl(var(--input))!important}.data-\[state\=active\]\:font-semibold[data-state=active],.data-\[state\=on\]\:font-semibold[data-state=on]{font-weight:600!important}.data-\[state\=active\]\:text-foreground[data-state=active]{color:hsl(var(--foreground))!important}.data-\[state\=checked\]\:text-primary-foreground[data-state=checked]{color:hsl(var(--primary-foreground))!important}.data-\[state\=on\]\:text-accent-foreground[data-state=on],.data-\[state\=open\]\:text-accent-foreground[data-state=open]{color:hsl(var(--accent-foreground))!important}.data-\[disabled\=true\]\:opacity-50[data-disabled=true],.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5!important}.data-\[state\=active\]\:shadow-sm[data-state=active]{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05)!important;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.data-\[swipe\=move\]\:transition-none[data-swipe=move]{transition-property:none!important}.data-\[state\=closed\]\:duration-300[data-state=closed]{transition-duration:.3s!important}.data-\[state\=open\]\:duration-500[data-state=open]{transition-duration:.5s!important}.data-\[motion\^\=from-\]\:animate-in[data-motion^=from-],.data-\[state\=open\]\:animate-in[data-state=open],.data-\[state\=visible\]\:animate-in[data-state=visible]{animation-duration:.15s!important;animation-name:enter!important;--tw-enter-opacity:initial!important;--tw-enter-scale:initial!important;--tw-enter-rotate:initial!important;--tw-enter-translate-x:initial!important;--tw-enter-translate-y:initial!important}.data-\[motion\^\=to-\]\:animate-out[data-motion^=to-],.data-\[state\=closed\]\:animate-out[data-state=closed],.data-\[state\=hidden\]\:animate-out[data-state=hidden],.data-\[swipe\=end\]\:animate-out[data-swipe=end]{animation-duration:.15s!important;animation-name:exit!important;--tw-exit-opacity:initial!important;--tw-exit-scale:initial!important;--tw-exit-rotate:initial!important;--tw-exit-translate-x:initial!important;--tw-exit-translate-y:initial!important}.data-\[motion\^\=from-\]\:fade-in[data-motion^=from-]{--tw-enter-opacity:0!important}.data-\[motion\^\=to-\]\:fade-out[data-motion^=to-],.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity:0!important}.data-\[state\=closed\]\:fade-out-80[data-state=closed]{--tw-exit-opacity:0.8!important}.data-\[state\=hidden\]\:fade-out[data-state=hidden]{--tw-exit-opacity:0!important}.data-\[state\=open\]\:fade-in-0[data-state=open],.data-\[state\=visible\]\:fade-in[data-state=visible]{--tw-enter-opacity:0!important}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95!important}.data-\[state\=open\]\:zoom-in-90[data-state=open]{--tw-enter-scale:.9!important}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale:.95!important}.data-\[motion\=from-end\]\:slide-in-from-right-52[data-motion=from-end]{--tw-enter-translate-x:13rem!important}.data-\[motion\=from-start\]\:slide-in-from-left-52[data-motion=from-start]{--tw-enter-translate-x:-13rem!important}.data-\[motion\=to-end\]\:slide-out-to-right-52[data-motion=to-end]{--tw-exit-translate-x:13rem!important}.data-\[motion\=to-start\]\:slide-out-to-left-52[data-motion=to-start]{--tw-exit-translate-x:-13rem!important}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:-0.5rem!important}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:0.5rem!important}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:-0.5rem!important}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:0.5rem!important}.data-\[state\=closed\]\:slide-out-to-bottom[data-state=closed]{--tw-exit-translate-y:100%!important}.data-\[state\=closed\]\:slide-out-to-left[data-state=closed]{--tw-exit-translate-x:-100%!important}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x:-50%!important}.data-\[state\=closed\]\:slide-out-to-right-full[data-state=closed],.data-\[state\=closed\]\:slide-out-to-right[data-state=closed]{--tw-exit-translate-x:100%!important}.data-\[state\=closed\]\:slide-out-to-top[data-state=closed]{--tw-exit-translate-y:-100%!important}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y:-48%!important}.data-\[state\=open\]\:slide-in-from-bottom[data-state=open]{--tw-enter-translate-y:100%!important}.data-\[state\=open\]\:slide-in-from-left[data-state=open]{--tw-enter-translate-x:-100%!important}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x:-50%!important}.data-\[state\=open\]\:slide-in-from-right[data-state=open]{--tw-enter-translate-x:100%!important}.data-\[state\=open\]\:slide-in-from-top[data-state=open]{--tw-enter-translate-y:-100%!important}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y:-48%!important}.data-\[state\=open\]\:slide-in-from-top-full[data-state=open]{--tw-enter-translate-y:-100%!important}.data-\[state\=closed\]\:duration-300[data-state=closed]{animation-duration:.3s!important}.data-\[state\=open\]\:duration-500[data-state=open]{animation-duration:.5s!important}.data-\[panel-group-direction\=vertical\]\:after\:left-0[data-panel-group-direction=vertical]:after{content:var(--tw-content)!important;left:0!important}.data-\[panel-group-direction\=vertical\]\:after\:h-1[data-panel-group-direction=vertical]:after{content:var(--tw-content)!important;height:.25rem!important}.data-\[panel-group-direction\=vertical\]\:after\:w-full[data-panel-group-direction=vertical]:after{content:var(--tw-content)!important;width:100%!important}.data-\[panel-group-direction\=vertical\]\:after\:-translate-y-1\/2[data-panel-group-direction=vertical]:after{--tw-translate-y:-50%!important}.data-\[panel-group-direction\=vertical\]\:after\:-translate-y-1\/2[data-panel-group-direction=vertical]:after,.data-\[panel-group-direction\=vertical\]\:after\:translate-x-0[data-panel-group-direction=vertical]:after{content:var(--tw-content)!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.data-\[panel-group-direction\=vertical\]\:after\:translate-x-0[data-panel-group-direction=vertical]:after{--tw-translate-x:0px!important}.group[data-state=open] .group-data-\[state\=open\]\:rotate-180{--tw-rotate:180deg!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.dark\:border-destructive:is(.dark *){border-color:hsl(var(--destructive))!important}@media (min-width:640px){.sm\:bottom-0{bottom:0!important}.sm\:right-0{right:0!important}.sm\:top-auto{top:auto!important}.sm\:mt-0{margin-top:0!important}.sm\:inline{display:inline!important}.sm\:hidden{display:none!important}.sm\:w-\[250px\]{width:250px!important}.sm\:w-auto{width:auto!important}.sm\:w-full{width:100%!important}.sm\:max-w-sm{max-width:24rem!important}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}.sm\:flex-row{flex-direction:row!important}.sm\:flex-col{flex-direction:column!important}.sm\:items-center{align-items:center!important}.sm\:justify-end{justify-content:flex-end!important}.sm\:justify-center{justify-content:center!important}.sm\:justify-between{justify-content:space-between!important}.sm\:gap-0{gap:0!important}.sm\:gap-12{gap:3rem!important}.sm\:gap-2\.5{gap:.625rem!important}.sm\:gap-8{gap:2rem!important}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0!important;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)))!important;margin-right:calc(.5rem*var(--tw-space-x-reverse))!important}.sm\:space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0!important;margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)))!important;margin-right:calc(1rem*var(--tw-space-x-reverse))!important}.sm\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0!important;margin-bottom:calc(0px*var(--tw-space-y-reverse))!important;margin-top:calc(0px*(1 - var(--tw-space-y-reverse)))!important}.sm\:rounded-lg{border-radius:var(--radius)!important}.sm\:text-left{text-align:left!important}.data-\[state\=open\]\:sm\:slide-in-from-bottom-full[data-state=open]{--tw-enter-translate-y:100%!important}}@media (min-width:768px){.md\:absolute{position:absolute!important}.md\:block{display:block!important}.md\:flex{display:flex!important}.md\:hidden{display:none!important}.md\:min-h-\[calc\(100vh-32px\)\]{min-height:calc(100vh - 32px)!important}.md\:w-\[var\(--radix-navigation-menu-viewport-width\)\]{width:var(--radix-navigation-menu-viewport-width)!important}.md\:w-auto{width:auto!important}.md\:max-w-\[420px\]{max-width:420px!important}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}.md\:grid-cols-\[180px_1fr\]{grid-template-columns:180px 1fr!important}.md\:flex-row{flex-direction:row!important}.md\:items-end{align-items:flex-end!important}.md\:items-center{align-items:center!important}.md\:justify-start{justify-content:flex-start!important}.md\:justify-end{justify-content:flex-end!important}.md\:gap-10{gap:2.5rem!important}.md\:gap-2{gap:.5rem!important}.md\:gap-4{gap:1rem!important}.md\:gap-6{gap:1.5rem!important}.md\:bg-muted{background-color:hsl(var(--muted))!important}.md\:bg-transparent{background-color:transparent!important}.md\:p-8{padding:2rem!important}.md\:px-3{padding-left:.75rem!important;padding-right:.75rem!important}.md\:px-8{padding-left:2rem!important;padding-right:2rem!important}.md\:py-2{padding-bottom:.5rem!important;padding-top:.5rem!important}.md\:pl-4{padding-left:1rem!important}.md\:pl-6{padding-left:1.5rem!important}.md\:text-right{text-align:right!important}.md\:shadow-none{--tw-shadow:0 0 #0000!important;--tw-shadow-colored:0 0 #0000!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.md\:after\:-bottom-\[14px\]:after{bottom:-14px!important;content:var(--tw-content)!important}}@media (min-width:1024px){.lg\:flex{display:flex!important}.lg\:hidden{display:none!important}.lg\:min-w-\[350px\]{min-width:350px!important}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))!important}.lg\:gap-10{gap:2.5rem!important}}.\[\&\:\:-webkit-inner-spin-button\]\:appearance-none::-webkit-inner-spin-button{-webkit-appearance:none!important;appearance:none!important}.\[\&\:has\(\[aria-selected\]\)\]\:bg-accent:has([aria-selected]){background-color:hsl(var(--accent))!important}.first\:\[\&\:has\(\[aria-selected\]\)\]\:rounded-l-md:has([aria-selected]):first-child{border-bottom-left-radius:calc(var(--radius) - 2px)!important;border-top-left-radius:calc(var(--radius) - 2px)!important}.last\:\[\&\:has\(\[aria-selected\]\)\]\:rounded-r-md:has([aria-selected]):last-child{border-bottom-right-radius:calc(var(--radius) - 2px)!important;border-top-right-radius:calc(var(--radius) - 2px)!important}.\[\&\:has\(\[aria-selected\]\.day-outside\)\]\:bg-accent\/50:has([aria-selected].day-outside){background-color:hsl(var(--accent)/.5)!important}.\[\&\:has\(\[aria-selected\]\.day-range-end\)\]\:rounded-r-md:has([aria-selected].day-range-end){border-bottom-right-radius:calc(var(--radius) - 2px)!important;border-top-right-radius:calc(var(--radius) - 2px)!important}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0!important}.\[\&\:not\(\[aria-selected\=\'true\'\]\)\]\:rounded-md:not([aria-selected=true]){border-radius:calc(var(--radius) - 2px)!important}.\[\&\:not\(\[aria-selected\=\'true\'\]\)\]\:bg-white:not([aria-selected=true]){--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))!important}.hover\:\[\&\:not\(\[aria-selected\=\'true\'\]\)\]\:bg-accent:not([aria-selected=true]):hover{background-color:hsl(var(--accent))!important}.\[\&\>\*\]\:flex-1>*{flex:1 1 0%!important}.\[\&\>span\]\:line-clamp-1>span{display:-webkit-box!important;overflow:hidden!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:1!important}.\[\&\>svg\+div\]\:translate-y-\[-3px\]>svg+div{--tw-translate-y:-3px!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.\[\&\>svg\]\:absolute>svg{position:absolute!important}.\[\&\>svg\]\:left-4>svg{left:1rem!important}.\[\&\>svg\]\:top-4>svg{top:1rem!important}.\[\&\>svg\]\:size-3\.5>svg{height:.875rem!important;width:.875rem!important}.\[\&\>svg\]\:h-3>svg{height:.75rem!important}.\[\&\>svg\]\:w-3>svg{width:.75rem!important}.\[\&\>svg\]\:text-destructive>svg{color:hsl(var(--destructive))!important}.\[\&\>svg\]\:text-foreground>svg{color:hsl(var(--foreground))!important}.\[\&\>svg\~\*\]\:pl-7>svg~*{padding-left:1.75rem!important}.\[\&\>td\:first-child\>button\]\:rounded-l-md>td:first-child>button{border-bottom-left-radius:calc(var(--radius) - 2px)!important;border-top-left-radius:calc(var(--radius) - 2px)!important}.\[\&\>td\:last-child\>button\]\:rounded-r-md>td:last-child>button{border-bottom-right-radius:calc(var(--radius) - 2px)!important;border-top-right-radius:calc(var(--radius) - 2px)!important}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0!important}.\[\&\[data-panel-group-direction\=vertical\]\>div\]\:rotate-90[data-panel-group-direction=vertical]>div{--tw-rotate:90deg!important}.\[\&\[data-panel-group-direction\=vertical\]\>div\]\:rotate-90[data-panel-group-direction=vertical]>div,.\[\&\[data-state\=open\]\>svg\]\:rotate-180[data-state=open]>svg{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.\[\&\[data-state\=open\]\>svg\]\:rotate-180[data-state=open]>svg{--tw-rotate:180deg!important}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-left:.5rem!important;padding-right:.5rem!important}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-bottom:.375rem!important;padding-top:.375rem!important}.\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading]{font-size:.75rem!important;line-height:1rem!important}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{font-weight:500!important}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{color:hsl(var(--muted-foreground))!important}.\[\&_\[cmdk-group\]\:not\(\[hidden\]\)_\~\[cmdk-group\]\]\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0!important}.\[\&_\[cmdk-group\]\]\:px-2 [cmdk-group]{padding-left:.5rem!important;padding-right:.5rem!important}.\[\&_\[cmdk-input-wrapper\]_svg\]\:h-5 [cmdk-input-wrapper] svg{height:1.25rem!important}.\[\&_\[cmdk-input-wrapper\]_svg\]\:w-5 [cmdk-input-wrapper] svg{width:1.25rem!important}.\[\&_\[cmdk-input\]\]\:h-12 [cmdk-input]{height:3rem!important}.\[\&_\[cmdk-item\]\]\:px-2 [cmdk-item]{padding-left:.5rem!important;padding-right:.5rem!important}.\[\&_\[cmdk-item\]\]\:py-3 [cmdk-item]{padding-bottom:.75rem!important;padding-top:.75rem!important}.\[\&_\[cmdk-item\]_svg\]\:h-5 [cmdk-item] svg{height:1.25rem!important}.\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg{width:1.25rem!important}.\[\&_p\]\:leading-relaxed p{line-height:1.625!important}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0!important}.\[\&_tr\]\:border-b tr{border-bottom-width:1px!important}
  • eventkoi-lite/trunk/scripts/backend/src/components/event/event-description.js

    r3380900 r3392960  
    44import { Label } from "@/components/ui/label";
    55import { useEventEditContext } from "@/hooks/EventEditContext";
    6 import { useEffect, useRef, useState } from "react";
     6import { useEffect, useId, useRef, useState } from "react";
    77
    88export function EventDescription({ isInstance = false, value, onChange }) {
     
    1313
    1414  const editorRef = useRef();
     15  const uniqueId = useId(); // React 18+ built-in unique id
     16  const editorId = `event-description-${uniqueId}`;
     17
    1518  const [showHTML, setShowHTML] = useState(false);
    1619  const [htmlContent, setHtmlContent] = useState(
     
    1922
    2023  useEffect(() => {
    21     if (!window.tinymce || !editorRef.current || showHTML) return;
     24    // Wait until TinyMCE + ref + DOM ready
     25    if (!window.tinymce || !editorRef.current || showHTML) {
     26      return;
     27    }
    2228
    23     const id = "event-description";
    24     window.tinymce.init({
     29    // Always remove previous instance before init
     30    const oldEditor = window.tinymce.get(editorId);
     31    if (oldEditor) {
     32      oldEditor.remove();
     33    }
     34
     35    const editor = window.tinymce.init({
    2536      target: editorRef.current,
    2637      height: 250,
     
    3344        "Paragraph=p; Heading 1=h1; Heading 2=h2; Heading 3=h3; Heading 4=h4",
    3445      content_style: `
    35           body {
    36             padding: 2px 14px;
    37             font-family: Inter, system-ui, sans-serif;
    38             font-size: 14px;
    39             line-height: 1.6;
    40             color: #1f2937;
    41             background: transparent;
    42           }
    43         `,
    44       setup: (editor) => {
     46        body {
     47          padding: 2px 14px;
     48          font-family: Inter, system-ui, sans-serif;
     49          font-size: 14px;
     50          line-height: 1.6;
     51          color: #1f2937;
     52          background: transparent;
     53        }
     54      `,
     55      setup: (ed) => {
     56        // Heading buttons
    4557        const headings = [
    4658          { id: "heading1", label: "H1", block: "h1" },
     
    5163
    5264        headings.forEach(({ id, label, block }) => {
    53           editor.addButton(id, {
     65          ed.addButton(id, {
    5466            text: label,
    5567            tooltip: `Heading ${label}`,
    56             onclick: () => {
    57               editor.execCommand("FormatBlock", false, block);
    58             },
    59             onPostRender: function () {
     68            onclick: () => ed.execCommand("FormatBlock", false, block),
     69            onPostRender() {
    6070              const btn = this;
    61               editor.on("NodeChange", function () {
    62                 const isActive = editor.formatter.match(block);
    63                 btn.active(isActive);
     71              ed.on("NodeChange", () => {
     72                btn.active(ed.formatter.match(block));
    6473              });
    6574            },
     
    6776        });
    6877
    69         editor.addButton("htmlToggle", {
    70           text: showHTML ? "Visual" : "Raw HTML",
     78        // HTML toggle
     79        ed.addButton("htmlToggle", {
     80          text: "Switch to Code Editor",
    7181          tooltip: "Toggle HTML view",
    7282          onclick: () => {
    73             const content = editor.getContent({ format: "html" });
     83            const content = ed.getContent({ format: "html" });
    7484            setHtmlContent(content);
    75             setShowHTML(true); // switch to HTML mode
    76             window.tinymce.remove(`#${id}`); // cleanup
     85            setShowHTML(true);
     86            ed.remove();
    7787          },
    7888        });
    7989
    80         editor.on("Change Input Undo Redo", () => {
    81           const content = editor.getContent();
     90        ed.on("Change Input Undo Redo", () => {
     91          const content = ed.getContent();
    8292          if (isInstance && onChange) onChange(content);
    83           else setEvent((p) => ({ ...p, description: content }));
     93          else setEvent?.((p) => ({ ...p, description: content }));
    8494        });
    8595
    86         editor.on("init", () => {
    87           editor.setContent(htmlContent || "");
     96        ed.on("init", () => {
     97          ed.setContent(htmlContent || "");
    8898        });
    8999      },
     
    91101
    92102    return () => {
    93       if (window.tinymce) window.tinymce.remove(`#${id}`);
     103      const inst = window.tinymce?.get(editorId);
     104      if (inst) inst.remove();
    94105    };
    95   }, [showHTML]); // re-init when toggling back to visual
     106  }, [showHTML, editorId]);
     107
     108  // Re-sync when external value changes (for instance edit load)
     109  useEffect(() => {
     110    setHtmlContent(value || event?.description || "");
     111  }, [value, event?.description]);
    96112
    97113  return (
    98114    <Panel className="p-0">
    99       <Label htmlFor="event-description">Event description</Label>
     115      <Label htmlFor={editorId}>Event description</Label>
    100116      <div className="text-muted-foreground mb-2">
    101117        Tell people what your event is about.
     
    103119
    104120      {showHTML ? (
    105         <textarea
    106           className="w-full min-h-[250px] rounded-md border border-input bg-background p-2 text-sm font-mono"
    107           value={htmlContent}
    108           onChange={(e) => setHtmlContent(e.target.value)}
    109           onBlur={(e) => {
    110             if (isInstance && onChange) onChange(e.target.value);
    111             else setEvent((p) => ({ ...p, description: e.target.value }));
    112           }}
    113         />
     121        <div className="mb-2 border border-input rounded-md">
     122          <div className="mce-toolbar-grp mce-container mce-panel mce-first mce-last flex justify-end py-[4px] shadow-[0_1px_2px_rgba(0,0,0,0.04)]">
     123            <button
     124              type="button"
     125              onClick={() => setShowHTML(false)}
     126              className="mx-[8px] px-[6px] py-[4px] mce-btn mce-btn-has-text text-sm border-none bg-transparent cursor-pointer hover:bg-[#e5e7eb] text-[#374151]"
     127            >
     128              <span className="mce-txt">Switch to Visual Editor</span>
     129            </button>
     130          </div>
     131          <textarea
     132            className="w-full min-h-[250px] rounded-md border-0 bg-background p-2 text-sm font-mono focus:outline-none focus:shadow-none"
     133            value={htmlContent}
     134            onChange={(e) => setHtmlContent(e.target.value)}
     135            onBlur={(e) => {
     136              if (isInstance && onChange) onChange(e.target.value);
     137              else setEvent?.((p) => ({ ...p, description: e.target.value }));
     138            }}
     139          />
     140        </div>
    114141      ) : (
    115142        <textarea
    116           id="event-description"
     143          id={editorId}
    117144          ref={editorRef}
    118145          defaultValue={htmlContent}
     
    120147        />
    121148      )}
    122 
    123       {showHTML && (
    124         <button
    125           type="button"
    126           className="mt-2 text-sm text-primary underline"
    127           onClick={() => setShowHTML(false)}
    128         >
    129           Switch back to Visual
    130         </button>
    131       )}
    132149    </Panel>
    133150  );
  • eventkoi-lite/trunk/scripts/backend/src/scss/global.scss

    r3374341 r3392960  
    7979    background-color: #f9fafb; /* gray-50 */
    8080    overflow: hidden;
     81    box-sizing: border-box;
    8182  }
    8283
     
    8687    border-bottom: 0;
    8788    padding: 0;
     89  }
     90
     91  .mce-container-body.mce-flow-layout {
     92    display: flex;
     93    .mce-btn-group.mce-last {
     94      margin-left: auto;
     95    }
    8896  }
    8997
     
    154162    margin-left: 0;
    155163  }
     164
     165  /**
     166 * Replace TinyMCE's "remove formatting" button icon with Lucide's version.
     167 * Works inside WordPress' wp.editor TinyMCE.
     168 */
     169  .mce-i-removeformat::before {
     170    content: "";
     171    display: inline-block;
     172    width: 16px;
     173    height: 16px;
     174    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7V4h16v3'/%3E%3Cpath d='M5 20h6'/%3E%3Cpath d='M13 4 8 20'/%3E%3Cpath d='m15 15 5 5'/%3E%3Cpath d='m20 15-5 5'/%3E%3C/svg%3E");
     175    background-repeat: no-repeat;
     176    background-position: center;
     177    background-size: 14px 14px;
     178    vertical-align: middle;
     179  }
     180
     181  /* Prevent TinyMCE icon font from rendering behind it */
     182  .mce-i-removeformat {
     183    font-family: none !important;
     184    color: currentColor !important;
     185  }
    156186}
Note: See TracChangeset for help on using the changeset viewer.