From 258aee939c150ba1e6118b80fcc4b36682c4e021 Mon Sep 17 00:00:00 2001 From: josh Date: Wed, 11 Nov 2026 21:30:20 -0500 Subject: [PATCH] Publish eventLabs 0.5.0 --- README.md | 41 ++ assets/calendar-grid.js | 91 +++ assets/event-editor.css | 148 ++++ assets/event-editor.js | 63 ++ assets/events.css | 411 +++++++++++ assets/events.js | 18 + assets/maps.js | 115 +++ assets/migration.js | 48 ++ assets/vendor/leaflet/LICENSE | 26 + assets/vendor/leaflet/images/layers-2x.png | Bin 0 -> 1259 bytes assets/vendor/leaflet/images/layers.png | Bin 0 -> 696 bytes .../vendor/leaflet/images/marker-icon-2x.png | Bin 0 -> 2464 bytes assets/vendor/leaflet/images/marker-icon.png | Bin 0 -> 1466 bytes .../vendor/leaflet/images/marker-shadow.png | Bin 0 -> 618 bytes assets/vendor/leaflet/leaflet.css | 661 ++++++++++++++++++ assets/vendor/leaflet/leaflet.js | 6 + assets/vendor/leaflet/leaflet.js.map | 1 + burn-events.php | 24 + docs/API.md | 101 +++ docs/BURNWORKS-INTEGRATION.md | 113 +++ docs/PARITY-AUDIT.md | 27 + docs/images/calendar.webp | Bin 0 -> 49544 bytes docs/images/single-event.webp | Bin 0 -> 85928 bytes includes/class-admin.php | 495 +++++++++++++ includes/class-api.php | 560 +++++++++++++++ includes/class-burnworks.php | 146 ++++ includes/class-calendar-grid.php | 200 ++++++ includes/class-calendar.php | 624 +++++++++++++++++ includes/class-clubs.php | 197 ++++++ includes/class-community.php | 213 ++++++ includes/class-elementor-widgets.php | 288 ++++++++ includes/class-events.php | 423 +++++++++++ includes/class-legacy-migration.php | 333 +++++++++ includes/class-map-view.php | 169 +++++ includes/class-maps.php | 164 +++++ includes/class-platform.php | 65 ++ includes/class-schedule.php | 139 ++++ includes/class-single-event-templates.php | 341 +++++++++ includes/class-transfer.php | 390 +++++++++++ includes/starter-layout.php | 47 ++ templates/front.php | 49 ++ 41 files changed, 6737 insertions(+) create mode 100644 assets/calendar-grid.js create mode 100644 assets/event-editor.css create mode 100644 assets/event-editor.js create mode 100644 assets/events.css create mode 100644 assets/events.js create mode 100644 assets/maps.js create mode 100644 assets/migration.js create mode 100644 assets/vendor/leaflet/LICENSE create mode 100644 assets/vendor/leaflet/images/layers-2x.png create mode 100644 assets/vendor/leaflet/images/layers.png create mode 100644 assets/vendor/leaflet/images/marker-icon-2x.png create mode 100644 assets/vendor/leaflet/images/marker-icon.png create mode 100644 assets/vendor/leaflet/images/marker-shadow.png create mode 100644 assets/vendor/leaflet/leaflet.css create mode 100644 assets/vendor/leaflet/leaflet.js create mode 100644 assets/vendor/leaflet/leaflet.js.map create mode 100644 burn-events.php create mode 100644 docs/API.md create mode 100644 docs/BURNWORKS-INTEGRATION.md create mode 100644 docs/PARITY-AUDIT.md create mode 100644 docs/images/calendar.webp create mode 100644 docs/images/single-event.webp create mode 100644 includes/class-admin.php create mode 100644 includes/class-api.php create mode 100644 includes/class-burnworks.php create mode 100644 includes/class-calendar-grid.php create mode 100644 includes/class-calendar.php create mode 100644 includes/class-clubs.php create mode 100644 includes/class-community.php create mode 100644 includes/class-elementor-widgets.php create mode 100644 includes/class-events.php create mode 100644 includes/class-legacy-migration.php create mode 100644 includes/class-map-view.php create mode 100644 includes/class-maps.php create mode 100644 includes/class-platform.php create mode 100644 includes/class-schedule.php create mode 100644 includes/class-single-event-templates.php create mode 100644 includes/class-transfer.php create mode 100644 includes/starter-layout.php create mode 100644 templates/front.php diff --git a/README.md b/README.md index e69de29..bba6fb4 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,41 @@ +# eventLabs + +**A WordPress events platform by hostLabs** + +Publish an events calendar, design single-event pages in Elementor, and sync club events from burnWorks. eventLabs manages schedules, venues, organizers, and series in WordPress and provides its own versioned REST API. + +![Month calendar with a multi-day event, category colors, and an event preview](docs/images/calendar.webp) + +## Get started + +1. Install this directory in `wp-content/plugins/burn-events/` and activate **eventLabs** under **Plugins**. Requires WordPress 6.9+ and PHP 8.1+. The Elementor builder and widgets use Elementor Free. +2. Open **Events → Add Event**. Set the schedule, link a venue, and publish. Use **Events → Settings → View calendar** to open the public calendar. +3. Use **Events → Single Event Templates → Create starter template** to design a single-event layout. Publish it, then assign it to an event or choose **Use as default**. +4. Add **Event Calendar** or **Event List** from the **eventLabs** widget category in Elementor. You can also embed a calendar with `[burn_events view="month"]`. + +## Calendar and publishing + +- **Calendar views** include List, Month, Week, Day, Photo, Map, and Summary. In Month and Week, multi-day bars span their dates and show event previews on hover and keyboard focus. Set a custom color under **Events → Event Categories**. +- **Schedules** support all-day and timed events, daily through yearly recurrence, additional dates, and exclusions. Link multiple venues and organizers and group related events into series. +- **Maps** load on single events with mapped venues when enabled. The calendar Map view groups events into pins by location and filters them by date range. Save a Geoapify key and enable OpenStreetMap maps under **Events → Settings**. +- **Community submissions** use `[burn_events_submit]` and `[burn_events_mine]`. Submitted events enter Pending Review. +- **Imports and migration** are under **Events → Import and Export**. Upload CSV or iCalendar files, or review a detected The Events Calendar migration. The migration copies drafts with their saved occurrence dates and linked records. + +![A single-event page with its photo, venue, map, and calendar links](docs/images/single-event.webp) + +## API quick start + +The authenticated API uses `eventlabs/v1`. Create a WordPress user with the **eventLabs Integration** role and generate an Application Password in that user's profile. Keep the password on the server. + +```sh +curl --user "$EVENTLABS_USER:$EVENTLABS_APP_PASSWORD" \ + "$WORDPRESS_URL/wp-json/eventlabs/v1/schema" +``` + +Use `GET /events` to list records, `POST /events` to create one, and `PATCH /events/{id}` to update it. Use `PUT /events/external/{source}/{external_id}` to keep an external record tied to the same WordPress ID. The schema endpoint describes the current write fields and configured custom fields. For sites with plain permalinks, use `/?rest_route=/eventlabs/v1/schema`. + +### burnWorks clubs + +Sync a named club or sub-club with `PUT /burnworks/workspaces/{workspace_id}/clubs/{club_id}`. Send events to `PUT /burnworks/workspaces/{workspace_id}/events/{event_id}` with the burnWorks `club_id`. An event stores its workspace and club identity in a hidden field. In Elementor, use **Club or sub-club** on **Event Calendar** and **Event List** to show a whole workspace or one club. + +See the [API reference](docs/API.md) for routes, payloads, and errors, and the [burnWorks handoff](docs/BURNWORKS-INTEGRATION.md) for field mapping and publishing rules. The [feature and settings audit](docs/PARITY-AUDIT.md) records the current coverage against the reference packages. diff --git a/assets/calendar-grid.js b/assets/calendar-grid.js new file mode 100644 index 0000000..b91f7f9 --- /dev/null +++ b/assets/calendar-grid.js @@ -0,0 +1,91 @@ +(() => { + const selector = '[data-be-preview]'; + const margin = 10; + let preview; + let tile; + let hideTimer; + + function hide() { + window.clearTimeout(hideTimer); + if (!tile) return; + tile.removeAttribute('aria-describedby'); + tile = null; + preview.hidden = true; + } + + function position() { + if (!tile) return; + if (!tile.isConnected) { + hide(); + return; + } + const viewport = document.documentElement; + const anchor = tile.getBoundingClientRect(); + const grid = tile.closest('.be-grid-scroll').getBoundingClientRect(); + if (anchor.bottom <= 0 || anchor.top >= viewport.clientHeight || + anchor.right <= grid.left || anchor.left >= grid.right) { + hide(); + return; + } + + const {width, height} = preview.getBoundingClientRect(); + const below = anchor.bottom + margin; + const above = anchor.top - height - margin; + const maxTop = viewport.clientHeight - height - margin; + const top = below <= maxTop || above < margin ? below : above; + preview.style.left = Math.max(margin, Math.min(anchor.left, viewport.clientWidth - width - margin)) + 'px'; + preview.style.top = Math.max(margin, Math.min(top, maxTop)) + 'px'; + } + + function show(target) { + window.clearTimeout(hideTimer); + if (target === tile) return; + const content = document.getElementById(target.dataset.bePreview); + if (!content?.content) return; + if (!preview) { + preview = document.createElement('div'); + preview.className = 'be-grid-preview'; + preview.id = 'be-calendar-event-tooltip'; + preview.setAttribute('role', 'tooltip'); + preview.hidden = true; + document.body.append(preview); + } + hide(); + tile = target; + preview.replaceChildren(content.content.cloneNode(true)); + preview.hidden = false; + tile.setAttribute('aria-describedby', preview.id); + position(); + } + + function scheduleHide() { + window.clearTimeout(hideTimer); + hideTimer = window.setTimeout(() => { + if (tile && document.activeElement !== tile && !tile.matches(':hover') && !preview.matches(':hover')) hide(); + }, 150); + } + + document.addEventListener('pointerover', event => { + if (event.pointerType === 'touch') return; + const target = event.target.closest?.(selector); + if (target && !target.contains(event.relatedTarget)) show(target); + }); + document.addEventListener('pointerout', event => { + if (event.pointerType !== 'touch' && tile && (tile.contains(event.target) || preview.contains(event.target))) { + scheduleHide(); + } + }); + document.addEventListener('focusin', event => { + const target = event.target.closest?.(selector); + if (target) show(target); + }); + document.addEventListener('focusout', scheduleHide); + document.addEventListener('keydown', event => { + if (event.key === 'Escape' && tile) { + hide(); + event.preventDefault(); + } + }); + window.addEventListener('resize', position); + document.addEventListener('scroll', position, {capture: true, passive: true}); +})(); diff --git a/assets/event-editor.css b/assets/event-editor.css new file mode 100644 index 0000000..f5e7ccb --- /dev/null +++ b/assets/event-editor.css @@ -0,0 +1,148 @@ +.be-event-editor { + --be-editor-ink: #17243a; + --be-editor-muted: #526177; + --be-editor-accent: #3946ba; + --be-editor-border: #d8e1ee; + container-type: inline-size; + display: grid; + gap: 14px; + padding: 5px 0; + color: var(--be-editor-ink); + font: 400 13px/1.45 Inter, system-ui, sans-serif; +} +.be-event-editor *, .be-event-editor *::before, .be-event-editor *::after { box-sizing: border-box; } +.be-event-editor [hidden] { display: none !important; } +.be-editor-section { + min-width: 0; + margin: 0; + padding: 19px 20px; + border: 1px solid var(--be-editor-border); + border-radius: 13px; + background: #fff; +} +.be-editor-schedule { border-color: #d5dff0; background: #f7f9fd; } +.be-editor-heading { + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: space-between; + gap: 8px 14px; + margin-bottom: 14px; +} +.be-editor-heading h3 { + margin: 0; + padding: 0; + color: var(--be-editor-ink); + font: 680 16px/1.25 Inter, system-ui, sans-serif; + letter-spacing: -.02em; +} +.be-editor-fields { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); + gap: 12px 14px; + margin: 0; + align-items: start; +} +.be-editor-dates { grid-template-columns: repeat(4, minmax(0, 1fr)); } +.be-editor-zone { grid-column: span 2; } +.be-event-editor .be-editor-fields > label:not(.be-editor-toggle), .be-editor-location > label { + display: grid; + gap: 5px; + min-width: 0; + color: var(--be-editor-ink); + font-size: 13px; + font-weight: 630; +} +.be-event-editor :is(input:not([type=checkbox]), select) { + min-width: 0; + width: 100%; + max-width: none; + height: 38px; + min-height: 38px; + margin: 0; + padding: 5px 10px; + border: 1px solid #bfcadc; + border-radius: 7px; + background-color: #fff; + color: var(--be-editor-ink); + font: 400 13px/1.3 Inter, system-ui, sans-serif; +} +.be-event-editor select { padding-inline-end: 26px; } +.be-event-editor :is(input, select, summary):focus-visible { + border-color: var(--be-editor-accent); + outline: 2px solid #6572d3; + outline-offset: 2px; + box-shadow: none; +} +.be-editor-toggle { + display: inline-flex; + align-items: center; + gap: 8px; + min-height: 34px; + color: var(--be-editor-ink); + font-weight: 600; + cursor: pointer; +} +.be-event-editor input[type=checkbox] { width: 16px; height: 16px; margin: 0; } +.be-editor-visibility { display: flex; flex-wrap: wrap; gap: 2px 20px; margin-top: 11px; } +.be-editor-recurrence { padding: 0; } +.be-editor-recurrence > summary, .be-editor-picker summary { + display: flex; + align-items: center; + gap: 9px; + cursor: pointer; + list-style: none; +} +.be-editor-recurrence > summary { min-height: 55px; padding: 11px 20px; border-radius: 12px; font-size: 15px; font-weight: 670; } +.be-event-editor summary::-webkit-details-marker { display: none; } +.be-editor-recurrence > summary::after, .be-editor-picker summary::after { + content: ''; + flex: none; + width: 7px; + height: 7px; + margin-inline: auto 3px; + border-right: 2px solid #526177; + border-bottom: 2px solid #526177; + transform: translateY(-2px) rotate(45deg); +} +.be-event-editor details[open] > summary::after { transform: translateY(2px) rotate(225deg); } +.be-editor-frequency { padding: 3px 8px; border-radius: 999px; background: #eef1fc; color: #34449a; font-size: 11px; font-weight: 650; } +.be-editor-recurrence[open] > summary { border-bottom: 1px solid var(--be-editor-border); border-radius: 12px 12px 0 0; } +.be-editor-recurrence-body { display: grid; gap: 13px; padding: 15px 20px 18px; } +.be-editor-recurrence-body .description { margin: 0; color: var(--be-editor-muted); font-size: 12px; } +.be-editor-weekdays { min-width: 0; margin: 0; padding: 0; border: 0; } +.be-editor-weekdays > div { display: flex; flex-wrap: wrap; gap: 6px; } +.be-editor-picker { min-width: 0; margin: 0; padding: 0; border: 0; } +.be-editor-picker legend, .be-editor-weekdays legend { margin: 0 0 5px; padding: 0; color: var(--be-editor-ink); font-size: 13px; font-weight: 630; } +.be-editor-weekdays label { + position: relative; + padding: 6px 10px; + border: 1px solid #cbd5e6; + border-radius: 7px; + background: #fff; + font-weight: 600; + cursor: pointer; +} +.be-editor-weekdays input[type=checkbox] { position: absolute; width: 1px; height: 1px; opacity: 0; } +.be-editor-weekdays label:has(input:checked) { border-color: #abb6f0; background: #edf0ff; color: #26358e; } +.be-editor-weekdays label:has(input:focus-visible) { outline: 2px solid #6572d3; outline-offset: 2px; } +.be-editor-picker details { border: 1px solid #bfcadc; border-radius: 7px; background: #fff; } +.be-editor-picker summary, .be-editor-picker-empty { min-height: 36px; padding: 6px 9px; border-radius: 7px; } +.be-editor-picker summary span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } +.be-editor-picker-empty { display: flex; align-items: center; min-height: 38px; border: 1px dashed #d6deeb; background: #f6f8fb; color: var(--be-editor-muted); } +.be-editor-picker-body { padding: 8px; border-top: 1px solid var(--be-editor-border); } +.be-editor-picker-options { max-height: 175px; overflow: auto; } +.be-editor-picker-options label { display: flex; align-items: start; gap: 8px; padding: 6px 4px; cursor: pointer; overflow-wrap: anywhere; } +.be-editor-picker-options input { flex: none; } +.be-editor-no-matches { margin: 4px 0; color: var(--be-editor-muted); } +.be-editor-location { margin-top: 13px; } + +@container (max-width: 640px) { + .be-editor-dates { grid-template-columns: repeat(2, minmax(0, 1fr)); } +} +@container (max-width: 335px) { + .be-editor-section:not(.be-editor-recurrence), .be-editor-recurrence-body { padding: 13px; } + .be-editor-recurrence > summary { padding-inline: 13px; } + .be-editor-dates { grid-template-columns: minmax(0, 1fr); } + .be-editor-zone { grid-column: auto; } +} diff --git a/assets/event-editor.js b/assets/event-editor.js new file mode 100644 index 0000000..588ec8f --- /dev/null +++ b/assets/event-editor.js @@ -0,0 +1,63 @@ +(() => { + const editorSelector = '[data-be-event-editor]'; + + function showFields(group, visible) { + group.hidden = !visible; + for (const control of group.querySelectorAll('input, select')) { + control.disabled = !visible; + } + } + + function updateSchedule(editor) { + const allDay = editor.querySelector('[name="be[all_day]"]').checked; + for (const time of editor.querySelectorAll('[data-be-time]')) { + showFields(time, !allDay); + } + + const repeat = editor.querySelector('[name="be[repeat]"]'); + for (const group of editor.querySelectorAll('[data-be-repeat]')) { + const mode = group.dataset.beRepeat; + showFields(group, mode === repeat.value || (mode === 'enabled' && repeat.value !== 'none')); + } + editor.querySelector('[data-be-frequency]').textContent = repeat.selectedOptions[0].textContent; + } + + function updateSelection(picker) { + const summary = picker.querySelector('[data-be-picker-selection]'); + const labels = [...picker.querySelectorAll('[data-be-picker-option] input:checked')] + .map(input => input.nextElementSibling.textContent); + summary.textContent = labels.join(', ') || summary.dataset.beEmpty; + } + + function initialize() { + for (const editor of document.querySelectorAll(editorSelector)) updateSchedule(editor); + } + + document.addEventListener('change', event => { + const editor = event.target.closest(editorSelector); + if (!editor) return; + if (event.target.name === 'be[all_day]' || event.target.name === 'be[repeat]') { + updateSchedule(editor); + } else if (event.target.closest('[data-be-picker-option]')) { + updateSelection(event.target.closest('[data-be-picker]')); + } + }); + + document.addEventListener('input', event => { + if (!event.target.matches('[data-be-picker-search]')) return; + const picker = event.target.closest('[data-be-picker]'); + const search = event.target.value.trim().toLocaleLowerCase(); + let found = false; + for (const option of picker.querySelectorAll('[data-be-picker-option]')) { + option.hidden = !option.textContent.toLocaleLowerCase().includes(search); + found = found || !option.hidden; + } + picker.querySelector('[data-be-no-options]').hidden = found; + }); + + if (document.readyState === 'loading') { + document.addEventListener('DOMContentLoaded', initialize, {once: true}); + } else { + initialize(); + } +})(); diff --git a/assets/events.css b/assets/events.css new file mode 100644 index 0000000..2d9c549 --- /dev/null +++ b/assets/events.css @@ -0,0 +1,411 @@ +.be-page, .be-calendar, .be-community, .be-starter { + --be-ink: #142033; + --be-muted: #4e5d72; + --be-accent: #3946ba; + --be-accent-dark: #293585; + --be-border: #dfe5ee; + --be-bg: #f5f7fc; + --be-white: #fff; + --be-radius: 18px; + color: var(--be-ink); + font-family: Inter, system-ui, sans-serif; + line-height: 1.55; +} + +.be-page *, .be-calendar *, .be-community *, .be-starter * { box-sizing: border-box; } +.be-page { box-sizing: border-box; margin: 0 auto; padding: clamp(28px, 6vw, 84px) clamp(16px, 4vw, 44px); width: min(100%, 1280px); } +.be-calendar, .be-community { min-width: 0; } +.be-calendar-header { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin: 0 0 24px; } +.be-calendar-header h1, .be-event-title, .be-linked-header h1 { + margin: 0; + color: var(--be-ink); + font: 700 clamp(2rem, 5.3vw, 4rem)/1.06 Inter, system-ui, sans-serif; + letter-spacing: -.055em; + text-wrap: balance; +} + +.be-calendar a, .be-community a, .be-single a, .be-starter a, .be-linked-header a { color: var(--be-accent-dark); } +.be-calendar a:focus-visible, .be-page :is(a, button, input, select, textarea):focus-visible, +.be-community :is(a, button, input, select, textarea):focus-visible { + outline: 3px solid #717bde; + outline-offset: 3px; +} +.be-calendar-subscribe { white-space: nowrap; font-size: .875rem; } +.be-button, .be-calendar .be-button, .be-community .be-button, .be-single .be-button { + display: inline-flex; + align-items: center; + justify-content: center; + min-height: 44px; + border: 1px solid var(--be-accent); + border-radius: 10px; + padding: .62em 1.2em; + background: var(--be-accent); + color: white; + font: 650 .94rem/1.3 Inter, system-ui, sans-serif; + text-decoration: none; + cursor: pointer; +} +.be-button:hover, .be-calendar .be-button:hover, .be-community .be-button:hover, .be-single .be-button:hover { background: var(--be-accent-dark); color: white; } + +.be-search { + display: flex; + flex-wrap: wrap; + gap: 14px; + align-items: end; + padding: clamp(14px, 2.6vw, 24px); + border: 1px solid var(--be-border); + border-radius: var(--be-radius); + background: var(--be-bg); +} +.be-search label, .be-submission label { display: grid; gap: .38rem; font-size: .88rem; font-weight: 600; } +.be-search label { flex: 1 1 140px; } +.be-search :is(input, select), .be-submission :is(input:not([type=checkbox]), select, textarea) { + min-height: 44px; + width: 100%; + border: 1px solid #bfcadb; + border-radius: 9px; + padding: .62em .82em; + background: white; + color: var(--be-ink); + font: 400 .96rem/1.3 Inter, system-ui, sans-serif; +} +.be-search input::placeholder { color: #5b687a; } +.be-calendar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 20px 0; } +.be-calendar-toolbar > a { font-size: .88rem; } +.be-view-tabs { display: flex; flex-wrap: wrap; gap: 3px; } +.be-view-tabs a { + display: inline-flex; + align-items: center; + padding: .44em .85em; + min-height: 38px; + border-radius: 8px; + color: var(--be-muted); + font-size: .9rem; + font-weight: 600; + text-decoration: none; +} +.be-view-tabs a:hover, .be-view-tabs a[aria-current] { background: #e8ecfc; color: #283477; } +.be-date-nav { display: flex; align-items: center; gap: .75rem; margin: 0 0 16px; } +.be-date-nav h2 { margin: 0; font: 650 clamp(1.15rem, 3vw, 1.55rem)/1.15 Inter, system-ui, sans-serif; letter-spacing: -.035em; } +.be-date-nav > a:not(.be-today) { + display: grid; + place-items: center; + width: 38px; + height: 38px; + border: 1px solid var(--be-border); + border-radius: 9px; + font-size: 1.4rem; + text-decoration: none; +} +.be-date-nav .be-today { margin-left: auto; font-size: .9rem; } +.be-pagination { display: flex; justify-content: space-between; gap: 14px; margin-top: 20px; } +.be-empty { padding: 28px; border: 1px dashed #c0cbe2; border-radius: var(--be-radius); color: var(--be-muted); background: var(--be-bg); } +.be-event-list { display: grid; gap: 12px; } +.be-event-card { + display: flex; + min-width: 0; + gap: clamp(.8rem, 2.8vw, 1.5rem); + align-items: start; + padding: clamp(14px, 3vw, 24px); + border: 1px solid var(--be-border); + border-radius: var(--be-radius); + background: var(--be-white); + box-shadow: 0 3px 14px rgb(23 42 75 / 3%); +} +.be-event-card:hover { border-color: #b0bce7; } +.be-date-tile { + display: grid; + flex: 0 0 60px; + min-height: 61px; + align-content: center; + justify-items: center; + border-radius: 11px; + background: #e9edfc; + color: #2e3b91; + line-height: 1.15; +} +.be-date-tile span { font-size: .75rem; font-weight: 650; text-transform: uppercase; } +.be-date-tile strong { font-size: 1.45rem; } +.be-card-body { min-width: 0; overflow-wrap: anywhere; } +.be-card-body h3 { margin: .1em 0 .2em; font: 650 clamp(1.12rem, 2vw, 1.55rem)/1.2 Inter, system-ui, sans-serif; letter-spacing: -.028em; } +.be-card-body h3 a { color: var(--be-ink); text-decoration: none; } +.be-card-body h3 a:hover { text-decoration: underline; } +.be-card-body p { margin: .35em 0 0; } +.be-meta { color: var(--be-muted); font-size: .88rem; } +.be-status { display: inline-block; margin-top: .5em; padding: .2em .58em; border-radius: 6px; color: #273782; background: #e9edfc; font-size: .81rem; font-weight: 650; } +.be-view-photo { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); } +.be-view-photo .be-event-card { display: grid; gap: .8rem; align-content: start; } +.be-view-photo .be-date-tile { width: 60px; } +.be-card-image img, .be-single-image img { display: block; width: 100%; height: auto; object-fit: cover; border-radius: 12px; } +.be-card-image img { aspect-ratio: 16 / 10; } +.be-view-summary .be-event-card { padding-block: 12px; } + +.be-grid-color { + --be-category-accent: var(--be-category-custom, hsl(var(--be-category-hue, 223) var(--be-category-saturation, 13%) 36%)); + --be-category-fill: color-mix(in srgb, var(--be-category-accent) 11%, white); + --be-category-text: color-mix(in srgb, var(--be-category-accent) 31%, #142033); +} +.be-grid-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 12px; padding: 0; list-style: none; } +.be-grid-legend li { display: flex; align-items: center; gap: .45em; color: var(--be-category-text); font-size: .8rem; font-weight: 650; } +.be-grid-legend li::before { content: ''; width: .65em; height: .65em; border-radius: 50%; background: var(--be-category-accent); } +.be-grid-scroll { max-width: 100%; overflow: auto; border: 1px solid var(--be-border); border-radius: var(--be-radius); } +.be-grid-scroll:focus-visible { outline: 3px solid #717bde; outline-offset: 3px; } +.be-grid { min-width: 540px; } +.be-grid-weekdays, .be-grid-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); } +.be-weekday { padding: .66rem .75rem; background: #edf1f9; color: var(--be-muted); font-size: .8rem; font-weight: 700; } +.be-grid-week { grid-template-rows: 37px repeat(var(--be-tracks), minmax(29px, auto)) minmax(8px, 1fr); min-height: 108px; border-top: 1px solid var(--be-border); } +.be-grid-day { grid-column: var(--be-day); grid-row: 1 / -1; min-width: 0; padding: 4px 7px; border-inline-end: 1px solid var(--be-border); background: white; } +.be-grid-day:nth-child(7) { border-inline-end: 0; } +.be-grid-day.be-grid-other { background: #f5f7fc; color: var(--be-muted); } +.be-grid-day time { display: inline-grid; place-items: center; min-width: 27px; height: 27px; font: 650 .86rem/1 Inter, system-ui, sans-serif; } +.be-grid-day time[aria-current] { border-radius: 50%; background: var(--be-accent); color: white; } +.be-grid a.be-grid-event { + grid-column: var(--be-start) / span var(--be-span); + grid-row: var(--be-track); + z-index: 1; + display: flex; + align-items: center; + min-width: 0; + margin: 0 4px 4px; + padding: 3px 7px; + border-inline-start: 3px solid var(--be-category-accent); + border-radius: 6px; + background: var(--be-category-fill); + color: var(--be-category-text); + font: 650 .79rem/1.35 Inter, system-ui, sans-serif; + text-decoration: none; +} +.be-grid-event span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } +.be-grid a.be-grid-event:hover { box-shadow: inset 0 0 0 1px var(--be-category-accent); } +.be-grid a.be-grid-event:focus-visible { outline-offset: -2px; outline-color: var(--be-category-accent); } +.be-grid a.be-grid-continued { margin-inline-start: 0; border-inline-start-width: 0; border-start-start-radius: 0; border-end-start-radius: 0; } +.be-grid a.be-grid-continues { margin-inline-end: 0; border-start-end-radius: 0; border-end-end-radius: 0; } +.be-grid-preview { + position: fixed; + z-index: 1000; + box-sizing: border-box; + width: min(330px, calc(100vw - 20px)); + max-height: calc(100vh - 20px); + overflow: auto; + border: 1px solid #d8e0ec; + border-radius: 13px; + background: white; + box-shadow: 0 12px 30px rgb(20 32 51 / 18%); + color: #263549; + font: 400 .86rem/1.48 Inter, system-ui, sans-serif; +} +.be-grid-preview[hidden] { display: none; } +.be-preview-content { padding: 13px 15px; border-top: 3px solid var(--be-category-accent); overflow-wrap: anywhere; } +.be-preview-heading { display: flex; align-items: center; gap: 11px; margin-bottom: .65rem; } +.be-preview-heading img { display: block; flex: none; width: 56px; height: 56px; border-radius: 8px; object-fit: cover; } +.be-preview-heading strong { display: block; color: #142033; font-size: 1.02rem; line-height: 1.25; } +.be-preview-content p { margin: .22rem 0; } +.be-preview-content .be-preview-category { margin: 0 0 .23rem; color: var(--be-category-text); font-size: .73rem; font-weight: 700; } +.be-preview-time, .be-preview-cost { font-weight: 650; } +.be-preview-content .be-preview-excerpt { margin-top: .55rem; color: #4e5d72; } + +.be-map-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 305px); gap: 16px; align-items: start; } +.be-map-layout-list { grid-template-columns: minmax(0, 1fr); } +.be-map-count { margin: 0 0 12px; color: var(--be-muted); font-size: .9rem; font-weight: 650; } +.be-map { min-width: 0; } +.be-map-compact { margin-top: 12px; } +.be-map-canvas { + height: clamp(360px, 52vw, 555px); + border: 1px solid var(--be-border); + border-radius: var(--be-radius); + background: #edf2f7; + isolation: isolate; +} +.be-map-compact .be-map-canvas { height: 240px; border-radius: 14px; } +.be-map .leaflet-control-attribution { color: #23334a; } +.be-map .leaflet-control-attribution a { color: #1e4f86; } +.be-map-pin { + display: grid; + place-items: center; + border: 2px solid #fff; + border-radius: 50% 50% 50% 12%; + background: #4149c4; + box-shadow: 0 3px 9px rgb(20 32 51 / 30%); + color: #fff; + font: 700 .9rem/1 Inter, system-ui, sans-serif; +} +.be-map-pin span:empty { width: 10px; height: 10px; border-radius: 50%; background: #fff; } +.be-map-popup { min-width: 155px; overflow-wrap: anywhere; } +.be-map-popup :is(strong, span) { display: block; } +.be-map-popup span { color: #4e5d72; } +.be-map-popup ul, .be-map-event-links { margin: .65rem 0 0; padding: 0; list-style: none; } +.be-map-popup li, .be-map-event-links li { padding: .52rem 0; border-top: 1px solid var(--be-border); } +.be-map-popup li a, .be-map-event-links a { font-weight: 650; } +.be-map-event-links a { font-size: .94rem; } +.be-map-event-links span { display: block; color: var(--be-muted); font-size: .8rem; } +.be-map-locations { display: grid; gap: 9px; max-height: 555px; overflow: auto; } +.be-map-location { border: 1px solid var(--be-border); border-radius: 12px; background: var(--be-white); } +.be-map-location summary { + display: flex; + gap: 8px; + justify-content: space-between; + align-items: center; + padding: 13px 14px; + color: var(--be-ink); + font-size: .98rem; + font-weight: 650; + cursor: pointer; +} +.be-map-location summary::-webkit-details-marker { display: none; } +.be-map-location summary::before { content: '+'; color: var(--be-accent-dark); font-size: 1.13em; } +.be-map-location[open] summary::before { content: '−'; } +.be-map-location summary span:first-child { flex: 1; } +.be-map-location-count { flex: none; min-width: 1.7rem; padding: .2em .4em; border-radius: 999px; background: #e9edfc; color: #273782; font-size: .78rem; text-align: center; } +.be-map-location-body { padding: 0 14px 12px; } +.be-map-unmapped { margin-top: 16px; } +.be-map-focus { border: 0; padding: 8px 0; background: transparent; color: var(--be-accent-dark); font: inherit; font-size: .84rem; text-decoration: underline; cursor: pointer; } +.be-map-error, .be-map-credit { display: block; margin: .45rem 0 0; color: var(--be-muted); font-size: .75rem; } +.be-map-error[hidden] { display: none; } + +.be-single, .be-community, .be-linked-header { max-width: 1100px; margin-inline: auto; } +.be-single-header, .be-starter-intro { display: grid; gap: .8rem; margin-bottom: clamp(22px, 4vw, 42px); } +.be-starter-intro { --gap: .65rem; } +.be-back { font-size: .9rem; font-weight: 650; } +.be-single-date { margin: 0; color: var(--be-muted); font-size: 1.02rem; font-weight: 600; } +.be-single-image { margin: 0 0 26px; } +.be-single-image img { max-height: 520px; aspect-ratio: 2 / 1; border-radius: var(--be-radius); } +.be-single-columns, .be-starter .be-single-columns { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); align-items: start; gap: clamp(18px, 4vw, 50px); margin-bottom: 28px; } +.be-single-details { --gap: .8rem; padding: clamp(16px, 2.6vw, 26px); border: 1px solid var(--be-border); border-radius: var(--be-radius); background: var(--be-bg); overflow-wrap: anywhere; } +.be-single-details:empty { display: none; } +.be-single-details :is(h2, p) { margin: 0 0 .4em; } +.be-single-details h2 { font: 650 1.04rem/1.25 Inter, system-ui, sans-serif; } +.be-related-detail + .be-related-detail { margin-top: 18px; } +.be-description { overflow-wrap: anywhere; line-height: 1.72; } +.be-description > :first-child { margin-top: 0; } +.be-description > :last-child { margin-bottom: 0; } +.be-cost { font-weight: 700; } +.be-export-links { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.2rem; } +.be-custom-fields { display: grid; gap: .3rem 1rem; grid-template-columns: auto minmax(0, 1fr); } +.be-custom-fields dt { font-weight: 650; } +.be-custom-fields dd { margin: 0; overflow-wrap: anywhere; } +.be-widget-preview { padding: .8rem; border: 1px dashed var(--be-border); border-radius: 8px; color: var(--be-muted); } +.be-linked-header { margin-bottom: 26px; } +.be-countdown { font-size: 1.7rem; font-variant-numeric: tabular-nums; font-weight: 650; } + +.be-single-layout.e-con { --gap: 24px; max-width: 1100px; margin-inline: auto; } +.be-single-layout .be-layout-nav.e-con { + display: flex; + flex-flow: row wrap; + justify-content: space-between; + align-items: center; + --gap: 10px; +} +.be-single-layout .be-layout-nav > .elementor-widget { width: auto; } +.be-single-layout .be-layout-nav p { margin: 0; font-size: .86rem; font-weight: 650; } +.be-single-layout .be-layout-nav a { text-decoration: none; } +.be-single-layout .be-layout-nav a:hover { text-decoration: underline; } +.be-layout-nav .be-term-links { padding: 5px 12px; border-radius: 999px; background: #eef1fb; } +.be-single-layout .be-layout-hero.e-con { + display: grid; + grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); + --gap: 0; + border-radius: 26px; + overflow: hidden; + background: #192344; + box-shadow: 0 16px 42px rgb(20 32 51 / 14%); +} +.be-single-layout .be-layout-hero:not(:has(.be-single-image)) { grid-template-columns: minmax(0, 1fr); } +.be-single-layout .be-layout-photo:not(:has(.be-single-image)) { display: none; } +.be-single-layout .be-layout-title.e-con { + justify-content: center; + --gap: 15px; + padding: clamp(30px, 5vw, 60px); + background: radial-gradient(ellipse at 15% 100%, #323b80, transparent 75%); +} +.be-single-layout .be-event-title { color: #fff; font-size: clamp(2.2rem, 5vw, 4.05rem); line-height: 1.02; text-wrap: pretty; } +.be-single-layout .be-single-date { color: #dce4ff; font-size: clamp(.92rem, 1.7vw, 1.06rem); line-height: 1.5; } +.be-single-layout .be-layout-title .be-status { margin: 0; border-radius: 999px; padding: .3em .8em; background: #dedfff; color: #272d65; } +.be-single-layout .be-layout-photo.e-con { position: relative; min-height: clamp(265px, 33vw, 390px); padding: 0; } +.be-single-layout .be-layout-photo > .elementor-widget { position: absolute; inset: 0; width: 100%; } +.be-single-layout .be-layout-photo :is(.elementor-widget-container, .be-elementor-field, .be-single-image) { height: 100%; margin: 0; } +.be-single-layout .be-layout-photo img { width: 100%; height: 100%; max-height: none; border-radius: 0; aspect-ratio: auto; } +.be-single-layout .be-layout-body.e-con { + display: grid; + grid-template-columns: minmax(0, 1.45fr) minmax(280px, 1fr); + align-items: start; + --gap: clamp(24px, 4vw, 54px); + padding-block: clamp(8px, 2vw, 18px); +} +.be-single-layout .be-layout-reading.e-con { --gap: 30px; } +.be-single-layout :is(.be-layout-overview, .be-layout-calendar).e-con { --gap: 12px; } +.be-layout-overview:not(:has(.be-description, .be-custom-fields)), .be-layout-calendar:not(:has(.be-export-links)) { display: none; } +.be-single-layout :is(.elementor-heading-title, .be-related-events h2, .be-related-detail h2) { + margin: 0 0 .4em; + color: var(--be-ink); + font: 680 clamp(1.18rem, 2.3vw, 1.7rem)/1.2 Inter, system-ui, sans-serif; + letter-spacing: -.032em; +} +.be-single-layout .be-description { font-size: clamp(1rem, 1.55vw, 1.16rem); } +.be-single-layout .be-layout-calendar { padding-top: 22px; border-top: 1px solid var(--be-border); } +.be-single-layout .be-export-links { margin: 0; gap: 9px; } +.be-single-layout .be-export-links a { + display: inline-flex; + align-items: center; + min-height: 44px; + border: 1px solid #cad2f2; + border-radius: 9px; + padding: .55em .9em; + background: #f1f3ff; + color: var(--be-accent-dark); + font-size: .92rem; + font-weight: 650; + text-decoration: none; +} +.be-single-layout .be-export-links a:first-child { border-color: var(--be-accent); background: var(--be-accent); color: #fff; } +.be-single-layout .be-export-links a:hover { background: var(--be-accent-dark); color: #fff; } +.be-single-layout .be-layout-details.e-con { + --gap: 14px; + padding: clamp(18px, 3vw, 26px); + border: 1px solid var(--be-border); + border-radius: var(--be-radius); + background: var(--be-bg); +} +.be-single-layout .be-layout-details p { margin: 0 0 .4em; font-size: .91rem; } +.be-single-layout .be-layout-details .be-cost { + display: inline-block; + margin: 0; + padding: .3em .75em; + border: 1px solid #d5dbf6; + border-radius: 999px; + background: #fff; + color: var(--be-accent-dark); +} +.be-single-layout .be-related-events { border-top: 1px solid var(--be-border); padding-top: 24px; } +.be-single-layout .be-related-events .be-event-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } +.be-single-layout .be-related-events .be-event-card { gap: 10px; padding: 13px; } +.be-single-layout .be-related-events .be-card-body h3 { font-size: 1.02rem; } +.be-single-layout .elementor-widget:has(.be-elementor-field:empty) { display: none; } +.be-single-map { margin-top: 24px; } + +.be-submission { display: grid; gap: 18px; max-width: 840px; padding: clamp(16px, 3vw, 34px); border: 1px solid var(--be-border); border-radius: var(--be-radius); background: var(--be-bg); } +.be-submission > p:first-of-type { margin-top: 0; } +.be-submission .be-button { justify-self: start; } +.be-fields { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 10px 0; } +.be-fields > label { flex: 1 1 155px; } +.be-submission :is(.be-fields, fieldset) label:has(input[type=checkbox]) { display: block; } +.be-recurrence summary { font-weight: 650; cursor: pointer; } +.be-recurrence fieldset { border: 0; padding: 0; } +.be-recurrence fieldset label { display: inline-block; margin-right: .5em; } +.be-confirmation { border: 1px solid #b0dbba; border-radius: 10px; padding: .8rem 1rem; color: #153e28; background: #ebf9ef; } +.be-submission-list { padding: 0; list-style: none; } +.be-submission-list li { display: flex; flex-wrap: wrap; gap: .7rem 1rem; align-items: center; border-bottom: 1px solid var(--be-border); padding: 1rem 0; } +.be-honeypot { position: absolute; left: -9999px; height: 1px; overflow: hidden; } + +@media (max-width: 700px) { + .be-calendar-header { align-items: baseline; } + .be-grid-week { min-height: 89px; } + .be-single-columns, .be-starter .be-single-columns { grid-template-columns: minmax(0, 1fr); } + .be-single-image img { aspect-ratio: 4 / 3; } + .be-map-layout { grid-template-columns: minmax(0, 1fr); } + .be-map-locations { max-height: none; overflow: visible; } + .be-map-canvas { height: 365px; } + .be-map-compact .be-map-canvas { height: 230px; } + .be-single-layout :is(.be-layout-hero, .be-layout-body).e-con { grid-template-columns: minmax(0, 1fr); } + .be-single-layout .be-layout-photo.e-con { min-height: clamp(190px, 61vw, 310px); } + .be-single-layout .be-related-events .be-event-list { grid-template-columns: minmax(0, 1fr); } +} diff --git a/assets/events.js b/assets/events.js new file mode 100644 index 0000000..2beeb7d --- /dev/null +++ b/assets/events.js @@ -0,0 +1,18 @@ +function updateCountdowns() { + const now = Math.floor(Date.now() / 1000); + for (const clock of document.querySelectorAll('[data-be-countdown]')) { + const remaining = Number(clock.dataset.beCountdown) - now; + if (remaining <= 0) { + clock.textContent = clock.dataset.beStarted; + continue; + } + const days = Math.floor(remaining / 86400); + const hours = Math.floor(remaining / 3600) % 24; + const minutes = Math.floor(remaining / 60) % 60; + const seconds = remaining % 60; + const time = [hours, minutes, seconds].map((part) => String(part).padStart(2, '0')).join(':'); + clock.textContent = days ? `${days}d ${time}` : time; + } +} +updateCountdowns(); +window.setInterval(updateCountdowns, 1000); diff --git a/assets/maps.js b/assets/maps.js new file mode 100644 index 0000000..9d13175 --- /dev/null +++ b/assets/maps.js @@ -0,0 +1,115 @@ +(() => { + const selector = '[data-be-map]'; + const mounted = new WeakSet(); + + function link(text, url) { + const anchor = document.createElement('a'); + anchor.textContent = text; + anchor.href = url; + return anchor; + } + + function popup(pin) { + const content = document.createElement('div'); + content.className = 'be-map-popup'; + for (const place of Object.values(pin.places)) { + const name = document.createElement('strong'); + name.append(link(place.name, place.url)); + content.append(name); + if (place.address) { + const address = document.createElement('span'); + address.textContent = place.address; + content.append(address); + } + } + + const events = Object.values(pin.events); + if (events.length) { + const list = document.createElement('ul'); + for (const event of events) { + const item = document.createElement('li'); + const date = document.createElement('span'); + date.textContent = event.date; + item.append(link(event.title, event.url), date); + list.append(item); + } + content.append(list); + } + return content; + } + + function mount(frame) { + if (mounted.has(frame) || !window.L) return; + const canvas = frame.querySelector('.be-map-canvas'); + const pins = JSON.parse(frame.querySelector('.be-map-pins').textContent); + const map = L.map(canvas, { scrollWheelZoom: false }); + const markers = new Map(); + const bounds = L.latLngBounds(pins.map(pin => [pin.latitude, pin.longitude])); + map.fitBounds(bounds, { padding: [42, 42], maxZoom: 15 }); + + for (const pin of pins) { + const count = Object.keys(pin.events).length; + const title = Object.values(pin.places).map(place => place.name).join(' / '); + const symbol = document.createElement('span'); + symbol.textContent = count || ''; + const marker = L.marker([pin.latitude, pin.longitude], { + title, + icon: L.divIcon({ + className: 'be-map-pin', + html: symbol, + iconSize: [36, 36], + iconAnchor: [18, 36], + popupAnchor: [0, -34], + }), + }).addTo(map); + marker.getElement().setAttribute('aria-label', title); + marker.bindPopup(popup(pin), { maxHeight: 260, maxWidth: 300 }); + markers.set(pin.key, marker); + } + + const status = frame.querySelector('.be-map-error'); + const tiles = L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', { + maxZoom: 19, + keepBuffer: 1, + attribution: '© OpenStreetMap contributors', + }); + tiles.on('tileload', () => { status.hidden = true; }); + tiles.on('tileerror', () => { + status.hidden = !!canvas.querySelector('.leaflet-tile-loaded'); + }); + tiles.addTo(map); + mounted.add(frame); + + for (const button of frame.closest('.be-map-layout')?.querySelectorAll('[data-be-map-focus]') ?? []) { + const marker = markers.get(button.dataset.beMapFocus); + if (!marker) continue; + button.hidden = false; + button.addEventListener('click', () => { + map.panTo(marker.getLatLng(), { animate: false }); + marker.openPopup(); + marker.getElement().focus(); + }); + } + } + + function mountAll(scope) { + if (scope.matches?.(selector)) mount(scope); + for (const frame of scope.querySelectorAll(selector)) mount(frame); + } + + if (document.readyState === 'loading') { + document.addEventListener('DOMContentLoaded', () => mountAll(document), { once: true }); + } else { + mountAll(document); + } + + let elementorHook = false; + function mountInElementor() { + const hooks = window.elementorFrontend?.hooks; + if (!hooks || elementorHook) return; + hooks.addAction('frontend/element_ready/global', scope => mountAll(scope[0])); + elementorHook = true; + } + mountInElementor(); + if (window.jQuery) window.jQuery(window).on('elementor/frontend/init', mountInElementor); +})(); diff --git a/assets/migration.js b/assets/migration.js new file mode 100644 index 0000000..8b5e073 --- /dev/null +++ b/assets/migration.js @@ -0,0 +1,48 @@ +(() => { + const form = document.querySelector('[data-be-migrate]'); + if (!form) return; + + const {__, sprintf} = wp.i18n; + const button = form.querySelector('button[type="submit"]'); + const status = form.querySelector('[data-be-migrate-status]'); + const errors = form.querySelector('[data-be-migrate-errors]'); + button.disabled = false; + + form.addEventListener('submit', async event => { + event.preventDefault(); + button.disabled = true; + errors.replaceChildren(); + status.textContent = __('Copying events…', 'burn-events'); + const body = new FormData(form); + let copied = 0; + let skipped = 0; + let after = 0; + try { + do { + body.set('after', String(after)); + const response = await fetch(form.action, {method: 'POST', body, credentials: 'same-origin'}); + const result = await response.json(); + if (!response.ok || !result.success) { + throw new Error(typeof result.data === 'string' ? result.data : ''); + } + copied += result.data.copied; + skipped += result.data.skipped; + for (const error of result.data.errors) { + const item = document.createElement('li'); + item.textContent = error; + errors.append(item); + } + after = result.data.next; + status.textContent = sprintf( + after ? __('Copying events. %1$d copied, %2$d already copied, %3$d need review.', 'burn-events') + : __('Migration finished. %1$d copied, %2$d already copied, %3$d need review.', 'burn-events'), + copied, skipped, errors.childElementCount + ); + } while (after); + } catch (error) { + status.textContent = error.message || __('Migration stopped. Run it again to continue with events that still need copying.', 'burn-events'); + } finally { + button.disabled = false; + } + }); +})(); diff --git a/assets/vendor/leaflet/LICENSE b/assets/vendor/leaflet/LICENSE new file mode 100644 index 0000000..bcb3ba1 --- /dev/null +++ b/assets/vendor/leaflet/LICENSE @@ -0,0 +1,26 @@ +BSD 2-Clause License + +Copyright (c) 2010-2023, Volodymyr Agafonkin +Copyright (c) 2010-2011, CloudMade +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/assets/vendor/leaflet/images/layers-2x.png b/assets/vendor/leaflet/images/layers-2x.png new file mode 100644 index 0000000000000000000000000000000000000000..200c333dca9652ac4cba004d609e5af4eee168c1 GIT binary patch literal 1259 zcmVFhCYNy;#0irRPomHqW|G1C*;4?@4#E?jH>?v@U%cy?3dQAc-DchXVErpOh~ z-jbon+tNbnl6hoEb;)TVk+%hTDDi_G%i3*RZ&15!$Fjr^f;Ke&A@|?=`2&+{zr+3a z{D*=t(`AXyS%X7N z%a#RZw6vD^t_rnM`L4E>m=U&R!A-&}nZIi$BOPvkhrCuUe@BN~-lRD)f44;J%TwgE zcze8u!PQ_NR7?o(NylLXVTfDO zxs5=@|GsYEsNo4M#nT%N!UE(?dnS)t2+{ELYAFp*3=iF=|EQnTp`#vlSXuGVraYo? z+RCzXo6h3qA8{KG?S4nE(lM+;Eb4nT3XV;7gcAxUi5m)`k5tv}cPy()8ZR3TLW3I- zAS^}cq-IJvL7a4RgR!yk@~RT%$lA7{L5ES*hyx)M4(yxI$Ub(4f)K|^v1>zvwQY!_ zIrWw8q9GS^!Dp~}+?mbnB6jDF8mVlbQ!jFKDY;w=7;XO{9bq7>LXGK24WA`;rL)_Z z)&j}pbV(;6gY;VMhbxgvn`X;6x}VUEE-7 z%)7j-%t8S=ZL3yc)HbXDAqJZvBTPoiW_A-+a8m3_Z?v{DN7Tnr#O_VUMT0UBt$;p` zDh6JbGHN8JJ*JN%y2%msb97@_S>9!%Egwk;?PEkU9ntz&3uR}%Fj5d$JHQbQb3}a{ zSzFT^#n=VInPpcAS}CNxj?_ zVscANk5Cfz(51EI1pz};AWWb|kgbYNb4wCEGUn3+eMUMV?1-{=I4TlmLJMot@rd07 zZuo2hk1ccu{YmGkcYdWAVdk{Z4Nm?^cTD&}jGm+Q1SYIXMwmG*oO*83&#>l%nbR`G zhh=lZ%xIb7kU3#;TBbfECrnC9P=-XpL|TG2BoZdj61*XiFbW8?1Z_wp%#;>${SUIy V$8qr;L*)Pf002ovPDHLkV1hYLS~36t literal 0 HcmV?d00001 diff --git a/assets/vendor/leaflet/images/layers.png b/assets/vendor/leaflet/images/layers.png new file mode 100644 index 0000000000000000000000000000000000000000..1a72e5784b2b456eac5d7670738db80697af3377 GIT binary patch literal 696 zcmV;p0!RIcP)*@&l2<6p=!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^2j}4Wp=4t3RH* z_+8b`F-{E=0sOgM<;VHTo!Ij3u zmmI`2?K7g(GOcGA)@h?$SW&pwHdtj1n57PLI8&6RHhx4R%Q7b z^JEqR)@06V!pbS*@D_ZyRMo_LlT}r{#sXOx4kM-V<_V{!5SSuM^SIVCA37|nY7LWQ zZA#B1h4l`6asz=Lvax_#GMRX|NF>=$=p{Qn0i@ExX1jGhy@B8a*_uR+ODEbVi8ObL zezG?azy>E~S~dl43&8<$(2H}P&*tuBdESUP83KQ?8B z?K(!uS>H1wlWQz;qOfB`T#TZ=EoSp~vZ5XtCvwm1h*Ex6mzTsn_y@_=xREIslV-%- zpdWkEzMjeNOGWrSM32gpBt27*O29NdhGzuDgYxcf`Jjjqw@B;Vmdb@fxdhCRi`Kg> zmUTr$=&@#i!%F4Q6mb&4QKfR^95KJ!<6~fqx-f^66AV!|ywG{6D^Vay-3b99>XOe# e-I|>x8~*?ZhF3snGbtJX0000cOl4 literal 0 HcmV?d00001 diff --git a/assets/vendor/leaflet/images/marker-icon.png b/assets/vendor/leaflet/images/marker-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..950edf24677ded147df13b26f91baa2b0fa70513 GIT binary patch literal 1466 zcmV;r1x5OaP)P001cn1^@s6z>|W`000GnNklGNuHDcIX17Zdjl&3`L?0sTjIws<{((Dh&g-s0<@jYQyl?D*X^?%13;ml^gy> ziMrY_^1WI=(g@LMizu=zCoA>C`6|QEq1eV92k*7m>G65*&@&6)aC&e}G zI)pf-Za|N`DT&Cn1J|o`19mumxW~hiKiKyc-P`S@q)rdTo84@QI@;0yXrG%9uhI>A zG5QHb6s4=<6xy{1 z@NMxEkryp{LS44%z$3lP^cX!9+2-;CTt3wM4(k*#C{aiIiLuB>jJj;KPhPzIC00bL zU3a#;aJld94lCW=`4&aAy8M7PY=HQ>O%$YEP4c4UY#CRxfgbE~(|uiI=YS8q;O9y6 zmIkXzR`}p7ti|PrM3a}WMnR=3NVnWdAAR>b9X@)DKL6=YsvmH%?I24wdq?Gh54_;# z$?_LvgjEdspdQlft#4CQ z`2Zyvy?*)N1Ftw|{_hakhG9WjS?Az@I@+IZ8JbWewR!XUK4&6346+d#~gsE0SY(LX8&JfY>Aj)RxGy96nwhs2rv zzW6pTnMpFkDSkT*a*6Dx|u@ds6ISVn0@^RmIsKZ5Y;bazbc;tTSq(kg(=481ODrPyNB6n z-$+U}(w$m6U6H$w17Bw+wDaFIe~GvNMYvnw31MpY0eQKT9l>SU``8k7w4)z!GZKMI z#_cEKq7k~i%nlK@6c-K?+R;B#5$?T#YpKD`t_4bAs^#E+@5QW$@OX3*`;(#{U^d-vY)&xEE>n5lYl&T?Amke9$Lam@{1K@O ze*LXqlKQHiv=gx+V^Cbb2?z@ISBQ*3amF;9UJ3SBg(N|710TLamQmYZ&Qjn2LuO<* zCZlB4n%@pc&7NNnY1}x+NWpHlq`OJEo|`aYN9<`RBUB+79g;>dgb6YlfN#kGL?lO_ z!6~M^7sOnbsUkKk<@Ysie&`G>ruxH&Mgy&8;i=A zB9OO!xR{AyODw>DS-q5YM{0ExFEAzt zm>RdS+ssW(-8|?xr0(?$vBVB*%(xDLtq3Hf0I5yFm<_g=W2`QWAax{1rWVH=I!VrP zs(rTFX@W#t$hXNvbgX`gK&^w_YD;CQ!B@e0QbLIWaKAXQe2-kkloo;{iF#6}z!4=W zi$giRj1{ zt;2w`VSCF#WE&*ev7jpsC=6175@(~nTE2;7M-L((0bH@yG}-TB$R~WXd?tA$s3|%y zA`9$sA(>F%J3ioz<-LJl*^o1|w84l>HBR`>3l9c8$5Xr@xCiIQ7{x$fMCzOk_-M=% z+{a_Q#;42`#KfUte@$NT77uaTz?b-fBe)1s5XE$yA79fm?KqM^VgLXD07*qoM6N<$ Ef<_J(9smFU literal 0 HcmV?d00001 diff --git a/assets/vendor/leaflet/leaflet.css b/assets/vendor/leaflet/leaflet.css new file mode 100644 index 0000000..2961b76 --- /dev/null +++ b/assets/vendor/leaflet/leaflet.css @@ -0,0 +1,661 @@ +/* required styles */ + +.leaflet-pane, +.leaflet-tile, +.leaflet-marker-icon, +.leaflet-marker-shadow, +.leaflet-tile-container, +.leaflet-pane > svg, +.leaflet-pane > canvas, +.leaflet-zoom-box, +.leaflet-image-layer, +.leaflet-layer { + position: absolute; + left: 0; + top: 0; + } +.leaflet-container { + overflow: hidden; + } +.leaflet-tile, +.leaflet-marker-icon, +.leaflet-marker-shadow { + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + -webkit-user-drag: none; + } +/* Prevents IE11 from highlighting tiles in blue */ +.leaflet-tile::selection { + background: transparent; +} +/* Safari renders non-retina tile on retina better with this, but Chrome is worse */ +.leaflet-safari .leaflet-tile { + image-rendering: -webkit-optimize-contrast; + } +/* hack that prevents hw layers "stretching" when loading new tiles */ +.leaflet-safari .leaflet-tile-container { + width: 1600px; + height: 1600px; + -webkit-transform-origin: 0 0; + } +.leaflet-marker-icon, +.leaflet-marker-shadow { + display: block; + } +/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */ +/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */ +.leaflet-container .leaflet-overlay-pane svg { + max-width: none !important; + max-height: none !important; + } +.leaflet-container .leaflet-marker-pane img, +.leaflet-container .leaflet-shadow-pane img, +.leaflet-container .leaflet-tile-pane img, +.leaflet-container img.leaflet-image-layer, +.leaflet-container .leaflet-tile { + max-width: none !important; + max-height: none !important; + width: auto; + padding: 0; + } + +.leaflet-container img.leaflet-tile { + /* See: https://bugs.chromium.org/p/chromium/issues/detail?id=600120 */ + mix-blend-mode: plus-lighter; +} + +.leaflet-container.leaflet-touch-zoom { + -ms-touch-action: pan-x pan-y; + touch-action: pan-x pan-y; + } +.leaflet-container.leaflet-touch-drag { + -ms-touch-action: pinch-zoom; + /* Fallback for FF which doesn't support pinch-zoom */ + touch-action: none; + touch-action: pinch-zoom; +} +.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom { + -ms-touch-action: none; + touch-action: none; +} +.leaflet-container { + -webkit-tap-highlight-color: transparent; +} +.leaflet-container a { + -webkit-tap-highlight-color: rgba(51, 181, 229, 0.4); +} +.leaflet-tile { + filter: inherit; + visibility: hidden; + } +.leaflet-tile-loaded { + visibility: inherit; + } +.leaflet-zoom-box { + width: 0; + height: 0; + -moz-box-sizing: border-box; + box-sizing: border-box; + z-index: 800; + } +/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */ +.leaflet-overlay-pane svg { + -moz-user-select: none; + } + +.leaflet-pane { z-index: 400; } + +.leaflet-tile-pane { z-index: 200; } +.leaflet-overlay-pane { z-index: 400; } +.leaflet-shadow-pane { z-index: 500; } +.leaflet-marker-pane { z-index: 600; } +.leaflet-tooltip-pane { z-index: 650; } +.leaflet-popup-pane { z-index: 700; } + +.leaflet-map-pane canvas { z-index: 100; } +.leaflet-map-pane svg { z-index: 200; } + +.leaflet-vml-shape { + width: 1px; + height: 1px; + } +.lvml { + behavior: url(#default#VML); + display: inline-block; + position: absolute; + } + + +/* control positioning */ + +.leaflet-control { + position: relative; + z-index: 800; + pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */ + pointer-events: auto; + } +.leaflet-top, +.leaflet-bottom { + position: absolute; + z-index: 1000; + pointer-events: none; + } +.leaflet-top { + top: 0; + } +.leaflet-right { + right: 0; + } +.leaflet-bottom { + bottom: 0; + } +.leaflet-left { + left: 0; + } +.leaflet-control { + float: left; + clear: both; + } +.leaflet-right .leaflet-control { + float: right; + } +.leaflet-top .leaflet-control { + margin-top: 10px; + } +.leaflet-bottom .leaflet-control { + margin-bottom: 10px; + } +.leaflet-left .leaflet-control { + margin-left: 10px; + } +.leaflet-right .leaflet-control { + margin-right: 10px; + } + + +/* zoom and fade animations */ + +.leaflet-fade-anim .leaflet-popup { + opacity: 0; + -webkit-transition: opacity 0.2s linear; + -moz-transition: opacity 0.2s linear; + transition: opacity 0.2s linear; + } +.leaflet-fade-anim .leaflet-map-pane .leaflet-popup { + opacity: 1; + } +.leaflet-zoom-animated { + -webkit-transform-origin: 0 0; + -ms-transform-origin: 0 0; + transform-origin: 0 0; + } +svg.leaflet-zoom-animated { + will-change: transform; +} + +.leaflet-zoom-anim .leaflet-zoom-animated { + -webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1); + -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1); + transition: transform 0.25s cubic-bezier(0,0,0.25,1); + } +.leaflet-zoom-anim .leaflet-tile, +.leaflet-pan-anim .leaflet-tile { + -webkit-transition: none; + -moz-transition: none; + transition: none; + } + +.leaflet-zoom-anim .leaflet-zoom-hide { + visibility: hidden; + } + + +/* cursors */ + +.leaflet-interactive { + cursor: pointer; + } +.leaflet-grab { + cursor: -webkit-grab; + cursor: -moz-grab; + cursor: grab; + } +.leaflet-crosshair, +.leaflet-crosshair .leaflet-interactive { + cursor: crosshair; + } +.leaflet-popup-pane, +.leaflet-control { + cursor: auto; + } +.leaflet-dragging .leaflet-grab, +.leaflet-dragging .leaflet-grab .leaflet-interactive, +.leaflet-dragging .leaflet-marker-draggable { + cursor: move; + cursor: -webkit-grabbing; + cursor: -moz-grabbing; + cursor: grabbing; + } + +/* marker & overlays interactivity */ +.leaflet-marker-icon, +.leaflet-marker-shadow, +.leaflet-image-layer, +.leaflet-pane > svg path, +.leaflet-tile-container { + pointer-events: none; + } + +.leaflet-marker-icon.leaflet-interactive, +.leaflet-image-layer.leaflet-interactive, +.leaflet-pane > svg path.leaflet-interactive, +svg.leaflet-image-layer.leaflet-interactive path { + pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */ + pointer-events: auto; + } + +/* visual tweaks */ + +.leaflet-container { + background: #ddd; + outline-offset: 1px; + } +.leaflet-container a { + color: #0078A8; + } +.leaflet-zoom-box { + border: 2px dotted #38f; + background: rgba(255,255,255,0.5); + } + + +/* general typography */ +.leaflet-container { + font-family: "Helvetica Neue", Arial, Helvetica, sans-serif; + font-size: 12px; + font-size: 0.75rem; + line-height: 1.5; + } + + +/* general toolbar styles */ + +.leaflet-bar { + box-shadow: 0 1px 5px rgba(0,0,0,0.65); + border-radius: 4px; + } +.leaflet-bar a { + background-color: #fff; + border-bottom: 1px solid #ccc; + width: 26px; + height: 26px; + line-height: 26px; + display: block; + text-align: center; + text-decoration: none; + color: black; + } +.leaflet-bar a, +.leaflet-control-layers-toggle { + background-position: 50% 50%; + background-repeat: no-repeat; + display: block; + } +.leaflet-bar a:hover, +.leaflet-bar a:focus { + background-color: #f4f4f4; + } +.leaflet-bar a:first-child { + border-top-left-radius: 4px; + border-top-right-radius: 4px; + } +.leaflet-bar a:last-child { + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + border-bottom: none; + } +.leaflet-bar a.leaflet-disabled { + cursor: default; + background-color: #f4f4f4; + color: #bbb; + } + +.leaflet-touch .leaflet-bar a { + width: 30px; + height: 30px; + line-height: 30px; + } +.leaflet-touch .leaflet-bar a:first-child { + border-top-left-radius: 2px; + border-top-right-radius: 2px; + } +.leaflet-touch .leaflet-bar a:last-child { + border-bottom-left-radius: 2px; + border-bottom-right-radius: 2px; + } + +/* zoom control */ + +.leaflet-control-zoom-in, +.leaflet-control-zoom-out { + font: bold 18px 'Lucida Console', Monaco, monospace; + text-indent: 1px; + } + +.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out { + font-size: 22px; + } + + +/* layers control */ + +.leaflet-control-layers { + box-shadow: 0 1px 5px rgba(0,0,0,0.4); + background: #fff; + border-radius: 5px; + } +.leaflet-control-layers-toggle { + background-image: url(images/layers.png); + width: 36px; + height: 36px; + } +.leaflet-retina .leaflet-control-layers-toggle { + background-image: url(images/layers-2x.png); + background-size: 26px 26px; + } +.leaflet-touch .leaflet-control-layers-toggle { + width: 44px; + height: 44px; + } +.leaflet-control-layers .leaflet-control-layers-list, +.leaflet-control-layers-expanded .leaflet-control-layers-toggle { + display: none; + } +.leaflet-control-layers-expanded .leaflet-control-layers-list { + display: block; + position: relative; + } +.leaflet-control-layers-expanded { + padding: 6px 10px 6px 6px; + color: #333; + background: #fff; + } +.leaflet-control-layers-scrollbar { + overflow-y: scroll; + overflow-x: hidden; + padding-right: 5px; + } +.leaflet-control-layers-selector { + margin-top: 2px; + position: relative; + top: 1px; + } +.leaflet-control-layers label { + display: block; + font-size: 13px; + font-size: 1.08333em; + } +.leaflet-control-layers-separator { + height: 0; + border-top: 1px solid #ddd; + margin: 5px -10px 5px -6px; + } + +/* Default icon URLs */ +.leaflet-default-icon-path { /* used only in path-guessing heuristic, see L.Icon.Default */ + background-image: url(images/marker-icon.png); + } + + +/* attribution and scale controls */ + +.leaflet-container .leaflet-control-attribution { + background: #fff; + background: rgba(255, 255, 255, 0.8); + margin: 0; + } +.leaflet-control-attribution, +.leaflet-control-scale-line { + padding: 0 5px; + color: #333; + line-height: 1.4; + } +.leaflet-control-attribution a { + text-decoration: none; + } +.leaflet-control-attribution a:hover, +.leaflet-control-attribution a:focus { + text-decoration: underline; + } +.leaflet-attribution-flag { + display: inline !important; + vertical-align: baseline !important; + width: 1em; + height: 0.6669em; + } +.leaflet-left .leaflet-control-scale { + margin-left: 5px; + } +.leaflet-bottom .leaflet-control-scale { + margin-bottom: 5px; + } +.leaflet-control-scale-line { + border: 2px solid #777; + border-top: none; + line-height: 1.1; + padding: 2px 5px 1px; + white-space: nowrap; + -moz-box-sizing: border-box; + box-sizing: border-box; + background: rgba(255, 255, 255, 0.8); + text-shadow: 1px 1px #fff; + } +.leaflet-control-scale-line:not(:first-child) { + border-top: 2px solid #777; + border-bottom: none; + margin-top: -2px; + } +.leaflet-control-scale-line:not(:first-child):not(:last-child) { + border-bottom: 2px solid #777; + } + +.leaflet-touch .leaflet-control-attribution, +.leaflet-touch .leaflet-control-layers, +.leaflet-touch .leaflet-bar { + box-shadow: none; + } +.leaflet-touch .leaflet-control-layers, +.leaflet-touch .leaflet-bar { + border: 2px solid rgba(0,0,0,0.2); + background-clip: padding-box; + } + + +/* popup */ + +.leaflet-popup { + position: absolute; + text-align: center; + margin-bottom: 20px; + } +.leaflet-popup-content-wrapper { + padding: 1px; + text-align: left; + border-radius: 12px; + } +.leaflet-popup-content { + margin: 13px 24px 13px 20px; + line-height: 1.3; + font-size: 13px; + font-size: 1.08333em; + min-height: 1px; + } +.leaflet-popup-content p { + margin: 17px 0; + margin: 1.3em 0; + } +.leaflet-popup-tip-container { + width: 40px; + height: 20px; + position: absolute; + left: 50%; + margin-top: -1px; + margin-left: -20px; + overflow: hidden; + pointer-events: none; + } +.leaflet-popup-tip { + width: 17px; + height: 17px; + padding: 1px; + + margin: -10px auto 0; + pointer-events: auto; + + -webkit-transform: rotate(45deg); + -moz-transform: rotate(45deg); + -ms-transform: rotate(45deg); + transform: rotate(45deg); + } +.leaflet-popup-content-wrapper, +.leaflet-popup-tip { + background: white; + color: #333; + box-shadow: 0 3px 14px rgba(0,0,0,0.4); + } +.leaflet-container a.leaflet-popup-close-button { + position: absolute; + top: 0; + right: 0; + border: none; + text-align: center; + width: 24px; + height: 24px; + font: 16px/24px Tahoma, Verdana, sans-serif; + color: #757575; + text-decoration: none; + background: transparent; + } +.leaflet-container a.leaflet-popup-close-button:hover, +.leaflet-container a.leaflet-popup-close-button:focus { + color: #585858; + } +.leaflet-popup-scrolled { + overflow: auto; + } + +.leaflet-oldie .leaflet-popup-content-wrapper { + -ms-zoom: 1; + } +.leaflet-oldie .leaflet-popup-tip { + width: 24px; + margin: 0 auto; + + -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)"; + filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678); + } + +.leaflet-oldie .leaflet-control-zoom, +.leaflet-oldie .leaflet-control-layers, +.leaflet-oldie .leaflet-popup-content-wrapper, +.leaflet-oldie .leaflet-popup-tip { + border: 1px solid #999; + } + + +/* div icon */ + +.leaflet-div-icon { + background: #fff; + border: 1px solid #666; + } + + +/* Tooltip */ +/* Base styles for the element that has a tooltip */ +.leaflet-tooltip { + position: absolute; + padding: 6px; + background-color: #fff; + border: 1px solid #fff; + border-radius: 3px; + color: #222; + white-space: nowrap; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + pointer-events: none; + box-shadow: 0 1px 3px rgba(0,0,0,0.4); + } +.leaflet-tooltip.leaflet-interactive { + cursor: pointer; + pointer-events: auto; + } +.leaflet-tooltip-top:before, +.leaflet-tooltip-bottom:before, +.leaflet-tooltip-left:before, +.leaflet-tooltip-right:before { + position: absolute; + pointer-events: none; + border: 6px solid transparent; + background: transparent; + content: ""; + } + +/* Directions */ + +.leaflet-tooltip-bottom { + margin-top: 6px; +} +.leaflet-tooltip-top { + margin-top: -6px; +} +.leaflet-tooltip-bottom:before, +.leaflet-tooltip-top:before { + left: 50%; + margin-left: -6px; + } +.leaflet-tooltip-top:before { + bottom: 0; + margin-bottom: -12px; + border-top-color: #fff; + } +.leaflet-tooltip-bottom:before { + top: 0; + margin-top: -12px; + margin-left: -6px; + border-bottom-color: #fff; + } +.leaflet-tooltip-left { + margin-left: -6px; +} +.leaflet-tooltip-right { + margin-left: 6px; +} +.leaflet-tooltip-left:before, +.leaflet-tooltip-right:before { + top: 50%; + margin-top: -6px; + } +.leaflet-tooltip-left:before { + right: 0; + margin-right: -12px; + border-left-color: #fff; + } +.leaflet-tooltip-right:before { + left: 0; + margin-left: -12px; + border-right-color: #fff; + } + +/* Printing */ + +@media print { + /* Prevent printers from removing background-images of controls. */ + .leaflet-control { + -webkit-print-color-adjust: exact; + print-color-adjust: exact; + } + } diff --git a/assets/vendor/leaflet/leaflet.js b/assets/vendor/leaflet/leaflet.js new file mode 100644 index 0000000..a3bf693 --- /dev/null +++ b/assets/vendor/leaflet/leaflet.js @@ -0,0 +1,6 @@ +/* @preserve + * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com + * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade + */ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).leaflet={})}(this,function(t){"use strict";function l(t){for(var e,i,n=1,o=arguments.length;n=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=_(t);var e=this.min,i=this.max,n=t.min,t=t.max,o=t.x>=e.x&&n.x<=i.x,t=t.y>=e.y&&n.y<=i.y;return o&&t},overlaps:function(t){t=_(t);var e=this.min,i=this.max,n=t.min,t=t.max,o=t.x>e.x&&n.xe.y&&n.y=n.lat&&i.lat<=o.lat&&e.lng>=n.lng&&i.lng<=o.lng},intersects:function(t){t=g(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),t=t.getNorthEast(),o=t.lat>=e.lat&&n.lat<=i.lat,t=t.lng>=e.lng&&n.lng<=i.lng;return o&&t},overlaps:function(t){t=g(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),t=t.getNorthEast(),o=t.lat>e.lat&&n.late.lng&&n.lng","http://www.w3.org/2000/svg"===(Wt.firstChild&&Wt.firstChild.namespaceURI));function y(t){return 0<=navigator.userAgent.toLowerCase().indexOf(t)}var b={ie:pt,ielt9:mt,edge:n,webkit:ft,android:gt,android23:vt,androidStock:yt,opera:xt,chrome:wt,gecko:bt,safari:Pt,phantom:Lt,opera12:o,win:Tt,ie3d:Mt,webkit3d:zt,gecko3d:_t,any3d:Ct,mobile:Zt,mobileWebkit:St,mobileWebkit3d:Et,msPointer:kt,pointer:Ot,touch:Bt,touchNative:At,mobileOpera:It,mobileGecko:Rt,retina:Nt,passiveEvents:Dt,canvas:jt,svg:Ht,vml:!Ht&&function(){try{var t=document.createElement("div"),e=(t.innerHTML='',t.firstChild);return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}(),inlineSvg:Wt,mac:0===navigator.platform.indexOf("Mac"),linux:0===navigator.platform.indexOf("Linux")},Ft=b.msPointer?"MSPointerDown":"pointerdown",Ut=b.msPointer?"MSPointerMove":"pointermove",Vt=b.msPointer?"MSPointerUp":"pointerup",qt=b.msPointer?"MSPointerCancel":"pointercancel",Gt={touchstart:Ft,touchmove:Ut,touchend:Vt,touchcancel:qt},Kt={touchstart:function(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&O(e);ee(t,e)},touchmove:ee,touchend:ee,touchcancel:ee},Yt={},Xt=!1;function Jt(t,e,i){return"touchstart"!==e||Xt||(document.addEventListener(Ft,$t,!0),document.addEventListener(Ut,Qt,!0),document.addEventListener(Vt,te,!0),document.addEventListener(qt,te,!0),Xt=!0),Kt[e]?(i=Kt[e].bind(this,i),t.addEventListener(Gt[e],i,!1),i):(console.warn("wrong event specified:",e),u)}function $t(t){Yt[t.pointerId]=t}function Qt(t){Yt[t.pointerId]&&(Yt[t.pointerId]=t)}function te(t){delete Yt[t.pointerId]}function ee(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){for(var i in e.touches=[],Yt)e.touches.push(Yt[i]);e.changedTouches=[e],t(e)}}var ie=200;function ne(t,i){t.addEventListener("dblclick",i);var n,o=0;function e(t){var e;1!==t.detail?n=t.detail:"mouse"===t.pointerType||t.sourceCapabilities&&!t.sourceCapabilities.firesTouchEvents||((e=Ne(t)).some(function(t){return t instanceof HTMLLabelElement&&t.attributes.for})&&!e.some(function(t){return t instanceof HTMLInputElement||t instanceof HTMLSelectElement})||((e=Date.now())-o<=ie?2===++n&&i(function(t){var e,i,n={};for(i in t)e=t[i],n[i]=e&&e.bind?e.bind(t):e;return(t=n).type="dblclick",n.detail=2,n.isTrusted=!1,n._simulated=!0,n}(t)):n=1,o=e))}return t.addEventListener("click",e),{dblclick:i,simDblclick:e}}var oe,se,re,ae,he,le,ue=we(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ce=we(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),de="webkitTransition"===ce||"OTransition"===ce?ce+"End":"transitionend";function _e(t){return"string"==typeof t?document.getElementById(t):t}function pe(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];return"auto"===(i=i&&"auto"!==i||!document.defaultView?i:(t=document.defaultView.getComputedStyle(t,null))?t[e]:null)?null:i}function P(t,e,i){t=document.createElement(t);return t.className=e||"",i&&i.appendChild(t),t}function T(t){var e=t.parentNode;e&&e.removeChild(t)}function me(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function fe(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function ge(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function ve(t,e){return void 0!==t.classList?t.classList.contains(e):0<(t=xe(t)).length&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(t)}function M(t,e){var i;if(void 0!==t.classList)for(var n=F(e),o=0,s=n.length;othis.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),t=this._limitCenter(i,this._zoom,g(t));return i.equals(t)||this.panTo(t,e),this._enforcingBounds=!1,this},panInside:function(t,e){var i=m((e=e||{}).paddingTopLeft||e.padding||[0,0]),n=m(e.paddingBottomRight||e.padding||[0,0]),o=this.project(this.getCenter()),t=this.project(t),s=this.getPixelBounds(),i=_([s.min.add(i),s.max.subtract(n)]),s=i.getSize();return i.contains(t)||(this._enforcingBounds=!0,n=t.subtract(i.getCenter()),i=i.extend(t).getSize().subtract(s),o.x+=n.x<0?-i.x:i.x,o.y+=n.y<0?-i.y:i.y,this.panTo(this.unproject(o),e),this._enforcingBounds=!1),this},invalidateSize:function(t){if(!this._loaded)return this;t=l({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize(),i=(this._sizeChanged=!0,this._lastCenter=null,this.getSize()),n=e.divideBy(2).round(),o=i.divideBy(2).round(),n=n.subtract(o);return n.x||n.y?(t.animate&&t.pan?this.panBy(n):(t.pan&&this._rawPanBy(n),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(a(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){var e,i;return t=this._locateOptions=l({timeout:1e4,watch:!1},t),"geolocation"in navigator?(e=a(this._handleGeolocationResponse,this),i=a(this._handleGeolocationError,this),t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t)):this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e;this._container._leaflet_id&&(e=t.code,t=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout"),this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+t+"."}))},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e,i,n=new v(t.coords.latitude,t.coords.longitude),o=n.toBounds(2*t.coords.accuracy),s=this._locateOptions,r=(s.setView&&(e=this.getBoundsZoom(o),this.setView(n,s.maxZoom?Math.min(e,s.maxZoom):e)),{latlng:n,bounds:o,timestamp:t.timestamp});for(i in t.coords)"number"==typeof t.coords[i]&&(r[i]=t.coords[i]);this.fire("locationfound",r)}},addHandler:function(t,e){return e&&(e=this[t]=new e(this),this._handlers.push(e),this.options[t]&&e.enable()),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}for(var t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),T(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(r(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)T(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){e=P("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=e),e},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new s(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=g(t),i=m(i||[0,0]);var n=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),r=t.getNorthWest(),t=t.getSouthEast(),i=this.getSize().subtract(i),t=_(this.project(t,n),this.project(r,n)).getSize(),r=b.any3d?this.options.zoomSnap:1,a=i.x/t.x,i=i.y/t.y,t=e?Math.max(a,i):Math.min(a,i),n=this.getScaleZoom(t,n);return r&&(n=Math.round(n/(r/100))*(r/100),n=e?Math.ceil(n/r)*r:Math.floor(n/r)*r),Math.max(o,Math.min(s,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new p(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){t=this._getTopLeftPoint(t,e);return new f(t,t.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;return e=void 0===e?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs,t=(e=void 0===e?this._zoom:e,i.zoom(t*i.scale(e)));return isNaN(t)?1/0:t},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(w(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(m(t),e)},layerPointToLatLng:function(t){t=m(t).add(this.getPixelOrigin());return this.unproject(t)},latLngToLayerPoint:function(t){return this.project(w(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(w(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(g(t))},distance:function(t,e){return this.options.crs.distance(w(t),w(e))},containerPointToLayerPoint:function(t){return m(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return m(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){t=this.containerPointToLayerPoint(m(t));return this.layerPointToLatLng(t)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(w(t)))},mouseEventToContainerPoint:function(t){return De(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){t=this._container=_e(t);if(!t)throw new Error("Map container not found.");if(t._leaflet_id)throw new Error("Map container is already initialized.");S(t,"scroll",this._onScroll,this),this._containerId=h(t)},_initLayout:function(){var t=this._container,e=(this._fadeAnimated=this.options.fadeAnimation&&b.any3d,M(t,"leaflet-container"+(b.touch?" leaflet-touch":"")+(b.retina?" leaflet-retina":"")+(b.ielt9?" leaflet-oldie":"")+(b.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":"")),pe(t,"position"));"absolute"!==e&&"relative"!==e&&"fixed"!==e&&"sticky"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Z(this._mapPane,new p(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(M(t.markerPane,"leaflet-zoom-hide"),M(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,i){Z(this._mapPane,new p(0,0));var n=!this._loaded,o=(this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset"),this._zoom!==e);this._moveStart(o,i)._move(t,e)._moveEnd(o),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,i,n){void 0===e&&(e=this._zoom);var o=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),n?i&&i.pinch&&this.fire("zoom",i):((o||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return r(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){Z(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={};var e=t?k:S;e((this._targets[h(this._container)]=this)._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),b.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){r(this._resizeRequest),this._resizeRequest=x(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var i,n=[],o="mouseout"===e||"mouseover"===e,s=t.target||t.srcElement,r=!1;s;){if((i=this._targets[h(s)])&&("click"===e||"preclick"===e)&&this._draggableMoved(i)){r=!0;break}if(i&&i.listens(e,!0)){if(o&&!We(s,t))break;if(n.push(i),o)break}if(s===this._container)break;s=s.parentNode}return n=n.length||r||o||!this.listens(e,!0)?n:[this]},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e,i=t.target||t.srcElement;!this._loaded||i._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(i)||("mousedown"===(e=t.type)&&Me(i),this._fireDOMEvent(t,e))},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){"click"===t.type&&((a=l({},t)).type="preclick",this._fireDOMEvent(a,a.type,i));var n=this._findEventTargets(t,e);if(i){for(var o=[],s=0;sthis.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),n=this._getCenterOffset(t)._divideBy(1-1/n);if(!0!==i.animate&&!this.getSize().contains(n))return!1;x(function(){this._moveStart(!0,i.noMoveStart||!1)._animateZoom(t,e,!0)},this)}return!0},_animateZoom:function(t,e,i,n){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,M(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:n}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(a(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&z(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function Ue(t){return new B(t)}var B=et.extend({options:{position:"topright"},initialize:function(t){c(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),t=t._controlCorners[i];return M(e,"leaflet-control"),-1!==i.indexOf("bottom")?t.insertBefore(e,t.firstChild):t.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map&&(T(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null),this},_refocusOnMap:function(t){this._map&&t&&0",e=document.createElement("div");return e.innerHTML=t,e.firstChild},_addItem:function(t){var e,i=document.createElement("label"),n=this._map.hasLayer(t.layer),n=(t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=n):e=this._createRadioElement("leaflet-base-layers_"+h(this),n),this._layerControlInputs.push(e),e.layerId=h(t.layer),S(e,"click",this._onInputClick,this),document.createElement("span")),o=(n.innerHTML=" "+t.name,document.createElement("span"));return i.appendChild(o),o.appendChild(e),o.appendChild(n),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(i),this._checkDisabledLayers(),i},_onInputClick:function(){if(!this._preventClick){var t,e,i=this._layerControlInputs,n=[],o=[];this._handlingClick=!0;for(var s=i.length-1;0<=s;s--)t=i[s],e=this._getLayer(t.layerId).layer,t.checked?n.push(e):t.checked||o.push(e);for(s=0;se.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section,e=(this._preventClick=!0,S(t,"click",O),this.expand(),this);setTimeout(function(){k(t,"click",O),e._preventClick=!1})}})),qe=B.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=P("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,i,n,o){i=P("a",i,n);return i.innerHTML=t,i.href="#",i.title=e,i.setAttribute("role","button"),i.setAttribute("aria-label",e),Ie(i),S(i,"click",Re),S(i,"click",o,this),S(i,"click",this._refocusOnMap,this),i},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";z(this._zoomInButton,e),z(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),!this._disabled&&t._zoom!==t.getMinZoom()||(M(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),!this._disabled&&t._zoom!==t.getMaxZoom()||(M(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}}),Ge=(A.mergeOptions({zoomControl:!0}),A.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new qe,this.addControl(this.zoomControl))}),B.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=P("div",e),n=this.options;return this._addScales(n,e+"-line",i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=P("div",e,i)),t.imperial&&(this._iScale=P("div",e,i))},_update:function(){var t=this._map,e=t.getSize().y/2,t=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(t)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t);this._updateScale(this._mScale,e<1e3?e+" m":e/1e3+" km",e/t)},_updateImperial:function(t){var e,i,t=3.2808399*t;5280'+(b.inlineSvg?' ':"")+"Leaflet"},initialize:function(t){c(this,t),this._attributions={}},onAdd:function(t){for(var e in(t.attributionControl=this)._container=P("div","leaflet-control-attribution"),Ie(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",function(){this.removeAttribution(t.layer.getAttribution())},this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t&&(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update()),this},removeAttribution:function(t){return t&&this._attributions[t]&&(this._attributions[t]--,this._update()),this},_update:function(){if(this._map){var t,e=[];for(t in this._attributions)this._attributions[t]&&e.push(t);var i=[];this.options.prefix&&i.push(this.options.prefix),e.length&&i.push(e.join(", ")),this._container.innerHTML=i.join(' ')}}}),n=(A.mergeOptions({attributionControl:!0}),A.addInitHook(function(){this.options.attributionControl&&(new Ke).addTo(this)}),B.Layers=Ve,B.Zoom=qe,B.Scale=Ge,B.Attribution=Ke,Ue.layers=function(t,e,i){return new Ve(t,e,i)},Ue.zoom=function(t){return new qe(t)},Ue.scale=function(t){return new Ge(t)},Ue.attribution=function(t){return new Ke(t)},et.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled&&(this._enabled=!1,this.removeHooks()),this},enabled:function(){return!!this._enabled}})),ft=(n.addTo=function(t,e){return t.addHandler(e,this),this},{Events:e}),Ye=b.touch?"touchstart mousedown":"mousedown",Xe=it.extend({options:{clickTolerance:3},initialize:function(t,e,i,n){c(this,n),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(S(this._dragStartTarget,Ye,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Xe._dragging===this&&this.finishDrag(!0),k(this._dragStartTarget,Ye,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){var e,i;this._enabled&&(this._moved=!1,ve(this._element,"leaflet-zoom-anim")||(t.touches&&1!==t.touches.length?Xe._dragging===this&&this.finishDrag():Xe._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||((Xe._dragging=this)._preventOutline&&Me(this._element),Le(),re(),this._moving||(this.fire("down"),i=t.touches?t.touches[0]:t,e=Ce(this._element),this._startPoint=new p(i.clientX,i.clientY),this._startPos=Pe(this._element),this._parentScale=Ze(e),i="mousedown"===t.type,S(document,i?"mousemove":"touchmove",this._onMove,this),S(document,i?"mouseup":"touchend touchcancel",this._onUp,this)))))},_onMove:function(t){var e;this._enabled&&(t.touches&&1e&&(i.push(t[n]),o=n);oe.max.x&&(i|=2),t.ye.max.y&&(i|=8),i}function ri(t,e,i,n){var o=e.x,e=e.y,s=i.x-o,r=i.y-e,a=s*s+r*r;return 0this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(l=!l);return l||yi.prototype._containsPoint.call(this,t,!0)}});var wi=ci.extend({initialize:function(t,e){c(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,o=d(t)?t:t.features;if(o){for(e=0,i=o.length;es.x&&(r=i.x+a-s.x+o.x),i.x-r-n.x<(a=0)&&(r=i.x-n.x),i.y+e+o.y>s.y&&(a=i.y+e-s.y+o.y),i.y-a-n.y<0&&(a=i.y-n.y),(r||a)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([r,a]))))},_getAnchor:function(){return m(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}})),Ii=(A.mergeOptions({closePopupOnClick:!0}),A.include({openPopup:function(t,e,i){return this._initOverlay(Bi,t,e,i).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),o.include({bindPopup:function(t,e){return this._popup=this._initOverlay(Bi,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof ci||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e;this._popup&&this._map&&(Re(t),e=t.layer||t.target,this._popup._source!==e||e instanceof fi?(this._popup._source=e,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}}),Ai.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){Ai.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){Ai.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=Ai.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=P("div",t),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+h(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,i=this._map,n=this._container,o=i.latLngToContainerPoint(i.getCenter()),i=i.layerPointToContainerPoint(t),s=this.options.direction,r=n.offsetWidth,a=n.offsetHeight,h=m(this.options.offset),l=this._getAnchor(),i="top"===s?(e=r/2,a):"bottom"===s?(e=r/2,0):(e="center"===s?r/2:"right"===s?0:"left"===s?r:i.xthis.options.maxZoom||nthis.options.maxZoom||void 0!==this.options.minZoom&&oi.max.x)||!e.wrapLat&&(t.yi.max.y))return!1}return!this.options.bounds||(e=this._tileCoordsToBounds(t),g(this.options.bounds).overlaps(e))},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),i=n.add(i);return[e.unproject(n,t.z),e.unproject(i,t.z)]},_tileCoordsToBounds:function(t){t=this._tileCoordsToNwSe(t),t=new s(t[0],t[1]);return t=this.options.noWrap?t:this._map.wrapLatLngBounds(t)},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var t=t.split(":"),e=new p(+t[0],+t[1]);return e.z=+t[2],e},_removeTile:function(t){var e=this._tiles[t];e&&(T(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){M(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=u,t.onmousemove=u,b.ielt9&&this.options.opacity<1&&C(t,this.options.opacity)},_addTile:function(t,e){var i=this._getTilePos(t),n=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),a(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&x(a(this._tileReady,this,t,null,o)),Z(o,i),this._tiles[n]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var n=this._tileCoordsToKey(t);(i=this._tiles[n])&&(i.loaded=+new Date,this._map._fadeAnimated?(C(i.el,0),r(this._fadeFrame),this._fadeFrame=x(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(M(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),b.ielt9||!this._map._fadeAnimated?x(this._pruneTiles,this):setTimeout(a(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new p(this._wrapX?H(t.x,this._wrapX):t.x,this._wrapY?H(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new f(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});var Di=Ni.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,(e=c(this,e)).detectRetina&&b.retina&&0')}}catch(t){}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),zt={_initContainer:function(){this._container=P("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Wi.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=Vi("shape");M(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Vi("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[h(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;T(e),t.removeInteractiveTarget(e),delete this._layers[h(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,o=t._container;o.stroked=!!n.stroke,o.filled=!!n.fill,n.stroke?(e=e||(t._stroke=Vi("stroke")),o.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=d(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(o.removeChild(e),t._stroke=null),n.fill?(i=i||(t._fill=Vi("fill")),o.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(o.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){fe(t._container)},_bringToBack:function(t){ge(t._container)}},qi=b.vml?Vi:ct,Gi=Wi.extend({_initContainer:function(){this._container=qi("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=qi("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){T(this._container),k(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){var t,e,i;this._map._animatingZoom&&this._bounds||(Wi.prototype._update.call(this),e=(t=this._bounds).getSize(),i=this._container,this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),Z(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update"))},_initPath:function(t){var e=t._path=qi("path");t.options.className&&M(e,t.options.className),t.options.interactive&&M(e,"leaflet-interactive"),this._updateStyle(t),this._layers[h(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){T(t._path),t.removeInteractiveTarget(t._path),delete this._layers[h(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,t=t.options;e&&(t.stroke?(e.setAttribute("stroke",t.color),e.setAttribute("stroke-opacity",t.opacity),e.setAttribute("stroke-width",t.weight),e.setAttribute("stroke-linecap",t.lineCap),e.setAttribute("stroke-linejoin",t.lineJoin),t.dashArray?e.setAttribute("stroke-dasharray",t.dashArray):e.removeAttribute("stroke-dasharray"),t.dashOffset?e.setAttribute("stroke-dashoffset",t.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),t.fill?(e.setAttribute("fill",t.fillColor||t.color),e.setAttribute("fill-opacity",t.fillOpacity),e.setAttribute("fill-rule",t.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,dt(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),n="a"+i+","+(Math.max(Math.round(t._radiusY),1)||i)+" 0 1,0 ",e=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+n+2*i+",0 "+n+2*-i+",0 ";this._setPath(t,e)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){fe(t._path)},_bringToBack:function(t){ge(t._path)}});function Ki(t){return b.svg||b.vml?new Gi(t):null}b.vml&&Gi.include(zt),A.include({getRenderer:function(t){t=(t=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer)||(this._renderer=this._createRenderer());return this.hasLayer(t)||this.addLayer(t),t},_getPaneRenderer:function(t){var e;return"overlayPane"!==t&&void 0!==t&&(void 0===(e=this._paneRenderers[t])&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e)},_createRenderer:function(t){return this.options.preferCanvas&&Ui(t)||Ki(t)}});var Yi=xi.extend({initialize:function(t,e){xi.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=g(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});Gi.create=qi,Gi.pointsToPath=dt,wi.geometryToLayer=bi,wi.coordsToLatLng=Li,wi.coordsToLatLngs=Ti,wi.latLngToCoords=Mi,wi.latLngsToCoords=zi,wi.getFeature=Ci,wi.asFeature=Zi,A.mergeOptions({boxZoom:!0});var _t=n.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){S(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){k(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){T(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),re(),Le(),this._startPoint=this._map.mouseEventToContainerPoint(t),S(document,{contextmenu:Re,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=P("div","leaflet-zoom-box",this._container),M(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var t=new f(this._point,this._startPoint),e=t.getSize();Z(this._box,t.min),this._box.style.width=e.x+"px",this._box.style.height=e.y+"px"},_finish:function(){this._moved&&(T(this._box),z(this._container,"leaflet-crosshair")),ae(),Te(),k(document,{contextmenu:Re,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){1!==t.which&&1!==t.button||(this._finish(),this._moved&&(this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(a(this._resetState,this),0),t=new s(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point)),this._map.fitBounds(t).fire("boxzoomend",{boxZoomBounds:t})))},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}}),Ct=(A.addInitHook("addHandler","boxZoom",_t),A.mergeOptions({doubleClickZoom:!0}),n.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom(),n=e.options.zoomDelta,i=t.originalEvent.shiftKey?i-n:i+n;"center"===e.options.doubleClickZoom?e.setZoom(i):e.setZoomAround(t.containerPoint,i)}})),Zt=(A.addInitHook("addHandler","doubleClickZoom",Ct),A.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0}),n.extend({addHooks:function(){var t;this._draggable||(t=this._map,this._draggable=new Xe(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))),M(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){z(this._map._container,"leaflet-grab"),z(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t,e=this._map;e._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity?(t=g(this._map.options.maxBounds),this._offsetLimit=_(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))):this._offsetLimit=null,e.fire("movestart").fire("dragstart"),e.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){var e,i;this._map.options.inertia&&(e=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos,this._positions.push(i),this._times.push(e),this._prunePositions(e)),this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;1e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t))},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-e+i)%t+e-i,n=(n+e+i)%t-e-i,t=Math.abs(o+i)e.getMaxZoom()&&1Bring gardening gloves.

", + "post_status": "draft", + "schedule": { + "start_date": "2026-12-05", + "start_time": "10:00", + "end_date": "2026-12-05", + "end_time": "12:00", + "timezone": "America/New_York", + "all_day": false, + "repeat": "none" + }, + "cost": "Free", + "metadata": {"source": "club-website"} + }' "$WORDPRESS_URL/wp-json/eventlabs/v1/events" +``` + +- Dates use `YYYY-MM-DD`. Timed schedules accept `HH:MM` or `HH:MM:SS`, with an IANA time zone or UTC. All-day start and end dates are inclusive. +- Repeat modes are `none`, `daily`, `weekly`, `monthly`, and `yearly`. Use `interval`, `weekdays` (Monday = 1), `monthly` (`day` or `weekday`), `count`, `until`, `include`, and `exclude` for the rule. The calendar indexes recurring dates through a rolling two-year future window. +- `venue`, `organizer`, `series`, `categories`, and `tags` are arrays of WordPress IDs. An empty array clears a relationship. `featured_media` is a WordPress image attachment ID or `0` to clear it. +- `post_status` controls WordPress visibility. Writable values are `draft`, `pending`, `private`, and `publish`. The separate event `status` accepts `scheduled`, `postponed`, `cancelled`, and `moved_online`. The `hidden` flag removes an event from calendar listings. +- `fields` carries configured eventLabs custom fields. `metadata` carries a JSON object for integration data. The response includes `id`, `post_status`, `url_public`, `revision`, and the saved schedule and relationships. +- Venue and organizer `latitude` and `longitude` come from the saved address. Set `lookup_address: true` to retry geocoding. The response reports the result in `geocode`. + +## Stable IDs and retries + +`PUT /{resource}/external/{source}/{external_id}` creates a record on the first successful request and returns `201`. Later writes to the same identity return `200` with the same WordPress ID. Use lowercase letters, numbers, hyphens, or underscores for `source`. The external ID accepts letters, numbers, dots, underscores, colons, and hyphens. Source names `burnworks` and `calendar-migration` are reserved for their own workflows. + +An item response has an `ETag`. Send that value as `If-Match` to make a write conditional on the current revision. Re-read the record after `412`. Use `If-None-Match: *` on an external PUT to create a record only when the identity is new. + +| HTTP status | Meaning | +| --- | --- | +| 400 | Invalid JSON, request fields, or source identity. | +| 401 / 403 | The request lacks an authorized eventLabs account. | +| 404 | The requested record is unavailable. | +| 409 | A burnWorks source version is older or repeats a version with different data. | +| 410 | The record mapped to this external ID was permanently deleted. | +| 412 | The revision or create-only condition failed. | +| 422 | The event schedule or a linked record is invalid. | +| 503 | Another write holds the record lock. Retry the request. | + +Errors use the WordPress REST shape `{"code":"…","message":"…","data":{"status":400}}`. Successful native write responses carry an ETag and use private, no-store caching. + +## Club and sub-club scope + +Register a club before publishing its events. Use the exact UUIDs from burnWorks. For example, send this body to `PUT /burnworks/workspaces/{workspace_id}/clubs/{club_id}`: + +```json +{ + "name": "Young Gardeners", + "kind": "subclub", + "status": "active", + "workspace_name": "Field Club" +} +``` + +`kind` accepts `organization` and `subclub`. `status` accepts `active` and `archived` and defaults to `active`. `workspace_name` is optional and labels that workspace in the Elementor picker. The club listing returns the saved name, kind, status, and `scope`. + +Event responses include `sub_club`, the hidden assignment in `workspace_id:club_id` form, and `club`, the directory record including its kind. New local events have a blank assignment. Set or clear it on a native event with PATCH. The burnWorks event route sets it from `club_id` for synced events. Events sent before a directory update are grouped by their IDs and receive a provisional label until the club is named. + +Elementor **Event Calendar** and **Event List** offer a **Club or sub-club** selector. A workspace choice includes its clubs. A club choice matches that exact workspace and club. For shortcodes, pass `scope=""` or `scope=":"` to `[burn_events]`. + +See the [burnWorks integration handoff](BURNWORKS-INTEGRATION.md) for the complete event payload and the publication gate. + +## Public feed + +`GET /wp-json/burn-events/v1/events` returns upcoming public occurrences with an event ID, title, public URL, and UTC start and end times. It accepts `limit` (1–50), `page`, `search`, and `category` (slug). diff --git a/docs/BURNWORKS-INTEGRATION.md b/docs/BURNWORKS-INTEGRATION.md new file mode 100644 index 0000000..5e36624 --- /dev/null +++ b/docs/BURNWORKS-INTEGRATION.md @@ -0,0 +1,113 @@ +# eventLabs API handoff for burnWorks + +Connect the burnWorks Clubs workspace to eventLabs on WordPress. The burnWorks Worker owns the club's event data, authorization, and publishing rules. Use the persisted `club_events` row after the write in `worker/clubs.ts` so the request includes the generated ID and source timestamps. + +## Connection + +- In WordPress, create a dedicated user with the **eventLabs Integration** role. Generate a WordPress Application Password from that user's profile. The role grants access to the eventLabs API on that WordPress site. +- Store the WordPress URL, username, and Application Password in server-side connection settings or Worker secrets. Use HTTP Basic authentication with the username and Application Password. A deployed Worker needs a reachable HTTPS WordPress URL. +- API namespace is `eventlabs/v1`. Use `/wp-json/eventlabs/v1/…` on a site with REST rewrites, or set the `rest_route` query parameter to the full route. The query form also works with plain permalinks. + +## Sync the club directory + +After connecting a WordPress site, send the workspace's `clubs` records to `PUT /eventlabs/v1/burnworks/workspaces/{workspace_id}/clubs/{club_id}`. Use the UUIDs already stored by burnWorks. Repeat the PUT when a club's name, kind, or status changes. + +```json +{ + "name": "Young Gardeners", + "kind": "subclub", + "status": "active", + "workspace_name": "Field Club" +} +``` + +Use `clubs.kind` as `organization` or `subclub`, `clubs.status` as `active` or `archived`, and the workspace's display name as `workspace_name`. Read the directory with `GET /eventlabs/v1/burnworks/workspaces/{workspace_id}/clubs`. eventLabs stores the event's workspace and club IDs together in its hidden `sub_club` assignment. This keeps identical club IDs in different workspaces separate. The Elementor calendar and list can select a whole workspace or one club. Existing event sync requests still establish the association. The directory PUT gives that association its display name and kind. + +## Publish a Clubs event + +Send `PUT /eventlabs/v1/burnworks/workspaces/{workspace_id}/events/{event_id}` with a JSON object. Use the existing UUIDs from `club_events`. The same workspace and event IDs always resolve to the same WordPress record. + +| burnWorks field | eventLabs mapping | +| --- | --- | +| `workspace_id`, `id` | External identity. Optional in the body when supplied in the route. | +| `club_id` | Club or sub-club association in the source record and the hidden event scope. | +| `title`, `description` | Source values plus a sanitized public title and description. | +| `starts_at` | Exact ISO 8601 value in the source record. The WordPress schedule uses UTC with second precision. | +| `venue` | Source venue name and the WordPress location field. | +| `status` | `draft`, `published`, or `cancelled`. A cancelled source event is withdrawn from the public calendar. | +| `audience` | `public`, `members`, or `private`. WordPress publishes the public audience only. | +| `capacity`, `kind` | Exact source values. Enforce membership, capacity, and waitlists in burnWorks. | +| `created_by`, `created_at` | Optional original creator and timestamp. Returned in the authenticated source record. | +| `ends_at` | Optional ISO 8601 end. The WordPress copy uses a one-hour duration when omitted. | +| `website_enabled`, `public_events_enabled` | Pass `club_sites.enabled` and the effective public events switch as JSON booleans. A missing switch counts as disabled. | +| `publish_to_wordpress` | Optional result of a burnWorks-specific rule. Send `false` to withdraw the WordPress copy. | +| `source_version` | Optional increasing integer from a durable per-event sequence. When supplied, later writes must carry a higher version or repeat the same version and payload. | +| `custom` | Optional JSON object for additional CRM fields. The API preserves nested JSON types and returns the object with the source record. | + +WordPress publishes when the event is `published`, its audience is `public`, both website switches are `true`, and `publish_to_wordpress` is `true` or omitted. Other events are saved as drafts. Apply the same club and workspace authorization checks burnWorks uses for its existing event operations. + +```ts +const route = `/eventlabs/v1/burnworks/workspaces/${event.workspace_id}/events/${event.id}` +const endpoint = new URL(connection.wordpressUrl) +endpoint.searchParams.set('rest_route', route) + +const response = await fetch(endpoint, { + method: 'PUT', + redirect: 'error', + headers: { + Authorization: `Basic ${btoa(`${connection.username}:${connection.applicationPassword}`)}`, + 'Content-Type': 'application/json', + }, + body: JSON.stringify({ + workspace_id: event.workspace_id, + id: event.id, + club_id: event.club_id, + title: event.title, + description: event.description, + starts_at: event.starts_at, + venue: event.venue, + status: event.status, + audience: event.audience, + capacity: event.capacity, + kind: event.kind, + created_by: event.created_by, + created_at: event.created_at, + website_enabled: Boolean(site?.enabled), + public_events_enabled: Boolean(site) && site?.public_events_enabled !== false && site?.public_events_enabled !== 0, + publish_to_wordpress: approvedForWebsite, + }), +}) +if (!response.ok) { + const error = await response.json() + throw new Error(`eventLabs ${response.status}: ${error.code ?? 'request_failed'}`) +} +const saved = await response.json() +``` + +Here `event` is the saved Clubs event, `site` is its workspace's `club_sites` row if one exists, and `approvedForWebsite` is the boolean result of any additional CRM rules. Use `true` when the workspace has no additional rule. The public events switch follows the default used in `worker/club-platform.ts`. + +## Sync behavior + +- A successful PUT returns `201` on create and `200` on update. Save the returned WordPress `id`, `url_public`, and `revision` if the CRM needs them. The `burnworks` object is the last accepted source record. The other fields describe the current WordPress copy. +- Use GET on the same route to check the current state. Serialize writes per event and read the latest Clubs record when retrying. Use `source_version` for an outbox that can deliver writes out of order. Increment it for each distinct update, including changes to publishing rules, and resend the same payload on retry. A stale source version returns `409`. Use the returned `ETag` as `If-Match` when an update should fail if the WordPress copy changed since the last read. Re-read on `412`. A `503` indicates a busy record and can be retried. A `410` means the mapped WordPress record was permanently deleted. +- Re-send affected events when their audience, status, or publishing rules change, including site-level switches. Before deleting a source event, send a final PUT with `publish_to_wordpress: false` or retain a durable record of the withdrawal to retry it. Re-sending the same event after a withdrawal can publish it again. +- The WordPress credential is scoped to a site. The workspace UUID is an identity key. Enforce burnWorks workspace permissions in the Worker and keep connection credentials out of the browser. + +## Direct eventLabs resources + +Authenticated resource collections are `/events`, `/venues`, `/organizers`, and `/series` under `/eventlabs/v1`. + +| Method and route | Purpose | +| --- | --- | +| `GET /schema` | Discover write fields, recurrence shape, CRM schema, and configured custom event fields. | +| `GET /{resource}` | List records. Follow `next_after_id` with `after_id`. Use `modified_since` for an inclusive time filter. | +| `POST /{resource}` | Create a native WordPress record. | +| `GET /{resource}/{id}` | Read the record with its ETag. | +| `PATCH /{resource}/{id}` | Change supplied fields. Use `If-Match` for conflict detection. | +| `GET, PUT /{resource}/external/{source}/{external_id}` | Read or upsert a stable record for another integration source. | +| `GET /events/{id}/occurrences` | Read indexed UTC occurrences. Follow `next_after_start` with `after_start`. | +| `GET /categories`, `GET /tags` | Resolve WordPress term IDs for the event's category and tag fields. | + +Native event links use arrays of WordPress venue, organizer, and series IDs. The `fields` object follows the WordPress custom-field configuration. Venue and organizer coordinates are read-only API fields derived from the address. A changed address triggers a lookup when a Maps key is configured. Send `lookup_address: true` to retry it. A missing or ambiguous result has null coordinates and a status in `geocode`. + +See the [API reference](API.md) for authentication examples, errors, and native payloads. diff --git a/docs/PARITY-AUDIT.md b/docs/PARITY-AUDIT.md new file mode 100644 index 0000000..e4dad19 --- /dev/null +++ b/docs/PARITY-AUDIT.md @@ -0,0 +1,27 @@ +# eventLabs feature and settings audit + +This audit compares the supplied Pro and Community packages and a Core reference package with the eventLabs 0.5.0 source mounted in the local test site. It covers event workflows and settings, with the comparison scoped to those versions. + +| Package | Version | SHA-256 prefix | +| --- | --- | --- | +| The Events Calendar Core reference | 6.18.3.1 | `cc3a7b2973f264f65` | +| Events Calendar Pro supplied ZIP | 7.8.5 | `8b63ce4fe1039b8f4` | +| Community supplied ZIP | 5.1.1.1 | `1ad11481c452601c8` | +| eventLabs mounted plugin source snapshot | 0.5.0 | `5198af7a5005ad9f` | + +Local REA 6.7.0 inventoried each archive with `inspect-artifact`. The three `compare` runs returned an unknown status because their evidence bundles lack an inventory completeness marker. The findings below come from reading the feature handlers, settings forms, and templates in those packages and tracing the corresponding eventLabs entry points. The comparison does not establish runtime parity for integrations that require accounts or other plugins. + +| Area | Available in eventLabs | Missing or partial coverage | Reference in the original packages | +| --- | --- | --- | --- | +| Calendar views | List, Month, Week, Day, Photo, Map, and Summary. Month and Week support multi-day bars, event previews, and an accent color per category. | Week has day columns with stacked tiles. Pro also has an hour-based schedule. Core has per-day overflow limits and separate primary, background, and text colors for categories. | Core `src/views/v2/month/calendar-body/day/` and `src/admin-views/category-colors/`. Pro `src/views/v2/week/grid-body/`. | +| Recurrence and series | Daily, weekly, monthly, and yearly rules with intervals, end conditions, included and excluded dates, linked series, and occurrence URLs. | One repeat rule per event. Editing or breaking out one occurrence, editing this and future occurrences, multiple rules on an event, and collapsing repeat instances in listings are gaps. | Pro `src/Tribe/Recurrence/Series_Splitter.php`, `Meta.php`, and `src/Tribe/Views/V2/Views/Partials/Hide_Recurring_Events_Toggle.php`. | +| Calendar settings | Default view, events per page, default event time zone, maps switch, map key, and WordPress date and time formats. | Separate settings for enabled views, archive and event slugs, month events per day, after-midnight cutoff, date/time separators, currency symbol and code, site-wide comments, map zoom, and archive template or stylesheet selection. | Core `src/admin-views/settings/tabs/display/` and `general/general-viewing.php`. | +| Venue defaults and additional fields | Default venue and organizer selection, address geocoding, public venue and organizer pages, and text, URL, checkbox, and select fields. | Default address, phone, and country list settings for new venues. Additional field coverage lacks radio and multi-value choices. | Pro `src/admin-views/settings/tabs/defaults/` and `src/Tribe/Editor/Additional_Fields.php`. | +| Editors and embeds | Elementor widgets and the Single Event template builder, event and community shortcodes, and WordPress post editing. | Native Gutenberg calendar and event blocks, the Pro mini-calendar and featured venue embeds, and the Pro Event Manager workflows. | Core `src/Events/Blocks/`. Pro `src/Tribe/Views/V2/Widgets/`, `src/Tribe/Views/V2/Shortcodes/`, and `src/Tribe/Admin/Manager/`. | +| Community submissions | Guest submission switch, signed-in ownership checks, My Events, withdrawal to Trash, and Pending Review for submissions and edits. | Configurable submission status, terms acceptance, email alert recipients, separate edit and removal controls, contributor role restrictions and redirects, front-end venue and organizer management, and per-route slugs. | Community `src/admin-views/settings/tabs/` and `src/views/community/`. | +| Imports | Manual CSV and local iCalendar imports, duplicate detection by source ID, CSV export, and iCalendar export. | Scheduled remote sources, import history and status, and updating records from repeated imports. iCalendar support covers a subset of recurrence rules. | Core `src/admin-views/aggregator/tabs/` and `origins/`. | +| Virtual events | Event website URL and Moved Online status. | Virtual and hybrid event settings, join-link visibility rules, meeting account integrations, and video embeds tied to event type. | Pro `src/Tribe/Virtual/` and `src/admin-views/virtual-metabox/`. | +| Tickets and payouts | Event cost display. | Ticket inventory and checkout, attendee and sales reporting, fee settings, and organizer payouts. The Community package includes integrations with commerce and ticketing providers for these flows. | Community `src/Tribe/Tickets/` and `src/Community_Tickets/Tickets/Commerce/`. | +| Maintenance and data migration | Occurrence index maintenance, local file import, and a same-site migration that copies event drafts, linked records, categories, and saved occurrence dates. | Admin settings for retiring old events and consolidating duplicate venues or organizers. Repeat rule generation and site settings require separate setup after migration. | Core `src/admin-views/settings/tabs/general/general-maintenance.php`. Pro `src/Events_Pro/Custom_Tables/V1/Series/`. | + +The independent eventLabs REST API and burnWorks publishing contract are documented in the [burnWorks integration handoff](BURNWORKS-INTEGRATION.md). diff --git a/docs/images/calendar.webp b/docs/images/calendar.webp new file mode 100644 index 0000000000000000000000000000000000000000..3002fb40189f42f886d1897920f3df177808520d GIT binary patch literal 49544 zcmdSBRdgLevMnfPW|l0LEM{hAMvIwck;Tl+k_8qsGcz+Y%VMy=Vmfo|?sxBek8Ks3cglr)sMNL+x|*JIi(h;TE$ay-7C-P? z0Ne`v>~?(d{5U@&etBNxoXoi-{zcr`bI{Y>b3uI6V=e$9m4Le0zxd5Io^8c$56OQ{(3X z!2U3KwYZEMZh7t|;b(jye%?8Lm-wK+ulcpJ={E#u`M7!Qcyzeixz1Vj`wHmtB)htL zV*CZD>)G)Y_9OTZd>?rMJS#r!toL|z_4$_|x(4xEsG+L1)2XKLB9w!QzGZ-EV_0 z$9Lu<4cI5LKjUG}lHex54?zE_cvtmC_11GseClV-U+`h`f&3BoOnfi+F1QAK7Vv`j zR`KHS#(1@J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?C$RQ%JIt4=Gb%ooqUM+yX*( z7XS0Mur-IM-sQAX5M+eBnlc^lYYL^3Tq%vGskVk5&tZRT{LKsLfNl`pL6z2th3Wpli1iMTpmRdz&+Jo+5)(#HFxa_8hOGj1>it4+_XE_ z_s_e`y8unad{?Y_(DCF$m94G8oCKXYE)@w2IqlAXwe-GtzBZ!YOP)>v(0DOtX=(iF zJtLF`%Xda{(!WGhWw@4}4nRY#l5YT}d-sel&n}u7v^q$My?>nZH7m1Clyfi{QlU(& zR2sPIZ#(9d^tbJpMTw^Fs86LAh@9#*1PRjt0gjGH`D;Mlg{NLT)5zRjj0^>voL2FG z#HI#?p)q|@rI#aam0~Q4Wwt=4xiY*)c0>({!0%`1V}mQrM6XjT{nZ{+zh%ALlEdCi zW9Wr3Rg|xty;VSt7tcTR0000Ntw4ecr6gh9E^lJ{X#fCJ=XWFk0000yfd#O*aWB(= z6%T`sCV&iD;F-X#6Glcf?Wh26{Zd*>Nog`zO6=G#-ffoLvyFg&Ic;eOCV-(3uz82I zI@+Y+wbyKttp_i(EDiJqPHF=vF;pj8Z~9Mg!q>7$AbJBQH35^FfXO{|XJZSz$9A*I z2KoahH35^FheBuy0Ry=OJKt~8WJXY&%ESC8#VQqf!DUJ&Aea=D`2+v}0000000029 Ce+3`_ literal 0 HcmV?d00001 diff --git a/docs/images/single-event.webp b/docs/images/single-event.webp new file mode 100644 index 0000000000000000000000000000000000000000..2ef5366b13a15507dcdd8f6766f6e14528b5d825 GIT binary patch literal 85928 zcmdqHWnUfJv+s+$yK8WFcXx;2?(WXS-AQl{?gV#tcL@%`9fHF=S!-qO{l9nbb6>#i zM?L$~bM%lJHGcK2Qk9XE%vS;h(UK5V)>P&u`SSaIb`By3lokY%A41TW`HNH$`KOw1 zZc#zA2(Xq8N1@QieAfV)SekFF2jnT|)Xt=cQ8vf2&crlY6Q+jghmZBHX$;Q{8O z?PD7VY%&Bg0Y5H#_5gQ4AaLc{_O%5FT$cl;T`>(fKF+)ocM`1&0pA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MS^6LMs=w|$ zpAMSfCtHYGKv_ex=7d}#Z1JSCV>o(g)I8jBAM&qmWb?yOcpjnFBpFMP zTwNb14FFhBv5r%yJZkonSc_Pf5dA7!?9OFpOK9(rPrm5{qq7EdeSaR)-M=@hZw4MU zRYeeXvF>{n?D9%wzzte0FIWRfYjqOT0d28bNc!}p`_#s&Mi(56@-S;JeIp(XGYQ7q zVZ^U^t4iL~3Ir`+&xr^nZu}f?q4`OyV4)Oznj%>odWd=fYS z<<^-NW_9QMSIV!T8`VpYm+;R?fM0F_1j>*D6$V6XV;hy%MA1OpsJ6QyFh5i|_*(cK z%g07x3)s;+g{TvPSoaeD+mY%`qQ~eyI7jnr&C|~*JQhfR1097;Yh5jgf&I;^-LO&3 zW^7FLc{hvtef;hLxwU!u1YpqX_FRz@K{D20NB|;xbS%K#i=|RX$GlZBsx^GSHXMg|z000~U7ot{eK)e6|009J7vZw$60HyB|I=D|df~2bsf7Jkc z%MdsWSObase && Events::EVENT === $screen->post_type ) { + wp_enqueue_style( 'burn-events-editor', plugins_url( 'assets/event-editor.css', BURN_EVENTS_FILE ), [], BURN_EVENTS_VERSION ); + wp_enqueue_script( 'burn-events-editor', plugins_url( 'assets/event-editor.js', BURN_EVENTS_FILE ), [], BURN_EVENTS_VERSION, true ); + } + if ( ! $screen || Events::CATEGORY !== $screen->taxonomy || 'term' !== $screen->base ) { + return; + } + wp_enqueue_style( 'wp-color-picker' ); + wp_enqueue_script( 'wp-color-picker' ); + wp_add_inline_script( 'wp-color-picker', 'jQuery(function ($) { $(".be-category-color").wpColorPicker(); });' ); + } + + public static function category_color_field( WP_Term $term ): void { + $color = sanitize_hex_color( (string) get_term_meta( $term->term_id, Calendar_Grid::COLOR_META, true ) ); + ?> + + + + + +

+ + + 'list', 'per_page' => 12, 'timezone' => wp_timezone_string(), + 'venue' => 0, 'organizer' => 0, 'anonymous' => false, 'community_edit' => true, + 'maps' => false, 'fields' => [], 'definitions' => '', + ]; + } + + public static function menu(): void { + add_submenu_page( 'edit.php?post_type=' . Events::EVENT, __( 'eventLabs Settings', 'burn-events' ), __( 'Settings', 'burn-events' ), 'manage_options', 'burn-events-settings', [ self::class, 'settings_page' ] ); + add_submenu_page( 'edit.php?post_type=' . Events::EVENT, __( 'Import and Export Events', 'burn-events' ), __( 'Import and Export', 'burn-events' ), 'manage_options', 'burn-events-transfer', [ Transfer::class, 'admin_page' ] ); + } + + public static function settings(): void { + register_setting( 'burn_events', self::OPTION, [ 'sanitize_callback' => [ self::class, 'sanitize_options' ] ] ); + Maps::register_setting(); + } + + public static function sanitize_options( $input ): array { + $input = (array) $input; + $view = sanitize_key( $input['view'] ?? 'list' ); + $zone = sanitize_text_field( $input['timezone'] ?? '' ); + try { + $timezone = ( new DateTimeZone( $zone ) )->getName(); + } catch ( \Exception $error ) { + $timezone = wp_timezone_string(); + add_settings_error( self::OPTION, 'timezone', __( 'The time zone was reset to the WordPress site time zone.', 'burn-events' ) ); + } + $fields = []; + $definitions = sanitize_textarea_field( $input['definitions'] ?? '' ); + foreach ( preg_split( '/\R/', $definitions, -1, PREG_SPLIT_NO_EMPTY ) as $line ) { + [ $key, $label, $type, $choices ] = array_pad( explode( '|', $line, 4 ), 4, '' ); + $key = sanitize_key( trim( $key ) ); + $label = sanitize_text_field( trim( $label ) ); + $type = sanitize_key( trim( $type ) ); + if ( $key && $label && in_array( $type, [ 'text', 'url', 'checkbox', 'select' ], true ) ) { + $fields[ $key ] = [ 'label' => $label, 'type' => $type, 'choices' => array_values( array_filter( array_map( 'sanitize_text_field', explode( ',', $choices ) ) ) ) ]; + } + } + return [ + 'view' => in_array( $view, Calendar::VIEWS, true ) ? $view : 'list', + 'per_page' => max( 1, min( 50, absint( $input['per_page'] ?? 12 ) ) ), + 'timezone' => $timezone, + 'venue' => absint( $input['venue'] ?? 0 ), + 'organizer' => absint( $input['organizer'] ?? 0 ), + 'anonymous' => ! empty( $input['anonymous'] ), + 'community_edit' => ! empty( $input['community_edit'] ), + 'maps' => ! empty( $input['maps'] ), + 'definitions' => $definitions, + 'fields' => $fields, + ]; + } + + public static function settings_page(): void { + $options = self::options(); + ?> +
+

+

·

+ +
+ + + + + + Events::VENUE, 'organizer' => Events::ORGANIZER ] as $name => $type ) : ?> + + + + + + + + + + +
+
+ ID ); + $data['imported_schedule'] = Events::uses_imported_dates( $post->ID ); + if ( ! $data['schedule'] ) { + $options = self::options(); + $data['venue'] = array_filter( [ $options['venue'] ] ); + $data['organizer'] = array_filter( [ $options['organizer'] ] ); + } + self::event_fields( $data ); + } + + public static function event_fields( array $data, bool $public = false ): void { + $options = self::options(); + $start = new DateTimeImmutable( 'tomorrow', new DateTimeZone( $options['timezone'] ) ); + $rule = ( $data['schedule'] ?? [] ) + [ + 'start_date' => $start->format( 'Y-m-d' ), 'end_date' => $start->format( 'Y-m-d' ), 'start_time' => '10:00', 'end_time' => '11:00', + 'timezone' => $options['timezone'], 'all_day' => false, 'repeat' => 'none', 'interval' => 1, + 'weekdays' => [], 'monthly' => 'day', 'until' => '', 'count' => 0, 'include' => [], 'exclude' => [], + ]; + if ( ! $public ) { + self::editor_fields( $data, $rule, $options['fields'] ); + return; + } + ?> +
+ + +
+ +
+ Events::VENUE, 'organizer' => Events::ORGANIZER ] as $name => $type ) : + ?> + + + +
+ +
+
+
+

+ +
+
+ +

+ +
+ + + +
+

+
+ $type ) { self::relation_picker( "be[$name]", $type, $data[ $name ] ?? [] ); } ?> +
+
+ +
+
+ +
+

+
+ + + +
+
+ + +
+
+ + +
+

+
+
+ +
+ + data-be-time class="be-editor-zone"> + + name="be[]" value=""> + + __( 'Does not repeat', 'burn-events' ), 'daily' => __( 'Daily', 'burn-events' ), + 'weekly' => __( 'Weekly', 'burn-events' ), 'monthly' => __( 'Monthly', 'burn-events' ), 'yearly' => __( 'Yearly', 'burn-events' ), + ]; + $open = 'none' !== $rule['repeat'] || ( $editor && ( $rule['include'] || $rule['exclude'] ) ); + ?> +
> + + + + +
+
+ + + + + +
+
+ +
+ + get_weekday( $day % 7 ); ?> + + +
+
+
+ __( 'Additional dates', 'burn-events' ), 'exclude' => __( 'Excluded dates', 'burn-events' ) ] as $key => $label ) : ?> + + +
+

+
+
+ $field ) : + $value = $values[ $key ] ?? ''; + ?> + class="be-editor-toggle"> + + + + + > + + + + + + $type, 'post_status' => 'publish', 'has_password' => false, 'posts_per_page' => -1, 'orderby' => 'title', 'order' => 'ASC' ] ); + } + + private static function relation_picker( string $name, string $type, array $selected ): void { + $posts = self::relation_posts( $type ); + $selected = array_map( 'intval', $selected ); + $choices = array_map( static fn( WP_Post $post ): string => get_the_title( $post ), $posts ); + $chosen = []; + foreach ( $posts as $index => $post ) { + if ( in_array( $post->ID, $selected, true ) ) { + $chosen[] = $choices[ $index ]; + } + } + $placeholder = __( 'None selected', 'burn-events' ); + ?> +
+ labels->name ); ?> + +
+ +
+ 8 ) : ?> + + +
+ $post ) : ?> + + + +
+
+
+ +
+ +
+ + + getMessage(), MINUTE_IN_SECONDS ); + } + } + + public static function location_box( WP_Post $post ): void { + wp_nonce_field( 'burn_location_details', 'burn_location_nonce' ); + $data = Events::location_data( $post->ID ); + $labels = [ + 'address' => __( 'Street address', 'burn-events' ), 'city' => __( 'City', 'burn-events' ), + 'region' => __( 'State or region', 'burn-events' ), 'postal' => __( 'Postal code', 'burn-events' ), + 'country' => __( 'Country', 'burn-events' ), 'website' => __( 'Website', 'burn-events' ), + 'email' => __( 'Email', 'burn-events' ), 'phone' => __( 'Phone', 'burn-events' ), + ]; + foreach ( $labels as $key => $label ) { + echo '

'; + } + echo '

' . esc_html__( 'Address lookup', 'burn-events' ) . ' ' . esc_html( Maps::lookup_message( $data ) ) . '

'; + if ( '' !== $data['latitude'] && '' !== $data['longitude'] ) { + echo '

' . esc_html( $data['latitude'] . ', ' . $data['longitude'] ) . '

'; + Maps::attribution( $data ); + } + if ( Maps::has_key() && Maps::address( $data ) ) { + echo '

'; + } + } + + public static function save_location( int $id ): void { + if ( ! self::valid_save( $id, 'burn_location_nonce', 'burn_location_details' ) || ! is_array( $_POST['be_location'] ?? null ) ) { + return; + } + try { + Events::save_location( $id, wp_unslash( $_POST['be_location'] ), ! empty( $_POST['be_lookup_address'] ) ); + } catch ( \Throwable $error ) { + set_transient( 'burn_events_error_' . get_current_user_id(), $error->getMessage(), MINUTE_IN_SECONDS ); + } + } + + private static function valid_save( int $id, string $key, string $action ): bool { + return ! wp_is_post_autosave( $id ) && ! wp_is_post_revision( $id ) && current_user_can( 'edit_post', $id ) + && isset( $_POST[ $key ] ) && is_string( $_POST[ $key ] ) && wp_verify_nonce( wp_unslash( $_POST[ $key ] ), $action ); + } + + public static function errors(): void { + $key = 'burn_events_error_' . get_current_user_id(); + $error = get_transient( $key ); + if ( $error ) { + delete_transient( $key ); + echo '

' . esc_html( $error ) . '

'; + } + } + + public static function columns( array $columns ): array { + $columns['burn_event_schedule'] = __( 'Schedule', 'burn-events' ); + return $columns; + } + + public static function column( string $name, int $id ): void { + if ( 'burn_event_schedule' === $name ) { + $data = Events::event_data( $id ); + $row = Events::occurrence( $id ); + echo $row ? esc_html( Calendar::period( $row, $data ) ) : esc_html__( 'Unscheduled', 'burn-events' ); + if ( $data['schedule'] && 'none' !== $data['schedule']['repeat'] ) { + echo '
' . esc_html__( 'Recurring', 'burn-events' ); + } + } + } +} diff --git a/includes/class-api.php b/includes/class-api.php new file mode 100644 index 0000000..e451bf4 --- /dev/null +++ b/includes/class-api.php @@ -0,0 +1,560 @@ + Events::EVENT, 'venues' => Events::VENUE, 'organizers' => Events::ORGANIZER, 'series' => Events::SERIES, + ]; + private const POST_FIELDS = [ + 'title' => 'post_title', 'description' => 'post_content', 'excerpt' => 'post_excerpt', + 'slug' => 'post_name', 'post_status' => 'post_status', + ]; + private const EVENT_FIELDS = [ 'status', 'venue', 'organizer', 'series', 'location', 'cost', 'url', 'featured', 'hidden', 'fields' ]; + private const TAXONOMIES = [ 'categories' => Events::CATEGORY, 'tags' => 'post_tag' ]; + private const METADATA = '_eventlabs_metadata'; + + public static function install(): void { + if ( '1' === get_option( 'eventlabs_api_schema' ) ) { + return; + } + global $wpdb; + require_once ABSPATH . 'wp-admin/includes/upgrade.php'; + $table = self::table(); + $collation = $wpdb->get_charset_collate(); + dbDelta( "CREATE TABLE $table ( + sync_key char(64) NOT NULL, + post_id bigint unsigned NOT NULL, + source varchar(40) NOT NULL, + external_id varchar(160) NOT NULL, + PRIMARY KEY (sync_key), + UNIQUE KEY post_id (post_id) + ) ENGINE=InnoDB $collation;" ); + if ( $table === $wpdb->get_var( $wpdb->prepare( 'SHOW TABLES LIKE %s', $wpdb->esc_like( $table ) ) ) ) { + add_role( 'eventlabs_connector', __( 'eventLabs Integration', 'burn-events' ), [ 'read' => true, self::CAPABILITY => true ] ); + update_option( 'eventlabs_api_schema', '1' ); + } + } + + private static function table(): string { + global $wpdb; + return $wpdb->prefix . 'eventlabs_external_ids'; + } + + public static function register(): void { + $resource = '/(?Pevents|venues|organizers|series)'; + register_rest_route( self::NAMESPACE, $resource, [ + self::route( 'GET', 'listing' ), + self::route( 'POST', 'create' ), + ] ); + register_rest_route( self::NAMESPACE, $resource . '/(?P[1-9][0-9]*)', [ + self::route( 'GET', 'read' ), + self::route( 'PATCH', 'update' ), + ] ); + register_rest_route( self::NAMESPACE, $resource . '/external/(?P[a-z0-9_-]{1,40})/(?P[A-Za-z0-9_.:-]{1,160})', [ + self::route( 'GET', 'read_external' ), + self::route( 'PUT', 'put_external' ), + ] ); + register_rest_route( self::NAMESPACE, '/schema', self::route( 'GET', 'describe' ) ); + register_rest_route( self::NAMESPACE, '/(?Pcategories|tags)', self::route( 'GET', 'terms' ) ); + register_rest_route( self::NAMESPACE, '/events/(?P[1-9][0-9]*)/occurrences', self::route( 'GET', 'occurrences' ) ); + } + + private static function route( string $method, string $callback ): array { + return [ + 'methods' => $method, 'callback' => [ self::class, $callback ], + 'permission_callback' => [ self::class, 'permission' ], + ]; + } + + public static function permission() { + if ( current_user_can( 'manage_options' ) || current_user_can( self::CAPABILITY ) ) { + return true; + } + return self::error( 'access_denied', __( 'An authorized eventLabs account is required.', 'burn-events' ), rest_authorization_required_code() ); + } + + public static function error( string $code, string $message, int $status ): WP_Error { + return new WP_Error( 'eventlabs_' . $code, $message, [ 'status' => $status ] ); + } + + private static function resource( WP_REST_Request $request ): string { + return strtolower( $request->get_url_params()['resource'] ); + } + + public static function response( array $body, int $status = 200, string $revision = '' ): WP_REST_Response { + $response = new WP_REST_Response( $body, $status ); + $response->header( 'Cache-Control', 'private, no-store' ); + if ( $revision ) { + $response->header( 'ETag', '"' . $revision . '"' ); + } + return $response; + } + + public static function listing( WP_REST_Request $request ) { + $resource = self::resource( $request ); + $limit = self::limit( $request ); + $after = absint( $request->get_param( 'after_id' ) ); + $since = $request->get_param( 'modified_since' ); + $args = [ + 'post_type' => self::RESOURCES[ $resource ], 'post_status' => [ 'publish', 'draft', 'pending', 'private', 'future', 'trash' ], + 'orderby' => 'ID', 'order' => 'ASC', 'posts_per_page' => $limit + 1, 'no_found_rows' => true, + 'eventlabs_after_id' => $after, + ]; + if ( null !== $since ) { + $parsed = is_string( $since ) ? rest_parse_date( $since ) : false; + if ( false === $parsed ) { + return self::error( 'modified_since', __( 'Use an ISO 8601 date and time for modified_since.', 'burn-events' ), 400 ); + } + $args['date_query'] = [ [ + 'after' => gmdate( 'Y-m-d H:i:s', $parsed ), 'column' => 'post_modified_gmt', 'inclusive' => true, + ] ]; + } + $where = static function ( string $where, \WP_Query $query ): string { + global $wpdb; + $after = (int) $query->get( 'eventlabs_after_id' ); + return $after ? $where . $wpdb->prepare( " AND $wpdb->posts.ID > %d", $after ) : $where; + }; + add_filter( 'posts_where', $where, 10, 2 ); + try { + $query = new \WP_Query( $args ); + } finally { + remove_filter( 'posts_where', $where, 10 ); + } + $posts = array_slice( $query->posts, 0, $limit ); + return self::response( [ + 'items' => array_map( static fn( WP_Post $post ): array => self::record( $post, $resource ), $posts ), + 'next_after_id' => count( $query->posts ) > $limit ? end( $posts )->ID : null, + ] ); + } + + public static function read( WP_REST_Request $request ) { + $resource = self::resource( $request ); + $post = self::post( $resource, (int) $request->get_url_params()['id'] ); + return $post ? self::record_response( self::record( $post, $resource ) ) : self::missing(); + } + + public static function read_external( WP_REST_Request $request ) { + $identity = $request->get_url_params(); + return self::external( self::resource( $request ), strtolower( $identity['source'] ), $identity['external_id'] ); + } + + public static function external( string $resource, string $source, string $external_id ) { + $id = self::external_id( self::sync_key( $resource, $source, $external_id ) ); + if ( ! $id ) { + return self::missing(); + } + $post = self::post( $resource, $id ); + return $post ? self::record_response( self::record( $post, $resource ) ) : self::missing( true ); + } + + private static function post( string $resource, int $id ): ?WP_Post { + $post = $id ? get_post( $id ) : null; + return $post && self::RESOURCES[ $resource ] === $post->post_type && ! in_array( $post->post_status, [ 'inherit', 'auto-draft' ], true ) ? $post : null; + } + + private static function missing( bool $removed = false ): WP_Error { + return $removed + ? self::error( 'removed', __( 'The record for this external ID was permanently deleted.', 'burn-events' ), 410 ) + : self::error( 'not_found', __( 'The eventLabs record was not found.', 'burn-events' ), 404 ); + } + + private static function limit( WP_REST_Request $request ): int { + return max( 1, min( 100, absint( $request->get_param( 'limit' ) ?? 50 ) ) ); + } + + private static function record_response( array $record, int $status = 200 ): WP_REST_Response { + return self::response( $record, $status, $record['revision'] ); + } + + private static function record( WP_Post $post, string $resource ): array { + global $wpdb; + $id = $post->ID; + $table = self::table(); + $external = $wpdb->get_row( $wpdb->prepare( "SELECT source, external_id AS id FROM $table WHERE post_id = %d", $id ), ARRAY_A ); + $record = [ + 'id' => $id, 'resource' => $resource, 'external' => $external ?: null, + 'title' => $post->post_title, 'description' => $post->post_content, 'excerpt' => $post->post_excerpt, + 'slug' => $post->post_name, 'post_status' => $post->post_status, + 'featured_media' => (int) get_post_thumbnail_id( $id ), 'author_id' => (int) $post->post_author, + 'password_protected' => '' !== $post->post_password, + 'created_gmt' => self::utc( $post->post_date_gmt ), 'modified_gmt' => self::utc( $post->post_modified_gmt ), + 'url_public' => 'publish' === $post->post_status && ! $post->post_password ? get_permalink( $post ) : null, + 'metadata' => json_decode( (string) get_post_meta( $id, self::METADATA, true ) ) ?? new \stdClass(), + ]; + + if ( 'events' === $resource ) { + $event = Events::event_data( $id ); + $event['schedule'] = $event['schedule'] ?: null; + $event['fields'] = (object) $event['fields']; + foreach ( Admin::options()['fields'] as $key => $definition ) { + if ( 'checkbox' === $definition['type'] && isset( $event['fields']->$key ) ) { + $event['fields']->$key = (bool) $event['fields']->$key; + } + } + $record += $event; + foreach ( self::TAXONOMIES as $field => $taxonomy ) { + $terms = wp_get_object_terms( $id, $taxonomy, [ 'fields' => 'ids', 'orderby' => 'term_id' ] ); + $record[ $field ] = is_wp_error( $terms ) ? [] : array_map( 'intval', $terms ); + } + $record['burnworks'] = BurnWorks::snapshot( $id ) ?: null; + $record['sub_club'] = (string) get_post_meta( $id, Clubs::EVENT_META, true ); + $record['club'] = Clubs::event( $id ); + } elseif ( in_array( $resource, [ 'venues', 'organizers' ], true ) ) { + $place = Events::location_data( $id ); + foreach ( [ 'latitude', 'longitude' ] as $coordinate ) { + $place[ $coordinate ] = is_numeric( $place[ $coordinate ] ) ? (float) $place[ $coordinate ] : null; + } + $place['geocode'] = $place['geocode'] ?: null; + $record += $place; + } + + $record['revision'] = hash( 'sha256', wp_json_encode( $record, JSON_PRESERVE_ZERO_FRACTION | JSON_INVALID_UTF8_SUBSTITUTE ) ); + return $record; + } + + private static function utc( string $date ): ?string { + return '0000-00-00 00:00:00' === $date || '' === $date ? null : str_replace( ' ', 'T', $date ) . 'Z'; + } + + public static function create( WP_REST_Request $request ) { + return self::receive( $request ); + } + + public static function update( WP_REST_Request $request ) { + return self::receive( $request, (int) $request->get_url_params()['id'] ); + } + + public static function put_external( WP_REST_Request $request ) { + $identity = $request->get_url_params(); + $source = strtolower( $identity['source'] ); + if ( 'burnworks' === $source ) { + return self::error( 'burnworks_route', __( 'Use the burnWorks publishing route for burnWorks event records.', 'burn-events' ), 400 ); + } + if ( Legacy_Migration::SOURCE === $source ) { + return self::error( 'migration_route', __( 'Use Import and Export in WordPress for legacy calendar migration.', 'burn-events' ), 400 ); + } + return self::receive( $request, 0, [ $source, $identity['external_id'] ] ); + } + + private static function receive( WP_REST_Request $request, int $id = 0, ?array $identity = null ) { + $resource = self::resource( $request ); + $raw = json_decode( $request->get_body() ); + if ( ! $raw instanceof \stdClass || ! $request->is_json_content_type() ) { + return self::error( 'invalid_json', __( 'Send a JSON object with Content-Type: application/json.', 'burn-events' ), 400 ); + } + $schema = self::schema( $resource ); + $payload = $request->get_json_params(); + $valid = rest_validate_value_from_schema( $payload, $schema, 'body' ); + if ( is_wp_error( $valid ) ) { + $valid->add_data( [ 'status' => 400 ] ); + return $valid; + } + $payload = rest_sanitize_value_from_schema( $payload, $schema, 'body' ); + if ( isset( $raw->metadata ) ) { + if ( ! $raw->metadata instanceof \stdClass ) { + return self::error( 'invalid_metadata', __( 'metadata must be a JSON object.', 'burn-events' ), 400 ); + } + $payload['metadata'] = $raw->metadata; + } + return self::write( $resource, $payload, $request, $id, $identity ); + } + + public static function write( string $resource, array $payload, WP_REST_Request $request, int $id = 0, ?array $identity = null, ?array $burnworks = null ) { + global $wpdb; + $sync_key = $identity ? self::sync_key( $resource, ...$identity ) : ''; + $lock = $sync_key ? 'el-' . substr( $sync_key, 0, 60 ) : ''; + if ( $lock && '1' !== (string) $wpdb->get_var( $wpdb->prepare( 'SELECT GET_LOCK(%s, 5)', $lock ) ) ) { + return self::error( 'record_busy', __( 'This record is being updated. Retry the request.', 'burn-events' ), 503 ); + } + $saved_id = 0; + try { + return Events::transaction( static function () use ( $resource, $payload, $request, $id, $identity, $sync_key, $burnworks, &$saved_id ) { + global $wpdb; + $id = $sync_key ? self::external_id( $sync_key ) : $id; + if ( $id && ! Events::lock_post( $id ) ) { + return self::missing( (bool) $identity ); + } + $post = self::post( $resource, $id ); + if ( $id && ! $post ) { + return self::missing( (bool) $identity ); + } + if ( $post && '*' === $request->get_header( 'if-none-match' ) ) { + return self::error( 'already_exists', __( 'The external record has already been created.', 'burn-events' ), 412 ); + } + $if_match = $request->get_header( 'if-match' ); + if ( $if_match && ( ! $post || ( '*' !== $if_match && '"' . self::record( $post, $resource )['revision'] . '"' !== $if_match ) ) ) { + return self::error( 'stale_revision', __( 'The record changed. Fetch it again before saving.', 'burn-events' ), 412 ); + } + if ( $burnworks && $post && ! BurnWorks::accepts_version( $burnworks, BurnWorks::snapshot( $id ) ) ) { + return self::error( 'stale_source_version', __( 'A newer or different version of this burnWorks record has been saved.', 'burn-events' ), 409 ); + } + $blocked = apply_filters( 'eventlabs_api_validate_write', null, $resource, $payload, $post, $request ); + if ( is_wp_error( $blocked ) ) { + return $blocked; + } + $saved_id = $id; + $result = self::persist( $resource, $payload, $post, $burnworks, $saved_id ); + if ( is_wp_error( $result ) ) { + return $result; + } + if ( $identity && ! $id && ! $wpdb->insert( self::table(), [ + 'sync_key' => $sync_key, 'post_id' => $saved_id, 'source' => $identity[0], 'external_id' => $identity[1], + ], [ '%s', '%d', '%s', '%s' ] ) ) { + throw new RuntimeException( 'External ID write failed.' ); + } + return self::record_response( self::record( get_post( $saved_id ), $resource ), $id ? 200 : 201 ); + } ); + } catch ( InvalidArgumentException $error ) { + return self::error( 'invalid_record', $error->getMessage(), 422 ); + } catch ( \Throwable $error ) { + return self::error( 'write_failed', __( 'The eventLabs record could not be saved.', 'burn-events' ), 500 ); + } finally { + if ( $saved_id ) { + wp_cache_delete( $saved_id, 'posts' ); + wp_cache_delete( $saved_id, 'post_meta' ); + clean_object_term_cache( $saved_id, self::RESOURCES[ $resource ] ); + } + if ( $lock ) { + $wpdb->get_var( $wpdb->prepare( 'SELECT RELEASE_LOCK(%s)', $lock ) ); + } + } + } + + private static function persist( string $resource, array $payload, ?WP_Post $post, ?array $burnworks, int &$saved_id ) { + $id = $post->ID ?? 0; + $title = sanitize_text_field( $payload['title'] ?? ( $post->post_title ?? '' ) ); + if ( '' === $title ) { + throw new InvalidArgumentException( __( 'A title is required.', 'burn-events' ) ); + } + $attributes = [ 'post_type' => self::RESOURCES[ $resource ] ]; + if ( ! $id ) { + $attributes += [ 'post_title' => $title, 'post_status' => 'draft', 'comment_status' => 'closed' ]; + } + foreach ( self::POST_FIELDS as $field => $column ) { + if ( array_key_exists( $field, $payload ) ) { + $attributes[ $column ] = match ( $field ) { + 'title' => $title, + 'description', 'excerpt' => str_replace( '[', '[', wp_kses_post( $payload[ $field ] ) ), + default => $payload[ $field ], + }; + } + } + $source = $burnworks ? wp_json_encode( $burnworks, JSON_PRESERVE_ZERO_FRACTION | JSON_THROW_ON_ERROR ) : null; + if ( null !== $source ) { + if ( $id ) { + Events::write_meta( $id, BurnWorks::META, $source ); + } else { + $attributes['meta_input'] = [ BurnWorks::META => $source ]; + } + } + $model = 'events' === $resource ? self::event_model( $id, $payload ) : null; + $terms = self::validate_links( $payload, self::TAXONOMIES, true ); + $media = $payload['featured_media'] ?? null; + if ( $media && ! wp_attachment_is_image( $media ) ) { + throw new InvalidArgumentException( __( 'featured_media must refer to a WordPress image attachment.', 'burn-events' ) ); + } + + $result = $id ? wp_update_post( wp_slash( $attributes + [ 'ID' => $id ] ), true ) : wp_insert_post( wp_slash( $attributes ), true ); + if ( is_wp_error( $result ) || ! $result ) { + return self::error( 'post_write', __( 'WordPress could not save the record.', 'burn-events' ), 500 ); + } + $saved_id = $result; + if ( ! $id && null !== $source ) { + Events::write_meta( $result, BurnWorks::META, $source ); + } + if ( null !== $media ) { + if ( $media ) { + Events::write_meta( $result, '_thumbnail_id', (string) $media ); + } else { + delete_post_thumbnail( $result ); + } + } + if ( array_key_exists( 'metadata', $payload ) ) { + Events::write_meta( $result, self::METADATA, wp_json_encode( (object) $payload['metadata'], JSON_PRESERVE_ZERO_FRACTION ) ); + } + if ( $model ) { + Events::save( $result, $model, $payload['imported_dates'] ?? null ); + } elseif ( in_array( $resource, [ 'venues', 'organizers' ], true ) + && ( ! $id || ! empty( $payload['lookup_address'] ) || array_intersect_key( $payload, array_flip( Events::LOCATION_FIELDS ) ) ) + ) { + Events::save_location( $result, $payload, ! empty( $payload['lookup_address'] ) ); + } + if ( $burnworks ) { + Clubs::assign( $result, $burnworks['workspace_id'] . ':' . $burnworks['club_id'], true ); + } elseif ( 'events' === $resource && array_key_exists( 'sub_club', $payload ) ) { + if ( BurnWorks::snapshot( $result ) ) { + throw new InvalidArgumentException( __( 'Change the club for a synced event in burnWorks.', 'burn-events' ) ); + } + Clubs::assign( $result, $payload['sub_club'] ); + } + foreach ( $terms as $field => $ids ) { + $updated = wp_set_object_terms( $result, $ids, self::TAXONOMIES[ $field ] ); + if ( is_wp_error( $updated ) ) { + throw new RuntimeException( 'Taxonomy write failed.' ); + } + } + return $result; + } + + private static function event_model( int $id, array $payload ): ?array { + $old = $id ? Events::event_data( $id ) : [ 'schedule' => [], 'fields' => [] ]; + $changed = array_intersect_key( $payload, array_flip( self::EVENT_FIELDS ) ); + if ( $id && ! array_key_exists( 'schedule', $payload ) && ! $changed ) { + return null; + } + $rule = array_replace( $old['schedule'], $payload['schedule'] ?? [] ); + foreach ( [ 'include', 'exclude' ] as $date_set ) { + $rule[ $date_set ] = implode( ',', (array) ( $rule[ $date_set ] ?? [] ) ); + } + $input = $rule + array_replace( $old, $changed ); + $input['fields'] = array_replace( (array) $old['fields'], (array) ( $changed['fields'] ?? [] ) ); + $linked = self::validate_links( $changed, Events::RELATIONS ); + $event = Events::validate_event( $input ); + foreach ( Events::RELATIONS as $field => $type ) { + $event[ $field ] = $linked[ $field ] ?? $old[ $field ] ?? []; + } + $event['fields'] = array_replace( $input['fields'], $event['fields'] ); + return $event; + } + + private static function validate_links( array $payload, array $types, bool $taxonomy = false ): array { + $links = []; + foreach ( array_intersect_key( $payload, $types ) as $field => $ids ) { + $links[ $field ] = []; + foreach ( array_unique( array_map( 'intval', $ids ) ) as $id ) { + $item = $taxonomy ? get_term( $id, $types[ $field ] ) : get_post( $id ); + if ( ! $item || is_wp_error( $item ) || ( ! $taxonomy && ( $types[ $field ] !== $item->post_type || 'trash' === $item->post_status ) ) ) { + throw new InvalidArgumentException( sprintf( __( '%1$s contains an invalid record ID (%2$d).', 'burn-events' ), $field, $id ) ); + } + $links[ $field ][] = $id; + } + } + return $links; + } + + private static function sync_key( string $resource, string $source, string $external_id ): string { + return hash( 'sha256', get_current_blog_id() . '/' . $resource . '/' . $source . '/' . $external_id ); + } + + private static function external_id( string $key ): int { + global $wpdb; + $table = self::table(); + return (int) $wpdb->get_var( $wpdb->prepare( "SELECT post_id FROM $table WHERE sync_key = %s", $key ) ); + } + + public static function terms( WP_REST_Request $request ) { + $name = strtolower( $request->get_url_params()['taxonomy'] ); + $limit = self::limit( $request ); + $page = max( 1, absint( $request->get_param( 'page' ) ) ); + $terms = get_terms( [ + 'taxonomy' => self::TAXONOMIES[ $name ], 'hide_empty' => false, 'orderby' => 'id', + 'number' => $limit + 1, 'offset' => ( $page - 1 ) * $limit, + ] ); + if ( is_wp_error( $terms ) ) { + return self::error( 'terms_unavailable', __( 'The event terms could not be read.', 'burn-events' ), 500 ); + } + return self::response( [ + 'items' => array_map( static fn( \WP_Term $term ): array => [ + 'id' => $term->term_id, 'name' => $term->name, 'slug' => $term->slug, 'parent' => $term->parent, + ], array_slice( $terms, 0, $limit ) ), + 'next_page' => count( $terms ) > $limit ? $page + 1 : null, + ] ); + } + + public static function occurrences( WP_REST_Request $request ) { + $id = (int) $request->get_url_params()['id']; + if ( ! self::post( 'events', $id ) ) { + return self::missing(); + } + global $wpdb; + $table = Events::table(); + $limit = self::limit( $request ); + $after = $request->get_param( 'after_start' ); + $parsed = is_string( $after ) ? rest_parse_date( $after ) : false; + if ( null !== $after && false === $parsed ) { + return self::error( 'after_start', __( 'Use an ISO 8601 date and time for after_start.', 'burn-events' ), 400 ); + } + $rows = $wpdb->get_results( $wpdb->prepare( + "SELECT starts_at, ends_at FROM $table WHERE event_id = %d AND starts_at > %s ORDER BY starts_at LIMIT %d", + $id, false === $parsed ? '1000-01-01 00:00:00' : gmdate( 'Y-m-d H:i:s', $parsed ), $limit + 1 + ), ARRAY_A ); + if ( ! is_array( $rows ) ) { + return self::error( 'occurrences_unavailable', __( 'The event occurrences could not be read.', 'burn-events' ), 500 ); + } + $items = array_map( static fn( array $row ): array => [ + 'start_utc' => self::utc( $row['starts_at'] ), 'end_utc' => self::utc( $row['ends_at'] ), + ], array_slice( $rows, 0, $limit ) ); + return self::response( [ + 'items' => $items, 'next_after_start' => count( $rows ) > $limit ? end( $items )['start_utc'] : null, + ] ); + } + + public static function describe(): WP_REST_Response { + $resources = []; + foreach ( array_keys( self::RESOURCES ) as $resource ) { + $resources[ $resource ] = self::schema( $resource ); + } + return self::response( [ + 'version' => 1, 'resource_writes' => $resources, + 'custom_event_fields' => (object) Admin::options()['fields'], + 'burnworks_event' => BurnWorks::schema(), + 'burnworks_club' => Clubs::schema(), + ] ); + } + + private static function schema( string $resource ): array { + $string = static fn( int $max ): array => [ 'type' => 'string', 'maxLength' => $max ]; + $boolean = [ 'type' => 'boolean' ]; + $enum = static fn( array $values ): array => [ 'type' => 'string', 'enum' => $values ]; + $number = static fn( int $min, int $max = PHP_INT_MAX ): array => [ 'type' => 'integer', 'minimum' => $min, 'maximum' => $max ]; + $list = static fn( array $item, int $max = 200 ): array => [ 'type' => 'array', 'items' => $item, 'maxItems' => $max ]; + $object = static fn( array $properties ): array => [ 'type' => 'object', 'properties' => $properties, 'additionalProperties' => false ]; + $properties = [ + 'title' => $string( 200 ), 'description' => $string( 60000 ), 'excerpt' => $string( 4000 ), + 'slug' => $string( 200 ), 'post_status' => $enum( [ 'publish', 'draft', 'pending', 'private' ] ), + 'featured_media' => $number( 0 ), 'metadata' => [ 'type' => 'object', 'additionalProperties' => true ], + ]; + if ( 'events' === $resource ) { + $day = [ 'type' => 'string', 'pattern' => '^\d{4}-\d{2}-\d{2}$' ]; + $time = [ 'type' => 'string', 'pattern' => '^\d{2}:\d{2}(?::\d{2})?$' ]; + $custom = []; + foreach ( Admin::options()['fields'] as $key => $field ) { + $custom[ $key ] = match ( $field['type'] ) { + 'checkbox' => $boolean, + 'select' => $enum( array_merge( [ '' ], $field['choices'] ) ), + default => $string( 4000 ), + }; + } + $properties += [ + 'schedule' => $object( [ + 'start_date' => $day, 'end_date' => $day, 'start_time' => $time, 'end_time' => $time, + 'timezone' => $string( 120 ), 'all_day' => $boolean, 'repeat' => $enum( Schedule::REPEATS ), + 'interval' => $number( 1, 365 ), 'weekdays' => $list( $number( 1, 7 ), 7 ), + 'monthly' => $enum( [ 'day', 'weekday' ] ), 'count' => $number( 0, 10000 ), + 'until' => [ 'type' => 'string', 'pattern' => '^(?:\d{4}-\d{2}-\d{2})?$' ], + 'include' => $list( $day ), 'exclude' => $list( $day ), + ] ), + 'status' => $enum( array_keys( Events::statuses() ) ), 'location' => $string( 400 ), 'cost' => $string( 120 ), + 'sub_club' => [ 'type' => 'string', 'pattern' => '^(?:' . BurnWorks::UUID . ':' . BurnWorks::UUID . ')?$' ], + 'url' => $string( 2000 ), 'featured' => $boolean, 'hidden' => $boolean, 'fields' => $object( $custom ), + ] + array_fill_keys( array_merge( array_keys( Events::RELATIONS ), array_keys( self::TAXONOMIES ) ), $list( $number( 1 ) ) ); + } elseif ( in_array( $resource, [ 'venues', 'organizers' ], true ) ) { + $properties += array_fill_keys( Events::LOCATION_FIELDS, $string( 400 ) ); + $properties['website'] = $string( 2000 ); + $properties['lookup_address'] = $boolean; + } + return $object( $properties ); + } +} diff --git a/includes/class-burnworks.php b/includes/class-burnworks.php new file mode 100644 index 0000000..b6b235f --- /dev/null +++ b/includes/class-burnworks.php @@ -0,0 +1,146 @@ +' . self::UUID . ')/events/(?P' . self::UUID . ')'; + register_rest_route( Api::NAMESPACE, $path, [ + [ + 'methods' => 'GET', 'callback' => [ self::class, 'read' ], + 'permission_callback' => [ Api::class, 'permission' ], + ], + [ + 'methods' => 'PUT', 'callback' => [ self::class, 'publish' ], + 'permission_callback' => [ Api::class, 'permission' ], + ], + ] ); + } + + public static function schema(): array { + $string = static fn( int $max ): array => [ 'type' => 'string', 'maxLength' => $max ]; + $uuid = [ 'type' => 'string', 'pattern' => '^' . self::UUID . '$' ]; + $date = [ 'type' => 'string', 'format' => 'date-time' ]; + $boolean = [ 'type' => 'boolean' ]; + return [ + 'type' => 'object', + 'required' => [ 'club_id', 'title', 'description', 'starts_at', 'venue', 'status', 'audience', 'capacity', 'kind' ], + 'additionalProperties' => false, + 'properties' => [ + 'workspace_id' => $uuid, 'id' => $uuid, 'club_id' => $uuid, + 'title' => [ 'type' => 'string', 'minLength' => 2, 'maxLength' => 160 ], + 'description' => $string( 4000 ), 'venue' => $string( 160 ), 'starts_at' => $date, + 'status' => [ 'type' => 'string', 'enum' => [ 'draft', 'published', 'cancelled' ] ], + 'audience' => [ 'type' => 'string', 'enum' => [ 'public', 'members', 'private' ] ], + 'capacity' => [ 'type' => 'integer', 'minimum' => 0, 'maximum' => 100000 ], + 'kind' => [ 'type' => 'string', 'enum' => [ 'event', 'volunteer', 'meeting' ] ], + 'created_by' => $string( 254 ), 'created_at' => $date, + 'ends_at' => $date, 'website_enabled' => $boolean, 'public_events_enabled' => $boolean, + 'publish_to_wordpress' => $boolean, + 'source_version' => [ 'type' => 'integer', 'minimum' => 1, 'maximum' => 9007199254740991 ], + 'custom' => [ 'type' => 'object', 'additionalProperties' => true ], + ], + ]; + } + + public static function snapshot( int $id ): array { + return self::decode_snapshot( get_post_meta( $id, self::META, true ) ); + } + + private static function decode_snapshot( $value ): array { + if ( is_array( $value ) ) { + return $value; + } + $record = is_string( $value ) ? json_decode( $value ) : null; + return $record instanceof \stdClass ? (array) $record : []; + } + + private static function identity( WP_REST_Request $request ): array { + $params = $request->get_url_params(); + return array_map( 'strtolower', [ $params['workspace_id'], $params['event_id'] ] ); + } + + public static function read( WP_REST_Request $request ) { + return Api::external( 'events', 'burnworks', implode( ':', self::identity( $request ) ) ); + } + + public static function publish( WP_REST_Request $request ) { + $raw = json_decode( $request->get_body() ); + if ( ! $raw instanceof \stdClass || ! $request->is_json_content_type() ) { + return Api::error( 'invalid_json', __( 'Send a JSON object with Content-Type: application/json.', 'burn-events' ), 400 ); + } + $input = $request->get_json_params(); + $schema = self::schema(); + $valid = rest_validate_value_from_schema( $input, $schema, 'body' ); + if ( is_wp_error( $valid ) ) { + $valid->add_data( [ 'status' => 400 ] ); + return $valid; + } + [ $workspace, $id ] = self::identity( $request ); + if ( strtolower( $input['workspace_id'] ?? $workspace ) !== $workspace || strtolower( $input['id'] ?? $id ) !== $id ) { + return Api::error( 'identity_mismatch', __( 'The burnWorks IDs must match the route.', 'burn-events' ), 400 ); + } + $record = rest_sanitize_value_from_schema( $input, $schema, 'body' ); + $record += [ 'workspace_id' => $workspace, 'id' => $id ]; + if ( isset( $raw->custom ) ) { + if ( ! $raw->custom instanceof \stdClass ) { + return Api::error( 'invalid_custom', __( 'custom must be a JSON object.', 'burn-events' ), 400 ); + } + $record['custom'] = $raw->custom; + } + + $start = new DateTimeImmutable( $record['starts_at'] ); + $end = isset( $record['ends_at'] ) ? new DateTimeImmutable( $record['ends_at'] ) : $start->modify( '+1 hour' ); + if ( $end->getTimestamp() <= $start->getTimestamp() ) { + return Api::error( 'invalid_time_range', __( 'The burnWorks event end must be after its start.', 'burn-events' ), 422 ); + } + $utc = new DateTimeZone( 'UTC' ); + $start = $start->setTimezone( $utc ); + $end = $end->setTimezone( $utc ); + return Api::write( 'events', [ + 'title' => $record['title'], + 'description' => esc_html( $record['description'] ), + 'location' => $record['venue'], + 'post_status' => self::publishable( $record ) ? 'publish' : 'draft', + 'status' => 'cancelled' === $record['status'] ? 'cancelled' : 'scheduled', + 'schedule' => [ + 'start_date' => $start->format( 'Y-m-d' ), 'start_time' => $start->format( 'H:i:s' ), + 'end_date' => $end->format( 'Y-m-d' ), 'end_time' => $end->format( 'H:i:s' ), + 'timezone' => 'UTC', 'all_day' => false, 'repeat' => 'none', + ], + ], $request, 0, [ 'burnworks', $workspace . ':' . $id ], $record ); + } + + private static function publishable( array $record ): bool { + return 'published' === $record['status'] && 'public' === $record['audience'] + && ! empty( $record['website_enabled'] ) && ! empty( $record['public_events_enabled'] ) + && ( $record['publish_to_wordpress'] ?? true ); + } + + public static function accepts_version( array $incoming, array $stored ): bool { + $previous = $stored['source_version'] ?? 0; + $version = $incoming['source_version'] ?? 0; + return ! $previous || $version > $previous || ( $version === $previous && maybe_serialize( $incoming ) === maybe_serialize( $stored ) ); + } + + public static function protect_publication( array $data, array $post ): array { + if ( Events::EVENT !== $data['post_type'] || ! in_array( $data['post_status'], [ 'publish', 'future' ], true ) ) { + return $data; + } + $id = (int) ( $post['ID'] ?? 0 ); + $record = $id ? self::snapshot( $id ) : self::decode_snapshot( wp_unslash( $post['meta_input'][ self::META ] ?? '' ) ); + if ( $record && ! self::publishable( $record ) ) { + $data['post_status'] = 'draft'; + } + return $data; + } +} diff --git a/includes/class-calendar-grid.php b/includes/class-calendar-grid.php new file mode 100644 index 0000000..87377f3 --- /dev/null +++ b/includes/class-calendar-grid.php @@ -0,0 +1,200 @@ +format( 'Y-m-d' ); + $after = $end->format( 'Y-m-d' ); + $utc = new DateTimeZone( 'UTC' ); + // The index stores UTC. Leave room for events whose local dates cross the UTC boundary. + $filters['from'] = ( new DateTimeImmutable( $first, $utc ) )->modify( '-1 day' )->format( 'Y-m-d H:i:s' ); + $filters['to'] = ( new DateTimeImmutable( $after, $utc ) )->modify( '+1 day' )->format( 'Y-m-d H:i:s' ); + $rows = []; + do { + $batch = Events::query( $filters ); + update_meta_cache( 'post', array_unique( array_column( $batch, 'event_id' ) ) ); + foreach ( $batch as $row ) { + $data = Events::event_data( (int) $row['event_id'] ); + $zone = $data['schedule']['timezone'] ?? wp_timezone_string(); + $from = Events::local_time( $row['starts_at'], $zone )->format( 'Y-m-d' ); + // An occurrence ending at midnight stops before the next day's cell. + $end_utc = new DateTimeImmutable( $row['ends_at'], $utc ); + $last = $end_utc->modify( '-1 second' )->setTimezone( new DateTimeZone( $zone ) )->format( 'Y-m-d' ); + if ( $last >= $first && $from < $after ) { + $rows[] = $row + [ 'first_day' => $from, 'last_day' => $last ]; + if ( count( $rows ) === $filters['limit'] ) { + return $rows; + } + } + } + $filters['offset'] += count( $batch ); + } while ( count( $batch ) === $filters['limit'] ); + return $rows; + } + + public static function render( array $rows, DateTimeImmutable $start, DateTimeImmutable $end, DateTimeImmutable $day, bool $month, string $category ): void { + $dates = []; + for ( $date = $start; $date < $end; $date = $date->modify( '+1 day' ) ) { + $dates[] = $date; + } + $indices = array_flip( array_map( static fn( DateTimeImmutable $date ): string => $date->format( 'Y-m-d' ), $dates ) ); + $first = $start->format( 'Y-m-d' ); + $last = end( $dates )->format( 'Y-m-d' ); + $weeks = array_chunk( $dates, 7 ); + $segments = array_fill( 0, count( $weeks ), [] ); + $posts = $events = $legend = []; + if ( $rows ) { + wp_enqueue_script( self::SCRIPT ); + update_object_term_cache( array_unique( array_column( $rows, 'event_id' ) ), Events::EVENT ); + } + foreach ( $rows as $index => $row ) { + $id = (int) $row['event_id']; + $posts[ $id ] ??= self::event( $id, $category ); + $event = $posts[ $id ]; + $legend[ $event['category_id'] ] = [ 'name' => $event['category'], 'color' => $event['color'] ]; + $events[ $index ] = $event + [ + 'url' => Events::event_url( $row ), + 'period' => Calendar::period( $row, $event['data'] ), + 'preview' => wp_unique_id( 'be-event-preview-' ), + ]; + $from = $indices[ max( $first, $row['first_day'] ) ]; + $through = $indices[ min( $last, $row['last_day'] ) ]; + for ( $week = intdiv( $from, 7 ); $week <= intdiv( $through, 7 ); ++$week ) { + $offset = $week * 7; + $segments[ $week ][] = [ + 'event' => $index, + 'first' => max( 0, $from - $offset ), + 'last' => min( 6, $through - $offset ), + 'before' => $row['first_day'] < $dates[ $offset ]->format( 'Y-m-d' ), + 'after' => $row['last_day'] > $dates[ $offset + 6 ]->format( 'Y-m-d' ), + ]; + } + } + ksort( $legend ); + ?> + +
    + +
  • + +
+ +
+
+ + $days ) { self::week( $days, $segments[ $week ], $events, $month ? $day->format( 'Y-m' ) : '' ); } ?> +
+
+ ' . esc_html__( 'No events in this date range.', 'burn-events' ) . '

'; + } + } + + private static function event( int $id, string $category ): array { + $terms = get_the_terms( $id, Events::CATEGORY ); + $terms = is_array( $terms ) ? $terms : []; + usort( $terms, static fn( $left, $right ): int => $left->term_id <=> $right->term_id ); + $term = $terms[0] ?? null; + foreach ( $terms as $candidate ) { + if ( $candidate->slug === $category ) { + $term = $candidate; + break; + } + } + $term_id = (int) ( $term->term_id ?? 0 ); + $data = Events::event_data( $id ); + $label = $term->name ?? __( 'Uncategorized', 'burn-events' ); + $color = $term_id ? sanitize_hex_color( (string) get_term_meta( $term_id, self::COLOR_META, true ) ) : ''; + return [ + 'title' => get_the_title( $id ), + 'data' => $data, + 'location' => Calendar::event_location( $data ), + 'excerpt' => Calendar::event_excerpt( $id ), + 'image' => get_the_post_thumbnail_url( $id, 'thumbnail' ), + 'category_id' => $term_id, + 'category' => $label, + 'categories' => $terms ? implode( ' · ', array_column( $terms, 'name' ) ) : $label, + 'color' => $color ? '--be-category-custom:' . $color : ( $term_id ? sprintf( '--be-category-hue:%.2F;--be-category-saturation:63%%', fmod( $term_id * 137.508, 360 ) ) : '' ), + ]; + } + + private static function week( array $days, array $segments, array $events, string $month ): void { + usort( $segments, static function ( array $left, array $right ): int { + return $left['first'] <=> $right['first'] ?: $right['last'] <=> $left['last'] ?: $left['event'] <=> $right['event']; + } ); + $ends = []; + foreach ( $segments as $index => $segment ) { + $track = 0; + while ( isset( $ends[ $track ] ) && $ends[ $track ] >= $segment['first'] ) { + ++$track; + } + $ends[ $track ] = $segment['last']; + $segments[ $index ]['track'] = $track + 2; + } + $today = wp_date( 'Y-m-d' ); + ?> +
+ $date ) : ?> + format( 'Y-m-d' ); ?> +
+ +
+ + + + + + + +
+ + + __( 'List', 'burn-events' ), 'month' => __( 'Month', 'burn-events' ), + 'week' => __( 'Week', 'burn-events' ), 'day' => __( 'Day', 'burn-events' ), + 'photo' => __( 'Photo', 'burn-events' ), 'map' => __( 'Map', 'burn-events' ), + 'summary' => __( 'Summary', 'burn-events' ), + ]; + } + + public static function request( string $key ): string { + return isset( $_GET[ $key ] ) && is_string( $_GET[ $key ] ) ? sanitize_text_field( wp_unslash( $_GET[ $key ] ) ) : ''; + } + + public static function archive_url(): string { + return (string) get_post_type_archive_link( Events::EVENT ); + } + + public static function route( string $path ): string { + if ( is_feed() || is_embed() ) { + return $path; + } + if ( get_query_var( 'be_community' ) ) { + $view = (string) get_query_var( 'be_community' ); + if ( ! in_array( $view, [ 'submit', 'mine' ], true ) ) { + return $path; + } + self::$content = 'mine' === $view ? Community::mine() : Community::form(); + } elseif ( is_singular( Events::EVENT ) ) { + self::$content = self::single( get_queried_object() ); + } elseif ( is_singular( array_values( Events::RELATIONS ) ) ) { + self::$content = self::linked( get_queried_object() ); + } elseif ( is_post_type_archive( Events::EVENT ) || is_tax( Events::CATEGORY ) ) { + $term = is_tax( Events::CATEGORY ) ? get_queried_object() : null; + $term_link = $term ? get_term_link( $term ) : self::archive_url(); + self::$content = self::render( [ + 'category' => $term->slug ?? '', + 'title' => $term->name ?? __( 'Events', 'burn-events' ), + 'url' => is_string( $term_link ) ? $term_link : self::archive_url(), + ] ); + } else { + return $path; + } + return dirname( __DIR__ ) . '/templates/front.php'; + } + + public static function content(): string { + return self::$content . self::$schema; + } + + public static function render( $attributes = [] ): string { + $options = Admin::options(); + $attributes = shortcode_atts( [ + 'view' => $options['view'], 'title' => __( 'Events', 'burn-events' ), 'url' => '', + 'category' => '', 'tag' => '', 'location' => '', 'featured' => 'no', + 'limit' => $options['per_page'], 'filters' => 'yes', 'relation' => null, 'scope' => '', + ], (array) $attributes, 'burn_events' ); + $interactive = 'no' !== $attributes['filters']; + $selected = $interactive ? ( self::request( 'be_view' ) ?: (string) get_query_var( 'be_view' ) ) : ''; + $view = $selected ?: $attributes['view']; + $view = in_array( $view, self::VIEWS, true ) ? $view : 'list'; + $day_value = $interactive ? self::request( 'be_date' ) : ''; + $day = self::date( $day_value ); + $search = $interactive ? self::request( 'be_search' ) : ''; + $location = $attributes['location'] ?: ( $interactive ? self::request( 'be_location' ) : '' ); + $category = sanitize_title( $attributes['category'] ?: ( $interactive ? self::request( 'be_category' ) : '' ) ); + $page = $interactive ? max( 1, min( 10000, absint( self::request( 'be_page' ) ) ) ) : 1; + $past_requested = $interactive && '1' === self::request( 'be_past' ); + $past = $past_requested && in_array( $view, [ 'list', 'photo', 'summary' ], true ); + $limit = max( 1, min( 50, absint( $attributes['limit'] ) ) ); + $grid = in_array( $view, [ 'month', 'week' ], true ); + $map = 'map' === $view; + $map_period = $map ? self::map_period( $day, $interactive, $past_requested ) : null; + $range = self::range( $view, $day ); + $from = $map_period['start'] ?? $range[0] ?? ( $day_value ? $day : new DateTimeImmutable( 'now', wp_timezone() ) ); + $to = $map ? $map_period['end']?->modify( '+1 day' ) : ( $range[1] ?? null ); + $max_rows = $grid || $map ? 600 : $limit; + $utc = new DateTimeZone( 'UTC' ); + $filters = [ + 'from' => $past ? null : $from->setTimezone( $utc )->format( 'Y-m-d H:i:s' ), + 'to' => $past ? gmdate( 'Y-m-d H:i:s' ) : ( $to ? $to->setTimezone( $utc )->format( 'Y-m-d H:i:s' ) : null ), + 'past' => $past, 'search' => $search, 'category' => $category, 'tag' => sanitize_title( $attributes['tag'] ), + 'scope' => sanitize_text_field( $attributes['scope'] ), + 'location' => $location, 'relation' => is_array( $attributes['relation'] ) ? $attributes['relation'] : null, 'featured' => 'yes' === $attributes['featured'], + 'offset' => $grid || $map ? 0 : ( $page - 1 ) * $limit, 'limit' => $max_rows + 1, + ]; + if ( $grid ) { + $rows = Calendar_Grid::occurrences( $filters, $range[0], $range[1] ); + } else { + $rows = ! empty( $map_period['error'] ) ? [] : Events::query( $filters ); + } + $more = count( $rows ) > $max_rows; + $rows = array_slice( $rows, 0, $max_rows ); + $base = $attributes['url'] ?: ( is_singular() ? ( get_permalink() ?: self::archive_url() ) : self::archive_url() ); + $state = array_filter( [ + 'be_view' => $view, 'be_date' => $day_value ? $day->format( 'Y-m-d' ) : '', + 'be_search' => $search, 'be_category' => $category, 'be_location' => $location, 'be_past' => $past ? '1' : '', + ] ); + ob_start(); + ?> +
+ +
+

+ +
+ + + +
+ + + + +
+ + + + ' . esc_html__( 'Showing the first 600 occurrences in this date range.', 'burn-events' ) . '

'; + } + } elseif ( ! empty( $map_period['error'] ) ) { + echo ''; + } elseif ( ! $rows ) { + echo '

' . esc_html__( 'No events found for this selection.', 'burn-events' ) . '

'; + } elseif ( $map ) { + Map_View::archive( $rows ); + if ( $more ) { + echo '

' . esc_html__( 'Showing the first 600 occurrences. Choose a shorter date range to see all matching locations.', 'burn-events' ) . '

'; + } + } else { + echo '
'; + foreach ( $rows as $row ) { + self::card( $row, $view ); + } + echo '
'; + } + ?> + 1 || $more ) ) : ?> + + +
+ format( 'Y-m-d' ) === $value ? $day : null; + } + + private static function map_period( DateTimeImmutable $day, bool $interactive, bool $past ): array { + $start_input = $interactive ? self::request( 'be_start' ) : ''; + $end_input = $interactive ? self::request( 'be_end' ) : ''; + $start = $start_input ? self::parse_date( $start_input ) : ( $past ? $day->modify( '-29 days' ) : $day ); + $end = $end_input ? self::parse_date( $end_input ) : $start?->modify( '+29 days' ); + $error = ''; + if ( ! $start || ! $end ) { + $error = __( 'Enter a valid start and end date.', 'burn-events' ); + } elseif ( $end < $start ) { + $error = __( 'The end date must be on or after the start date.', 'burn-events' ); + } + return [ 'start' => $start, 'end' => $end, 'error' => $error ]; + } + + private static function range( string $view, DateTimeImmutable $day ): ?array { + if ( 'day' === $view ) { + return [ $day, $day->modify( '+1 day' ) ]; + } + if ( ! in_array( $view, [ 'month', 'week' ], true ) ) { + return null; + } + + $start_day = (int) get_option( 'start_of_week', 1 ); + $first = 'month' === $view ? $day->modify( 'first day of this month' ) : $day; + $diff = ( (int) $first->format( 'w' ) - $start_day + 7 ) % 7; + $start = $first->modify( "-{$diff} days" ); + if ( 'week' === $view ) { + return [ $start, $start->modify( '+7 days' ) ]; + } + $last = $day->modify( 'last day of this month' ); + $remaining = ( $start_day - (int) $last->format( 'w' ) + 7 ) % 7; + return [ $start, $last->modify( '+' . ( $remaining ?: 7 ) . ' days' ) ]; + } + + private static function search_form( string $url, array $state, string $fixed_category, ?array $map_period = null ): void { + $terms = $fixed_category ? [] : get_terms( [ 'taxonomy' => Events::CATEGORY, 'hide_empty' => true ] ); + $query = []; + parse_str( (string) wp_parse_url( $url, PHP_URL_QUERY ), $query ); + ?> + + modify( 'first day of last month' ); + $next = $day->modify( 'first day of next month' ); + $title = wp_date( 'F Y', $day->getTimestamp() ); + } else { + $step = 'week' === $view ? 7 : 1; + $previous = $range[0]->modify( "-{$step} days" ); + $next = $range[1]; + $title = wp_date( 'M j, Y', $range[0]->getTimestamp() ); + if ( 7 === $step ) { + $title = wp_date( 'M j', $range[0]->getTimestamp() ) . ' – ' . wp_date( 'M j, Y', $range[1]->modify( '-1 day' )->getTimestamp() ); + } + } + ?> + + +
+ + +
+

+

+

+ +

+
+
+ ' . esc_html( Events::statuses()[ $data['status'] ] ?? '' ) . ''; + } elseif ( $data['featured'] ) { + echo '' . esc_html__( 'Featured', 'burn-events' ) . ''; + } + } + + public static function period( array $row, array $data ): string { + $zone = $data['schedule']['timezone'] ?? wp_timezone_string(); + $start = Events::local_time( $row['starts_at'], $zone ); + $end = Events::local_time( $row['ends_at'], $zone ); + $timezone = $start->getTimezone(); + $date = (string) get_option( 'date_format' ); + $time = (string) get_option( 'time_format' ); + $start_label = wp_date( $date, $start->getTimestamp(), $timezone ); + if ( ! empty( $data['schedule']['all_day'] ) ) { + $last = $end->modify( '-1 day' ); + return ( $start->format( 'Y-m-d' ) === $last->format( 'Y-m-d' ) ? $start_label : $start_label . ' – ' . wp_date( $date, $last->getTimestamp(), $timezone ) ) + . ' · ' . __( 'All day', 'burn-events' ); + } + $end_label = $start->format( 'Y-m-d' ) === $end->format( 'Y-m-d' ) ? '' : wp_date( $date, $end->getTimestamp(), $timezone ) . ', '; + return $start_label . ' · ' . wp_date( $time, $start->getTimestamp(), $timezone ) . ' – ' . $end_label . wp_date( $time . ' T', $end->getTimestamp(), $timezone ); + } + + private static function linked( WP_Post $post ): string { + if ( post_password_required( $post ) ) { + return '
' . get_the_password_form( $post ) . '
'; + } + $type = array_search( $post->post_type, Events::RELATIONS, true ); + $data = Events::location_data( $post->ID ); + ob_start(); + ?> +
+ +

+ + post_type && 'map' !== $view ) { + echo Map_View::venues( [ $post ] ); + } + ?> + post_content ); ?> +
+ [ $type, $post->ID ], 'title' => __( 'Upcoming events', 'burn-events' ) ] ); + return ob_get_clean(); + } + + private static function contact( array $data ): void { + $address = array_filter( array_intersect_key( $data, array_flip( [ 'address', 'city', 'region', 'postal', 'country' ] ) ) ); + if ( $address ) { + echo '

' . esc_html( implode( ', ', $address ) ) . '

'; + } + if ( $data['phone'] ) { + echo '

' . esc_html( $data['phone'] ) . '

'; + } + if ( $data['email'] ) { + echo '

' . esc_html( $data['email'] ) . '

'; + } + if ( $data['website'] ) { + echo '

' . esc_html__( 'Website', 'burn-events' ) . '

'; + } + } + + private static function single( WP_Post $event ): string { + if ( post_password_required( $event ) ) { + return '

' . esc_html( get_the_title( $event ) ) . '

' . get_the_password_form( $event ) . '
'; + } + $row = Events::occurrence( $event->ID, self::request( 'be_occ' ) ); + $data = Events::event_data( $event->ID ); + self::schema( $event, $row, $data ); + $layout = Single_Event_Templates::render( $event, $row ); + if ( $layout ) { + if ( ! str_contains( $layout, 'data-be-event-map="' . $event->ID . '"' ) ) { + $map = Map_View::venues( Events::locations( $data['venue'], Events::VENUE ), $event->ID ); + if ( $map ) { + $layout .= '

' . esc_html__( 'Event location', 'burn-events' ) . '

' . $map . '
'; + } + } + return '
' . $layout . '
'; + } + ob_start(); + ?> +
+
+ + + + +
+ +
+
+ + + +
+ +
+ +
+ __( 'Event title', 'burn-events' ), 'schedule' => __( 'Date and time', 'burn-events' ), + 'description' => __( 'Description', 'burn-events' ), 'image' => __( 'Featured image', 'burn-events' ), + 'status' => __( 'Status', 'burn-events' ), 'cost' => __( 'Cost', 'burn-events' ), + 'venue' => __( 'Venue', 'burn-events' ), 'organizer' => __( 'Organizers', 'burn-events' ), 'series' => __( 'Series', 'burn-events' ), + 'website' => __( 'Website', 'burn-events' ), 'fields' => __( 'Custom fields', 'burn-events' ), + 'terms' => __( 'Categories and tags', 'burn-events' ), 'related' => __( 'Related events', 'burn-events' ), + 'export' => __( 'Add to calendar', 'burn-events' ), 'back' => __( 'All events link', 'burn-events' ), + ]; + } + + public static function field( string $field, WP_Post $event, ?array $row ): string { + $data = Events::event_data( $event->ID ); + ob_start(); + switch ( $field ) { + case 'title': + echo '

' . esc_html( get_the_title( $event ) ) . '

'; + break; + case 'back': + echo '← ' . esc_html__( 'All events', 'burn-events' ) . ''; + break; + case 'schedule': + if ( $row ) { + echo '

' . esc_html( self::period( $row, $data ) ) . '

'; + } + break; + case 'status': + self::status( $data ); + break; + case 'image': + if ( has_post_thumbnail( $event ) ) { + echo '
' . get_the_post_thumbnail( $event, 'large' ) . '
'; + } + break; + case 'description': + self::description( $event ); + break; + case 'cost': + if ( '' !== $data['cost'] ) { + echo '

' . esc_html( '0' === $data['cost'] ? __( 'Free', 'burn-events' ) : $data['cost'] ) . '

'; + } + break; + case 'venue': + case 'organizer': + case 'series': + self::relation( $field, $data, $event->ID ); + break; + case 'website': + if ( $data['url'] ) { + echo '

' . esc_html__( 'Event website', 'burn-events' ) . '

'; + } + break; + case 'fields': + self::custom_fields( $data ); + break; + case 'terms': + foreach ( [ Events::CATEGORY, 'post_tag' ] as $taxonomy ) { + $terms = get_the_term_list( $event->ID, $taxonomy, '' ); + if ( is_string( $terms ) ) { + echo wp_kses_post( $terms ); + } + } + break; + case 'export': + if ( $row ) { + echo ''; + } + break; + case 'related': + self::related( $event ); + break; + } + return ob_get_clean(); + } + + private static function description( WP_Post $event ): void { + static $rendering = false; + if ( $rendering || '' === $event->post_content ) { + return; + } + global $post; + $previous = $post; + $post = $event; + $rendering = true; + try { + echo '
' . apply_filters( 'the_content', $event->post_content ) . '
'; + } finally { + $post = $previous; + $rendering = false; + } + } + + private static function relation( string $type, array $data, int $event_id ): void { + $posts = Events::locations( $data[ $type ], Events::RELATIONS[ $type ] ); + if ( ! $posts && ( 'venue' !== $type || ! $data['location'] ) ) { + return; + } + echo ''; + } + + private static function custom_fields( array $data ): void { + $display = ''; + foreach ( Admin::options()['fields'] as $key => $field ) { + $value = $data['fields'][ $key ] ?? ''; + if ( '' === $value ) { + continue; + } + $display .= '
' . esc_html( $field['label'] ) . '
'; + $display .= 'url' === $field['type'] + ? '' . esc_html( $value ) . '' + : esc_html( 'checkbox' === $field['type'] ? __( 'Yes', 'burn-events' ) : $value ); + $display .= '
'; + } + if ( $display ) { + echo '
' . $display . '
'; + } + } + + private static function related( WP_Post $event ): void { + $terms = wp_get_post_terms( $event->ID, Events::CATEGORY, [ 'fields' => 'slugs' ] ); + if ( is_wp_error( $terms ) || ! $terms ) { + return; + } + $rows = Events::query( [ 'category' => $terms[0], 'from' => gmdate( 'Y-m-d H:i:s' ), 'limit' => 25 ] ); + $related = [ $event->ID => true ]; + ob_start(); + foreach ( $rows as $row ) { + if ( ! isset( $related[ $row['event_id'] ] ) ) { + self::card( $row, 'summary' ); + $related[ $row['event_id'] ] = true; + } + if ( count( $related ) >= 4 ) { + break; + } + } + $html = ob_get_clean(); + if ( $html ) { + echo ''; + } + } + + private static function schema( WP_Post $post, ?array $row, array $data ): void { + if ( ! $row || 'publish' !== $post->post_status || $post->post_password ) { + return; + } + $zone = $data['schedule']['timezone']; + $format = $data['schedule']['all_day'] ? 'Y-m-d' : DATE_ATOM; + $details = [ + '@context' => 'https://schema.org', '@type' => 'Event', 'name' => get_the_title( $post ), + 'url' => Events::event_url( $row ), 'startDate' => Events::local_time( $row['starts_at'], $zone )->format( $format ), + 'endDate' => Events::local_time( $row['ends_at'], $zone )->format( $format ), + 'eventStatus' => 'https://schema.org/' . ( [ 'cancelled' => 'EventCancelled', 'postponed' => 'EventPostponed', 'moved_online' => 'EventMovedOnline' ][ $data['status'] ] ?? 'EventScheduled' ), + ]; + $image = get_the_post_thumbnail_url( $post, 'large' ); + if ( $image ) { + $details['image'] = $image; + } + $venue = Events::locations( $data['venue'], Events::VENUE )[0] ?? null; + if ( $venue ) { + $details['location'] = [ '@type' => 'Place', 'name' => get_the_title( $venue ), 'url' => get_permalink( $venue ) ]; + } + self::$schema = ''; + } + + public static function register_api(): void { + register_rest_route( 'burn-events/v1', '/events', [ + 'methods' => 'GET', 'permission_callback' => '__return_true', + 'callback' => static function ( \WP_REST_Request $request ): \WP_REST_Response { + $limit = max( 1, min( 50, absint( $request->get_param( 'limit' ) ?: 20 ) ) ); + $rows = Events::query( [ + 'from' => gmdate( 'Y-m-d H:i:s' ), + 'search' => sanitize_text_field( $request->get_param( 'search' ) ?? '' ), + 'category' => sanitize_title( (string) $request->get_param( 'category' ) ), + 'limit' => $limit, + 'offset' => ( max( 1, min( 10000, absint( $request->get_param( 'page' ) ) ) ) - 1 ) * $limit, + ] ); + return rest_ensure_response( array_map( static function ( array $row ): array { + return [ + 'id' => (int) $row['event_id'], 'title' => get_the_title( (int) $row['event_id'] ), + 'start_utc' => gmdate( DATE_ATOM, strtotime( $row['starts_at'] . ' UTC' ) ), + 'end_utc' => gmdate( DATE_ATOM, strtotime( $row['ends_at'] . ' UTC' ) ), + 'url' => Events::event_url( $row ), + ]; + }, $rows ) ); + }, + ] ); + } +} diff --git a/includes/class-clubs.php b/includes/class-clubs.php new file mode 100644 index 0000000..74c862d --- /dev/null +++ b/includes/class-clubs.php @@ -0,0 +1,197 @@ + false, 'show_ui' => false, 'show_in_rest' => false, 'rewrite' => false, 'query_var' => false, + ] ); + register_post_meta( Events::EVENT, self::EVENT_META, [ 'type' => 'string', 'single' => true, 'default' => '', 'show_in_rest' => false ] ); + } + + public static function register_api(): void { + $base = '/burnworks/workspaces/(?P' . BurnWorks::UUID . ')/clubs'; + register_rest_route( Api::NAMESPACE, $base, [ + 'methods' => 'GET', 'callback' => [ self::class, 'listing' ], 'permission_callback' => [ Api::class, 'permission' ], + ] ); + register_rest_route( Api::NAMESPACE, $base . '/(?P' . BurnWorks::UUID . ')', [ + 'methods' => 'PUT', 'callback' => [ self::class, 'put' ], 'permission_callback' => [ Api::class, 'permission' ], + ] ); + } + + public static function schema(): array { + return [ + 'type' => 'object', 'required' => [ 'name', 'kind' ], 'additionalProperties' => false, + 'properties' => [ + 'name' => [ 'type' => 'string', 'minLength' => 1, 'maxLength' => 120 ], + 'kind' => [ 'type' => 'string', 'enum' => [ 'organization', 'subclub' ] ], + 'status' => [ 'type' => 'string', 'enum' => [ 'active', 'archived' ] ], + 'workspace_name' => [ 'type' => 'string', 'maxLength' => 120 ], + ], + ]; + } + + public static function put( WP_REST_Request $request ) { + $input = $request->get_json_params(); + $schema = self::schema(); + $valid = rest_validate_value_from_schema( $input, $schema, 'body' ); + if ( is_wp_error( $valid ) ) { + $valid->add_data( [ 'status' => 400 ] ); + return $valid; + } + $params = $request->get_url_params(); + $scope = strtolower( $params['workspace_id'] . ':' . $params['club_id'] ); + $name = sanitize_text_field( $input['name'] ); + if ( '' === $name ) { + return Api::error( 'club_name', __( 'Enter a club name.', 'burn-events' ), 400 ); + } + try { + $term = self::ensure( $scope ); + $previous = self::record( $term ); + $details = [ + 'name' => $name, 'kind' => $input['kind'], 'status' => $input['status'] ?? $previous['status'], + 'workspace_name' => sanitize_text_field( $input['workspace_name'] ?? $previous['workspace_name'] ), + ]; + $saved = update_term_meta( $term->term_id, self::DETAILS, wp_slash( $details ) ); + if ( is_wp_error( $saved ) || $details !== get_term_meta( $term->term_id, self::DETAILS, true ) ) { + throw new RuntimeException( 'Club details write failed.' ); + } + return Api::response( self::record( $term ) ); + } catch ( \Throwable $error ) { + return Api::error( 'club_write', __( 'The club could not be saved.', 'burn-events' ), 500 ); + } + } + + public static function listing( WP_REST_Request $request ): \WP_REST_Response { + $workspace = strtolower( $request->get_url_params()['workspace_id'] ); + $items = array_values( array_filter( self::directory(), static fn( array $record ): bool => $workspace === $record['workspace_id'] ) ); + return Api::response( [ 'items' => $items ] ); + } + + public static function event( int $id ): ?array { + $term = self::find( (string) get_post_meta( $id, self::EVENT_META, true ) ); + return $term ? self::record( $term ) : null; + } + + public static function assign( int $id, string $scope, bool $discover = false ): void { + $scope = strtolower( $scope ); + if ( '' !== $scope ) { + if ( ! preg_match( '/^' . BurnWorks::UUID . ':' . BurnWorks::UUID . '$/D', $scope ) ) { + throw new \InvalidArgumentException( __( 'Use a burnWorks workspace and club ID for the sub-club.', 'burn-events' ) ); + } + if ( $discover ) { + self::ensure( $scope ); + } elseif ( ! self::find( $scope ) ) { + throw new \InvalidArgumentException( __( 'Sync this club from burnWorks before assigning it.', 'burn-events' ) ); + } + } + Events::write_meta( $id, self::EVENT_META, $scope ); + } + + private static function slug( string $scope ): string { + return str_replace( ':', '_', $scope ); + } + + private static function find( string $scope ): ?WP_Term { + $term = $scope ? get_term_by( 'slug', self::slug( $scope ), self::TAXONOMY ) : null; + return $term instanceof WP_Term ? $term : null; + } + + private static function ensure( string $scope ): WP_Term { + $term = self::find( $scope ); + if ( $term ) { + return $term; + } + wp_insert_term( $scope, self::TAXONOMY, [ 'slug' => self::slug( $scope ) ] ); + return self::find( $scope ) ?? throw new RuntimeException( 'Club directory write failed.' ); + } + + private static function record( WP_Term $term ): array { + [ $workspace, $club ] = explode( '_', $term->slug, 2 ); + $details = (array) get_term_meta( $term->term_id, self::DETAILS, true ); + return [ 'workspace_id' => $workspace, 'club_id' => $club, 'scope' => $workspace . ':' . $club ] + $details + [ + 'name' => sprintf( __( 'Club %s', 'burn-events' ), substr( $club, 0, 8 ) ), + 'kind' => 'unknown', 'status' => 'active', 'workspace_name' => '', + ]; + } + + private static function directory(): array { + $terms = get_terms( [ 'taxonomy' => self::TAXONOMY, 'hide_empty' => false ] ); + return is_array( $terms ) ? array_map( [ self::class, 'record' ], $terms ) : []; + } + + public static function options(): array { + $directory = self::directory(); + $names = $workspaces = $clubs = []; + foreach ( $directory as $club ) { + if ( $club['workspace_name'] ) { + $names[ $club['workspace_id'] ] = $club['workspace_name']; + } + } + foreach ( $directory as $club ) { + $workspace = $names[ $club['workspace_id'] ] ?? sprintf( __( 'Workspace %s', 'burn-events' ), substr( $club['workspace_id'], 0, 8 ) ); + $workspaces[ $club['workspace_id'] ] = sprintf( __( '%s (all clubs)', 'burn-events' ), $workspace ); + $label = $workspace . ' / ' . $club['name']; + $clubs[ $club['scope'] ] = 'archived' === $club['status'] ? sprintf( __( '%s (archived)', 'burn-events' ), $label ) : $label; + } + natcasesort( $workspaces ); + natcasesort( $clubs ); + return [ '' => __( 'All events', 'burn-events' ) ] + $workspaces + $clubs; + } + + public static function condition( string $scope ): string { + global $wpdb; + $scope = strtolower( $scope ); + if ( ! preg_match( '/^' . BurnWorks::UUID . '(?::' . BurnWorks::UUID . ')?$/D', $scope ) ) { + return '1=0'; + } + $exact = str_contains( $scope, ':' ); + $operator = $exact ? '=' : 'LIKE'; + $value = $exact ? $scope : $wpdb->esc_like( $scope . ':' ) . '%'; + return $wpdb->prepare( "EXISTS (SELECT 1 FROM $wpdb->postmeta c WHERE c.post_id = p.ID AND c.meta_key = %s AND c.meta_value $operator %s)", self::EVENT_META, $value ); + } + + public static function backfill(): void { + global $wpdb; + $cursor = get_option( self::BACKFILL, 0 ); + if ( 'done' === $cursor ) { + return; + } + $ids = $wpdb->get_col( $wpdb->prepare( "SELECT DISTINCT p.ID FROM $wpdb->posts p JOIN $wpdb->postmeta m ON m.post_id = p.ID AND m.meta_key = %s WHERE p.post_type = %s AND p.ID > %d ORDER BY p.ID LIMIT 50", BurnWorks::META, Events::EVENT, (int) $cursor ) ); + if ( $wpdb->last_error ) { + return; + } + foreach ( $ids as $id ) { + try { + Events::transaction( static function () use ( $id ): void { + if ( ! Events::lock_post( (int) $id ) || get_post_meta( $id, self::EVENT_META, true ) ) { + return; + } + $record = BurnWorks::snapshot( (int) $id ); + if ( isset( $record['workspace_id'], $record['club_id'] ) ) { + self::assign( (int) $id, $record['workspace_id'] . ':' . $record['club_id'], true ); + } + } ); + } catch ( \InvalidArgumentException $error ) { + // Ignore snapshots without a valid club identity. + } catch ( \Throwable $error ) { + return; + } finally { + wp_cache_delete( $id, 'post_meta' ); + } + } + update_option( self::BACKFILL, count( $ids ) < 50 ? 'done' : (string) end( $ids ), false ); + } +} diff --git a/includes/class-community.php b/includes/class-community.php new file mode 100644 index 0000000..dda66b8 --- /dev/null +++ b/includes/class-community.php @@ -0,0 +1,213 @@ + get_query_var( 'be_community' ) ? false : $url ); + add_filter( 'document_title_parts', static function ( array $parts ): array { + $view = get_query_var( 'be_community' ); + if ( in_array( $view, [ 'submit', 'mine' ], true ) ) { + $parts['title'] = 'mine' === $view ? __( 'My events', 'burn-events' ) : __( 'Submit an event', 'burn-events' ); + } + return $parts; + } ); + add_action( 'template_redirect', static function (): void { + if ( get_query_var( 'be_community' ) ) { + nocache_headers(); + } + } ); + add_action( 'admin_post_burn_event_submit', [ self::class, 'submit' ] ); + add_action( 'admin_post_nopriv_burn_event_submit', [ self::class, 'submit' ] ); + add_action( 'admin_post_burn_event_withdraw', [ self::class, 'withdraw' ] ); + } + + public static function url( string $view ): string { + return get_option( 'permalink_structure' ) + ? home_url( user_trailingslashit( 'events/' . $view ) ) + : add_query_arg( 'be_community', $view, home_url( '/' ) ); + } + + private static function owned( int $id ): ?WP_Post { + $post = $id && is_user_logged_in() ? get_post( $id ) : null; + return $post && Events::EVENT === $post->post_type && 'trash' !== $post->post_status + && (int) $post->post_author === get_current_user_id() && get_post_meta( $post->ID, '_burn_community', true ) ? $post : null; + } + + public static function form(): string { + $options = Admin::options(); + $id = absint( Calendar::request( 'be_edit' ) ); + $post = $id && $options['community_edit'] ? self::owned( $id ) : null; + ob_start(); + ?> +
+
+

+ +
+ +

+ + +

+ +

+ +
+ + + +

+ + + array_filter( [ $options['venue'] ] ), 'organizer' => array_filter( [ $options['organizer'] ] ) ]; + Admin::event_fields( $post ? Events::event_data( $id ) : $defaults, true ); + $terms = get_terms( [ 'taxonomy' => Events::CATEGORY, 'hide_empty' => false ] ); + $selected = $post ? wp_get_post_terms( $id, Events::CATEGORY, [ 'fields' => 'ids' ] ) : []; + ?> + + + + + + +
+ +
+ 720 || strlen( $body ) > 48000 || ! is_array( $_POST['be'] ?? null ) ) { + self::fail( __( 'Enter a title, description, and event schedule.', 'burn-events' ) ); + } + $event = null; + try { + $input = wp_unslash( $_POST['be'] ); + unset( $input['status'], $input['series'], $input['featured'], $input['hidden'] ); + $data = Events::validate_event( $input ); + if ( $post ) { + $old = Events::event_data( $id ); + foreach ( [ 'status', 'series', 'featured', 'hidden' ] as $field ) { + $data[ $field ] = $old[ $field ]; + } + } + $attributes = [ + 'post_type' => Events::EVENT, 'post_title' => $title, 'post_content' => $body, + 'post_status' => 'pending', 'comment_status' => 'closed', + ]; + $event = $id ? wp_update_post( wp_slash( $attributes + [ 'ID' => $id ] ), true ) : wp_insert_post( wp_slash( $attributes + [ 'post_author' => get_current_user_id() ] ), true ); + if ( is_wp_error( $event ) ) { + self::fail( $event->get_error_message() ); + } + Events::save( $event, $data ); + update_post_meta( $event, '_burn_community', '1' ); + $categories = array_values( array_filter( array_map( 'absint', (array) ( $_POST['event_categories'] ?? [] ) ) ) ); + wp_set_object_terms( $event, $categories, Events::CATEGORY ); + if ( is_user_logged_in() && UPLOAD_ERR_OK === ( $_FILES['event_image']['error'] ?? UPLOAD_ERR_NO_FILE ) ) { + self::image( $event ); + } + } catch ( \Throwable $error ) { + if ( ! $id && is_int( $event ) ) { + wp_trash_post( $event ); + } + self::fail( $error->getMessage() ); + } + set_transient( $rate_key, '1', 10 ); + wp_safe_redirect( add_query_arg( 'be_sent', '1', self::url( 'submit' ) ), 303 ); + exit; + } + + private static function image( int $event ): void { + require_once ABSPATH . 'wp-admin/includes/file.php'; + require_once ABSPATH . 'wp-admin/includes/media.php'; + require_once ABSPATH . 'wp-admin/includes/image.php'; + $file = media_handle_upload( 'event_image', $event, [], [ + 'test_form' => false, + 'mimes' => [ 'jpg|jpeg' => 'image/jpeg', 'png' => 'image/png', 'webp' => 'image/webp' ], + ] ); + if ( ! is_wp_error( $file ) ) { + set_post_thumbnail( $event, $file ); + } + } + + public static function mine(): string { + $page = max( 1, min( 1000, absint( Calendar::request( 'be_page' ) ) ) ); + $list = is_user_logged_in() ? new \WP_Query( [ + 'post_type' => Events::EVENT, 'post_status' => [ 'publish', 'pending', 'draft', 'future' ], + 'author' => get_current_user_id(), 'posts_per_page' => 20, 'paged' => $page, + 'meta_key' => '_burn_community', 'meta_value' => '1', + ] ) : null; + ob_start(); + ?> +
+

+ +

+ posts ) : ?> +

+ +
    + posts as $post ) : ?> +
  • + + post_status )->label ); ?> + post_status ) : ?> + + +
    + + + ID ); ?> + +
    + +
  • + +
+ add_query_arg( 'be_page', '%#%', self::url( 'mine' ) ), 'format' => '', 'total' => $list->max_num_pages, 'current' => $page ] ) ); ?> + +
+ $status, 'back_link' => true ] ); + } +} diff --git a/includes/class-elementor-widgets.php b/includes/class-elementor-widgets.php new file mode 100644 index 0000000..11dd26a --- /dev/null +++ b/includes/class-elementor-widgets.php @@ -0,0 +1,288 @@ +start_controls_section( 'display', [ 'label' => __( 'Display', 'burn-events' ) ] ); + } + + protected function event_id_control(): void { + $this->add_control( 'event_id', [ + 'label' => __( 'Event ID', 'burn-events' ), + 'description' => __( 'Leave blank to use the current event or the template preview event.', 'burn-events' ), + 'type' => Controls_Manager::NUMBER, + 'min' => 1, + ] ); + } +} + +class Event_Field_Widget extends Burn_Widget { + protected const FIELD = ''; + + public function get_name(): string { + return static::FIELD ? 'burn-events-event-' . static::FIELD : 'burn-events-field'; + } + + public function get_title(): string { + return match ( static::FIELD ) { + 'title' => __( 'Event Title', 'burn-events' ), + 'schedule' => __( 'Event Date and Time', 'burn-events' ), + 'description' => __( 'Event Description', 'burn-events' ), + 'image' => __( 'Event Image', 'burn-events' ), + 'venue' => __( 'Event Venue', 'burn-events' ), + 'organizer' => __( 'Event Organizer', 'burn-events' ), + 'cost' => __( 'Event Cost', 'burn-events' ), + 'export' => __( 'Event Calendar Links', 'burn-events' ), + 'related' => __( 'Related Events', 'burn-events' ), + default => __( 'Event Field', 'burn-events' ), + }; + } + + public function get_icon(): string { + return 'eicon-post-content'; + } + + protected function register_controls(): void { + $this->start_display_controls(); + if ( ! static::FIELD ) { + $this->add_control( 'field', [ + 'label' => __( 'Event field', 'burn-events' ), 'type' => Controls_Manager::SELECT, + 'options' => Calendar::fields(), 'default' => 'title', + ] ); + } + $this->event_id_control(); + $this->end_controls_section(); + + $this->start_controls_section( 'appearance', [ 'label' => __( 'Text', 'burn-events' ), 'tab' => Controls_Manager::TAB_STYLE ] ); + $this->add_group_control( Group_Control_Typography::get_type(), [ + 'name' => 'field_typography', + 'selector' => '{{WRAPPER}} .be-elementor-field, {{WRAPPER}} .be-elementor-field :is(h1, h2, p, a, dt, dd)', + ] ); + $this->add_control( 'text_color', [ + 'label' => __( 'Text color', 'burn-events' ), 'type' => Controls_Manager::COLOR, + 'selectors' => [ '{{WRAPPER}} .be-elementor-field, {{WRAPPER}} .be-elementor-field :is(h1, h2, p, a, dt, dd)' => 'color: {{VALUE}};' ], + ] ); + $this->end_controls_section(); + } + + protected function render(): void { + [ $event, $row ] = Single_Event_Templates::widget_context( (int) $this->get_settings_for_display( 'event_id' ) ); + $field = static::FIELD ?: (string) $this->get_settings_for_display( 'field' ); + if ( $event ) { + echo '
' . Calendar::field( $field, $event, $row ) . '
'; + } elseif ( Elementor::instance()->editor->is_edit_mode() || Elementor::instance()->preview->is_preview_mode() ) { + $label = Calendar::fields()[ $field ] ?? __( 'Event field', 'burn-events' ); + echo '

' . esc_html( $label ) . '

'; + } + } +} + +final class Event_Title_Widget extends Event_Field_Widget { + protected const FIELD = 'title'; +} + +final class Event_Date_Widget extends Event_Field_Widget { + protected const FIELD = 'schedule'; +} + +final class Event_Description_Widget extends Event_Field_Widget { + protected const FIELD = 'description'; +} + +final class Event_Image_Widget extends Event_Field_Widget { + protected const FIELD = 'image'; +} + +final class Event_Venue_Widget extends Event_Field_Widget { + protected const FIELD = 'venue'; + + public function get_script_depends(): array { + return Admin::options()['maps'] ? [ Map_View::SCRIPT ] : []; + } + + public function get_style_depends(): array { + return Admin::options()['maps'] ? [ Map_View::STYLE ] : []; + } +} + +final class Event_Organizer_Widget extends Event_Field_Widget { + protected const FIELD = 'organizer'; +} + +final class Event_Cost_Widget extends Event_Field_Widget { + protected const FIELD = 'cost'; +} + +final class Event_Calendar_Links_Widget extends Event_Field_Widget { + protected const FIELD = 'export'; +} + +final class Event_Related_Widget extends Event_Field_Widget { + protected const FIELD = 'related'; +} + +final class Event_Details_Widget extends Burn_Widget { + public function get_name(): string { + return 'burn-events-event-details'; + } + + public function get_title(): string { + return __( 'Event Details', 'burn-events' ); + } + + public function get_icon(): string { + return 'eicon-post-content'; + } + + protected function register_controls(): void { + $this->start_display_controls(); + $this->event_id_control(); + $this->add_control( 'fields', [ + 'label' => __( 'Show fields', 'burn-events' ), 'type' => Controls_Manager::SELECT2, + 'options' => Calendar::fields(), 'multiple' => true, + 'default' => [ 'title', 'schedule', 'description', 'venue', 'export' ], + ] ); + $this->end_controls_section(); + } + + protected function render(): void { + [ $event, $row ] = Single_Event_Templates::widget_context( (int) $this->get_settings_for_display( 'event_id' ) ); + if ( $event ) { + echo '
'; + foreach ( (array) $this->get_settings_for_display( 'fields' ) as $field ) { + echo Calendar::field( (string) $field, $event, $row ); + } + echo '
'; + } + } +} + +class Calendar_Widget extends Burn_Widget { + protected const LIST_ONLY = false; + + public function get_script_depends(): array { + return static::LIST_ONLY ? [] : [ Calendar_Grid::SCRIPT ]; + } + + public function get_name(): string { + return static::LIST_ONLY ? 'burn-events-list' : 'burn-events-calendar'; + } + + public function get_title(): string { + return static::LIST_ONLY ? __( 'Event List', 'burn-events' ) : __( 'Event Calendar', 'burn-events' ); + } + + public function get_icon(): string { + return 'eicon-calendar'; + } + + protected function register_controls(): void { + $this->start_display_controls(); + if ( ! static::LIST_ONLY ) { + $this->add_control( 'view', [ 'label' => __( 'View', 'burn-events' ), 'type' => Controls_Manager::SELECT, 'options' => Calendar::view_labels(), 'default' => 'list' ] ); + $this->add_control( 'filters', [ 'label' => __( 'Show search and navigation', 'burn-events' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'yes' ] ); + } + $this->add_control( 'heading', [ 'label' => __( 'Heading', 'burn-events' ), 'type' => Controls_Manager::TEXT, 'default' => __( 'Events', 'burn-events' ) ] ); + $this->add_control( 'category', [ 'label' => __( 'Category slug', 'burn-events' ), 'type' => Controls_Manager::TEXT ] ); + $this->add_control( 'tag', [ 'label' => __( 'Tag slug', 'burn-events' ), 'type' => Controls_Manager::TEXT ] ); + $this->add_control( 'club_scope', [ + 'label' => __( 'Club or sub-club', 'burn-events' ), 'type' => Controls_Manager::SELECT2, 'options' => Clubs::options(), 'default' => '', + ] ); + $this->add_control( 'location', [ 'label' => __( 'Location', 'burn-events' ), 'type' => Controls_Manager::TEXT ] ); + $this->add_control( 'limit', [ 'label' => __( 'Events per page', 'burn-events' ), 'type' => Controls_Manager::NUMBER, 'min' => 1, 'max' => 50, 'default' => 12 ] ); + $this->add_control( 'featured', [ 'label' => __( 'Featured events only', 'burn-events' ), 'type' => Controls_Manager::SWITCHER ] ); + $this->end_controls_section(); + } + + protected function render(): void { + $settings = $this->get_settings_for_display(); + echo Calendar::render( [ + 'view' => $settings['view'] ?? 'list', 'title' => $settings['heading'], 'category' => $settings['category'] ?? '', + 'tag' => $settings['tag'] ?? '', 'location' => $settings['location'] ?? '', 'limit' => $settings['limit'], + 'scope' => $settings['club_scope'] ?? '', + 'filters' => 'yes' === ( $settings['filters'] ?? '' ) ? 'yes' : 'no', 'featured' => $settings['featured'] ?? '', + ] ); + } +} + +final class Event_List_Widget extends Calendar_Widget { + protected const LIST_ONLY = true; +} + +final class Countdown_Widget extends Burn_Widget { + public function get_name(): string { + return 'burn-events-countdown'; + } + + public function get_title(): string { + return __( 'Event Countdown', 'burn-events' ); + } + + public function get_icon(): string { + return 'eicon-countdown'; + } + + protected function register_controls(): void { + $this->start_display_controls(); + $this->event_id_control(); + $this->end_controls_section(); + } + + protected function render(): void { + [ $event, $row ] = Single_Event_Templates::widget_context( (int) $this->get_settings_for_display( 'event_id' ) ); + if ( ! $event || ! $row ) { + return; + } + wp_enqueue_script( 'burn-events' ); + $start = strtotime( $row['starts_at'] . ' UTC' ); + printf( + '', + esc_attr( gmdate( DATE_ATOM, $start ) ), $start, + esc_attr__( 'Event has started', 'burn-events' ), esc_html( Calendar::period( $row, Events::event_data( $event->ID ) ) ) + ); + } +} + +final class Community_Widget extends Burn_Widget { + public function get_name(): string { + return 'burn-events-community'; + } + + public function get_title(): string { + return __( 'Community Events', 'burn-events' ); + } + + public function get_icon(): string { + return 'eicon-form-horizontal'; + } + + protected function register_controls(): void { + $this->start_display_controls(); + $this->add_control( 'view', [ + 'label' => __( 'Community view', 'burn-events' ), 'type' => Controls_Manager::SELECT, + 'options' => [ 'submit' => __( 'Submit an event', 'burn-events' ), 'mine' => __( 'My events', 'burn-events' ) ], + 'default' => 'submit', + ] ); + $this->end_controls_section(); + } + + protected function render(): void { + echo 'mine' === $this->get_settings_for_display( 'view' ) ? Community::mine() : Community::form(); + } +} diff --git a/includes/class-events.php b/includes/class-events.php new file mode 100644 index 0000000..ac6e63d --- /dev/null +++ b/includes/class-events.php @@ -0,0 +1,423 @@ + self::VENUE, 'organizer' => self::ORGANIZER, 'series' => self::SERIES ]; + public const LOCATION_FIELDS = [ 'address', 'city', 'region', 'postal', 'country', 'website', 'email', 'phone' ]; + private const IMPORTED_DATES = '_burn_imported_dates'; + + private static bool $in_transaction = false; + + public static function register_types(): void { + register_post_type( self::EVENT, [ + 'labels' => [ + 'name' => __( 'Events', 'burn-events' ), + 'menu_name' => __( 'Events', 'burn-events' ), + 'singular_name' => __( 'Event', 'burn-events' ), + 'add_new' => __( 'Add Event', 'burn-events' ), + 'add_new_item' => __( 'Add Event', 'burn-events' ), + 'edit_item' => __( 'Edit Event', 'burn-events' ), + 'view_item' => __( 'View Event', 'burn-events' ), + ], + 'public' => true, + 'show_in_rest' => true, + 'has_archive' => 'events', + 'rewrite' => [ 'slug' => 'event', 'with_front' => false ], + 'menu_icon' => 'dashicons-calendar-alt', + 'supports' => [ 'title', 'editor', 'thumbnail', 'excerpt', 'author', 'revisions', 'comments' ], + ] ); + + $types = [ + self::VENUE => [ __( 'Venues', 'burn-events' ), __( 'Venue', 'burn-events' ), __( 'New Venue', 'burn-events' ), 'event-venue' ], + self::ORGANIZER => [ __( 'Organizers', 'burn-events' ), __( 'Organizer', 'burn-events' ), __( 'New Organizer', 'burn-events' ), 'event-organizer' ], + self::SERIES => [ __( 'Series', 'burn-events' ), __( 'Series', 'burn-events' ), __( 'New Series', 'burn-events' ), 'event-series' ], + ]; + foreach ( $types as $type => [ $plural, $singular, $create, $slug ] ) { + register_post_type( $type, [ + 'labels' => [ 'name' => $plural, 'singular_name' => $singular, 'add_new' => $create, 'add_new_item' => $create, 'new_item' => $create ], + 'public' => true, + 'show_in_menu' => 'edit.php?post_type=' . self::EVENT, + 'show_in_rest' => true, + 'rewrite' => [ 'slug' => $slug, 'with_front' => false ], + 'supports' => [ 'title', 'editor', 'thumbnail', 'revisions' ], + ] ); + } + + register_taxonomy( self::CATEGORY, [ self::EVENT ], [ + 'labels' => [ 'name' => __( 'Event Categories', 'burn-events' ), 'singular_name' => __( 'Event Category', 'burn-events' ) ], + 'hierarchical' => true, + 'public' => true, + 'show_in_rest' => true, + 'show_admin_column' => true, + 'rewrite' => [ 'slug' => 'event-category', 'with_front' => false ], + ] ); + register_taxonomy_for_object_type( 'post_tag', self::EVENT ); + } + + public static function table(): string { + global $wpdb; + return $wpdb->prefix . 'burn_event_occurrences'; + } + + public static function ensure_schema(): void { + if ( '1' === get_option( 'burn_events_schema' ) ) { + return; + } + global $wpdb; + require_once ABSPATH . 'wp-admin/includes/upgrade.php'; + $table = self::table(); + $collation = $wpdb->get_charset_collate(); + dbDelta( "CREATE TABLE $table ( + event_id bigint unsigned NOT NULL, + starts_at datetime NOT NULL, + ends_at datetime NOT NULL, + PRIMARY KEY (event_id,starts_at), + KEY starts_at (starts_at), + KEY ends_at (ends_at) + ) ENGINE=InnoDB $collation;" ); + if ( $table === $wpdb->get_var( $wpdb->prepare( 'SHOW TABLES LIKE %s', $wpdb->esc_like( $table ) ) ) ) { + update_option( 'burn_events_schema', '1' ); + } + } + + public static function event_data( int $id ): array { + $data = (array) get_post_meta( $id, '_burn_event', true ); + return $data + [ + 'schedule' => [], 'status' => 'scheduled', 'venue' => [], 'organizer' => [], 'series' => [], + 'location' => '', 'cost' => '', 'url' => '', 'featured' => false, 'hidden' => false, 'fields' => [], + ]; + } + + public static function location_data( int $id ): array { + return (array) get_post_meta( $id, '_burn_location', true ) + [ + 'address' => '', 'city' => '', 'region' => '', 'postal' => '', 'country' => '', + 'latitude' => '', 'longitude' => '', 'website' => '', 'email' => '', 'phone' => '', + 'geocode' => [], + ]; + } + + public static function save_location( int $id, array $input, bool $retry = false ): array { + try { + return self::transaction( static function () use ( $id, $input, $retry ): array { + if ( ! self::lock_post( $id ) ) { + throw new RuntimeException( __( 'The location could not be saved.', 'burn-events' ) ); + } + $previous = self::location_data( $id ); + $data = []; + foreach ( self::LOCATION_FIELDS as $field ) { + $value = $input[ $field ] ?? $previous[ $field ]; + $data[ $field ] = is_scalar( $value ) ? sanitize_text_field( (string) $value ) : ''; + } + $data['website'] = esc_url_raw( $data['website'], [ 'http', 'https' ] ); + $data['email'] = sanitize_email( $data['email'] ); + $data = Maps::with_coordinates( $data, $previous, $retry ); + self::write_meta( $id, '_burn_location', $data ); + self::write_meta( $id, '_burn_address', Maps::address( $data ) ); + return $data; + } ); + } finally { + wp_cache_delete( $id, 'post_meta' ); + } + } + + public static function lock_post( int $id ): bool { + global $wpdb; + $locked = (bool) $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE ID = %d FOR UPDATE", $id ) ); + wp_cache_delete( $id, 'posts' ); + wp_cache_delete( $id, 'post_meta' ); + return $locked; + } + + public static function write_meta( int $id, string $key, $value ): void { + $expected = maybe_serialize( $value ); + if ( maybe_serialize( get_post_meta( $id, $key, true ) ) === $expected ) { + return; + } + if ( update_post_meta( $id, $key, wp_slash( $value ) ) ) { + return; + } + wp_cache_delete( $id, 'post_meta' ); + if ( maybe_serialize( get_post_meta( $id, $key, true ) ) !== $expected ) { + throw new RuntimeException( __( 'The event data could not be saved.', 'burn-events' ) ); + } + } + + public static function transaction( callable $write ) { + if ( self::$in_transaction ) { + return $write(); + } + + global $wpdb; + if ( false === $wpdb->query( 'START TRANSACTION' ) ) { + throw new RuntimeException( __( 'The database write could not start.', 'burn-events' ) ); + } + self::$in_transaction = true; + try { + $result = $write(); + if ( is_wp_error( $result ) ) { + $wpdb->query( 'ROLLBACK' ); + } elseif ( false === $wpdb->query( 'COMMIT' ) ) { + throw new RuntimeException( __( 'The database write could not finish.', 'burn-events' ) ); + } + return $result; + } catch ( \Throwable $error ) { + $wpdb->query( 'ROLLBACK' ); + throw $error; + } finally { + self::$in_transaction = false; + } + } + + public static function locations( array $ids, string $type ): array { + $locations = []; + foreach ( $ids as $id ) { + $post = get_post( $id ); + if ( $post && $type === $post->post_type && 'publish' === $post->post_status && '' === $post->post_password ) { + $locations[] = $post; + } + } + return $locations; + } + + public static function validate_event( array $input ): array { + $settings = Admin::options(); + $schedule = Schedule::validate( $input, $settings['timezone'] ); + $string = static fn( string $key ): string => is_scalar( $input[ $key ] ?? null ) ? sanitize_text_field( (string) $input[ $key ] ) : ''; + $status = $string( 'status' ); + $event = [ + 'schedule' => $schedule, + 'status' => array_key_exists( $status, self::statuses() ) ? $status : 'scheduled', + 'location' => $string( 'location' ), + 'cost' => $string( 'cost' ), + 'url' => esc_url_raw( $string( 'url' ), [ 'http', 'https' ] ), + 'featured' => ! empty( $input['featured'] ), + 'hidden' => ! empty( $input['hidden'] ), + 'fields' => [], + ]; + foreach ( self::RELATIONS as $name => $type ) { + $ids = array_unique( array_filter( array_map( 'absint', (array) ( $input[ $name ] ?? [] ) ) ) ); + $event[ $name ] = array_map( static fn( WP_Post $post ): int => $post->ID, self::locations( $ids, $type ) ); + } + foreach ( $settings['fields'] as $key => $field ) { + $raw = $input['fields'][ $key ] ?? ''; + $value = is_scalar( $raw ) ? sanitize_text_field( (string) $raw ) : ''; + switch ( $field['type'] ) { + case 'url': + $value = esc_url_raw( $value, [ 'http', 'https' ] ); + break; + case 'checkbox': + $value = $value ? '1' : ''; + break; + case 'select': + $value = in_array( $value, $field['choices'], true ) ? $value : ''; + break; + } + $event['fields'][ $key ] = $value; + } + return $event; + } + + public static function statuses(): array { + return [ + 'scheduled' => __( 'Scheduled', 'burn-events' ), + 'postponed' => __( 'Postponed', 'burn-events' ), + 'cancelled' => __( 'Cancelled', 'burn-events' ), + 'moved_online' => __( 'Moved online', 'burn-events' ), + ]; + } + + public static function save( int $id, array $event, ?array $imported_dates = null ): void { + self::index( $id, $event, $imported_dates ); + } + + public static function uses_imported_dates( int $id ): bool { + return (bool) get_post_meta( $id, self::IMPORTED_DATES, true ); + } + + public static function rebuild( int $id ): void { + if ( self::EVENT === get_post_type( $id ) ) { + self::index( $id ); + } + } + + private static function index( int $id, ?array $new_data = null, ?array $imported_dates = null ): void { + try { + self::transaction( static function () use ( $id, $new_data, $imported_dates ): void { + global $wpdb; + $table = self::table(); + if ( ! self::lock_post( $id ) ) { + throw new RuntimeException( __( 'The event could not be saved.', 'burn-events' ) ); + } + $previous_data = self::event_data( $id ); + $data = $new_data ?? $previous_data; + if ( ! $data['schedule'] ) { + return; + } + + $dates = get_post_meta( $id, self::IMPORTED_DATES, true ); + if ( null !== $imported_dates ) { + $dates = $imported_dates; + self::write_meta( $id, self::IMPORTED_DATES, $dates ); + } elseif ( $dates && $new_data && $data['schedule'] !== $previous_data['schedule'] ) { + if ( ! delete_post_meta( $id, self::IMPORTED_DATES ) ) { + throw new RuntimeException( __( 'The imported dates could not be replaced.', 'burn-events' ) ); + } + $dates = []; + } + $horizon = new DateTimeImmutable( '+2 years', wp_timezone() ); + if ( false === $wpdb->delete( $table, [ 'event_id' => $id ], [ '%d' ] ) ) { + throw new RuntimeException( __( 'The schedule could not be indexed.', 'burn-events' ) ); + } + $rows = []; + foreach ( $dates ?: Schedule::occurrences( $data['schedule'], $horizon ) as [ $start, $end ] ) { + $rows[] = $wpdb->prepare( '(%d, %s, %s)', $id, $start, $end ); + if ( 100 === count( $rows ) ) { + self::insert_occurrences( $table, $rows ); + $rows = []; + } + } + if ( $rows ) { + self::insert_occurrences( $table, $rows ); + } + if ( null !== $new_data ) { + self::write_meta( $id, '_burn_event', $data ); + self::write_meta( $id, '_burn_hidden', $data['hidden'] ? '1' : '0' ); + self::write_meta( $id, '_burn_featured', $data['featured'] ? '1' : '0' ); + self::write_meta( $id, '_burn_search_location', $data['location'] ); + self::write_meta( $id, '_burn_repeating', 'none' === $data['schedule']['repeat'] ? '0' : '1' ); + foreach ( self::RELATIONS as $name => $type ) { + $key = '_burn_' . $name; + $previous = get_post_meta( $id, $key, false ); + $ids = array_map( 'strval', $data[ $name ] ); + if ( $previous === $ids ) { + continue; + } + if ( $previous && ! delete_post_meta( $id, $key ) ) { + throw new RuntimeException( __( 'Event links could not be saved.', 'burn-events' ) ); + } + foreach ( $ids as $linked_id ) { + if ( ! add_post_meta( $id, $key, $linked_id ) ) { + throw new RuntimeException( __( 'Event links could not be saved.', 'burn-events' ) ); + } + } + } + } + } ); + } finally { + wp_cache_delete( $id, 'post_meta' ); + } + } + + private static function insert_occurrences( string $table, array $rows ): void { + global $wpdb; + if ( false === $wpdb->query( "INSERT INTO $table (event_id, starts_at, ends_at) VALUES " . implode( ',', $rows ) ) ) { + throw new RuntimeException( __( 'The schedule could not be indexed.', 'burn-events' ) ); + } + } + + public static function extend(): void { + for ( $page = 1; ; $page++ ) { + $ids = get_posts( [ + 'post_type' => self::EVENT, 'post_status' => [ 'publish', 'pending', 'draft', 'private', 'future' ], + 'fields' => 'ids', 'meta_key' => '_burn_repeating', 'meta_value' => '1', + 'posts_per_page' => 100, 'paged' => $page, 'orderby' => 'ID', 'order' => 'ASC', + ] ); + foreach ( $ids as $id ) { + try { + self::rebuild( $id ); + } catch ( \Throwable $error ) { + if ( ! wp_next_scheduled( 'burn_events_rebuild_schedule', [ $id ] ) ) { + wp_schedule_single_event( time() + HOUR_IN_SECONDS, 'burn_events_rebuild_schedule', [ $id ] ); + } + } + } + if ( count( $ids ) < 100 ) { + break; + } + } + } + + public static function delete_occurrences( int $id ): void { + if ( self::EVENT === get_post_type( $id ) ) { + global $wpdb; + $wpdb->delete( self::table(), [ 'event_id' => $id ], [ '%d' ] ); + } + } + + public static function query( array $filters ): array { + global $wpdb; + $table = self::table(); + $filters += [ 'from' => null, 'to' => null, 'past' => false, 'search' => '', 'category' => '', 'tag' => '', 'location' => '', 'relation' => null, 'scope' => '', 'featured' => false, 'offset' => 0, 'limit' => 20 ]; + $where = [ "p.post_type = 'burn_event'", "p.post_status = 'publish'", "p.post_password = ''" ]; + $where[] = "NOT EXISTS (SELECT 1 FROM $wpdb->postmeta h WHERE h.post_id = p.ID AND h.meta_key = '_burn_hidden' AND h.meta_value = '1')"; + if ( '' !== $filters['scope'] ) { + $where[] = Clubs::condition( $filters['scope'] ); + } + if ( $filters['from'] ) { + $where[] = $wpdb->prepare( 'o.ends_at > %s', $filters['from'] ); + } + if ( $filters['to'] ) { + $where[] = $wpdb->prepare( $filters['past'] ? 'o.ends_at <= %s' : 'o.starts_at < %s', $filters['to'] ); + } + if ( $filters['search'] ) { + $like = '%' . $wpdb->esc_like( $filters['search'] ) . '%'; + $where[] = $wpdb->prepare( '(p.post_title LIKE %s OR p.post_content LIKE %s)', $like, $like ); + } + foreach ( [ 'category' => self::CATEGORY, 'tag' => 'post_tag' ] as $key => $taxonomy ) { + if ( $filters[ $key ] ) { + $where[] = $wpdb->prepare( "EXISTS (SELECT 1 FROM $wpdb->term_relationships r JOIN $wpdb->term_taxonomy tt ON tt.term_taxonomy_id = r.term_taxonomy_id JOIN $wpdb->terms t ON t.term_id = tt.term_id WHERE r.object_id = p.ID AND tt.taxonomy = %s AND t.slug = %s)", $taxonomy, $filters[ $key ] ); + } + } + if ( $filters['relation'] ) { + [ $type, $id ] = $filters['relation']; + $where[] = $wpdb->prepare( "EXISTS (SELECT 1 FROM $wpdb->postmeta m WHERE m.post_id = p.ID AND m.meta_key = %s AND m.meta_value = %s)", '_burn_' . $type, (string) $id ); + } + if ( $filters['location'] ) { + $like = '%' . $wpdb->esc_like( $filters['location'] ) . '%'; + $where[] = $wpdb->prepare( "EXISTS (SELECT 1 FROM $wpdb->postmeta m LEFT JOIN $wpdb->posts v ON m.meta_key = '_burn_venue' AND v.ID = CAST(m.meta_value AS UNSIGNED) AND v.post_status = 'publish' LEFT JOIN $wpdb->postmeta a ON a.post_id = v.ID AND a.meta_key = '_burn_address' WHERE m.post_id = p.ID AND (v.post_title LIKE %s OR a.meta_value LIKE %s OR (m.meta_key = '_burn_search_location' AND m.meta_value LIKE %s)))", $like, $like, $like ); + } + if ( $filters['featured'] ) { + $where[] = "EXISTS (SELECT 1 FROM $wpdb->postmeta f WHERE f.post_id = p.ID AND f.meta_key = '_burn_featured' AND f.meta_value = '1')"; + } + $order = $filters['past'] ? 'DESC' : 'ASC'; + $limit = $wpdb->prepare( ' LIMIT %d OFFSET %d', $filters['limit'], $filters['offset'] ); + return $wpdb->get_results( "SELECT o.event_id, o.starts_at, o.ends_at FROM $table o JOIN $wpdb->posts p ON p.ID = o.event_id WHERE " . implode( ' AND ', $where ) . " ORDER BY o.starts_at $order, o.event_id $order" . $limit, ARRAY_A ) ?: []; + } + + public static function occurrence( int $id, string $requested = '' ): ?array { + global $wpdb; + $table = self::table(); + $date = preg_match( '/^-?\d{1,12}$/D', $requested ) ? gmdate( 'Y-m-d H:i:s', (int) $requested ) : ''; + if ( $date ) { + $row = $wpdb->get_row( $wpdb->prepare( "SELECT event_id, starts_at, ends_at FROM $table WHERE event_id = %d AND starts_at = %s", $id, $date ), ARRAY_A ); + if ( $row ) { + return $row; + } + } + return $wpdb->get_row( $wpdb->prepare( + "SELECT event_id, starts_at, ends_at FROM $table WHERE event_id = %d ORDER BY CASE WHEN ends_at > %s THEN 0 ELSE 1 END, starts_at LIMIT 1", + $id, gmdate( 'Y-m-d H:i:s' ) + ), ARRAY_A ); + } + + public static function local_time( string $utc, string $zone ): DateTimeImmutable { + return ( new DateTimeImmutable( $utc, new DateTimeZone( 'UTC' ) ) )->setTimezone( new DateTimeZone( $zone ) ); + } + + public static function event_url( array $occurrence ): string { + return add_query_arg( 'be_occ', strtotime( $occurrence['starts_at'] . ' UTC' ), get_permalink( (int) $occurrence['event_id'] ) ); + } +} diff --git a/includes/class-legacy-migration.php b/includes/class-legacy-migration.php new file mode 100644 index 0000000..533b78e --- /dev/null +++ b/includes/class-legacy-migration.php @@ -0,0 +1,333 @@ + 'tribe_venue', 'organizer' => 'tribe_organizer', 'series' => 'tribe_event_series' ]; + + public static function register(): void { + add_action( 'admin_notices', [ self::class, 'notice' ] ); + add_action( 'wp_ajax_' . self::ACTION, [ self::class, 'ajax' ] ); + } + + public static function notice(): void { + $screen = get_current_screen(); + if ( ! current_user_can( 'manage_options' ) || ! $screen || 'edit' !== $screen->base || Events::EVENT !== $screen->post_type || isset( $_GET['page'] ) || ! self::count() ) { + return; + } + $url = admin_url( 'edit.php?post_type=burn_event&page=burn-events-transfer#eventlabs-migration' ); + echo '

' . esc_html__( 'The Events Calendar data was found on this site.', 'burn-events' ) + . ' ' . esc_html__( 'Review event migration', 'burn-events' ) . '

'; + } + + private static function installed(): bool { + require_once ABSPATH . 'wp-admin/includes/plugin.php'; + foreach ( get_plugins() as $path => $plugin ) { + if ( 'the-events-calendar/the-events-calendar.php' === $path || 'the-events-calendar' === $plugin['TextDomain'] ) { + return true; + } + } + return false; + } + + private static function count(): int { + global $wpdb; + return (int) $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = %s AND post_status NOT IN ('trash', 'auto-draft', 'inherit')", self::EVENT ) ); + } + + public static function section(): void { + $count = self::count(); + if ( ! $count && ! self::installed() ) { + return; + } + ?> +
+

+ +

+ +

+

+

+
+ + + +

+
    +
    + + +
    + get_col( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_type = %s AND ID > %d AND post_status NOT IN ('trash', 'auto-draft', 'inherit') ORDER BY ID LIMIT %d", self::EVENT, $after, self::BATCH + 1 ) ); + if ( $wpdb->last_error ) { + throw new RuntimeException( 'Source event query failed.' ); + } + $result = [ 'copied' => 0, 'skipped' => 0, 'errors' => [], 'next' => 0 ]; + $more = count( $ids ) > self::BATCH; + foreach ( array_slice( $ids, 0, self::BATCH ) as $id ) { + $after = (int) $id; + try { + ++$result[ self::event( $after ) ]; + } catch ( InvalidArgumentException $error ) { + $result['errors'][] = sprintf( __( 'Event #%1$d — %2$s', 'burn-events' ), $after, $error->getMessage() ); + } catch ( \Throwable $error ) { + $result['errors'][] = sprintf( __( 'Event #%d could not be copied.', 'burn-events' ), $after ); + } + } + $result['next'] = $more ? $after : 0; + return $result; + } + + private static function event( int $id ): string { + $source = get_post( $id ); + if ( ! $source || self::EVENT !== $source->post_type || 'trash' === $source->post_status ) { + throw new InvalidArgumentException( __( 'The source event is unavailable.', 'burn-events' ) ); + } + if ( self::copied( 'events', $id ) ) { + return 'skipped'; + } + [ $schedule, $dates ] = self::schedule( $id ); + $status = match ( self::meta( $id, '_tribe_events_status' ) ) { + 'canceled', 'cancelled' => 'cancelled', + 'postponed' => 'postponed', + 'moved-online', 'moved_online' => 'moved_online', + default => 'scheduled', + }; + $costs = array_filter( get_post_meta( $id, '_EventCost', false ), static fn( $cost ): bool => is_scalar( $cost ) && '' !== (string) $cost ); + $payload = self::post_fields( $source ) + self::event_terms( $id ) + [ + 'post_status' => 'draft', 'schedule' => $schedule, 'imported_dates' => $dates, 'status' => $status, + 'cost' => implode( ' – ', array_unique( $costs ) ), + 'url' => self::meta( $id, '_EventURL' ), 'featured' => self::flag( $id, '_tribe_featured' ), + 'hidden' => self::flag( $id, '_EventHideFromUpcoming' ), + 'metadata' => [ 'migration' => [ 'source_post_id' => $id, 'source_status' => $source->post_status, 'saved_dates' => count( $dates ) ] ], + ]; + foreach ( self::TYPES as $type => $post_type ) { + $payload[ $type ] = []; + $links = 'series' === $type ? self::series_ids( $id ) : get_post_meta( $id, '_Event' . ucfirst( $type ) . 'ID', false ); + foreach ( array_unique( array_filter( array_map( 'absint', $links ) ) ) as $linked_id ) { + $linked = get_post( $linked_id ); + if ( $linked && $post_type === $linked->post_type && 'trash' !== $linked->post_status ) { + $payload[ $type ][] = self::linked( $type, $linked ); + } + } + } + $created = self::create( 'events', $id, $payload ); + return 201 === $created->get_status() ? 'copied' : 'skipped'; + } + + private static function post_fields( WP_Post $source ): array { + $image = get_post_thumbnail_id( $source ); + return [ + 'title' => $source->post_title ?: __( 'Untitled event', 'burn-events' ), + 'description' => $source->post_content, 'excerpt' => $source->post_excerpt, 'slug' => $source->post_name, + 'featured_media' => $image && wp_attachment_is_image( $image ) ? $image : 0, + ]; + } + + private static function linked( string $type, WP_Post $source ): int { + $id = $source->ID; + $resource = 'series' === $type ? 'series' : $type . 's'; + $saved = self::copied( $resource, $id ); + if ( $saved ) { + return $saved; + } + $payload = self::post_fields( $source ) + [ + 'post_status' => 'publish' === $source->post_status && '' === $source->post_password ? 'publish' : 'draft', + ]; + $fields = match ( $type ) { + 'venue' => [ + 'address' => '_VenueAddress', 'city' => '_VenueCity', 'region' => '_VenueStateProvince', + 'postal' => '_VenueZip', 'country' => '_VenueCountry', 'phone' => '_VenuePhone', 'website' => '_VenueURL', + ], + 'organizer' => [ 'phone' => '_OrganizerPhone', 'website' => '_OrganizerWebsite', 'email' => '_OrganizerEmail' ], + default => [], + }; + foreach ( $fields as $field => $key ) { + $payload[ $field ] = self::meta( $id, $key ); + } + if ( 'venue' === $type && ! $payload['region'] ) { + $payload['region'] = self::meta( $id, '_VenueState' ) ?: self::meta( $id, '_VenueProvince' ); + } + $created = self::create( $resource, $id, $payload ); + return (int) $created->get_data()['id']; + } + + private static function copied( string $resource, int $source_id ): int { + $record = Api::external( $resource, self::SOURCE, (string) $source_id ); + if ( is_wp_error( $record ) ) { + if ( 410 === ( $record->get_error_data()['status'] ?? 0 ) ) { + throw new InvalidArgumentException( __( 'The previously migrated copy was removed.', 'burn-events' ) ); + } + return 0; + } + return (int) $record->get_data()['id']; + } + + private static function create( string $resource, int $source_id, array $payload ): \WP_REST_Response { + $request = new WP_REST_Request( 'PUT' ); + $request->set_header( 'If-None-Match', '*' ); + $result = Api::write( $resource, $payload, $request, 0, [ self::SOURCE, (string) $source_id ] ); + if ( is_wp_error( $result ) ) { + if ( 412 === ( $result->get_error_data()['status'] ?? 0 ) ) { + $existing = Api::external( $resource, self::SOURCE, (string) $source_id ); + if ( ! is_wp_error( $existing ) ) { + return $existing; + } + } + throw new InvalidArgumentException( $result->get_error_message() ); + } + return $result; + } + + private static function source_table( string $suffix ): string { + global $wpdb; + static $tables = []; + $table = $wpdb->prefix . $suffix; + return $tables[ $table ] ??= ( $table === $wpdb->get_var( $wpdb->prepare( 'SHOW TABLES LIKE %s', $wpdb->esc_like( $table ) ) ) ? $table : '' ); + } + + private static function series_ids( int $id ): array { + global $wpdb; + $table = self::source_table( 'tec_series_relationships' ); + return $table ? $wpdb->get_col( $wpdb->prepare( "SELECT series_post_id FROM $table WHERE event_post_id = %d", $id ) ) : []; + } + + private static function schedule( int $id ): array { + global $wpdb; + $utc = new DateTimeZone( 'UTC' ); + try { + $zone = new DateTimeZone( self::meta( $id, '_EventTimezone' ) ?: wp_timezone_string() ); + } catch ( \Exception $error ) { + $zone = wp_timezone(); + } + $table = self::source_table( 'tec_occurrences' ); + $rows = $table ? $wpdb->get_results( $wpdb->prepare( "SELECT start_date_utc, end_date_utc FROM $table WHERE post_id = %d ORDER BY start_date_utc", $id ), ARRAY_N ) : []; + if ( $table && $wpdb->last_error ) { + throw new InvalidArgumentException( __( 'The saved occurrences could not be read.', 'burn-events' ) ); + } + $all_day = self::flag( $id, '_EventAllDay' ); + $dates = []; + $schedule = null; + if ( ! $rows ) { + $start = self::meta_date( $id, '_EventStartDate', $zone, $utc ); + $end = self::meta_date( $id, '_EventEndDate', $zone, $utc ); + $rows = [ [ $start, $end ] ]; + } + foreach ( $rows as [ $start, $end ] ) { + $from = self::date( $start, $utc )->setTimezone( $zone ); + $to = self::date( $end, $utc )->setTimezone( $zone ); + if ( $all_day ) { + $from = $from->setTime( 0, 0 ); + $to = '00:00:00' === $to->format( 'H:i:s' ) ? $to : $to->modify( 'tomorrow' )->setTime( 0, 0 ); + } + if ( $to <= $from ) { + throw new InvalidArgumentException( __( 'A source occurrence ends at or before its start.', 'burn-events' ) ); + } + $last_day = $all_day ? $to->modify( '-1 day' ) : $to; + $schedule ??= [ + 'start_date' => $from->format( 'Y-m-d' ), 'start_time' => $from->format( 'H:i:s' ), + 'end_date' => $last_day->format( 'Y-m-d' ), 'end_time' => $to->format( 'H:i:s' ), + 'timezone' => $zone->getName(), 'all_day' => $all_day, 'repeat' => 'none', + ]; + $key = $from->setTimezone( $utc )->format( 'Y-m-d H:i:s' ); + $end_utc = $to->setTimezone( $utc )->format( 'Y-m-d H:i:s' ); + if ( isset( $dates[ $key ] ) && $end_utc !== $dates[ $key ][1] ) { + throw new InvalidArgumentException( __( 'Two source occurrences share a start time with different end times.', 'burn-events' ) ); + } + $dates[ $key ] = [ $key, $end_utc ]; + } + return [ $schedule, array_values( $dates ) ]; + } + + private static function meta_date( int $id, string $key, DateTimeZone $zone, DateTimeZone $utc ): string { + $value = self::meta( $id, $key . 'UTC' ); + $date = $value && '0000-00-00 00:00:00' !== $value ? self::date( $value, $utc ) : self::date( self::meta( $id, $key ), $zone ); + return $date->setTimezone( $utc )->format( 'Y-m-d H:i:s' ); + } + + private static function date( string $value, DateTimeZone $zone ): DateTimeImmutable { + $date = preg_match( '/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/D', $value ) ? DateTimeImmutable::createFromFormat( '!Y-m-d H:i:s', $value, $zone ) : false; + if ( ! $date || $value !== $date->format( 'Y-m-d H:i:s' ) ) { + throw new InvalidArgumentException( __( 'The source schedule is missing or invalid.', 'burn-events' ) ); + } + return $date; + } + + private static function event_terms( int $id ): array { + global $wpdb; + $rows = $wpdb->get_results( $wpdb->prepare( "SELECT tt.term_id, tt.taxonomy FROM $wpdb->term_relationships r JOIN $wpdb->term_taxonomy tt ON tt.term_taxonomy_id = r.term_taxonomy_id WHERE r.object_id = %d AND tt.taxonomy IN (%s, 'post_tag')", $id, self::CATEGORY ), ARRAY_A ); + if ( $wpdb->last_error ) { + throw new RuntimeException( 'Source category query failed.' ); + } + $terms = [ 'categories' => [], 'tags' => [] ]; + foreach ( $rows as $row ) { + $term_id = (int) $row['term_id']; + if ( self::CATEGORY === $row['taxonomy'] ) { + $terms['categories'][] = self::category( $term_id ); + } else { + $terms['tags'][] = $term_id; + } + } + return $terms; + } + + private static function category( int $id, array $ancestors = [] ): int { + global $wpdb; + static $mapped = []; + if ( isset( $mapped[ $id ] ) ) { + return $mapped[ $id ]; + } + $term = $wpdb->get_row( $wpdb->prepare( "SELECT t.name, t.slug, tt.description, tt.parent FROM $wpdb->terms t JOIN $wpdb->term_taxonomy tt ON tt.term_id = t.term_id WHERE t.term_id = %d AND tt.taxonomy = %s", $id, self::CATEGORY ), ARRAY_A ); + if ( ! $term || in_array( $id, $ancestors, true ) ) { + throw new InvalidArgumentException( __( 'A source category or its parent is unavailable.', 'burn-events' ) ); + } + $parent = $term['parent'] ? self::category( (int) $term['parent'], [ ...$ancestors, $id ] ) : 0; + $existing = term_exists( $term['slug'], Events::CATEGORY, $parent ); + $created = $existing ?: wp_insert_term( $term['name'], Events::CATEGORY, [ 'slug' => $term['slug'], 'parent' => $parent, 'description' => $term['description'] ] ); + if ( is_wp_error( $created ) ) { + throw new InvalidArgumentException( $created->get_error_message() ); + } + return $mapped[ $id ] = (int) $created['term_id']; + } + + private static function meta( int $id, string $key ): string { + $value = get_post_meta( $id, $key, true ); + return is_scalar( $value ) ? (string) $value : ''; + } + + private static function flag( int $id, string $key ): bool { + return in_array( strtolower( self::meta( $id, $key ) ), [ '1', 'true', 'yes', 'on' ], true ); + } +} diff --git a/includes/class-map-view.php b/includes/class-map-view.php new file mode 100644 index 0000000..45341cb --- /dev/null +++ b/includes/class-map-view.php @@ -0,0 +1,169 @@ + self::title( $id ), + 'date' => Calendar::period( $row, $data ), + 'url' => esc_url_raw( Events::event_url( $row ), [ 'http', 'https' ] ), + ]; + $located = false; + foreach ( Events::locations( $data['venue'], Events::VENUE ) as $venue ) { + if ( ! array_key_exists( $venue->ID, $places ) ) { + $places[ $venue->ID ] = self::place( $venue ); + } + if ( $places[ $venue->ID ] ) { + self::add_pin( $pins, $places[ $venue->ID ], $event ); + $located = true; + } + } + if ( $located ) { + ++$mapped; + } else { + $unmapped[] = $event; + } + } + + if ( $pins ) { + $enabled = Admin::options()['maps']; + $counts = [ + sprintf( _n( '%s event date', '%s event dates', $mapped, 'burn-events' ), number_format_i18n( $mapped ) ), + sprintf( _n( '%s location', '%s locations', count( $pins ), 'burn-events' ), number_format_i18n( count( $pins ) ) ), + ]; + echo '

    ' . esc_html( implode( ' · ', $counts ) ) . '

    '; + if ( ! $enabled ) { + echo '

    ' . esc_html__( 'Maps are disabled on this site.', 'burn-events' ) . '

    '; + } + ?> +
    + +
    + $pin ) : ?> +
    + + + +
    + + +
    +
    + +
    +
    + ' . esc_html__( 'No events have mapped venues in this date range.', 'burn-events' ) . '

    '; + } + if ( $unmapped ) { + echo '
    ' . esc_html__( 'Events without a map pin', 'burn-events' ) . '
    '; + self::event_links( $unmapped ); + echo '
    '; + } + } + + private static function title( int $id ): string { + return html_entity_decode( wp_strip_all_tags( get_the_title( $id ) ), ENT_QUOTES | ENT_HTML5, 'UTF-8' ); + } + + private static function place( WP_Post $venue ): ?array { + $data = Events::location_data( $venue->ID ); + if ( ! Maps::valid_coordinates( $data['latitude'], $data['longitude'] ) ) { + return null; + } + return [ + 'id' => $venue->ID, 'name' => self::title( $venue->ID ), 'address' => Maps::address( $data ), + 'latitude' => (float) $data['latitude'], 'longitude' => (float) $data['longitude'], + 'url' => esc_url_raw( get_permalink( $venue ), [ 'http', 'https' ] ), 'geocode' => $data['geocode'], + ]; + } + + private static function add_pin( array &$pins, array $place, ?array $event = null ): void { + $key = sprintf( '%.6F,%.6F', $place['latitude'], $place['longitude'] ); + if ( ! isset( $pins[ $key ] ) ) { + $pins[ $key ] = [ + 'key' => $key, 'latitude' => $place['latitude'], 'longitude' => $place['longitude'], + 'places' => [], 'events' => [], + ]; + } + $pins[ $key ]['places'][ $place['id'] ] = $place; + if ( $event ) { + $pins[ $key ]['events'][ $event['url'] ] = $event; + } + } + + private static function canvas( array $pins, string $label, bool $compact = false, int $event_id = 0 ): string { + wp_enqueue_style( self::STYLE ); + wp_enqueue_script( self::SCRIPT ); + ob_start(); + ?> +
    data-be-event-map=""> +
    + + + + +
    + '; + foreach ( $events as $event ) { + echo '
  • ' . esc_html( $event['title'] ) . ''; + echo '' . esc_html( $event['date'] ) . '
  • '; + } + echo ''; + } +} diff --git a/includes/class-maps.php b/includes/class-maps.php new file mode 100644 index 0000000..89236cd --- /dev/null +++ b/includes/class-maps.php @@ -0,0 +1,164 @@ + 'string', + 'sanitize_callback' => [ self::class, 'sanitize_key' ], + 'show_in_rest' => false, + ] ); + } + + public static function sanitize_key( $value ): string { + if ( ! empty( $_POST['burn_events_remove_maps_key'] ) && current_user_can( 'manage_options' ) ) { + return ''; + } + $value = is_string( $value ) ? trim( $value ) : ''; + if ( '' === $value ) { + return self::api_key(); + } + if ( ! preg_match( '/^[A-Za-z0-9_-]{1,160}$/D', $value ) ) { + add_settings_error( self::KEY_OPTION, 'invalid_key', __( 'Enter a valid Geoapify API key.', 'burn-events' ) ); + return self::api_key(); + } + return $value; + } + + public static function has_key(): bool { + return '' !== self::api_key(); + } + + private static function api_key(): string { + return (string) get_option( self::KEY_OPTION, '' ); + } + + public static function address( array $data ): string { + $parts = array_map( static fn( string $field ): string => trim( (string) ( $data[ $field ] ?? '' ) ), self::ADDRESS_FIELDS ); + return implode( ', ', array_filter( $parts, static fn( string $part ): bool => '' !== $part ) ); + } + + public static function with_coordinates( array $data, array $previous, bool $retry ): array { + $address = self::address( $data ); + $same_address = $address === self::address( $previous ); + $status = $previous['geocode']['status'] ?? ''; + $has_pin = self::valid_coordinates( $previous['latitude'] ?? null, $previous['longitude'] ?? null ); + $data['latitude'] = ''; + $data['longitude'] = ''; + $data['geocode'] = []; + + if ( $same_address && ! $retry ) { + if ( $has_pin && ( 'resolved' === $status || ! self::has_key() ) ) { + $data['latitude'] = $previous['latitude']; + $data['longitude'] = $previous['longitude']; + $data['geocode'] = $previous['geocode'] ?: [ 'status' => 'existing' ]; + return $data; + } + if ( in_array( $status, [ 'unmatched', 'ambiguous', 'unavailable' ], true ) ) { + $data['geocode'] = $previous['geocode']; + return $data; + } + } + + if ( '' === $address ) { + return $data; + } + if ( '' === $data['address'] || ( '' === $data['city'] && '' === $data['postal'] ) ) { + $data['geocode'] = [ 'status' => 'incomplete' ]; + return $data; + } + $key = self::api_key(); + if ( '' === $key ) { + $data['geocode'] = [ 'status' => 'missing_key' ]; + return $data; + } + return array_replace( $data, self::lookup( $address, $key ) ); + } + + private static function lookup( string $address, string $key ): array { + $query = http_build_query( [ + 'text' => $address, 'format' => 'json', 'limit' => 5, 'apiKey' => $key, + ], '', '&', PHP_QUERY_RFC3986 ); + $response = wp_safe_remote_get( 'https://api.geoapify.com/v1/geocode/search?' . $query, [ + 'timeout' => 5, 'redirection' => 0, 'limit_response_size' => 262144, + ] ); + $body = json_decode( wp_remote_retrieve_body( $response ), true ); + if ( 200 !== wp_remote_retrieve_response_code( $response ) || ! is_array( $body['results'] ?? null ) ) { + return [ 'geocode' => [ 'status' => 'unavailable' ] ]; + } + + $matches = array_filter( $body['results'], static function ( $candidate ): bool { + return is_array( $candidate ) + && self::valid_coordinates( $candidate['lat'] ?? null, $candidate['lon'] ?? null ) + && (float) ( $candidate['rank']['confidence'] ?? 0 ) >= 0.8 + && in_array( $candidate['rank']['match_type'] ?? '', [ 'full_match', 'match_by_building' ], true ) + && ( ! empty( $candidate['housenumber'] ) || in_array( $candidate['result_type'] ?? '', [ 'building', 'amenity' ], true ) ); + } ); + usort( $matches, static fn( array $first, array $second ): int => $second['rank']['confidence'] <=> $first['rank']['confidence'] ); + if ( ! $matches ) { + return [ 'geocode' => [ 'status' => 'unmatched' ] ]; + } + $match = array_shift( $matches ); + foreach ( $matches as $other ) { + $similar_confidence = $match['rank']['confidence'] - $other['rank']['confidence'] < 0.05; + $different_place = abs( $match['lat'] - $other['lat'] ) > 0.0005 || abs( $match['lon'] - $other['lon'] ) > 0.0005; + if ( $similar_confidence && $different_place ) { + return [ 'geocode' => [ 'status' => 'ambiguous' ] ]; + } + } + + return [ + 'latitude' => (float) $match['lat'], + 'longitude' => (float) $match['lon'], + 'geocode' => [ + 'status' => 'resolved', + 'provider' => 'geoapify', + 'formatted_address' => sanitize_text_field( $match['formatted'] ?? '' ), + 'attribution' => sanitize_text_field( $match['datasource']['attribution'] ?? '' ), + 'license' => sanitize_text_field( $match['datasource']['license'] ?? '' ), + 'source_url' => esc_url_raw( $match['datasource']['url'] ?? '', [ 'http', 'https' ] ), + ], + ]; + } + + public static function valid_coordinates( $latitude, $longitude ): bool { + return is_numeric( $latitude ) && is_numeric( $longitude ) && abs( (float) $latitude ) <= 90 && abs( (float) $longitude ) <= 180; + } + + public static function lookup_message( array $data ): string { + return match ( $data['geocode']['status'] ?? '' ) { + 'resolved' => __( 'Coordinates resolved from the saved address.', 'burn-events' ), + 'existing' => __( 'Saved coordinates. Recheck the address to look up a new pin.', 'burn-events' ), + 'incomplete' => __( 'Enter a street address and a city or postal code.', 'burn-events' ), + 'missing_key' => __( 'Save a Geoapify API key under Events → Settings, then save this address again.', 'burn-events' ), + 'unmatched' => __( 'No street-address match. Check the address, city, and postal code.', 'burn-events' ), + 'ambiguous' => __( 'Multiple addresses matched. Add a postal code or country and save again.', 'burn-events' ), + 'unavailable' => __( 'Address lookup failed. Check the Maps API key or try again.', 'burn-events' ), + default => __( 'Save a complete address to look up coordinates.', 'burn-events' ), + }; + } + + public static function attribution( array $data ): void { + $geocode = $data['geocode'] ?? []; + $geoapify = 'geoapify' === ( $geocode['provider'] ?? '' ); + if ( ! $geoapify && empty( $geocode['attribution'] ) ) { + return; + } + echo ''; + if ( $geoapify ) { + echo '' . esc_html__( 'Geocoding by Geoapify', 'burn-events' ) . ''; + } + if ( ! empty( $geocode['attribution'] ) ) { + $credit = esc_html( $geocode['attribution'] ); + echo ( $geoapify ? ' · ' : '' ) . ( empty( $geocode['source_url'] ) ? $credit : '' . $credit . '' ); + } + echo ''; + } +} diff --git a/includes/class-platform.php b/includes/class-platform.php new file mode 100644 index 0000000..7945883 --- /dev/null +++ b/includes/class-platform.php @@ -0,0 +1,65 @@ + true ] ); + } + + public static function links( array $links ): array { + $links[] = '' . esc_html__( 'Events', 'burn-events' ) . ''; + if ( current_user_can( 'edit_theme_options' ) ) { + $links[] = '' . esc_html__( 'Single Event Templates', 'burn-events' ) . ''; + } + return $links; + } +} diff --git a/includes/class-schedule.php b/includes/class-schedule.php new file mode 100644 index 0000000..77f9d5a --- /dev/null +++ b/includes/class-schedule.php @@ -0,0 +1,139 @@ + 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday' ]; + + public static function validate( array $input, string $default_zone ): array { + $value = static fn( string $key ): string => is_scalar( $input[ $key ] ?? null ) ? trim( (string) $input[ $key ] ) : ''; + $zone = $value( 'timezone' ) ?: $default_zone; + try { + $timezone = new DateTimeZone( $zone ); + } catch ( \Exception $error ) { + throw new InvalidArgumentException( __( 'Choose a valid time zone.', 'burn-events' ) ); + } + + $all_day = ! empty( $input['all_day'] ); + $start = self::parse( $value( 'start_date' ), $all_day ? '00:00' : $value( 'start_time' ), $timezone ); + $end = self::parse( $value( 'end_date' ) ?: $value( 'start_date' ), $all_day ? '00:00' : $value( 'end_time' ), $timezone ); + if ( $end < $start || ( ! $all_day && $end == $start ) ) { + throw new InvalidArgumentException( __( 'The end must be after the start.', 'burn-events' ) ); + } + + $repeat = $value( 'repeat' ); + $until = $value( 'until' ); + if ( $until && self::parse( $until, '00:00', $timezone )->format( 'Y-m-d' ) < $start->format( 'Y-m-d' ) ) { + throw new InvalidArgumentException( __( 'The recurrence end date must be on or after the event start.', 'burn-events' ) ); + } + $weekdays = array_intersect( array_keys( self::WEEKDAYS ), array_map( 'intval', (array) ( $input['weekdays'] ?? [] ) ) ); + + return [ + 'start_date' => $start->format( 'Y-m-d' ), + 'start_time' => $start->format( '00' === $start->format( 's' ) ? 'H:i' : 'H:i:s' ), + 'end_date' => $end->format( 'Y-m-d' ), + 'end_time' => $end->format( '00' === $end->format( 's' ) ? 'H:i' : 'H:i:s' ), + 'timezone' => $timezone->getName(), + 'all_day' => $all_day, + 'repeat' => in_array( $repeat, self::REPEATS, true ) ? $repeat : 'none', + 'interval' => max( 1, min( 365, (int) $value( 'interval' ) ) ), + 'weekdays' => array_values( $weekdays ), + 'monthly' => 'weekday' === $value( 'monthly' ) ? 'weekday' : 'day', + 'count' => max( 0, min( 10000, (int) $value( 'count' ) ) ), + 'until' => $until, + 'include' => self::dates( $value( 'include' ), $timezone ), + 'exclude' => self::dates( $value( 'exclude' ), $timezone ), + ]; + } + + private static function parse( string $day, string $time, DateTimeZone $zone ): DateTimeImmutable { + $value = $day . ' ' . $time; + $format = 8 === strlen( $time ) ? 'Y-m-d H:i:s' : 'Y-m-d H:i'; + $date = DateTimeImmutable::createFromFormat( '!' . $format, $value, $zone ); + if ( ! $date || $date->format( $format ) !== $value ) { + throw new InvalidArgumentException( __( 'Enter a valid date and time for the selected time zone.', 'burn-events' ) ); + } + return $date; + } + + private static function dates( string $value, DateTimeZone $zone ): array { + $dates = preg_split( '/[\s,]+/', $value, -1, PREG_SPLIT_NO_EMPTY ); + return array_values( array_unique( array_map( static fn( string $day ): string => self::parse( $day, '00:00', $zone )->format( 'Y-m-d' ), $dates ) ) ); + } + + public static function occurrences( array $rule, DateTimeImmutable $horizon ): Generator { + $zone = new DateTimeZone( $rule['timezone'] ); + $start = self::parse( $rule['start_date'], $rule['start_time'], $zone ); + $end = self::parse( $rule['end_date'], $rule['end_time'], $zone ); + $span = (int) $start->setTime( 0, 0 )->diff( $end->setTime( 0, 0 ) )->days + (int) $rule['all_day']; + $anchor = $start->setTime( 0, 0 ); + $limit = $horizon->setTimezone( $zone )->setTime( 0, 0 ); + $dates = [ $rule['start_date'] => true ]; + $generated = 1; + + if ( 'none' !== $rule['repeat'] ) { + $until = $rule['until'] ? new DateTimeImmutable( $rule['until'], $zone ) : $limit; + $until = min( $limit, $until ); + for ( $date = $anchor->modify( '+1 day' ); $date <= $until; $date = $date->modify( '+1 day' ) ) { + if ( $rule['count'] && $generated >= $rule['count'] ) { + break; + } + if ( self::matches( $rule, $anchor, $date ) ) { + $dates[ $date->format( 'Y-m-d' ) ] = true; + $generated++; + } + } + } + + foreach ( $rule['include'] as $date ) { + $dates[ $date ] = true; + } + foreach ( $rule['exclude'] as $date ) { + unset( $dates[ $date ] ); + } + ksort( $dates ); + + $utc = new DateTimeZone( 'UTC' ); + foreach ( array_keys( $dates ) as $day ) { + $from = new DateTimeImmutable( $day . ' ' . $rule['start_time'], $zone ); + $last_day = ( new DateTimeImmutable( $day, $zone ) )->modify( "+{$span} days" )->format( 'Y-m-d' ); + $to = new DateTimeImmutable( $last_day . ' ' . $rule['end_time'], $zone ); + if ( $to <= $from ) { + $to = $from->modify( '+' . max( 60, $end->getTimestamp() - $start->getTimestamp() ) . ' seconds' ); + } + yield [ $from->setTimezone( $utc )->format( 'Y-m-d H:i:s' ), $to->setTimezone( $utc )->format( 'Y-m-d H:i:s' ) ]; + } + } + + private static function matches( array $rule, DateTimeImmutable $anchor, DateTimeImmutable $date ): bool { + $interval = $rule['interval']; + $days = (int) $anchor->diff( $date )->days; + switch ( $rule['repeat'] ) { + case 'daily': + return 0 === $days % $interval; + case 'weekly': + $week = intdiv( $days + (int) $anchor->format( 'N' ) - 1, 7 ); + $weekdays = $rule['weekdays'] ?: [ (int) $anchor->format( 'N' ) ]; + return 0 === $week % $interval && in_array( (int) $date->format( 'N' ), $weekdays, true ); + case 'monthly': + $months = ( (int) $date->format( 'Y' ) - (int) $anchor->format( 'Y' ) ) * 12 + (int) $date->format( 'n' ) - (int) $anchor->format( 'n' ); + if ( 0 !== $months % $interval ) { + return false; + } + return 'weekday' === $rule['monthly'] + ? $date->format( 'N' ) === $anchor->format( 'N' ) && intdiv( (int) $date->format( 'j' ) - 1, 7 ) === intdiv( (int) $anchor->format( 'j' ) - 1, 7 ) + : $date->format( 'j' ) === $anchor->format( 'j' ); + case 'yearly': + return 0 === ( (int) $date->format( 'Y' ) - (int) $anchor->format( 'Y' ) ) % $interval && $date->format( 'm-d' ) === $anchor->format( 'm-d' ); + } + return false; + } +} diff --git a/includes/class-single-event-templates.php b/includes/class-single-event-templates.php new file mode 100644 index 0000000..70307cb --- /dev/null +++ b/includes/class-single-event-templates.php @@ -0,0 +1,341 @@ + [ + 'name' => __( 'Single Event Templates', 'burn-events' ), + 'singular_name' => __( 'Single Event Template', 'burn-events' ), + 'add_new_item' => __( 'Add Single Event Template', 'burn-events' ), + 'edit_item' => __( 'Edit Single Event Template', 'burn-events' ), + ], + 'public' => false, + 'publicly_queryable' => true, + 'exclude_from_search' => true, + 'show_ui' => true, + 'show_in_menu' => 'edit.php?post_type=' . self::EVENT, + 'rewrite' => false, + 'map_meta_cap' => false, + 'capabilities' => array_fill_keys( + [ 'edit_post', 'read_post', 'delete_post', 'edit_posts', 'edit_others_posts', 'publish_posts', 'read_private_posts', 'create_posts' ], + self::CAPABILITY + ), + 'supports' => [ 'title', 'editor', 'revisions', 'elementor' ], + ] + ); + } + + public static function list_url(): string { + return admin_url( 'edit.php?post_type=' . self::POST_TYPE ); + } + + public static function protect_template_preview(): void { + if ( is_singular( self::POST_TYPE ) ) { + nocache_headers(); + if ( ! current_user_can( 'edit_post', get_queried_object_id() ) ) { + wp_die( esc_html__( 'Page not found.', 'burn-events' ), '', [ 'response' => 404 ] ); + } + } + } + + public static function register_widget_category( $manager ): void { + $manager->add_category( 'burn-events', [ 'title' => 'eventLabs', 'icon' => 'eicon-calendar' ] ); + } + + public static function order_widget_category( array $settings ): array { + $categories = $settings['initial_document']['panel']['elements_categories'] ?? []; + if ( isset( $categories['burn-events'] ) ) { + $favorites = array_intersect_key( $categories, [ 'favorites' => true ] ); + $settings['initial_document']['panel']['elements_categories'] = $favorites + [ 'burn-events' => $categories['burn-events'] ] + $categories; + } + return $settings; + } + + public static function register_widgets( $manager ): void { + require_once __DIR__ . '/class-elementor-widgets.php'; + $widgets = [ + new Calendar_Widget(), new Event_List_Widget(), new Event_Details_Widget(), new Event_Title_Widget(), + new Event_Date_Widget(), new Event_Image_Widget(), new Event_Description_Widget(), new Event_Venue_Widget(), + new Event_Organizer_Widget(), new Event_Cost_Widget(), new Event_Calendar_Links_Widget(), + new Event_Related_Widget(), new Countdown_Widget(), new Community_Widget(), new Event_Field_Widget(), + ]; + foreach ( $widgets as $widget ) { + $manager->register( $widget ); + } + } + + private static function sample_event( int $template_id ): ?WP_Post { + $sample_id = (int) get_post_meta( $template_id, self::SAMPLE_META, true ); + $sample = $sample_id ? get_post( $sample_id ) : null; + if ( $sample && self::EVENT === $sample->post_type && 'publish' === $sample->post_status && '' === $sample->post_password ) { + return $sample; + } + + $events = get_posts( + [ + 'post_type' => self::EVENT, + 'post_status' => 'publish', + 'has_password' => false, + 'posts_per_page' => 1, + ] + ); + return $events[0] ?? null; + } + + public static function widget_context( int $id = 0 ): array { + if ( ! $id && self::$rendering_event ) { + return [ self::$rendering_event, self::$rendering_occurrence ]; + } + + $post = $id ? get_post( $id ) : get_post(); + if ( $post && ! $id && self::POST_TYPE === $post->post_type && current_user_can( 'edit_post', $post->ID ) ) { + $post = self::sample_event( $post->ID ); + } + + if ( ! $post || self::EVENT !== $post->post_type || post_password_required( $post ) + || ( 'publish' !== $post->post_status && ! current_user_can( 'read_post', $post->ID ) ) + ) { + return [ null, null ]; + } + return [ $post, Events::occurrence( $post->ID, Calendar::request( 'be_occ' ) ) ]; + } + + private static function is_layout( ?WP_Post $template ): bool { + return $template && self::POST_TYPE === $template->post_type + && 'publish' === $template->post_status && '' === $template->post_password; + } + + private static function is_elementor_ready(): bool { + return did_action( 'elementor/loaded' ) && class_exists( Elementor::class ); + } + + private static function get_assignment( int $event_id ): int { + return (int) get_post_meta( $event_id, self::EVENT_TEMPLATE_META, true ); + } + + public static function render( WP_Post $event, ?array $row ): string { + if ( ! self::is_elementor_ready() || Elementor::instance()->preview->is_preview_mode() ) { + return ''; + } + + $assignment = self::get_assignment( $event->ID ); + if ( -1 === $assignment ) { + return ''; + } + $default = (int) get_option( self::DEFAULT_OPTION, 0 ); + $frontend = Elementor::instance()->frontend; + + foreach ( array_unique( array_filter( [ $assignment, $default ] ) ) as $template_id ) { + if ( ! self::is_layout( get_post( $template_id ) ) ) { + continue; + } + self::$rendering_event = $event; + self::$rendering_occurrence = $row; + try { + $markup = $frontend->get_builder_content_for_display( $template_id ); + } finally { + self::$rendering_event = null; + self::$rendering_occurrence = null; + } + if ( trim( $markup ) ) { + add_action( 'wp_enqueue_scripts', [ $frontend, 'enqueue_styles' ] ); + return $markup; + } + } + return ''; + } + + public static function add_preview_box(): void { + add_meta_box( 'burn-events-preview', __( 'Preview event', 'burn-events' ), [ self::class, 'preview_box' ], self::POST_TYPE, 'side' ); + } + + public static function preview_box( WP_Post $post ): void { + $sample = (int) get_post_meta( $post->ID, self::SAMPLE_META, true ); + wp_nonce_field( 'burn_events_save_preview', 'burn_events_preview_nonce' ); + ?> + + +

    + post_type && 'publish' === $sample->post_status && '' === $sample->post_password ) { + update_post_meta( $post_id, self::SAMPLE_META, $sample_id ); + } else { + delete_post_meta( $post_id, self::SAMPLE_META ); + } + } + + public static function add_assignment_box(): void { + add_meta_box( 'burn-events-template', __( 'Single Event Template', 'burn-events' ), [ self::class, 'assignment_box' ], self::EVENT, 'side' ); + } + + public static function assignment_box( WP_Post $post ): void { + $selected = self::get_assignment( $post->ID ); + $templates = get_posts( + [ + 'post_type' => self::POST_TYPE, + 'post_status' => 'publish', + 'has_password' => false, + 'posts_per_page' => -1, + 'orderby' => 'title', + 'order' => 'ASC', + ] + ); + wp_nonce_field( 'burn_events_save_assignment', 'burn_events_assignment_nonce' ); + ?> + + + 0 && self::is_layout( get_post( $value ) ) ) ) { + update_post_meta( $post_id, self::EVENT_TEMPLATE_META, $value ); + } else { + delete_post_meta( $post_id, self::EVENT_TEMPLATE_META ); + } + } + + private static function can_save( int $id, string $field, string $action ): bool { + return ! wp_is_post_autosave( $id ) && ! wp_is_post_revision( $id ) + && current_user_can( 'edit_post', $id ) + && isset( $_POST[ $field ] ) && is_string( $_POST[ $field ] ) + && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST[ $field ] ) ), $action ); + } + + public static function builder_notice(): void { + $screen = get_current_screen(); + if ( ! $screen || self::POST_TYPE !== $screen->post_type || ! current_user_can( self::CAPABILITY ) ) { + return; + } + if ( ! self::is_elementor_ready() ) { + echo '

    ' . esc_html__( 'Activate Elementor to design and publish Single Event templates.', 'burn-events' ) . '

    '; + return; + } + if ( 'edit' !== $screen->base ) { + return; + } + ?> +
    +

    +
    + + +

    +
    +
    + ID === (int) get_option( self::DEFAULT_OPTION, 0 ); + $id = $is_default ? 0 : $post->ID; + $url = add_query_arg( [ 'action' => 'burn_events_set_default', 'template' => $id ], admin_url( 'admin-post.php' ) ); + $label = $is_default ? __( 'Clear default', 'burn-events' ) : __( 'Use as default', 'burn-events' ); + $actions['burn-events-default'] = '' . esc_html( $label ) . ''; + return $actions; + } + + public static function display_default_state( array $states, WP_Post $post ): array { + if ( self::is_layout( $post ) && $post->ID === (int) get_option( self::DEFAULT_OPTION, 0 ) ) { + $states['burn-events-default'] = __( 'Default event template', 'burn-events' ); + } + return $states; + } + + public static function set_default(): void { + $id = isset( $_GET['template'] ) && is_scalar( $_GET['template'] ) ? absint( $_GET['template'] ) : 0; + if ( ! current_user_can( self::CAPABILITY ) ) { + wp_die( esc_html__( 'You cannot change the default event template.', 'burn-events' ), '', [ 'response' => 403 ] ); + } + check_admin_referer( 'burn_events_set_default_' . $id ); + if ( $id && ! self::is_layout( get_post( $id ) ) ) { + wp_die( esc_html__( 'Publish the template before making it the default.', 'burn-events' ), '', [ 'response' => 400, 'back_link' => true ] ); + } + update_option( self::DEFAULT_OPTION, $id, false ); + wp_safe_redirect( self::list_url() ); + exit; + } + + public static function create_starter(): void { + if ( ! current_user_can( self::CAPABILITY ) || ! self::is_elementor_ready() ) { + wp_die( esc_html__( 'You cannot create an Elementor event template.', 'burn-events' ), '', [ 'response' => 403 ] ); + } + check_admin_referer( 'burn_events_create_starter' ); + $id = wp_insert_post( + [ + 'post_type' => self::POST_TYPE, + 'post_title' => __( 'Single Event', 'burn-events' ), + 'post_status' => 'draft', + ], + true + ); + if ( is_wp_error( $id ) ) { + wp_die( esc_html( $id->get_error_message() ), '', [ 'response' => 500, 'back_link' => true ] ); + } + $layout = require __DIR__ . '/starter-layout.php'; + update_post_meta( $id, Document::ELEMENTOR_DATA_META_KEY, wp_slash( wp_json_encode( $layout ) ) ); + $document = Elementor::instance()->documents->get( $id ); + $document->set_is_built_with_elementor( true ); + wp_safe_redirect( $document->get_edit_url() ); + exit; + } +} diff --git a/includes/class-transfer.php b/includes/class-transfer.php new file mode 100644 index 0000000..7726da6 --- /dev/null +++ b/includes/class-transfer.php @@ -0,0 +1,390 @@ + 'TEMPLATE', 'text' => get_the_title( $event ), 'dates' => $start . '/' . $end, + 'details' => Events::event_url( $row ), 'location' => $data['location'], + ], 'https://calendar.google.com/calendar/render' ); + } + + public static function download_ics(): void { + if ( '1' !== Calendar::request( 'be_ical' ) ) { + return; + } + if ( is_singular( Events::EVENT ) ) { + $event = get_queried_object(); + $row = 'publish' === $event->post_status && '' === $event->post_password ? Events::occurrence( $event->ID, Calendar::request( 'be_occ' ) ) : null; + $rows = $row ? [ $row ] : []; + } elseif ( is_post_type_archive( Events::EVENT ) ) { + $rows = Events::query( [ 'from' => gmdate( 'Y-m-d H:i:s' ), 'limit' => 1000 ] ); + } else { + return; + } + nocache_headers(); + header( 'Content-Type: text/calendar; charset=utf-8' ); + header( 'Content-Disposition: attachment; filename="eventlabs.ics"' ); + echo "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//hostLabs//eventLabs//EN\r\nCALSCALE:GREGORIAN\r\n"; + $site = wp_parse_url( home_url(), PHP_URL_HOST ); + foreach ( $rows as $row ) { + $id = (int) $row['event_id']; + $data = Events::event_data( $id ); + [ $start, $end, $all_day ] = self::ics_dates( $row, $data ); + $location = $data['location']; + $venue = Events::locations( $data['venue'], Events::VENUE )[0] ?? null; + if ( $venue ) { + $location = get_the_title( $venue ); + } + $lines = [ + 'BEGIN:VEVENT', + 'UID:' . $id . '-' . strtotime( $row['starts_at'] . ' UTC' ) . '@' . $site, + 'DTSTAMP:' . gmdate( 'Ymd\THis\Z' ), + 'DTSTART' . ( $all_day ? ';VALUE=DATE:' : ':' ) . $start, + 'DTEND' . ( $all_day ? ';VALUE=DATE:' : ':' ) . $end, + 'SUMMARY:' . self::ics_text( get_the_title( $id ) ), + 'DESCRIPTION:' . self::ics_text( wp_strip_all_tags( strip_shortcodes( get_post_field( 'post_content', $id ) ) ) ), + 'LOCATION:' . self::ics_text( $location ), + 'URL:' . esc_url_raw( Events::event_url( $row ) ), + 'STATUS:' . ( [ 'cancelled' => 'CANCELLED', 'postponed' => 'TENTATIVE' ][ $data['status'] ] ?? 'CONFIRMED' ), + 'END:VEVENT', + ]; + foreach ( $lines as $line ) { + echo self::fold( $line ) . "\r\n"; + } + } + echo "END:VCALENDAR\r\n"; + exit; + } + + private static function ics_dates( array $row, array $data ): array { + $all_day = ! empty( $data['schedule']['all_day'] ); + if ( $all_day ) { + $zone = $data['schedule']['timezone']; + return [ Events::local_time( $row['starts_at'], $zone )->format( 'Ymd' ), Events::local_time( $row['ends_at'], $zone )->format( 'Ymd' ), true ]; + } + return [ gmdate( 'Ymd\THis\Z', strtotime( $row['starts_at'] . ' UTC' ) ), gmdate( 'Ymd\THis\Z', strtotime( $row['ends_at'] . ' UTC' ) ), false ]; + } + + private static function ics_text( string $value ): string { + return str_replace( [ '\\', "\r\n", "\r", "\n", ';', ',' ], [ '\\\\', '\\n', '\\n', '\\n', '\\;', '\\,' ], $value ); + } + + private static function fold( string $line ): string { + $parts = []; + while ( strlen( $line ) > 75 ) { + $bytes = 75; + while ( ( ord( $line[ $bytes ] ) & 0xc0 ) === 0x80 ) { + $bytes--; + } + $parts[] = substr( $line, 0, $bytes ); + $line = ' ' . substr( $line, $bytes ); + } + $parts[] = $line; + return implode( "\r\n", $parts ); + } + + private static function admin_url(): string { + return admin_url( 'edit.php?post_type=burn_event&page=burn-events-transfer' ); + } + + public static function admin_page(): void { + $result = get_transient( 'burn_events_import_' . get_current_user_id() ); + delete_transient( 'burn_events_import_' . get_current_user_id() ); + ?> +
    +

    + +
    +

    +
    +
    + + +

    +

    +

    +
    + + + + +
    +

    +

    +
    + 403 ] ); + } + check_admin_referer( $action ); + } + + public static function export_csv(): void { + self::authorize( 'burn_events_export' ); + nocache_headers(); + header( 'Content-Type: text/csv; charset=utf-8' ); + header( 'Content-Disposition: attachment; filename="eventlabs.csv"' ); + $output = fopen( 'php://output', 'w' ); + fputcsv( $output, self::CSV_COLUMNS, ',', '"', '' ); + for ( $page = 1; ; $page++ ) { + $posts = get_posts( [ + 'post_type' => Events::EVENT, 'post_status' => [ 'publish', 'private', 'draft', 'pending', 'future' ], + 'posts_per_page' => 100, 'paged' => $page, 'orderby' => 'ID', 'order' => 'ASC', + ] ); + foreach ( $posts as $post ) { + $data = Events::event_data( $post->ID ); + $category = wp_get_post_terms( $post->ID, Events::CATEGORY, [ 'fields' => 'names' ] ); + $tags = wp_get_post_terms( $post->ID, 'post_tag', [ 'fields' => 'names' ] ); + $row = [ + 'source_id' => get_post_meta( $post->ID, '_burn_import_id', true ) ?: home_url( '/' ) . '#event-' . $post->ID, + 'title' => $post->post_title, 'description' => $post->post_content, + 'categories' => is_array( $category ) ? implode( '|', $category ) : '', + 'tags' => is_array( $tags ) ? implode( '|', $tags ) : '', + 'venues' => self::titles( $data['venue'], Events::VENUE ), + 'organizers' => self::titles( $data['organizer'], Events::ORGANIZER ), + 'series' => self::titles( $data['series'], Events::SERIES ), + 'fields' => wp_json_encode( $data['fields'] ), + ] + $data['schedule'] + $data; + $values = []; + foreach ( self::CSV_COLUMNS as $column ) { + $value = $row[ $column ] ?? ''; + $text = is_array( $value ) ? implode( ',', $value ) : (string) $value; + $values[] = preg_match( '/^[\t\r\n ]*[=+@-]/', $text ) ? "'" . $text : $text; + } + fputcsv( $output, $values, ',', '"', '' ); + } + if ( count( $posts ) < 100 ) { + break; + } + } + fclose( $output ); + exit; + } + + private static function titles( array $ids, string $type ): string { + return implode( '|', array_map( 'get_the_title', Events::locations( $ids, $type ) ) ); + } + + public static function import(): void { + self::authorize( 'burn_events_import' ); + $file = $_FILES['calendar_file'] ?? null; + $result = [ 'imported' => 0, 'skipped' => 0, 'errors' => [] ]; + try { + if ( ! is_array( $file ) || UPLOAD_ERR_OK !== $file['error'] || ! is_uploaded_file( $file['tmp_name'] ) || $file['size'] > min( wp_max_upload_size(), 5 * MB_IN_BYTES ) ) { + throw new InvalidArgumentException( __( 'Choose a CSV or iCalendar file up to 5 MB.', 'burn-events' ) ); + } + $extension = strtolower( pathinfo( $file['name'], PATHINFO_EXTENSION ) ); + if ( ! in_array( $extension, [ 'csv', 'ics' ], true ) ) { + throw new InvalidArgumentException( __( 'Choose a .csv or .ics file.', 'burn-events' ) ); + } + $rows = 'csv' === $extension ? self::csv_rows( $file['tmp_name'] ) : self::ics_rows( $file['tmp_name'] ); + foreach ( $rows as $line => $row ) { + try { + if ( $row instanceof \Throwable ) { + throw $row; + } + $status = self::import_row( $row ); + $result[ $status ]++; + } catch ( \Throwable $error ) { + $result['errors'][] = sprintf( __( 'Entry %1$d: %2$s', 'burn-events' ), $line, $error->getMessage() ); + } + } + } catch ( \Throwable $error ) { + $result['errors'][] = $error->getMessage(); + } + set_transient( 'burn_events_import_' . get_current_user_id(), $result, MINUTE_IN_SECONDS ); + wp_safe_redirect( self::admin_url(), 303 ); + exit; + } + + private static function csv_rows( string $path ): \Generator { + $input = fopen( $path, 'r' ); + if ( ! $input ) { + throw new InvalidArgumentException( __( 'The CSV could not be read.', 'burn-events' ) ); + } + try { + $header = fgetcsv( $input, 0, ',', '"', '' ) ?: []; + $header = array_map( static fn( $column ): string => sanitize_key( trim( (string) $column ) ), $header ); + if ( ! in_array( 'title', $header, true ) || ! in_array( 'start_date', $header, true ) ) { + throw new InvalidArgumentException( __( 'The CSV needs title and start_date column headers.', 'burn-events' ) ); + } + for ( $line = 2; false !== ( $cells = fgetcsv( $input, 0, ',', '"', '' ) ); $line++ ) { + if ( [ null ] === $cells ) { + continue; + } + if ( count( $cells ) !== count( $header ) ) { + yield $line => new InvalidArgumentException( __( 'This row has a different number of columns than the header.', 'burn-events' ) ); + continue; + } + $cells = array_map( static fn( $text ): string => (string) preg_replace( '/^\x27(?=[\t\r\n ]*[=+@-])/', '', (string) $text ), $cells ); + yield $line => array_combine( $header, $cells ); + } + } finally { + fclose( $input ); + } + } + + private static function ics_rows( string $path ): \Generator { + $content = file_get_contents( $path ); + if ( ! is_string( $content ) || ! str_contains( $content, 'BEGIN:VCALENDAR' ) ) { + throw new InvalidArgumentException( __( 'This is not a readable iCalendar file.', 'burn-events' ) ); + } + $content = preg_replace( '/\r?\n[ \t]/', '', $content ); + preg_match_all( '/^BEGIN:VEVENT\r?\n(.*?)^END:VEVENT\r?$/ms', $content, $matches ); + foreach ( $matches[1] as $index => $entry ) { + try { + yield $index + 1 => self::ics_entry( $entry ); + } catch ( \Throwable $error ) { + yield $index + 1 => $error; + } + } + } + + private static function ics_entry( string $entry ): array { + $fields = []; + foreach ( preg_split( '/\R/', $entry ) as $line ) { + [ $key, $value ] = array_pad( explode( ':', $line, 2 ), 2, '' ); + [ $name, $parameter ] = array_pad( explode( ';', $key, 2 ), 2, '' ); + $fields[ $name ][] = [ $parameter, $value ]; + } + $start = self::ics_parse_date( $fields['DTSTART'][0] ?? [ '', '' ], Admin::options()['timezone'] ); + $all_day = strlen( $fields['DTSTART'][0][1] ) === 8; + $end = isset( $fields['DTEND'][0] ) ? self::ics_parse_date( $fields['DTEND'][0], $start->getTimezone()->getName() )->setTimezone( $start->getTimezone() ) : $start->modify( $all_day ? '+1 day' : '+1 hour' ); + if ( $all_day ) { + $end = $end->modify( '-1 day' ); + } + $unescape = static fn( string $text ): string => strtr( $text, [ '\\n' => "\n", '\\N' => "\n", '\\,' => ',', '\\;' => ';', '\\\\' => '\\' ] ); + $row = [ + 'source_id' => $fields['UID'][0][1] ?? '', + 'title' => $unescape( $fields['SUMMARY'][0][1] ?? '' ), + 'description' => $unescape( $fields['DESCRIPTION'][0][1] ?? '' ), + 'location' => $unescape( $fields['LOCATION'][0][1] ?? '' ), + 'url' => $fields['URL'][0][1] ?? '', + 'status' => 'CANCELLED' === ( $fields['STATUS'][0][1] ?? '' ) ? 'cancelled' : 'scheduled', + 'start_date' => $start->format( 'Y-m-d' ), 'start_time' => $start->format( 'H:i' ), + 'end_date' => $end->format( 'Y-m-d' ), 'end_time' => $end->format( 'H:i' ), + 'timezone' => $start->getTimezone()->getName(), 'all_day' => $all_day, + ]; + if ( isset( $fields['RRULE'][0] ) ) { + $rule = []; + foreach ( explode( ';', $fields['RRULE'][0][1] ) as $part ) { + [ $key, $value ] = array_pad( explode( '=', $part, 2 ), 2, '' ); + $rule[ $key ] = $value; + } + $freq = strtolower( $rule['FREQ'] ?? '' ); + if ( ! in_array( $freq, Schedule::REPEATS, true ) || array_diff( array_keys( $rule ), [ 'FREQ', 'INTERVAL', 'COUNT', 'UNTIL', 'BYDAY' ] ) || ( isset( $rule['BYDAY'] ) && 'weekly' !== $freq ) ) { + throw new InvalidArgumentException( __( 'This recurrence rule requires manual review.', 'burn-events' ) ); + } + $days = [ 'MO' => 1, 'TU' => 2, 'WE' => 3, 'TH' => 4, 'FR' => 5, 'SA' => 6, 'SU' => 7 ]; + $row['repeat'] = $freq; + $row['interval'] = $rule['INTERVAL'] ?? '1'; + $row['count'] = $rule['COUNT'] ?? '0'; + $row['weekdays'] = implode( ',', array_values( array_intersect_key( $days, array_flip( explode( ',', $rule['BYDAY'] ?? '' ) ) ) ) ); + $row['until'] = isset( $rule['UNTIL'] ) ? self::ics_parse_date( [ '', $rule['UNTIL'] ], $row['timezone'] )->setTimezone( $start->getTimezone() )->format( 'Y-m-d' ) : ''; + } + foreach ( [ 'EXDATE' => 'exclude', 'RDATE' => 'include' ] as $name => $key ) { + $dates = []; + foreach ( $fields[ $name ] ?? [] as [ $parameters, $values ] ) { + foreach ( explode( ',', $values ) as $value ) { + $dates[] = self::ics_parse_date( [ $parameters, $value ], $row['timezone'] )->setTimezone( $start->getTimezone() )->format( 'Y-m-d' ); + } + } + $row[ $key ] = implode( ',', $dates ); + } + return $row; + } + + private static function ics_parse_date( array $pair, string $fallback ): DateTimeImmutable { + [ $parameters, $value ] = $pair; + preg_match( '/(?:^|;)TZID=([^;]+)/', $parameters, $match ); + $zone = new DateTimeZone( str_ends_with( $value, 'Z' ) ? 'UTC' : ( $match[1] ?? $fallback ) ); + $format = 8 === strlen( $value ) ? 'Ymd' : 'Ymd\THis'; + $value = rtrim( $value, 'Z' ); + $date = DateTimeImmutable::createFromFormat( '!' . $format, $value, $zone ); + if ( ! $date || $date->format( $format ) !== $value ) { + throw new InvalidArgumentException( __( 'The event contains an invalid iCalendar date.', 'burn-events' ) ); + } + return $date; + } + + private static function import_row( array $row ): string { + $title = sanitize_text_field( $row['title'] ?? '' ); + if ( '' === $title ) { + throw new InvalidArgumentException( __( 'The event title is missing.', 'burn-events' ) ); + } + $source = sanitize_text_field( $row['source_id'] ?? '' ); + if ( $source && get_posts( [ + 'post_type' => Events::EVENT, 'post_status' => 'any', 'fields' => 'ids', 'posts_per_page' => 1, + 'meta_key' => '_burn_import_id', 'meta_value' => $source, + ] ) ) { + return 'skipped'; + } + $relations = [ 'venues' => 'venue', 'organizers' => 'organizer', 'series' => 'series' ]; + foreach ( $relations as $column => $key ) { + $ids = []; + foreach ( array_filter( array_map( 'trim', explode( '|', $row[ $column ] ?? '' ) ) ) as $name ) { + $found = get_posts( [ 'post_type' => Events::RELATIONS[ $key ], 'post_status' => 'publish', 'title' => $name, 'fields' => 'ids', 'posts_per_page' => 1 ] ); + if ( $found ) { + $ids[] = $found[0]; + } + } + $row[ $key ] = $ids; + } + $row['weekdays'] = explode( ',', $row['weekdays'] ?? '' ); + $row['fields'] = (array) json_decode( $row['fields'] ?? '{}', true ); + $event = Events::validate_event( $row ); + $id = wp_insert_post( wp_slash( [ + 'post_type' => Events::EVENT, 'post_status' => 'draft', 'post_title' => $title, + 'post_content' => wp_kses_post( $row['description'] ?? '' ), 'comment_status' => 'closed', + ] ), true ); + if ( is_wp_error( $id ) ) { + throw new InvalidArgumentException( $id->get_error_message() ); + } + try { + Events::save( $id, $event ); + if ( $source ) { + update_post_meta( $id, '_burn_import_id', $source ); + } + foreach ( [ 'categories' => Events::CATEGORY, 'tags' => 'post_tag' ] as $column => $taxonomy ) { + $names = array_values( array_filter( array_map( 'sanitize_text_field', explode( '|', $row[ $column ] ?? '' ) ) ) ); + wp_set_object_terms( $id, $names, $taxonomy ); + } + } catch ( \Throwable $error ) { + wp_trash_post( $id ); + throw $error; + } + return 'imported'; + } +} diff --git a/includes/starter-layout.php b/includes/starter-layout.php new file mode 100644 index 0000000..f549022 --- /dev/null +++ b/includes/starter-layout.php @@ -0,0 +1,47 @@ + Elementor\Utils::generate_random_string(), + 'elType' => 'widget', 'widgetType' => $name, + 'settings' => $settings, 'elements' => [], + ]; +}; + +$field = static fn( string $key ): array => $widget( 'burn-events-field', [ 'field' => $key ] ); +$event = static fn( string $key ): array => $widget( 'burn-events-event-' . $key ); + +$container = static function ( string $class, array $children, bool $inner = true ): array { + return [ + 'id' => Elementor\Utils::generate_random_string(), 'elType' => 'container', 'isInner' => $inner, + 'settings' => [ 'content_width' => 'full', 'css_classes' => $class ], 'elements' => $children, + ]; +}; + +return [ + $container( 'be-starter be-single-layout', [ + $container( 'be-layout-nav', [ $field( 'back' ), $field( 'terms' ) ] ), + $container( 'be-layout-hero', [ + $container( 'be-layout-title', [ $event( 'title' ), $event( 'schedule' ), $field( 'status' ) ] ), + $container( 'be-layout-photo', [ $event( 'image' ) ] ), + ] ), + $container( 'be-layout-body', [ + $container( 'be-layout-reading', [ + $container( 'be-layout-overview', [ + $widget( 'heading', [ 'title' => __( 'About the event', 'burn-events' ), 'header_size' => 'h2' ] ), + $event( 'description' ), $field( 'fields' ), + ] ), + $container( 'be-layout-calendar', [ + $widget( 'heading', [ 'title' => __( 'Add to calendar', 'burn-events' ), 'header_size' => 'h2' ] ), + $event( 'export' ), + ] ), + ] ), + $container( 'be-layout-details', [ + $event( 'cost' ), $event( 'venue' ), $event( 'organizer' ), $field( 'series' ), $field( 'website' ), + ] ), + ] ), + $event( 'related' ), + ], false ), +]; diff --git a/templates/front.php b/templates/front.php new file mode 100644 index 0000000..c838d0c --- /dev/null +++ b/templates/front.php @@ -0,0 +1,49 @@ + + +> + + + + + +> + +
    + + +
    + + +
    + +
    + + + +