{"version":3,"file":"application-BoNxaAcR.js","sources":["../../../node_modules/colcade/colcade.js","../../../app/frontend/js/formatters.ts","../../../app/frontend/controllers/public/event_occurrences/createVerticalEventOccurrenceElement.ts","../../../app/frontend/controllers/public/event_occurrences/grid_controller.ts","../../../app/frontend/controllers/public/event_occurrences/menu_controller.ts","../../../app/frontend/controllers/public/event_occurrence_filter.ts","../../../app/frontend/controllers/public/event_occurrences/modal_filter_controller.ts","../../../app/frontend/controllers/public/event_occurrences/sidebar_filter_controller.ts","../../../app/frontend/controllers/public/map/menu_controller.ts","../../../app/frontend/controllers/public/map/modal_event_occurrences_controller.ts","../../../app/frontend/controllers/public/map/modal_filter_controller.ts","../../../app/frontend/controllers/public/map/sidebar_filter_controller.ts","../../../app/frontend/js/constants.ts","../../../app/frontend/controllers/event_map_controller.ts","../../../node_modules/canvas2svg/canvas2svg.js","../../../app/frontend/js/icon-drawer.ts","../../../app/frontend/js/wkt-utils.ts","../../../app/frontend/controllers/public/map/createHorizontalEventOccurrenceElement.ts","../../../app/frontend/controllers/events_map_controller.ts","../../../app/frontend/controllers/filter_form_controller.ts","../../../app/frontend/js/soft-design-system-pro/soft-design-system-pro.js","../../../app/frontend/entrypoints/application.ts"],"sourcesContent":["/*!\n * Colcade v0.2.0\n * Lightweight masonry layout\n * by David DeSandro\n * MIT license\n */\n\n/*jshint browser: true, undef: true, unused: true */\n\n( function( window, factory ) {\n // universal module definition\n /*jshint strict: false */\n /*global define: false, module: false */\n if ( typeof define == 'function' && define.amd ) {\n // AMD\n define( factory );\n } else if ( typeof module == 'object' && module.exports ) {\n // CommonJS\n module.exports = factory();\n } else {\n // browser global\n window.Colcade = factory();\n }\n\n}( window, function factory() {\n\n// -------------------------- Colcade -------------------------- //\n\nfunction Colcade( element, options ) {\n element = getQueryElement( element );\n\n // do not initialize twice on same element\n if ( element && element.colcadeGUID ) {\n var instance = instances[ element.colcadeGUID ];\n instance.option( options );\n return instance;\n }\n\n this.element = element;\n // options\n this.options = {};\n this.option( options );\n // kick things off\n this.create();\n}\n\nvar proto = Colcade.prototype;\n\nproto.option = function( options ) {\n this.options = extend( this.options, options );\n};\n\n// globally unique identifiers\nvar GUID = 0;\n// internal store of all Colcade intances\nvar instances = {};\n\nproto.create = function() {\n this.errorCheck();\n // add guid for Colcade.data\n var guid = this.guid = ++GUID;\n this.element.colcadeGUID = guid;\n instances[ guid ] = this; // associate via id\n // update initial properties & layout\n this.reload();\n // events\n this._windowResizeHandler = this.onWindowResize.bind( this );\n this._loadHandler = this.onLoad.bind( this );\n window.addEventListener( 'resize', this._windowResizeHandler );\n this.element.addEventListener( 'load', this._loadHandler, true );\n};\n\nproto.errorCheck = function() {\n var errors = [];\n if ( !this.element ) {\n errors.push( 'Bad element: ' + this.element );\n }\n if ( !this.options.columns ) {\n errors.push( 'columns option required: ' + this.options.columns );\n }\n if ( !this.options.items ) {\n errors.push( 'items option required: ' + this.options.items );\n }\n\n if ( errors.length ) {\n throw new Error( '[Colcade error] ' + errors.join('. ') );\n }\n};\n\n// update properties and do layout\nproto.reload = function() {\n this.updateColumns();\n this.updateItems();\n this.layout();\n};\n\nproto.updateColumns = function() {\n this.columns = querySelect( this.options.columns, this.element );\n};\n\nproto.updateItems = function() {\n this.items = querySelect( this.options.items, this.element );\n};\n\nproto.getActiveColumns = function() {\n return this.columns.filter( function( column ) {\n var style = getComputedStyle( column );\n return style.display != 'none';\n });\n};\n\n// ----- layout ----- //\n\n// public, updates activeColumns\nproto.layout = function() {\n this.activeColumns = this.getActiveColumns();\n this._layout();\n};\n\n// private, does not update activeColumns\nproto._layout = function() {\n // reset column heights\n this.columnHeights = this.activeColumns.map( function() {\n return 0;\n });\n // layout all items\n this.layoutItems( this.items );\n};\n\nproto.layoutItems = function( items ) {\n items.forEach( this.layoutItem, this );\n};\n\nproto.layoutItem = function( item ) {\n // layout item by appending to column\n var minHeight = Math.min.apply( Math, this.columnHeights );\n var index = this.columnHeights.indexOf( minHeight );\n this.activeColumns[ index ].appendChild( item );\n // at least 1px, if item hasn't loaded\n // Not exactly accurate, but it's cool\n this.columnHeights[ index ] += item.offsetHeight || 1;\n};\n\n// ----- adding items ----- //\n\nproto.append = function( elems ) {\n var items = this.getQueryItems( elems );\n // add items to collection\n this.items = this.items.concat( items );\n // lay them out\n this.layoutItems( items );\n};\n\nproto.prepend = function( elems ) {\n var items = this.getQueryItems( elems );\n // add items to collection\n this.items = items.concat( this.items );\n // lay out everything\n this._layout();\n};\n\nproto.getQueryItems = function( elems ) {\n elems = makeArray( elems );\n var fragment = document.createDocumentFragment();\n elems.forEach( function( elem ) {\n fragment.appendChild( elem );\n });\n return querySelect( this.options.items, fragment );\n};\n\n// ----- measure column height ----- //\n\nproto.measureColumnHeight = function( elem ) {\n var boundingRect = this.element.getBoundingClientRect();\n this.activeColumns.forEach( function( column, i ) {\n // if elem, measure only that column\n // if no elem, measure all columns\n if ( !elem || column.contains( elem ) ) {\n var lastChildRect = column.lastElementChild.getBoundingClientRect();\n // not an exact calculation as it includes top border, and excludes item bottom margin\n this.columnHeights[ i ] = lastChildRect.bottom - boundingRect.top;\n }\n }, this );\n};\n\n// ----- events ----- //\n\nproto.onWindowResize = function() {\n clearTimeout( this.resizeTimeout );\n this.resizeTimeout = setTimeout( function() {\n this.onDebouncedResize();\n }.bind( this ), 100 );\n};\n\nproto.onDebouncedResize = function() {\n var activeColumns = this.getActiveColumns();\n // check if columns changed\n var isSameLength = activeColumns.length == this.activeColumns.length;\n var isSameColumns = true;\n this.activeColumns.forEach( function( column, i ) {\n isSameColumns = isSameColumns && column == activeColumns[i];\n });\n if ( isSameLength && isSameColumns ) {\n return;\n }\n // activeColumns changed\n this.activeColumns = activeColumns;\n this._layout();\n};\n\nproto.onLoad = function( event ) {\n this.measureColumnHeight( event.target );\n};\n\n// ----- destroy ----- //\n\nproto.destroy = function() {\n // move items back to container\n this.items.forEach( function( item ) {\n this.element.appendChild( item );\n }, this );\n // remove events\n window.removeEventListener( 'resize', this._windowResizeHandler );\n this.element.removeEventListener( 'load', this._loadHandler, true );\n // remove data\n delete this.element.colcadeGUID;\n delete instances[ this.guid ];\n};\n\n// -------------------------- HTML init -------------------------- //\n\ndocReady( function() {\n var dataElems = querySelect('[data-colcade]');\n dataElems.forEach( htmlInit );\n});\n\nfunction htmlInit( elem ) {\n // convert attribute \"foo: bar, qux: baz\" into object\n var attr = elem.getAttribute('data-colcade');\n var attrParts = attr.split(',');\n var options = {};\n attrParts.forEach( function( part ) {\n var pair = part.split(':');\n var key = pair[0].trim();\n var value = pair[1].trim();\n options[ key ] = value;\n });\n\n new Colcade( elem, options );\n}\n\nColcade.data = function( elem ) {\n elem = getQueryElement( elem );\n var id = elem && elem.colcadeGUID;\n return id && instances[ id ];\n};\n\n// -------------------------- jQuery -------------------------- //\n\nColcade.makeJQueryPlugin = function( $ ) {\n $ = $ || window.jQuery;\n if ( !$ ) {\n return;\n }\n\n $.fn.colcade = function( arg0 /*, arg1 */) {\n // method call $().colcade( 'method', { options } )\n if ( typeof arg0 == 'string' ) {\n // shift arguments by 1\n var args = Array.prototype.slice.call( arguments, 1 );\n return methodCall( this, arg0, args );\n }\n // just $().colcade({ options })\n plainCall( this, arg0 );\n return this;\n };\n\n function methodCall( $elems, methodName, args ) {\n var returnValue;\n $elems.each( function( i, elem ) {\n // get instance\n var colcade = $.data( elem, 'colcade' );\n if ( !colcade ) {\n return;\n }\n // apply method, get return value\n var value = colcade[ methodName ].apply( colcade, args );\n // set return value if value is returned, use only first value\n returnValue = returnValue === undefined ? value : returnValue;\n });\n return returnValue !== undefined ? returnValue : $elems;\n }\n\n function plainCall( $elems, options ) {\n $elems.each( function( i, elem ) {\n var colcade = $.data( elem, 'colcade' );\n if ( colcade ) {\n // set options & init\n colcade.option( options );\n colcade.layout();\n } else {\n // initialize new instance\n colcade = new Colcade( elem, options );\n $.data( elem, 'colcade', colcade );\n }\n });\n }\n};\n\n// try making plugin\nColcade.makeJQueryPlugin();\n\n// -------------------------- utils -------------------------- //\n\nfunction extend( a, b ) {\n for ( var prop in b ) {\n a[ prop ] = b[ prop ];\n }\n return a;\n}\n\n// turn element or nodeList into an array\nfunction makeArray( obj ) {\n var ary = [];\n if ( Array.isArray( obj ) ) {\n // use object if already an array\n ary = obj;\n } else if ( obj && typeof obj.length == 'number' ) {\n // convert nodeList to array\n for ( var i=0; i < obj.length; i++ ) {\n ary.push( obj[i] );\n }\n } else {\n // array of single index\n ary.push( obj );\n }\n return ary;\n}\n\n// get array of elements\nfunction querySelect( selector, elem ) {\n elem = elem || document;\n var elems = elem.querySelectorAll( selector );\n return makeArray( elems );\n}\n\nfunction getQueryElement( elem ) {\n if ( typeof elem == 'string' ) {\n elem = document.querySelector( elem );\n }\n return elem;\n}\n\nfunction docReady( onReady ) {\n if ( document.readyState == 'complete' ) {\n onReady();\n return;\n }\n document.addEventListener( 'DOMContentLoaded', onReady );\n}\n\n// -------------------------- end -------------------------- //\n\nreturn Colcade;\n\n}));\n","import moment from 'moment';\n\nexport const formatEventOccurrenceDate = (date: string) => {\n return moment.utc(date).format('ddd. DD/MM');\n}\n\nexport const formatEventOccurrenceTime = (startTime: string | null, endTime: string | null) => {\n const formattedStartTime = startTime ? moment.utc(startTime).format('LT') : null;\n const formattedEndTime = endTime ? moment.utc(endTime).format('LT') : null;\n\n if (formattedEndTime)\n return `${formattedStartTime} - ${formattedEndTime}`;\n else if (formattedStartTime)\n return formattedStartTime;\n\n return null;\n}\n\nexport const formatMoney = (amount: number) => {\n if (!amount) return null;\n\n return Math.round(amount).toLocaleString() + '₽';\n}\n\nexport const formatPhoneNumber = (num: string | null | undefined): string => {\n if (!num) {\n return \"\";\n }\n\n // Remove all non-digit characters\n const digits = num.replace(/\\D/g, \"\");\n\n // Validate that the number has exactly 11 digits and starts with '7' or '8'\n if (digits.length === 11 && ['7', '8'].includes(digits[0])) {\n // Extract parts of the number\n const countryCode = digits[0];\n const areaCode = digits.substring(1, 4);\n const firstTwo = digits.substring(4, 7);\n const nextTwo = digits.substring(7, 9);\n const lastTwo = digits.substring(9, 11);\n\n // Format the number\n return `+${countryCode} (${areaCode}) ${firstTwo}-${nextTwo}-${lastTwo}`;\n } else {\n // Return the original number if it doesn't match the expected format\n return num;\n }\n}","import {formatEventOccurrenceDate, formatEventOccurrenceTime, formatMoney} from \"../../../js/formatters\";\n\nexport const createVerticalEventOccurrenceElement = (json: any): HTMLElement | null => {\n const template = document.getElementById('vertical-event-occurrence-card-template') as HTMLTemplateElement;\n if (!template) {\n return null\n }\n\n const clone = template.content.cloneNode(true) as HTMLElement;\n\n if (json.event.thumb_urls?.length) {\n const headerImage = clone.querySelector('[data-header-image]');\n if (headerImage) headerImage.src = json.event.thumb_urls[0];\n } else {\n const headerImageContainer = clone.querySelector('[data-header-image-container]');\n if (headerImageContainer) headerImageContainer.remove();\n }\n\n const eventOccurrenceLink = clone.querySelector('[data-event-occurrence-path]');\n if (eventOccurrenceLink) eventOccurrenceLink.href += `/${json.event.id}?occurrence_id=${json.id}`;\n\n const occurrenceDatePlaceholder = clone.querySelector('[data-occurrence-date]');\n if (occurrenceDatePlaceholder) occurrenceDatePlaceholder.textContent = formatEventOccurrenceDate(json.occurrence_date);\n\n const organizerPlaceholder = clone.querySelector('[data-organizer]');\n if (organizerPlaceholder) organizerPlaceholder.textContent = [\n json.event.organizer?.last_name, json.event.organizer?.first_name, json.event.organizer?.middle_name\n ].filter(part => !!part).join(' ');\n\n const typeNamePlaceholder = clone.querySelector('[data-type-name]');\n if (typeNamePlaceholder) typeNamePlaceholder.textContent = json.event.event_type.name;\n\n const sportNamePlaceholder = clone.querySelector('[data-sport-name]');\n if (sportNamePlaceholder) sportNamePlaceholder.textContent = json.event.sport.name;\n\n const metroStationsPlaceholder = clone.querySelector('[data-metro-stations]');\n if (metroStationsPlaceholder) metroStationsPlaceholder.textContent = json.event.location?.metro_stations?.length ? `м. ${json.event.location.metro_stations}` : null;\n\n const participantsLevelsPlaceholder = clone.querySelector('[data-participants-levels]');\n if (participantsLevelsPlaceholder) participantsLevelsPlaceholder.textContent = json.event.participants_levels.map((pl: { name: string }) => pl.name).join(\"/\");\n\n const timePlaceholder = clone.querySelector('[data-time]');\n if (timePlaceholder) timePlaceholder.textContent = formatEventOccurrenceTime(json.event.start_time, json.event.end_time);\n\n const participantsTypesPlaceholder = clone.querySelector('[data-participants-types]');\n if (participantsTypesPlaceholder) participantsTypesPlaceholder.textContent = json.event.participants_type?.name\n\n const minCostPlaceholder = clone.querySelector('[data-min-cost]');\n if (minCostPlaceholder) minCostPlaceholder.textContent = formatMoney(json.event.min_cost);\n\n return clone;\n}","import {Controller} from \"@hotwired/stimulus\"\nimport Colcade from \"colcade\";\nimport {createVerticalEventOccurrenceElement} from \"./createVerticalEventOccurrenceElement\";\n\nexport default class extends Controller {\n\n static targets = [\"grid\", \"sentinel\"];\n declare readonly gridTarget: HTMLElement;\n declare readonly sentinelTarget: HTMLElement;\n private colcade: any | null = null;\n\n private currentPage = 1;\n private loading = false;\n private hasMore = true;\n\n private observer: IntersectionObserver | null = null;\n\n connect() {\n console.log('event occurrences grid connected');\n\n this.initializeColcade();\n this.initializeInfiniteScroll();\n }\n\n disconnect() {\n if (this.colcade) {\n this.colcade.destroy();\n }\n if (this.observer) {\n this.observer.disconnect(); // Clean up observer\n }\n }\n\n initializeColcade() {\n this.colcade = new Colcade(this.gridTarget, {\n columns: '.grid-col',\n items: '.grid-item'\n });\n }\n\n initializeInfiniteScroll() {\n // Disconnect previous observer if it exists\n if (this.observer) {\n this.observer.disconnect();\n }\n\n // Set up the IntersectionObserver on the sentinel element\n this.observer = new IntersectionObserver(entries => {\n entries.forEach(entry => {\n if (entry.isIntersecting && !this.loading && this.hasMore) {\n console.log('need load more')\n this.loadMoreItems().catch(console.error);\n }\n },\n {\n root: null,\n rootMargin: \"200px\",\n threshold: 0.1\n }\n );\n });\n this.observer.observe(this.sentinelTarget);\n }\n\n async loadMoreItems() {\n this.loading = true;\n this.currentPage += 1;\n\n const currentUrl = new URL(window.location.href);\n currentUrl.searchParams.set('page', this.currentPage.toString());\n const url = currentUrl.toString();\n\n try {\n const response = await fetch(url, {\n headers: {Accept: \"application/json\"}\n });\n\n if (!response.ok) {\n throw new Error(\"Network response was not ok\");\n }\n\n const json = await response.json();\n\n // Update hasMore based on the response\n if (json.length === 0) {\n this.hasMore = false;\n // Optional: you can remove the sentinel here if you want\n // this.sentinelTarget.remove();\n return;\n }\n\n const newGridItems = json.map((item: any) => createVerticalEventOccurrenceElement(item));\n this.colcade.append(newGridItems);\n\n this.initializeInfiniteScroll();\n } catch (error) {\n this.currentPage -= 1;\n console.error(\"Error loading more items:\", error);\n } finally {\n this.loading = false;\n }\n }\n}","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static targets = [\"menuList\"];\n\n declare readonly menuListTarget: HTMLElement\n\n connect() {\n console.log(\"Menu controller connected\");\n }\n\n activate(event: any) {\n event.preventDefault();\n // Remove active class from all links\n this.menuListTarget.querySelectorAll('.nav-link').forEach(link => {\n link.classList.remove('active');\n });\n // Add active class to the clicked link\n event.currentTarget.classList.add('active');\n }\n\n showFilters(event: any) {\n this.activate(event);\n\n const filterModal = document.getElementById('filterModal');\n if (filterModal) {\n const filterModalController = this.application.getControllerForElementAndIdentifier(filterModal, 'public--event-occurrences--modal-filter') as any;\n filterModalController.open();\n }\n }\n}\n","export interface EventOccurrenceFilter {\n checkboxes: { [name: string]: string[]; },\n inputs: { [name: string]: string; }\n}\n\nexport const emptyEventOccurrenceFilter = (): EventOccurrenceFilter => {\n return {\n checkboxes: {},\n inputs: {}\n }\n}","import {Controller} from \"@hotwired/stimulus\"\nimport * as bootstrap from \"bootstrap\";\nimport {Modal} from \"bootstrap\";\nimport {emptyEventOccurrenceFilter, EventOccurrenceFilter} from \"../event_occurrence_filter\";\n\nexport default class extends Controller {\n static targets = [\"form\", \"checkbox\", \"input\"];\n\n declare readonly formTarget: HTMLFormElement;\n declare readonly checkboxTargets: HTMLInputElement[];\n declare readonly inputTargets: HTMLInputElement[];\n\n private modalElement: Modal | null = null;\n\n private initialState = emptyEventOccurrenceFilter();\n\n connect() {\n console.log('Filter modal controller connected');\n this.modalElement = new bootstrap.Modal(\n this.element, {\n backdrop: 'static',\n keyboard: false\n });\n\n this.element.addEventListener('hidePrevented.bs.modal', this.close.bind(this));\n document.addEventListener(\"map-sidebar-filter-changed\", this.syncState as EventListener);\n }\n\n disconnect() {\n this.modalElement?.dispose();\n }\n\n open() {\n this.initialState = this.buildState();\n\n console.log(`Initial state: ${JSON.stringify(this.initialState)}`);\n\n this.modalElement?.show();\n }\n\n close() {\n this.modalElement?.hide();\n this.applyState(this.initialState);\n }\n\n apply() {\n const filterValues = emptyEventOccurrenceFilter();\n\n this.checkboxTargets.filter(checkbox => checkbox.checked).map(checkbox => {\n if (!filterValues.checkboxes[checkbox.name]) {\n filterValues.checkboxes[checkbox.name] = [];\n }\n\n (filterValues.checkboxes[checkbox.name]).push(checkbox.value);\n });\n\n this.inputTargets.filter(input => input.value).map(input => {\n filterValues.inputs[input.name] = input.value;\n });\n\n this.element.dispatchEvent(\n new CustomEvent(\"event-occurrences-modal-filter-changed\", {detail: filterValues, bubbles: true})\n );\n\n this.formTarget.requestSubmit();\n }\n\n private buildState = (): EventOccurrenceFilter => {\n const state = emptyEventOccurrenceFilter();\n\n this.checkboxTargets.filter(checkbox => checkbox.checked).map(checkbox => {\n if (!state.checkboxes[checkbox.name]) {\n state.checkboxes[checkbox.name] = [];\n }\n\n (state.checkboxes[checkbox.name]).push(checkbox.value);\n });\n\n this.inputTargets.filter(input => input.value).map(input => {\n state.inputs[input.name] = input.value;\n });\n\n return state;\n }\n\n private applyState = (state: EventOccurrenceFilter): void => {\n this.checkboxTargets.forEach(checkbox => {\n checkbox.checked = !!state.checkboxes[checkbox.name]?.includes(checkbox.value);\n });\n\n this.inputTargets.forEach(input => {\n input.value = state.inputs[input.name] || \"\";\n });\n }\n\n syncState = (\n event: CustomEvent\n ): void => {\n console.log('Modal: sync sidebar state');\n\n this.applyState(event.detail);\n }\n}","import { Controller } from \"@hotwired/stimulus\"\n\n// Define the FilterFormController class\nexport default class extends Controller {\n static targets = [\"checkbox\", \"input\"]\n\n declare readonly checkboxTargets: HTMLInputElement[]\n declare readonly inputTargets: HTMLInputElement[]\n\n // Debounce timeout identifier\n debounceTimeout: number | null = null\n\n // Debounce delay in milliseconds\n debounceDelay: number = 300\n\n connect(): void {\n this.initializeCheckboxListeners()\n }\n\n initializeCheckboxListeners(): void {\n this.checkboxTargets.forEach((checkbox) => {\n checkbox.addEventListener(\"change\", this.debouncedSubmitForm.bind(this))\n });\n\n this.inputTargets.forEach((input) => {\n input.addEventListener(\"change\", this.debouncedSubmitForm.bind(this))\n });\n }\n\n debouncedSubmitForm(): void {\n console.log('submit should be called');\n\n if (this.debounceTimeout) {\n clearTimeout(this.debounceTimeout)\n }\n this.debounceTimeout = window.setTimeout(() => {\n this.submitForm()\n }, this.debounceDelay)\n }\n\n submitForm(): void {\n this.element.requestSubmit();\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static targets = [\"menuList\"];\n\n declare readonly menuListTarget: HTMLElement\n\n connect() {\n console.log(\"Menu controller connected\");\n }\n\n activate(event: any) {\n event.preventDefault();\n // Remove active class from all links\n this.menuListTarget.querySelectorAll('.nav-link').forEach(link => {\n link.classList.remove('active');\n });\n // Add active class to the clicked link\n event.currentTarget.classList.add('active');\n }\n\n showFilters(event: any) {\n this.activate(event);\n\n const filterModal = document.getElementById('filterModal');\n if (filterModal) {\n const filterModalController = this.application.getControllerForElementAndIdentifier(filterModal, 'public--map--modal-filter') as any;\n filterModalController.open();\n }\n }\n}\n","import {Controller} from \"@hotwired/stimulus\"\nimport * as bootstrap from \"bootstrap\";\nimport {Modal} from \"bootstrap\";\n\nexport default class extends Controller {\n private modalElement: Modal | null = null;\n\n connect() {\n console.log('Modal content controller connected');\n this.modalElement = new bootstrap.Modal(\n this.element, {\n backdrop: 'static',\n keyboard: false\n });\n\n this.element.addEventListener('hidePrevented.bs.modal', this.close.bind(this));\n }\n\n disconnect() {\n this.modalElement?.dispose();\n }\n\n open() {\n // event.preventDefault();\n this.modalElement?.show();\n }\n\n close() {\n this.modalElement?.hide();\n }\n}","import {Controller} from \"@hotwired/stimulus\"\nimport * as bootstrap from \"bootstrap\";\nimport {Modal} from \"bootstrap\";\n\nexport default class extends Controller {\n static targets = [\"checkbox\", \"input\"];\n declare readonly checkboxTargets: HTMLInputElement[];\n declare readonly inputTargets: HTMLInputElement[];\n\n private modalElement: Modal | null = null;\n\n private initialState: {\n checkboxes: { [name: string]: string[]; },\n inputs: { [name: string]: string; }\n } = {\n checkboxes: {},\n inputs: {}\n };\n\n connect() {\n console.log('Filter modal controller connected');\n this.modalElement = new bootstrap.Modal(\n this.element, {\n backdrop: 'static',\n keyboard: false\n });\n\n this.element.addEventListener('hidePrevented.bs.modal', this.close.bind(this));\n document.addEventListener(\"map-sidebar-filter-changed\", this.syncState as EventListener);\n }\n\n disconnect() {\n this.modalElement?.dispose();\n }\n\n open() {\n this.initialState = this.buildState();\n\n console.log(`Initial state: ${JSON.stringify(this.initialState)}`);\n\n this.modalElement?.show();\n }\n\n close() {\n this.modalElement?.hide();\n this.applyState(this.initialState);\n }\n\n apply() {\n const filterValues: {\n checkboxes: { [name: string]: string[]; },\n inputs: { [name: string]: string; }\n } = {\n checkboxes: {},\n inputs: {}\n };\n\n this.checkboxTargets.filter(checkbox => checkbox.checked).map(checkbox => {\n if (!filterValues.checkboxes[checkbox.name]) {\n filterValues.checkboxes[checkbox.name] = [];\n }\n\n (filterValues.checkboxes[checkbox.name]).push(checkbox.value);\n });\n\n this.inputTargets.filter(input => input.value).map(input => {\n filterValues.inputs[input.name] = input.value;\n });\n\n this.element.dispatchEvent(\n new CustomEvent(\"map-modal-filter-changed\", {detail: filterValues, bubbles: true})\n );\n\n this.modalElement?.hide();\n }\n\n private buildState = (): {\n checkboxes: { [name: string]: string[]; },\n inputs: { [name: string]: string; }\n } => {\n const state: {\n checkboxes: { [name: string]: string[]; },\n inputs: { [name: string]: string; }\n } = {\n checkboxes: {},\n inputs: {}\n };\n\n this.checkboxTargets.filter(checkbox => checkbox.checked).map(checkbox => {\n if (!state.checkboxes[checkbox.name]) {\n state.checkboxes[checkbox.name] = [];\n }\n\n (state.checkboxes[checkbox.name]).push(checkbox.value);\n });\n\n this.inputTargets.filter(input => input.value).map(input => {\n state.inputs[input.name] = input.value;\n });\n\n return state;\n }\n\n private applyState = (state: {\n checkboxes: { [name: string]: string[]; },\n inputs: { [name: string]: string; }\n }): void => {\n this.checkboxTargets.forEach(checkbox => {\n checkbox.checked = !!state.checkboxes[checkbox.name]?.includes(checkbox.value);\n });\n\n this.inputTargets.forEach(input => {\n input.value = state.inputs[input.name] || \"\";\n });\n }\n\n syncState = (\n event: CustomEvent<{\n checkboxes: { [name: string]: string[]; },\n inputs: { [name: string]: string; }\n }>\n ): void => {\n console.log('Modal: sync sidebar state');\n\n this.applyState(event.detail);\n }\n}","import {Controller} from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static targets = [\"checkbox\", \"input\"];\n declare readonly checkboxTargets: HTMLInputElement[];\n declare readonly inputTargets: HTMLInputElement[];\n\n connect() {\n this.attachListeners(this.checkboxTargets);\n this.attachListeners(this.inputTargets);\n document.addEventListener(\"map-modal-filter-changed\", this.syncState as EventListener);\n }\n\n disconnect() {\n this.detachListeners(this.checkboxTargets);\n this.detachListeners(this.inputTargets);\n }\n\n attachListeners(targets: HTMLInputElement[]) {\n targets.forEach((target) => {\n target.addEventListener(\"change\", this.fireFilterChangedEvent);\n });\n }\n\n detachListeners(targets: HTMLInputElement[]) {\n targets.forEach((target) => {\n target.removeEventListener(\"change\", this.fireFilterChangedEvent);\n });\n }\n\n fireFilterChangedEvent = (): void => {\n const filterValues: {\n checkboxes: { [name: string]: string[]; },\n inputs: { [name: string]: string; }\n } = {\n checkboxes: {},\n inputs: {}\n };\n\n this.checkboxTargets.filter(checkbox => checkbox.checked).map(checkbox => {\n if (!filterValues.checkboxes[checkbox.name]) {\n filterValues.checkboxes[checkbox.name] = [];\n }\n\n (filterValues.checkboxes[checkbox.name]).push(checkbox.value);\n });\n\n this.inputTargets.filter(input => input.value).map(input => {\n filterValues.inputs[input.name] = input.value;\n });\n\n this.element.dispatchEvent(\n new CustomEvent(\"map-sidebar-filter-changed\", { detail: filterValues, bubbles: true })\n );\n }\n\n syncState = (event: CustomEvent<{\n checkboxes: { [name: string]: string[]; },\n inputs: { [name: string]: string; }\n }>): void => {\n console.log('Sidebar: sync modal state');\n\n this.checkboxTargets.forEach(checkbox => {\n checkbox.checked = !!event.detail.checkboxes[checkbox.name]?.includes(checkbox.value);\n });\n\n this.inputTargets.forEach(input => {\n input.value = event.detail.inputs[input.name] || \"\";\n });\n }\n}","export const DEFAULT_COORDINATES = { lng: 37.620393, lat: 55.75396 };","import { Controller } from \"@hotwired/stimulus\"\nimport 'ol/ol.css';\nimport { Map, View } from 'ol';\nimport { Tile as TileLayer, Vector as VectorLayer } from 'ol/layer';\nimport {OSM} from 'ol/source';\nimport { fromLonLat } from 'ol/proj';\nimport { Point } from 'ol/geom';\nimport { Feature } from 'ol';\nimport { Vector as VectorSource } from 'ol/source';\nimport { Icon, Style } from 'ol/style';\nimport { defaults as defaultInteractions } from 'ol/interaction';\nimport {DEFAULT_COORDINATES} from \"../js/constants\";\nimport markerUrl from '../assets/icons/map-marker.svg';\n\nexport default class extends Controller {\n static targets = [\"map\"];\n static values = { coordinates: String, color: String };\n\n declare readonly mapTarget: HTMLElement;\n declare readonly coordinatesValue: string;\n declare readonly colorValue: string;\n\n private map: Map | null = null;\n private marker: Feature | null = null;\n private vectorSource: VectorSource | null = null;\n\n /**\n * Attempts to read and parse the WKT coordinate string from the hidden field.\n * Expected format: \"POINT(lng lat)\"\n * Returns an object with { lng, lat } if parsing succeeds, or null otherwise.\n */\n parseWKTCoordinate(): { lng: number, lat: number } {\n if (!this.coordinatesValue) {\n return DEFAULT_COORDINATES;\n }\n\n const regex = /POINT ?\\(\\s*([-\\d.]+)\\s+([-\\d.]+)\\s*\\)/;\n const match = this.coordinatesValue.match(regex);\n\n if (match && match.length === 3) {\n const lng = parseFloat(match[1]);\n const lat = parseFloat(match[2]);\n if (!isNaN(lng) && !isNaN(lat)) {\n return { lng, lat };\n }\n }\n return DEFAULT_COORDINATES;\n }\n\n connect() {\n let coords = this.parseWKTCoordinate();\n const { lng, lat } = coords;\n\n this.marker = new Feature({\n geometry: new Point(fromLonLat([lng, lat]))\n });\n\n const style = new Style({\n image: new Icon({\n src: markerUrl,\n scale: 0.8, // Adjust the scale of the icon\n anchor: [0.5, 1],\n })\n });\n\n // Style the marker with an icon\n this.marker.setStyle(style);\n\n // Create a vector source and layer for the marker\n this.vectorSource = new VectorSource({\n features: [this.marker]\n });\n\n const vectorLayer = new VectorLayer({\n source: this.vectorSource\n });\n\n // Initialize the map\n this.map = new Map({\n target: this.mapTarget,\n layers: [\n new TileLayer({\n source: new OSM(),\n className: 'osm-tile-layer'\n }),\n vectorLayer\n ],\n view: new View({\n center: fromLonLat([lng, lat]),\n zoom: 14\n }),\n interactions: defaultInteractions()\n });\n }\n\n disconnect() {\n this.map?.dispose();\n }\n}\n","/*!!\n * Canvas 2 Svg v1.0.15\n * A low level canvas to SVG converter. Uses a mock canvas context to build an SVG document.\n *\n * Licensed under the MIT license:\n * http://www.opensource.org/licenses/mit-license.php\n *\n * Author:\n * Kerry Liu\n *\n * Copyright (c) 2014 Gliffy Inc.\n */\n\n;(function() {\n \"use strict\";\n\n var STYLES, ctx, CanvasGradient, CanvasPattern, namedEntities;\n\n //helper function to format a string\n function format(str, args) {\n var keys = Object.keys(args), i;\n for (i=0; i 1) {\n options = defaultOptions;\n options.width = arguments[0];\n options.height = arguments[1];\n } else if( !o ) {\n options = defaultOptions;\n } else {\n options = o;\n }\n\n if(!(this instanceof ctx)) {\n //did someone call this without new?\n return new ctx(options);\n }\n\n //setup options\n this.width = options.width || defaultOptions.width;\n this.height = options.height || defaultOptions.height;\n this.enableMirroring = options.enableMirroring !== undefined ? options.enableMirroring : defaultOptions.enableMirroring;\n\n this.canvas = this; ///point back to this instance!\n this.__document = options.document || document;\n this.__canvas = this.__document.createElement(\"canvas\");\n this.__ctx = this.__canvas.getContext(\"2d\");\n\n this.__setDefaultStyles();\n this.__stack = [this.__getStyleState()];\n this.__groupStack = [];\n\n //the root svg element\n this.__root = this.__document.createElementNS(\"http://www.w3.org/2000/svg\", \"svg\");\n this.__root.setAttribute(\"version\", 1.1);\n this.__root.setAttribute(\"xmlns\", \"http://www.w3.org/2000/svg\");\n this.__root.setAttributeNS(\"http://www.w3.org/2000/xmlns/\", \"xmlns:xlink\", \"http://www.w3.org/1999/xlink\");\n this.__root.setAttribute(\"width\", this.width);\n this.__root.setAttribute(\"height\", this.height);\n\n //make sure we don't generate the same ids in defs\n this.__ids = {};\n\n //defs tag\n this.__defs = this.__document.createElementNS(\"http://www.w3.org/2000/svg\", \"defs\");\n this.__root.appendChild(this.__defs);\n\n //also add a group child. the svg element can't use the transform attribute\n this.__currentElement = this.__document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n this.__root.appendChild(this.__currentElement);\n };\n\n\n /**\n * Creates the specified svg element\n * @private\n */\n ctx.prototype.__createElement = function (elementName, properties, resetFill) {\n if (typeof properties === \"undefined\") {\n properties = {};\n }\n\n var element = this.__document.createElementNS(\"http://www.w3.org/2000/svg\", elementName),\n keys = Object.keys(properties), i, key;\n if(resetFill) {\n //if fill or stroke is not specified, the svg element should not display. By default SVG's fill is black.\n element.setAttribute(\"fill\", \"none\");\n element.setAttribute(\"stroke\", \"none\");\n }\n for(i=0; i 0) {\n var group = this.__createElement(\"g\");\n parent.appendChild(group);\n this.__currentElement = group;\n }\n\n var transform = this.__currentElement.getAttribute(\"transform\");\n if(transform) {\n transform += \" \";\n } else {\n transform = \"\";\n }\n transform += t;\n this.__currentElement.setAttribute(\"transform\", transform);\n };\n\n /**\n * scales the current element\n */\n ctx.prototype.scale = function(x, y) {\n if(y === undefined) {\n y = x;\n }\n this.__addTransform(format(\"scale({x},{y})\", {x:x, y:y}));\n };\n\n /**\n * rotates the current element\n */\n ctx.prototype.rotate = function(angle){\n var degrees = (angle * 180 / Math.PI);\n this.__addTransform(format(\"rotate({angle},{cx},{cy})\", {angle:degrees, cx:0, cy:0}));\n };\n\n /**\n * translates the current element\n */\n ctx.prototype.translate = function(x, y){\n this.__addTransform(format(\"translate({x},{y})\", {x:x,y:y}));\n };\n\n /**\n * applies a transform to the current element\n */\n ctx.prototype.transform = function(a, b, c, d, e, f){\n this.__addTransform(format(\"matrix({a},{b},{c},{d},{e},{f})\", {a:a, b:b, c:c, d:d, e:e, f:f}));\n };\n\n /**\n * Create a new Path Element\n */\n ctx.prototype.beginPath = function(){\n var path, parent;\n\n // Note that there is only one current default path, it is not part of the drawing state.\n // See also: https://html.spec.whatwg.org/multipage/scripting.html#current-default-path\n this.__currentDefaultPath = \"\";\n this.__currentPosition = {};\n\n path = this.__createElement(\"path\", {}, true);\n parent = this.__closestGroupOrSvg();\n parent.appendChild(path);\n this.__currentElement = path;\n };\n\n /**\n * Helper function to apply currentDefaultPath to current path element\n * @private\n */\n ctx.prototype.__applyCurrentDefaultPath = function() {\n if(this.__currentElement.nodeName === \"path\") {\n var d = this.__currentDefaultPath;\n this.__currentElement.setAttribute(\"d\", d);\n } else {\n throw new Error(\"Attempted to apply path command to node \" + this.__currentElement.nodeName);\n }\n };\n\n /**\n * Helper function to add path command\n * @private\n */\n ctx.prototype.__addPathCommand = function(command){\n this.__currentDefaultPath += \" \";\n this.__currentDefaultPath += command;\n };\n\n /**\n * Adds the move command to the current path element,\n * if the currentPathElement is not empty create a new path element\n */\n ctx.prototype.moveTo = function(x,y){\n if(this.__currentElement.nodeName !== \"path\") {\n this.beginPath();\n }\n\n // creates a new subpath with the given point\n this.__currentPosition = {x: x, y: y};\n this.__addPathCommand(format(\"M {x} {y}\", {x:x, y:y}));\n };\n\n /**\n * Closes the current path\n */\n ctx.prototype.closePath = function(){\n this.__addPathCommand(\"Z\");\n };\n\n /**\n * Adds a line to command\n */\n ctx.prototype.lineTo = function(x, y){\n this.__currentPosition = {x: x, y: y};\n if (this.__currentDefaultPath.indexOf('M') > -1) {\n this.__addPathCommand(format(\"L {x} {y}\", {x:x, y:y}));\n } else {\n this.__addPathCommand(format(\"M {x} {y}\", {x:x, y:y}));\n }\n };\n\n /**\n * Add a bezier command\n */\n ctx.prototype.bezierCurveTo = function(cp1x, cp1y, cp2x, cp2y, x, y) {\n this.__currentPosition = {x: x, y: y};\n this.__addPathCommand(format(\"C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}\",\n {cp1x:cp1x, cp1y:cp1y, cp2x:cp2x, cp2y:cp2y, x:x, y:y}));\n };\n\n /**\n * Adds a quadratic curve to command\n */\n ctx.prototype.quadraticCurveTo = function(cpx, cpy, x, y){\n this.__currentPosition = {x: x, y: y};\n this.__addPathCommand(format(\"Q {cpx} {cpy} {x} {y}\", {cpx:cpx, cpy:cpy, x:x, y:y}));\n };\n\n\n /**\n * Return a new normalized vector of given vector\n */\n var normalize = function(vector) {\n var len = Math.sqrt(vector[0] * vector[0] + vector[1] * vector[1]);\n return [vector[0] / len, vector[1] / len];\n };\n\n /**\n * Adds the arcTo to the current path\n *\n * @see http://www.w3.org/TR/2015/WD-2dcontext-20150514/#dom-context-2d-arcto\n */\n ctx.prototype.arcTo = function(x1, y1, x2, y2, radius) {\n // Let the point (x0, y0) be the last point in the subpath.\n var x0 = this.__currentPosition && this.__currentPosition.x;\n var y0 = this.__currentPosition && this.__currentPosition.y;\n\n // First ensure there is a subpath for (x1, y1).\n if (typeof x0 == \"undefined\" || typeof y0 == \"undefined\") {\n return;\n }\n\n // Negative values for radius must cause the implementation to throw an IndexSizeError exception.\n if (radius < 0) {\n throw new Error(\"IndexSizeError: The radius provided (\" + radius + \") is negative.\");\n }\n\n // If the point (x0, y0) is equal to the point (x1, y1),\n // or if the point (x1, y1) is equal to the point (x2, y2),\n // or if the radius radius is zero,\n // then the method must add the point (x1, y1) to the subpath,\n // and connect that point to the previous point (x0, y0) by a straight line.\n if (((x0 === x1) && (y0 === y1))\n || ((x1 === x2) && (y1 === y2))\n || (radius === 0)) {\n this.lineTo(x1, y1);\n return;\n }\n\n // Otherwise, if the points (x0, y0), (x1, y1), and (x2, y2) all lie on a single straight line,\n // then the method must add the point (x1, y1) to the subpath,\n // and connect that point to the previous point (x0, y0) by a straight line.\n var unit_vec_p1_p0 = normalize([x0 - x1, y0 - y1]);\n var unit_vec_p1_p2 = normalize([x2 - x1, y2 - y1]);\n if (unit_vec_p1_p0[0] * unit_vec_p1_p2[1] === unit_vec_p1_p0[1] * unit_vec_p1_p2[0]) {\n this.lineTo(x1, y1);\n return;\n }\n\n // Otherwise, let The Arc be the shortest arc given by circumference of the circle that has radius radius,\n // and that has one point tangent to the half-infinite line that crosses the point (x0, y0) and ends at the point (x1, y1),\n // and that has a different point tangent to the half-infinite line that ends at the point (x1, y1), and crosses the point (x2, y2).\n // The points at which this circle touches these two lines are called the start and end tangent points respectively.\n\n // note that both vectors are unit vectors, so the length is 1\n var cos = (unit_vec_p1_p0[0] * unit_vec_p1_p2[0] + unit_vec_p1_p0[1] * unit_vec_p1_p2[1]);\n var theta = Math.acos(Math.abs(cos));\n\n // Calculate origin\n var unit_vec_p1_origin = normalize([\n unit_vec_p1_p0[0] + unit_vec_p1_p2[0],\n unit_vec_p1_p0[1] + unit_vec_p1_p2[1]\n ]);\n var len_p1_origin = radius / Math.sin(theta / 2);\n var x = x1 + len_p1_origin * unit_vec_p1_origin[0];\n var y = y1 + len_p1_origin * unit_vec_p1_origin[1];\n\n // Calculate start angle and end angle\n // rotate 90deg clockwise (note that y axis points to its down)\n var unit_vec_origin_start_tangent = [\n -unit_vec_p1_p0[1],\n unit_vec_p1_p0[0]\n ];\n // rotate 90deg counter clockwise (note that y axis points to its down)\n var unit_vec_origin_end_tangent = [\n unit_vec_p1_p2[1],\n -unit_vec_p1_p2[0]\n ];\n var getAngle = function(vector) {\n // get angle (clockwise) between vector and (1, 0)\n var x = vector[0];\n var y = vector[1];\n if (y >= 0) { // note that y axis points to its down\n return Math.acos(x);\n } else {\n return -Math.acos(x);\n }\n };\n var startAngle = getAngle(unit_vec_origin_start_tangent);\n var endAngle = getAngle(unit_vec_origin_end_tangent);\n\n // Connect the point (x0, y0) to the start tangent point by a straight line\n this.lineTo(x + unit_vec_origin_start_tangent[0] * radius,\n y + unit_vec_origin_start_tangent[1] * radius);\n\n // Connect the start tangent point to the end tangent point by arc\n // and adding the end tangent point to the subpath.\n this.arc(x, y, radius, startAngle, endAngle);\n };\n\n /**\n * Sets the stroke property on the current element\n */\n ctx.prototype.stroke = function(){\n if(this.__currentElement.nodeName === \"path\") {\n this.__currentElement.setAttribute(\"paint-order\", \"fill stroke markers\");\n }\n this.__applyCurrentDefaultPath();\n this.__applyStyleToCurrentElement(\"stroke\");\n };\n\n /**\n * Sets fill properties on the current element\n */\n ctx.prototype.fill = function(){\n if(this.__currentElement.nodeName === \"path\") {\n this.__currentElement.setAttribute(\"paint-order\", \"stroke fill markers\");\n }\n this.__applyCurrentDefaultPath();\n this.__applyStyleToCurrentElement(\"fill\");\n };\n\n /**\n * Adds a rectangle to the path.\n */\n ctx.prototype.rect = function(x, y, width, height){\n if(this.__currentElement.nodeName !== \"path\") {\n this.beginPath();\n }\n this.moveTo(x, y);\n this.lineTo(x+width, y);\n this.lineTo(x+width, y+height);\n this.lineTo(x, y+height);\n this.lineTo(x, y);\n this.closePath();\n };\n\n\n /**\n * adds a rectangle element\n */\n ctx.prototype.fillRect = function(x, y, width, height){\n var rect, parent;\n rect = this.__createElement(\"rect\", {\n x : x,\n y : y,\n width : width,\n height : height\n }, true);\n parent = this.__closestGroupOrSvg();\n parent.appendChild(rect);\n this.__currentElement = rect;\n this.__applyStyleToCurrentElement(\"fill\");\n };\n\n /**\n * Draws a rectangle with no fill\n * @param x\n * @param y\n * @param width\n * @param height\n */\n ctx.prototype.strokeRect = function(x, y, width, height){\n var rect, parent;\n rect = this.__createElement(\"rect\", {\n x : x,\n y : y,\n width : width,\n height : height\n }, true);\n parent = this.__closestGroupOrSvg();\n parent.appendChild(rect);\n this.__currentElement = rect;\n this.__applyStyleToCurrentElement(\"stroke\");\n };\n\n\n /**\n * \"Clears\" a canvas by just drawing a white rectangle in the current group.\n */\n ctx.prototype.clearRect = function(x, y, width, height) {\n var rect, parent = this.__closestGroupOrSvg();\n rect = this.__createElement(\"rect\", {\n x : x,\n y : y,\n width : width,\n height : height,\n fill : \"#FFFFFF\"\n }, true);\n parent.appendChild(rect);\n };\n\n /**\n * Adds a linear gradient to a defs tag.\n * Returns a canvas gradient object that has a reference to it's parent def\n */\n ctx.prototype.createLinearGradient = function(x1, y1, x2, y2){\n var grad = this.__createElement(\"linearGradient\", {\n id : randomString(this.__ids),\n x1 : x1+\"px\",\n x2 : x2+\"px\",\n y1 : y1+\"px\",\n y2 : y2+\"px\",\n \"gradientUnits\" : \"userSpaceOnUse\"\n }, false);\n this.__defs.appendChild(grad);\n return new CanvasGradient(grad, this);\n };\n\n /**\n * Adds a radial gradient to a defs tag.\n * Returns a canvas gradient object that has a reference to it's parent def\n */\n ctx.prototype.createRadialGradient = function(x0, y0, r0, x1, y1, r1){\n var grad = this.__createElement(\"radialGradient\", {\n id : randomString(this.__ids),\n cx : x1+\"px\",\n cy : y1+\"px\",\n r : r1+\"px\",\n fx : x0+\"px\",\n fy : y0+\"px\",\n \"gradientUnits\" : \"userSpaceOnUse\"\n }, false);\n this.__defs.appendChild(grad);\n return new CanvasGradient(grad, this);\n\n };\n\n /**\n * Parses the font string and returns svg mapping\n * @private\n */\n ctx.prototype.__parseFont = function() {\n var regex = /^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))(?:\\s*\\/\\s*(normal|[.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])))?\\s*([-,\\\"\\sa-z]+?)\\s*$/i;\n var fontPart = regex.exec( this.font );\n var data = {\n style : fontPart[1] || 'normal',\n size : fontPart[4] || '10px',\n family : fontPart[6] || 'sans-serif',\n weight: fontPart[3] || 'normal',\n decoration : fontPart[2] || 'normal',\n href : null\n };\n\n //canvas doesn't support underline natively, but we can pass this attribute\n if(this.__fontUnderline === \"underline\") {\n data.decoration = \"underline\";\n }\n\n //canvas also doesn't support linking, but we can pass this as well\n if(this.__fontHref) {\n data.href = this.__fontHref;\n }\n\n return data;\n };\n\n /**\n * Helper to link text fragments\n * @param font\n * @param element\n * @return {*}\n * @private\n */\n ctx.prototype.__wrapTextLink = function(font, element) {\n if(font.href) {\n var a = this.__createElement(\"a\");\n a.setAttributeNS(\"http://www.w3.org/1999/xlink\", \"xlink:href\", font.href);\n a.appendChild(element);\n return a;\n }\n return element;\n };\n\n /**\n * Fills or strokes text\n * @param text\n * @param x\n * @param y\n * @param action - stroke or fill\n * @private\n */\n ctx.prototype.__applyText = function(text, x, y, action) {\n var font = this.__parseFont(),\n parent = this.__closestGroupOrSvg(),\n textElement = this.__createElement(\"text\", {\n \"font-family\" : font.family,\n \"font-size\" : font.size,\n \"font-style\" : font.style,\n \"font-weight\" : font.weight,\n \"text-decoration\" : font.decoration,\n \"x\" : x,\n \"y\" : y,\n \"text-anchor\": getTextAnchor(this.textAlign),\n \"dominant-baseline\": getDominantBaseline(this.textBaseline)\n }, true);\n\n textElement.appendChild(this.__document.createTextNode(text));\n this.__currentElement = textElement;\n this.__applyStyleToCurrentElement(action);\n parent.appendChild(this.__wrapTextLink(font,textElement));\n };\n\n /**\n * Creates a text element\n * @param text\n * @param x\n * @param y\n */\n ctx.prototype.fillText = function(text, x, y){\n this.__applyText(text, x, y, \"fill\");\n };\n\n /**\n * Strokes text\n * @param text\n * @param x\n * @param y\n */\n ctx.prototype.strokeText = function(text, x, y){\n this.__applyText(text, x, y, \"stroke\");\n };\n\n /**\n * No need to implement this for svg.\n * @param text\n * @return {TextMetrics}\n */\n ctx.prototype.measureText = function(text){\n this.__ctx.font = this.font;\n return this.__ctx.measureText(text);\n };\n\n /**\n * Arc command!\n */\n ctx.prototype.arc = function(x, y, radius, startAngle, endAngle, counterClockwise) {\n // in canvas no circle is drawn if no angle is provided.\n if (startAngle === endAngle) {\n return;\n }\n startAngle = startAngle % (2*Math.PI);\n endAngle = endAngle % (2*Math.PI);\n if(startAngle === endAngle) {\n //circle time! subtract some of the angle so svg is happy (svg elliptical arc can't draw a full circle)\n endAngle = ((endAngle + (2*Math.PI)) - 0.001 * (counterClockwise ? -1 : 1)) % (2*Math.PI);\n }\n var endX = x+radius*Math.cos(endAngle),\n endY = y+radius*Math.sin(endAngle),\n startX = x+radius*Math.cos(startAngle),\n startY = y+radius*Math.sin(startAngle),\n sweepFlag = counterClockwise ? 0 : 1,\n largeArcFlag = 0,\n diff = endAngle - startAngle;\n\n // https://github.com/gliffy/canvas2svg/issues/4\n if(diff < 0) {\n diff += 2*Math.PI;\n }\n\n if(counterClockwise) {\n largeArcFlag = diff > Math.PI ? 0 : 1;\n } else {\n largeArcFlag = diff > Math.PI ? 1 : 0;\n }\n\n this.lineTo(startX, startY);\n this.__addPathCommand(format(\"A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}\",\n {rx:radius, ry:radius, xAxisRotation:0, largeArcFlag:largeArcFlag, sweepFlag:sweepFlag, endX:endX, endY:endY}));\n\n this.__currentPosition = {x: endX, y: endY};\n };\n\n /**\n * Generates a ClipPath from the clip command.\n */\n ctx.prototype.clip = function(){\n var group = this.__closestGroupOrSvg(),\n clipPath = this.__createElement(\"clipPath\"),\n id = randomString(this.__ids),\n newGroup = this.__createElement(\"g\");\n\n group.removeChild(this.__currentElement);\n clipPath.setAttribute(\"id\", id);\n clipPath.appendChild(this.__currentElement);\n\n this.__defs.appendChild(clipPath);\n\n //set the clip path to this group\n group.setAttribute(\"clip-path\", format(\"url(#{id})\", {id:id}));\n\n //clip paths can be scaled and transformed, we need to add another wrapper group to avoid later transformations\n // to this path\n group.appendChild(newGroup);\n\n this.__currentElement = newGroup;\n\n };\n\n /**\n * Draws a canvas, image or mock context to this canvas.\n * Note that all svg dom manipulation uses node.childNodes rather than node.children for IE support.\n * http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-drawimage\n */\n ctx.prototype.drawImage = function(){\n //convert arguments to a real array\n var args = Array.prototype.slice.call(arguments),\n image=args[0],\n dx, dy, dw, dh, sx=0, sy=0, sw, sh, parent, svg, defs, group,\n currentElement, svgImage, canvas, context, id;\n\n if(args.length === 3) {\n dx = args[1];\n dy = args[2];\n sw = image.width;\n sh = image.height;\n dw = sw;\n dh = sh;\n } else if(args.length === 5) {\n dx = args[1];\n dy = args[2];\n dw = args[3];\n dh = args[4];\n sw = image.width;\n sh = image.height;\n } else if(args.length === 9) {\n sx = args[1];\n sy = args[2];\n sw = args[3];\n sh = args[4];\n dx = args[5];\n dy = args[6];\n dw = args[7];\n dh = args[8];\n } else {\n throw new Error(\"Inavlid number of arguments passed to drawImage: \" + arguments.length);\n }\n\n parent = this.__closestGroupOrSvg();\n currentElement = this.__currentElement;\n\n if(image instanceof ctx) {\n //canvas2svg mock canvas context. In the future we may want to clone nodes instead.\n //also I'm currently ignoring dw, dh, sw, sh, sx, sy for a mock context.\n svg = image.getSvg();\n defs = svg.childNodes[0];\n while(defs.childNodes.length) {\n id = defs.childNodes[0].getAttribute(\"id\");\n this.__ids[id] = id;\n this.__defs.appendChild(defs.childNodes[0]);\n }\n group = svg.childNodes[1];\n parent.appendChild(group);\n this.__currentElement = group;\n this.translate(dx, dy);\n this.__currentElement = currentElement;\n } else if(image.nodeName === \"CANVAS\" || image.nodeName === \"IMG\") {\n //canvas or image\n svgImage = this.__createElement(\"image\");\n svgImage.setAttribute(\"width\", dw);\n svgImage.setAttribute(\"height\", dh);\n svgImage.setAttribute(\"preserveAspectRatio\", \"none\");\n\n if(sx || sy || sw !== image.width || sh !== image.height) {\n //crop the image using a temporary canvas\n canvas = this.__document.createElement(\"canvas\");\n canvas.width = dw;\n canvas.height = dh;\n context = canvas.getContext(\"2d\");\n context.drawImage(image, sx, sy, sw, sh, 0, 0, dw, dh);\n image = canvas;\n }\n\n svgImage.setAttributeNS(\"http://www.w3.org/1999/xlink\", \"xlink:href\",\n image.nodeName === \"CANVAS\" ? image.toDataURL() : image.getAttribute(\"src\"));\n parent.appendChild(svgImage);\n this.__currentElement = svgImage;\n this.translate(dx, dy);\n this.__currentElement = currentElement;\n }\n };\n\n /**\n * Generates a pattern tag\n */\n ctx.prototype.createPattern = function(image, repetition){\n var pattern = this.__document.createElementNS(\"http://www.w3.org/2000/svg\", \"pattern\"), id = randomString(this.__ids),\n img;\n pattern.setAttribute(\"id\", id);\n pattern.setAttribute(\"width\", image.width);\n pattern.setAttribute(\"height\", image.height);\n if(image.nodeName === \"CANVAS\" || image.nodeName === \"IMG\") {\n img = this.__document.createElementNS(\"http://www.w3.org/2000/svg\", \"image\");\n img.setAttribute(\"width\", image.width);\n img.setAttribute(\"height\", image.height);\n img.setAttributeNS(\"http://www.w3.org/1999/xlink\", \"xlink:href\",\n image.nodeName === \"CANVAS\" ? image.toDataURL() : image.getAttribute(\"src\"));\n pattern.appendChild(img);\n this.__defs.appendChild(pattern);\n } else if(image instanceof ctx) {\n pattern.appendChild(image.__root.childNodes[1]);\n this.__defs.appendChild(pattern);\n }\n return new CanvasPattern(pattern, this);\n };\n\n /**\n * Not yet implemented\n */\n ctx.prototype.drawFocusRing = function(){};\n ctx.prototype.createImageData = function(){};\n ctx.prototype.getImageData = function(){};\n ctx.prototype.putImageData = function(){};\n ctx.prototype.globalCompositeOperation = function(){};\n ctx.prototype.setTransform = function(){};\n\n //add options for alternative namespace\n if (typeof window === \"object\") {\n window.C2S = ctx;\n }\n\n // CommonJS/Browserify\n if (typeof module === \"object\" && typeof module.exports === \"object\") {\n module.exports = ctx;\n }\n\n}());\n","import canvas2svg from 'canvas2svg';\n\n// Function to create a segmented circle icon as a data URL\nexport function createSegmentedCircleIcon(entityColors: string[], count: number = 0, size: number = 32): string {\n let scaleFactor = 1;\n if (count > 0) {\n scaleFactor = scaleFactor + 0.4 * Math.log10(count);\n }\n\n const padding = 10;\n const ctx: CanvasRenderingContext2D = canvas2svg({ width: size * scaleFactor + padding, height: size * scaleFactor + padding });\n\n const center = (size * scaleFactor + padding) / 2;\n const radius = (size * scaleFactor / 2) - 4; // leave room for stroke width\n const segments = entityColors.length;\n\n // Fill the circle with a base color (optional)\n ctx.beginPath();\n ctx.arc(center, center, radius, 0, 2 * Math.PI);\n ctx.fillStyle = 'white'; // or any other fill color\n ctx.fill();\n\n // Draw each border segment\n ctx.lineWidth = 6;\n for (let i = 0; i < segments; i++) {\n const startAngle = (i / segments) * 2 * Math.PI;\n const endAngle = ((i + 1) / segments) * 2 * Math.PI;\n ctx.beginPath();\n ctx.arc(center, center, radius, startAngle, endAngle);\n ctx.strokeStyle = entityColors[i] || '#000000';\n ctx.stroke();\n }\n\n const fontSize = Math.floor(radius);\n\n if (count) {\n ctx.font = `bold ${fontSize}px sans-serif`;\n ctx.fillStyle = 'black';\n ctx.textAlign = 'center';\n ctx.textBaseline = 'middle';\n ctx.fillText(count.toString(), center, center);\n }\n\n // return `data:image/svg+xml;utf8,${encodeURIComponent((ctx as any).getSerializedSvg())}`;\n // Get the generated SVG string\n let svgString = (ctx as any).getSerializedSvg();\n\n const filterDefinition = `\n \n \n \n \n \n \n \n \n \n \n \n \n `;\n\n // Replace the empty with our filter definition\n svgString = svgString.replace('', filterDefinition);\n\n // Apply the filter to the entire group (or target only the base circle if preferred)\n svgString = svgString.replace('', '');\n\n return `data:image/svg+xml;utf8,${encodeURIComponent(svgString)}`;\n}\n","import {Point} from \"ol/geom\";\nimport {fromLonLat} from \"ol/proj\";\n\nexport const parseWkt = (wktPoint: string): Point | null => {\n const regex = /POINT ?\\(\\s*([-\\d.]+)\\s+([-\\d.]+)\\s*\\)/;\n const match = wktPoint.match(regex);\n\n if (match && match.length === 3) {\n const lng = parseFloat(match[1]);\n const lat = parseFloat(match[2]);\n if (!isNaN(lng) && !isNaN(lat)) {\n return new Point(fromLonLat([lng, lat]))\n }\n }\n\n return null;\n}\n\nexport const parseEnvelopeWKT = (wkt: string): number[] | null => {\n const matches = wkt.match(/POLYGON\\(\\((.+)\\)\\)/)\n if (!matches) return null\n const coords = matches[1].split(',').map(pair => {\n const parts = pair.trim().split(' ')\n return [parseFloat(parts[0]), parseFloat(parts[1])]\n })\n if (coords.length < 3) return null\n return [coords[0][0], coords[0][1], coords[2][0], coords[2][1]]\n}","import {formatEventOccurrenceDate, formatEventOccurrenceTime, formatMoney} from \"../../../js/formatters\";\n\nexport const createHorizontalEventOccurrenceElement = (json: any): HTMLElement | null => {\n const template = document.getElementById('horizontal-event-occurrence-template') as HTMLTemplateElement;\n if (!template) {\n return null\n }\n\n const clone = template.content.cloneNode(true) as HTMLElement;\n\n const eventOccurrenceLink = clone.querySelector('[data-event-occurrence-path]');\n if (eventOccurrenceLink) eventOccurrenceLink.href += `/${json.event.id}?occurrence_id=${json.id}`;\n\n const eventTypePlaceholder = clone.querySelector('[data-event-type]');\n if (eventTypePlaceholder) eventTypePlaceholder.textContent = json.event.event_type.name;\n\n const occurrenceDarePlaceholder = clone.querySelector('[data-occurrence-date]');\n if (occurrenceDarePlaceholder) occurrenceDarePlaceholder.textContent = formatEventOccurrenceDate(json.occurrence_date);\n\n const organizerPlaceholder = clone.querySelector('[data-organizer]');\n if (organizerPlaceholder) organizerPlaceholder.textContent = [\n json.event.organizer?.last_name, json.event.organizer?.first_name, json.event.organizer?.middle_name\n ].filter(part => !!part).join(' ');\n\n const infoPlaceholder = clone.querySelector('[data-occurrence-info]');\n if (infoPlaceholder) infoPlaceholder.textContent = [\n json.event.sport.name,\n json.event.location?.metro_stations?.length ? `м. ${json.event.location.metro_stations}` : null,\n json.event.participants_levels.map((pl: { name: string }) => pl.name).join(\"/\"),\n formatEventOccurrenceTime(json.event.start_time, json.event.end_time),\n json.event.participants_type?.name,\n ].filter(part => !!part).join(\" • \");\n\n const minCostPlaceholder = clone.querySelector('[data-min-cost]');\n if (minCostPlaceholder) minCostPlaceholder.textContent = formatMoney(json.event.min_cost);\n\n return clone;\n}","import {Controller} from \"@hotwired/stimulus\"\nimport 'ol/ol.css';\nimport {Feature, Map, View} from 'ol';\nimport {Tile as TileLayer, Vector as VectorLayer} from 'ol/layer';\nimport {OSM, Vector as VectorSource} from 'ol/source';\nimport {fromLonLat, toLonLat, transformExtent} from 'ol/proj';\nimport {Icon, Style} from \"ol/style\";\nimport {Point} from \"ol/geom\";\nimport {containsExtent, Extent} from \"ol/extent\";\nimport {createSegmentedCircleIcon} from \"../js/icon-drawer\";\nimport {parseEnvelopeWKT, parseWkt} from \"../js/wkt-utils\";\nimport {DEFAULT_COORDINATES} from \"../js/constants\";\nimport {createHorizontalEventOccurrenceElement} from \"./public/map/createHorizontalEventOccurrenceElement\";\n\nconst markerStyleCache: { [key: string]: Style } = {};\n\nfunction getMarkerStyleKey(colors: string[], number: number): string {\n return `${colors.sort().join('-')}_${number}`;\n}\n\nexport default class extends Controller {\n static targets = [\"map\", \"checkbox\", \"sidebar\"]\n\n declare readonly mapTarget: HTMLElement;\n declare readonly sidebarTarget: HTMLElement;\n\n // Debounce timeout identifier\n private debounceTimeout: number | null = null\n // Debounce delay in milliseconds\n private debounceDelay: number = 300\n\n private map: Map | null = null;\n private vectorSource: VectorSource | null = null;\n private clusterLayer: VectorLayer | null = null;\n\n private previousZoom: number | undefined;\n private previousExtent: Extent | undefined;\n\n private filter: {\n checkboxes: { [name: string]: string[]; },\n inputs: { [name: string]: string; }\n } | null = null;\n\n connect() {\n this.initMap();\n this.initFilters();\n this.loadPoints();\n\n ['map-sidebar-filter-changed', 'map-modal-filter-changed'].forEach((eventName) => {\n this.element.addEventListener(eventName, ((event: CustomEvent<{checkboxes: { [name: string]: string[]; },\n inputs: { [name: string]: string; }}>) => {\n this.filter = event.detail;\n\n this.loadPoints();\n }) as EventListener);\n });\n }\n\n initMap() {\n const { lng, lat } = DEFAULT_COORDINATES;\n\n const zoomAttributeValue = this.mapTarget.getAttribute('data-zoom');\n const zoom = zoomAttributeValue ? Number(zoomAttributeValue) : 10;\n\n const centerAttributeValue = this.mapTarget.getAttribute('data-center');\n const center = centerAttributeValue ? centerAttributeValue.split(',').map(Number) : [ lng, lat ];\n\n this.vectorSource = new VectorSource()\n this.clusterLayer = new VectorLayer({\n source: this.vectorSource,\n style: (feature) => {\n const colors = feature.get('colors');\n const eventOccurrencesCount: number = feature.get('event_occurrences_count');\n\n const key = getMarkerStyleKey(colors, eventOccurrencesCount);\n if (markerStyleCache[key]) {\n return markerStyleCache[key];\n }\n\n const iconSrc: string = createSegmentedCircleIcon(colors, eventOccurrencesCount);\n\n const style = new Style({\n image: new Icon({\n src: iconSrc,\n anchor: [0.5, 0.5],\n scale: 1\n }),\n });\n\n markerStyleCache[key] = style;\n return style;\n }\n })\n\n this.map = new Map({\n target: this.mapTarget,\n layers: [\n new TileLayer({\n source: new OSM(),\n className: 'osm-tile-layer'\n }),\n this.clusterLayer\n ],\n view: new View({\n center: fromLonLat(center),\n zoom: zoom\n })\n });\n\n this.map.on('moveend', () => {\n if (!this.map) { return; }\n\n // event.frameState is available when using OpenLayers' default animations.\n const view = this.map.getView();\n const currentZoom = view.getZoom();\n const currentExtent: Extent = view.calculateExtent(this.map.getSize());\n\n console.log(`PreviousZoom: ${this.previousZoom}, current: ${currentZoom}`);\n console.log(`PreviousExtent: ${this.previousExtent}, current: ${currentExtent}`);\n\n if (this.previousExtent && this.previousZoom !== null) {\n // If the zoom hasn't changed and the current extent is fully contained in the previous extent...\n if (currentZoom === this.previousZoom && containsExtent(this.previousExtent, currentExtent)) {\n console.log('Using cached features.');\n return; // Skip requesting new features.\n }\n }\n\n // Update the cache.\n this.previousExtent = currentExtent;\n this.previousZoom = currentZoom;\n\n console.log('Request features.');\n this.debouncedLoadPoints();\n });\n\n this.map.on('singleclick', (evt) => {\n const map = this.map;\n if (!map) { return; }\n\n const view = map.getView();\n if (!view) { return; }\n\n this.map?.forEachFeatureAtPixel(evt.pixel, (feature) => {\n const eventOccurrenceIds: number[] = feature.get('event_occurrence_ids');\n\n if (!eventOccurrenceIds && feature.get('envelopeWkt')) {\n const envelopeWKT = feature.get('envelopeWkt');\n const extent4326 = parseEnvelopeWKT(envelopeWKT);\n\n if (extent4326) {\n // Transform the envelope extent from EPSG:4326 to EPSG:3857.\n const extent3857 = transformExtent(extent4326, 'EPSG:4326', 'EPSG:3857');\n\n // Calculate the resolution needed to fit the extent.\n const mapSize = map.getSize();\n const resolutionForExtent = view.getResolutionForExtent(extent3857, mapSize);\n // Calculate the corresponding zoom level.\n const fitZoom = view.getZoomForResolution(resolutionForExtent) || 13;\n\n if (fitZoom < 13) {\n view.fit(extent3857, {\n duration: 500,\n padding: [20, 20, 20, 20]\n });\n return;\n }\n }\n\n const clusterCenterWKT = feature.get('center_wkt');\n const clusterCenter: Point | null = parseWkt(clusterCenterWKT);\n if (clusterCenter) {\n view.animate({center: clusterCenter.getCoordinates(), zoom: 13})\n }\n } else {\n let idsParams = new URLSearchParams({});\n eventOccurrenceIds.map(eventOccurrenceId => {\n idsParams.append('ids[]', eventOccurrenceId.toString());\n });\n\n fetch(`event_occurrences.json?${idsParams.toString()}`)\n .then(response => response.json())\n .then(json => {\n if (window.matchMedia(\"(max-width: 768px)\").matches) {\n\n const fragment = document.createDocumentFragment();\n\n for (const jsonItem of json) {\n const eventOccurrenceElement = createHorizontalEventOccurrenceElement(jsonItem);\n if (eventOccurrenceElement) fragment.append(eventOccurrenceElement);\n }\n\n const modalEventOccurrencesContainer = document.getElementById('event-occurrences-modal-container');\n if (modalEventOccurrencesContainer) {\n const modalEventOccurrencesContent = modalEventOccurrencesContainer.querySelector('#modal-event-occurrences-content');\n if (modalEventOccurrencesContent) modalEventOccurrencesContent.replaceChildren(fragment);\n\n const contentModalController = this.application.getControllerForElementAndIdentifier(modalEventOccurrencesContainer, 'public--map--modal-event-occurrences') as any;\n contentModalController.open();\n }\n } else {\n const fragment = document.createDocumentFragment();\n\n for (const jsonItem of json) {\n const eventOccurrenceElement = createHorizontalEventOccurrenceElement(jsonItem)\n if (eventOccurrenceElement) fragment.append(eventOccurrenceElement);\n }\n\n const sidebarEventOccurrencesContainer = this.sidebarTarget.querySelector('#sidebar-event-occurrences-container');\n if (sidebarEventOccurrencesContainer) sidebarEventOccurrencesContainer.replaceChildren(fragment);\n this.sidebarTarget.classList.add('active');\n }\n })\n .catch(error => console.error('Error fetching records:', error));\n }\n })\n });\n }\n\n initFilters() {\n const initialFilter: {\n checkboxes: { [name: string]: string[]; },\n inputs: { [name: string]: string; }\n } = {\n checkboxes: {},\n inputs: {}\n }\n\n const mobile = window.matchMedia(\"(max-width: 768px)\").matches;\n const checkboxes = document.querySelectorAll(\n mobile ? \"[data-public--map--modal-filter-target='checkbox']\" : \"[data-public--map--sidebar-filter-target='checkbox']\"\n );\n\n const inputs = document.querySelectorAll(\n mobile ? \"[data-public--map--modal-filter-target='input']\" : \"[data-public--map--sidebar-filter-target='input']\"\n );\n\n for (const checkbox of checkboxes) {\n if (checkbox.checked) {\n if (!initialFilter.checkboxes[checkbox.name]) {\n initialFilter.checkboxes[checkbox.name] = [];\n }\n\n initialFilter.checkboxes[checkbox.name].push(checkbox.value);\n }\n }\n\n for (const input of inputs) {\n if (input.value) {\n initialFilter.inputs[input.name] = input.value;\n }\n }\n\n this.filter = initialFilter;\n }\n\n loadPoints() {\n if (!this.map) { return; }\n\n const extent = this.map.getView().calculateExtent(this.map.getSize());\n const transformedExtent = transformExtent(extent, 'EPSG:3857', 'EPSG:4326');\n const bbox = transformedExtent.join(',');\n const currentZoom = this.map.getView().getZoom();\n const currentCenter = this.map.getView().getCenter();\n\n if (!currentZoom || !currentCenter) {return;}\n\n let filterSearchParams = new URLSearchParams({\n bbox: bbox,\n zoom: currentZoom.toString(),\n center: toLonLat(currentCenter).toString()\n });\n\n if (this.filter) {\n for (const [key, values] of Object.entries(this.filter.checkboxes)) {\n values.forEach((value) => {\n filterSearchParams.append(key, value);\n });\n }\n\n for (const [key, value] of Object.entries(this.filter.inputs)) {\n filterSearchParams.append(key, value);\n }\n }\n\n let requestUrl = `map/points.json?${filterSearchParams.toString()}`;\n window.history.replaceState({ },\"\", `map?${filterSearchParams.toString()}`);\n\n fetch(requestUrl)\n .then(response => response.json())\n .then(response => {\n // console.log(`Loaded ${JSON.stringify(response)}`)\n\n this.vectorSource?.clear()\n const features = response.map((item: any) => {\n if (item.cluster) {\n const center = parseWkt(item.center_wkt);\n\n const feature = new Feature({\n geometry: center!,\n envelopeWkt: item.envelope_wkt\n });\n\n feature.set(\"center_wkt\", item.center_wkt);\n feature.set(\"event_occurrences_count\", item.event_occurrences_count);\n feature.set(\"colors\", item.colors);\n\n return feature;\n } else {\n const geometry = parseWkt(item.coords)\n if (!geometry) { return }\n\n const feature = new Feature({\n geometry: geometry\n });\n\n feature.set(\"event_occurrence_ids\", item.event_occurrence_ids);\n feature.set(\"event_occurrences_count\", item.event_occurrences_count);\n feature.set(\"colors\", item.colors);\n\n return feature;\n }\n });\n\n this.vectorSource?.addFeatures(features)\n })\n .catch(error => console.error('Error loading points:', error))\n }\n\n closeEvents() {\n this.sidebarTarget.classList.remove('active');\n const sidebarEventOccurrencesContainer = this.sidebarTarget.querySelector('#sidebar-event-occurrences-container');\n if (sidebarEventOccurrencesContainer) sidebarEventOccurrencesContainer.innerHTML = '';\n }\n\n debouncedLoadPoints = (): void => {\n if (this.debounceTimeout) {\n clearTimeout(this.debounceTimeout)\n }\n this.debounceTimeout = window.setTimeout(() => {\n this.loadPoints();\n }, this.debounceDelay)\n }\n\n disconnect() {\n this.map?.dispose();\n }\n}","import { Controller } from \"@hotwired/stimulus\"\n\n// Define the FilterFormController class\nexport default class extends Controller {\n static targets = [\"checkbox\", \"input\"]\n\n declare readonly checkboxTargets: HTMLInputElement[]\n declare readonly inputTargets: HTMLInputElement[]\n\n // Debounce timeout identifier\n debounceTimeout: number | null = null\n\n // Debounce delay in milliseconds\n debounceDelay: number = 300\n\n connect(): void {\n this.initializeCheckboxListeners()\n }\n\n initializeCheckboxListeners(): void {\n this.checkboxTargets.forEach((checkbox) => {\n checkbox.addEventListener(\"change\", this.debouncedSubmitForm.bind(this))\n });\n\n this.inputTargets.forEach((input) => {\n input.addEventListener(\"change\", this.debouncedSubmitForm.bind(this))\n });\n }\n\n debouncedSubmitForm(): void {\n console.log('submit should be called');\n\n if (this.debounceTimeout) {\n clearTimeout(this.debounceTimeout)\n }\n this.debounceTimeout = window.setTimeout(() => {\n this.submitForm()\n }, this.debounceDelay)\n }\n\n submitForm(): void {\n this.element.requestSubmit()\n }\n}\n","/*!\n\n=========================================================\n* Soft UI Design System 3 PRO - v1.2.0\n=========================================================\n\n* Product Page: https://www.creative-tim.com/product/soft-ui-design-system\n* Copyright 2021 Creative Tim (https://www.creative-tim.com)\n\n* Coded by Creative Tim\n\n=========================================================\n\n* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\n*/\n\n// Function for smooth scroll to element\nfunction smoothToPricing(id) {\n if (document.getElementById(id)) {\n document.getElementById(id).scrollIntoView({\n behavior: 'smooth'\n });\n }\n}\n\n// Debounce function\nfunction debounce(func, wait, immediate) {\n var timeout;\n return function() {\n var context = this,\n args = arguments;\n clearTimeout(timeout);\n timeout = setTimeout(function() {\n timeout = null;\n if (!immediate) func.apply(context, args);\n }, wait);\n if (immediate && !timeout) func.apply(context, args);\n };\n};\n\n// initialization of Popovers\nvar popoverTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle=\"popover\"]'))\nvar popoverList = popoverTriggerList.map(function(popoverTriggerEl) {\n return new bootstrap.Popover(popoverTriggerEl)\n})\n\n// initialization of Tooltips\nvar tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle=\"tooltip\"]'))\nvar tooltipList = tooltipTriggerList.map(function(tooltipTriggerEl) {\n return new bootstrap.Tooltip(tooltipTriggerEl)\n})\n\n// helper for adding on all elements multiple attributes\nfunction setAttributes(el, options) {\n Object.keys(options).forEach(function(attr) {\n el.setAttribute(attr, options[attr]);\n })\n}\n\n// activate popovers\nvar popoverTriggerList = [].slice.call(document.querySelectorAll('[data-toggle=\"popover\"]'))\nvar popoverList = popoverTriggerList.map(function(popoverTriggerEl) {\n return new bootstrap.Popover(popoverTriggerEl)\n})\n\n// activate tooltips\nvar tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-toggle=\"tooltip\"]'))\nvar tooltipList = tooltipTriggerList.map(function(tooltipTriggerEl) {\n return new bootstrap.Tooltip(tooltipTriggerEl)\n})\n\n\nwindow.onload = function() {\n // Material Design Input function\n var inputs = document.querySelectorAll('input');\n\n for (var i = 0; i < inputs.length; i++) {\n inputs[i].addEventListener('focus', function(e) {\n this.parentElement.classList.add('is-focused');\n }, false);\n\n inputs[i].onkeyup = function(e) {\n if (this.value != \"\") {\n this.parentElement.classList.add('is-filled');\n } else {\n this.parentElement.classList.remove('is-filled');\n }\n };\n\n inputs[i].addEventListener('focusout', function(e) {\n if (this.value != \"\") {\n this.parentElement.classList.add('is-filled');\n }\n this.parentElement.classList.remove('is-focused');\n }, false);\n }\n\n // Ripple Effect\n var ripples = document.querySelectorAll('.btn');\n\n for (var i = 0; i < ripples.length; i++) {\n ripples[i].addEventListener('click', function(e) {\n var targetEl = e.target;\n var rippleDiv = targetEl.querySelector('.ripple');\n\n rippleDiv = document.createElement('span');\n rippleDiv.classList.add('ripple');\n rippleDiv.style.width = rippleDiv.style.height = Math.max(targetEl.offsetWidth, targetEl.offsetHeight) + 'px';\n targetEl.appendChild(rippleDiv);\n\n rippleDiv.style.left = (e.offsetX - rippleDiv.offsetWidth / 2) + 'px';\n rippleDiv.style.top = (e.offsetY - rippleDiv.offsetHeight / 2) + 'px';\n rippleDiv.classList.add('ripple');\n setTimeout(function() {\n rippleDiv.parentElement.removeChild(rippleDiv);\n }, 600);\n }, false);\n }\n};\n\n// Multi Level Dropdown\nfunction dropDown(a) {\n if (!document.querySelector('.dropdown-hover')) {\n event.stopPropagation();\n event.preventDefault();\n var multilevel = a.parentElement.parentElement.children;\n\n\n for (var i = 0; i < multilevel.length; i++) {\n if (multilevel[i].lastElementChild != a.parentElement.lastElementChild) {\n multilevel[i].lastElementChild.classList.remove('show');\n multilevel[i].firstElementChild.classList.remove('show');\n }\n }\n\n if (!a.nextElementSibling.classList.contains(\"show\")) {\n a.nextElementSibling.classList.add(\"show\");\n a.classList.add(\"show\");\n\n } else {\n a.nextElementSibling.classList.remove(\"show\");\n a.classList.remove(\"show\");\n\n }\n }\n}\n\n// Colored shadows from Cards\nif (document.querySelector('.blur-shadow-image')) {\n var shadowCards = document.querySelectorAll('.blur-shadow-image');\n var shadowCardsRounded = document.querySelectorAll('.blur-shadow-image.rounded-circle');\n\n if (shadowCardsRounded) {\n for (var i = 0; i < shadowCardsRounded.length; i++) {\n var div = document.createElement(\"DIV\");\n shadowCardsRounded[i].parentElement.appendChild(div);\n div.classList.add('colored-shadow', 'rounded');\n\n var currentSrc = shadowCardsRounded[i].children[0].getAttribute('src');\n var el = shadowCardsRounded[i].nextElementSibling;\n\n el.style.backgroundImage = 'url(' + currentSrc + ')';\n }\n }\n if (shadowCards) {\n for (var i = 0; i < shadowCards.length; i++) {\n var div = document.createElement(\"DIV\");\n shadowCards[i].parentElement.appendChild(div);\n div.classList.add('colored-shadow');\n\n var currentSrc = shadowCards[i].children[0].getAttribute('src');\n var el = shadowCards[i].nextElementSibling;\n\n el.style.backgroundImage = 'url(' + currentSrc + ')';\n }\n }\n}\n\n// Colored shadows for Avatars\nif (document.querySelector('.blur-shadow-avatar')) {\n var shadowCards = document.querySelectorAll('.blur-shadow-avatar');\n var shadowCardsRounded = document.querySelectorAll('.blur-shadow-avatar.rounded-circle');\n\n if (shadowCardsRounded) {\n for (var i = 0; i < shadowCardsRounded.length; i++) {\n\n var div = document.createElement(\"DIV\");\n shadowCardsRounded[i].parentElement.appendChild(div);\n div.classList.add('colored-shadow', 'rounded', 'start-0', 'end-0', 'mx-auto');\n\n var avatarClasses = ['avatar-xs', 'avatar-sm', 'avatar-lg', 'avatar-xl', 'avatar-xxl'];\n\n for (var k = 0; k < avatarClasses.length; k++) {\n if (shadowCardsRounded[i].firstElementChild.classList.contains(avatarClasses[k])) {\n div.classList.add(avatarClasses[k]);\n }\n }\n\n var currentSrc = shadowCardsRounded[i].children[0].getAttribute('src');\n var el = shadowCardsRounded[i].nextElementSibling;\n\n el.style.backgroundImage = 'url(' + currentSrc + ')';\n }\n }\n if (shadowCards) {\n\n for (var i = 0; i < shadowCards.length; i++) {\n\n var div = document.createElement(\"DIV\");\n shadowCards[i].parentElement.appendChild(div);\n div.classList.add('colored-shadow', 'start-0', 'end-0', 'mx-auto');\n\n var avatarClasses = ['avatar-xs', 'avatar-sm', 'avatar-lg', 'avatar-xl', 'avatar-xxl'];\n\n for (var k = 0; k < avatarClasses.length; k++) {\n if (shadowCards[i].firstElementChild.classList.contains(avatarClasses[k])) {\n div.classList.add(avatarClasses[k]);\n }\n }\n\n var currentSrc = shadowCards[i].children[0].getAttribute('src');\n var el = shadowCards[i].nextElementSibling;\n\n el.style.backgroundImage = 'url(' + currentSrc + ')';\n }\n }\n}\n\n//Google Maps\nif (document.querySelector('#google-maps')) {\n var myLatlng = new google.maps.LatLng(40.748817, -73.985428);\n var mapOptions = {\n zoom: 13,\n center: myLatlng,\n scrollwheel: false, //we disable de scroll over the map, it is a really annoing when you scroll through page\n styles: [{\n \"featureType\": \"administrative\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [{\n \"color\": \"#444444\"\n }]\n },\n {\n \"featureType\": \"landscape\",\n \"elementType\": \"all\",\n \"stylers\": [{\n \"color\": \"#f2f2f2\"\n }]\n },\n {\n \"featureType\": \"poi\",\n \"elementType\": \"all\",\n \"stylers\": [{\n \"visibility\": \"off\"\n }]\n },\n {\n \"featureType\": \"road\",\n \"elementType\": \"all\",\n \"stylers\": [{\n \"saturation\": -100\n }, {\n \"lightness\": 45\n }]\n },\n {\n \"featureType\": \"road.highway\",\n \"elementType\": \"all\",\n \"stylers\": [{\n \"visibility\": \"simplified\"\n }]\n },\n {\n \"featureType\": \"road.arterial\",\n \"elementType\": \"labels.icon\",\n \"stylers\": [{\n \"visibility\": \"off\"\n }]\n },\n {\n \"featureType\": \"transit\",\n \"elementType\": \"all\",\n \"stylers\": [{\n \"visibility\": \"off\"\n }]\n },\n {\n \"featureType\": \"water\",\n \"elementType\": \"all\",\n \"stylers\": [{\n \"color\": \"#C5CBF5\"\n }, {\n \"visibility\": \"on\"\n }]\n }\n ]\n };\n\n var map = new google.maps.Map(document.getElementById(\"google-maps\"), mapOptions);\n\n var marker = new google.maps.Marker({\n position: myLatlng,\n title: \"Hello World!\"\n });\n\n // To add the marker to the map, call setMap();\n marker.setMap(map);\n}\n\n// Tabs navigation\n\nvar total = document.querySelectorAll('.nav-pills');\n\ntotal.forEach(function(item, i) {\n var moving_div = document.createElement('div');\n var first_li = item.querySelector('li:first-child .nav-link');\n var tab = first_li.cloneNode();\n tab.innerHTML = \"-\";\n\n moving_div.classList.add('moving-tab', 'position-absolute', 'nav-link');\n moving_div.appendChild(tab);\n item.appendChild(moving_div);\n\n var list_length = item.getElementsByTagName(\"li\").length;\n\n moving_div.style.padding = '0px';\n moving_div.style.width = item.querySelector('li:nth-child(1)').offsetWidth + 'px';\n moving_div.style.transform = 'translate3d(0px, 0px, 0px)';\n moving_div.style.transition = '.5s ease';\n\n item.onmouseover = function(event) {\n let target = getEventTarget(event);\n let li = target.closest('li'); // get reference\n if (li) {\n let nodes = Array.from(li.closest('ul').children); // get array\n let index = nodes.indexOf(li) + 1;\n item.querySelector('li:nth-child(' + index + ') .nav-link').onclick = function() {\n moving_div = item.querySelector('.moving-tab');\n let sum = 0;\n if (item.classList.contains('flex-column')) {\n for (var j = 1; j <= nodes.indexOf(li); j++) {\n sum += item.querySelector('li:nth-child(' + j + ')').offsetHeight;\n }\n moving_div.style.transform = 'translate3d(0px,' + sum + 'px, 0px)';\n moving_div.style.height = item.querySelector('li:nth-child(' + j + ')').offsetHeight;\n } else {\n for (var j = 1; j <= nodes.indexOf(li); j++) {\n sum += item.querySelector('li:nth-child(' + j + ')').offsetWidth;\n }\n moving_div.style.transform = 'translate3d(' + sum + 'px, 0px, 0px)';\n moving_div.style.width = item.querySelector('li:nth-child(' + index + ')').offsetWidth + 'px';\n }\n }\n }\n }\n});\n\n\n// Tabs navigation resize\n\nwindow.addEventListener('resize', function(event) {\n total.forEach(function(item, i) {\n item.querySelector('.moving-tab').remove();\n var moving_div = document.createElement('div');\n var tab = item.querySelector(\".nav-link.active\").cloneNode();\n tab.innerHTML = \"-\";\n\n moving_div.classList.add('moving-tab', 'position-absolute', 'nav-link');\n moving_div.appendChild(tab);\n\n item.appendChild(moving_div);\n\n moving_div.style.padding = '0px';\n moving_div.style.transition = '.5s ease';\n\n let li = item.querySelector(\".nav-link.active\").parentElement;\n\n if (li) {\n let nodes = Array.from(li.closest('ul').children); // get array\n let index = nodes.indexOf(li) + 1;\n\n let sum = 0;\n if (item.classList.contains('flex-column')) {\n for (var j = 1; j <= nodes.indexOf(li); j++) {\n sum += item.querySelector('li:nth-child(' + j + ')').offsetHeight;\n }\n moving_div.style.transform = 'translate3d(0px,' + sum + 'px, 0px)';\n moving_div.style.width = item.querySelector('li:nth-child(' + index + ')').offsetWidth + 'px';\n moving_div.style.height = item.querySelector('li:nth-child(' + j + ')').offsetHeight;\n } else {\n for (var j = 1; j <= nodes.indexOf(li); j++) {\n sum += item.querySelector('li:nth-child(' + j + ')').offsetWidth;\n }\n moving_div.style.transform = 'translate3d(' + sum + 'px, 0px, 0px)';\n moving_div.style.width = item.querySelector('li:nth-child(' + index + ')').offsetWidth + 'px';\n\n }\n }\n });\n\n if (window.innerWidth < 991) {\n total.forEach(function(item, i) {\n if (!item.classList.contains('flex-column')) {\n item.classList.add('flex-column', 'on-resize');\n }\n });\n } else {\n total.forEach(function(item, i) {\n if (item.classList.contains('on-resize')) {\n item.classList.remove('flex-column', 'on-resize');\n }\n })\n }\n});\n\n\nfunction getEventTarget(e) {\n e = e || window.event;\n return e.target || e.srcElement;\n}\n\n// End tabs navigation\n\n\n// Copy code function\n\nfunction copyCode(el) {\n const selection = window.getSelection();\n const range = document.createRange();\n const textToCopy = el.nextElementSibling;\n range.selectNodeContents(textToCopy);\n selection.removeAllRanges();\n selection.addRange(range);\n const successful = document.execCommand('copy');\n window.getSelection().removeAllRanges()\n if (!el.parentElement.querySelector('.alert')) {\n var alert = document.createElement('div');\n alert.classList.add('alert', 'alert-success', 'position-absolute', 'top-0', 'border-0', 'text-white', 'w-25', 'end-0', 'start-0', 'mt-2', 'mx-auto', 'py-2');\n alert.style.transform = 'translate3d(0px, 0px, 0px)'\n alert.style.opacity = '0';\n alert.style.transition = '.35s ease';\n setTimeout(function() {\n alert.style.transform = 'translate3d(0px, 20px, 0px)';\n alert.style.setProperty(\"opacity\", \"1\", \"important\");\n }, 100);\n alert.innerHTML = \"Code successfully copied!\";\n el.parentElement.appendChild(alert);\n setTimeout(function() {\n alert.style.transform = 'translate3d(0px, 0px, 0px)'\n alert.style.setProperty(\"opacity\", \"0\", \"important\");\n }, 2000);\n setTimeout(function() {\n el.parentElement.querySelector('.alert').remove();\n }, 2500);\n }\n}\n\n// End copy code function","// To see this message, add the following to the `` section in your\n// views/layouts/application.html.erb\n//\n// <%= vite_client_tag %>\n// <%= vite_javascript_tag 'application' %>\nconsole.log('Vite ⚡️ Rails')\n\n// If using a TypeScript entrypoint file:\n// <%= vite_typescript_tag 'application' %>\n//\n// If you want to use .jsx or .tsx, add the extension:\n// <%= vite_javascript_tag 'application.jsx' %>\n\nconsole.log('Visit the guide for more information: ', 'https://vite-ruby.netlify.app/guide/rails')\n\n// Example: Load Rails libraries in Vite.\n//\n// import * as Turbo from '@hotwired/turbo'\n// Turbo.start()\n//\n// import ActiveStorage from '@rails/activestorage'\n// ActiveStorage.start()\n//\n// // Import all channels.\n// const channels = import.meta.globEager('./**/*_channel.js')\n\n// Example: Import a stylesheet in app/frontend/index.css\n// import '~/index.css'\n\nimport 'virtual:fonts.css'\nimport '@hotwired/turbo-rails'\n\nimport \"@fortawesome/fontawesome-free/css/all.css\";\nimport '../styles/soft-design-system-pro.scss';\nimport 'material-symbols';\n\nimport '@popperjs/core';\nimport 'bootstrap';\nimport '../js/soft-design-system-pro/soft-design-system-pro'\n\nimport '../js/jquery'\nimport '../js/select2'\nimport 'select2/dist/js/i18n/ru'\n\nimport moment from 'moment';\nimport 'moment/dist/locale/ru';\nmoment.locale('ru');\n\nimport {Application} from '@hotwired/stimulus'\nimport { registerControllers } from \"stimulus-vite-helpers\";\n\nconst application = Application.start()\nconst commonControllers = import.meta.glob(\n '../controllers/common/*_controller.{js,ts}', { eager: true }\n);\nconst publicControllers = import.meta.glob(\n '../controllers/public/*/*_controller.{js,ts}', { eager: true }\n);\nconst userControllers = import.meta.glob(\n '../controllers/*_controller.{js,ts}', { eager: true }\n);\n\nconst mergedControllers = {...commonControllers, ...publicControllers, ...userControllers};\n\nconsole.log(JSON.stringify(mergedControllers));\nregisterControllers(application, mergedControllers);\n\nconsole.log(\"Rails + Vite + Stimulus (TypeScript) loaded!\")"],"names":["window","factory","module","Colcade","element","options","getQueryElement","instance","instances","proto","extend","GUID","guid","errors","querySelect","column","style","items","item","minHeight","index","elems","makeArray","fragment","elem","boundingRect","i","lastChildRect","activeColumns","isSameLength","isSameColumns","event","docReady","dataElems","htmlInit","attr","attrParts","part","pair","key","value","id","$","arg0","args","methodCall","plainCall","$elems","methodName","returnValue","colcade","a","b","prop","obj","ary","selector","onReady","formatEventOccurrenceDate","date","moment","formatEventOccurrenceTime","startTime","endTime","formattedStartTime","formattedEndTime","formatMoney","amount","createVerticalEventOccurrenceElement","json","template","clone","_a","headerImage","headerImageContainer","eventOccurrenceLink","occurrenceDatePlaceholder","organizerPlaceholder","_b","_c","_d","typeNamePlaceholder","sportNamePlaceholder","metroStationsPlaceholder","_f","_e","participantsLevelsPlaceholder","pl","timePlaceholder","participantsTypesPlaceholder","_g","minCostPlaceholder","_grid_controller","Controller","entries","entry","currentUrl","url","response","newGridItems","error","grid_controller","_menu_controller$1","link","filterModal","menu_controller$1","emptyEventOccurrenceFilter","_modal_filter_controller$1","state","checkbox","input","bootstrap.Modal","filterValues","modal_filter_controller$1","_sidebar_filter_controller$1","sidebar_filter_controller$1","_menu_controller","menu_controller","modal_event_occurrences_controller","_modal_filter_controller","modal_filter_controller","_sidebar_filter_controller","targets","target","sidebar_filter_controller","DEFAULT_COORDINATES","_event_map_controller","regex","match","lng","lat","coords","Feature","Point","fromLonLat","Style","Icon","markerUrl","VectorSource","vectorLayer","VectorLayer","Map","TileLayer","OSM","View","defaultInteractions","event_map_controller","STYLES","ctx","CanvasGradient","CanvasPattern","namedEntities","format","str","keys","randomString","holder","chars","randomstring","createNamedToNumberedLookup","radix","entity","lookup","base10","getTextAnchor","textAlign","mapping","getDominantBaseline","textBaseline","gradientNode","offset","color","stop","matches","pattern","o","defaultOptions","elementName","properties","resetFill","styleState","type","node","fixNamedEntities","serialized","regexp","xmlns","group","parent","t","transform","x","y","angle","degrees","c","d","e","f","path","command","cp1x","cp1y","cp2x","cp2y","cpx","cpy","normalize","vector","len","x1","y1","x2","y2","radius","x0","y0","unit_vec_p1_p0","unit_vec_p1_p2","cos","theta","unit_vec_p1_origin","len_p1_origin","unit_vec_origin_start_tangent","unit_vec_origin_end_tangent","getAngle","startAngle","endAngle","width","height","rect","grad","r0","r1","fontPart","data","font","text","action","textElement","counterClockwise","endX","endY","startX","startY","sweepFlag","largeArcFlag","diff","clipPath","newGroup","image","dx","dy","dw","dh","sx","sy","sw","sh","svg","defs","currentElement","svgImage","canvas","context","repetition","img","createSegmentedCircleIcon","entityColors","count","size","scaleFactor","padding","canvas2svg","center","segments","fontSize","svgString","filterDefinition","parseWkt","wktPoint","parseEnvelopeWKT","wkt","parts","createHorizontalEventOccurrenceElement","eventTypePlaceholder","occurrenceDarePlaceholder","infoPlaceholder","markerStyleCache","getMarkerStyleKey","colors","number","_events_map_controller","eventName","zoomAttributeValue","zoom","centerAttributeValue","feature","eventOccurrencesCount","iconSrc","view","currentZoom","currentExtent","containsExtent","evt","map","eventOccurrenceIds","envelopeWKT","extent4326","extent3857","transformExtent","mapSize","resolutionForExtent","clusterCenterWKT","clusterCenter","idsParams","eventOccurrenceId","jsonItem","eventOccurrenceElement","modalEventOccurrencesContainer","modalEventOccurrencesContent","sidebarEventOccurrencesContainer","initialFilter","mobile","checkboxes","inputs","extent","bbox","currentCenter","filterSearchParams","toLonLat","values","requestUrl","features","geometry","events_map_controller","_filter_form_controller","filter_form_controller","popoverTriggerList","popoverTriggerEl","tooltipTriggerList","tooltipTriggerEl","ripples","targetEl","rippleDiv","shadowCards","shadowCardsRounded","div","currentSrc","el","avatarClasses","k","myLatlng","mapOptions","marker","total","moving_div","first_li","tab","li","getEventTarget","nodes","sum","j","application","Application","commonControllers","__vite_glob_0_0","__vite_glob_0_1","__vite_glob_0_2","__vite_glob_0_3","__vite_glob_0_4","__vite_glob_0_5","__vite_glob_0_6","__vite_glob_0_7","publicControllers","__vite_glob_1_0","__vite_glob_1_1","__vite_glob_1_2","__vite_glob_1_3","__vite_glob_1_4","__vite_glob_1_5","__vite_glob_1_6","__vite_glob_1_7","userControllers","__vite_glob_2_0","__vite_glob_2_1","__vite_glob_2_2","mergedControllers","registerControllers"],"mappings":";;;;;sDASE,SAAUA,EAAQC,EAAU,CAOaC,EAAO,QAE9CA,EAAA,QAAiBD,EAAS,EAG1BD,EAAO,QAAUC,EAAS,CAG9B,GAAG,OAAQ,UAAmB,CAI9B,SAASE,EAASC,EAASC,EAAU,CAInC,GAHAD,EAAUE,EAAiBF,CAAS,EAG/BA,GAAWA,EAAQ,YAAc,CACpC,IAAIG,EAAWC,EAAWJ,EAAQ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