text: define(["exports", "require", "../../../../../@polymer/polymer/polymer-element.js", "../../../../../@polymer/iron-list/iron-list.js"], function (_exports, _require, _polymerElement, _ironList) {
    "use strict";
  
    Object.defineProperty(_exports, "__esModule", {
      value: true
    });
    _exports.SiteSearch = void 0;
    _require = babelHelpers.interopRequireWildcard(_require);
  
    function _templateObject_12117ea0e53311e9a0cfefb808989d41() {
      var data = babelHelpers.taggedTemplateLiteral(["\n      <style>\n        :host {\n          display: block;\n          font-size: 16px;\n          color: var(--site-search-color, #383f45);\n          height: 55vh;\n          width: 60vh;\n        }\n        .result {\n          display: block;\n          background-color: #eeeeee;\n          color: #222222;\n          border: 1px solid black;\n          padding: 16px;\n          @apply --site-search-result;\n        }\n        .result:hover,\n        .result:focus {\n          background-color: #dddddd;\n          color: black;\n          color: var(--site-search-link-color-hover, #000000);\n          text-decoration: underline;\n          @apply --site-search-result-hover;\n        }\n        .result .title {\n          font-size: 28px;\n          margin: 0 0 8px 0;\n          line-height: 1;\n          @apply --site-search-link-text;\n        }\n        .result {\n          color: var(--site-search-link-color, #444444);\n          text-decoration: none;\n        }\n        .result .link-text {\n          font-size: 12px;\n          color: var(--site-search-link-text-color, #999999);\n          font-style: italic;\n          padding-left: 8px;\n          @apply --site-search-link-text;\n        }\n        #search {\n          flex-grow: 2;\n          margin-right: 4px;\n          --paper-input-container-input-color: var(\n            --site-search-text-color,\n            #000\n          );\n          --paper-input-container-shared-input-style_-_color: var(\n            --site-search-text-color,\n            #000\n          );\n          --paper-input-container-focus-color: var(\n            --site-search-line-color,\n            #000\n          );\n          --paper-input-container-color: var(\n            --site-search-placeholder-color,\n            #222\n          );\n          color: var(--site-search-placeholder-color, #222);\n        }\n      </style>\n      <paper-input\n        id=\"search\"\n        always-float-label\n        label=\"Search\"\n        value=\"{{search}}\"\n      >\n        <iron-icon icon=\"search\" slot=\"prefix\"></iron-icon>\n      </paper-input>\n      <template is=\"dom-if\" if=\"[[search]]\">\n        Found [[__results.length]] results.\n      </template>\n      <lunr-search\n        data-source=\"[[dataSource]]\"\n        search=\"[[search]]\"\n        results=\"{{__results}}\"\n      ></lunr-search>\n      <iron-list items=\"[[__results]]\">\n        <template>\n          <a class=\"result\" href$=\"[[item.location]]\">\n            <div class=\"title\">\n              [[item.title]]<span class=\"link-text\" aria-hidden=\"true\"\n                >([[item.location]])</span\n              >\n            </div>\n            <div class=\"date\">\n              <simple-datetime\n                format=\"M jS\"\n                timestamp=\"[[item.created]]\"\n                unix\n              ></simple-datetime>\n            </div>\n            <p>[[item.description]]..</p>\n          </a>\n        </template>\n      </iron-list>\n    "]);
  
      _templateObject_12117ea0e53311e9a0cfefb808989d41 = function _templateObject_12117ea0e53311e9a0cfefb808989d41() {
        return data;
      };
  
      return data;
    }
  
    /**
     * `site-search`
     * `Searching HAXcms content using the auto-generated lunr search configuration`
     *
     * @customElement
     * @polymer
     * @demo demo/index.html
     */
    var SiteSearch =
    /*#__PURE__*/
    function (_PolymerElement) {
      babelHelpers.inherits(SiteSearch, _PolymerElement);
      babelHelpers.createClass(SiteSearch, null, [{
        key: "tag",
  
        /**
         * Store the tag name to make it easier to obtain directly.
         * @notice function name must be here for tooling to operate correctly
         */
        get: function get() {
          return "site-search";
        }
      }]);
  
      function SiteSearch() {
        var _this;
  
        babelHelpers.classCallCheck(this, SiteSearch);
        _this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(SiteSearch).call(this));
        new Promise(function (res, rej) {
          return _require.default(["../../../../../@polymer/paper-input/paper-input.js"], res, rej);
        });
        new Promise(function (res, rej) {
          return _require.default(["../../../../../@polymer/iron-icons/iron-icons.js"], res, rej);
        });
        new Promise(function (res, rej) {
          return _require.default(["../../../../../@polymer/iron-icon/iron-icon.js"], res, rej);
        });
        new Promise(function (res, rej) {
          return _require.default(["../../../../lunr-search/lunr-search.js"], res, rej);
        });
        new Promise(function (res, rej) {
          return _require.default(["../../../../simple-datetime/simple-datetime.js"], res, rej);
        });
        return _this;
      } // render function
  
  
      babelHelpers.createClass(SiteSearch, [{
        key: "_searchChanged",
  
        /**
         * Notice search term changed and let's fire up some results
         */
        value: function _searchChanged(term, oldTerm) {
          // only load up the lunr source data once they have 3 or more characters
          if (term.length >= 3 && babelHelpers.typeof(this.dataSource) === (typeof undefined === "undefined" ? "undefined" : babelHelpers.typeof(undefined))) {
            this.dataSource = "lunrSearchIndex.json";
          }
        }
      }], [{
        key: "template",
        get: function get() {
          return (0, _polymerElement.html)(_templateObject_12117ea0e53311e9a0cfefb808989d41());
        }
        /**
         * Mix in an opened status
         */
  
      }, {
        key: "properties",
        get: function get() {
          return {
            dataSource: {
              type: String
            },
            search: {
              type: String,
              observer: "_searchChanged"
            },
            __results: {
              type: Array
            }
          };
        }
      }]);
      return SiteSearch;
    }(_polymerElement.PolymerElement);
  
    _exports.SiteSearch = SiteSearch;
    window.customElements.define(SiteSearch.tag, SiteSearch);
  });