{"version":3,"file":"discourse-local-dates.js","names":["define","_exports","_decorators","_component","_object","_I18n","_environment","_rsvp","_text","_utils","_loadScript","_computed","_computed2","_runloop","_getOwner","_localDates","_localDateMarkupGenerator","_dec","_dec2","_dec3","_dec4","_dec5","_dec6","_dec7","_dec8","_dec9","_dec10","_dec11","_dec12","_dec13","_dec14","_obj","_applyDecoratedDescriptor","target","property","decorators","descriptor","context","desc","Object","keys","forEach","key","enumerable","configurable","initializer","writable","slice","reverse","reduce","decorator","value","call","undefined","defineProperty","default","_default","extend","observes","debounce","INPUT_DELAY","timeFormat","dateFormat","dateTimeFormat","date","toDate","time","toTime","format","formats","recurring","advancedMode","timezone","fromSelected","fromFilled","notEmpty","toSelected","toFilled","init","this","_super","arguments","_picker","setProperties","timezones","siteSettings","discourse_local_dates_default_formats","split","filter","f","moment","tz","guess","didInsertElement","_setupPicker","then","picker","send","configChanged","_renderPreview","markup","result","cookAsync","set","schedule","applyLocalDates","document","querySelectorAll","isRange","isValid","config","fromConfig","from","dateTime","toConfig","to","diff","options","length","timeInferred","includes","create","range","endOf","computedConfig","currentUserTimezone","allTimezones","names","timezoneIsDifferentFromUserTimezone","propertyNotEqual","formattedCurrentUserTimezone","replace","previewedFormats","map","preview","recurringOptions","name","t","id","_generateDateMarkup","fromDateTime","toDateTime","toggleModeBtnLabel","text","formattedFrom","formattedTo","emptyText","updateFormat","event","preventDefault","actions","setTime","_setTimeIfValid","setToTime","eraseToDateTime","_setPickerDate","focusFrom","get","_setPickerMinDate","focusTo","toggleProperty","save","_closeModal","insertDate","cancel","isEmpty","test","Promise","resolve","field","element","querySelector","container","elementId","bound","reposition","firstDay","setDefaultDate","keyboardInput","i18n","previousMonth","nextMonth","months","weekdays","weekdaysShort","weekdaysMin","onSelect","formattedDate","Pikaday","setMinDate","setDate","utc","getOwner","lookup","getOwnPropertyDescriptor","action","_controller","_modalFunctionality","onShow","fromButton","getElementById","focus","onClose","localDatesBtn","_templateFactory","createTemplateFactory","block","moduleName","isStrictMode","_deprecated","_localDateBuilder","_pluginApi","_showModal","_downloadCalendar","_iconLibrary","_dPopover","_toMarkdown","dates","discourse_local_dates_enabled","currentUserTZ","index","arr","opts","buildOptionsFromElement","attributes","fromElement","toElement","_getDateFromElement","isSame","_rangeIsSameLocalDay","sameLocalDayAsFrom","localDateBuilder","build","innerText","insertAdjacentHTML","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","defaultTitle","site_name","title","decorateCookedElement","elem","helper","topicTitle","getModel","topic","onToolbarCreate","toolbar","addButton","group","icon","sendAction","modifyClass","pluginId","insertDiscourseLocalDate","toolbarEvent","addText","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","showDatePopover","owner","isDestroyed","isDestroying","contains","downloadCalendar","startsAt","endsAt","parentPopover","closest","_tippy","hide","showPopover","trigger","content","allowHTML","interactive","appendTo","onHidden","instance","destroy","hideDatePopover","hidePopover","initialize","window","addEventListener","$","fn","toArray","withPluginApi","teardown","removeEventListener","DateWithZoneHelper","fromDatetime","datetime","localTimezone","year","month","day","hour","minute","second","constructor","params","getProperties","isDST","unitRepetitionsBetweenDates","count","unit","Math","abs","fractional","trunc","parseInt","_fromDatetime","clone","subtract","datetimeWithZone","_bbcodeBlock","setup","allowList","registerOptions","datesEmailFormat","discourse_local_dates_email_format","features","registerPlugin","md","rule","matcher","onMatch","addLocalDate","core","textPostProcess","ruler","addLocalRange","timezoneNames","addSingleLocalDate","buffer","state","token","Token","attrs","utils","escapeHtml","match","closeBuffer","invalid","join","formattedDateTime","discourse","defaultFormat","parseTagAttributes","tag","matchString","parseBBCodeTag","matches","parsed","_dateWithZoneHelper","TIME_FORMAT","Set","x","localDate","isAfter","type","repetitionsForType","_generatePreviews","hasTime","_applyFormatting","_generateTextPreviews","_zoneWithoutPrefix","previewedTimezones","_isEqualZones","_createDateTimeRange","any","unshift","uniqBy","timezoneA","timezoneB","utcOffset","startRange","_calculateDatesForRange","formatElements","_optionalTimeIcon","concat","_endDateFormat","_shortFormat","diffTime","humanize","sameTimezone","inCalendarRange","isBetween","_timeOnlyFormat","hours","minutes","_calendarFormats","_formatWithZone","sameDay","_translateCalendarKey","nextDay","lastDay","sameElse","translated","w","_formatTimezone","part1","part2","localTime","isArray"],"sources":["discourse/plugins/discourse-local-dates/discourse/components/discourse-local-dates-create-form.js","discourse/plugins/discourse-local-dates/discourse/controllers/discourse-local-dates-create-modal.js","discourse/plugins/discourse-local-dates/discourse/templates/components/discourse-local-dates-create-form.js","discourse/plugins/discourse-local-dates/discourse/templates/modal/discourse-local-dates-create-modal.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"],"sourcesContent":["define(\"discourse/plugins/discourse-local-dates/discourse/components/discourse-local-dates-create-form\", [\"exports\", \"discourse-common/utils/decorators\", \"@ember/component\", \"@ember/object\", \"I18n\", \"discourse-common/config/environment\", \"rsvp\", \"discourse/lib/text\", \"@ember/utils\", \"discourse/lib/load-script\", \"@ember/object/computed\", \"discourse/lib/computed\", \"@ember/runloop\", \"discourse-common/lib/get-owner\", \"discourse/lib/local-dates\", \"discourse/plugins/discourse-local-dates/lib/local-date-markup-generator\"], function (_exports, _decorators, _component, _object, _I18n, _environment, _rsvp, _text, _utils, _loadScript, _computed, _computed2, _runloop, _getOwner, _localDates, _localDateMarkupGenerator) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _obj;\n  /* global Pikaday:true */\n  0; //eaimeta@70e063a35619d71f0,\"discourse-common/utils/decorators\",0,\"@ember/component\",0,\"@ember/object\",0,\"I18n\",0,\"discourse-common/config/environment\",0,\"rsvp\",0,\"discourse/lib/text\",0,\"@ember/utils\",0,\"discourse/lib/load-script\",0,\"@ember/object/computed\",0,\"discourse/lib/computed\",0,\"@ember/runloop\",0,\"discourse-common/lib/get-owner\",0,\"discourse/lib/local-dates\",0,\"discourse/plugins/discourse-local-dates/lib/local-date-markup-generator\"eaimeta@70e063a35619d71f\n  function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }\n  var _default = _component.default.extend((_dec = (0, _decorators.observes)(\"computedConfig.{from,to,options}\", \"options\", \"isValid\", \"isRange\"), _dec2 = (0, _decorators.debounce)(_environment.INPUT_DELAY), _dec3 = (0, _decorators.default)(\"date\", \"toDate\", \"toTime\"), _dec4 = (0, _decorators.default)(\"computedConfig\", \"isRange\"), _dec5 = (0, _decorators.default)(\"date\", \"time\", \"isRange\", \"options.{format,timezone}\"), _dec6 = (0, _decorators.default)(\"toDate\", \"toTime\", \"isRange\", \"options.{timezone,format}\"), _dec7 = (0, _decorators.default)(\"recurring\", \"timezones\", \"timezone\", \"format\"), _dec8 = (0, _decorators.default)(\"fromConfig.{date}\", \"toConfig.{date}\", \"options.{recurring,timezones,timezone,format}\"), _dec9 = (0, _decorators.default)(\"currentUserTimezone\"), _dec10 = (0, _decorators.default)(\"formats\"), _dec11 = (0, _decorators.default)(\"advancedMode\"), _dec12 = (0, _decorators.default)(\"computedConfig.{from,to,options}\", \"options\", \"isValid\", \"isRange\"), _dec13 = (0, _decorators.default)(\"fromConfig.dateTime\"), _dec14 = (0, _decorators.default)(\"toConfig.dateTime\", \"toSelected\"), (_obj = {\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    fromFilled: (0, _computed.notEmpty)(\"date\"),\n    toSelected: null,\n    toFilled: (0, _computed.notEmpty)(\"toDate\"),\n    init() {\n      this._super(...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: moment.tz.guess(),\n        date: moment().format(this.dateFormat)\n      });\n    },\n    didInsertElement() {\n      this._super(...arguments);\n      this._setupPicker().then(picker => {\n        this._picker = picker;\n        this.send(\"focusFrom\");\n      });\n    },\n    configChanged() {\n      this._renderPreview();\n    },\n    async _renderPreview() {\n      if (this.markup) {\n        const result = await (0, _text.cookAsync)(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    isRange(date, toDate, toTime) {\n      return date && (toDate || toTime);\n    },\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    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    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    options(recurring, timezones, timezone, format) {\n      return _object.default.create({\n        recurring,\n        timezones,\n        timezone,\n        format\n      });\n    },\n    computedConfig(fromConfig, toConfig, options) {\n      return _object.default.create({\n        from: fromConfig,\n        to: toConfig,\n        options\n      });\n    },\n    currentUserTimezone() {\n      return moment.tz.guess();\n    },\n    allTimezones() {\n      return moment.tz.names();\n    },\n    timezoneIsDifferentFromUserTimezone: (0, _computed2.propertyNotEqual)(\"currentUserTimezone\", \"options.timezone\"),\n    formattedCurrentUserTimezone(timezone) {\n      return timezone.replace(\"_\", \" \").replace(\"Etc/\", \"\").replace(\"/\", \", \");\n    },\n    previewedFormats(formats) {\n      return formats.map(format => {\n        return {\n          format,\n          preview: moment().format(format)\n        };\n      });\n    },\n    recurringOptions() {\n      const key = \"discourse_local_dates.create.form.recurring\";\n      return [{\n        name: _I18n.default.t(`${key}.every_day`),\n        id: \"1.days\"\n      }, {\n        name: _I18n.default.t(`${key}.every_week`),\n        id: \"1.weeks\"\n      }, {\n        name: _I18n.default.t(`${key}.every_two_weeks`),\n        id: \"2.weeks\"\n      }, {\n        name: _I18n.default.t(`${key}.every_month`),\n        id: \"1.months\"\n      }, {\n        name: _I18n.default.t(`${key}.every_two_months`),\n        id: \"2.months\"\n      }, {\n        name: _I18n.default.t(`${key}.every_three_months`),\n        id: \"3.months\"\n      }, {\n        name: _I18n.default.t(`${key}.every_six_months`),\n        id: \"6.months\"\n      }, {\n        name: _I18n.default.t(`${key}.every_year`),\n        id: \"1.years\"\n      }];\n    },\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    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    formattedFrom(dateTime) {\n      return dateTime.format(\"LLLL\");\n    },\n    formattedTo(dateTime, toSelected) {\n      const emptyText = toSelected ? \"&nbsp;\" : _I18n.default.t(\"discourse_local_dates.create.form.until\");\n      return dateTime.isValid() ? dateTime.format(\"LLLL\") : emptyText;\n    },\n    updateFormat(format, event) {\n      event?.preventDefault();\n      this.set(\"format\", format);\n    },\n    actions: {\n      setTime(event) {\n        this._setTimeIfValid(event.target.value, \"time\");\n      },\n      setToTime(event) {\n        this._setTimeIfValid(event.target.value, \"toTime\");\n      },\n      eraseToDateTime() {\n        this.setProperties({\n          toDate: null,\n          toTime: null\n        });\n        this._setPickerDate(null);\n      },\n      focusFrom() {\n        this.setProperties({\n          fromSelected: true,\n          toSelected: false\n        });\n        this._setPickerDate(this.get(\"fromConfig.date\"));\n        this._setPickerMinDate(null);\n      },\n      focusTo() {\n        this.setProperties({\n          toSelected: true,\n          fromSelected: false\n        });\n        this._setPickerDate(this.get(\"toConfig.date\"));\n        this._setPickerMinDate(this.get(\"fromConfig.date\"));\n      },\n      advancedMode() {\n        this.toggleProperty(\"advancedMode\");\n      },\n      save() {\n        const markup = this.markup;\n        if (markup) {\n          this._closeModal();\n          this.insertDate(markup);\n        }\n      },\n      cancel() {\n        this._closeModal();\n      }\n    },\n    _setTimeIfValid(time, key) {\n      if ((0, _utils.isEmpty)(time)) {\n        this.set(key, null);\n        return;\n      }\n      if (/^(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$/.test(time)) {\n        this.set(key, time);\n      }\n    },\n    _setupPicker() {\n      return new _rsvp.Promise(resolve => {\n        (0, _loadScript.default)(\"/javascripts/pikaday.js\").then(() => {\n          const options = {\n            field: this.element.querySelector(\".fake-input\"),\n            container: this.element.querySelector(`#picker-container-${this.elementId}`),\n            bound: false,\n            format: \"YYYY-MM-DD\",\n            reposition: false,\n            firstDay: 1,\n            setDefaultDate: true,\n            keyboardInput: false,\n            i18n: {\n              previousMonth: _I18n.default.t(\"dates.previous_month\"),\n              nextMonth: _I18n.default.t(\"dates.next_month\"),\n              months: moment.months(),\n              weekdays: moment.weekdays(),\n              weekdaysShort: moment.weekdaysMin()\n            },\n            onSelect: date => {\n              const formattedDate = moment(date).format(\"YYYY-MM-DD\");\n              if (this.fromSelected) {\n                this.set(\"date\", formattedDate);\n              }\n              if (this.toSelected) {\n                this.set(\"toDate\", formattedDate);\n              }\n            }\n          };\n          resolve(new Pikaday(options));\n        });\n      });\n    },\n    _setPickerMinDate(date) {\n      (0, _runloop.schedule)(\"afterRender\", () => {\n        if (moment(date, this.dateFormat).isValid()) {\n          this._picker.setMinDate(moment(date, this.dateFormat).toDate());\n        } else {\n          this._picker.setMinDate(null);\n        }\n      });\n    },\n    _setPickerDate(date) {\n      (0, _runloop.schedule)(\"afterRender\", () => {\n        if (moment(date, this.dateFormat).isValid()) {\n          this._picker.setDate(moment.utc(date), true);\n        } else {\n          this._picker.setDate(null);\n        }\n      });\n    },\n    _closeModal() {\n      const composer = (0, _getOwner.getOwner)(this).lookup(\"controller:composer\");\n      composer.send(\"closeModal\");\n    }\n  }, (_applyDecoratedDescriptor(_obj, \"configChanged\", [_dec], Object.getOwnPropertyDescriptor(_obj, \"configChanged\"), _obj), _applyDecoratedDescriptor(_obj, \"_renderPreview\", [_dec2], Object.getOwnPropertyDescriptor(_obj, \"_renderPreview\"), _obj), _applyDecoratedDescriptor(_obj, \"isRange\", [_dec3], Object.getOwnPropertyDescriptor(_obj, \"isRange\"), _obj), _applyDecoratedDescriptor(_obj, \"isValid\", [_dec4], Object.getOwnPropertyDescriptor(_obj, \"isValid\"), _obj), _applyDecoratedDescriptor(_obj, \"fromConfig\", [_dec5], Object.getOwnPropertyDescriptor(_obj, \"fromConfig\"), _obj), _applyDecoratedDescriptor(_obj, \"toConfig\", [_dec6], Object.getOwnPropertyDescriptor(_obj, \"toConfig\"), _obj), _applyDecoratedDescriptor(_obj, \"options\", [_dec7], Object.getOwnPropertyDescriptor(_obj, \"options\"), _obj), _applyDecoratedDescriptor(_obj, \"computedConfig\", [_dec8], Object.getOwnPropertyDescriptor(_obj, \"computedConfig\"), _obj), _applyDecoratedDescriptor(_obj, \"currentUserTimezone\", [_decorators.default], Object.getOwnPropertyDescriptor(_obj, \"currentUserTimezone\"), _obj), _applyDecoratedDescriptor(_obj, \"allTimezones\", [_decorators.default], Object.getOwnPropertyDescriptor(_obj, \"allTimezones\"), _obj), _applyDecoratedDescriptor(_obj, \"formattedCurrentUserTimezone\", [_dec9], Object.getOwnPropertyDescriptor(_obj, \"formattedCurrentUserTimezone\"), _obj), _applyDecoratedDescriptor(_obj, \"previewedFormats\", [_dec10], Object.getOwnPropertyDescriptor(_obj, \"previewedFormats\"), _obj), _applyDecoratedDescriptor(_obj, \"recurringOptions\", [_decorators.default], Object.getOwnPropertyDescriptor(_obj, \"recurringOptions\"), _obj), _applyDecoratedDescriptor(_obj, \"toggleModeBtnLabel\", [_dec11], Object.getOwnPropertyDescriptor(_obj, \"toggleModeBtnLabel\"), _obj), _applyDecoratedDescriptor(_obj, \"markup\", [_dec12], Object.getOwnPropertyDescriptor(_obj, \"markup\"), _obj), _applyDecoratedDescriptor(_obj, \"formattedFrom\", [_dec13], Object.getOwnPropertyDescriptor(_obj, \"formattedFrom\"), _obj), _applyDecoratedDescriptor(_obj, \"formattedTo\", [_dec14], Object.getOwnPropertyDescriptor(_obj, \"formattedTo\"), _obj), _applyDecoratedDescriptor(_obj, \"updateFormat\", [_object.action], Object.getOwnPropertyDescriptor(_obj, \"updateFormat\"), _obj)), _obj)));\n  _exports.default = _default;\n});","define(\"discourse/plugins/discourse-local-dates/discourse/controllers/discourse-local-dates-create-modal\", [\"exports\", \"@ember/controller\", \"discourse/mixins/modal-functionality\", \"@ember/runloop\"], function (_exports, _controller, _modalFunctionality, _runloop) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  0; //eaimeta@70e063a35619d71f0,\"@ember/controller\",0,\"discourse/mixins/modal-functionality\",0,\"@ember/runloop\"eaimeta@70e063a35619d71f\n  var _default = _controller.default.extend(_modalFunctionality.default, {\n    onShow() {\n      (0, _runloop.schedule)(\"afterRender\", () => {\n        const fromButton = document.getElementById(\"from-date-time\");\n        fromButton && fromButton.focus();\n      });\n    },\n    onClose() {\n      (0, _runloop.schedule)(\"afterRender\", () => {\n        const localDatesBtn = document.querySelector(\".d-editor-button-bar .local-dates.btn\");\n        localDatesBtn && localDatesBtn.focus();\n      });\n    }\n  });\n  _exports.default = _default;\n});","define(\"discourse/plugins/discourse-local-dates/discourse/templates/components/discourse-local-dates-create-form\", [\"exports\", \"@ember/template-factory\"], function (_exports, _templateFactory) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  0; //eaimeta@70e063a35619d71f0,\"ember-cli-htmlbars\"eaimeta@70e063a35619d71f\n  var _default = (0, _templateFactory.createTemplateFactory)(\n  /*\n    <DModalBody\n    @title=\"discourse_local_dates.title\"\n    @class=\"discourse-local-dates-create-modal\"\n    @style=\"overflow: auto\"\n  >\n  \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-alt\"}}\n            <DButton\n              @id=\"from-date-time\"\n              @action={{action \"focusFrom\"}}\n              @translatedLabel={{this.formattedFrom}}\n              @class=\"date-time\"\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-alt\"}}\n            <DButton\n              @action={{action \"focusTo\"}}\n              @translatedLabel={{this.formattedTo}}\n              @class=\"date-time\"\n            />\n            {{#if this.toFilled}}\n              <DButton\n                @icon=\"times\"\n                @action={{action \"eraseToDateTime\"}}\n                @class=\"delete-to-date\"\n              />\n            {{/if}}\n          </div>\n  \n          {{#unless this.site.mobileView}}\n            <TimezoneInput\n              @options={{hash icon=\"globe\"}}\n              @value={{this.timezone}}\n              @onChange={{action (mut this.timezone)}}\n            />\n          {{/unless}}\n        </div>\n  \n        <div class=\"picker-panel\">\n          <Input class=\"fake-input\" />\n          <div class=\"date-picker\" id=\"picker-container-{{this.elementId}}\"></div>\n  \n          {{#if this.fromSelected}}\n            <div class=\"time-pickers\">\n              {{d-icon \"far-clock\"}}\n              <Input\n                maxlength={{5}}\n                placeholder=\"hh:mm\"\n                @type=\"time\"\n                @value={{this.time}}\n                class=\"time-picker\"\n                {{on \"input\" (action \"setTime\")}}\n              />\n            </div>\n          {{/if}}\n  \n          {{#if this.toSelected}}\n            {{#if this.toDate}}\n              <div class=\"time-pickers\">\n                {{d-icon \"far-clock\"}}\n                <Input\n                  maxlength={{5}}\n                  placeholder=\"hh:mm\"\n                  @type=\"time\"\n                  @value={{this.toTime}}\n                  class=\"time-picker\"\n                  {{on \"input\" (action \"setToTime\")}}\n                />\n              </div>\n            {{/if}}\n          {{/if}}\n        </div>\n  \n        {{#if this.site.mobileView}}\n          <TimezoneInput\n            @value={{this.timezone}}\n            @options={{hash icon=\"globe\"}}\n            @onChange={{action (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 \"discourse_local_dates.create.form.recurring_description\")\n                }}</p>\n              <div class=\"controls\">\n                <ComboBox\n                  @content={{this.recurringOptions}}\n                  @class=\"recurrence-input\"\n                  @value={{this.recurring}}\n                  @onChange={{action (mut this.recurring)}}\n                  @options={{hash\n                    none=\"discourse_local_dates.create.form.recurring_none\"\n                  }}\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                @class=\"timezones-input\"\n                @content={{this.allTimezones}}\n                @value={{this.timezones}}\n                @options={{hash allowAny=false maximum=5}}\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 \"question-circle\"}}\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  </DModalBody>\n  \n  <div class=\"modal-footer discourse-local-dates-create-modal-footer\">\n    {{#if this.isValid}}\n      <DButton\n        @class=\"btn-primary\"\n        @action={{action \"save\"}}\n        @label=\"discourse_local_dates.create.form.insert\"\n      />\n    {{/if}}\n  \n    <DButton\n      @class=\"btn-flat\"\n      @action={{action \"cancel\"}}\n      @translatedLabel={{i18n \"cancel\"}}\n    />\n  \n    <DButton\n      @class=\"btn-default advanced-mode-btn\"\n      @action={{action \"advancedMode\"}}\n      @icon=\"cog\"\n      @label={{this.toggleModeBtnLabel}}\n    />\n  </div>\n  */\n  {\n    \"id\": \"TzLSoKfd\",\n    \"block\": \"[[[8,[39,0],null,[[\\\"@title\\\",\\\"@class\\\",\\\"@style\\\"],[\\\"discourse_local_dates.title\\\",\\\"discourse-local-dates-create-modal\\\",\\\"overflow: auto\\\"]],[[\\\"default\\\"],[[[[1,\\\"\\\\n\\\\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,2],[\\\"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,2],[\\\"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,3],[\\\"calendar-alt\\\"],null]],[1,\\\"\\\\n          \\\"],[8,[39,4],null,[[\\\"@id\\\",\\\"@action\\\",\\\"@translatedLabel\\\",\\\"@class\\\"],[\\\"from-date-time\\\",[28,[37,5],[[30,0],\\\"focusFrom\\\"],null],[30,0,[\\\"formattedFrom\\\"]],\\\"date-time\\\"]],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,3],[\\\"calendar-alt\\\"],null]],[1,\\\"\\\\n          \\\"],[8,[39,4],null,[[\\\"@action\\\",\\\"@translatedLabel\\\",\\\"@class\\\"],[[28,[37,5],[[30,0],\\\"focusTo\\\"],null],[30,0,[\\\"formattedTo\\\"]],\\\"date-time\\\"]],null],[1,\\\"\\\\n\\\"],[41,[30,0,[\\\"toFilled\\\"]],[[[1,\\\"            \\\"],[8,[39,4],null,[[\\\"@icon\\\",\\\"@action\\\",\\\"@class\\\"],[\\\"times\\\",[28,[37,5],[[30,0],\\\"eraseToDateTime\\\"],null],\\\"delete-to-date\\\"]],null],[1,\\\"\\\\n\\\"]],[]],null],[1,\\\"        \\\"],[13],[1,\\\"\\\\n\\\\n\\\"],[41,[51,[30,0,[\\\"site\\\",\\\"mobileView\\\"]]],[[[1,\\\"          \\\"],[8,[39,7],null,[[\\\"@options\\\",\\\"@value\\\",\\\"@onChange\\\"],[[28,[37,8],null,[[\\\"icon\\\"],[\\\"globe\\\"]]],[30,0,[\\\"timezone\\\"]],[28,[37,5],[[30,0],[28,[37,9],[[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,10],[[24,0,\\\"fake-input\\\"]],null,null],[1,\\\"\\\\n        \\\"],[10,0],[14,0,\\\"date-picker\\\"],[15,1,[29,[\\\"picker-container-\\\",[30,0,[\\\"elementId\\\"]]]]],[12],[13],[1,\\\"\\\\n\\\\n\\\"],[41,[30,0,[\\\"fromSelected\\\"]],[[[1,\\\"          \\\"],[10,0],[14,0,\\\"time-pickers\\\"],[12],[1,\\\"\\\\n            \\\"],[1,[28,[35,3],[\\\"far-clock\\\"],null]],[1,\\\"\\\\n            \\\"],[8,[39,10],[[16,\\\"maxlength\\\",5],[24,\\\"placeholder\\\",\\\"hh:mm\\\"],[24,0,\\\"time-picker\\\"],[4,[38,11],[\\\"input\\\",[28,[37,5],[[30,0],\\\"setTime\\\"],null]],null]],[[\\\"@type\\\",\\\"@value\\\"],[\\\"time\\\",[30,0,[\\\"time\\\"]]]],null],[1,\\\"\\\\n          \\\"],[13],[1,\\\"\\\\n\\\"]],[]],null],[1,\\\"\\\\n\\\"],[41,[30,0,[\\\"toSelected\\\"]],[[[41,[30,0,[\\\"toDate\\\"]],[[[1,\\\"            \\\"],[10,0],[14,0,\\\"time-pickers\\\"],[12],[1,\\\"\\\\n              \\\"],[1,[28,[35,3],[\\\"far-clock\\\"],null]],[1,\\\"\\\\n              \\\"],[8,[39,10],[[16,\\\"maxlength\\\",5],[24,\\\"placeholder\\\",\\\"hh:mm\\\"],[24,0,\\\"time-picker\\\"],[4,[38,11],[\\\"input\\\",[28,[37,5],[[30,0],\\\"setToTime\\\"],null]],null]],[[\\\"@type\\\",\\\"@value\\\"],[\\\"time\\\",[30,0,[\\\"toTime\\\"]]]],null],[1,\\\"\\\\n            \\\"],[13],[1,\\\"\\\\n\\\"]],[]],null]],[]],null],[1,\\\"      \\\"],[13],[1,\\\"\\\\n\\\\n\\\"],[41,[30,0,[\\\"site\\\",\\\"mobileView\\\"]],[[[1,\\\"        \\\"],[8,[39,7],null,[[\\\"@value\\\",\\\"@options\\\",\\\"@onChange\\\"],[[30,0,[\\\"timezone\\\"]],[28,[37,8],null,[[\\\"icon\\\"],[\\\"globe\\\"]]],[28,[37,5],[[30,0],[28,[37,9],[[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,2],[\\\"discourse_local_dates.create.form.recurring_title\\\"],null]],[1,\\\"\\\\n            \\\"],[13],[1,\\\"\\\\n            \\\"],[10,2],[12],[1,[28,[35,12],[[28,[37,2],[\\\"discourse_local_dates.create.form.recurring_description\\\"],null]],null]],[13],[1,\\\"\\\\n            \\\"],[10,0],[14,0,\\\"controls\\\"],[12],[1,\\\"\\\\n              \\\"],[8,[39,13],null,[[\\\"@content\\\",\\\"@class\\\",\\\"@value\\\",\\\"@onChange\\\",\\\"@options\\\"],[[30,0,[\\\"recurringOptions\\\"]],\\\"recurrence-input\\\",[30,0,[\\\"recurring\\\"]],[28,[37,5],[[30,0],[28,[37,9],[[30,0,[\\\"recurring\\\"]]],null]],null],[28,[37,8],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,2],[\\\"discourse_local_dates.create.form.timezones_title\\\"],null]],[13],[1,\\\"\\\\n          \\\"],[10,2],[12],[1,[28,[35,2],[\\\"discourse_local_dates.create.form.timezones_description\\\"],null]],[13],[1,\\\"\\\\n          \\\"],[10,0],[14,0,\\\"controls\\\"],[12],[1,\\\"\\\\n            \\\"],[8,[39,14],null,[[\\\"@valueProperty\\\",\\\"@nameProperty\\\",\\\"@class\\\",\\\"@content\\\",\\\"@value\\\",\\\"@options\\\"],[null,null,\\\"timezones-input\\\",[30,0,[\\\"allTimezones\\\"]],[30,0,[\\\"timezones\\\"]],[28,[37,8],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,2],[\\\"discourse_local_dates.create.form.format_title\\\"],null]],[13],[1,\\\"\\\\n          \\\"],[10,2],[12],[1,\\\"\\\\n            \\\"],[1,[28,[35,2],[\\\"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,3],[\\\"question-circle\\\"],null]],[1,\\\"\\\\n            \\\"],[13],[1,\\\"\\\\n          \\\"],[13],[1,\\\"\\\\n          \\\"],[10,0],[14,0,\\\"controls\\\"],[12],[1,\\\"\\\\n            \\\"],[8,[39,15],null,[[\\\"@value\\\",\\\"@class\\\"],[[30,0,[\\\"format\\\"]],\\\"format-input\\\"]],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,17],[[28,[37,17],[[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,11],[\\\"click\\\",[28,[37,18],[[30,0,[\\\"updateFormat\\\"]],[30,1,[\\\"format\\\"]]],null]],null],[12],[1,\\\"\\\\n                  \\\"],[1,[30,1,[\\\"format\\\"]]],[1,\\\"\\\\n                \\\"],[13],[1,\\\"\\\\n                \\\"],[10,1],[14,0,\\\"previewed-format\\\"],[12],[1,\\\"\\\\n                  \\\"],[1,[30,1,[\\\"preview\\\"]]],[1,\\\"\\\\n                \\\"],[13],[1,\\\"\\\\n              \\\"],[13],[1,\\\"\\\\n\\\"]],[1]],null],[1,\\\"          \\\"],[13],[1,\\\"\\\\n        \\\"],[13],[1,\\\"\\\\n      \\\"],[13],[1,\\\"\\\\n\\\"]],[]],null],[1,\\\"  \\\"],[13],[1,\\\"\\\\n\\\"]],[]]]]],[1,\\\"\\\\n\\\\n\\\"],[10,0],[14,0,\\\"modal-footer discourse-local-dates-create-modal-footer\\\"],[12],[1,\\\"\\\\n\\\"],[41,[30,0,[\\\"isValid\\\"]],[[[1,\\\"    \\\"],[8,[39,4],null,[[\\\"@class\\\",\\\"@action\\\",\\\"@label\\\"],[\\\"btn-primary\\\",[28,[37,5],[[30,0],\\\"save\\\"],null],\\\"discourse_local_dates.create.form.insert\\\"]],null],[1,\\\"\\\\n\\\"]],[]],null],[1,\\\"\\\\n  \\\"],[8,[39,4],null,[[\\\"@class\\\",\\\"@action\\\",\\\"@translatedLabel\\\"],[\\\"btn-flat\\\",[28,[37,5],[[30,0],\\\"cancel\\\"],null],[28,[37,2],[\\\"cancel\\\"],null]]],null],[1,\\\"\\\\n\\\\n  \\\"],[8,[39,4],null,[[\\\"@class\\\",\\\"@action\\\",\\\"@icon\\\",\\\"@label\\\"],[\\\"btn-default advanced-mode-btn\\\",[28,[37,5],[[30,0],\\\"advancedMode\\\"],null],\\\"cog\\\",[30,0,[\\\"toggleModeBtnLabel\\\"]]]],null],[1,\\\"\\\\n\\\"],[13]],[\\\"previewedFormat\\\"],false,[\\\"d-modal-body\\\",\\\"if\\\",\\\"i18n\\\",\\\"d-icon\\\",\\\"d-button\\\",\\\"action\\\",\\\"unless\\\",\\\"timezone-input\\\",\\\"hash\\\",\\\"mut\\\",\\\"input\\\",\\\"on\\\",\\\"html-safe\\\",\\\"combo-box\\\",\\\"multi-select\\\",\\\"text-field\\\",\\\"each\\\",\\\"-track-array\\\",\\\"fn\\\"]]\",\n    \"moduleName\": \"discourse/plugins/discourse-local-dates/discourse/templates/components/discourse-local-dates-create-form.hbs\",\n    \"isStrictMode\": false\n  });\n  _exports.default = _default;\n});","define(\"discourse/plugins/discourse-local-dates/discourse/templates/modal/discourse-local-dates-create-modal\", [\"exports\", \"@ember/template-factory\"], function (_exports, _templateFactory) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  0; //eaimeta@70e063a35619d71f0,\"ember-cli-htmlbars\"eaimeta@70e063a35619d71f\n  var _default = (0, _templateFactory.createTemplateFactory)(\n  /*\n    <DiscourseLocalDatesCreateForm\n    @config={{this.config}}\n    @insertDate={{this.insertDate}}\n  />\n  */\n  {\n    \"id\": \"lejbGJvu\",\n    \"block\": \"[[[8,[39,0],null,[[\\\"@config\\\",\\\"@insertDate\\\"],[[30,0,[\\\"config\\\"]],[30,0,[\\\"insertDate\\\"]]]],null]],[],false,[\\\"discourse-local-dates-create-form\\\"]]\",\n    \"moduleName\": \"discourse/plugins/discourse-local-dates/discourse/templates/modal/discourse-local-dates-create-modal.hbs\",\n    \"isStrictMode\": false\n  });\n  _exports.default = _default;\n});","define(\"discourse/plugins/discourse-local-dates/initializers/discourse-local-dates\", [\"exports\", \"discourse-common/lib/deprecated\", \"discourse-common/lib/get-owner\", \"discourse/plugins/discourse-local-dates/lib/local-date-builder\", \"discourse/lib/plugin-api\", \"discourse/lib/show-modal\", \"discourse/lib/download-calendar\", \"discourse-common/lib/icon-library\", \"I18n\", \"discourse/lib/d-popover\", \"discourse/lib/to-markdown\", \"discourse/plugins/discourse-local-dates/lib/local-date-markup-generator\"], function (_exports, _deprecated, _getOwner, _localDateBuilder, _pluginApi, _showModal, _downloadCalendar, _iconLibrary, _I18n, _dPopover, _toMarkdown, _localDateMarkupGenerator) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.applyLocalDates = applyLocalDates;\n  _exports.default = void 0;\n  0; //eaimeta@70e063a35619d71f0,\"discourse-common/lib/deprecated\",0,\"discourse-common/lib/get-owner\",0,\"discourse/plugins/discourse-local-dates/lib/local-date-builder\",0,\"discourse/lib/plugin-api\",0,\"discourse/lib/show-modal\",0,\"discourse/lib/download-calendar\",0,\"discourse-common/lib/icon-library\",0,\"I18n\",0,\"discourse/lib/d-popover\",0,\"discourse/lib/to-markdown\",0,\"discourse/plugins/discourse-local-dates/lib/local-date-markup-generator\"eaimeta@70e063a35619d71f\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\", `\n        <svg class=\"fa d-icon d-icon-globe-americas svg-icon\" xmlns=\"http://www.w3.org/2000/svg\">\n          <use href=\"#globe-americas\"></use>\n        </svg>\n        <span class=\"relative-time\">${localDateBuilder.formatted}</span>\n      `);\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    const siteSettings = api.container.lookup(\"service:site-settings\");\n    const defaultTitle = _I18n.default.t(\"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      id: \"discourse-local-date\"\n    });\n    api.onToolbarCreate(toolbar => {\n      toolbar.addButton({\n        title: \"discourse_local_dates.title\",\n        id: \"local-dates\",\n        group: \"extras\",\n        icon: \"calendar-alt\",\n        sendAction: event => toolbar.context.send(\"insertDiscourseLocalDate\", event)\n      });\n    });\n    api.modifyClass(\"component:d-editor\", {\n      pluginId: \"discourse-local-dates\",\n      actions: {\n        insertDiscourseLocalDate(toolbarEvent) {\n          (0, _showModal.default)(\"discourse-local-dates-create-modal\").setProperties({\n            insertDate: markup => {\n              toolbarEvent.addText(markup);\n            }\n          });\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\")} ${_I18n.default.t(\"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  var _default = {\n    name: \"discourse-local-dates\",\n    showDatePopover(event) {\n      const owner = (0, _getOwner.getOwner)(this);\n      if (owner.isDestroyed || owner.isDestroying) {\n        return;\n      }\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\n        // TODO: remove this when rewriting preview as a component\n        const parentPopover = event.target.closest(\"[data-tippy-root]\");\n        if (parentPopover?._tippy) {\n          parentPopover._tippy.hide();\n        }\n        return;\n      }\n      if (!event?.target?.classList?.contains(\"discourse-local-date\")) {\n        return;\n      }\n      const siteSettings = owner.lookup(\"service:site-settings\");\n      (0, _dPopover.showPopover)(event, {\n        trigger: \"click\",\n        content: buildHtmlPreview(event.target, siteSettings),\n        allowHTML: true,\n        interactive: true,\n        appendTo: \"parent\",\n        onHidden: instance => {\n          instance.destroy();\n        }\n      });\n    },\n    hideDatePopover(event) {\n      (0, _dPopover.hidePopover)(event);\n    },\n    initialize(container) {\n      window.addEventListener(\"click\", this.showDatePopover);\n      const siteSettings = container.lookup(\"service:site-settings\");\n      if (siteSettings.discourse_local_dates_enabled) {\n        $.fn.applyLocalDates = function () {\n          (0, _deprecated.default)(\"`$.applyLocalDates()` is deprecated, import and use `applyLocalDates()` instead.\");\n          return applyLocalDates(this.toArray(), siteSettings);\n        };\n        (0, _pluginApi.withPluginApi)(\"0.8.8\", initializeDiscourseLocalDates);\n      }\n    },\n    teardown() {\n      window.removeEventListener(\"click\", this.showDatePopover);\n    }\n  };\n  _exports.default = _default;\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  0; //eaimeta@70e063a35619d71f0,\"@ember/object\"eaimeta@70e063a35619d71f\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\", \"pretty-text/engines/discourse-markdown/bbcode-block\"], function (_exports, _bbcodeBlock) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.setup = setup;\n  0; //eaimeta@70e063a35619d71f0,\"pretty-text/engines/discourse-markdown/bbcode-block\"eaimeta@70e063a35619d71f\n  const timezoneNames = moment.tz.names();\n  function addSingleLocalDate(buffer, state, config) {\n    let token = new state.Token(\"span_open\", \"span\", 1);\n    token.attrs = [[\"data-date\", state.md.utils.escapeHtml(config.date)]];\n    if (!config.date.match(/\\d{4}-\\d{2}-\\d{2}/)) {\n      closeBuffer(buffer, state, moment.invalid().format());\n      return;\n    }\n    if (config.time && !config.time.match(/\\d{2}:\\d{2}(?::\\d{2})?/)) {\n      closeBuffer(buffer, state, moment.invalid().format());\n      return;\n    }\n    let dateTime = config.date;\n    if (config.time) {\n      token.attrs.push([\"data-time\", state.md.utils.escapeHtml(config.time)]);\n      dateTime = `${dateTime} ${config.time}`;\n    }\n    if (!moment(dateTime).isValid()) {\n      closeBuffer(buffer, state, moment.invalid().format());\n      return;\n    }\n    token.attrs.push([\"class\", \"discourse-local-date\"]);\n    if (config.format) {\n      token.attrs.push([\"data-format\", state.md.utils.escapeHtml(config.format)]);\n    }\n    if (config.countdown) {\n      token.attrs.push([\"data-countdown\", state.md.utils.escapeHtml(config.countdown)]);\n    }\n    if (config.calendar) {\n      token.attrs.push([\"data-calendar\", state.md.utils.escapeHtml(config.calendar)]);\n    }\n    if (config.range) {\n      token.attrs.push([\"data-range\", config.range]);\n    }\n    if (config.displayedTimezone && timezoneNames.includes(config.displayedTimezone)) {\n      token.attrs.push([\"data-displayed-timezone\", state.md.utils.escapeHtml(config.displayedTimezone)]);\n    }\n    if (config.timezones) {\n      const timezones = config.timezones.split(\"|\").filter(timezone => {\n        return timezoneNames.includes(timezone);\n      });\n      token.attrs.push([\"data-timezones\", state.md.utils.escapeHtml(timezones.join(\"|\"))]);\n    }\n    if (config.timezone && timezoneNames.includes(config.timezone)) {\n      token.attrs.push([\"data-timezone\", state.md.utils.escapeHtml(config.timezone)]);\n      dateTime = moment.tz(dateTime, config.timezone);\n    } else {\n      dateTime = moment.utc(dateTime);\n    }\n    if (config.recurring) {\n      token.attrs.push([\"data-recurring\", state.md.utils.escapeHtml(config.recurring)]);\n    }\n    buffer.push(token);\n    const formattedDateTime = dateTime.tz(\"Etc/UTC\").format(state.md.options.discourse.datesEmailFormat || moment.defaultFormat);\n    token.attrs.push([\"data-email-preview\", `${formattedDateTime} UTC`]);\n    closeBuffer(buffer, state, dateTime.utc().format(config.format));\n  }\n  function defaultDateConfig() {\n    return {\n      date: null,\n      time: null,\n      timezone: null,\n      format: null,\n      timezones: null,\n      displayedTimezone: null,\n      countdown: null,\n      range: false\n    };\n  }\n  function parseTagAttributes(tag) {\n    const matchString = tag.replace(/‘|’|„|“|«|»|”/g, '\"');\n    return (0, _bbcodeBlock.parseBBCodeTag)(\"[date date\" + matchString + \"]\", 0, matchString.length + 12);\n  }\n  function addLocalDate(buffer, matches, state) {\n    let config = defaultDateConfig();\n    const parsed = parseTagAttributes(matches[1]);\n    config.date = parsed.attrs.date;\n    config.format = parsed.attrs.format;\n    config.calendar = parsed.attrs.calendar;\n    config.time = parsed.attrs.time;\n    config.timezone = (parsed.attrs.timezone || \"\").trim();\n    config.recurring = parsed.attrs.recurring;\n    config.timezones = parsed.attrs.timezones;\n    config.displayedTimezone = parsed.attrs.displayedTimezone;\n    config.countdown = parsed.attrs.countdown;\n    addSingleLocalDate(buffer, state, config);\n  }\n  function addLocalRange(buffer, matches, state) {\n    let config = defaultDateConfig();\n    let date, time;\n    const parsed = parseTagAttributes(matches[1]);\n    config.format = parsed.attrs.format;\n    config.calendar = parsed.attrs.calendar;\n    config.timezone = (parsed.attrs.timezone || \"\").trim();\n    config.recurring = parsed.attrs.recurring;\n    config.timezones = parsed.attrs.timezones;\n    config.displayedTimezone = parsed.attrs.displayedTimezone;\n    config.countdown = parsed.attrs.countdown;\n    if (parsed.attrs.from) {\n      [date, time] = parsed.attrs.from.split(\"T\");\n      config.date = date;\n      config.time = time;\n      config.range = \"from\";\n      addSingleLocalDate(buffer, state, config);\n    }\n    if (config.range) {\n      closeBuffer(buffer, state, \"→\");\n    }\n    if (parsed.attrs.to) {\n      [date, time] = parsed.attrs.to.split(\"T\");\n      config.date = date;\n      config.time = time;\n      config.range = \"to\";\n      addSingleLocalDate(buffer, state, config);\n    }\n  }\n  function closeBuffer(buffer, state, text) {\n    let token;\n    token = new state.Token(\"text\", \"\", 0);\n    token.content = text;\n    buffer.push(token);\n    token = new state.Token(\"span_close\", \"span\", -1);\n    buffer.push(token);\n  }\n  function setup(helper) {\n    helper.allowList([\"span.discourse-local-date\", \"span[aria-label]\", \"span[data-date]\", \"span[data-time]\", \"span[data-format]\", \"span[data-countdown]\", \"span[data-calendar]\", \"span[data-displayed-timezone]\", \"span[data-timezone]\", \"span[data-timezones]\", \"span[data-recurring]\", \"span[data-email-preview]\"]);\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      const rule = {\n        matcher: /\\[date(=.+?)\\]/,\n        onMatch: addLocalDate\n      };\n      md.core.textPostProcess.ruler.push(\"discourse-local-dates\", rule);\n    });\n    helper.registerPlugin(md => {\n      const rule = {\n        matcher: /\\[date-range(.+?)\\]/,\n        onMatch: addLocalRange\n      };\n      md.core.textPostProcess.ruler.push(\"discourse-local-dates\", rule);\n    });\n  }\n});","define(\"discourse/plugins/discourse-local-dates/lib/local-date-builder\", [\"exports\", \"discourse/plugins/discourse-local-dates/lib/date-with-zone-helper\", \"I18n\", \"discourse-common/lib/icon-library\"], function (_exports, _dateWithZoneHelper, _I18n, _iconLibrary) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  0; //eaimeta@70e063a35619d71f0,\"discourse/plugins/discourse-local-dates/lib/date-with-zone-helper\",0,\"I18n\",0,\"discourse-common/lib/icon-library\"eaimeta@70e063a35619d71f\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 _I18n.default.t(\"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 = _I18n.default.t(`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  0; //eaimeta@70e063a35619d71f0,\"@ember/utils\"eaimeta@70e063a35619d71f\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});"],"mappings":"AAAAA,OAAA,4fAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,GACA;AAMA,IAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC;AAGA,SAAAC,EAAAC,EAAAC,EAAAC,EA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