{"version":3,"file":"discourse-local-dates.js","names":["define","_exports","_component","_object","_computed","_runloop","_object2","_computed2","_decorators","_environment","_localDates","_text","_discourseI18n","_localDateMarkupGenerator","_templateFactory","Object","defineProperty","value","default","__COLOCATED_TEMPLATE__","createTemplateFactory","id","block","moduleName","isStrictMode","LocalDatesCreate","timeFormat","dateFormat","dateTimeFormat","date","toDate","time","toTime","format","formats","recurring","advancedMode","timezone","fromSelected","toSelected","static","dt7948","g","this","prototype","notEmpty","fromFilled","i","toFilled","propertyNotEqual","timezoneIsDifferentFromUserTimezone","init","super","arguments","_picker","setProperties","timezones","siteSettings","discourse_local_dates_default_formats","split","filter","f","currentUserTimezone","moment","didInsertElement","send","configChanged","_renderPreview","n","observes","markup","result","cook","set","schedule","applyLocalDates","document","querySelectorAll","debounce","INPUT_DELAY","isRange","isValid","config","fromConfig","from","dateTime","toConfig","to","diff","options","length","undefined","timeInferred","tz","includes","create","range","endOf","computedConfig","currentUser","user_option","guess","allTimezones","names","formattedCurrentUserTimezone","replace","previewedFormats","map","preview","recurringOptions","key","name","i18n","_generateDateMarkup","fromDateTime","toDateTime","toggleModeBtnLabel","text","formattedFrom","formattedTo","updateFormat","event","preventDefault","action","selectedDate","selectedTime","changeSelectedDate","changeSelectedTime","eraseToDateTime","focusFrom","minDate","focusTo","get","toggleAdvancedMode","toggleProperty","save","closeModal","model","insertDate","cancel","setComponentTemplate","_owner","_service","_template","_downloadCalendar","_iconLibrary","_pluginApi","_toMarkdown","_localDatesCreate","_localDateBuilder","_richEditorExtension","dates","discourse_local_dates_enabled","currentUserTZ","forEach","element","index","arr","opts","buildOptionsFromElement","attributes","fromElement","toElement","_getDateFromElement","isSame","_rangeIsSameLocalDay","sameLocalDayAsFrom","localDateBuilder","build","innerText","insertAdjacentHTML","iconHTML","formatted","setAttribute","textPreview","classes","pastEvent","push","classList","add","dataset","_rangeElements","duration","startDataset","endDataset","dateElement","startDateTime","trim","_calculateDuration","discourse_local_dates_default_timezones","Boolean","calendar","displayedTimezone","countdown","buildOptionsFromMarkdownTag","parentElement","partitions","ranges","Array","children","span","splice","_partitionedRanges","find","pair","initializeDiscourseLocalDates","api","registerRichEditorExtension","modal","container","lookup","defaultTitle","site_name","title","decorateCookedElement","elem","helper","topicTitle","getModel","topic","onToolbarCreate","toolbar","addButton","group","icon","perform","show","addText","shortcut","shortcutAction","getCurrentUser","addTextDecorateCallback","nextElement","_previousElement","metadata","discourseLocalDateStartRangeOpts","class","addTagDecorateCallback","startRangeOpts","endRangeOpts","prefix","buildHtmlPreview","htmlPreviews","previews","previewNode","createElement","current","timezoneNode","appendChild","dateTimeNode","innerHTML","previewsNode","htmlPreview","calendarNode","startDate","endDate","calculateStartAndEndDate","node","renderIcon","toISOString","_downloadCalendarNode","outerHTML","LocalDatesInit","service","tooltip","constructor","owner","setOwner","window","addEventListener","showDatePopover","passive","withPluginApi","target","contains","downloadCalendar","startsAt","endsAt","close","identifier","content","htmlSafe","bind","teardown","removeEventListener","initialize","instance","DateWithZoneHelper","fromDatetime","datetime","localTimezone","year","month","day","hour","minute","second","params","getProperties","isDST","unitRepetitionsBetweenDates","count","unit","Math","abs","fractional","trunc","parseInt","_fromDatetime","clone","subtract","datetimeWithZone","setup","allowList","registerOptions","datesEmailFormat","discourse_local_dates_email_format","features","registerPlugin","md","core","textPostProcess","ruler","matcher","onMatch","link","timezoneNames","addLocalDate","state","buffer","applyDataAttributes","join","_default","emailFormat","discourse","defaultFormat","emailPreview","utc","token","Token","attrs","matches","_ref","parseBBCodeTag","parsed","tag","_ref2","_dateWithZoneHelper","TIME_FORMAT","Set","x","localDate","isAfter","type","repetitionsForType","_generatePreviews","hasTime","_applyFormatting","_generateTextPreviews","_zoneWithoutPrefix","previewedTimezones","_isEqualZones","_createDateTimeRange","any","t","unshift","uniqBy","timezoneA","timezoneB","utcOffset","startRange","_calculateDatesForRange","formatElements","_optionalTimeIcon","concat","_endDateFormat","_shortFormat","reverse","diffTime","humanize","sameTimezone","inCalendarRange","isBetween","_timeOnlyFormat","hours","minutes","_calendarFormats","_formatWithZone","sameDay","_translateCalendarKey","nextDay","lastDay","sameElse","translated","w","_formatTimezone","part1","part2","localTime","_utils","isEmpty","isArray","extension","nodeSpec","local_date","atom","inline","parseDOM","getAttrs","dom","getAttribute","toDOM","optionalTime","local_date_range","fromDate","fromTime","fromTimeStr","toTimeStr","parse","span_open","tokens","attrGet","openNode","schema","nodes","__localDateRange","top","span_close","closeNode","serializeNode","utils","isBoundary","parent","out","write","optionalTimezone","nextSibling","childCount","child","isText"],"sources":["discourse/plugins/discourse-local-dates/discourse/components/modal/local-dates-create.js","discourse/plugins/discourse-local-dates/initializers/discourse-local-dates.js","discourse/plugins/discourse-local-dates/lib/date-with-zone-helper.js","discourse/plugins/discourse-local-dates/lib/discourse-markdown/discourse-local-dates.js","discourse/plugins/discourse-local-dates/lib/local-date-builder.js","discourse/plugins/discourse-local-dates/lib/local-date-markup-generator.js","discourse/plugins/discourse-local-dates/lib/rich-editor-extension.js"],"sourcesContent":["define(\"discourse/plugins/discourse-local-dates/discourse/components/modal/local-dates-create\", [\"exports\", \"@ember/component\", \"@ember/object\", \"@ember/object/computed\", \"@ember/runloop\", \"@ember-decorators/object\", \"discourse/lib/computed\", \"discourse/lib/decorators\", \"discourse/lib/environment\", \"discourse/lib/local-dates\", \"discourse/lib/text\", \"discourse-i18n\", \"discourse/plugins/discourse-local-dates/lib/local-date-markup-generator\", \"@ember/template-factory\"], function (_exports, _component, _object, _computed, _runloop, _object2, _computed2, _decorators, _environment, _localDates, _text, _discourseI18n, _localDateMarkupGenerator, _templateFactory) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  const __COLOCATED_TEMPLATE__ = (0, _templateFactory.createTemplateFactory)(\n  /*\n    <DModal\n    @title={{i18n \"discourse_local_dates.title\"}}\n    @closeModal={{@closeModal}}\n    class=\"discourse-local-dates-create-modal -large\"\n  >\n    <:body>\n      <div class=\"form\">\n        {{#if this.isValid}}\n          {{#if this.timezoneIsDifferentFromUserTimezone}}\n            <div class=\"preview alert alert-info\">\n              {{i18n \"discourse_local_dates.create.form.current_timezone\"}}\n              <b>{{this.formattedCurrentUserTimezone}}</b>{{this.currentPreview}}\n            </div>\n          {{/if}}\n        {{else}}\n          <div class=\"validation-error alert alert-error\">\n            {{i18n \"discourse_local_dates.create.form.invalid_date\"}}\n          </div>\n        {{/if}}\n  \n        {{this.computeDate}}\n  \n        <div class=\"date-time-configuration\">\n          <div class=\"inputs-panel\">\n            <div\n              class=\"date-time-control from\n                {{if this.fromSelected 'is-selected'}}\n                {{if this.fromFilled 'is-filled'}}\"\n            >\n              {{d-icon \"calendar-days\"}}\n              <DButton\n                @action={{this.focusFrom}}\n                @translatedLabel={{this.formattedFrom}}\n                id=\"from-date-time\"\n                class=\"date-time\"\n                autofocus\n              />\n            </div>\n  \n            <div\n              class=\"date-time-control to\n                {{if this.toSelected 'is-selected'}}\n                {{if this.toFilled 'is-filled'}}\"\n            >\n              {{d-icon \"calendar-days\"}}\n              <DButton\n                @action={{this.focusTo}}\n                @translatedLabel={{this.formattedTo}}\n                class=\"date-time\"\n              />\n              {{#if this.toFilled}}\n                <DButton\n                  @action={{this.eraseToDateTime}}\n                  @icon=\"xmark\"\n                  class=\"delete-to-date\"\n                />\n              {{/if}}\n            </div>\n  \n            {{#if this.site.desktopView}}\n              <TimezoneInput\n                @options={{hash icon=\"globe\"}}\n                @value={{this.timezone}}\n                @onChange={{fn (mut this.timezone)}}\n              />\n            {{/if}}\n          </div>\n  \n          <div class=\"picker-panel\">\n            <CalendarDateTimeInput\n              @datePickerId=\"local-date-create-form\"\n              @date={{this.selectedDate}}\n              @time={{this.selectedTime}}\n              @minDate={{this.minDate}}\n              @timeFormat={{this.timeFormat}}\n              @dateFormat={{this.dateFormat}}\n              @onChangeDate={{this.changeSelectedDate}}\n              @onChangeTime={{this.changeSelectedTime}}\n            />\n          </div>\n  \n          {{#if this.site.mobileView}}\n            <TimezoneInput\n              @value={{this.timezone}}\n              @options={{hash icon=\"globe\"}}\n              @onChange={{fn (mut this.timezone)}}\n            />\n          {{/if}}\n        </div>\n  \n        {{#if this.advancedMode}}\n          <div class=\"advanced-options\">\n            {{#unless this.isRange}}\n              <div class=\"control-group recurrence\">\n                <label class=\"control-label\">\n                  {{i18n \"discourse_local_dates.create.form.recurring_title\"}}\n                </label>\n                <p>{{html-safe\n                    (i18n\n                      \"discourse_local_dates.create.form.recurring_description\"\n                    )\n                  }}</p>\n                <div class=\"controls\">\n                  <ComboBox\n                    @content={{this.recurringOptions}}\n                    @value={{this.recurring}}\n                    @onChange={{fn (mut this.recurring)}}\n                    @options={{hash\n                      none=\"discourse_local_dates.create.form.recurring_none\"\n                    }}\n                    class=\"recurrence-input\"\n                  />\n                </div>\n              </div>\n            {{/unless}}\n  \n            <div class=\"control-group timezones\">\n              <label>{{i18n\n                  \"discourse_local_dates.create.form.timezones_title\"\n                }}</label>\n              <p>{{i18n\n                  \"discourse_local_dates.create.form.timezones_description\"\n                }}</p>\n              <div class=\"controls\">\n                <MultiSelect\n                  @valueProperty={{null}}\n                  @nameProperty={{null}}\n                  @content={{this.allTimezones}}\n                  @value={{this.timezones}}\n                  @options={{hash allowAny=false maximum=5}}\n                  class=\"timezones-input\"\n                />\n              </div>\n            </div>\n  \n            <div class=\"control-group format\">\n              <label>{{i18n\n                  \"discourse_local_dates.create.form.format_title\"\n                }}</label>\n              <p>\n                {{i18n \"discourse_local_dates.create.form.format_description\"}}\n                <a\n                  target=\"_blank\"\n                  href=\"https://momentjs.com/docs/#/parsing/string-format/\"\n                  rel=\"noopener noreferrer\"\n                >\n                  {{d-icon \"circle-question\"}}\n                </a>\n              </p>\n              <div class=\"controls\">\n                <TextField @value={{this.format}} class=\"format-input\" />\n              </div>\n            </div>\n            <div class=\"control-group\">\n              <ul class=\"formats\">\n                {{#each this.previewedFormats as |previewedFormat|}}\n                  <li class=\"format\">\n                    <a\n                      class=\"moment-format\"\n                      href\n                      {{on \"click\" (fn this.updateFormat previewedFormat.format)}}\n                    >\n                      {{previewedFormat.format}}\n                    </a>\n                    <span class=\"previewed-format\">\n                      {{previewedFormat.preview}}\n                    </span>\n                  </li>\n                {{/each}}\n              </ul>\n            </div>\n          </div>\n        {{/if}}\n      </div>\n    </:body>\n  \n    <:footer>\n  \n      {{#if this.isValid}}\n        <DButton\n          @action={{this.save}}\n          @label=\"discourse_local_dates.create.form.insert\"\n          class=\"btn-primary\"\n        />\n      {{/if}}\n  \n      <DButton\n        @action={{this.cancel}}\n        @translatedLabel={{i18n \"cancel\"}}\n        class=\"btn-flat\"\n      />\n  \n      <DButton\n        @action={{this.toggleAdvancedMode}}\n        @icon=\"gear\"\n        @label={{this.toggleModeBtnLabel}}\n        class=\"btn-default advanced-mode-btn\"\n      />\n    </:footer>\n  </DModal>\n  */\n  {\n    \"id\": \"ORvZ3FVH\",\n    \"block\": \"[[[8,[39,0],[[24,0,\\\"discourse-local-dates-create-modal -large\\\"]],[[\\\"@title\\\",\\\"@closeModal\\\"],[[28,[37,1],[\\\"discourse_local_dates.title\\\"],null],[30,1]]],[[\\\"body\\\",\\\"footer\\\"],[[[[1,\\\"\\\\n    \\\"],[10,0],[14,0,\\\"form\\\"],[12],[1,\\\"\\\\n\\\"],[41,[30,0,[\\\"isValid\\\"]],[[[41,[30,0,[\\\"timezoneIsDifferentFromUserTimezone\\\"]],[[[1,\\\"          \\\"],[10,0],[14,0,\\\"preview alert alert-info\\\"],[12],[1,\\\"\\\\n            \\\"],[1,[28,[35,1],[\\\"discourse_local_dates.create.form.current_timezone\\\"],null]],[1,\\\"\\\\n            \\\"],[10,\\\"b\\\"],[12],[1,[30,0,[\\\"formattedCurrentUserTimezone\\\"]]],[13],[1,[30,0,[\\\"currentPreview\\\"]]],[1,\\\"\\\\n          \\\"],[13],[1,\\\"\\\\n\\\"]],[]],null]],[]],[[[1,\\\"        \\\"],[10,0],[14,0,\\\"validation-error alert alert-error\\\"],[12],[1,\\\"\\\\n          \\\"],[1,[28,[35,1],[\\\"discourse_local_dates.create.form.invalid_date\\\"],null]],[1,\\\"\\\\n        \\\"],[13],[1,\\\"\\\\n\\\"]],[]]],[1,\\\"\\\\n      \\\"],[1,[30,0,[\\\"computeDate\\\"]]],[1,\\\"\\\\n\\\\n      \\\"],[10,0],[14,0,\\\"date-time-configuration\\\"],[12],[1,\\\"\\\\n        \\\"],[10,0],[14,0,\\\"inputs-panel\\\"],[12],[1,\\\"\\\\n          \\\"],[10,0],[15,0,[29,[\\\"date-time-control from\\\\n              \\\",[52,[30,0,[\\\"fromSelected\\\"]],\\\"is-selected\\\"],\\\"\\\\n              \\\",[52,[30,0,[\\\"fromFilled\\\"]],\\\"is-filled\\\"]]]],[12],[1,\\\"\\\\n            \\\"],[1,[28,[35,6],[\\\"calendar-days\\\"],null]],[1,\\\"\\\\n            \\\"],[8,[39,7],[[24,1,\\\"from-date-time\\\"],[24,0,\\\"date-time\\\"],[24,\\\"autofocus\\\",\\\"\\\"]],[[\\\"@action\\\",\\\"@translatedLabel\\\"],[[30,0,[\\\"focusFrom\\\"]],[30,0,[\\\"formattedFrom\\\"]]]],null],[1,\\\"\\\\n          \\\"],[13],[1,\\\"\\\\n\\\\n          \\\"],[10,0],[15,0,[29,[\\\"date-time-control to\\\\n              \\\",[52,[30,0,[\\\"toSelected\\\"]],\\\"is-selected\\\"],\\\"\\\\n              \\\",[52,[30,0,[\\\"toFilled\\\"]],\\\"is-filled\\\"]]]],[12],[1,\\\"\\\\n            \\\"],[1,[28,[35,6],[\\\"calendar-days\\\"],null]],[1,\\\"\\\\n            \\\"],[8,[39,7],[[24,0,\\\"date-time\\\"]],[[\\\"@action\\\",\\\"@translatedLabel\\\"],[[30,0,[\\\"focusTo\\\"]],[30,0,[\\\"formattedTo\\\"]]]],null],[1,\\\"\\\\n\\\"],[41,[30,0,[\\\"toFilled\\\"]],[[[1,\\\"              \\\"],[8,[39,7],[[24,0,\\\"delete-to-date\\\"]],[[\\\"@action\\\",\\\"@icon\\\"],[[30,0,[\\\"eraseToDateTime\\\"]],\\\"xmark\\\"]],null],[1,\\\"\\\\n\\\"]],[]],null],[1,\\\"          \\\"],[13],[1,\\\"\\\\n\\\\n\\\"],[41,[30,0,[\\\"site\\\",\\\"desktopView\\\"]],[[[1,\\\"            \\\"],[8,[39,8],null,[[\\\"@options\\\",\\\"@value\\\",\\\"@onChange\\\"],[[28,[37,9],null,[[\\\"icon\\\"],[\\\"globe\\\"]]],[30,0,[\\\"timezone\\\"]],[28,[37,10],[[28,[37,11],[[30,0,[\\\"timezone\\\"]]],null]],null]]],null],[1,\\\"\\\\n\\\"]],[]],null],[1,\\\"        \\\"],[13],[1,\\\"\\\\n\\\\n        \\\"],[10,0],[14,0,\\\"picker-panel\\\"],[12],[1,\\\"\\\\n          \\\"],[8,[39,12],null,[[\\\"@datePickerId\\\",\\\"@date\\\",\\\"@time\\\",\\\"@minDate\\\",\\\"@timeFormat\\\",\\\"@dateFormat\\\",\\\"@onChangeDate\\\",\\\"@onChangeTime\\\"],[\\\"local-date-create-form\\\",[30,0,[\\\"selectedDate\\\"]],[30,0,[\\\"selectedTime\\\"]],[30,0,[\\\"minDate\\\"]],[30,0,[\\\"timeFormat\\\"]],[30,0,[\\\"dateFormat\\\"]],[30,0,[\\\"changeSelectedDate\\\"]],[30,0,[\\\"changeSelectedTime\\\"]]]],null],[1,\\\"\\\\n        \\\"],[13],[1,\\\"\\\\n\\\\n\\\"],[41,[30,0,[\\\"site\\\",\\\"mobileView\\\"]],[[[1,\\\"          \\\"],[8,[39,8],null,[[\\\"@value\\\",\\\"@options\\\",\\\"@onChange\\\"],[[30,0,[\\\"timezone\\\"]],[28,[37,9],null,[[\\\"icon\\\"],[\\\"globe\\\"]]],[28,[37,10],[[28,[37,11],[[30,0,[\\\"timezone\\\"]]],null]],null]]],null],[1,\\\"\\\\n\\\"]],[]],null],[1,\\\"      \\\"],[13],[1,\\\"\\\\n\\\\n\\\"],[41,[30,0,[\\\"advancedMode\\\"]],[[[1,\\\"        \\\"],[10,0],[14,0,\\\"advanced-options\\\"],[12],[1,\\\"\\\\n\\\"],[41,[51,[30,0,[\\\"isRange\\\"]]],[[[1,\\\"            \\\"],[10,0],[14,0,\\\"control-group recurrence\\\"],[12],[1,\\\"\\\\n              \\\"],[10,\\\"label\\\"],[14,0,\\\"control-label\\\"],[12],[1,\\\"\\\\n                \\\"],[1,[28,[35,1],[\\\"discourse_local_dates.create.form.recurring_title\\\"],null]],[1,\\\"\\\\n              \\\"],[13],[1,\\\"\\\\n              \\\"],[10,2],[12],[1,[28,[35,16],[[28,[37,1],[\\\"discourse_local_dates.create.form.recurring_description\\\"],null]],null]],[13],[1,\\\"\\\\n              \\\"],[10,0],[14,0,\\\"controls\\\"],[12],[1,\\\"\\\\n                \\\"],[8,[39,17],[[24,0,\\\"recurrence-input\\\"]],[[\\\"@content\\\",\\\"@value\\\",\\\"@onChange\\\",\\\"@options\\\"],[[30,0,[\\\"recurringOptions\\\"]],[30,0,[\\\"recurring\\\"]],[28,[37,10],[[28,[37,11],[[30,0,[\\\"recurring\\\"]]],null]],null],[28,[37,9],null,[[\\\"none\\\"],[\\\"discourse_local_dates.create.form.recurring_none\\\"]]]]],null],[1,\\\"\\\\n              \\\"],[13],[1,\\\"\\\\n            \\\"],[13],[1,\\\"\\\\n\\\"]],[]],null],[1,\\\"\\\\n          \\\"],[10,0],[14,0,\\\"control-group timezones\\\"],[12],[1,\\\"\\\\n            \\\"],[10,\\\"label\\\"],[12],[1,[28,[35,1],[\\\"discourse_local_dates.create.form.timezones_title\\\"],null]],[13],[1,\\\"\\\\n            \\\"],[10,2],[12],[1,[28,[35,1],[\\\"discourse_local_dates.create.form.timezones_description\\\"],null]],[13],[1,\\\"\\\\n            \\\"],[10,0],[14,0,\\\"controls\\\"],[12],[1,\\\"\\\\n              \\\"],[8,[39,18],[[24,0,\\\"timezones-input\\\"]],[[\\\"@valueProperty\\\",\\\"@nameProperty\\\",\\\"@content\\\",\\\"@value\\\",\\\"@options\\\"],[null,null,[30,0,[\\\"allTimezones\\\"]],[30,0,[\\\"timezones\\\"]],[28,[37,9],null,[[\\\"allowAny\\\",\\\"maximum\\\"],[false,5]]]]],null],[1,\\\"\\\\n            \\\"],[13],[1,\\\"\\\\n          \\\"],[13],[1,\\\"\\\\n\\\\n          \\\"],[10,0],[14,0,\\\"control-group format\\\"],[12],[1,\\\"\\\\n            \\\"],[10,\\\"label\\\"],[12],[1,[28,[35,1],[\\\"discourse_local_dates.create.form.format_title\\\"],null]],[13],[1,\\\"\\\\n            \\\"],[10,2],[12],[1,\\\"\\\\n              \\\"],[1,[28,[35,1],[\\\"discourse_local_dates.create.form.format_description\\\"],null]],[1,\\\"\\\\n              \\\"],[10,3],[14,\\\"target\\\",\\\"_blank\\\"],[14,6,\\\"https://momentjs.com/docs/#/parsing/string-format/\\\"],[14,\\\"rel\\\",\\\"noopener noreferrer\\\"],[12],[1,\\\"\\\\n                \\\"],[1,[28,[35,6],[\\\"circle-question\\\"],null]],[1,\\\"\\\\n              \\\"],[13],[1,\\\"\\\\n            \\\"],[13],[1,\\\"\\\\n            \\\"],[10,0],[14,0,\\\"controls\\\"],[12],[1,\\\"\\\\n              \\\"],[8,[39,20],[[24,0,\\\"format-input\\\"]],[[\\\"@value\\\"],[[30,0,[\\\"format\\\"]]]],null],[1,\\\"\\\\n            \\\"],[13],[1,\\\"\\\\n          \\\"],[13],[1,\\\"\\\\n          \\\"],[10,0],[14,0,\\\"control-group\\\"],[12],[1,\\\"\\\\n            \\\"],[10,\\\"ul\\\"],[14,0,\\\"formats\\\"],[12],[1,\\\"\\\\n\\\"],[42,[28,[37,23],[[28,[37,23],[[30,0,[\\\"previewedFormats\\\"]]],null]],null],null,[[[1,\\\"                \\\"],[10,\\\"li\\\"],[14,0,\\\"format\\\"],[12],[1,\\\"\\\\n                  \\\"],[11,3],[24,0,\\\"moment-format\\\"],[24,6,\\\"\\\"],[4,[38,25],[\\\"click\\\",[28,[37,10],[[30,0,[\\\"updateFormat\\\"]],[30,2,[\\\"format\\\"]]],null]],null],[12],[1,\\\"\\\\n                    \\\"],[1,[30,2,[\\\"format\\\"]]],[1,\\\"\\\\n                  \\\"],[13],[1,\\\"\\\\n                  \\\"],[10,1],[14,0,\\\"previewed-format\\\"],[12],[1,\\\"\\\\n                    \\\"],[1,[30,2,[\\\"preview\\\"]]],[1,\\\"\\\\n                  \\\"],[13],[1,\\\"\\\\n                \\\"],[13],[1,\\\"\\\\n\\\"]],[2]],null],[1,\\\"            \\\"],[13],[1,\\\"\\\\n          \\\"],[13],[1,\\\"\\\\n        \\\"],[13],[1,\\\"\\\\n\\\"]],[]],null],[1,\\\"    \\\"],[13],[1,\\\"\\\\n  \\\"]],[]],[[[1,\\\"\\\\n\\\\n\\\"],[41,[30,0,[\\\"isValid\\\"]],[[[1,\\\"      \\\"],[8,[39,7],[[24,0,\\\"btn-primary\\\"]],[[\\\"@action\\\",\\\"@label\\\"],[[30,0,[\\\"save\\\"]],\\\"discourse_local_dates.create.form.insert\\\"]],null],[1,\\\"\\\\n\\\"]],[]],null],[1,\\\"\\\\n    \\\"],[8,[39,7],[[24,0,\\\"btn-flat\\\"]],[[\\\"@action\\\",\\\"@translatedLabel\\\"],[[30,0,[\\\"cancel\\\"]],[28,[37,1],[\\\"cancel\\\"],null]]],null],[1,\\\"\\\\n\\\\n    \\\"],[8,[39,7],[[24,0,\\\"btn-default advanced-mode-btn\\\"]],[[\\\"@action\\\",\\\"@icon\\\",\\\"@label\\\"],[[30,0,[\\\"toggleAdvancedMode\\\"]],\\\"gear\\\",[30,0,[\\\"toggleModeBtnLabel\\\"]]]],null],[1,\\\"\\\\n  \\\"]],[]]]]]],[\\\"@closeModal\\\",\\\"previewedFormat\\\"],false,[\\\"d-modal\\\",\\\"i18n\\\",\\\":body\\\",\\\"div\\\",\\\"if\\\",\\\"b\\\",\\\"d-icon\\\",\\\"d-button\\\",\\\"timezone-input\\\",\\\"hash\\\",\\\"fn\\\",\\\"mut\\\",\\\"calendar-date-time-input\\\",\\\"unless\\\",\\\"label\\\",\\\"p\\\",\\\"html-safe\\\",\\\"combo-box\\\",\\\"multi-select\\\",\\\"a\\\",\\\"text-field\\\",\\\"ul\\\",\\\"each\\\",\\\"-track-array\\\",\\\"li\\\",\\\"on\\\",\\\"span\\\",\\\":footer\\\"]]\",\n    \"moduleName\": \"discourse/plugins/discourse-local-dates/discourse/components/modal/local-dates-create.hbs\",\n    \"isStrictMode\": false\n  });\n  class LocalDatesCreate extends _component.default {\n    timeFormat = \"HH:mm:ss\";\n    dateFormat = \"YYYY-MM-DD\";\n    dateTimeFormat = \"YYYY-MM-DD HH:mm:ss\";\n    date = null;\n    toDate = null;\n    time = null;\n    toTime = null;\n    format = null;\n    formats = null;\n    recurring = null;\n    advancedMode = false;\n    timezone = null;\n    fromSelected = null;\n    toSelected = null;\n    static #_ = (() => dt7948.g(this.prototype, \"fromFilled\", [(0, _computed.notEmpty)(\"date\")]))();\n    #fromFilled = (() => (dt7948.i(this, \"fromFilled\"), void 0))();\n    static #_2 = (() => dt7948.g(this.prototype, \"toFilled\", [(0, _computed.notEmpty)(\"toDate\")]))();\n    #toFilled = (() => (dt7948.i(this, \"toFilled\"), void 0))();\n    static #_3 = (() => dt7948.g(this.prototype, \"timezoneIsDifferentFromUserTimezone\", [(0, _computed2.propertyNotEqual)(\"currentUserTimezone\", \"options.timezone\")]))();\n    #timezoneIsDifferentFromUserTimezone = (() => (dt7948.i(this, \"timezoneIsDifferentFromUserTimezone\"), void 0))();\n    init() {\n      super.init(...arguments);\n      this._picker = null;\n      this.setProperties({\n        timezones: [],\n        formats: (this.siteSettings.discourse_local_dates_default_formats || \"\").split(\"|\").filter(f => f),\n        timezone: this.currentUserTimezone,\n        date: moment().format(this.dateFormat)\n      });\n    }\n    didInsertElement() {\n      super.didInsertElement(...arguments);\n      this.send(\"focusFrom\");\n    }\n    configChanged() {\n      this._renderPreview();\n    }\n    static #_4 = (() => dt7948.n(this.prototype, \"configChanged\", [(0, _object2.observes)(\"computedConfig.{from,to,options}\", \"options\", \"isValid\", \"isRange\")]))();\n    async _renderPreview() {\n      if (this.markup) {\n        const result = await (0, _text.cook)(this.markup);\n        this.set(\"currentPreview\", result);\n        (0, _runloop.schedule)(\"afterRender\", () => {\n          (0, _localDates.applyLocalDates)(document.querySelectorAll(\".preview .discourse-local-date\"), this.siteSettings);\n        });\n      }\n    }\n    static #_5 = (() => dt7948.n(this.prototype, \"_renderPreview\", [(0, _decorators.debounce)(_environment.INPUT_DELAY)]))();\n    isRange(date, toDate, toTime) {\n      return date && (toDate || toTime);\n    }\n    static #_6 = (() => dt7948.n(this.prototype, \"isRange\", [(0, _decorators.default)(\"date\", \"toDate\", \"toTime\")]))();\n    isValid(config, isRange) {\n      const fromConfig = config.from;\n      if (!config.from.dateTime || !config.from.dateTime.isValid()) {\n        return false;\n      }\n      if (isRange) {\n        const toConfig = config.to;\n        if (!toConfig.dateTime || !toConfig.dateTime.isValid() || toConfig.dateTime.diff(fromConfig.dateTime) < 0) {\n          return false;\n        }\n      }\n      return true;\n    }\n    static #_7 = (() => dt7948.n(this.prototype, \"isValid\", [(0, _decorators.default)(\"computedConfig\", \"isRange\")]))();\n    fromConfig(date, time, isRange) {\n      let options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n      const timeInferred = time ? false : true;\n      let dateTime;\n      if (!timeInferred) {\n        dateTime = moment.tz(`${date} ${time}`, options.timezone);\n      } else {\n        dateTime = moment.tz(date, options.timezone);\n      }\n      if (!timeInferred) {\n        time = dateTime.format(this.timeFormat);\n      }\n      let format = options.format;\n      if (timeInferred && this.formats.includes(format)) {\n        format = \"LL\";\n      }\n      return _object.default.create({\n        date: dateTime.format(this.dateFormat),\n        time,\n        dateTime,\n        format,\n        range: isRange ? \"start\" : false\n      });\n    }\n    static #_8 = (() => dt7948.n(this.prototype, \"fromConfig\", [(0, _decorators.default)(\"date\", \"time\", \"isRange\", \"options.{format,timezone}\")]))();\n    toConfig(date, time, isRange) {\n      let options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n      const timeInferred = time ? false : true;\n      if (time && !date) {\n        date = moment().format(this.dateFormat);\n      }\n      let dateTime;\n      if (!timeInferred) {\n        dateTime = moment.tz(`${date} ${time}`, options.timezone);\n      } else {\n        dateTime = moment.tz(date, options.timezone).endOf(\"day\");\n      }\n      if (!timeInferred) {\n        time = dateTime.format(this.timeFormat);\n      }\n      let format = options.format;\n      if (timeInferred && this.formats.includes(format)) {\n        format = \"LL\";\n      }\n      return _object.default.create({\n        date: dateTime.format(this.dateFormat),\n        time,\n        dateTime,\n        format,\n        range: isRange ? \"end\" : false\n      });\n    }\n    static #_9 = (() => dt7948.n(this.prototype, \"toConfig\", [(0, _decorators.default)(\"toDate\", \"toTime\", \"isRange\", \"options.{timezone,format}\")]))();\n    options(recurring, timezones, timezone, format) {\n      return _object.default.create({\n        recurring,\n        timezones,\n        timezone,\n        format\n      });\n    }\n    static #_10 = (() => dt7948.n(this.prototype, \"options\", [(0, _decorators.default)(\"recurring\", \"timezones\", \"timezone\", \"format\")]))();\n    computedConfig(fromConfig, toConfig, options) {\n      return _object.default.create({\n        from: fromConfig,\n        to: toConfig,\n        options\n      });\n    }\n    static #_11 = (() => dt7948.n(this.prototype, \"computedConfig\", [(0, _decorators.default)(\"fromConfig.{date}\", \"toConfig.{date}\", \"options.{recurring,timezones,timezone,format}\")]))();\n    currentUserTimezone() {\n      return this.currentUser.user_option.timezone || moment.tz.guess();\n    }\n    static #_12 = (() => dt7948.n(this.prototype, \"currentUserTimezone\", [_decorators.default]))();\n    allTimezones() {\n      return moment.tz.names();\n    }\n    static #_13 = (() => dt7948.n(this.prototype, \"allTimezones\", [_decorators.default]))();\n    formattedCurrentUserTimezone(timezone) {\n      return timezone.replace(\"_\", \" \").replace(\"Etc/\", \"\").replace(\"/\", \", \");\n    }\n    static #_14 = (() => dt7948.n(this.prototype, \"formattedCurrentUserTimezone\", [(0, _decorators.default)(\"currentUserTimezone\")]))();\n    previewedFormats(formats) {\n      return formats.map(format => {\n        return {\n          format,\n          preview: moment().format(format)\n        };\n      });\n    }\n    static #_15 = (() => dt7948.n(this.prototype, \"previewedFormats\", [(0, _decorators.default)(\"formats\")]))();\n    recurringOptions() {\n      const key = \"discourse_local_dates.create.form.recurring\";\n      return [{\n        name: (0, _discourseI18n.i18n)(`${key}.every_day`),\n        id: \"1.days\"\n      }, {\n        name: (0, _discourseI18n.i18n)(`${key}.every_week`),\n        id: \"1.weeks\"\n      }, {\n        name: (0, _discourseI18n.i18n)(`${key}.every_two_weeks`),\n        id: \"2.weeks\"\n      }, {\n        name: (0, _discourseI18n.i18n)(`${key}.every_month`),\n        id: \"1.months\"\n      }, {\n        name: (0, _discourseI18n.i18n)(`${key}.every_two_months`),\n        id: \"2.months\"\n      }, {\n        name: (0, _discourseI18n.i18n)(`${key}.every_three_months`),\n        id: \"3.months\"\n      }, {\n        name: (0, _discourseI18n.i18n)(`${key}.every_six_months`),\n        id: \"6.months\"\n      }, {\n        name: (0, _discourseI18n.i18n)(`${key}.every_year`),\n        id: \"1.years\"\n      }];\n    }\n    static #_16 = (() => dt7948.n(this.prototype, \"recurringOptions\", [_decorators.default]))();\n    _generateDateMarkup(fromDateTime, options, isRange, toDateTime) {\n      return (0, _localDateMarkupGenerator.default)(fromDateTime, options, isRange, toDateTime);\n    }\n    toggleModeBtnLabel(advancedMode) {\n      return advancedMode ? \"discourse_local_dates.create.form.simple_mode\" : \"discourse_local_dates.create.form.advanced_mode\";\n    }\n    static #_17 = (() => dt7948.n(this.prototype, \"toggleModeBtnLabel\", [(0, _decorators.default)(\"advancedMode\")]))();\n    markup(config, options, isValid, isRange) {\n      let text;\n      if (isValid && config.from) {\n        if (config.to && config.to.range) {\n          text = this._generateDateMarkup(config.from, options, isRange, config.to);\n        } else {\n          text = this._generateDateMarkup(config.from, options, isRange);\n        }\n      }\n      return text;\n    }\n    static #_18 = (() => dt7948.n(this.prototype, \"markup\", [(0, _decorators.default)(\"computedConfig.{from,to,options}\", \"options\", \"isValid\", \"isRange\")]))();\n    formattedFrom(dateTime) {\n      return dateTime.format(\"LLLL\");\n    }\n    static #_19 = (() => dt7948.n(this.prototype, \"formattedFrom\", [(0, _decorators.default)(\"fromConfig.dateTime\")]))();\n    formattedTo(dateTime) {\n      return dateTime.isValid() ? dateTime.format(\"LLLL\") : (0, _discourseI18n.i18n)(\"discourse_local_dates.create.form.until\");\n    }\n    static #_20 = (() => dt7948.n(this.prototype, \"formattedTo\", [(0, _decorators.default)(\"toConfig.dateTime\")]))();\n    updateFormat(format, event) {\n      event?.preventDefault();\n      this.set(\"format\", format);\n    }\n    static #_21 = (() => dt7948.n(this.prototype, \"updateFormat\", [_object.action]))();\n    selectedDate(fromSelected) {\n      return fromSelected ? this.date : this.toDate;\n    }\n    static #_22 = (() => dt7948.n(this.prototype, \"selectedDate\", [(0, _decorators.default)(\"fromSelected\", \"toSelected\")]))();\n    selectedTime(fromSelected) {\n      return fromSelected ? this.time : this.toTime;\n    }\n    static #_23 = (() => dt7948.n(this.prototype, \"selectedTime\", [(0, _decorators.default)(\"fromSelected\", \"toSelected\")]))();\n    changeSelectedDate(date) {\n      if (this.fromSelected) {\n        this.set(\"date\", date);\n      } else {\n        this.set(\"toDate\", date);\n      }\n    }\n    static #_24 = (() => dt7948.n(this.prototype, \"changeSelectedDate\", [_object.action]))();\n    changeSelectedTime(time) {\n      if (this.fromSelected) {\n        this.set(\"time\", time);\n      } else {\n        this.set(\"toTime\", time);\n      }\n    }\n    static #_25 = (() => dt7948.n(this.prototype, \"changeSelectedTime\", [_object.action]))();\n    eraseToDateTime() {\n      this.setProperties({\n        toDate: null,\n        toTime: null\n      });\n      this.focusFrom();\n    }\n    static #_26 = (() => dt7948.n(this.prototype, \"eraseToDateTime\", [_object.action]))();\n    focusFrom() {\n      this.setProperties({\n        fromSelected: true,\n        toSelected: false,\n        minDate: null\n      });\n    }\n    static #_27 = (() => dt7948.n(this.prototype, \"focusFrom\", [_object.action]))();\n    focusTo() {\n      this.setProperties({\n        toSelected: true,\n        fromSelected: false,\n        minDate: this.get(\"fromConfig.date\")\n      });\n    }\n    static #_28 = (() => dt7948.n(this.prototype, \"focusTo\", [_object.action]))();\n    toggleAdvancedMode() {\n      this.toggleProperty(\"advancedMode\");\n    }\n    static #_29 = (() => dt7948.n(this.prototype, \"toggleAdvancedMode\", [_object.action]))();\n    save() {\n      const markup = this.markup;\n      if (markup) {\n        this.closeModal();\n        this.model.insertDate(markup);\n      }\n    }\n    static #_30 = (() => dt7948.n(this.prototype, \"save\", [_object.action]))();\n    cancel() {\n      this.closeModal();\n    }\n    static #_31 = (() => dt7948.n(this.prototype, \"cancel\", [_object.action]))();\n  }\n  _exports.default = LocalDatesCreate;\n  (0, _component.setComponentTemplate)(__COLOCATED_TEMPLATE__, LocalDatesCreate);\n});","define(\"discourse/plugins/discourse-local-dates/initializers/discourse-local-dates\", [\"exports\", \"@ember/owner\", \"@ember/service\", \"@ember/template\", \"discourse/lib/decorators\", \"discourse/lib/download-calendar\", \"discourse/lib/icon-library\", \"discourse/lib/plugin-api\", \"discourse/lib/to-markdown\", \"discourse-i18n\", \"discourse/plugins/discourse-local-dates/lib/local-date-markup-generator\", \"discourse/plugins/discourse-local-dates/discourse/components/modal/local-dates-create\", \"discourse/plugins/discourse-local-dates/lib/local-date-builder\", \"discourse/plugins/discourse-local-dates/lib/rich-editor-extension\"], function (_exports, _owner, _service, _template, _decorators, _downloadCalendar, _iconLibrary, _pluginApi, _toMarkdown, _discourseI18n, _localDateMarkupGenerator, _localDatesCreate, _localDateBuilder, _richEditorExtension) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.applyLocalDates = applyLocalDates;\n  _exports.default = void 0;\n  // Import applyLocalDates from discourse/lib/local-dates instead\n  function applyLocalDates(dates, siteSettings) {\n    if (!siteSettings.discourse_local_dates_enabled) {\n      return;\n    }\n    const currentUserTZ = moment.tz.guess();\n    dates.forEach((element, index, arr) => {\n      const opts = buildOptionsFromElement(element, siteSettings);\n      if (element.attributes[\"data-range\"]?.value === \"to\" && index !== 0 && arr[index - 1].attributes[\"data-range\"]?.value === \"from\") {\n        const fromElement = arr[index - 1];\n        if (_rangeIsSameLocalDay(fromElement, element)) {\n          opts.sameLocalDayAsFrom = true;\n        }\n      }\n      const localDateBuilder = new _localDateBuilder.default(opts, currentUserTZ).build();\n      element.innerText = \"\";\n      element.insertAdjacentHTML(\"beforeend\", `${(0, _iconLibrary.iconHTML)(\"earth-americas\")}\n        <span class=\"relative-time\">${localDateBuilder.formatted}</span>`);\n      element.setAttribute(\"aria-label\", localDateBuilder.textPreview);\n      const classes = [\"cooked-date\"];\n      if (localDateBuilder.pastEvent) {\n        classes.push(\"past\");\n      }\n      element.classList.add(...classes);\n    });\n  }\n  function _rangeIsSameLocalDay(fromElement, toElement) {\n    if (!fromElement.attributes[\"data-time\"] || !toElement.attributes[\"data-time\"]) {\n      return false;\n    }\n    const timezone = fromElement.attributes[\"data-timezone\"].value;\n    const from = moment(_getDateFromElement(fromElement)).tz(timezone);\n    const to = moment(_getDateFromElement(toElement)).tz(timezone);\n    return from.isSame(to, \"day\");\n  }\n  function _getDateFromElement(element) {\n    return `${element.attributes[\"data-date\"].value}T${element.attributes[\"data-time\"].value}`;\n  }\n  function buildOptionsFromElement(element, siteSettings) {\n    const opts = {};\n    const dataset = element.dataset;\n    if (_rangeElements(element).length === 2) {\n      opts.duration = _calculateDuration(element);\n    }\n    opts.time = dataset.time;\n    opts.date = dataset.date;\n    opts.recurring = dataset.recurring;\n    opts.timezones = (dataset.timezones || siteSettings.discourse_local_dates_default_timezones || \"Etc/UTC\").split(\"|\").filter(Boolean);\n    opts.timezone = dataset.timezone;\n    opts.calendar = (dataset.calendar || \"on\") === \"on\";\n    opts.displayedTimezone = dataset.displayedTimezone;\n    opts.format = dataset.format || (opts.time ? \"LLL\" : \"LL\");\n    opts.countdown = dataset.countdown;\n    return opts;\n  }\n  function buildOptionsFromMarkdownTag(element) {\n    const opts = {};\n\n    // siteSettings defaults as used by buildOptionsFromElement are purposefully\n    // ommitted to reproduce exactly what was on the original element\n    opts.time = element.attributes[\"data-time\"];\n    opts.date = element.attributes[\"data-date\"];\n    opts.recurring = element.attributes[\"data-recurring\"];\n    opts.timezones = element.attributes[\"data-timezones\"];\n    opts.timezone = element.attributes[\"data-timezone\"];\n    opts.calendar = (element.attributes[\"data-calendar\"] || \"on\") === \"on\";\n    opts.displayedTimezone = element.attributes[\"data-displayed-timezone\"];\n    opts.format = element.attributes[\"data-format\"];\n    opts.countdown = element.attributes[\"data-countdown\"];\n    opts.range = element.attributes[\"data-range\"];\n    return opts;\n  }\n  function _rangeElements(element) {\n    if (!element.parentElement) {\n      return [];\n    }\n    if (element.dataset.range) {\n      return _partitionedRanges(element).find(pair => pair.includes(element));\n    }\n    return [element];\n  }\n  function _partitionedRanges(element) {\n    const partitions = [];\n    const ranges = Array.from(element.parentElement.children).filter(span => span.dataset.range);\n    while (ranges.length > 0) {\n      partitions.push(ranges.splice(0, 2));\n    }\n    return partitions;\n  }\n  function initializeDiscourseLocalDates(api) {\n    api.registerRichEditorExtension(_richEditorExtension.default);\n    const modal = api.container.lookup(\"service:modal\");\n    const siteSettings = api.container.lookup(\"service:site-settings\");\n    const defaultTitle = (0, _discourseI18n.i18n)(\"discourse_local_dates.default_title\", {\n      site_name: siteSettings.title\n    });\n    api.decorateCookedElement((elem, helper) => {\n      const dates = elem.querySelectorAll(\".discourse-local-date\");\n      applyLocalDates(dates, siteSettings);\n      const topicTitle = helper?.getModel()?.topic?.title;\n      dates.forEach(date => {\n        date.dataset.title = date.dataset.title || topicTitle || defaultTitle;\n      });\n    });\n    api.onToolbarCreate(toolbar => {\n      toolbar.addButton({\n        title: \"discourse_local_dates.title\",\n        id: \"local-dates\",\n        group: \"extras\",\n        icon: \"calendar-days\",\n        perform: event => modal.show(_localDatesCreate.default, {\n          model: {\n            insertDate: markup => event.addText(markup)\n          }\n        }),\n        shortcut: \"Shift+.\",\n        shortcutAction: event => {\n          const timezone = api.getCurrentUser().user_option.timezone;\n          const time = moment().format(\"HH:mm:ss\");\n          const date = moment().format(\"YYYY-MM-DD\");\n          event.addText(`[date=${date} time=${time} timezone=\"${timezone}\"]`);\n        }\n      });\n    });\n    (0, _toMarkdown.addTextDecorateCallback)(function (text, nextElement, _previousElement, metadata) {\n      if (metadata.discourseLocalDateStartRangeOpts && nextElement?.attributes.class?.includes(\"discourse-local-date\") && text === \"→\") {\n        return \"\";\n      }\n    });\n    (0, _toMarkdown.addTagDecorateCallback)(function () {\n      if (this.element.attributes.class?.includes(\"discourse-local-date\")) {\n        if (this.metadata.discourseLocalDateStartRangeOpts) {\n          const startRangeOpts = this.metadata.discourseLocalDateStartRangeOpts;\n          const endRangeOpts = buildOptionsFromMarkdownTag(this.element);\n          const markup = (0, _localDateMarkupGenerator.default)({\n            date: startRangeOpts.date,\n            time: startRangeOpts.time,\n            format: startRangeOpts.format\n          }, endRangeOpts, true, {\n            date: endRangeOpts.date,\n            time: endRangeOpts.time,\n            format: endRangeOpts.format\n          });\n          this.prefix = markup;\n          this.metadata.discourseLocalDateStartRangeOpts = null;\n          return \"\";\n        }\n        if (this.element.attributes[\"data-range\"] === \"true\" || this.element.attributes[\"data-range\"] === \"from\" || this.element.attributes[\"data-range\"] === \"to\") {\n          this.metadata.discourseLocalDateStartRangeOpts = buildOptionsFromMarkdownTag(this.element);\n          return \"\";\n        }\n        const opts = buildOptionsFromMarkdownTag(this.element, siteSettings);\n        const markup = (0, _localDateMarkupGenerator.default)({\n          date: opts.date,\n          time: opts.time,\n          format: opts.format\n        }, opts, false);\n        this.prefix = markup;\n        return \"\";\n      }\n    });\n  }\n  function buildHtmlPreview(element, siteSettings) {\n    const opts = buildOptionsFromElement(element, siteSettings);\n    const localDateBuilder = new _localDateBuilder.default(opts, moment.tz.guess()).build();\n    const htmlPreviews = localDateBuilder.previews.map(preview => {\n      const previewNode = document.createElement(\"div\");\n      previewNode.classList.add(\"preview\");\n      if (preview.current) {\n        previewNode.classList.add(\"current\");\n      }\n      const timezoneNode = document.createElement(\"span\");\n      timezoneNode.classList.add(\"timezone\");\n      timezoneNode.innerText = preview.timezone;\n      previewNode.appendChild(timezoneNode);\n      const dateTimeNode = document.createElement(\"span\");\n      dateTimeNode.classList.add(\"date-time\");\n      dateTimeNode.innerHTML = preview.formatted;\n      previewNode.appendChild(dateTimeNode);\n      return previewNode;\n    });\n    const previewsNode = document.createElement(\"div\");\n    previewsNode.classList.add(\"locale-dates-previews\");\n    htmlPreviews.forEach(htmlPreview => previewsNode.appendChild(htmlPreview));\n    const calendarNode = _downloadCalendarNode(element);\n    if (calendarNode) {\n      previewsNode.appendChild(calendarNode);\n    }\n    return previewsNode.outerHTML;\n  }\n  function calculateStartAndEndDate(startDataset, endDataset) {\n    let startDate, endDate;\n    startDate = moment.tz(`${startDataset.date} ${startDataset.time || \"\"}`.trim(), startDataset.timezone);\n    if (endDataset) {\n      endDate = moment.tz(`${endDataset.date} ${endDataset.time || \"\"}`.trim(), endDataset.timezone);\n    }\n    return [startDate, endDate];\n  }\n  function _downloadCalendarNode(element) {\n    const [startDataset, endDataset] = _rangeElements(element).map(dateElement => dateElement.dataset);\n    const [startDate, endDate] = calculateStartAndEndDate(startDataset, endDataset);\n    if (startDate < moment().tz(startDataset.timezone)) {\n      return false;\n    }\n    const node = document.createElement(\"div\");\n    node.classList.add(\"download-calendar\");\n    node.innerHTML = `${(0, _iconLibrary.renderIcon)(\"string\", \"file\")} ${(0, _discourseI18n.i18n)(\"download_calendar.add_to_calendar\")}`;\n    node.setAttribute(\"data-starts-at\", startDate.toISOString());\n    if (endDataset) {\n      node.setAttribute(\"data-ends-at\", endDate.toISOString());\n    }\n    if (!startDataset.time && !endDataset) {\n      node.setAttribute(\"data-ends-at\", startDate.add(24, \"hours\").toISOString());\n    }\n    node.setAttribute(\"data-title\", startDataset.title);\n    return node;\n  }\n  function _calculateDuration(element) {\n    const [startDataset, endDataset] = _rangeElements(element).map(dateElement => dateElement.dataset);\n    const startDateTime = moment(`${startDataset.date} ${startDataset.time || \"\"}`.trim());\n    const endDateTime = moment(`${endDataset.date} ${endDataset.time || \"\"}`.trim());\n    const duration = endDateTime.diff(startDateTime, \"minutes\");\n\n    // negative duration is used when we calculate difference for end date from range\n    return element.dataset === startDataset ? duration : -duration;\n  }\n  class LocalDatesInit {\n    static #_ = (() => dt7948.g(this.prototype, \"siteSettings\", [_service.service]))();\n    #siteSettings = (() => (dt7948.i(this, \"siteSettings\"), void 0))();\n    static #_2 = (() => dt7948.g(this.prototype, \"tooltip\", [_service.service]))();\n    #tooltip = (() => (dt7948.i(this, \"tooltip\"), void 0))();\n    constructor(owner) {\n      (0, _owner.setOwner)(this, owner);\n      window.addEventListener(\"click\", this.showDatePopover, {\n        passive: true\n      });\n      if (this.siteSettings.discourse_local_dates_enabled) {\n        (0, _pluginApi.withPluginApi)(\"0.8.8\", initializeDiscourseLocalDates);\n      }\n    }\n    showDatePopover(event) {\n      if (event?.target?.classList?.contains(\"download-calendar\")) {\n        const dataset = event.target.dataset;\n        (0, _downloadCalendar.downloadCalendar)(dataset.title, [{\n          startsAt: dataset.startsAt,\n          endsAt: dataset.endsAt\n        }]);\n        return this.tooltip.close(\"local-date\");\n      }\n      if (!event?.target?.classList?.contains(\"discourse-local-date\")) {\n        return;\n      }\n      return this.tooltip.show(event.target, {\n        identifier: \"local-date\",\n        content: (0, _template.htmlSafe)(buildHtmlPreview(event.target, this.siteSettings))\n      });\n    }\n    static #_3 = (() => dt7948.n(this.prototype, \"showDatePopover\", [_decorators.bind]))();\n    teardown() {\n      window.removeEventListener(\"click\", this.showDatePopover);\n    }\n  }\n  var _default = _exports.default = {\n    initialize(owner) {\n      this.instance = new LocalDatesInit(owner);\n    },\n    teardown() {\n      this.instance.teardown();\n      this.instance = null;\n    }\n  };\n});","define(\"discourse/plugins/discourse-local-dates/lib/date-with-zone-helper\", [\"exports\", \"@ember/object\"], function (_exports, _object) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  /*\n    DateWithZoneHelper provides a limited list of helpers\n    to manipulate a moment object with timezones\n  \n    - add(count unit) adds a COUNT of UNITS to a date\n    - subtract(count unit) subtracts a COUNT of UNITS to a date\n    - format(format) formats a date with zone in a consistent way, optional moment format\n    - isDST() allows to know if a date in a specified timezone is currently under DST\n    - datetimeWithZone(timezone) returns a new moment object with timezone applied\n    - datetime returns the moment object\n    - unitRepetitionsBetweenDates(duration, date) return the number of repetitions of\n    duration between two dates, eg for duration: \"1.weeks\", \"2.months\"...\n  */\n  class DateWithZoneHelper {\n    static fromDatetime(datetime, timezone, localTimezone) {\n      return new DateWithZoneHelper({\n        year: datetime.year(),\n        month: datetime.month(),\n        day: datetime.date(),\n        hour: datetime.hour(),\n        minute: datetime.minute(),\n        second: datetime.second(),\n        timezone,\n        localTimezone\n      });\n    }\n    constructor() {\n      let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n      this.timezone = params.timezone || \"UTC\";\n      this.localTimezone = params.localTimezone || moment.tz.guess();\n      this.datetime = moment.tz((0, _object.getProperties)(params, [\"year\", \"month\", \"day\", \"hour\", \"minute\", \"second\"]), this.timezone);\n    }\n    isDST() {\n      return this.datetime.tz(this.localTimezone).isDST();\n    }\n    unitRepetitionsBetweenDates(duration, date) {\n      const [count, unit] = duration.split(\".\");\n      // get the diff in the specified units with decimals\n      const diff = Math.abs(this.datetime.diff(date, unit, true));\n      // get integer count of duration in diff, eg: 4 hours diff is 2 for 2.hours duration\n      const integer = Math.trunc(diff / count);\n      // get fractional to define if we have to add one \"duration\"\n      const fractional = diff / count % 1;\n      return integer * parseInt(count, 10) + (fractional > 0 ? parseInt(count, 10) : 0);\n    }\n    add(count, unit) {\n      return this._fromDatetime(this.datetime.clone().add(count, unit), this.timezone, this.localTimezone);\n    }\n    subtract(count, unit) {\n      return this._fromDatetime(this.datetime.clone().subtract(count, unit), this.timezone, this.localTimezone);\n    }\n    datetimeWithZone(timezone) {\n      return this.datetime.clone().tz(timezone);\n    }\n    format(format) {\n      if (format) {\n        return this.datetime.tz(this.localTimezone).format(format);\n      }\n      return this.datetime.tz(this.localTimezone).toISOString(true);\n    }\n    _fromDatetime(datetime, timezone, localTimezone) {\n      return DateWithZoneHelper.fromDatetime(datetime, timezone, localTimezone);\n    }\n  }\n  _exports.default = DateWithZoneHelper;\n});","define(\"discourse/plugins/discourse-local-dates/lib/discourse-markdown/discourse-local-dates\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.setup = setup;\n  moment.tz.link([\"Asia/Kolkata|IST\", \"Asia/Seoul|KST\", \"Asia/Tokyo|JST\"]);\n  const timezoneNames = moment.tz.names();\n  function addLocalDate(attributes, state, buffer, applyDataAttributes) {\n    if (attributes.timezone) {\n      if (!timezoneNames.includes(attributes.timezone)) {\n        delete attributes.timezone;\n      }\n    }\n    if (attributes.displayedTimezone) {\n      if (!timezoneNames.includes(attributes.displayedTimezone)) {\n        delete attributes.displayedTimezone;\n      }\n    }\n    if (attributes.timezones) {\n      attributes.timezones = attributes.timezones.split(\"|\").filter(tz => timezoneNames.includes(tz)).join(\"|\");\n    }\n    const dateTime = moment.tz([attributes._default || attributes.date, attributes.time].filter(Boolean).join(\"T\"), attributes.timezone || \"Etc/UTC\");\n    const emailFormat = state.md.options.discourse.datesEmailFormat || moment.defaultFormat;\n    attributes.emailPreview = `${dateTime.utc().format(emailFormat)} UTC`;\n    let token = new state.Token(\"span_open\", \"span\", 1);\n    token.attrs = [[\"class\", \"discourse-local-date\"]];\n    applyDataAttributes(token, attributes, \"date\");\n    buffer.push(token);\n    token = new state.Token(\"text\", \"\", 0);\n    token.content = dateTime.utc().format(attributes.format);\n    buffer.push(token);\n    token = new state.Token(\"span_close\", \"span\", -1);\n    buffer.push(token);\n  }\n  function date(buffer, matches, state, _ref) {\n    let {\n      parseBBCodeTag,\n      applyDataAttributes\n    } = _ref;\n    const parsed = parseBBCodeTag(matches[0], 0, matches[0].length);\n    if (parsed?.tag === \"date\") {\n      addLocalDate(parsed.attrs, state, buffer, applyDataAttributes);\n    } else {\n      let token = new state.Token(\"text\", \"\", 0);\n      token.content = matches[0];\n      buffer.push(token);\n    }\n  }\n  function range(buffer, matches, state, _ref2) {\n    let {\n      parseBBCodeTag,\n      applyDataAttributes\n    } = _ref2;\n    let token;\n    const parsed = parseBBCodeTag(matches[0], 0, matches[0].length);\n    if (parsed?.tag === \"date-range\") {\n      if (parsed.attrs.from) {\n        const {\n          from,\n          ...attributes\n        } = {\n          ...parsed.attrs,\n          range: \"from\"\n        };\n        delete attributes.to;\n        [attributes.date, attributes.time] = from.split(\"T\");\n        addLocalDate(attributes, state, buffer, applyDataAttributes);\n      }\n      if (parsed.attrs.from && parsed.attrs.to) {\n        token = new state.Token(\"text\", \"\", 0);\n        token.content = \"→\";\n        buffer.push(token);\n      }\n      if (parsed.attrs.to) {\n        const {\n          to,\n          ...attributes\n        } = {\n          ...parsed.attrs,\n          range: \"to\"\n        };\n        delete attributes.from;\n        [attributes.date, attributes.time] = to.split(\"T\");\n        addLocalDate(attributes, state, buffer, applyDataAttributes);\n      }\n    } else {\n      token = new state.Token(\"text\", \"\", 0);\n      token.content = matches[0];\n      buffer.push(token);\n    }\n  }\n  function setup(helper) {\n    helper.allowList([\"span.discourse-local-date\", \"span[aria-label]\", \"span[data-calendar]\", \"span[data-countdown]\", \"span[data-date]\", \"span[data-displayed-timezone]\", \"span[data-email-preview]\", \"span[data-format]\", \"span[data-recurring]\", \"span[data-time]\", \"span[data-timezone]\", \"span[data-timezones]\"]);\n    helper.registerOptions((opts, siteSettings) => {\n      opts.datesEmailFormat = siteSettings.discourse_local_dates_email_format;\n      opts.features[\"discourse-local-dates\"] = !!siteSettings.discourse_local_dates_enabled;\n    });\n    helper.registerPlugin(md => {\n      md.core.textPostProcess.ruler.push(\"date\", {\n        matcher: /\\[date=.+?\\]/,\n        onMatch: date\n      });\n      md.core.textPostProcess.ruler.push(\"date-range\", {\n        matcher: /\\[date-range .+?\\]/,\n        onMatch: range\n      });\n    });\n  }\n});","define(\"discourse/plugins/discourse-local-dates/lib/local-date-builder\", [\"exports\", \"discourse/lib/icon-library\", \"discourse-i18n\", \"discourse/plugins/discourse-local-dates/lib/date-with-zone-helper\"], function (_exports, _iconLibrary, _discourseI18n, _dateWithZoneHelper) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  const DATETIME_FORMAT = \"LLL\";\n  const DATE_FORMAT = \"LL\";\n  const FULL_DATETIME_FORMAT = \"LLLL\";\n  const TIME_FORMAT = \"h:mm A\";\n  const DAY_OF_THE_WEEK_FORMAT = \"dddd\";\n  const RANGE_SEPARATOR = \"→\";\n  const TIME_ICON = \"clock\";\n  const SHORT_FORMAT_DAYS_PERIOD = 1;\n  class LocalDateBuilder {\n    constructor() {\n      let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n      let localTimezone = arguments.length > 1 ? arguments[1] : undefined;\n      this.time = params.time;\n      this.date = params.date;\n      this.recurring = params.recurring;\n      this.sameLocalDayAsFrom = params.sameLocalDayAsFrom;\n      this.timezones = Array.from(new Set((params.timezones || []).filter(Boolean)));\n      this.timezone = params.timezone || \"UTC\";\n      this.calendar = typeof params.calendar === \"undefined\" ? true : params.calendar;\n      this.displayedTimezone = params.displayedTimezone;\n      this.format = params.format || (this.time ? DATETIME_FORMAT : DATE_FORMAT);\n      this.countdown = params.countdown;\n      this.duration = params.duration;\n      this.localTimezone = localTimezone;\n    }\n    build() {\n      const [year, month, day] = this.date.split(\"-\").map(x => parseInt(x, 10));\n      const [hour, minute, second] = (this.time || \"\").split(\":\").map(x => x ? parseInt(x, 10) : undefined);\n      let displayedTimezone;\n      if (this.time) {\n        displayedTimezone = this.displayedTimezone || this.localTimezone;\n      } else {\n        displayedTimezone = this.displayedTimezone || this.timezone || this.localTimezone;\n      }\n      let localDate = new _dateWithZoneHelper.default({\n        year,\n        month: month ? month - 1 : null,\n        day,\n        hour,\n        minute,\n        second,\n        timezone: this.timezone,\n        localTimezone: this.localTimezone\n      });\n      if (this.recurring && moment().isAfter(localDate.datetime)) {\n        const type = this.recurring.split(\".\")[1];\n        const repetitionsForType = localDate.unitRepetitionsBetweenDates(this.recurring, moment.tz(this.localTimezone));\n        localDate = localDate.add(repetitionsForType, type);\n      }\n      const previews = this._generatePreviews(localDate, displayedTimezone);\n      const hasTime = hour !== undefined;\n      return {\n        pastEvent: !this.recurring && moment.tz(this.localTimezone).isAfter(localDate.datetime),\n        formatted: this._applyFormatting(localDate, displayedTimezone, hasTime),\n        previews,\n        textPreview: this._generateTextPreviews(previews)\n      };\n    }\n    _generateTextPreviews(previews) {\n      return previews.map(preview => {\n        const formattedZone = this._zoneWithoutPrefix(preview.timezone);\n        return `${formattedZone} ${preview.formatted}`;\n      }).join(\", \");\n    }\n    _generatePreviews(localDate, displayedTimezone) {\n      const previewedTimezones = [];\n      const timezones = this.timezones.filter(timezone => !this._isEqualZones(timezone, this.localTimezone));\n      previewedTimezones.push({\n        timezone: this._zoneWithoutPrefix(this.localTimezone),\n        current: true,\n        formatted: this._createDateTimeRange(_dateWithZoneHelper.default.fromDatetime(localDate.datetime, localDate.timezone, this.localTimezone), this.time, this.duration)\n      });\n      if (this.timezone && displayedTimezone === this.localTimezone && this.timezone !== displayedTimezone && !this._isEqualZones(displayedTimezone, this.timezone) && !this.timezones.any(t => this._isEqualZones(t, this.timezone))) {\n        timezones.unshift(this.timezone);\n      }\n      timezones.forEach(timezone => {\n        if (this._isEqualZones(timezone, displayedTimezone)) {\n          return;\n        }\n        if (this._isEqualZones(timezone, this.localTimezone)) {\n          timezone = this.localTimezone;\n        }\n        previewedTimezones.push({\n          timezone: this._zoneWithoutPrefix(timezone),\n          formatted: this._createDateTimeRange(_dateWithZoneHelper.default.fromDatetime(localDate.datetime, localDate.timezone, timezone), this.time, this.duration)\n        });\n      });\n      return previewedTimezones.uniqBy(\"timezone\");\n    }\n    _isEqualZones(timezoneA, timezoneB) {\n      if ((timezoneA || timezoneB) && (!timezoneA || !timezoneB)) {\n        return false;\n      }\n      if (timezoneA.includes(timezoneB) || timezoneB.includes(timezoneA)) {\n        return true;\n      }\n      return moment.tz(timezoneA).utcOffset() === moment.tz(timezoneB).utcOffset();\n    }\n    _createDateTimeRange(startRange, time, duration) {\n      const [startDate, endDate] = this._calculateDatesForRange(startRange, time, duration);\n      let formatElements = [startDate.format(`${DAY_OF_THE_WEEK_FORMAT}, ${DATE_FORMAT}`), this._optionalTimeIcon(startDate, endDate), startDate.format(TIME_FORMAT)];\n      if (endDate) {\n        formatElements = formatElements.concat([RANGE_SEPARATOR, endDate.format(this._endDateFormat(startDate, endDate))]);\n      }\n      return formatElements.filter(Boolean).join(\" \");\n    }\n    _shortFormat(startDate, endDate) {\n      return endDate.datetime.diff(startDate.datetime, \"days\") < SHORT_FORMAT_DAYS_PERIOD;\n    }\n    _optionalTimeIcon(startDate, endDate) {\n      if (!endDate || this._shortFormat(startDate, endDate)) {\n        return `<br />${(0, _iconLibrary.renderIcon)(\"string\", TIME_ICON)}`;\n      }\n    }\n    _endDateFormat(startDate, endDate) {\n      return this._shortFormat(startDate, endDate) ? TIME_FORMAT : FULL_DATETIME_FORMAT;\n    }\n    _calculateDatesForRange(date, time, duration) {\n      // if a time has been given we do not attempt to automatically create a range\n      // instead we show only one date with a format showing the time\n      if (time && !duration) {\n        return [date];\n      }\n      const dates = [date, duration ? date.add(duration, \"minutes\") : date.add(24, \"hours\")];\n      return duration < 0 ? dates.reverse() : dates;\n    }\n    _applyFormatting(localDate, displayedTimezone, hasTime) {\n      if (this.countdown) {\n        const diffTime = moment.tz(this.localTimezone).diff(localDate.datetime);\n        if (diffTime < 0) {\n          return moment.duration(diffTime).humanize();\n        } else {\n          return (0, _discourseI18n.i18n)(\"discourse_local_dates.relative_dates.countdown.passed\");\n        }\n      }\n      const sameTimezone = this._isEqualZones(displayedTimezone, this.localTimezone);\n      if (this.calendar) {\n        const inCalendarRange = moment.tz(this.localTimezone).isBetween(localDate.subtract(2, \"day\").datetime, localDate.add(1, \"day\").datetime.endOf(\"day\"));\n        if (this.sameLocalDayAsFrom) {\n          return this._timeOnlyFormat(localDate, displayedTimezone);\n        }\n        if (inCalendarRange && sameTimezone) {\n          const date = localDate.datetimeWithZone(this.localTimezone);\n          if (hasTime && date.hours() === 0 && date.minutes() === 0) {\n            return date.format(\"dddd\");\n          }\n          return date.calendar(moment.tz(localDate.timezone), this._calendarFormats(this.time ? this.time : null));\n        }\n      }\n      if (!sameTimezone) {\n        return this._formatWithZone(localDate, displayedTimezone, this.format);\n      }\n      return localDate.format(this.format);\n    }\n    _calendarFormats(time) {\n      return {\n        sameDay: this._translateCalendarKey(time, \"today\"),\n        nextDay: this._translateCalendarKey(time, \"tomorrow\"),\n        lastDay: this._translateCalendarKey(time, \"yesterday\"),\n        sameElse: \"L\"\n      };\n    }\n    _translateCalendarKey(time, key) {\n      const translated = (0, _discourseI18n.i18n)(`discourse_local_dates.relative_dates.${key}`, {\n        time: \"LT\"\n      });\n      if (time) {\n        return translated.split(\"LT\").map(w => `[${w}]`).join(\"LT\");\n      } else {\n        return `[${translated.replace(\" LT\", \"\")}]`;\n      }\n    }\n    _formatTimezone(timezone) {\n      return timezone.replace(\"_\", \" \").replace(\"Etc/\", \"\").split(\"/\");\n    }\n    _zoneWithoutPrefix(timezone) {\n      const [part1, part2] = this._formatTimezone(timezone);\n      return part2 || part1;\n    }\n    _formatWithZone(localDate, displayedTimezone, format) {\n      let formatted = localDate.datetimeWithZone(displayedTimezone).format(format);\n      return `${formatted} (${this._zoneWithoutPrefix(displayedTimezone)})`;\n    }\n    _timeOnlyFormat(localTime, displayedTimezone) {\n      return this._formatWithZone(localTime, displayedTimezone, \"LT\");\n    }\n  }\n  _exports.default = LocalDateBuilder;\n});","define(\"discourse/plugins/discourse-local-dates/lib/local-date-markup-generator\", [\"exports\", \"@ember/utils\"], function (_exports, _utils) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = generateDateMarkup;\n  function generateDateMarkup(fromDateTime, options, isRange, toDateTime) {\n    let text = ``;\n    if (isRange) {\n      let from = [fromDateTime.date, fromDateTime.time].filter(element => !(0, _utils.isEmpty)(element)).join(\"T\");\n      let to = [toDateTime.date, toDateTime.time].filter(element => !(0, _utils.isEmpty)(element)).join(\"T\");\n      text += `[date-range from=${from} to=${to}`;\n    } else {\n      text += `[date=${fromDateTime.date}`;\n    }\n    if (fromDateTime.time && !isRange) {\n      text += ` time=${fromDateTime.time}`;\n    }\n    if (fromDateTime.format && fromDateTime.format.length) {\n      text += ` format=\"${fromDateTime.format}\"`;\n    }\n    if (options.timezone) {\n      text += ` timezone=\"${options.timezone}\"`;\n    }\n    if (options.countdown) {\n      text += ` countdown=\"${options.countdown}\"`;\n    }\n    if (options.displayedTimezone) {\n      text += ` displayedTimezone=\"${options.displayedTimezone}\"`;\n    }\n    if (options.timezones && options.timezones.length) {\n      if (Array.isArray(options.timezones)) {\n        text += ` timezones=\"${options.timezones.join(\"|\")}\"`;\n      } else {\n        text += ` timezones=\"${options.timezones}\"`;\n      }\n    }\n    if (options.recurring && !isRange) {\n      text += ` recurring=\"${options.recurring}\"`;\n    }\n    text += `]`;\n    return text;\n  }\n});","define(\"discourse/plugins/discourse-local-dates/lib/rich-editor-extension\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  /** @type {RichEditorExtension} */\n  const extension = {\n    // TODO(renato): the rendered date needs to be localized to better match the cooked content\n    nodeSpec: {\n      local_date: {\n        attrs: {\n          date: {},\n          time: {},\n          timezone: {\n            default: null\n          }\n        },\n        group: \"inline\",\n        atom: true,\n        inline: true,\n        parseDOM: [{\n          tag: \"span.discourse-local-date[data-date]\",\n          getAttrs: dom => {\n            return {\n              date: dom.getAttribute(\"data-date\"),\n              time: dom.getAttribute(\"data-time\"),\n              timezone: dom.getAttribute(\"data-timezone\")\n            };\n          }\n        }],\n        toDOM: node => {\n          const optionalTime = node.attrs.time ? ` ${node.attrs.time}` : \"\";\n          return [\"span\", {\n            class: \"discourse-local-date cooked-date\",\n            \"data-date\": node.attrs.date,\n            \"data-time\": node.attrs.time,\n            \"data-timezone\": node.attrs.timezone\n          }, `${node.attrs.date}${optionalTime}`];\n        }\n      },\n      local_date_range: {\n        attrs: {\n          fromDate: {},\n          toDate: {\n            default: null\n          },\n          fromTime: {},\n          toTime: {},\n          timezone: {\n            default: null\n          }\n        },\n        group: \"inline\",\n        atom: true,\n        inline: true,\n        parseDOM: [{\n          tag: \"span.discourse-local-date-range\",\n          getAttrs: dom => {\n            return {\n              fromDate: dom.dataset.fromDate,\n              toDate: dom.dataset.toDate,\n              fromTime: dom.dataset.fromTime,\n              toTime: dom.dataset.toTime,\n              timezone: dom.dataset.timezone\n            };\n          }\n        }],\n        toDOM: node => {\n          const fromTimeStr = node.attrs.fromTime ? ` ${node.attrs.fromTime}` : \"\";\n          const toTimeStr = node.attrs.toTime ? ` ${node.attrs.toTime}` : \"\";\n          return [\"span\", {\n            class: \"discourse-local-date-range\"\n          }, [\"span\", {\n            class: \"discourse-local-date cooked-date\",\n            \"data-range\": \"from\",\n            \"data-date\": node.attrs.fromDate,\n            \"data-time\": node.attrs.fromTime,\n            \"data-timezone\": node.attrs.timezone\n          }, `${node.attrs.fromDate}${fromTimeStr}`], \" → \", [\"span\", {\n            class: \"discourse-local-date cooked-date\",\n            \"data-range\": \"to\",\n            \"data-date\": node.attrs.toDate,\n            \"data-time\": node.attrs.toTime,\n            \"data-timezone\": node.attrs.timezone\n          }, `${node.attrs.toDate}${toTimeStr}`]];\n        }\n      }\n    },\n    parse: {\n      span_open(state, token, tokens, i) {\n        if (token.attrGet(\"class\") !== \"discourse-local-date\") {\n          return;\n        }\n        if (token.attrGet(\"data-range\") === \"from\") {\n          state.openNode(state.schema.nodes.local_date_range, {\n            fromDate: token.attrGet(\"data-date\"),\n            fromTime: token.attrGet(\"data-time\"),\n            timezone: token.attrGet(\"data-timezone\")\n          });\n          state.__localDateRange = true;\n          // we depend on the token data being strictly:\n          // [span_open, text, span_close, text, span_open, text, span_close]\n          // removing the text occurrences\n          tokens.splice(i + 1, 1);\n          tokens.splice(i + 2, 1);\n          tokens.splice(i + 3, 1);\n          return true;\n        }\n        if (token.attrGet(\"data-range\") === \"to\") {\n          // In our markdown-it tokens, a range is a series of span_open/span_close/span_open/span_close\n          // We skip opening a node for `to` and set it on the top node\n          state.top().attrs.toDate = token.attrGet(\"data-date\");\n          state.top().attrs.toTime = token.attrGet(\"data-time\");\n          delete state.__localDateRange;\n          return true;\n        }\n        state.openNode(state.schema.nodes.local_date, {\n          date: token.attrGet(\"data-date\"),\n          time: token.attrGet(\"data-time\"),\n          timezone: token.attrGet(\"data-timezone\")\n        });\n        // removing the text occurrence\n        tokens.splice(i + 1, 1);\n        return true;\n      },\n      span_close(state) {\n        if ([\"local_date\", \"local_date_range\"].includes(state.top().type.name)) {\n          if (!state.__localDateRange) {\n            state.closeNode();\n          }\n          return true;\n        }\n      }\n    },\n    serializeNode(_ref) {\n      let {\n        utils: {\n          isBoundary\n        }\n      } = _ref;\n      return {\n        local_date(state, node, parent, index) {\n          if (!isBoundary(state.out, state.out.length - 1)) {\n            state.write(\" \");\n          }\n          const optionalTime = node.attrs.time ? ` time=${node.attrs.time}` : \"\";\n          const optionalTimezone = node.attrs.timezone ? ` timezone=\"${node.attrs.timezone}\"` : \"\";\n          state.write(`[date=${node.attrs.date}${optionalTime}${optionalTimezone}]`);\n          const nextSibling = parent.childCount > index + 1 ? parent.child(index + 1) : null;\n          if (nextSibling?.isText && !isBoundary(nextSibling.text, 0)) {\n            state.write(\" \");\n          }\n        },\n        local_date_range(state, node, parent, index) {\n          if (!isBoundary(state.out, state.out.length - 1)) {\n            state.write(\" \");\n          }\n          const optionalTimezone = node.attrs.timezone ? ` timezone=\"${node.attrs.timezone}\"` : \"\";\n          const from = node.attrs.fromDate + (node.attrs.fromTime ? `T${node.attrs.fromTime}` : \"\");\n          const to = node.attrs.toDate + (node.attrs.toTime ? `T${node.attrs.toTime}` : \"\");\n          state.write(`[date-range from=${from} to=${to}${optionalTimezone}]`);\n          const nextSibling = parent.childCount > index + 1 ? parent.child(index + 1) : null;\n          if (nextSibling?.isText && !isBoundary(nextSibling.text, 0)) {\n            state.write(\" \");\n          }\n        }\n      };\n    }\n  };\n  var _default = _exports.default = extension;\n});"],"mappings":"AAAAA,OAAA,4cAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,GACA;AAEAC,OAAAC,eAAAf,EAAA,cACAgB,OAAA,IAEAhB,EAAAiB,aAAA;AACA,MAAAC,GAAA,EAAAL,EAAAM,uBA2MA,CACAC,GAAA,WACAC,MAAA,m8NACAC,WAAA,4FACAC,cAAA;AAEA,MAAAC,UAAAvB,EAAAgB,QACAQ,WAAA;AACAC,WAAA;AACAC,eAAA;AACAC,KAAA;AACAC,OAAA;AACAC,KAAA;AACAC,OAAA;AACAC,OAAA;AACAC,QAAA;AACAC,UAAA;AACAC,cAAA;AACAC,SAAA;AACAC,aAAA;AACAC,WAAA;AACAC,SAAA,KAAAC,OAAAC,EAAAC,KAAAC,UAAA,iBAAAxC,EAAAyC,UAAA;AACAC,GAAA,MAAAL,OAAAM,EAAAJ,KAAA;AACAH,SAAA,KAAAC,OAAAC,EAAAC,KAAAC,UAAA,eAAAxC,EAAAyC,UAAA;AACAG,GAAA,MAAAP,OAAAM,EAAAJ,KAAA;AACAH,SAAA,KAAAC,OAAAC,EAAAC,KAAAC,UAAA,0CAAArC,EAAA0C,kBAAA;AACAC,GAAA,MAAAT,OAAAM,EAAAJ,KAAA;AACA,IAAAQ,GACAC,MAAAD,QAAAE,WACAV,KAAAW,QAAA,KACAX,KAAAY,c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