PageSourceSearch

https://static.eagleofva.com/assets/js/oilib.js?v=58e9179

js eagleofva.com collected 2026-09-29 15:21:32 UTC 210,220 bytes, 6 lines download raw bytes

1/*! For license information please see oilib.js.LICENSE.txt */
2/*!
3 * @oi @oijs/oilib Version 1.1.49
4 * @oi Build: Fri Jul 31 2026 10:00:26 GMT-0400 (Eastern Daylight Time)
5 *
6 */(()=>{var e,t,i,o={748:function(e){var t;t=function(){"use strict";function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,o=Array(t);i<t;i++)o[i]=e[i];return o}function t(e,t,i){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function i(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function o(e){for(var o=1;o<arguments.length;o++){var n=null!=arguments[o]?arguments[o]:{};o%2?i(Object(n),!0).forEach((function(i){t(e,i,n[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function n(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||r(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function r(t,i){if(t){if("string"==typeof t)return e(t,i);var o={}.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?e(t,i):void 0}}var a=function(e){return"string"==typeof e?document.querySelector(e):e()},l=function(e,t){var i="string"==typeof e?document.createElement(e):e;for(var o in t){var n=t[o];if("inside"===o)n.append(i);else if("dest"===o)a(n[0]).insertAdjacentElement(n[1],i);else if("around"===o){var s=n;s.parentNode.insertBefore(i,s),i.append(s),null!=s.getAttribute("autofocus")&&s.focus()}else o in i?i[o]=n:i.setAttribute(o,n)}return i},c=function(e,t){return e=String(e).toLowerCase(),t?e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").normalize("NFC"):e},d=function(e,t){return l("mark",o({innerHTML:e},"string"==typeof t&&{class:t})).outerHTML},h=function(e,t){t.input.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:t.feedback,cancelable:!0}))},u=function(e,t,i){var o=i||{},n=o.mode,s=o.diacritics,r=o.highlight,a=c(t,s);if(t=String(t),e=c(e,s),"loose"===n){var l=(e=e.replace(/ /g,"")).length,h=0,u=Array.from(t).map((function(t,i){return h<l&&a[i]===e[h]&&(t=r?d(t,r):t,h++),t})).join("");if(h===l)return u}else{var m=a.indexOf(e);if(~m)return e=t.substring(m,m+e.length),r?t.replace(e,d(e,r)):t}},m=function(e,t){return new Promise((function(i,o){var n;return(n=e.data).cache&&n.store?i():new Promise((function(e,i){return"function"==typeof n.src?new Promise((function(e,i){return"AsyncFunction"===n.src.constructor.name?n.src(t).then(e,i):e(n.src(t))})).then(e,i):e(n.src)})).then((function(t){try{return e.feedback=n.store=t,h("response",e),i()}catch(e){return o(e)}}),o)}))},p=function(e,t){var i=t.data,o=t.searchEngine,n=[];i.store.forEach((function(s,a){var l=function(i){var r=i?s[i]:s,a="function"==typeof o?o(e,r):u(e,r,{mode:o,diacritics:t.diacritics,highlight:t.resultItem.highlight});if(a){var l={match:a,value:s};i&&(l.key=i),n.push(l)}};if(i.keys){var c,d=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=r(e))){t&&(e=t);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,s=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return s=e.done,e},e:function(e){a=!0,n=e}
vendor: 5,810 bytes, line 6
6,f:function(){try{s||null==t.return||t.return()}finally{if(a)throw n}}}}(i.keys);try{for(d.s();!(c=d.n()).done;)l(c.value)}catch(e){d.e(e)}finally{d.f()}}else l()})),i.filter&&(n=i.filter(n));var s=n.slice(0,t.resultsList.maxResults);t.feedback={query:e,matches:n,results:s},h("results",t)},_="aria-expanded",f="aria-activedescendant",g="aria-selected",y=function(e,t){e.feedback.selection=o({index:t},e.feedback.results[t])},w=function(e){e.isOpen||((e.wrapper||e.input).setAttribute(_,!0),e.list.removeAttribute("hidden"),e.isOpen=!0,h("open",e))},b=function(e){e.isOpen&&((e.wrapper||e.input).setAttribute(_,!1),e.input.setAttribute(f,""),e.list.setAttribute("hidden",""),e.isOpen=!1,h("close",e))},v=function(e,t){var i=t.resultItem,o=t.list.getElementsByTagName(i.tag),s=!!i.selected&&i.selected.split(" ");if(t.isOpen&&o.length){var r,a,l=t.cursor;e>=o.length&&(e=0),e<0&&(e=o.length-1),t.cursor=e,l>-1&&(o[l].removeAttribute(g),s&&(a=o[l].classList).remove.apply(a,n(s))),o[e].setAttribute(g,!0),s&&(r=o[e].classList).add.apply(r,n(s)),t.input.setAttribute(f,o[t.cursor].id),t.list.scrollTop=o[e].offsetTop-t.list.clientHeight+o[e].clientHeight+5,t.feedback.cursor=t.cursor,y(t,e),h("navigate",t)}},k=function(e){v(e.cursor+1,e)},E=function(e){v(e.cursor-1,e)},L=function(e,t,i){(i=i>=0?i:e.cursor)<0||(e.feedback.event=t,y(e,i),h("selection",e),b(e))};function x(e,t){var i=this;return new Promise((function(n,s){var r,a;return r=t||((a=e.input)instanceof HTMLInputElement||a instanceof HTMLTextAreaElement?a.value:a.innerHTML),function(e,t,i){return t?t(e):e.length>=i}(r=e.query?e.query(r):r,e.trigger,e.threshold)?m(e,r).then((function(t){try{return e.feedback instanceof Error?n():(p(r,e),e.resultsList&&function(e){var t=e.resultsList,i=e.list,n=e.resultItem,s=e.feedback,r=s.matches,a=s.results;if(e.cursor=-1,i.innerHTML="",r.length||t.noResults){var c=new DocumentFragment;a.forEach((function(e,t){var i=l(n.tag,o({id:"".concat(n.id,"_").concat(t),role:"option",innerHTML:e.match,inside:c},n.class&&{class:n.class}));n.element&&n.element(i,e)})),i.append(c),t.element&&t.element(i,s),w(e)}else b(e)}(e),c.call(i))}catch(e){return s(e)}}),s):(b(e),c.call(i));function c(){return n()}}))}var S=function(e,t){for(var i in e)for(var o in e[i])t(i,o)};function O(e){var t=this;return new Promise((function(i,n){var s,r,a;if(s=e.placeHolder,a={role:"combobox","aria-owns":(r=e.resultsList).id,"aria-haspopup":!0,"aria-expanded":!1},l(e.input,o(o({"aria-controls":r.id,"aria-autocomplete":"both"},s&&{placeholder:s}),!e.wrapper&&o({},a))),e.wrapper&&(e.wrapper=l("div",o({around:e.input,class:e.name+"_wrapper"},a))),r&&(e.list=l(r.tag,o({dest:[r.destination,r.position],id:r.id,role:"listbox",hidden:"hidden"},r.class&&{class:r.class}))),function(e){var t,i,n,s=e.events,r=(t=function(){return x(e)},i=e.debounce,function(){clearTimeout(n),n=setTimeout((function(){return t()}),i)}),a=e.events=o({input:o({},s&&s.input)},e.resultsList&&{list:s?o({},s.list):{}}),l={input:{input:function(){r()},keydown:function(t){!function(e,t){switch(e.keyCode){case 40:case 38:e.preventDefault(),40===e.keyCode?k(t):E(t);break;case 13:t.submit||e.preventDefault(),t.cursor>=0&&L(t,e);break;case 9:t.resultsList.tabSelect&&t.cursor>=0&&L(t,e);break;case 27:t.input.value="",h("clear",t),b(t)}}(t,e)},blur:function(){b(e)}},list:{mousedown:function(e){e.preventDefault()},click:function(t){!function(e,t){var i=t.resultItem.tag.toUpperCase(),o=Array.from(t.list.querySelectorAll(i)),n=e.target.closest(i);n&&n.nodeName===i&&L(t,e,o.indexOf(n))}(t,e)}}};S(l,(function(t,i){(e.resultsList||"input"===i)&&(a[t][i]||(a[t][i]=l[t][i]))})),S(a,(function(t,i){e[t].addEventListener(i,a[t][i])}))}(e),e.data.cache)return m(e).then((function(e){try{return c.call(t)}catch(e){return n(e)}}),n);function c(){return h("init",e),i()}return c.call(t)}))}function P(e){var t=e.prototype;t.init=function(){O(this)},t.start=function(e){x(this,e)},t.unInit=function(){if(this.wrapper){var e=this.wrapper.parentNode;e.insertBefore(this.input,this.wrapper),e.removeChild(this.wrapper)}var t;S((t=this).events,(function(e,i){t[e].removeEventListener(i,t.events[e][i])}))},t.open=function(){w(this)},t.close=function(){b(this)},t.goTo=function(e){v(e,this)},t.next=function(){k(this)},t.previous=function(){E(this)},t.select=function(e){L(this,null,e)},t.search=function(e,t,i){return u(e,t,i)}}return function e(t){this.options=t,this.id=e.instances=(e.instances||0)+1,this.name="autoComplete",this.wrapper=1,this.threshold=1,this.debounce=0,this.resultsList={position:"afterend",tag:"ul",maxResults:5},this.resultItem={tag:"li"},function(e){var t=e.name,i=e.options,o=e.resultsList,n=e.resultItem;for(var r in i)if("object"===s(i[r]))for(var l in e[r]||(e[r]={}),i[r])e[r][l]=i[r][l];else e[r]=i[r];e.selector=e.selector||"#"+t,o.destination=o.destination||e.selector,o.id=o.id||t+"_list_"+e.id,n.id=n.id||t+"_result",e.input=a(e.selector)}(this),P.call(this,e),O(this)}},e.exports=t()},495:function(e){var t;t=function(){var e=JSON.parse('{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"
6c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ä¢":"G","Ä£":"g","Ĩ":"I","Ä©":"i","Ī":"i","Ä«":"i","Ä®":"I","į":"i","İ":"I","ı":"i","Ķ":"k","Ä·":"k","Ä»":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ō":"O","ō":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Å ":"S","Å¡":"s","Å¢":"T","Å£":"t","Ť":"T","Å¥":"t","Ũ":"U","Å©":"u","Ū":"u","Å«":"u","Å®":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Å´":"W","ŵ":"w","Ŷ":"Y","Å·":"y","Ÿ":"Y","Ź":"Z","ź":"z","Å»":"Z","ż":"z","Ž":"Z","ž":"z","Ə":"E","ƒ":"f","Æ ":"O","Æ¡":"o","Ư":"U","ư":"u","Lj":"LJ","lj":"lj","Nj":"NJ","nj":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","ə":"e","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Î¥":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Ð¥":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ò¢":"NG","Ò£":"ng","Ò®":"UE","Ò¯":"ue","Ò°":"U","Ò±":"u","Òº":"H","Ò»":"h","Ә":"AE","ә":"ae","Ó¨":"OE","Ó©":"oe","Ô±":"A","Ô²":"B","Ô³":"G","Ô´":"D","Ôµ":"E","Ô¶":"Z","Ô·":"E\'","Ô¸":"Y\'","Ô¹":"T\'","Ôº":"JH","Ô»":"I","Ô¼":"L","Ô½":"X","Ô¾":"C\'","Ô¿":"K","Հ":"H","Ձ":"D\'","Ղ":"GH","Ճ":"TW","Մ":"M","Յ":"Y","Ն":"N","Շ":"SH","Չ":"CH","Պ":"P","Ջ":"J","Ռ":"R\'","Ս":"S","Վ":"V","Տ":"T","Ր":"R","Ց":"C","Փ":"P\'","Ք":"Q\'","Օ":"O\'\'","Ֆ":"F","և":"EV","Ø¡":"a","Ø¢":"aa","Ø£":"a","ؤ":"u","Ø¥":"i","ئ":"e","ا":"a","ب":"b","Ø©":"h","ت":"t","Ø«":"th","ج":"j","Ø­":"h","Ø®":"kh","د":"d","ذ":"th","ر":"r","ز":"z","س":"s","Ø´":"sh","ص":"s","ض":"dh","Ø·":"t","ظ":"z","ع":"a","غ":"gh","ف":"f","ق":"q","ك":"k","ل":"l","م":"m","ن":"n","ه":"h","و":"w","ى":"a","ي":"y","ً":"an","ٌ":"on","ٍ":"en","َ":"a","ُ":"u","ِ":"e","ْ":"","Ù ":"0","Ù¡":"1","Ù¢":"2","Ù£":"3","Ù¤":"4","Ù¥":"5","Ù¦":"6","Ù§":"7","Ù¨":"8","Ù©":"9","Ù¾":"p","چ":"ch","ژ":"zh","Ú©":"k","Ú¯":"g","ی":"y","Û°":"0","Û±":"1","Û²":"2","Û³":"3","Û´":"4","Ûµ":"5","Û¶":"6","Û·":"7","Û¸":"8","Û¹":"9","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","á¹¢":"S","á¹£":"s","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","á» ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","á»§":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","á»­":"u","á»®":"U","ữ":"u","á»°":"U","á»±":"u","Ỳ":"Y","ỳ":"y","á»´":"Y","ỵ":"y","á»¶":"Y","á»·":"y","Ỹ":"Y","ỹ":"y","–":"-","‘":"\'","’":"\'","“":"\\"","”":"\\"","„":"\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","â
6‚§":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₺":"turkish lira","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","ï·¼":"rial","ﻵ":"laa","ï»·":"laa","ﻹ":"lai","ï»»":"la"}'),t=JSON.parse('{"bg":{"Й":"Y","Ц":"Ts","Щ":"Sht","Ъ":"A","Ь":"Y","й":"y","ц":"ts","щ":"sht","ъ":"a","ь":"y"},"de":{"Ä":"AE","ä":"ae","Ö":"OE","ö":"oe","Ü":"UE","ü":"ue","ß":"ss","%":"prozent","&":"und","|":"oder","∑":"summe","∞":"unendlich","♥":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","¢":"centavos","£":"libras","¤":"moneda","₣":"francos","∑":"suma","∞":"infinito","♥":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","¢":"centime","£":"livre","¤":"devise","₣":"franc","∑":"somme","∞":"infini","♥":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","¢":"centavo","∑":"soma","£":"libra","∞":"infinito","♥":"amor"},"uk":{"И":"Y","и":"y","Й":"Y","й":"y","Ц":"Ts","ц":"ts","Ð¥":"Kh","х":"kh","Щ":"Shch","щ":"shch","Г":"H","г":"h"},"vi":{"Đ":"D","đ":"d"},"da":{"Ø":"OE","ø":"oe","Å":"AA","Ã¥":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"større end"},"nb":{"&":"og","Å":"AA","Æ":"AE","Ø":"OE","Ã¥":"aa","æ":"ae","ø":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","Å":"AA","Ä":"AE","Ö":"OE","Ã¥":"aa","ä":"ae","ö":"oe"}}');function i(i,o){if("string"!=typeof i)throw new Error("slugify: string argument expected");var n=t[(o="string"==typeof o?{replacement:o}:o||{}).locale]||{},s=void 0===o.replacement?"-":o.replacement,r=void 0===o.trim||o.trim,a=i.normalize().split("").reduce((function(t,i){var r=n[i];return void 0===r&&(r=e[i]),void 0===r&&(r=i),r===s&&(r=" "),t+r.replace(o.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")}),"");return o.strict&&(a=a.replace(/[^A-Za-z0-9\s]/g,"")),r&&(a=a.trim()),a=a.replace(/\s+/g,s),o.lower&&(a=a.toLowerCase()),a}return i.extend=function(t){Object.assign(e,t)},i},e.exports=t(),e.exports.default=t()}},n={};function s(e){var t=n[e];if(void 0!==t)return t.exports;var i=n[e]={exports:{}};return o[e].call(i.exports,i,i.exports,s),i.exports}s.m=o,s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,s.t=function(i,o){if(1&o&&(i=this(i)),8&o)return i;if("object"==typeof i&&i){if(4&o&&i.__esModule)return i;if(16&o&&"function"==typeof i.then)return i}var n=Object.create(null);s.r(n);var r={};e=e||[null,t({}),t([]),t(t)];for(var a=2&o&&i;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((e=>r[e]=()=>i[e]));return r.default=()=>i,s.d(n,r),n},s.d=(e,t)=>{for(var i in t)s.o(t,i)&&!s.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce(((t,i)=>(s.f[i](e,t),t)),[])),s.u=e=>({192:"oilib.chunk.mcluster",484:"oilib.chunk.mlabel",503:"oilib.chunk.panzoom",931:"oilib.chunk.acsample"}[e]+".js?ver="+{192:"04487e91cb42f15c3544",484:"f21560120f2d71d9628a",503:"66ea4760525171a9c100",931:"0ab53618b2149e4be721"}[e]),s.miniCssF=e=>{},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i={},s.l=(e,t,o,n)=>{if(i[e])i[e].push(t);else{var r,a;if(void 0!==o)for(var l=document.getElementsByTagName("script"),c=0;c<l.length;c++){var d=l[c];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")=="oi:"+o){r=d;break}}r||(a=!0,(r=document.createElement("script")).charset="utf-8",r.timeout=120,s.nc&&r.setAttribute("nonce",s.nc),r.setAttribute("data-webpack","oi:"+o),r.src=e),i[e]=[t];var h=(t,o)=>{r.onerror=r.onload=null,clearTimeout(u);var n=i[e];if(delete i[e],r.parentNode&&r.parentNode.removeChild(r),n&&n.forEach((e=>e(o))),t)return t(o)},u=setTimeout(h.bind(null,void 0,{type:"timeout",target:r}),12e4);r.onerror=h.bind(null,r.onerror),r.onload=h.bind(null,r.onload),a&&document.head.appendChild(r)}},s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}
6),Object.defineProperty(e,"__esModule",{value:!0})},s.p="/oilib/",void 0!==s&&Object.defineProperty(s,"p",{get:function(){try{if("string"!=typeof oi_preload.oilib_path)throw new Error("WebpackRequireFrom: 'oi_preload.oilib_path' is not a string or not available at runtime. See https://github.com/agoldis/webpack-require-from#troubleshooting");return oi_preload.oilib_path}catch(e){return console.error(e),"/oilib/"}},set:function(e){console.warn("WebpackRequireFrom: something is trying to override webpack public path. Ignoring the new value"+e+".")}}),(()=>{var e={548:0};s.f.j=(t,i)=>{var o=s.o(e,t)?e[t]:void 0;if(0!==o)if(o)i.push(o[2]);else{var n=new Promise(((i,n)=>o=e[t]=[i,n]));i.push(o[2]=n);var r=s.p+s.u(t),a=new Error;s.l(r,(i=>{if(s.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var n=i&&("load"===i.type?"missing":i.type),r=i&&i.target&&i.target.src;a.message="Loading chunk "+t+" failed.\n("+n+": "+r+")",a.name="ChunkLoadError",a.type=n,a.request=r,o[1](a)}}),"chunk-"+t,t)}};var t=(t,i)=>{var o,n,[r,a,l]=i,c=0;if(r.some((t=>0!==e[t]))){for(o in a)s.o(a,o)&&(s.m[o]=a[o]);if(l)l(s)}for(t&&t(i);c<r.length;c++)n=r[c],s.o(e,n)&&e[n]&&e[n][0](),e[n]=0},i=globalThis.webpackChunkoi=globalThis.webpackChunkoi||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();var r={};(()=>{"use strict";s.r(r),s.d(r,{OiCookieUtils:()=>Pt,OiIso8601Utils:()=>Ct,OiMapMulti:()=>ri,OiMapSingle:()=>ni,OiStyleUtils:()=>Tt,OiUtils:()=>jt,OiVideo:()=>Ii,User:()=>bi,assload:()=>qt,autocomplete:()=>xi,autoloaders:()=>Zi,axios:()=>Lt,cookie:()=>Ot,defer:()=>Wt,filter:()=>Ki,form:()=>Bi,hfid:()=>yi,isp:()=>_i,loadAssets:()=>Bt,loaded:()=>Ut,map:()=>ai,options:()=>Rt,refreshUser:()=>Xi,state:()=>t,user:()=>bi,utils:()=>Mt,video:()=>zi});var e={};s.r(e),s.d(e,{hasBrowserEnv:()=>me,hasStandardBrowserEnv:()=>_e,hasStandardBrowserWebWorkerEnv:()=>fe,navigator:()=>pe,origin:()=>ge});const t={oimap_ready:!1,nonce:null,ga4_client_id:null,oivideo_id_log:new Set,oivideo_element_log:new Set,oivideo_api_requested:new Set,oivideo_api_ready:new Set};function i(e,t){return function(){return e.apply(t,arguments)}}const{toString:o}=Object.prototype,{getPrototypeOf:n}=Object,a=(l=Object.create(null),e=>{const t=o.call(e);return l[t]||(l[t]=t.slice(8,-1).toLowerCase())});var l;const c=e=>(e=e.toLowerCase(),t=>a(t)===e),d=e=>t=>typeof t===e,{isArray:h}=Array,u=d("undefined");const m=c("ArrayBuffer");const p=d("string"),_=d("function"),f=d("number"),g=e=>null!==e&&"object"==typeof e,y=e=>{if("object"!==a(e))return!1;const t=n(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},w=c("Date"),b=c("File"),v=c("Blob"),k=c("FileList"),E=c("URLSearchParams"),[L,x,S,O]=["ReadableStream","Request","Response","Headers"].map(c);function P(e,t,{allOwnKeys:i=!1}={}){if(null==e)return;let o,n;if("object"!=typeof e&&(e=[e]),h(e))for(o=0,n=e.length;o<n;o++)t.call(null,e[o],o,e);else{const n=i?Object.getOwnPropertyNames(e):Object.keys(e),s=n.length;let r;for(o=0;o<s;o++)r=n[o],t.call(null,e[r],r,e)}}function A(e,t){t=t.toLowerCase();const i=Object.keys(e);let o,n=i.length;for(;n-- >0;)if(o=i[n],t===o.toLowerCase())return o;return null}const T="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,C=e=>!u(e)&&e!==T;const I=(z="undefined"!=typeof Uint8Array&&n(Uint8Array),e=>z&&e instanceof z);var z;const j=c("HTMLFormElement"),M=(({hasOwnProperty:e})=>(t,i)=>e.call(t,i))(Object.prototype),R=c("RegExp"),D=(e,t)=>{const i=Object.getOwnPropertyDescriptors(e),o={};P(i,((i,n)=>{let s;!1!==(s=t(i,n,e))&&(o[n]=s||i)})),Object.defineProperties(e,o)},N="abcdefghijklmnopqrstuvwxyz",q="0123456789",F={DIGIT:q,ALPHA:N,ALPHA_DIGIT:N+N.toUpperCase()+q};const B=c("AsyncFunction"),U=(H="function"==typeof setImmediate,W=_(T.postMessage),H?setImmediate:W?($=`axios@${Math.random()}`,V=[],T.addEventListener("message",(({source:e,data:t})=>{e===T&&t===$&&V.length&&V.shift()()}),!1),e=>{V.push(e),T.postMessage($,"*")}):e=>setTimeout(e));var H,W,$,V;const J="undefined"!=typeof queueMicrotask?queueMicrotask.bind(T):"undefined"!=typeof process&&process.nextTick||U,G={isArray:h,isArrayBuffer:m,isBuffer:function(e){return null!==e&&!u(e)&&null!==e.constructor&&!u(e.constructor)&&_(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||_(e.append)&&("formdata"===(t=a(e))||"object"===t&&_(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&m(e.buffer),t},isString:p,isNumber:f,isBoolean:e=>!0===e||!1===e,isObject:g,isPlainObject:y,isReadableStream:L,isRequest:x,isResponse:S,isHeaders:O,isUndefined:u,isDate:w,isFile:b,isBlob:v,isRegExp:R,isFunction:_,isStream:e=>g(e)&&_(e.pipe),isURLSearchParams:E,isTypedArray:I,isFileList:k,forEach:P,merge:function e(){const{caseless:t}=C(this)&&this||{},i={},o=(o,n)=>{const s=t&&A(i,n)||n;y(i[s])&&y(o)?i[s]=e(i[s],o):y(o)?i[s]=e({},o):h(o)?i[s]=o.slice():i[s]=o};for(let n=0,s=arguments.length;n<s;n++)arguments[n]&&P(arguments[n],o);return i},extend:(e,t,o,{allOwnKeys:n}={})=>(P(t,((t,n)=>{o&&_(t)?e[n]=i(t,o):e[n]=t}),{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,i,o)=>{e.prototype=Object.create(t.prototype,o),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}
vendor: 4,933 bytes, line 6
6),i&&Object.assign(e.prototype,i)},toFlatObject:(e,t,i,o)=>{let s,r,a;const l={};if(t=t||{},null==e)return t;do{for(s=Object.getOwnPropertyNames(e),r=s.length;r-- >0;)a=s[r],o&&!o(a,e,t)||l[a]||(t[a]=e[a],l[a]=!0);e=!1!==i&&n(e)}while(e&&(!i||i(e,t))&&e!==Object.prototype);return t},kindOf:a,kindOfTest:c,endsWith:(e,t,i)=>{e=String(e),(void 0===i||i>e.length)&&(i=e.length),i-=t.length;const o=e.indexOf(t,i);return-1!==o&&o===i},toArray:e=>{if(!e)return null;if(h(e))return e;let t=e.length;if(!f(t))return null;const i=new Array(t);for(;t-- >0;)i[t]=e[t];return i},forEachEntry:(e,t)=>{const i=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=i.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},matchAll:(e,t)=>{let i;const o=[];for(;null!==(i=e.exec(t));)o.push(i);return o},isHTMLForm:j,hasOwnProperty:M,hasOwnProp:M,reduceDescriptors:D,freezeMethods:e=>{D(e,((t,i)=>{if(_(e)&&-1!==["arguments","caller","callee"].indexOf(i))return!1;const o=e[i];_(o)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")}))}))},toObjectSet:(e,t)=>{const i={},o=e=>{e.forEach((e=>{i[e]=!0}))};return h(e)?o(e):o(String(e).split(t)),i},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,i){return t.toUpperCase()+i})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:A,global:T,isContextDefined:C,ALPHABET:F,generateString:(e=16,t=F.ALPHA_DIGIT)=>{let i="";const{length:o}=t;for(;e--;)i+=t[Math.random()*o|0];return i},isSpecCompliantForm:function(e){return!!(e&&_(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),i=(e,o)=>{if(g(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[o]=e;const n=h(e)?[]:{};return P(e,((e,t)=>{const s=i(e,o+1);!u(s)&&(n[t]=s)})),t[o]=void 0,n}}return e};return i(e,0)},isAsyncFn:B,isThenable:e=>e&&(g(e)||_(e))&&_(e.then)&&_(e.catch),setImmediate:U,asap:J};function Y(e,t,i,o,n){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),i&&(this.config=i),o&&(this.request=o),n&&(this.response=n,this.status=n.status?n.status:null)}G.inherits(Y,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:G.toJSONObject(this.config),code:this.code,status:this.status}}});const Z=Y.prototype,K={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{K[e]={value:e}})),Object.defineProperties(Y,K),Object.defineProperty(Z,"isAxiosError",{value:!0}),Y.from=(e,t,i,o,n,s)=>{const r=Object.create(Z);return G.toFlatObject(e,r,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),Y.call(r,e.message,t,i,o,n),r.cause=e,r.name=e.name,s&&Object.assign(r,s),r};const X=Y;function Q(e){return G.isPlainObject(e)||G.isArray(e)}function ee(e){return G.endsWith(e,"[]")?e.slice(0,-2):e}function te(e,t,i){return e?e.concat(t).map((function(e,t){return e=ee(e),!i&&t?"["+e+"]":e})).join(i?".":""):t}const ie=G.toFlatObject(G,{},null,(function(e){return/^is[A-Z]/.test(e)}));const oe=function(e,t,i){if(!G.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const o=(i=G.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!G.isUndefined(t[e])}))).metaTokens,n=i.visitor||c,s=i.dots,r=i.indexes,a=(i.Blob||"undefined"!=typeof Blob&&Blob)&&G.isSpecCompliantForm(t);if(!G.isFunction(n))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(G.isDate(e))return e.toISOString();if(!a&&G.isBlob(e))throw new X("Blob is not supported. Use a Buffer instead.");return G.isArrayBuffer(e)||G.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,i,n){let a=e;if(e&&!n&&"object"==typeof e)if(G.endsWith(i,"{}"))i=o?i:i.slice(0,-2),e=JSON.stringify(e);else if(G.isArray(e)&&function(e){return G.isArray(e)&&!e.some(Q)}(e)||(G.isFileList(e)||G.endsWith(i,"[]"))&&(a=G.toArray(e)))return i=ee(i),a.forEach((function(e,o){!G.isUndefined(e)&&null!==e&&t.append(!0===r?te([i],o,s):null===r?i:i+"[]",l(e))})),!1;return!!Q(e)||(t.append(te(n,i,s),l(e)),!1)}const d=[],h=Object.assign(ie,{defaultVisitor:c,convertValue:l,isVisitable:Q});if(!G.isObject(e))throw new TypeError("data must be an object");return function e(i,o){if(!G.isUndefined(i)){if(-1!==d.indexOf(i))throw Error("Circular reference detected in "+o.join("."));d.push(i),G.forEach(i,(function(i,s){!0===(!(G.isUndefined(i)||null===i)&&n.call(t,i,G.isString(s)?s.trim():s,o,h))&&e(i,o?o.concat(s):[s])})),d.pop()}}(e),t};
vendor: 5,276 bytes, line 6
6function ne(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function se(e,t){this._pairs=[],e&&oe(e,this,t)}const re=se.prototype;re.append=function(e,t){this._pairs.push([e,t])},re.toString=function(e){const t=e?function(t){return e.call(this,t,ne)}:ne;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const ae=se;function le(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ce(e,t,i){if(!t)return e;const o=i&&i.encode||le,n=i&&i.serialize;let s;if(s=n?n(t,i):G.isURLSearchParams(t)?t.toString():new ae(t,i).toString(o),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}const de=class{constructor(){this.handlers=[]}use(e,t,i){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!i&&i.synchronous,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){G.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},he={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ue={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ae,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},me="undefined"!=typeof window&&"undefined"!=typeof document,pe="object"==typeof navigator&&navigator||void 0,_e=me&&(!pe||["ReactNative","NativeScript","NS"].indexOf(pe.product)<0),fe="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,ge=me&&window.location.href||"http://localhost",ye={...e,...ue};const we=function(e){function t(e,i,o,n){let s=e[n++];if("__proto__"===s)return!0;const r=Number.isFinite(+s),a=n>=e.length;if(s=!s&&G.isArray(o)?o.length:s,a)return G.hasOwnProp(o,s)?o[s]=[o[s],i]:o[s]=i,!r;o[s]&&G.isObject(o[s])||(o[s]=[]);return t(e,i,o[s],n)&&G.isArray(o[s])&&(o[s]=function(e){const t={},i=Object.keys(e);let o;const n=i.length;let s;for(o=0;o<n;o++)s=i[o],t[s]=e[s];return t}(o[s])),!r}if(G.isFormData(e)&&G.isFunction(e.entries)){const i={};return G.forEachEntry(e,((e,o)=>{t(function(e){return G.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),o,i,0)})),i}return null};const be={transitional:he,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const i=t.getContentType()||"",o=i.indexOf("application/json")>-1,n=G.isObject(e);n&&G.isHTMLForm(e)&&(e=new FormData(e));if(G.isFormData(e))return o?JSON.stringify(we(e)):e;if(G.isArrayBuffer(e)||G.isBuffer(e)||G.isStream(e)||G.isFile(e)||G.isBlob(e)||G.isReadableStream(e))return e;if(G.isArrayBufferView(e))return e.buffer;if(G.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(n){if(i.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return oe(e,new ye.classes.URLSearchParams,Object.assign({visitor:function(e,t,i,o){return ye.isNode&&G.isBuffer(e)?(this.append(t,e.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((s=G.isFileList(e))||i.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return oe(s?{"files[]":e}:e,t&&new t,this.formSerializer)}}return n||o?(t.setContentType("application/json",!1),function(e,t,i){if(G.isString(e))try{return(t||JSON.parse)(e),G.trim(e)}catch(o){if("SyntaxError"!==o.name)throw o}return(i||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||be.transitional,i=t&&t.forcedJSONParsing,o="json"===this.responseType;if(G.isResponse(e)||G.isReadableStream(e))return e;if(e&&G.isString(e)&&(i&&!this.responseType||o)){const i=!(t&&t.silentJSONParsing)&&o;try{return JSON.parse(e)}catch(n){if(i){if("SyntaxError"===n.name)throw X.from(n,X.ERR_BAD_RESPONSE,this,null,this.response);throw n}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ye.classes.FormData,Blob:ye.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};G.forEach(["delete","get","head","post","put","patch"],(e=>{be.headers[e]={}}));const ve=be,ke=G.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ee=Symbol("internals");function Le(e){return e&&String(e).trim().toLowerCase()}function xe(e){return!1===e||null==e?e:G.isArray(e)?e.map(xe):String(e)}function Se(e,t,i,o,n){return G.isFunction(o)?o.call(this,t,i):(n&&(t=i),G.isString(t)?G.isString(o)?-1!==t.indexOf(o):G.isRegExp(o)?o.test(t):void 0:void 0)}class Oe{constructor(e){e&&this.set(e)}set(e,t,i){const o=this;function n(e,t,i){const n=Le(t);if(!n)throw new Error("header name must be a non-empty string");const s=G.findKey(o,n);
vendor: 7,261 bytes, line 6
6(!s||void 0===o[s]||!0===i||void 0===i&&!1!==o[s])&&(o[s||t]=xe(e))}const s=(e,t)=>G.forEach(e,((e,i)=>n(e,i,t)));if(G.isPlainObject(e)||e instanceof this.constructor)s(e,t);else if(G.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))s((e=>{const t={};let i,o,n;return e&&e.split("\n").forEach((function(e){n=e.indexOf(":"),i=e.substring(0,n).trim().toLowerCase(),o=e.substring(n+1).trim(),!i||t[i]&&ke[i]||("set-cookie"===i?t[i]?t[i].push(o):t[i]=[o]:t[i]=t[i]?t[i]+", "+o:o)})),t})(e),t);else if(G.isHeaders(e))for(const[r,a]of e.entries())n(a,r,i);else null!=e&&n(t,e,i);return this}get(e,t){if(e=Le(e)){const i=G.findKey(this,e);if(i){const e=this[i];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=i.exec(e);)t[o[1]]=o[2];return t}(e);if(G.isFunction(t))return t.call(this,e,i);if(G.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Le(e)){const i=G.findKey(this,e);return!(!i||void 0===this[i]||t&&!Se(0,this[i],i,t))}return!1}delete(e,t){const i=this;let o=!1;function n(e){if(e=Le(e)){const n=G.findKey(i,e);!n||t&&!Se(0,i[n],n,t)||(delete i[n],o=!0)}}return G.isArray(e)?e.forEach(n):n(e),o}clear(e){const t=Object.keys(this);let i=t.length,o=!1;for(;i--;){const n=t[i];e&&!Se(0,this[n],n,e,!0)||(delete this[n],o=!0)}return o}normalize(e){const t=this,i={};return G.forEach(this,((o,n)=>{const s=G.findKey(i,n);if(s)return t[s]=xe(o),void delete t[n];const r=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,i)=>t.toUpperCase()+i))}(n):String(n).trim();r!==n&&delete t[n],t[r]=xe(o),i[r]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return G.forEach(this,((i,o)=>{null!=i&&!1!==i&&(t[o]=e&&G.isArray(i)?i.join(", "):i)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const i=new this(e);return t.forEach((e=>i.set(e))),i}static accessor(e){const t=(this[Ee]=this[Ee]={accessors:{}}).accessors,i=this.prototype;function o(e){const o=Le(e);t[o]||(!function(e,t){const i=G.toCamelCase(" "+t);["get","set","has"].forEach((o=>{Object.defineProperty(e,o+i,{value:function(e,i,n){return this[o].call(this,t,e,i,n)},configurable:!0})}))}(i,e),t[o]=!0)}return G.isArray(e)?e.forEach(o):o(e),this}}Oe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),G.reduceDescriptors(Oe.prototype,(({value:e},t)=>{let i=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[i]=e}}})),G.freezeMethods(Oe);const Pe=Oe;function Ae(e,t){const i=this||ve,o=t||i,n=Pe.from(o.headers);let s=o.data;return G.forEach(e,(function(e){s=e.call(i,s,n.normalize(),t?t.status:void 0)})),n.normalize(),s}function Te(e){return!(!e||!e.__CANCEL__)}function Ce(e,t,i){X.call(this,null==e?"canceled":e,X.ERR_CANCELED,t,i),this.name="CanceledError"}G.inherits(Ce,X,{__CANCEL__:!0});const Ie=Ce;function ze(e,t,i){const o=i.config.validateStatus;i.status&&o&&!o(i.status)?t(new X("Request failed with status code "+i.status,[X.ERR_BAD_REQUEST,X.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i)):e(i)}const je=function(e,t){e=e||10;const i=new Array(e),o=new Array(e);let n,s=0,r=0;return t=void 0!==t?t:1e3,function(a){const l=Date.now(),c=o[r];n||(n=l),i[s]=a,o[s]=l;let d=r,h=0;for(;d!==s;)h+=i[d++],d%=e;if(s=(s+1)%e,s===r&&(r=(r+1)%e),l-n<t)return;const u=c&&l-c;return u?Math.round(1e3*h/u):void 0}};const Me=function(e,t){let i,o,n=0,s=1e3/t;const r=(t,s=Date.now())=>{n=s,i=null,o&&(clearTimeout(o),o=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),a=t-n;a>=s?r(e,t):(i=e,o||(o=setTimeout((()=>{o=null,r(i)}),s-a)))},()=>i&&r(i)]},Re=(e,t,i=3)=>{let o=0;const n=je(50,250);return Me((i=>{const s=i.loaded,r=i.lengthComputable?i.total:void 0,a=s-o,l=n(a);o=s;e({loaded:s,total:r,progress:r?s/r:void 0,bytes:a,rate:l||void 0,estimated:l&&r&&s<=r?(r-s)/l:void 0,event:i,lengthComputable:null!=r,[t?"download":"upload"]:!0})}),i)},De=(e,t)=>{const i=null!=e;return[o=>t[0]({lengthComputable:i,total:e,loaded:o}),t[1]]},Ne=e=>(...t)=>G.asap((()=>e(...t))),qe=ye.hasStandardBrowserEnv?function(){const e=ye.navigator&&/(msie|trident)/i.test(ye.navigator.userAgent),t=document.createElement("a");let i;function o(i){let o=i;return e&&(t.setAttribute("href",o),o=t.href),t.setAttribute("href",o),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return i=o(window.location.href),function(e){const t=G.isString(e)?o(e):e;return t.protocol===i.protocol&&t.host===i.host}}():function(){return!0},Fe=ye.hasStandardBrowserEnv?{write(e,t,i,o,n,s){const r=[e+"="+encodeURIComponent(t)];G.isNumber(i)&&r.push("expires="+new Date(i).toGMTString()),G.isString(o)&&r.push("path="+o),G.isString(n)&&r.push("domain="+n),!0===s&&r.push("secure"),document.cookie=r.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Be(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Ue=e=>e instanceof Pe?{...e}:e;function He(e,t){t=t||{};const i={};function o(e,t,i){return G.isPlainObject(e)&&G.isPlainObject(t)?G.merge.call({caseless:i},e,t):G.isPlainObject(t)?G.merge({},t):G.isArray(t)?t.slice():t}function n(e,t,i){return G.isUndefined(t)?G.isUndefined(e)?void 0:o(void 0,e,i):o(e,t,i)}function s(e,t){if(!G.isUndefined(t))return o(void 0,t)}function r(e,t){return G.isUndefined(t)?G.isUndefined(e)?void 0:o(void 0,e):o(void 0,t)}function a(i,n,s){return s in t?o(i,n):s in e?o(void 0,i):void 0}const l={url:s,method:s,data:s,baseURL:r,transformRequest:r,transformResponse:r,paramsSerializer:r,timeout:r,timeoutMessage:r,withCredentials:r,withXSRFToken:r,adapter:r,responseType:r,xsrfCookieName:r,xsrfHeaderName:r,onUploadProgress:r,onDownloadProgress:r,decompress:r,maxContentLength:r,maxBodyLength:r,beforeRedirect:r,transport:r,httpAgent:r,httpsAgent:r,cancelToken:r,socketPath:r,responseEncoding:r,validateStatus:a,headers:(e,t)=>n(Ue(e),Ue(t),!0)};return G.forEach(Object.keys(Object.assign({},e,t)),(function(o){const s=l[o]||n,r=s(e[o],t[o],o);G.isUndefined(r)&&s!==a||(i[o]=r)})),i}const We=e=>{const t=He({},e);let i,{data:o,withXSRFToken:n,xsrfHeaderName:s,xsrfCookieName:r,headers:a,auth:l}=t;if(t.headers=a=Pe.from(a),t.url=ce(Be(t.baseURL,t.url),e.params,e.paramsSerializer),l&&a.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),G.isFormData(o))if(ye.hasStandardBrowserEnv||ye.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(i=a.getContentType())){const[e,...t]=i?i.split(";").map((e=>
vendor: 8,869 bytes, line 6
6e.trim())).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...t].join("; "))}if(ye.hasStandardBrowserEnv&&(n&&G.isFunction(n)&&(n=n(t)),n||!1!==n&&qe(t.url))){const e=s&&r&&Fe.read(r);e&&a.set(s,e)}return t},$e="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,i){const o=We(e);let n=o.data;const s=Pe.from(o.headers).normalize();let r,a,l,c,d,{responseType:h,onUploadProgress:u,onDownloadProgress:m}=o;function p(){c&&c(),d&&d(),o.cancelToken&&o.cancelToken.unsubscribe(r),o.signal&&o.signal.removeEventListener("abort",r)}let _=new XMLHttpRequest;function f(){if(!_)return;const o=Pe.from("getAllResponseHeaders"in _&&_.getAllResponseHeaders());ze((function(e){t(e),p()}),(function(e){i(e),p()}),{data:h&&"text"!==h&&"json"!==h?_.response:_.responseText,status:_.status,statusText:_.statusText,headers:o,config:e,request:_}),_=null}_.open(o.method.toUpperCase(),o.url,!0),_.timeout=o.timeout,"onloadend"in _?_.onloadend=f:_.onreadystatechange=function(){_&&4===_.readyState&&(0!==_.status||_.responseURL&&0===_.responseURL.indexOf("file:"))&&setTimeout(f)},_.onabort=function(){_&&(i(new X("Request aborted",X.ECONNABORTED,e,_)),_=null)},_.onerror=function(){i(new X("Network Error",X.ERR_NETWORK,e,_)),_=null},_.ontimeout=function(){let t=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const n=o.transitional||he;o.timeoutErrorMessage&&(t=o.timeoutErrorMessage),i(new X(t,n.clarifyTimeoutError?X.ETIMEDOUT:X.ECONNABORTED,e,_)),_=null},void 0===n&&s.setContentType(null),"setRequestHeader"in _&&G.forEach(s.toJSON(),(function(e,t){_.setRequestHeader(t,e)})),G.isUndefined(o.withCredentials)||(_.withCredentials=!!o.withCredentials),h&&"json"!==h&&(_.responseType=o.responseType),m&&([l,d]=Re(m,!0),_.addEventListener("progress",l)),u&&_.upload&&([a,c]=Re(u),_.upload.addEventListener("progress",a),_.upload.addEventListener("loadend",c)),(o.cancelToken||o.signal)&&(r=t=>{_&&(i(!t||t.type?new Ie(null,e,_):t),_.abort(),_=null)},o.cancelToken&&o.cancelToken.subscribe(r),o.signal&&(o.signal.aborted?r():o.signal.addEventListener("abort",r)));const g=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(o.url);g&&-1===ye.protocols.indexOf(g)?i(new X("Unsupported protocol "+g+":",X.ERR_BAD_REQUEST,e)):_.send(n||null)}))},Ve=(e,t)=>{const{length:i}=e=e?e.filter(Boolean):[];if(t||i){let i,o=new AbortController;const n=function(e){if(!i){i=!0,r();const t=e instanceof Error?e:this.reason;o.abort(t instanceof X?t:new Ie(t instanceof Error?t.message:t))}};let s=t&&setTimeout((()=>{s=null,n(new X(`timeout ${t} of ms exceeded`,X.ETIMEDOUT))}),t);const r=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(n):e.removeEventListener("abort",n)})),e=null)};e.forEach((e=>e.addEventListener("abort",n)));const{signal:a}=o;return a.unsubscribe=()=>G.asap(r),a}},Je=function*(e,t){let i=e.byteLength;if(!t||i<t)return void(yield e);let o,n=0;for(;n<i;)o=n+t,yield e.slice(n,o),n=o},Ge=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:i}=await t.read();if(e)break;yield i}}finally{await t.cancel()}},Ye=(e,t,i,o)=>{const n=async function*(e,t){for await(const i of Ge(e))yield*Je(i,t)}(e,t);let s,r=0,a=e=>{s||(s=!0,o&&o(e))};return new ReadableStream({async pull(e){try{const{done:t,value:o}=await n.next();if(t)return a(),void e.close();let s=o.byteLength;if(i){let e=r+=s;i(e)}e.enqueue(new Uint8Array(o))}catch(t){throw a(t),t}},cancel:e=>(a(e),n.return())},{highWaterMark:2})},Ze="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Ke=Ze&&"function"==typeof ReadableStream,Xe=Ze&&("function"==typeof TextEncoder?(Qe=new TextEncoder,e=>Qe.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var Qe;const et=(e,...t)=>{try{return!!e(...t)}catch(i){return!1}},tt=Ke&&et((()=>{let e=!1;const t=new Request(ye.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),it=Ke&&et((()=>G.isReadableStream(new Response("").body))),ot={stream:it&&(e=>e.body)};var nt;Ze&&(nt=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!ot[e]&&(ot[e]=G.isFunction(nt[e])?t=>t[e]():(t,i)=>{throw new X(`Response type '${e}' is not supported`,X.ERR_NOT_SUPPORT,i)})})));const st=async(e,t)=>{const i=G.toFiniteNumber(e.getContentLength());return null==i?(async e=>{if(null==e)return 0;if(G.isBlob(e))return e.size;if(G.isSpecCompliantForm(e)){const t=new Request(ye.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return G.isArrayBufferView(e)||G.isArrayBuffer(e)?e.byteLength:(G.isURLSearchParams(e)&&(e+=""),G.isString(e)?(await Xe(e)).byteLength:void 0)})(t):i},rt={http:null,xhr:$e,fetch:Ze&&(async e=>{let{url:t,method:i,data:o,signal:n,cancelToken:s,timeout:r,onDownloadProgress:a,onUploadProgress:l,responseType:c,headers:d,withCredentials:h="same-origin",fetchOptions:u}=We(e);c=c?(c+"").toLowerCase():"text";let m,p=Ve([n,s&&s.toAbortSignal()],r);const _=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let f;try{if(l&&tt&&"get"!==i&&"head"!==i&&0!==(f=await st(d,o))){let e,i=new Request(t,{method:"POST",body:o,duplex:"half"});if(G.isFormData(o)&&(e=i.headers.get("content-type"))&&d.setContentType(e),i.body){const[e,t]=De(f,Re(Ne(l)));o=Ye(i.body,65536,e,t)}}G.isString(h)||(h=h?"include":"omit");const n="credentials"in Request.prototype;m=new Request(t,{...u,signal:p,method:i.toUpperCase(),headers:d.normalize().toJSON(),body:o,duplex:"half",credentials:n?h:void 0});let s=await fetch(m);const r=it&&("stream"===c||"response"===c);if(it&&(a||r&&_)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=s[t]}));const t=G.toFiniteNumber(s.headers.get("content-length")),[i,o]=a&&De(t,Re(Ne(a),!0))||[];s=new Response(Ye(s.body,65536,i,(()=>{o&&o(),_&&_()})),e)}c=c||"text";let g=await ot[G.findKey(ot,c)||"text"](s,e);return!r&&_&&_(),await new Promise(((t,i)=>{ze(t,i,{data:g,headers:Pe.from(s.headers),status:s.status,statusText:s.statusText,config:e,request:m})}))}catch(g){if(_&&_(),g&&"TypeError"===g.name&&/fetch/i.test(g.message))throw Object.assign(new X("Network Error",X.ERR_NETWORK,e,m),{cause:g.cause||g});throw X.from(g,g&&g.code,e,m)}})};G.forEach(rt,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(i){}Object.defineProperty(e,"adapterName",{value:t})}}));const at=e=>`- ${e}`,lt=e=>G.isFunction(e)||null===e||!1===e,ct=e=>{e=G.isArray(e)?e:[e];const{length:t}=e;let i,o;const n={};for(let s=0;s<t;s++){let t;if(i=e[s],o=i,!lt(i)&&(o=rt[(t=String(i)).toLowerCase()],void 0===o))throw new X(`Unknown adapter '${t}'`);if(o)break;n[t||"#"+s]=o}if(!o){const e=Object.entries(n).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let i=t?e.length>1?"since :\n"+e.map(at).join("\n"):" "+at(e[0]):"as no adapter specified";throw new X("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return o};function dt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ie(null,e)}function ht(e){dt(e),e.headers=Pe.from(e.headers),e.data=Ae.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return ct(e.adapter||ve.adapter)(e).then((function(t){return dt(e),t.data=Ae.call(e,e.transformResponse,t),t.headers=Pe.from(t.headers),t}),(function(t){return Te(t)||(dt(e),t&&t.response&&(t.response.data=Ae.call(e,e.transformResponse,t.response),t.response.headers=Pe.from(t.response.headers))),Promise.reject(t)}))}const ut="1.7.7",mt={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{mt[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}}));const pt={};mt.transitional=function(e,t,i){function o(e,t){return"[Axios v1.7.7] Transitional option '"+e+"'"+t+(i?". "+i:"")}return(i,n,s)=>{if(!1===e)throw new X(o(n," has been removed"+(t?" in "+t:"")),X.ERR_DEPRECATED);return t&&!pt[n]&&(pt[n]=!0,console.warn(o(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(i,n,s)}};const _t={assertOptions:function(e,t,i){if("object"!=typeof e)throw new X("options must be an object",X.ERR_BAD_OPTION_VALUE);const o=Object.keys(e);let n=o.length;for(;n-- >0;){const s=o[n],r=t[s];if(r){const t=e[s],i=void 0===t||r(t,s,e);if(!0!==i)throw new X("option "+s+" must be "+i,X.ERR_BAD_OPTION_VALUE)}else if(!0!==i)throw new X("Unknown option "+s,X.ERR_BAD_OPTION)}},validators:mt},ft=_t.validators;class gt{constructor(e){this.defaults=e,this.interceptors={request:new de,response:new de}}async request(e,t){try{return await this._request(e,t)}catch(i){if(i instanceof Error){let e;Error.captureStackTrace?Error.captureStackTrace(e={}):e=new Error;
vendor: 3,120 bytes, line 6
6const t=e.stack?e.stack.replace(/^.+\n/,""):"";try{i.stack?t&&!String(i.stack).endsWith(t.replace(/^.+\n.+\n/,""))&&(i.stack+="\n"+t):i.stack=t}catch(o){}}throw i}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=He(this.defaults,t);const{transitional:i,paramsSerializer:o,headers:n}=t;void 0!==i&&_t.assertOptions(i,{silentJSONParsing:ft.transitional(ft.boolean),forcedJSONParsing:ft.transitional(ft.boolean),clarifyTimeoutError:ft.transitional(ft.boolean)},!1),null!=o&&(G.isFunction(o)?t.paramsSerializer={serialize:o}:_t.assertOptions(o,{encode:ft.function,serialize:ft.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=n&&G.merge(n.common,n[t.method]);n&&G.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete n[e]})),t.headers=Pe.concat(s,n);const r=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,r.unshift(e.fulfilled,e.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let d,h=0;if(!a){const e=[ht.bind(this),void 0];for(e.unshift.apply(e,r),e.push.apply(e,l),d=e.length,c=Promise.resolve(t);h<d;)c=c.then(e[h++],e[h++]);return c}d=r.length;let u=t;for(h=0;h<d;){const e=r[h++],t=r[h++];try{u=e(u)}catch(m){t.call(this,m);break}}try{c=ht.call(this,u)}catch(m){return Promise.reject(m)}for(h=0,d=l.length;h<d;)c=c.then(l[h++],l[h++]);return c}getUri(e){return ce(Be((e=He(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}G.forEach(["delete","get","head","options"],(function(e){gt.prototype[e]=function(t,i){return this.request(He(i||{},{method:e,url:t,data:(i||{}).data}))}})),G.forEach(["post","put","patch"],(function(e){function t(t){return function(i,o,n){return this.request(He(n||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}gt.prototype[e]=t(),gt.prototype[e+"Form"]=t(!0)}));const yt=gt;class wt{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const i=this;this.promise.then((e=>{if(!i._listeners)return;let t=i._listeners.length;for(;t-- >0;)i._listeners[t](e);i._listeners=null})),this.promise.then=e=>{let t;const o=new Promise((e=>{i.subscribe(e),t=e})).then(e);return o.cancel=function(){i.unsubscribe(t)},o},e((function(e,o,n){i.reason||(i.reason=new Ie(e,o,n),t(i.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new wt((function(t){e=t})),cancel:e}}}const bt=wt;const vt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,Parti
6alContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(vt).forEach((([e,t])=>{vt[t]=e}));const kt=vt;const Et=function e(t){const o=new yt(t),n=i(yt.prototype.request,o);return G.extend(n,yt.prototype,o,{allOwnKeys:!0}),G.extend(n,o,null,{allOwnKeys:!0}),n.create=function(i){return e(He(t,i))},n}(ve);Et.Axios=yt,Et.CanceledError=Ie,Et.CancelToken=bt,Et.isCancel=Te,Et.VERSION=ut,Et.toFormData=oe,Et.AxiosError=X,Et.Cancel=Et.CanceledError,Et.all=function(e){return Promise.all(e)},Et.spread=function(e){return function(t){return e.apply(null,t)}},Et.isAxiosError=function(e){return G.isObject(e)&&!0===e.isAxiosError},Et.mergeConfig=He,Et.AxiosHeaders=Pe,Et.formToJSON=e=>we(G.isHTMLForm(e)?new FormData(e):e),Et.getAdapter=ct,Et.HttpStatusCode=kt,Et.default=Et;const Lt=Et.create({headers:{"X-Requested-With":"XMLHttpRequest"}});class xt{_debug=!1;_errors={};get errors(){return this._errors}set errors(e){}addError(e,t,i){void 0===i&&(i="error"),this._errors[e]={printer:i,body:t}}getError(e){return this._errors[e]}countErrors(){return Object.keys(this._errors).length}deleteError(e){delete this._errors[e]}printErrors(){for(const[e,t]of Object.entries(this.errors))this.console[t.printer](t.body)}console={self:this,lib:"",id:"",debug:function(){return this.self.debug},error:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];this.debug()&&this.output("error",...t)},log:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];this.debug()&&this.output("log",...t)},warn:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];this.debug()&&this.output("warn",...t)},always:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];this.output("log",...t)},output:function(e){const t="["+this.lib+"]["+this.id+"] ";for(var i=arguments.length,o=new Array(i>1?i-1:0),n=1;n<i;n++)o[n-1]=arguments[n];const s=o.filter((e=>"object"!=typeof e&&e)),r=o.filter((e=>"object"==typeof e&&e));s.length&&window.console[e](t+s.join(", ")),r.length&&r.forEach((i=>window.console[e](t,i)))}};get debug(){return"oi"in window&&"options"in window.oi&&window.oi.options.debug&&(this._debug=!0),this._debug}set debug(e){window.oi?.options?.debug||(this._debug=e)}}class St extends xt{_name=null;set name(e){this._name=e,this.console.id=e}get name(){return this._name}value="";path="/";_expires=null;get expires(){if(!this._expires){const e=new Date;e.setMonth(e.getMonth()+6),this._expires=e.toUTCString()}return this._expires}domain=null;samesite="Lax";secure=!1;constructor(e,t){super(),e&&(this.name=e),this.console.lib="oicookie",void 0!==t&&(this.value=t);const i=new URL(window.location.href);i&&i.hostname&&(this.domain=i.hostname),i&&i.protocol&&"https:"==i.protocol&&(this.secure=!0)}cstring(){let e=[this.name+"="+this.value];return this.path&&e.push("path="+this.path),this.expires&&e.push("expires="+this.expires),this.domain&&e.push("domain="+this.domain),this.samesite&&e.push("SameSite="+this.samesite),this.secure&&e.push("Secure"),e.join(";")}set(){window.document.cookie=this.cstring(),this.console.log("Set")}exists(){const e=this.name+"="+this.value;let t;return t=this.value?document.cookie.split(";").find((t=>t.trim()==e)):document.cookie.split(";").find((e=>e.trim().startsWith(this.name+"="))),!!t&&t.trim()}get(){const e=this.exists();if(e){this.console.log("Get");const[t,...i]=e.trim().split("=");return{key:t,name:t,value:i.join("=")}}return this.console.log("Failed Get. Not found."),!1}delete(){let e=[this.name+"="+this.value];return this.path&&e.push("path="+this.path),e.push("expires=Thu, 01 Jan 1970 00:00:00 GMT"),this.domain&&e.push("domain="+this.domain),document.cookie=e.join(";"),this.exists()?(this.console.warn("Failed deletion. Still Exists."),!1):(this.console.log("Deleted."),{key:this.name,value:this.value})}expireMonths(e){let t=e||0;if(t=parseInt(t.toString()),t>0){const e=new Date;e.setMonth(e.getMonth()+t),this._expires=e.toUTCString()}}expireDays(e){let t=e||0;if(t=parseInt(t.toString()),t>0){const e=new Date;e.setDate(e.getDate()+t),this._expires=e.toUTCString()}}}const Ot=St;class Pt{constructor(){}set(e,t){const i=new St(e,t);return i.set(),i}get(e,t){return new St(e,t).get()}val(e){const t=this.get(e);return!!t&&t.value}delete(e,t){const i=new St(e,t);return i.exists()?i.delete():(i.console.log("Cookie not found."),!0)}}class At{constructor(){}set_booleans(e){if("string"==typeof e){if("false"==e.toLowerCase())return!1;if("true"==e.toLowerCase())return!0}return e}oiEvent(e,t,i){const o=t||{};(i||document.body).dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:o}
6))}}class Tt{constructor(){}is_hidden(e){if(e){if(e.getAttribute("hidden"))return!0;if(null===e.offsetParent)return!0;const t=window.getComputedStyle(e);if("none"==t.display)return!0;if("hidden"==t.visibility)return!0}return!1}class_remove_by_prefix(e,t,i){return void 0===i&&(i=!0),new Promise(((o,n)=>{e.classList.length||o(),i&&e.classList.remove(t);const s=[];e.classList.forEach(((e,i)=>{e.startsWith(t)&&s.push(e)})),s.length||o();for(let t=0;t<s.length;t++)e.classList.remove(s[t]),t===s.length-1&&o()}))}class_remove_by_suffix(e,t,i){return void 0===i&&(i=!0),new Promise(((o,n)=>{e.classList.length||o(),i&&e.classList.remove(t);const s=[];e.classList.forEach(((e,i)=>{e.endsWith(t)&&s.push(e)})),s.length||o();for(let t=0;t<s.length;t++)e.classList.remove(s[t]),t===s.length-1&&o()}))}}class Ct{constructor(){}is_date(e){if(!e||e.length<20)return!1;const t=e.slice(0,11);return!!/\d{4}-\d{2}-\d{2}T/.test(t)}make_duration(e){if("string"==typeof e){if(e.startsWith("PT"))return e;e=Number.parseInt(e,10)}const t=Math.floor(e);if(!Number.isFinite(t))return null;let i=0,o=0,n=0,s=!1,r=!1,a=!1,l=t;if(t<1)return null;if(l>3600){let e=l/3600;i=Math.floor(e),l=t-3600*i,s=i.toString()}if(l>59){let e=l/60;o=Math.floor(e),l=t-60*o,r=o.toString()}else i&&(r=o.toString());n=l,a=n.toString();let c="PT";return s&&(c=c+s+"H"),r&&(c=c+r+"M"),a&&(c=c+a+"S"),c}}var It=s(495),zt=s.n(It);class jt{constructor(){}src=(()=>new At)();slugify=(()=>zt())();cookie=(()=>new Pt)();style=(()=>new Tt)();iso=(()=>new Ct)();wrap_oi_aspect(e,t){t=t||{};let i=".oi-aspect-add-to-iframe iframe, .oi-wysiwyg iframe";e&&(i=i+", "+e+" iframe");const o=Object.assign({src:[],class:[]},t),n=document.querySelectorAll(i),s=Array.from(n);s.length&&s.forEach((function(e,t){let i=!1;if(o.class.length&&o.class.forEach((function(t){e.classList.contains(t)&&(i=!0)})),o.src.length&&o.src.forEach((function(t){e.src.indexOf(t)>-1&&(i=!0)})),i)return;const n=e.parentElement;if(!n.classList.contains("oi-aspect")){const t=e.src.indexOf("matterport")>-1?"one-one sixteen-nine-md":"four-three sixteen-nine-md",i=e.cloneNode(!0),o="oi-wrapped-iframe-"+Mt.makeUUID(),s=document.createElement("div");s.classList.add("oi-aspect"),s.classList.add(...t.split(" ")),s.id=o,s.innerHTML='<span class="oi-aspect-spacer"></span>',s.appendChild(i),n.replaceChild(s,e)}}))}reloadDocumentOnPathChange(){if(window._oi_pushState_patched)return;window._oi_pushState_previousPathname=window.location.pathname;const e=window.history.pushState;window.history.pushState=function(){for(var t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];e.call(window.history,...i),window._oi_pushState_previousPathname=window.location.pathname};const t=window.history.replaceState;window.history.replaceState=function(){for(var e=arguments.length,i=new Array(e),o=0;o<e;o++)i[o]=arguments[o];t.call(window.history,...i),window._oi_pushState_previousPathname=window.location.pathname},window.addEventListener("popstate",(()=>{if(window._oi_pushState_previousPathname==document.location.pathname)return window._oi_pushState_previousPathname=window.location.pathname,!1;location.reload()})),window._oi_pushState_patched=!0}makeUUID(){let e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){const i=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?i:3&i|8).toString(16)}))}removeHash(e){if(e){new RegExp("%"+e+":","g").test(window.location.hash)&&history.pushState("",document.title,window.location.pathname+window.location.search)}else history.pushState("",document.title,window.location.pathname+window.location.search)}hasTouchScreen(){let e=!1;if("maxTouchPoints"in navigator)e=navigator.maxTouchPoints>0;else if("msMaxTouchPoints"in navigator)e=navigator.msMaxTouchPoints>0;else{const t=window.matchMedia&&matchMedia("(pointer:coarse)");if(t&&"(pointer:coarse)"===t.media)e=!!t.matches;else if("orientation"in window)e=!0;else{const t=navigator.userAgent;e=/\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(t)||/\b(Android|Windows Phone|iPad|iPod)\b/i.test(t)}}return e}likelyMobile(){return window.matchMedia("only screen and (max-width: 768px)").matches&&this.hasTouchScreen()}is_screen_width(e,t,i){const o=this.make_matchMedia(e,t);if(!o)return window.oi_preload.debug&&window.console.error("[oiutils] Screen width media query failed."),!1;const n=window.matchMedia(o);
6return"function"==typeof i&&n.addEventListener("change",i),n.matches}make_matchMedia(e,t){try{const i=!!e&&parseInt(e.toString()),o=!!t&&parseInt(t.toString());if(i||o){const e=i?` and (min-width: ${i}px)`:"";return`only screen${e}${o?` and (max-width: ${o}px)`:""}`}return!1}catch(i){return window.oi_preload.debug&&window.console.error("[oiutils] make_matchMedia exception: "+i),!1}}sleep(e){return new Promise((t=>setTimeout(t,e)))}decamelize(e,t){return t=void 0===t?"_":t,e.replace(/([a-z\d])([A-Z])/g,"$1"+t+"$2").replace(/([A-Z]+)([A-Z][a-z\d]+)/g,"$1"+t+"$2").toLowerCase()}camelize(e){return e.replace(/^([A-Z])|[\s-_]+(\w)/g,(function(e,t,i,o){return i?i.toUpperCase():t.toLowerCase()}))}collapse_whitespace(e){return e.replace(/\s{2,}/g," ").trim()}countdown(e,t,i){const o=()=>{const o=(e=>{const t=e-Date.parse(new Date),i=Math.floor(t/1e3%60),o=Math.floor(t/1e3/60%60),n=Math.floor(t/36e5%24);return{total:t,days:Math.floor(t/864e5),hours:n,minutes:o,seconds:i}})(n);o.total<=0?(clearInterval(s),"function"==typeof i&&i(e)):"function"==typeof t&&t(e,o)};let n=Date.parse(e.dataset.enddate),s=setInterval(o,1e3);o()}is_dom_element(e,t){void 0===t&&(t=!1);const i=[e.ELEMENT_NODE,e.DOCUMENT_NODE,e.DOCUMENT_FRAGMENT_NODE];return t&&i.push(e.TEXT_NODE),Boolean(e.nodeType&&i.includes(e.nodeType))}get_window_of_element(e){const t=window.oi_preload.debug;let i=e.ownerDocument;null===i&&(i=e);const o=i.defaultView;if(null!==o)return o;t&&window.console.error("[oiutils] Failed to identify a window.containging youe DOM element.")}*get_dom_ancestors(e){let t;for(yield e;null!==(t=e.parentNode)&&t.nodeType===t.ELEMENT_NODE;)yield t,e=t}is_displayed(e,t,i){if(!Mt.is_dom_element(e))return void(window.oi_preload.debug&&window.console.error("[oiutils] is_displayed() require first argument is a DOM element."));const o=void 0===t||Boolean(t),n=void 0===i||Boolean(i);if("checkVisibility"in e){const t={checkOpacity:o,checkVisibilityCSS:n};return e.checkVisibility(t)}const s=e.getBoundingClientRect(),r=Mt.get_window_of_element(e),a=r.getComputedStyle(e);if(0===s.width&&0===s.height&&"hidden"!==a.overflow)return!1;if(o&&"0"===a.opacity)return!1;if(n&&"hidden"===a.visibility)return!1;if(s.x+s.width<0||s.y+s.height<0)return!1;for(const l of this.get_dom_ancestors(e)){const t=l===e,i=t?a:r.getComputedStyle(l);if(o&&"0"===i.opacity)return!1;if("contents"===i.display)continue;const n=t?s:l.getBoundingClientRect();if((0===n.width||0===n.height)&&"hidden"===a.overflow)return!1}return!0}is_url(e){try{new URL(e)}catch(t){return console.error(t),!1}return!0}is_num(e){return"number"==typeof e||/^\d+\.?\d+$/.test(e)}as_integer(e,t){return void 0===t&&(t=0),"string"==typeof e?Number.parseInt(e,10):"number"==typeof e?Math.trunc(e):t}fake(){}}const Mt=new jt;const Rt=new class{_debug=!1;is_oilib_docs_site=(()=>window.location.href.startsWith("file:///")||window.location.href.startsWith("https://oilib.oneilinteractive.com"))();nonce=(()=>!this.is_oilib_docs_site)();startTime=(()=>new Date)();oiCheckLoaded=(()=>new Event("oi.check.loaded"))();constructor(){for(const[e,t]of Object.entries(window.oi_preload||{}))this[e]=t;this.debug_by_cookie(),this.nonce&&(this.startTime=new Date,this.get_nonce(),setInterval(this.intervalCheck.bind(this),1e3))}intervalCheck(){(new Date).getTime()-this.startTime.getTime()>=216e5&&(this.startTime=new Date,this.get_nonce())}get_nonce(){var e=this;return Lt.get("/xhr/oicheck/").then((function(i){i.data.data.hasOwnProperty("oi_check_value")&&(t.nonce=i.data.data.oi_check_value,window.dispatchEvent(e.oiCheckLoaded))})).catch((function(e){window.console.warn("The call to set oicheck failed.",e)}))}get debug(){return this._debug}set debug(e){this._debug=e}debug_by_cookie(){"#oidebug_off"==window.location.hash?(Mt.cookie.delete("oidebug","1"),window.console.log("[oioptions] oidebug cookie cleared."),this.debug=!1):(Mt.cookie.get("oidebug","1")||"#oidebug"==window.location.hash)&&(Mt.cookie.set("oidebug","1"),window.console.log("[oioptions] oidebug cookie is set. Add '#oidebug_off' to the URL to clear."),this.debug=!0)}},Dt=new xt;Dt.console.lib="oi",Dt.console.id="deprecated";
6const Nt=new xt;Nt.console.lib="loadassets",Nt.console.id="(‿ˠ‿)";const qt=class extends xt{scripts=[];styles=[];progress=0;total=0;callback;constructor(e,t){var i,o;super(),i="new oi.assload()",o="https://oilib.oneilinteractive.com/tutorial-oiloadassets--intro.html",Dt.console.error(`DEPRECATED function or class called: ${i} Visit ${o} for instructions for upgrading.`),e=Array.isArray(e)?e:[e],this.total=e.length,this.callback=t,this.console.lib="oiassload",this.console.id="(‿ˠ‿)";for(let n=0;n<e.length;n++){let t=new URL(e[n]);t&&(t.pathname.endsWith(".css")?this.styles.push(t):this.scripts.push(t))}this.console.log("Queued "+this.scripts.length+" scripts and "+this.styles.length+" styles."),this.fetch()}fetch(){for(var e=0;e<this.scripts.length;e++)this.make_script(this.scripts[e]);for(e=0;e<this.styles.length;e++)this.make_style(this.styles[e])}make_script(e){let t=this,i=window.document.getElementsByTagName("head")[0],o=window.document.createElement("script");o.type="text/javascript",o.src=e.href,o.addEventListener("load",(function(){t.loaded(e)}),!1),i.appendChild(o),this.console.log("Made <script> for: "+e.host+e.pathname)}make_style(e){let t=this,i=window.document.getElementsByTagName("head")[0],o=window.document.createElement("link");o.type="text/css",o.rel="stylesheet",o.href=e.href,o.addEventListener("load",(function(){t.loaded(e)}),!1),i.appendChild(o),this.console.log("Made <link> for: "+e.host+e.pathname)}loaded(e){this.console.log("Loaded: "+e.host+e.pathname),this.progress++,this.callback&&this.progress==this.total&&(this.console.log("callback() called"),this.callback.call(void 0))}};const Ft={};async function Bt(e,t){e=Array.isArray(e)?e:[e],await Promise.all(e.map((e=>{if(!(e in Ft)){const i=new URL(e);let o=null;t?.callbackName&&(o=new Promise(((e,i)=>{window[t.callbackName]=e}))),i.pathname.endsWith(".css")?Ft[e]=function(e){const t=window.document.getElementsByTagName("head")[0],i=window.document.createElement("link");i.type="text/css",i.rel="stylesheet",i.href=e.href;const o=new Promise(((t,o)=>{i.addEventListener("load",(()=>{Nt.console.log("Loaded: "+e.host+e.pathname),t()}),!1)}));return t.appendChild(i),Nt.console.log("Made <link> for: "+e.host+e.pathname),o}(i):Ft[e]=function(e){const t=window.document.getElementsByTagName("head")[0],i=window.document.createElement("script");i.type="text/javascript",i.src=e.href;const o=new Promise(((t,o)=>{i.addEventListener("load",(()=>{Nt.console.log("Loaded: "+e.host+e.pathname),t()}),!1)}));return t.appendChild(i),Nt.console.log("Made <script> for: "+e.host+e.pathname),o}(i),o&&(Ft[e]=Promise.all([Ft[e],o]))}return Ft[e]})))}const Ut={autocomplete:{},defer:{},form:{},isp:{},map:{},user:!1,video:{}};class Ht extends xt{get id(){return this.element_id}element_id;get element(){return document.getElementById(this.element_id)}get tagName(){return!!this.element&&this.element.tagName.toLowerCase()}deferred_src;get is_loaded(){return this.element.src&&(this.element.src=this.deferred_src)}_trigger=null;get trigger(){return this._trigger||this.element}set trigger(e){e instanceof HTMLElement?this._trigger=e:this._trigger="string"==typeof e?document.querySelector(e):null,this._trigger||this.console.warn("Trigger element could not be identified. Subject element will be observed.")}_threshold=0;get threshold(){return this._threshold}set threshold(e){"string"==typeof e&&(e=Number.parseFloat(e)),(e<-.01||e>1.01)&&this.console.warn("threshold should be between 0 and 1 (inclusive)"),this._threshold=e}_margin="0px";get margin(){return this._margin}set margin(e){const t=/^(\d+(px|%))+( \d+(px|%))*$/g;e&&(e.match(t)?this._margin=e:Mt.is_num(e)&&(this._margin=`${e}px`))}autoloadable=["trigger","threshold","margin","do_before"];observer;constructor(e,t){if(super(),!e)throw Error("oi.defer element must have an id attribute.");this.element_id=e,this.console.lib="oidefer",this.console.id=this.element_id,this.deferred_src=this.element.dataset.oiDeferSrc,this.autoloadable.forEach((e=>{let t=this.element.dataset[e];
6if(!t){const i=Mt.camelize(e);t=this.element.dataset[i]}t&&(t=Mt.src.set_booleans(t),this[e]=t)})),this.validate(),this.preload(t)}oiEvent(e,t,i){const o=t||{element_id:this.element_id},n=i||this.trigger;Mt.src.oiEvent(e,o,n)}validate(){if(!this.deferred_src||!Mt.is_url(this.deferred_src))throw new Error("data-oi-lazy-src atttribute must be a valid url.");if(this.element.hasAttribute("src"))throw new Error("Element must not have a src attribute.");if("iframe"!=this.tagName)throw new Error(`${this.tagName}'s are not supported by oidefer.`)}preload(e){if(!Ut.defer[this.id]){Ut.defer[this.id]=this;const t=new Event("oi.loaded.defer."+this.id);window.dispatchEvent(t),this.create_observer(e);const i=this;this.element.addEventListener("load",(()=>{this.element.hasAttribute("src")&&(i.console.log("Dispatching: oidefer_element_loaded"),i.oiEvent("oidefer_element_loaded"),i.observer.unobserve(i.trigger),i.console.log("Observation removed."))}))}}create_observer(e){const t=this;this.observer=new IntersectionObserver((i=>{i.forEach((i=>{if(i.isIntersecting)if(t.console.log("Dispatching: oidefer_intersection"),t.oiEvent("oidefer_intersection"),"string"==typeof e){const i=window[e];if("function"==typeof i)try{i().then((()=>{t.console.log("do_before promise resolve"),t.load()}))}catch{t.console.warn("do_before SHOULD return a promise."),i(),t.load()}}else t.load()}))}),{threshold:t.threshold,rootMargin:t.margin}),this.observer.observe(this.trigger),t.console.log("Observation activated")}load(){this.is_loaded||(this.element.src=this.deferred_src)}}const Wt=Ht;class $t{fields=[];constructor(e){e&&(this.fields=[...e.fields])}addProperty(e){return this.fields.push(e),this}build(){return new Vt(this.fields)}}class Vt{fields;constructor(e){this.fields=e}parseAttribute(e,t,i){const o=this.fields.find((e=>e.name===t));if(!o)throw new Error(`Unknown attribute, ${String(t)}`);let n=i?e.dataset[o.name]:e.getAttribute(o.name);if(void 0===n){const t=Mt.camelize(o.name);n=i?e.dataset[t]:e.getAttribute(t)}if(null==n)return o.default;switch(o.type){case"legacy":return Mt.src.set_booleans(n);case"string":return n;case"boolean":const e=Mt.src.set_booleans(n);return"boolean"!=typeof e?Boolean(e):e;case"integer":return Number.parseInt(n,10);case"float":return Number.parseFloat(n);case"integerPair":return Jt(n);case"integerQuad":return function(e){if("object"==typeof e&&4===e.length)return e.map((function(e){return"number"!=typeof e?parseInt(e):e}));if("string"==typeof e){const t=e.split(",");if(4==t.length)return[parseInt(t[0]),parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]}throw new TypeError("The input value was not an array, nor a string with a comma.")}(n);default:throw new Error("Unknown property type: "+o.type)}}readAttributes(e,t){const i={};return this.fields.forEach((o=>{const n=this.parseAttribute(e,o.name,t);void 0!==n&&(i[o.name]=n)})),i}}function Jt(e){if("object"==typeof e&&2===e.length)return e.map((function(e){return"number"!=typeof e?parseInt(e):e}));if("string"==typeof e){const t=e.split(",");if(2==t.length)return[parseInt(t[0]),parseInt(t[1])]}throw new TypeError("The input value was not an array, nor a string with a comma.")}function Gt(e){return{above:e.anchor.y,below:e.height-e.anchor.y,left:e.anchor.x,right:e.width-e.anchor.x}}function Yt(e){return!!e&&"function"==typeof e.getIcon&&"function"==typeof e.getPosition}function Zt(e){return"number"==typeof e?e:Number.parseInt(e,10)}function Kt(e){return"number"==typeof e?e:Number.parseFloat(e)}const Xt={googlemaps:class{oi_map;SmartInfoWindow;constructor(e){this.oi_map=e}get map(){return this.oi_map.map}set map(e){this.oi_map.map=e}get console(){return this.oi_map.console}google_map_id=null;create_infowindow(){return this._newInfoWindow()}close_infowindow(e){e.close(),google.maps.event.clearInstanceListeners(e)}_newInfoWindow(e){return this.oi_map.custom_infowindow?(this.SmartInfoWindow||(this.SmartInfoWindow=function(){class e extends google.maps.OverlayView{_options;_position=null;_container=null;_body=null;_header=null;_contentEl=null;isOpen=!1;listing_id;_placement="top";_anchor=null;constructor(e){super(),this._options={content:e?.content,headerContent:e?.headerContent,headerDisabled:e?.headerDisabled??!1,padding:e?.padding??30,gap:e?.gap??16,tailSize:e?.tailSize??10}}open(e){const{map:t,anchor:i}=e;if(this._anchor=i??null,i){const e=Yt(i)?i.getPosition():i.position;e&&(this._position=e instanceof google.maps.LatLng?e:new google.maps.LatLng(e.lat,e.lng))}this.setMap(t)}close(){this.setMap(null)}setOptions(e){void 0!==e.content&&this.setContent(e.content),void 0!==e.headerContent&&this.setHeaderContent(e.headerContent),void 0!==e.headerDisabled&&(this._options.headerDisabled=e.headerDisabled),void 0!==e.position&&this.setPosition(e.position)}onAdd(){const e=document.createElement("div");e.className="smart-info-window",e.setAttribute("data-placement",this._placement),e.style.setProperty("--siw-tail-size",`${this._options.tailSize}px`);const t=document.createElement("div");t.className="smart-info-window__body";const i=document.createElement("span");if(i.className="smart-info-window__close",i.setAttribute("aria-label","Close"),i.textContent="✕",i.addEventListener("click",(e=>{e.stopPropagation(),this._container?.dispatchEvent(new CustomEvent("closeclick")),google.maps.event.trigger(this,"closeclick"),this.close()})),this._options.headerDisabled)this._header=null,this._contentEl=null,this._applyContent(t),t.appendChild(i);else{t.classList.add("smart-info-window__body--has-header");const e=document.createElement("div");e.className="smart-info-window__header",this._applyHeaderContent(e),e.appendChild(i),t.appendChild(e),this._header=e;const o=document.createElement("div");o.className="smart-info-window__content",this._applyContent(o),t.appendChild(o),this._contentEl=o}const o=document.createElement("div");o.className="smart-info-window__tail",e.appendChild(t),e.appendChild(o),this._container=e,this._body=t,this.getPanes().floatPane.appendChild(e),this.isOpen=!0}draw(){if(!this._container||!this._position)return;const e=this.getProjection();if(!e)return;const t=this.getMap();if(!t)return;let i=e.fromLatLngToContainerPixel(this._position),o=e.fromLatLngToDivPixel(this._position);if(this._anchor&&!Yt(this._anchor)&&!(this._anchor instanceof HTMLElement)){const e=this._anchor.element;if(e){const n=e.getBoundingClientRect();if(n.width&&n.height){const e=t.getDiv().getBoundingClientRect(),s=this._anchor.anchor??{x:n.width/2,y:n.height/2},r=n.left+s.x-e.left,a=n.top+s.y-e.top,l=r-i.x,c=a-i.y;i=new google.maps.Point(r,a),o=new google.maps.Point(o.x+l,o.y+c)}}}const n=t.getDiv(),s=n.offsetWidth,r=n.offsetHeight,{padding:a,gap:l}=this._options,{above:c,below:d,left:h,right:u}=this._getMarkerSize(),m=this._container;m.style.setProperty("--siw-max-height",`${Math.max(r-2*a,0)}px`),m.style.visibility="hidden",m.style.display="block";const p=m.offsetWidth;let _=m.offsetHeight;m.style.visibility="";let f="top";const g=i.y-c-a-l,y=r-i.y-d-a-l,w=_<=g,b=i.x<p/2+a,v=i.x>s-p/2-a,k=_<=y,E=p<=s-i.x-u-l-a,L=p<=i.x-h-l-a;
6if(w||k||L||E){if(b||v)f=b?"right":"left";else if(!w){const e=Math.max(g,y);f=(E||L)&&r-2*a>1.5*e?E?"right":"left":g>=y?"top":"bottom"}}else f="center";let x;x="top"===f?i.y-c-a-l:"bottom"===f?r-i.y-d-a-l:r-2*a,m.style.setProperty("--siw-max-height",`${Math.max(x,0)}px`),"center"===f&&m.style.setProperty("--siw-max-width",`${Math.max(s-2*a,0)}px`),_=m.offsetHeight;const S=m.offsetWidth;let O,P;const A=o.x-i.x,T=o.y-i.y,C=A,I=T,z=A+s,j=T+r;switch(f){case"top":O=o.x-p/2,P=o.y-c-_-l;break;case"bottom":O=o.x-p/2,P=o.y+d+l;break;case"left":O=o.x-h-p-l,P=o.y-_/2;break;case"right":O=o.x+u+l,P=o.y-_/2;break;case"center":O=C+(s-S)/2,P=I+(r-_)/2}if("center"!==f&&("left"===f||"right"===f?(P=Math.max(P,I+a),P=Math.min(P,j-_-a)):(O=Math.max(O,C+a),O=Math.min(O,z-p-a))),"center"!==f){const e=20;let t;if("top"===f||"bottom"===f){const i=o.x-O;t=Math.max(e,Math.min(i-this._options.tailSize,p-e-2*this._options.tailSize))}else{const i=o.y-P;t=Math.max(e,Math.min(i-this._options.tailSize,_-e-2*this._options.tailSize))}m.style.setProperty("--siw-tail-offset",`${t}px`)}m.style.left=`${O}px`,m.style.top=`${P}px`;const M=this._placement;this._placement=f,m.setAttribute("data-placement",f),M!==f&&(m.dispatchEvent(new CustomEvent("placementchange",{detail:{placement:f}})),google.maps.event.trigger(this,"placementchange",{placement:f}))}onRemove(){this._container?.parentNode&&this._container.parentNode.removeChild(this._container),this._container=null,this._body=null,this._header=null,this._contentEl=null,this.isOpen=!1}setContent(e){if(this._options.content=e,this._contentEl)this._applyContent(this._contentEl),this.draw();else if(this._body){const e=this._body.querySelector(".smart-info-window__close");this._applyContent(this._body),e&&this._body.appendChild(e),this.draw()}}setHeaderContent(e){if(this._options.headerContent=e,this._header){const e=this._header.querySelector(".smart-info-window__close");this._applyHeaderContent(this._header),e&&this._header.appendChild(e),this.draw()}}setPosition(e){e?(this._position=e instanceof google.maps.LatLng?e:new google.maps.LatLng(e.lat,e.lng),this.draw()):this._position=null}getPosition(){return this._position}getPlacement(){return this._placement}_getMarkerSize(){if(!this._anchor)return{above:0,below:0,left:0,right:0};if(Yt(this._anchor)){const e=this._anchor.getIcon();if(e&&"object"==typeof e&&"url"in e){const t=e.scaledSize??e.size;if(t){const i=e.anchor??{x:t.width/2,y:t.height};return Gt({width:t.width,height:t.height,anchor:{x:i.x,y:i.y}})}}return Gt({width:27,height:43,anchor:{x:13.5,y:43}})}if(this._anchor instanceof HTMLElement){const e=this._anchor.element;if(e){const t=e.offsetWidth,i=e.offsetHeight;return Gt({width:t,height:i,anchor:{x:t/2,y:i}})}return{above:0,below:0,left:0,right:0}}const e=this._anchor.element;if(!e)return{above:0,below:0,left:0,right:0};const t=e.offsetWidth,i=e.offsetHeight;return Gt({width:t,height:i,anchor:this._anchor.anchor??{x:t/2,y:i/2}})}_applyContent(e){const t=this._options.content;t instanceof HTMLElement?(e.innerHTML="",e.appendChild(t)):"string"==typeof t&&(e.innerHTML=t)}_applyHeaderContent(e){const t=this._options.headerContent;t instanceof HTMLElement?(e.innerHTML="",e.appendChild(t)):"string"==typeof t&&(e.innerHTML=t)}}return e}()),new this.SmartInfoWindow(e)):new google.maps.InfoWindow(e)}map_options={};marker_options={};marker_labels=!1;labels;infowindow_header_disable=!1;nearby=!1;nearby_markers={};disable_auto_pan_on_card_mouseenter=!1;_nearby_marker_icons={};get nearby_marker_icons(){return this._nearby_marker_icons}set nearby_marker_icons(e){"object"==typeof e?this._nearby_marker_icons=e:"string"==typeof e&&(this.console.log("window[newval]",window[e]),this._nearby_marker_icons=window[e]||!1)}_nearby_marker_icon_origin=[0,0];get nearby_marker_icon_origin(){return this._nearby_marker_icon_origin}set nearby_marker_icon_origin(e){let t=!1;if("object"==typeof e&&2===e.length)t=e.map((function(e){return parseInt(e.toString())}));else if("string"==typeof e){const i=e.split(",");2==i.length&&(t=[parseInt(i[0]),parseInt(i[1])])}t?this._nearby_marker_icon_origin=t:this.console.log("The nearby_marker_icon_origin value was not an array, nor a string with a comma.")}_nearby_marker_icon_anchor=[0,12];
6get nearby_marker_icon_anchor(){return this._nearby_marker_icon_anchor}set nearby_marker_icon_anchor(e){let t=!1;if("object"==typeof e&&2===e.length)t=e.map((function(e){return parseInt(e.toString())}));else if("string"==typeof e){const i=e.split(",");2==i.length&&(t=[parseInt(i[0]),parseInt(i[1])])}t?this._nearby_marker_icon_anchor=t:this.console.log("The nearby_marker_icon_anchor value was not an array, nor a string with a comma.")}nearby_marker_icon_width=!1;nearby_marker_icon_height=!1;nearby_marker_image=!1;get nearby_marker_icon(){return this.nearby_marker_image}set nearby_marker_icon(e){this.nearby_marker_image=e}_nearby_marker_icon_wh="24,24";get nearby_marker_icon_wh(){return this._nearby_marker_icon_wh}set nearby_marker_icon_wh(e){this._nearby_marker_icon_wh=e;let t=!!this.nearby_marker_icon_wh&&this.nearby_marker_icon_wh.split(",");t&&2===t.length&&(this.nearby_marker_icon_width=this.nearby_marker_icon_width||parseInt(t[0]),this.nearby_marker_icon_height=this.nearby_marker_icon_height||parseInt(t[1]))}center=void 0;nearby_radius=5e3;nearby_search_pages=1;marker=null;nearby_infowindow=null;nearby_marker_options={};nearby_multi=!0;infowindow_header=null;clusters_infowindow=!1;clusters_infowindow_hover=!0;clusterer=null;_clusterModule=null;async load_scripts(){await Bt(`https://maps.googleapis.com/maps/api/js?key=${this.oi_map.key}&callback=oilib_gmaps_init_callback`,{callbackName:"oilib_gmaps_init_callback"}),this.nearby&&await google.maps.importLibrary("places"),t.oimap_ready=!0;const e=new Event("oimap_ready");window.dispatchEvent(e),this.console.log("dispatched: oimap_ready_event")}init_base_googlemaps(){this.oi_map.latitude&&this.oi_map.longitude&&(this.center=new google.maps.LatLng(this.oi_map.latitude,this.oi_map.longitude));const e={center:this.center,zoom:this.oi_map.zoom,minZoom:this.oi_map.min_zoom||null,maxZoom:this.oi_map.max_zoom||null,styles:this.oi_map.styles,scrollwheel:this.oi_map.scrollwheel,rotateControl:!1,streetViewControl:!1,mapTypeControl:!1,fullscreenControl:!1,zoomControl:Boolean(this.oi_map.zoom_control_position),zoomControlOptions:{position:google.maps.ControlPosition[this.oi_map.zoom_control_position]},cameraControl:Boolean(this.oi_map.camera_control_position),cameraControlOptions:{position:google.maps.ControlPosition[this.oi_map.camera_control_position]}};this.google_map_id&&(e.mapId=this.google_map_id),this.map=new google.maps.Map(this.oi_map.container,e);const t=this;google.maps.event.addListener(this.map,"click",(function(){const e={map_id:t.oi_map.id};t.console.log("Dispatching: oimap_map_click",e),t.oi_map.oiEvent("oimap_map_click",e)})),"isOpen"in google.maps.InfoWindow.prototype||Object.defineProperty(google.maps.InfoWindow.prototype,"isOpen",{get:function(){const e=this.getMap();return null!=e}})}get_marker_icon_googlemaps(e,t,i,o,n){let s=e||this.oi_map.marker_image;t=Zt(t||""),i=Zt(i||"");let r=t||this.oi_map.marker_icon_width||Zt(this.oi_map.marker_icon_wh.split(",")[0]),a=i||this.oi_map.marker_icon_height||Zt(this.oi_map.marker_icon_wh.split(",")[1]),l=o||this.oi_map.marker_icon_origin,c=n||this.oi_map.marker_icon_anchor;return!!s&&{url:s,size:r&&a?new google.maps.Size(r,a):void 0,scaledSize:r&&a?new google.maps.Size(r,a):void 0,origin:l?new google.maps.Point(...l):void 0,anchor:c?new google.maps.Point(...c):void 0}}init_single(e){this.init_base_googlemaps();const t=Object.assign({position:this.center,map:this.map},this.marker_options);let i=this.get_marker_icon_googlemaps();if(i&&(t.icon=i),this.marker=new google.maps.Marker(t),this.oi_map.infowindow_content||this.infowindow_header){let e=null;if(this.infowindow_header){e=(new DOMParser).parseFromString(this.infowindow_header,"text/html").body.firstChild}this.oi_map.infowindow=this._newInfoWindow({content:this.oi_map.infowindow_content,headerContent:e,headerDisabled:this.infowindow_header_disable}),this.oi_map.infowindow_open&&this.oi_map.infowindow.open({map:this.map,anchor:this.marker,shouldFocus:!1})}const o=this,n={map_id:this.oi_map.id};if(google.maps.event.addListener(this.marker,"mouseover",(function(){o.oi_map.infowindow_content&&o.oi_map.infowindow.open({map:o.map,anchor:this,shouldFocus:!1}),o.console.log("Dispatching: oimap_marker_mouseover",n),o.oi_map.oiEvent("oimap_marker_mouseover",n)})),google.maps.event.addListener(this.marker,"mouseout",(function(){o.console.log("Dispatching: oimap_marker_mouseout",n),o.oi_map.oiEvent("oimap_marker_mouseout",n)})),google.maps.event.addListener(this.marker,"mousedown",(function(){o.oi_map.infowindow_content&&o.oi_map.infowindow.open({map:o.map,anchor:this}),o.console.log("Dispatching: oimap_marker_mousedown",n),o.oi_map.oiEvent("oimap_marker_mousedown",n)})),google.maps.event.addListener(this.marker,"click",(function(){o.oi_map.infowindow_content&&o.oi_map.infowindow.open({map:o.map,anchor:this}),o.console.log("Dispatching: oimap_marker_click",n),o.oi_map.oiEvent("oimap_marker_click",n)})),this.oi_map.infowindow_content&&(google.maps.event.addListener(this.oi_map.infowindow,"closeclick",(function(){o.console.log("Dispatching: oimap_infowindow_closeclick",n),o.oi_map.oiEvent("oimap_infowindow_closeclick",n)})),this.oi_map.infowindow_persist||(google.maps.event.addListener(this.map,"click",(function(){o.oi_map.infowindow.close()})),google.maps.event.addListener(this.map,"dragstart",(function(){o.oi_map.infowindow.close()})))),this.nearby&&this.nearby_init(),google.maps.event.addListenerOnce(this.map,"idle",(function(){o.console.log("Dispatching: oimap_idle",n),o.oi_map.oiEvent("oimap_idle",n),o.oi_map._is_first_initialization=!1})),e&&"function"==typeof e){const t=this;google.maps.event.addListenerOnce(this.map,"idle",(function(){e.call(t.oi_map,t.map)}))}}init_multi(e,t){this.init_base_googlemaps();const i=this;
6this.oi_map.clusters&&!this._clusterModule&&s.e(192).then(s.bind(s,583)).then((e=>{i._clusterModule=e})),this.marker_labels?s.e(484).then(s.bind(s,644)).then((t=>{i.labels=t.MarkerWithLabel,i.set_markers(e)})):this.set_markers(e),google.maps.event.addListenerOnce(this.map,"idle",(function(){const e={map_id:i.oi_map.id};i.console.log("Dispatching: oimap_idle",e),i.oi_map.oiEvent("oimap_idle",e),i.oi_map._is_first_initialization=!1})),t&&"function"==typeof t&&google.maps.event.addListenerOnce(this.map,"idle",(function(){t.call(i.oi_map,i.map)}))}set_markers(e,t){this.oi_map.infowindow=this._newInfoWindow({disableAutoPan:this.disable_auto_pan_on_card_mouseenter});const i=this;google.maps.event.addListener(this.oi_map.infowindow,"closeclick",(function(){this.setPosition(null),i.console.log("Dispatching: oimap_infowindow_closeclick"),i.oi_map.oiEvent("oimap_infowindow_closeclick",{map_id:i.oi_map.id})})),this.oi_map.listing_type=e;let o=0;if(this.oi_map.infowindow.close(),this.oi_map.bounds=new google.maps.LatLngBounds,this.clear_markers(),this.oi_map.set_listings(),!this.oi_map.listings.length)return;const n=function(e){const t=this.dataset.listingId;t&&i.show_infowindow(t)},s=function(e){const t=this.dataset.listingId;t&&i.highlight_marker(t)},r=function(e){const t=this.dataset.listingId;t&&i.unhighlight_marker(t)},a=function(){const e=i.map.getBounds();let t=!1;const{lat:o,lng:n}=e.getNorthEast().toJSON(),{lat:s,lng:r}
6=e.getSouthWest().toJSON();(Math.abs(o-s)<1e-4||Math.abs(n-r)<1e-4)&&(t=!0);const a=[];i.oi_map.markers.forEach((o=>{const n=t||e.contains(o.getPosition()),s=o.listing_id,r=i.oi_map.listings_by_id[s];r&&(n?(r.style.removeProperty("display"),a.push({listing_type:i.oi_map.listing_type,listing_id:s})):r.style.display="none")})),i.oi_map.oiEvent("oimap_marker_visibility_changed",a)};this.oi_map.infowindow_persist||(google.maps.event.addListener(this.map,"click",(function(){i.oi_map.infowindow.close(),i.oi_map.infowindow.setPosition(null)})),google.maps.event.addListener(this.map,"dragstart",(function(){i.oi_map.infowindow.close(),i.oi_map.infowindow.setPosition(null)}))),this.oi_map.listings.forEach((function(e){const t=e.querySelector(".oi-infowindow"),a=e.querySelector("template.oi-infowindow-template"),l=e.querySelector(".oi-infowindow-cluster"),c=e.querySelector("template.oi-infowindow-cluster-template"),d=e.querySelector(".oi-infowindow-header"),h=e.dataset.markerIconWh,u=e.dataset.markerLabel,m=e.dataset.listingId,p=Kt(e.dataset.latitude||""),_=Kt(e.dataset.longitude||""),f=e.dataset.link;let g=e.dataset.markerIcon,y=e.dataset.markerIconWidth,w=e.dataset.markerIconHeight,b=e.dataset.markerIconAnchor,v=e.dataset.markerIconOrigin,k=e.dataset.markerIconHighlight;if(p&&_&&(t||a)){o++;let E="";a?E=a.innerHTML:t&&(E=t.outerHTML);const L=d?.cloneNode(!0)||"",x=new google.maps.LatLng(p,_);this.oi_map.bounds.extend(x);const S={position:x,map:this.map,listing_id:m,link:f};let O,P=h?h.split(","):[],A=y||(P.length?Zt(P[0]):void 0),T=w||(P.length?Zt(P[1]):void 0),C=v?Jt(v):null,I=b?Jt(b):null,z=this.get_marker_icon_googlemaps(g,A,T,C,I);if(z&&(S.icon=z),this.marker_labels&&u){const e={labelContent:u,labelAnchor:new google.maps.Point(-21,3),labelClass:"markerlabel",labelStyle:{opacity:.75}},t=Object.assign(S,e);O=new this.labels(t)}else O=new google.maps.Marker(S);if(this.oi_map.clusters&&(l||c)){let e="";l?e=l.outerHTML||"":c&&(e=c.innerHTML||""),O.infowindow_cluster=e}O._highlight_icon_url=k||this.oi_map.marker_image_highlight||null,this.oi_map.markers.push(O);const j={map_id:this.oi_map.id,listing_id:m};google.maps.event.addListener(O,"mouseover",(()=>{this.oi_map.open_infowindow_on_marker_hover&&(O.is_mouseover=!0,i.oi_map.marker_mouseover_delay?setTimeout((()=>{O.is_mouseover&&this.openInfoWindowWithContent(O,E,L,this.infowindow_header_disable)}),i.oi_map.marker_mouseover_delay):this.openInfoWindowWithContent(O,E,L,this.infowindow_header_disable)),i.console.log("Dispatching: oimap_marker_mouseover",j),i.oi_map.oiEvent("oimap_marker_mouseover",j)})),google.maps.event.addListener(O,"mousedown",(()=>{this.openInfoWindowWithContent(O,E,L,this.infowindow_header_disable),this.console.log("Dispatching: oimap_marker_mousedown",j),this.oi_map.oiEvent("oimap_marker_mousedown",j)})),google.maps.event.addListener(O,"click",(()=>{O.link&&(window.location=O.link),this.openInfoWindowWithContent(O,E,L,this.infowindow_header_disable),this.console.log("Dispatching: oimap_marker_click",j),this.oi_map.oiEvent("oimap_marker_click",j)})),google.maps.event.addListener(O,"mouseout",(()=>{O.is_mouseover=!1,i.console.log("Dispatching: oimap_marker_mouseout",j),i.oi_map.oiEvent("oimap_marker_mouseout",j)})),this.oi_map.open_infowindow_on_card_mouseenter&&!Mt.likelyMobile()&&e.addEventListener("mouseenter",n),this.oi_map.highlight_marker_on_card_mouseenter&&!Mt.likelyMobile()&&(e.addEventListener("mouseenter",s),e.addEventListener("mouseleave",r))}}),i);o>0&&"never"!==this.oi_map.marker_autofit&&(this.oi_map._is_first_initialization||"always"===this.oi_map.marker_autofit)?this.safeRunGoogle((()=>{this.map.fitBounds(this.oi_map.bounds,this.fitBoundsPadding),this.oi_map.clusters&&google.maps.event.addListenerOnce(this.map,"idle",(()=>this.set_clusters()))})):this.oi_map.clusters&&this.safeRunGoogle((()=>this.set_clusters())),this.oi_map.card_marker_display_sync&&(google.maps.event.addListener(this.map,"bounds_changed",a),this.safeRunGoogle(a))}set_clusters(){const e=this;if(this.clusterer)return this.clusterer.addMarkers(this.oi_map.markers),void(this.cluster
6s_infowindow&&this.oi_map.infowindow.close());let t=Object.assign({averageCenter:!0,maxZoom:null,styles:[{width:30,height:30,className:"markercluster-1digit"},{width:40,height:40,className:"markercluster-2digit"},{width:50,height:50,className:"markercluster-3digit"}],clusterClass:"markercluster-base",zoomOnClick:this.clusters_infowindow_hover},this.oi_map.cluster_options);const i=i=>{e._clusterModule=i,e.clusterer=new i.default(e.map,e.oi_map.markers,t),e.clusters_infowindow&&e.oi_map.infowindow.close(),google.maps.event.addListener(e.clusterer,"mouseover",(function(t){const i=t.getMarkers(),o=[],n=[];for(let e=0;e<i.length;e++)i[e].listing_id&&o.push(i[e].listing_id),""!=i[e].infowindow_cluster&&n.push(i[e].infowindow_cluster);e.clusterer.is_mouseover=o,e.clusters_infowindow&&e.clusters_infowindow_hover&&(e.oi_map.marker_mouseover_delay?setTimeout((()=>{e.clusterer.is_mouseover==o&&e.showClusterUnfoWindow(e,t,n)}),e.oi_map.marker_mouseover_delay):e.showClusterUnfoWindow(e,t,n));const s={map_id:e.oi_map.id,listing_ids:o};e.console.log("Dispatching: oimap_cluster_mouseover",s),e.oi_map.oiEvent("oimap_cluster_mouseover",s)})),google.maps.event.addListener(e.clusterer,"click",(function(t){const i=t.getMarkers(),o=[],n=[];for(let e=0;e<i.length;e++)i[e].listing_id&&o.push(i[e].listing_id),""!=i[e].infowindow_cluster&&n.push(i[e].infowindow_cluster);e.oi_map.infowindow.close(),e.clusters_infowindow&&!e.clusters_infowindow_hover&&e.showClusterUnfoWindow(e,t,n);const s={map_id:e.oi_map.id,listing_ids:o};e.console.log("Dispatching: oimap_cluster_click",s),e.oi_map.oiEvent("oimap_cluster_click",s)})),google.maps.event.addListener(e.clusterer,"mouseout",(function(t){t.is_mouseover=!1;const i=t.getMarkers(),o=[];for(let e=0;e<i.length;e++)i[e].listing_id&&o.push(i[e].listing_id);const n={map_id:e.oi_map.id,listing_ids:o};e.console.log("Dispatching: oimap_cluster_mouseout",n),e.oi_map.oiEvent("oimap_cluster_mouseout",n)}))};this._clusterModule?i(this._clusterModule):s.e(192).then(s.bind(s,583)).then(i)}showClusterUnfoWindow(e,t,i){e.oi_map.infowindow.getPosition()!=t.getCenter()&&(e.oi_map.infowindow.listing_id=void 0,e.oi_map.infowindow.setOptions({pixelOffset:new google.maps.Size(0,-20),content:i.join(""),position:t.getCenter()}),e.oi_map.infowindow.open({map:e.map}))}get fitBoundsPadding(){if(this.oi_map.autofit_padding){const[e,t,i,o]=this.oi_map.autofit_padding;return{top:e,right:t,bottom:i,left:o}}}fit(){return!(!this.oi_map.bounds||!this.oi_map.markers.length)&&(this.map.fitBounds(this.oi_map.bounds,this.fitBoundsPadding),!0)}nearby_categories={medical:["hospital","veterinary_care","health","doctor","dentist","pharmacy"],restaurant:["restaurant","bakery"],shopping:["shopping_mall","shoe_store","jewelry_store","home_goods_store","clothing_store","department_store","store","electronics_store","convenience_store","pet_store","book_store","liquor_store","jewelry_store"],grocery:["grocery_or_supermarket"],gas:["gas_station"],school:["school","university"],recreation:["amusement_park","aquarium","aquarium","bowling_alley","night_club","museum","casino"],entertainment:["bar","movie_rental","movie_theater","stadium"]};nearby_schedule(e){"function"==typeof window.requestIdleCallback?window.requestIdleCallback(e,{timeout:500}):window.setTimeout(e,0)}nearby_markers_set_map(e,t,i){let o=0;const n=()=>{const s=Math.min(o+50,e.length);for(;o<s;o++)e[o].setMap(t);o<e.length?this.nearby_schedule(n):i&&i()};n()}nearby_init(){this.nearby_infowindow=new google.maps.InfoWindow;const e=document.querySelectorAll(".oi-map-nearby-filter"),t=this;e.forEach((function(i){i.addEventListener("click",(function(o){o.preventDefault(),t.nearby_multi||e.forEach((function(e){e.classList.remove("active")})),i.classList.toggle("active");const n=i.classList.contains("active"),s=i.dataset.search.split(",");t.nearby_schedule((function(){t.oi_map.infowindow.close();const e=function(){if(n)for(let e=0;e<s.length;e++)t.console.log("Initialize Places search for: "+s[e]),t.nearby_search(s[e]);else{for(let e=0;e<s.length;e++)t.console.log("Clearing Places markers for: "+s[e]),t.nearby_markers_clear(s[e]);t.console.log("Nearby markers object after clearing",t.nearby_markers)}};t.nearby_multi?e():t.nearby_markers_clear(void 0,e)}))}))})),this.nearby_infowindow=new google.maps.InfoWindow;const i={map_id:t.oi_map.id};google.maps.event.addListener(this.nearby_infowindow,"closeclick",(function(){t.console.log("Dispatching: oimap_nearbyinfowindow_closeclick",i),t.oi_map.oiEvent("oimap_nearbyinfowindow_closeclick",i)}))}nearby_search(e,t){if(this.nearby_markers.hasOwnProperty(e))this.console.log("Displaying saved markers for: "+e),this.nearby_markers_set_map(this.nearby_markers[e],this.map,(()=>this.nearby_calculate_bounds()));else{let i=[];if(this.console.log("Running new query for: "+e),this.nearby_categories.hasOwnProperty(e)?i=this.nearby_categories[e]:(this.nearby_categories[e]=[e],i=[e]),i.length){const o={location:this.center,radiu
6s:t||this.nearby_radius,type:i[0]};let n=new google.maps.places.PlacesService(this.map);const s=this;let r=0;n.nearbySearch(o,(function(i,o,n){r+=1,s.nearby_callback(i,o,e,n,r,t||s.nearby_radius)}))}}}nearby_markers_clear(e,t){const i=[];if(e)for(let o in this.nearby_markers[e])i.push(this.nearby_markers[e][o]);else if(this.nearby_markers)for(const o of Object.keys(this.nearby_markers))for(let e in this.nearby_markers[o])i.push(this.nearby_markers[o][e]);this.nearby_markers_set_map(i,null,(()=>{this.nearby_calculate_bounds(),t&&t()}))}nearby_calculate_bounds(){this.oi_map.bounds=new google.maps.LatLngBounds,this.center&&this.oi_map.bounds.extend(this.center);const e=[];for(const[t,i]of Object.entries(this.nearby_markers))if(this.nearby_markers[t].length>0&&null!==this.nearby_markers[t][0].getMap()){e.push(t);for(let e in this.nearby_markers[t]){const i=this.nearby_markers[t][e].getPosition()?.lat(),o=this.nearby_markers[t][e].getPosition()?.lng(),n=new google.maps.LatLng(i,o);this.oi_map.bounds.extend(n)}}e.length?(console.log("Adjusted map bounds to fit markers for "+e.join(", ")),this.map.fitBounds(this.oi_map.bounds,this.fitBoundsPadding)):(console.log("Adjusted map bounds to fit markers for "+e.join(", ")),this.map.fitBounds(this.oi_map.bounds,this.fitBoundsPadding),this.map.setZoom(this.oi_map.zoom))}nearby_callback(e,t,i,o,n,s){if((e=e||[]).length<5&&s<25e3){const t=s+5e3;this.console.log("Only "+e.length+" results for: "+i),this.console.log("Attempting "+t+"m radius search for: "+i),this.nearby_search(i,t)}else if(t==google.maps.places.PlacesServiceStatus.OK){this.console.log(e.length+" results for: "+i),this.nearby_search_pages>n&&o?.hasNextPage&&o.nextPage(),this.oi_map.bounds=new google.maps.LatLngBounds;for(let t=0;t<e.length;t++){const o=e[t];this.nearby_marker_create(o,i)}this.console.log("Nearby markers object after sufficient results for: "+i),this.console.log(this.nearby_markers),this.nearby_calculate_bounds(),this.oi_map.oiEvent("oimap_nearby_results",{map_id:this.oi_map.id,places:e,category:i})}}nearby_marker_create(e,t){let i={};Object.keys(this.nearby_marker_icons).length>0&&(i=this.nearby_marker_icons[t]||{});const o=i.image||this.nearby_marker_icon||e.icon,n=i.wh||this.nearby_marker_icon_wh||"24,24",s=i.width||this.nearby_marker_icon_width||n.split(",")[0],r=i.height||this.nearby_marker_icon_height||n.split(",")[1],a=Zt(s),l=Zt(r),c=i.origin||this.nearby_marker_icon_origin||[0,0],d=i.anchor||this.nearby_marker_icon_anchor||[0,l/2],h={url:o,size:new google.maps.Size(a,l),origin:new google.maps.Point(...c),anchor:new google.maps.Point(...d),scaledSize:new google.maps.Size(a,l)},u=Object.assign({map:this.map,position:e.geometry.location,icon:h},this.nearby_marker_options),m=new google.maps.Marker(u),p=this,_={map_id:p.oi_map.id},f=(t,i)=>{p.nearby_infowindow.unbind("position"),p.nearby_infowindow.getPosition()!=t.getPosition()&&(p.nearby_infowindow.bindTo("position",t,"position"),p.nearby_infowindow.setOptions({headerContent:e.name,content:e.vicinity?`<div class="nearby-infowindow-addr">${e.vicinity}</div>`:"",maxWidth:280}),i?p.nearby_infowindow.open({map:p.map,anchor:t,shouldFocus:!1}):p.nearby_infowindow.open(p.map,t))};google.maps.event.addListener(m,"mouseover",(function(){f(this,!0),p.console.log("Dispatching: oimap_nearbymarker_mouseover",_),p.oi_map.oiEvent("oimap_nearbymarker_mouseover",_)})),google.maps.event.addListener(m,"mousedown",(function(){f(this,!1),p.console.log("Dispatching: oimap_nearbymarker_mousedown",_),p.oi_map.oiEvent("oimap_nearbymarker_mousedown",_)})),google.maps.event.addListener(m,"click",(function(){f(this,!1),p.console.log("Dispatching: oimap_nearbymarker_click",_),p.oi_map.oiEvent("oimap_nearbymarker_click",_)})),this.nearby_markers[t]=this.nearby_markers[t]||[],this.nearby_markers[t].push(m)}clear_markers(){for(let e=0;e<this.oi_map.markers.length;e++)this.oi_map.markers[e].setMap(null);this.oi_map.clusters&&this.clusterer&&this.clusterer.clearMarkers(),this.oi_map.markers=[]}openInfoWindowWithContent(e,t,i,o){if(void 0===o&&(o=!1),this.oi_map.infowindow.listing_id==e.listing_id&&!this.oi_map.infowindow.isOpen||this.oi_map.infowindow.listing_id!=e.listing_id){this.oi_map.infowindow.listing_id=e.listing_id;const n=e.anchorPoint?new google.maps.Size(e.anchorPoint.x,e.anchorPoint.y):new google.maps.Size(0,0),s=e.getMap()?null:this.findClusterContaining(e),r=s&&this.oi_map.custom_infowindow?this.buildClusterAnchor(s):null;r?(this.oi_map.infowindow.setOptions({pixelOffset:n,content:t,headerContent:i,headerDisabled:o}),this.oi_map.infowindow.open({map:this.map,shouldFocus:!1,anchor:r})):(this.oi_map.infowindow.setOptions({pixelOffset:n,position:s?s.getCenter():e.position,content:t,headerContent:i,headerDisabled:o}),this.oi_map.infowindow.open({map:this.map,shouldFocus:!1,anchor:s?void 0:e}))}}findClusterContaining(e){if(!this.clusterer)return null;for(const t of this.clusterer.getClusters())if(t.getMarkers().includes(e))return t;return null}buildClusterAnchor(e){const t=e.clusterIcon_?.div_;return t&&t.offsetWidth&&t.offsetHeight?{position:e.getCenter(),element:t}:null}safeRunGoogle(e){this.oi_map._is_first_initialization?google.maps.event.addListenerOnce(this.map,"idle",e):e()}goto_boogertown(){const e=new google.maps.LatLng(this.oi_map.boogertown.latitude,this.oi_map.boogertown.longitude);this.map.setCenter(e),this.map.setZoom(14),this.marker=new google.maps.Marker({position:e,map:this.map}),this.oi_map.infowindow=this._newInfoWindow({content:this.oi_map.boogertown.infowindow_content}),this.oi_map.infowindow.open({map:this.map,anchor:this.marker,shouldFocus:!1})}highlight_marker(e){const t=this.oi_map.markers.filter((t=>t.listing_id==e));if(!t.length)return;const i=t[0],o=this.oi_map.highlight_marker_scale,n=i._highlight_icon_url;if(i.getMap()){const e=i.getIcon();if(!e||"string"==typeof e)return;const t=e;if(!t.scaledSize)return;i._original_icon=e;const s=n||t.url,r=t.scaledSize.width*o,a=t.scaledSize.height*o;i.setIcon({...t,url:s,size:new google.maps.Size(r,a),scaledSize:new google.maps.Size(r,a)})}else if(this.clusterer)for(const s of this.clusterer.getClusters())if(s.getMarkers().some((t=>t.listing_id==e))){const e=s.clusterIcon_?.div_;e&&(e.style.transition="transform 0.15s ease",e.style.transform=`scale(${o})`,e.dataset.highlighted="true",i._highlighted_cluster_el=e);break}}unhighlight_marker(e){const t=this.oi_map.markers.filter((t=>t.listing_id==e));if(!t.length)return;const i=t[0];i._original_icon&&(i.setIcon(i._original_icon),i._original_icon=null),i._highlighted_cluster_el&&(i._highlighted_cluster_el.style.transform="",i._highlighted_cluster_el.style.transition="",delete i._highlighted_cluster_el.dataset.highlighted,i._highlighted_cluster_el=null)}show_infowindow(e){const t=this.oi_map.markers.filter((function(t){return t.listing_id==e}));t.length&&google.maps.event.trigger(t[0],"mouseover")}},mapbox:class{oi_map;constructor(e){this.oi_map=e}get map(){return this.oi_map.map}set map(e){this.oi_map.map=e}get console(){return this.oi_map.console}create_infowindow(){return new window.mapboxgl.Popup({closeOnClick:!0})}close_infowindow(e){e.remove()}center=void 0;marker_circle_color="#EA4435";marker_circle_radius=10;marker_circle_stroke_width=1;marker_circle_stroke_color="#FFFFFF";marker_type_allow=["id","circle"];marker_icon_id=null;marker_label="";marker=null;_marker_type="circle";get marker_type(){return this._marker_type}set marker_type(e){this.marker_type_allow.includes(e)&&(this._marker_type=e)}make_popup_params(e){const t=void 0!==e?e:{};return Object.assign({focusAfterOpen:!1,className:"oi-infowindow",closeOnClick:!1},t)}make_popup_offsets(e,t){const i=e?parseInt(e):this.oi_map.marker_icon_width,o=t?parseInt(t):this.oi_map.marker_icon_height;return{top:[0,0],"top-left":[i/2,0],"top-right":[-i/2,0],bottom:[
60,-o],"bottom-left":[i/2,-o],"bottom-right":[-i/2,-o],left:[i/2,o/2*-1],right:[i/2*-1,o/2*-1]}}make_circle_popup_offsets(e){const t=e||this.marker_circle_radius,i=parseInt(t.toString())+2;return{top:[0,i],"top-left":[i,i],"top-right":[-i,i],bottom:[0,-i],"bottom-left":[i,-i],"bottom-right":[-i,-i],left:[i,0],right:[-i,0]}}async load_scripts(){await Bt(["https://api.mapbox.com/mapbox-gl-js/v2.1.1/mapbox-gl.css","https://api.mapbox.com/mapbox-gl-js/v2.1.1/mapbox-gl.js"]),window.mapboxgl.accessToken=this.oi_map.key,t.oimap_ready=!0;const e=new Event("oimap_ready");window.dispatchEvent(e),this.console.log("dispatched: oimap_ready_event")}init_base_mapbox(){this.center=[this.oi_map.longitude,this.oi_map.latitude],this.oi_map.bounds=new window.mapboxgl.LngLatBounds,this.map=new window.mapboxgl.Map({container:this.oi_map.element_id,style:this.oi_map.styles||"mapbox://styles/mapbox/streets-v11",center:this.center,zoom:this.oi_map.zoom,scrollZoom:this.oi_map.scrollwheel,minZoom:this.oi_map.min_zoom||void 0,maxZoom:this.oi_map.max_zoom||void 0});const e=this;this.map.on("error",(function(t){e.console.error("A Mapbox error event occurred:"),e.console.error(t)})),this.oi_map.zoom_control_position||(this.oi_map.zoom_control_position="bottom-right");const t=new window.mapboxgl.NavigationControl;this.map.addControl(t,this.oi_map.zoom_control_position),this.marker_icon_id&&(this.marker_type="id"),"id"!==this.marker_type||this.marker_icon_id||(this.console.warn("marker_type reverted to circle. No marker_icon_id defined."),this.marker_type="circle")}init_single(e){const t=this,i={map_id:t.oi_map.id};if(this.init_base_mapbox(),this.oi_map.infowindow_content){let e;e="circle"===this.marker_type?this.make_circle_popup_offsets():this.make_popup_offsets();const o=this.make_popup_params({offset:e});this.oi_map.infowindow=new window.mapboxgl.Popup(o).setLngLat([this.oi_map.longitude,this.oi_map.latitude]).setHTML(this.oi_map.infowindow_content),this.oi_map.infowindow_open&&this.oi_map.infowindow.addTo(this.map),this.oi_map.infowindow.on("close",(()=>{t.console.log("Dispatching: oimap_infowindow_closeclick",i),t.oi_map.oiEvent("oimap_infowindow_closeclick",i)}))}const o=[];"image"==this.marker_type&&this.oi_map.marker_image&&o.push(this.oi_map.marker_image),this.map.on("load",(()=>{Promise.all(o.map(((e,i)=>new Promise(((o,n)=>{const s=i;t.map.loadImage(e,(function(e,i){i&&t.map.addImage("custom-marker-"+s,i),o()}))}))))).then((function(){if(t.map.addSource("places",{type:"geojson",data:{type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"Point",coordinates:[t.oi_map.longitude,t.oi_map.latitude]},properties:{}}]}}),"circle"==t.marker_type)t.map.addLayer({id:"places-layer",type:"circle",source:"places",paint:{"circle-color":t.marker_circle_color,"circle-radius":parseInt(t.marker_circle_radius.toString()),"circle-stroke-width":parseInt(t.marker_circle_stroke_width.toString()),"circle-stroke-color":t.marker_circle_stroke_color}});else{let e={id:"places-layer",type:"symbol",source:"places",layout:{"icon-image":t.marker_icon_id,"icon-anchor":"bottom"}};t.marker_label&&(e.layout["text-field"]=t.marker_label,e.layout["text-font"]=["Open Sans Semibold","Arial Unicode MS Bold"],e.layout["text-offset"]=[0,.5],e.layout["text-anchor"]="top"),"image"==t.marker_type&&(e.layout["icon-image"]="custom-marker-0"),t.map.addLayer(e)}t.map.on("mouseenter","places-layer",(e=>{t.map.getCanvas().style.cursor="pointer";const o=e.features[0].geometry.coordinates.slice();e.features[0].properties.title;for(;Math.abs(e.lngLat.lng-o[0])>180;)o[0]+=e.lngLat.lng>o[0]?360:-360;t.oi_map.infowindow_content&&t.oi_map.infowindow.addTo(t.map),t.console.log("Dispatching: oimap_marker_mouseover",i),t.oi_map.oiEvent("oimap_marker_mouseover",i)})),t.map.on("mouseleave","places-layer",(e=>{t.map.getCanvas().style.cursor=""})),t.map.on("mousedown","places-layer",(e=>{t.map.getCanvas().style.cursor="pointer",t.oi_map.infowindow_content&&t.oi_map.infowindow.addTo(t.map),t.console.log("Dispatching: oimap_marker_mousedown",i),t.oi_map.oiEvent("oimap_marker_mousedown",i)})),t.map.on("click","places-layer",(e=>{t.map.getCanvas().style.cursor="pointer",t.oi_map.infowindow_content&&t.oi_map.infowindow.addTo(t.map),t.console.log("Dispatching: oimap_marker_click",i),t.oi_map.oiEvent("oimap_marker_click",i)}))}))})),this.map.once("idle",(function(e){t.console.log("Dispatching: oimap_idle",i),t.oi_map.oiEvent("oimap_idle",i),t.oi_map._is_first_initialization=!1})),e&&"function"==typeof e&&this.map.once("idle",(function(i){e.call(t.oi_map,t.map)}))}init_multi(e,t){this.init_base_mapbox(),this.set_markers(e,t),this.map.once("idle",(e=>{const t={map_id:this.oi_map.id};this.console.log("Dispatching: oimap_idle",t),this.oi_map.oiEvent("oimap_idle",t),this.oi_map._is_first_initialization=!1}))}set_markers(e,t){this.oi_map.listing_type=e;const i=[];if(this.clear_markers(),this.oi_map.set_listings(),!this.oi_map.listings.length)return;let o=this.make_popup_offsets(),n=this.make_popup_params({offset:o});this.oi_map.infowindow=new window.mapboxgl.Popup(n),this.oi_map.infowindow.on("close",(()=>{r.console.log("Dispatching: oimap_infowindow_closeclick",r.oi_map.infowindow.evdetail),r.oi_map.oiEvent("oimap_infowindow_closeclick",r.oi_map.infowindow.evdetail)}));const s=[];"image"==this.marker_type&&this.oi_map.marker_image&&s.push(this.oi_map.marker_image);const r=this;
6this.oi_map.listings.forEach((function(e,t){const o=e.querySelector(".oi-infowindow"),n=(e.querySelector(".oi-infowindow-cluster"),r.marker_type),s=(r.oi_map.marker_image,r.marker_icon_id),a=r.oi_map.marker_icon_width,l=r.oi_map.marker_icon_height,c=r.marker_circle_color,d=r.marker_circle_radius,h=r.marker_circle_stroke_width,u=r.marker_circle_stroke_color;let m=null,p=null,_=null,f=null,g=null,y=null,w=null,b=null,v=null;const k=e.dataset;k.markerType&&r.marker_type_allow.includes(k.markerType)?m=k.markerType:k.oimarkerId||k.markerIcon||(k.markerIconId?m="id":(k.markerCircleColor||k.markerCircleRadius||k.markerCircleStrokeWidth||k.markerCircleStrokeColor)&&(m="circle")),m||(m=n),"id"==m&&(p=k.markerIconId||s,_=k.markerIconWh,_?(f=k.markerIconWidth||r.oi_map.icon_size_attribute(_,"w"),g=k.markerIconHeight||r.oi_map.icon_size_attribute(_,"h")):(f=k.markerIconWidth||a,g=k.markerIconHeight||l)),"circle"==m&&(y=k.markerCircleColor||c,w=k.markerCircleRadius||d,w=parseInt(w.toString()),b=k.markerCircleStrokeWidth||h,b=parseInt(b.toString()),v=k.markerCircleStrokeColor||u);const E=k.listingId,L=k.latitude,x=k.longitude,S=(k.link,k.markerLabel||"");if(L&&x&&(o||S)){r.oi_map.bounds.extend([Number.parseFloat(x),Number.parseFloat(L)]);const e={type:"Feature",properties:{point_count:0,map_id:r.oi_map.id,listing_id:E,description:o?.outerHTML,marker_label:S,marker_type:m,marker_color:y||"",marker_circle_radius:w,marker_circle_stroke_width:b,marker_circle_stroke_color:v},geometry:{type:"Point",coordinates:[Number.parseFloat(x),Number.parseFloat(L)]}};"id"!=m&&"image"!=m||(e.properties.icon_id=p,e.properties.icon_wh=parseInt(f)+","+parseInt(g)),i.push(e),r.oi_map.markers.push(e)}})),r.oi_map.markers.length>0&&r.safeRunMapBox((function(){const e={type:"geojson",data:{type:"FeatureCollection",features:i}};if(r.oi_map.clusters&&(e.cluster=!0,e.clusterMaxZoom=14),r.map.getSource("places")?r.map.getSource("places").setData(e.data):r.map.addSource("places",e),Promise.all(s.map(((e,t)=>new Promise(((i,o)=>{const n=t;r.map.loadImage(e,(function(e,t){t&&r.map.addImage("custom-marker-"+n,t),i()}))}))))).then((function(){r.map.getLayer("places-circle")&&r.map.removeLayer("places-circle");const e={id:"places-circle",type:"circle",source:"places",filter:["==","marker_type","circle"],paint:{"circle-color":["get","marker_color"],"circle-radius":["get","marker_circle_radius"],"circle-stroke-width":["get","marker_circle_stroke_width"],"circle-stroke-color":["get","marker_circle_stroke_color"]}};r.oi_map.clusters&&(e.filter=["all",["==","marker_type","circle"],["==","point_count",0]]),r.map.addLayer(e),r.map.getLayer("places-symbol")&&r.map.removeLayer("places-symbol");const t={id:"places-symbol",type:"symbol",source:"places",filter:["any",["==","marker_type","image"],["==","marker_type","id"]],layout:{"icon-allow-overlap":!0,"icon-image":["get","icon_id"],"icon-anchor":"bottom","text-field":["get","marker_label"],"text-font":["Open Sans Semibold","Arial Unicode MS Bold"],"text-offset":[0,.5],"text-anchor":"top"}};r.oi_map.clusters&&(t.filter=["all",["any",["==","marker_type","image"],["==","marker_type","id"]],["==","point_count",0]]),r.map.addLayer(t)})),r.oi_map.clusters){const e=Object.assign({cluster_text_color:"#111111",cluster1_max_points:5,cluster1_marker_diameter:20,cluster1_marker_color:"#3FB1CE",cluster2_max_points:15,cluster2_marker_diameter:30,cluster2_marker_color:"#3FB1CE",cluster3_marker_diameter:40,cluster3_marker_color:"#3FB1CE"},r.oi_map.cluster_options);r.map.getLayer("clusters")&&r.map.removeLayer("clusters"),r.map.addLayer({id:"clusters",type:"circle",source:"places",filter:[">","point_count",0],paint:{"circle-color":["step",["get","point_count"],e.cluster1_marker_color,e.cluster1_max_points,e.cluster2_marker_color,e.cluster2_max_points,e.cluster3_marker_color],"circle-radius":["step",["get","point_count"],e.cluster1_marker_diameter,e.cluster1_max_points,e.cluster2_marker_diameter,e.cluster2_max_points,e.cluster3_marker_diameter],"circle-stroke-width":1,"circle-stroke-color":"#fff"}}),r.map.getLayer("cluster-counts")&&r.map.removeLayer("cluster-counts"),r.map.addLayer({id:"cluster-counts",type:"symbol",source:"places",filter:[">","point_count",0],layout:{"text-field":"{point_count_abbreviated}","text-font":["Open Sans Semibold","Arial Unicode MS Bold"],"text-size":12},paint:{"text-color":e.cluster_text_color}}),r.map.on("click","clusters",(function(e){const t=r.map.queryRenderedFeatures(e.point,{layers:["clusters"]}
6),i=t[0].properties.cluster_id,o=t[0].properties.point_count,n=[];r.map.getSource("places").getClusterLeaves(i,o,0,(function(e,t){t.forEach((e=>{n.push(e.properties.listing_id)}))})),r.map.getSource("places").getClusterExpansionZoom(i,(function(e,i){e||r.map.easeTo({center:t[0].geometry.coordinates,zoom:i})}));const s={map_id:r.oi_map.id,listing_ids:n};r.console.log("Dispatching: oimap_cluster_click",s),r.oi_map.oiEvent("oimap_cluster_click",s)})),r.map.on("mouseenter","clusters",(function(e){const t=r.map.queryRenderedFeatures(e.point,{layers:["clusters"]}),i=t[0].properties.cluster_id,o=t[0].properties.point_count,n=[];r.map.getSource("places").getClusterLeaves(i,o,0,(function(e,t){t.forEach((e=>{n.push(e.properties.listing_id)}))})),r.map.getCanvas().style.cursor="pointer";const s={map_id:r.oi_map.id,listing_ids:n};r.console.log("Dispatching: oimap_cluster_mouseover",s),r.oi_map.oiEvent("oimap_cluster_mouseover",s),r.oi_map.infowindow.remove()})),r.map.on("mouseenter","cluster-counts",(function(e){r.map.getCanvas().style.cursor="pointer",r.oi_map.infowindow.remove()})),r.map.on("mouseleave","clusters",(function(){r.map.getCanvas().style.cursor=""}))}const t=function(e){const t=("path"in e?e.path:e.composedPath())[0].dataset.listingId;t&&r.show_infowindow(t)},o=function(e){const t=r.map.getBounds();r.oi_map.markers.forEach((e=>{const[i,o]=e.geometry.coordinates,n=new window.mapboxgl.LngLat(i,o),s=t.contains(n),a=e.properties.listing_id,l=r.oi_map.listings_by_id[a];l&&(s?l.style.removeProperty("display"):l.style.display="none")}))};r.oi_map.listings.forEach((function(e,i){r.oi_map.open_infowindow_on_card_mouseenter&&!Mt.likelyMobile()&&e.addEventListener("mouseenter",t)})),r.map.on("mouseenter","places-symbol",(function(e){r.map.getCanvas().style.cursor="pointer",r.do_from_event(e);const t=e.features[0].properties.listing_id,i={map_id:r.oi_map.id,listing_id:t};r.console.log("Dispatching: oimap_marker_mouseover",i),r.oi_map.oiEvent("oimap_marker_mouseover",i)})),r.map.on("mouseenter","places-circle",(function(e){r.map.getCanvas().style.cursor="pointer",r.do_from_event(e);const t=e.features[0].properties.listing_id,i={map_id:r.oi_map.id,listing_id:t};r.console.log("Dispatching: oimap_marker_mouseover",i),r.oi_map.oiEvent("oimap_marker_mouseover",i)})),r.map.on("mousedown","places-symbol",(function(e){r.do_from_event(e);const t=e.features[0].properties.listing_id,i={map_id:r.oi_map.id,listing_id:t};r.console.log("Dispatching: oimap_marker_mousedown",i),r.oi_map.oiEvent("oimap_marker_mousedown",i)})),r.map.on("mousedown","places-circle",(function(e){r.do_from_event(e);const t=e.features[0].properties.listing_id,i={map_id:r.oi_map.id,listing_id:t};r.console.log("Dispatching: oimap_marker_mousedown",i),r.oi_map.oiEvent("oimap_marker_mousedown",i)})),r.map.on("click","places-symbol",(function(e){r.do_from_event(e);const t=e.features[0].properties.listing_id,i={map_id:r.oi_map.id,listing_id:t};r.console.log("Dispatching: oimap_marker_click",i),r.oi_map.oiEvent("oimap_marker_click",i)})),r.map.on("click","places-circle",(function(e){r.do_from_event(e);const t=e.features[0].properties.listing_id,i={map_id:r.oi_map.id,listing_id:t};r.console.log("Dispatching: oimap_marker_click",i),r.oi_map.oiEvent("oimap_marker_click",i)})),r.map.on("mouseleave","places-symbol",(function(){r.map.getCanvas().style.cursor=""})),r.map.on("mouseleave","places-circle",(function(){r.map.getCanvas().style.cursor=""})),r.oi_map.card_marker_display_sync&&(r.map.on("zoomend",o),r.map.on("dragend",o))})),this.oi_map.markers.length>0&&"never"!==this.oi_map.marker_autofit&&(this.oi_map._is_first_initialization?this.map.once("idle",(function(e){r.map.fitBounds(r.oi_map.bounds,{padding:{top:100,bottom:40,left:40,right:40}})})):"always"===this.oi_map.marker_autofit&&r.map.fitBounds(r.oi_map.bounds,{padding:{top:100,bottom:40,left:40,right:40}})),t&&"function"==typeof t&&this.map.once("idle",(function(e){t.call(r.oi_map,r.map)}))}do_from_event(e){this.console.log("do_from_event recd: "+e.type);const t={mouseenter:this.infowindow_open_from_event,mousedown:this.infowindow_open_from_event,click:this.infowindow_open_from_event};e.type in t&&t[e.type].call(this,e)}get_infowindow_data(e){const t=e,i=this.oi_map.markers.find((e=>e.properties.listing_id===t));return!!i&&{coordinates:i.geometry.coordinates,description:i.properties.description,listing_id:i.properties.listing_id,marker_type:i.properties.marker_type,marker_circle_radius:i.properties.marker_circle_radius,icon_wh:i.properties.icon_wh}}infowindow_open_from_event(e){if("mouseenter"!==e.type||this.oi_map.open_infowindow_on_marker_hover){const t=e.features[0].properties.listing_id,i=this.get_infowindow_data(t);
6i?this.infowindow_open_from_object(i,e):this.console.warn(`No infowindow_data found for ${t}`)}}infowindow_open_from_object(e,t){for(t||(t={lngLat:{lng:e.coordinates[0]}});Math.abs(t.lngLat.lng-e.coordinates[0])>180;)e.coordinates[0]+=t.lngLat.lng>e.coordinates[0]?360:-360;let i;if("circle"==e.marker_type)i=this.make_circle_popup_offsets(e.marker_circle_radius);else{const t=e.icon_wh.split(",");i=this.make_popup_offsets(...t)}this.oi_map.infowindow.setOffset(i).setLngLat(e.coordinates).setHTML(e.description).addTo(this.map),this.oi_map.infowindow.evdetail={map_id:this.oi_map.id,listing_id:e.listing_id}}fit(){return!!this.oi_map.bounds&&(this.map.fitBounds(this.oi_map.bounds,{padding:{top:100,bottom:40,left:40,right:40}}),!0)}clear_markers(){this.oi_map.bounds=new window.mapboxgl.LngLatBounds,this.oi_map.markers=[]}safeRunMapBox(e){this.oi_map._is_first_initialization?this.map.on("load",e):e()}goto_boogertown(){const e=[this.oi_map.boogertown.longitude,this.oi_map.boogertown.latitude];this.map.setCenter(e),this.map.setZoom(14);const t=this.make_popup_params();this.oi_map.infowindow=new window.mapboxgl.Popup(t).setHTML(this.oi_map.boogertown.infowindow_content),this.marker=(new window.mapboxgl.Marker).setLngLat(e).setPopup(this.oi_map.infowindow).addTo(this.map),this.marker._element.click()}show_infowindow(e){const t=this.get_infowindow_data(e);t?this.infowindow_open_from_object(t):this.console.warn(`No infowindow_data found for ${e}`)}}},Qt=(new $t).addProperty({name:"debug",type:"legacy"}).addProperty({name:"key",type:"legacy"}).addProperty({name:"vendor",type:"legacy"}).addProperty({name:"loading",type:"legacy"}).addProperty({name:"screen_width_min",type:"legacy"}).addProperty({name:"screen_width_max",type:"legacy"}).addProperty({name:"latitude",type:"legacy"}).addProperty({name:"longitude",type:"legacy"}).addProperty({name:"style",type:"legacy"}).addProperty({name:"styles",type:"legacy"}).addProperty({name:"infowindow_header_disable",type:"boolean"}).addProperty({name:"infowindow_persist",type:"legacy"}).addProperty({name:"marker_autofit",type:"string",default:"always"}).addProperty({name:"marker_circle_color",type:"legacy"}).addProperty({name:"marker_circle_radius",type:"legacy"}).addProperty({name:"marker_circle_stroke_color",type:"legacy"}).addProperty({name:"marker_circle_stroke_width",type:"legacy"}).addProperty({name:"marker_image",type:"legacy"}).addProperty({name:"marker_icon",type:"legacy"}).addProperty({name:"marker_image_highlight",type:"legacy"}).addProperty({name:"marker_icon_highlight",type:"legacy"}).addProperty({name:"marker_icon_id",type:"legacy"}).addProperty({name:"marker_icon_wh",type:"legacy"}).addProperty({name:"marker_icon_width",type:"integer"}).addProperty({name:"marker_icon_height",type:"integer"}).addProperty({name:"marker_icon_origin",type:"integerPair",default:void 0}).addProperty({name:"marker_icon_anchor",type:"integerPair",default:void 0}).addProperty({name:"marker_mouseover_delay",type:"legacy"}).addProperty({name:"marker_type",type:"legacy"}).addProperty({name:"min_zoom",type:"legacy"}).addProperty({name:"max_zoom",type:"legacy"}).addProperty({name:"zoom",type:"legacy"}).addProperty({name:"scrollwheel",type:"legacy"}).addProperty({name:"zoom_control_position",type:"legacy"}).addProperty({name:"camera_control_position",type:"legacy"}).addProperty({name:"google_map_id",type:"string"}).addProperty({name:"autofit_padding",type:"integerQuad"}).build();class ei extends xt{map;vendor_implementation;callback=void 0;constructor(e,t){super(),this.element_id=e,t=t||{},this.vendor=t.vendor,t.vendor&&delete t.vendor}_id;get id(){return this._id}set id(e){}_element_id;get element_id(){return this._element_id}set element_id(e){const t=e.trim();""!=t?(this._element_id=t,this._id=t):this.console.always("The element_id argument was empty.")}get container(){const e=window.document.getElementById(this.element_id);if(!e)throw new Error("Map container not found.");return e}_vendor;get vendor(){return void 0===this._vendor&&(this._vendor=Rt.map_vendor||"googlemaps"),this._vendor}set vendor(e){e?["googlemaps","mapbox"].includes(e.toLowerCase())?(this._vendor=e.toLowerCase(),this.vendor_implementation=new Xt[this._vendor](this)):this.console.always(e+" is not a valid vendor. Current value = "+this._vendor):(this._vendor=Rt.map_vend
6or||"googlemaps",this.vendor_implementation=new Xt[this._vendor](this))}loading="eager";screen_width_min=!1;screen_width_max=!1;validate_screen(){const e=this.screen_width_min,t=this.screen_width_max;if(!e&&!t)return!0;const i=this;return Mt.is_screen_width(this.screen_width_min,this.screen_width_max,(function(e){e.matches&&i.go()}))}_key=!1;get key(){return this._key||Rt[`map_${this.vendor}_key`]||Rt.map_key||!1}set key(e){e?this._key=e:this.console.always("An attempt to set the map key to a falsey value was ignored.")}infowindow_persist=!0;custom_infowindow=!1;infowindow_open=!0;infowindow_content=null;bounds=null;_infowindow=null;get infowindow(){return this._infowindow||(this._infowindow=this.vendor_implementation.create_infowindow()),this._infowindow}set infowindow(e){this._infowindow&&this.vendor_implementation.close_infowindow(this._infowindow),this._infowindow=e}is_autoload(){return this.container&&this.container.dataset.oiMapAutoload&&"false"!=this.container.dataset.oiMapAutoload.toLowerCase()}is_googlemaps(){return"googlemaps"==this._vendor}is_mapbox(){return"mapbox"==this._vendor}scrollwheel=!1;marker_autofit="always";autofit_padding=null;clusters=!1;cluster_options={};listing_type="location";listings=[];listings_by_id={};open_infowindow_on_card_mouseenter=!1;highlight_marker_on_card_mouseenter=!1;highlight_marker_scale=1.3;open_infowindow_on_marker_hover=!0;boogertown={latitude:35.21903739871317,longitude:-81.15900924180298,infowindow_content:"<h3 style='color:red'>You have entered Boogertown</h3><p>Check the console for advice.</p>"};show_hidden=!1;item_identifier=!1;get listings_selector(){return(this.item_identifier||"")+'[data-listing-type="'+this.listing_type+'"]'}set_listings(){if(this.show_hidden||this.card_marker_display_sync)this.listings=window.document.querySelectorAll(this.listings_selector);else{const e=window.document.querySelectorAll(this.listings_selector);this.listings=Array.from(e).filter((function(e){const t=window.getComputedStyle(e);return!("none"===t.display||"hidden"===t.visibility||t.opacity&&Number.parseFloat(t.opacity)<=0)}))}if(this.card_marker_display_sync&&this.listings.forEach((e=>{const t=e.dataset.listingId;t&&(this.listings_by_id[t]=e)})),!(this.listings.length||this.latitude&&this.longitude)){this.debug&&this.vendor_implementation.goto_boogertown();const e="Set a default lat/lng to center the map when no listings are available.";this.console.warn(e)}}_styles=(()=>Rt.map_styles)();get style(){return this._styles}set style(e){"string"==typeof e&&e.startsWith("[{")?this._styles=JSON.parse(e):this._styles=e}get styles(){return this._styles}set styles(e){"string"==typeof e&&e.startsWith("[{")?this._styles=JSON.parse(e):this._styles=e}_latitude=null;get latitude(){return this._latitude}set latitude(e){this._latitude=e||this._latitude}_longitude=null;get longitude(){return this._longitude}set longitude(e){this._longitude=e||this._longitude}_zoom=13;get zoom(){return this._zoom}set zoom(e){const t="number"==typeof e?e:parseInt(e);this._zoom=t}_min_zoom=!1;get min_zoom(){return this._min_zoom}set min_zoom(e){const t="number"==typeof e?e:parseInt(e);this._min_zoom=t}_max_zoom=!1;get max_zoom(){return this._max_zoom}set max_zoom(e){const t="number"==typeof e?e:parseInt(e);this._max_zoom=t}_zoom_control_position=!1;get zoom_control_position(){return this._zoom_control_position}set zoom_control_position(e){({mapbox:["top-left","top-right","bottom-left","bottom-right"],googlemaps:["BOTTOM_CENTER","BOTTOM_LEFT","BOTTOM_RIGHT","LEFT_BOTTOM","LEFT_CENTER","LEFT_TOP","RIGHT_BOTTOM","RIGHT_CENTER","RIGHT_TOP","TOP_CENTER","TOP_LEFT","TOP_RIGHT"]})[this.vendor].includes(e)||(e=this.translate_zoom_control_position(e,this.vendor)),this._zoom_control_position=e}_camera_control_position=!1;get camera_control_position(){return this._camera_control_position}set camera_control_position(e){({mapbox:["top-left","top-right","bottom-left","bottom-right"],googlemaps:["BOTTOM_CENTER","BOTTOM_LEFT","BOTTOM_RIGHT","LEFT_BOTTOM","LEFT_CENTER","LEFT_TOP","RIGHT_BOTTOM","RIGHT_CENTER","RIGHT_TOP","TOP_CENTER","TOP_LEFT","TOP_RIGHT"]})[this.vendor].includes(e)||(e=this.translate_zoom_control_position(e,this.vendor)),this._camera_control_position=e}_is_first_initialization=!0;translate_zoom_control_position(e,t){const i=["left","right"],o={googlemaps:{tcase:"toUpperCase",separator:"_",order:["v","h"]},mapbox:{tcase:"toLowerCase",separator:"-",order:["v","h"]}},n=e.includes("-")?o.mapbox:o.googlemaps,s=e.split(n.separator);"CENTER"==s[1]&&(s[1]="top",i.includes(s[0])&&(s[0]="left"));return s.join(o[t].separator)[o[t].tcase]()}marker_image="";get marker_icon(){return this.marker_image}set marker_icon(e){this.marker_image=e}marker_image_highlight="";get marker_icon_highlight(){return this.marker_image_highlight}set marker_icon_highlight(e){this.marker_image_highlight=e}marker_icon_width=24;marker_icon_height=24;_marker_icon_wh=(()=>this.marker_icon_width+","+this.marker_icon_height)();get marker_icon_wh(){return this._marker_icon_wh}set marker_icon_wh(e){this._marker_icon_wh=e;let t=!!this.marker_icon_wh&&this.marker_icon_wh.split(",");t&&2==t.length&&(this.marker_icon_width=parseInt(t[0]),this.marker_icon_height=parseInt(t[1]))}_marker_icon_origin=null;get marker_icon_origin(){return this._marker_icon_origin}set marker_icon_origin(e){if(e)try{this._marker_icon_origin=Jt(e)}catch(t){this._marker_icon_origin=null,this.console.log(t)}else this._marker_icon_origin=null}_marker_icon_anchor=null;
6get marker_icon_anchor(){return this._marker_icon_anchor}set marker_icon_anchor(e){if(e)try{this._marker_icon_anchor=Jt(e)}catch(t){this._marker_icon_anchor=null,this.console.log(t)}else this._marker_icon_anchor=null}card_marker_display_sync=!1;markers=[];icon_size_attribute(e,t){if(!e)return!1;if(!t)return e;const i=e.split(",");return!!i.length&&("w"==t?i[0]:"h"==t?i.length>1?i[1]:i[0]:void 0)}_marker_mouseover_delay=0;get marker_mouseover_delay(){return this._marker_mouseover_delay}set marker_mouseover_delay(e){this._marker_mouseover_delay=Mt.as_integer(e,0)}oiEvent(e,t){this.container?.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:t}))}validate(){return!this.is_googlemaps()||window.google&&"object"==typeof window.google.maps?!!(!this.is_mapbox()||window.mapboxgl&&window.mapboxgl.config.ACCESS_TOKEN)||(this.console.always("You must set an accessToken variable to use Mapbox. Visit the OiMap repository README.md for instructions."),!1):(this.console.always("The Google Maps API is not loaded. Check to be sure it is available on this page."),!1)}async go(){if(!Ut.map[this.element_id]){"lazy"==this.loading?await Promise.all([this.vendor_implementation.load_scripts(),ti(this.container,this)]):await this.vendor_implementation.load_scripts(),Ut.map[this.element_id]=this;const e=new Event("oi.loaded.map."+this.element_id);window.dispatchEvent(e),this.init()}}init(){throw new Error("Not implemented. Implement init() in your vendor.map.ts file")}}function ti(e,t){return new Promise(((i,o)=>{const n=new IntersectionObserver((o=>{o.forEach((o=>{o.isIntersecting&&(t.console.log("Intersection: map.container has entered the viewport."),n.unobserve(e),i())}))}),{threshold:0});n.observe(e)}))}const ii=new $t(Qt).addProperty({name:"marker_label",type:"legacy"}).addProperty({name:"nearby",type:"legacy"}).addProperty({name:"nearby_marker_image",type:"legacy"}).addProperty({name:"nearby_marker_icon",type:"legacy"}).addProperty({name:"nearby_marker_icon_wh",type:"legacy"}).addProperty({name:"nearby_marker_icon_width",type:"legacy"}).addProperty({name:"nearby_marker_icon_height",type:"legacy"}).addProperty({name:"nearby_marker_icon_origin",type:"legacy"}).addProperty({name:"nearby_marker_icon_anchor",type:"legacy"}).addProperty({name:"nearby_marker_icons",type:"legacy"}).addProperty({name:"nearby_search_pages",type:"integer"}).addProperty({name:"nearby_multi",type:"legacy"}).addProperty({name:"infowindow_header",type:"legacy"}).addProperty({name:"infowindow_content",type:"legacy"}).addProperty({name:"infowindow_open",type:"legacy"}).build();class ni extends ei{constructor(e,t,i){if(super(e,t),this.console.lib="oimap",this.console.id=this.element_id,this.is_autoload()){const e=ii.readAttributes(this.container,!0);for(const[t,i]of Object.entries(e))t in this&&(this[t]=i),t in this.vendor_implementation&&(this.vendor_implementation[t]=i)}else if(t)for(const[o,n]of Object.entries(t))o in this&&(this[o]=n),o in this.vendor_implementation&&(this.vendor_implementation[o]=n);this.callback=i,this.validate_screen()&&this.go()}init(){!this.debug||this.latitude&&this.longitude||this.load_sample(),this.validate()&&this.vendor_implementation.init_single(this.callback)}load_sample(){const e=[{lat:42.434735,lng:-84.0025095,name:"Hell, Michigan",iwcontent:"Hell is colder than generally advertised."},{lat:35.2178007,lng:-81.1672276,name:"Boogertown, North Carolina",iwcontent:"Who lives in a place called Boogertown?"},{lat:45.432429,lng:-122.4187665,name:"Boring, Oregon",iwcontent:"Sounds like a party town."}][Math.floor(Math.random()*Math.floor(3))];this.latitude=e.lat,this.longitude=e.lng,this.infowindow_open=!0,this.infowindow_content=`\n            <h3>You are missing Lat/Lng value(s) for this map.</h3>\n            <h6>OiMap has chosen <span style="color:red">${e.name}</span> \n                so you may test other map featues until the issue is corrected.</h6>\n            <h7>${e.iwcontent}</h7>`}}const si=new $t(Qt).addProperty({name:"listing_type",type:"legacy"}).addProperty({name:"item_identifier",type:"legacy"}).addProperty({name:"show_hidden",type:"legacy"}).addProperty({name:"card_marker_display_sync",type:"legacy"}).addProperty({name:"open_infowindow_on_card_mouseenter",type:"legacy"}).addProperty({name:"open_infowindow_on_marker_hover",type:"boolean"}).addProperty({name:"marker_labels",type:"legacy"}
6).addProperty({name:"clusters",type:"legacy"}).addProperty({name:"clusters_infowindow",type:"legacy"}).addProperty({name:"clusters_infowindow_hover",type:"boolean",default:!0}).addProperty({name:"cluster_options",type:"legacy"}).addProperty({name:"highlight_marker_on_card_mouseenter",type:"boolean"}).addProperty({name:"highlight_marker_scale",type:"float"}).addProperty({name:"disable_auto_pan_on_card_mouseenter",type:"boolean"}).addProperty({name:"custom_infowindow",type:"boolean"}).build();class ri extends ei{constructor(e,t,i){if(super(e,t),this.is_autoload()){const e=si.readAttributes(this.container,!0);for(const[t,i]of Object.entries(e))t in this&&(this[t]=i),t in this.vendor_implementation&&(this.vendor_implementation[t]=i)}else if(t)for(const[o,n]of Object.entries(t))o in this&&(this[o]=n),o in this.vendor_implementation&&(this.vendor_implementation[o]=n);this.console.lib="oimap",this.console.id=this.element_id,this.callback=i,this.validate_screen()&&this.go()}init(){this.validate()&&this.vendor_implementation.init_multi(this.listing_type,this.callback)}set_markers(e){e=e||this.listing_type,this.vendor_implementation.set_markers(e)}show_infowindow(e){this.vendor_implementation.show_infowindow(e)}fit(){return!!this.vendor_implementation.fit()||(this.console.warn("fit() call failed. No bounds are available."),!1)}clear_markers(){this.vendor_implementation.clear_markers()}}const ai={single:ni,multi:ri};function li(e,t,i){window.bootstrap.Popover.VERSION.startsWith("4")?window.jQuery(e).on(t,i):e.addEventListener(t,i)}function ci(e,t,i){window.bootstrap.Popover.VERSION.startsWith("4")?window.jQuery(e).off(t,i):e.removeEventListener(t,i)}class di{pointElement;state;popover;hidingPromise=null;showingPromise=null;constructor(e){this.pointElement=e,this.state="hidden",this.popover=new window.bootstrap.Popover(e,{trigger:"manual",html:!0,animation:!0})}async show(){"showing"!==this.state&&"shown"!==this.state&&("hidden"===this.state&&await this.internalShow(),"hiding"===this.state&&(await this.hidingPromise,await hi(),await this.internalShow()))}async hide(){"hidden"!==this.state&&"hiding"!==this.state&&("shown"===this.state&&await this.internalHide(),"showing"===this.state&&(await this.showingPromise,await hi(),await this.internalHide()))}async internalHide(){return this.state="hiding",this.hidingPromise=new Promise(((e,t)=>{const i=()=>{try{this.hidingPromise=null,this.state="hidden",ci(this.pointElement,"hidden.bs.popover",i),e()}catch(o){t(o)}};li(this.pointElement,"hidden.bs.popover",i),this.popover.hide()}))}async internalShow(){return this.state="showing",this.showingPromise=new Promise(((e,t)=>{const i=()=>{try{this.showingPromise=null,this.state="shown",ci(this.pointElement,"shown.bs.popover",i),e()}catch(o){t(o)}};li(this.pointElement,"shown.bs.popover",i),this.popover.show()}))}}function hi(){return new Promise(((e,t)=>setTimeout(e,1)))}const ui={},mi=(new $t).addProperty({name:"debug",type:"legacy"}).addProperty({name:"loading",type:"legacy"}).addProperty({name:"screen_width_min",type:"integer"}).addProperty({name:"screen_width_max",type:"integer"}).addProperty({name:"min_zoom",type:"float"}).addProperty({name:"max_zoom",type:"float"}).addProperty({name:"inside_iframe",type:"boolean"}).build();class pi extends xt{_id;_element_id;autocenter=!0;max_zoom=3;min_zoom=.4;zoom_increment=1.5;zoom_decrement=(()=>1/this.zoom_increment)();zoom_relative=0;inside_iframe=!1;transformOrigin={x:.5,y:.5};beforeWheel(e){return!e.shiftKey}loading="eager";screen_width_min=!1;screen_width_max=!1;validate_screen(){const e=this.screen_width_min,t=this.screen_width_max;if(!e&&!t)return!0;const i=this;return Mt.is_screen_width(this.screen_width_min,this.screen_width_max,(function(e){e.matches&&i.go()}))}constructor(e,t){if(!e)throw new Error("Can't construct ISP, no element ID specified");if(super(),e=e.trim(),this._element_id=e,this._id=e,this.console.lib="oiisp",this.console.id=this.element_id,this.is_autoload()){const e=mi.readAttributes(this.container,!0);for(const[t,i]of Object.entries(e))this[t]=i}else if(t)for(const[i,o]of Object.entries(t))this[i]=o;this.do_validation(),this.printErrors(),this.validate_screen()&&this.go()}go(){var e=this;if("lazy"==this.loading){if(!this.img_is_complete()){return void new IntersectionObserver((t=>{t.forEach((t=>{t.isIntersecting&&(e.load(),e.console.log("Intersection: isp.element has entered the viewport."))}))}),{threshold:0}).observe(this.container)}this.load()}else this.load()}async_preload_image(){const e=this;return new Promise(((t,i)=>{const o=new Image;o.src=this.image.dataset.src,o.onload=()=>t(o),o.onerror=()=>i(e.console.error("ISP image could not be loaded."))}))}load(){const e=this;if(!Ut.isp[this.id]){if("lazy"==this.loading&&this.image.dataset.src){this.async_preload_image().then((t=>{e.image.src=t.src}))}ui[this.id]=setInterval((function(){if(e.img_is_complete()){e.console.log("The isp image is complete"),e.init(
6),Ut.isp[e.id]=e;const t=new Event("oi.loaded.isp."+e.id);window.dispatchEvent(t),clearInterval(ui[e.id])}else e.console.log("The isp image is not yet loaded.")}),100)}}is_autoload(){return this.container.dataset.oiIspAutoload&&"false"!=this.container.dataset.oiIspAutoload.toLowerCase()}autoloadable=["debug","loading","min_zoom","max_zoom","screen_width_min","screen_width_max"];do_validation(){return this.image?("lazy"==this.loading&&(""!=this.image.src&&this.addError("img_src_attr","When isp.loading is lazy, the <img> element must not have a 'src' attribute."),this.image.hasAttribute("srcset")&&this.addError("img_srcset_attr","When isp.loading is lazy, the <img> element must not contain a 'srcset' attribute."),this.image.dataset.src||this.addError("img_datasrc_attr","When isp.loading is lazy, the <img> element must include the `data-src` attribute and a value set to the image url."),"eager"!=this.image.getAttribute("loading")&&(this.image.loading="eager",this.addError("img_loading_value","When isp.loading='lazy', the oi-isp-image <img> element SHOULD define loading='eager'. OiIsp proactively corrected this, but please edit the html appropriately.","warn"))),"eager"==this.loading&&(this.image.hasAttribute("src")||this.addError("img_src_attr","When isp.loading is eager, the <img> element MUST have a 'src' attribute."),"lazy"!=this.image.getAttribute("loading")&&this.addError("img_loading_value","When isp.loading='eager', the oi-isp-image <img> element MUST define loading='lazy'")),!0):(this.addError("missing_img","OiIsp cannot identify the required <img> element."),!1)}img_make_oilazy(){return!this.image.complete&&(this.image.hasAttribute("srcset")&&this.image.removeAttribute("srcset"),this.image.hasAttribute("src")&&(this.image.dataset.src=this.image.src,this.image.removeAttribute("src")),this.image.loading="eager",!0)}img_is_complete(){return!!this.image.hasAttribute("src")&&(!(!this.image.hasAttribute("srcset")&&""==this.image.getAttribute("src"))&&!!(this.image.complete&&this.image.height>10))}oiEvent(e,t){t=t||{},this.container.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:t}))}get id(){return this._id}set id(e){}get element_id(){return this._element_id}get container(){return document.getElementById(this.element_id)}panzoom;get panzoom_canvas(){return this.container.querySelector(".oi-panzoom-canvas")}get panzoom_controls(){return this.container.querySelector(".oi-isp-controls")}get image(){return this.container.querySelector("img.oi-isp-image")}get points(){return this.container.querySelectorAll(".oi-isp-point")}get points_pop(){return this.container.querySelectorAll(".oi-isp-point.oi-isp-pop")}get legend(){return this.container.querySelector(".oi-isp-legend")}has_popper(){return"bootstrap"in window&&"object"==typeof window.bootstrap||(this.console.warn("The required bootstrap.popper library is not available."),!1)}position_points(e,t){const i=this;let o=this.points;e=e||this.image.width,t=t||this.image.height,o.forEach((function(o){const n=Number.parseFloat(o.dataset.x||""),s=Number.parseFloat(o.dataset.y||""),r=o.offsetWidth,a=o.offsetHeight,l=100*n-r/e*100/2,c=100*s-a/t*100/2,d=o.dataset.href,h=o.querySelector(".oi-isp-pnum-inner");if(o.style.left="calc("+l+"% + var(--oi-isp-point-xleft, 0px))",o.style.top="calc("+c+"% + var(--oi-isp-point-xtop, 0px))",o.style.opacity="1",h){const e=o.querySelector(".oi-isp-pnum"),t=h.offsetWidth,i=(e.offsetWidth,window.getComputedStyle(e).fontSize);let n=Number.parseFloat(i.replace("px","")),s=0;for(e.style.fontSize=i;e.offsetWidth>t&&(n-=1,e.style.fontSize=n.toString()+"px",s++,!(s>100)););}const u={isp_id:i.id,point_id:o.id};["click","tap","touchstart","mouseenter","mousedown"].forEach((e=>o.addEventListener(e,(function(){const t="oiisp_point_"+e;i.console.log("Dispatching: "+t,u),i.oiEvent(t,u)})))),void 0!==d&&o.addEventListener("click",(function(){if(i.inside_iframe){const e=document.createElement("a");e.href=d,e.target="_top",e.click()}else window.location.assign(d)}))}))}scales=[];scale_initial;scale_active;stage=null;queued=[];processed=[];queue_action(e){this.queued.push(e),this.set_stage()}set_stage(){this.stage||this.queued.length&&(this.stage=this.queued.shift()||null,this.stage&&this.deploy_staged())}deploy_staged(){let e=this.container.offsetWidth,t=this.container.offsetHeight,i=Math.trunc(e/2),o=Math.trunc(t/2);this.stage&&("in"==this.stage.zoom?this.scale_active.is_max?(this.console.log("The max_zoom level has been reached."),this.stage=null,this.set_stage()):(this.stage.scale=this.scales[this.scales.indexOf(this.scale_active)+1],this.panzoom.smoothZoom(i,o,this.scale_active.multiplier.in_from_here)):"out"==this.stage.zoom?this.scale_active.is_min?(this.console.log("The min_zoom level has been reached."),this.stage=null,this.set_stage()):(this.stage.scale=this.scales[this.scales.indexOf(this.scale_active)-1],this.panzoom.smoothZoom(i,o,this.scale_active.multiplier.out_from_here)):"reset"==this.stage.zoom&&(this.stage.scale=this.scales.find((e=>0===e.relative)),this.panzoom.smoothZoom(i,o,1)))}clear_stage(e){if(Math.abs(this.stage.scale.scale-e)<.01){const e=this;
6this.zoom_scale_class_update().then((()=>{e.processed.push(e.scale_active),e.scale_active=e.stage.scale,e.stage=null,e.set_stage()}))}}scale_class_names(e){const t=[];e.is_min&&t.push("zoom-scale-min"),e.is_max&&t.push("zoom-scale-max");const i=e.scale.toFixed(1).toString().replace(".","point");return t.push("zoom-scale-"+i),t}zoom_relative_class_names(e){const t=[];let i=e.relative.toString();return i=i.replace("-","neg"),t.push("zoom-relative-"+i),t}update_zoom_classes(){const e=this;return new Promise(((t,i)=>{const o=e.zoom_relative_class_names(e.stage.scale);o.length?o.forEach(((i,n,s)=>{e.container.classList.add(i),e.console.log("Container class added: "+o),n==s.length-1&&t()})):t()}))}update_scale_classes(){const e=this;return new Promise(((t,i)=>{const o=e.scale_class_names(e.stage.scale);o.length?o.forEach(((i,o,n)=>{e.container.classList.add(i),e.console.log("Container class added: "+i),o==n.length-1&&t()})):t()}))}clean_zoom_classes(){const e=document.getElementById(this.element_id);return Mt.style.class_remove_by_prefix(e,"zoom-relative-")}clean_scale_classes(){const e=document.getElementById(this.element_id);return Mt.style.class_remove_by_prefix(e,"zoom-scale-")}zoom_scale_class_update(){const e=this;return new Promise(((t,i)=>{e.clean_zoom_classes().then((()=>{e.clean_scale_classes().then((()=>{e.update_zoom_classes().then((()=>{e.update_scale_classes().then((()=>{e.console.log("zoom_scale_class_update Promise resolved."),t()}))}))}))}))}))}panzoom_init(){const e=this;s.e(503).then(s.t.bind(s,611,23)).then((t=>{const i={autocenter:e.autocenter,maxZoom:e.max_zoom,minZoom:e.min_zoom,transformOrigin:e.transformOrigin,beforeWheel:e.beforeWheel,bounds:!0,boundsPadding:.05};e.panzoom=t.default(e.panzoom_canvas,i);const o={isp_id:e.id};e.console.log("Dispatching: oiisp_panzoom_loaded",o),e.oiEvent("oiisp_panzoom_loaded",o),this.scales=function(e,t,i,o,n){const s=[];
6s.push({relative:0,is_max:e>=i,is_min:e<=t,scale:e,multiplier:{in_from_here:!1,out_from_here:!1}});let r,a,l,c,d=0,h=e;for(;h*o<i;)h*=o,d+=1,s.push({relative:d,is_max:!1,is_min:!1,scale:h,multiplier:{in_from_here:!1,out_from_here:!1}});for(d+=1,s.push({relative:d,is_max:!0,is_min:!1,scale:i,multiplier:{in_from_here:!1,out_from_here:!1}}),d=0,h=e;h*n>t;)h*=n,d-=1,s.unshift({relative:d,is_max:!1,is_min:!1,scale:h,multiplier:{in_from_here:!1,out_from_here:!1}});return d-=1,s.unshift({relative:d,is_max:!1,is_min:!0,scale:t,multiplier:{in_from_here:!1,out_from_here:!1}}),s.forEach(((e,d)=>{r=0==d?null:s[d-1],a=d==s.length-1?null:s[d+1],l=null,c=null,e.is_min?s[d].multiplier.in_from_here=a.scale/t:e.is_max&&(s[d].multiplier.out_from_here=r.scale/i),r&&a&&(c=r.is_min?t/e.scale:n,s[d].multiplier.out_from_here=c,l=a.is_max?i/e.scale:o,s[d].multiplier.in_from_here=l)})),s}(e.panzoom.getTransform().scale,this.min_zoom,this.max_zoom,this.zoom_increment,this.zoom_decrement),this.console.log("Scale objects have been built",this.scales),this.scale_active=this.scales.find((e=>0===e.relative)),e.panzoom_controls?(e.panzoom_controls.addEventListener("click",(function(o){const n=o.composedPath();for(const s of n)if(s instanceof HTMLElement){if(s.classList.contains("oi-zoom-in")){e.queue_action({zoom:"in"});break}if(s.classList.contains("oi-zoom-out")){e.queue_action({zoom:"out"});break}if(s.classList.contains("oi-zoom-reset")){e.panzoom=t.default(e.panzoom_canvas,i),e.queue_action({zoom:"reset"}),e.panzoom.on("zoomend",(function(t){const i=t.getTransform();e.clear_stage(i.scale)}));break}}})),e.panzoom.on("zoomend",(function(t){const i=t.getTransform();e.clear_stage(i.scale)}))):e.console.warn("No panzoom controls could be identified.")}))}get_popover_id(e){return e.getAttribute("aria-describedby")}infowindow_init(){if(!this.has_popper())return!1;const e=this;this.points_pop.forEach((function(t){const i=new di(t);["click","tap","touchstart","mouseenter"].forEach((o=>t.addEventListener(o,(function(){i.show();const n={isp_id:e.id,point_id:t.id},s="oiisp_infowindow_"+o;e.console.log("Dispatching: "+s,n),e.oiEvent(s,n);const r=setInterval((function(){const o=t.matches(":hover")||Boolean(t.querySelector(":hover")),n=e.get_popover_id(t);try{const e=document.getElementById(n);if(!e)return void clearInterval(r);const t=e.matches(":hover");o||t||(i.hide(),clearInterval(r))}catch{clearInterval(r)}}),800)}),{passive:!0})))}))}filter_init(){const e=this.legend.querySelectorAll(".oi-isp-filter-item"),t=this;e.forEach((function(i){i.addEventListener("click",(function(i){e.forEach((function(e){e.classList.remove("active")})),this.classList.add("active");const o=this.dataset.id;t.points.forEach((function(e){"oi-isp-key-all"==o||o&&e.classList.contains(o)?e.style.opacity="1":e.style.opacity="0.2"}));const n={isp_id:t.id,filter:this.dataset.id.replace("oi-isp-key-","")};t.console.log("Dispatching: oiisp_filter",n),t.oiEvent("oiisp_filter",n)}))}))}init(){this.container.offsetWidth,this.container.offsetHeight;this.position_points(),this.panzoom_init(),this.infowindow_init(),this.filter_init()}}const _i=pi;const fi=[/HF-C(?<client_id>\d+)-B(?<builder_id>\d+)-(?<model_prefix>[A-Z]{1,3})(?<object_id>\d+)$/,/HF-C(?<client_id>\d+)-(?<model_prefix>BP|MP|MI|MCI)(?<object_id>\d+)$/];class gi extends xt{id;valid=!1;client_id=null;builder_id=null;model_prefix=null;object_id=null;model=null;decoded=null;constructor(e){super(),this.id=e,this.console.lib="oihfid",this.console.id=this.id;const t=function(e){let t=null;for(const o of fi){const i=e.match(o);i&&(t=i)}return t?{...t.groups,model:(i=t.groups.model_prefix,{L:"Location",P:"Plan",S:"Spec",LOT:"Lot",BP:"BlogPost",MP:"MasterPlan",MI:"MediaItem",MCI:"MediaCollectionItem"}[i]||null)}:null;var i}(e);t?(this.decoded=t,Object.assign(this,t),this.valid=!0,this.console.log("Decoded: "+JSON.stringify(this.decoded))):(this.valid=!1,this.console.error("This id could not be decoded."))}get favorite_url(){if(!this.valid)return null;let e=this.model.toLowerCase();return"mediacollectionitem"===e&&(e="media"),`/toggle-favorite/${e}/${this.object_id}/`}}const yi=gi;const wi=new class{promise=null;resolve=null;reject=null;begin(){return this.promise||(this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))),this.promise}cancel(){this.promise&&(this.reject(),this.promise=null,this.resolve=null,this.reject=null)}complete(e){this.promise&&(this.resolve(e),this.promise=null,this.resolve=null,this.reject=null)}};class bi extends xt{id=null;
6user_type=null;last_name=null;first_name=null;email=null;faves=(()=>new Set)();get authenticated(){return this.id&&"anonymous"!=this.id}set authenticated(e){}constructor(e){if(super(),this.id=e.id||"anonymous",this.faves=new Set(e.faves),this.user_type=e.user_type,this.last_name=e.last_name??null,this.first_name=e.first_name??null,this.email=e.email??null,this.console.lib="oiuser",this.console.id="anonymous"==this.id?"anon":this.id,this.favebtn_state_all(),this.showto_state_all(),this.authenticated){const e=this;t.oiuser_staged&&this.handle_toggle_request(t.oiuser_staged,!0),document.addEventListener("click",(t=>{const i=t.target?.closest(e.favebtn_selector());if(i){t.preventDefault();const o=i.dataset.homefinitiId;e.handle_toggle_request(o)}}))}this.doorman.observe(document.body,{subtree:!0,childList:!0}),Ut.user=this;const i="oi.loaded.user."+(this.authenticated?"authenticated":"anonymous");window.dispatchEvent(new Event(i)),window.dispatchEvent(new CustomEvent("oiuser_changed",{detail:{user:this}})),this.console.log(`dispatched: ${i}`)}favebtn_selector(e){let t="button[data-oi-user-action='favorite']";return e&&(t=t+"[data-homefiniti-id='"+e+"']"),t}showto_selector(){return"[data-oi-user-showto]"}async handle_toggle_request(e,t){if(e instanceof gi||(e=new gi(e)),!e.valid)throw new Error("Invalid homefiniti id");let i=e.favorite_url;if(void 0!==t){const e={force_fave_state:String(t)};i=i+"?"+new URLSearchParams(e)}const o=await Lt.get(i);if(!(o.status>=200&&o.status<400))throw new Error(o.statusText);const n=o.data.data;if(!n)throw new Error("No data received from favorite toggle API request");let s=!1;return"add"==n.action?(this.faves.add(n.homefiniti_id),this.send_event(n.homefiniti_id),s=!0,this.sendFavoriteChangedEvent(n.homefiniti_id,s)):"remove"==n.action&&(this.faves.delete(n.homefiniti_id),s=!1,this.sendFavoriteChangedEvent(n.homefiniti_id,s)),this.favebtn_state_by_hfid(n.homefiniti_id),s}favebtn_state_all(){const e=document.querySelectorAll(this.favebtn_selector()),t=this;e.forEach((e=>{t.favebtn_state(e)}))}showto_state_all(){const e=document.querySelectorAll(this.showto_selector()),t=this;e.forEach((e=>{t.showto_state(e)}))}favebtn_state_by_hfid(e){const t=document.querySelectorAll(this.favebtn_selector(e)),i=this;t.forEach((e=>{i.favebtn_state(e)}))}favebtn_state(e){const t=e.querySelector(".oi-favorite-state.oi-favorite-state-on"),i=e.querySelector(".oi-favorite-state.oi-favorite-state-off"),o=e.dataset.homefinitiId;o&&this.faves.has(o)?(e.dataset.oiUserFavoriteState="1",i.classList.add("d-none"),t.classList.remove("d-none")):(e.dataset.oiUserFavoriteState="0",t.classList.add("d-none"),i.classList.remove("d-none")),e.style.removeProperty("display")}showto_state(e){const t=e.dataset.oiUserShowto,i=t.split(",");this.authenticated?"auth"==t||i.includes(this.user_type.toLowerCase())?e.style.removeProperty("display"):e.style.display="none":"anon"==t?e.style.removeProperty("display"):e.style.display="none"}get doorman(){const e=this;return new MutationObserver(((t,i)=>{t.forEach((t=>{t.addedNodes.forEach((t=>{Mt.is_dom_element(t)&&e.evaluate_node(t)}))}))}))}evaluate_node(e){try{const t=e.querySelectorAll(this.favebtn_selector()),i=e.querySelectorAll(this.showto_selector()),o=this;t.forEach((e=>{o.favebtn_state(e)})),i.forEach((e=>{o.showto_state(e)}))}catch(t){this.console.error(t),this.console.error("This node could not be queried for fave buttons."),this.console.error("node.nodeType",e.nodeType)}}send_event(e){void 0!==window.hfaDataLayer&&window.hfaDataLayer.push({event:"oi-favorite-click",content_ids:[e]})}sendFavoriteChangedEvent(e,t){window.dispatchEvent(new CustomEvent("oiuser_favorites_changed",{detail:{homefinitiId:e,isFavorite:t}}))}async toggleFavorite(e,t){await this.handle_toggle_request(e,t)}static triggerLoginIfNotAuthenticated(){if(Ut.user&&Ut.user.authenticated)return Promise.resolve(Ut.user);const e=wi.begin();return window.dispatchEvent(new Event("oiuser_login_requested")),e}static cancelPendingAuthenticationRequests(){wi.cancel()}}window.addEventListener("oi.loaded.user.authenticated",(e=>{Ut.user&&wi.complete(Ut.user)}));var vi=s(748);const ki={};function Ei(e,t){const i=e.length,o=t.length;if(0===i)return o;if(0===o)return i;const n=i+o,s=Object.create(null),r=Array.from({length:i+2},(()=>new Array(o+2).fill(0)));r[0][0]=n;for(let a=0;a<=i;a++)r[a+1][0]=n,r[a+1][1]=a;for(let a=0;a<=o;a++)r[0][a+1]=n,r[1][a+1]=a;for(let a=1;a<=i;a++){let i=0;for(let n=1;n<=o;n++){const o=s[t[n-1]]??0,l=i,c=e[a-1]===t[n-1]?0:1;0===c&&(i=n),r[a+1][n+1]=Math.min(r[a][n]+c,r[a+1][n]+1,r[a][n+1]+1,r[o][l]+(a-o-1)+1+(n-l-1))}s[e[a-1]]=a}return r[i+1][o+1]}function Li(e,t,i,o){void 0===i&&(i=3),void 0===o&&(o=3);const n=e.length,s=t.length;if(e===t)return{score:0,matchIndex:0,fuzzyChars:null};if(e.startsWith(t))return{score:100+n,matchIndex:0,fuzzyChars:null};const r=e.indexOf(t);if(e.split(/[\s\-_./,]+/).some((e=>e===t)))return{score:200+n,matchIndex:r,fuzzyChars:null};if(r>=0)return{score:300+n,matchIndex:r,fuzzyChars:null};if(s<o)return{score:1/0,matchIndex:-1,fuzzyChars:null};
6const a=t.split(/\s+/).filter(Boolean);let l=0;const c=e.split(/\s+/).filter(Boolean).map((t=>{const i=e.indexOf(t,l);return l=i+t.length,{text:t,start:i}}));let d=0;const h=new Array(n).fill(!1);for(const u of a){let e=1/0,t=null;for(const i of c){if(i.text.startsWith(u)){e=0,t=i;break}if(u.length<o||i.text.length<o)continue;const n=Ei(u,i.text);n<e&&2*n<Math.min(u.length,i.text.length)&&(e=n,t=i)}if(e>i)return{score:1/0,matchIndex:-1,fuzzyChars:null};if(d+=e,t)if(0===e)for(let i=t.start;i<t.start+u.length;i++)h[i]=!0;else{let e=0;for(let i=t.start;i<t.start+t.text.length&&e<u.length;i++)t.text[i-t.start]===u[e]&&(h[i]=!0,e++)}}return{score:400+d/Math.max(s,1)*100,matchIndex:-1,fuzzyChars:h}}const xi=class extends xt{element_id=null;get element(){return window.document.getElementById(this.element_id)}get icon(){return window.document.getElementById(this.element_id+"-icon")}selection=null;url=null;constructor(e,t){super(),this.element_id=e,this.console.lib="oiautocomplete",this.console.id=this.element_id;const i=this;if(this.is_autoload())this.autoloadable.forEach((function(e){let t=i.element.dataset[e];
6if(!t){const o=Mt.camelize(e);t=i.element.dataset[o]}t&&(t=Mt.src.set_booleans(t),i[e]=t)}));else if(t)for(const[o,n]of Object.entries(t))this[o]=n;this.do_label_accessibility(),this.prepare_scope_and_keys(),this.icon&&this.element.addEventListener("init",(function(e){i.icon.classList.add(...i.icon_iclass),setTimeout((function(){const e=new Event("oi.loaded.autocomplete."+i.element_id);window.dispatchEvent(e)}),500)})),this.config=this.set_config(),this.ac=new vi(this.config),this.element.addEventListener("selection",(function(e){const t=e.detail;if(i.selection=t.selection.value[t.selection.key],i.console.log("Selection made: "+i.selection),i.url=t.selection.value.href,void 0!==window.hfaDataLayer&&window.hfaDataLayer.push({event:"oi-autocomplete-select"}),i.input_style_pending(),void 0!==window.google_tag_manager){let e;window.dataLayer.push({event:"oi-autocomplete-select",AutocompleteSelection:i.selection,eventCallback:function(){i.console.log("dataLayer eventCallback() triggered."),clearTimeout(e),i.do_redirect()}}),e=setTimeout((function(){i.console.log("2sec failsafe triggered."),i.do_redirect()}),2e3)}else i.console.log("No GTM, immediate redirect."),i.do_redirect()})),this.element.addEventListener("close",(function(e){if(!i.element.classList.contains("is-redirecting")&&i.element!=document.activeElement){const t=e.detail.query;i.console.log("Autocomplete abandoned query: "+t),void 0!==window.google_tag_manager&&window.dataLayer.push({event:"oi-autocomplete-abandon",AutocompleteAbandoned:t})}})),Ut.autocomplete[this.element_id]=this}is_autoload(){return this.element.dataset.oiAutocompleteAutoload&&"false"!=this.element.dataset.oiAutocompleteAutoload.toLowerCase()}has_results_page(){return this.element.dataset.resultsPageUrl&&""!=this.element.dataset.resultsPageUrl.toLowerCase()}get results_page(){return this.element.dataset.resultsPageUrl}get autoloadable(){return["allow_submit","builder_id","env","icon_iclass","icon_iclass_redirecting","max_results","placeholder","rank","rank_fuzzy_distance","src","scope","wrapper"]}wrapper=!0;placeholder="Search by Community, Plan, or Address";rank=!0;_rank_fuzzy_distance=3;set rank_fuzzy_distance(e){this._rank_fuzzy_distance=Number(e)}get rank_fuzzy_distance(){return this._rank_fuzzy_distance}_rank_fuzzy_min_length=3;set rank_fuzzy_min_length(e){this._rank_fuzzy_min_length=Number(e)}get rank_fuzzy_min_length(){return this._rank_fuzzy_min_length}src="/sitesearch.json";allow_submit=!1;max_results=5;builder_id=null;env=null;scope=null;scope_query_string=null;_icon_iclass="fa fa-search";set icon_iclass(e){this._icon_iclass=e}get icon_iclass(){return this._icon_iclass.split(" ")}_icon_iclass_redirecting="fa fa-spinner fa-spin";set icon_iclass_redirecting(e){this._icon_iclass_redirecting=e}get icon_iclass_redirecting(){return this._icon_iclass_redirecting.split(" ")}do_label_accessibility(){if(this.element.getAttribute("aria-label"))return!0;const e=document.querySelector("label[for='"+this.element.id+"']");if(e&&e.textContent)return Mt.style.is_hidden(e)&&this.element.setAttribute("aria-label",e.textContent),!0;if(this.element.getAttribute("aria-labelledby")){const e=document.getElementById(this.element.getAttribute("aria-labelledby"));if(e&&e.textContent)return Mt.style.is_hidden(e)&&this.element.setAttribute("aria-label",e.textContent),!0}return this.element.setAttribute("aria-label",this.placeholder),!0}build_result_item(e,t){const i=Mt.slugify(t.key);e.innerHTML=`<span class="result-item-match">${t.match}</span><span class="result-item-label"><i class="fa-oi-${i}"></i> ${t.key}</span>`}search_engine(e,t){const i=e.toLowerCase(),o=String(t),{score:n,matchIndex:s,fuzzyChars:r}=Li(o.toLowerCase(),i,this.rank_fuzzy_distance,this.rank_fuzzy_min_length);if(n===1/0)return;const a="highlight";if(n<400)return s>=0?o.substring(0,s)+`<mark class="${a}">${o.substring(s,s+i.length)}</mark>`+o.substring(s+i.length):o;let l="";for(let c=0;c<o.length;c++)l+=r[c]?`<mark class="${a}">${o[c]}</mark>`:o[c];return l}filter_results(e){const t=Array.from(new Set(e.map((e=>e.match)))).map((t=>e.find((e=>e.match===t))));return this.rank?this.rank_results_by_similiarity(t,this.element.value):t}build_results_list(e,t){const i=document.createElement("p");if(i.classList.add("results-summary"),t.results.length>0?i.innerHTML=`Displaying <strong>${t.results.length}</strong> out of <strong>${t.matches.length}</strong> results`:i.innerHTML=`Found <strong>${t.matches.length}</strong> matching results for <strong>"${t.query}"</strong>
6`,e.prepend(i),this.has_results_page()&&t.results.length>0){const i=document.createElement("p");i.classList.add("results-summary"),t.matches.length>5&&(i.innerHTML=`<a href=${this.results_page}?q=${t.query}> See More </a>`),e.append(i)}}rank_results_by_similiarity(e,t){const i=t.toLowerCase();return e.sort(((e,t)=>{const o=Li(e.match.toLowerCase(),i,this.rank_fuzzy_distance,this.rank_fuzzy_min_length).score,n=Li(t.match.toLowerCase(),i,this.rank_fuzzy_distance,this.rank_fuzzy_min_length).score;return o!==n?o-n:e.match.localeCompare(t.match,void 0,{sensitivity:"base"})}))}input_style_pending(){this.element.setAttribute("readonly","readonly"),this.element.classList.add("is-redirecting"),this.element.blur(),this.icon&&this.icon_iclass_redirecting&&(this.icon.classList.remove(...this.icon_iclass),this.icon.classList.add(...this.icon_iclass_redirecting)),this.element.value=this.selection}do_redirect(){if("docs"==this.env){const e=this;setTimeout((function(){alert("In a theme environment, you would now be redirected to: \n"+e.url),e.element.setAttribute("readonly",""),e.element.removeAttribute("readonly"),e.element.classList.remove("is-redirecting"),e.element.value="",e.icon.classList.remove(...e.icon_iclass_redirecting),e.icon.classList.add(...e.icon_iclass)}),1e3)}else this.console.log("Redirecting to: "+this.url),window.location.href=this.url}keys=[];prepare_scope_and_keys(){const e=this,t=[];let i=this.scope||"location,plan,spec";i=i.trim();i.split(",").forEach((function(i){if(-1==(i=i.toLowerCase()).indexOf("|"))e.keys.push(e.label(i)),t.push(i+"|"+e.label(i));else{let o=i.split("|");e.keys.push(o[1].trim()),t.push(o[0].trim()+"|"+o[1].trim())}}));let o="?scope="+t.join(",");this.builder_id&&(o=o+"&b="+this.builder_id),e.scope_query_string=o}label(e){const t={location:{label:"community"},plan:{label:"plan"},spec:{label:"quick move-in"},masterplan:{label:"plan"},builder:{label:"region"},submarket:{label:"region"},blogpost:{label:"blog"},page:{label:"resource"}};return t[e]?t[e].label:e}datas(e){const t=this;if(t.element.setAttribute("placeholder","Loading..."),"docs"==e){return async()=>{try{const e=await s.e(931).then(s.bind(s,184));return t.element.setAttribute("placeholder",t.placeholder),e.default}catch(e){return e}}}return async()=>{try{const e=t.src+t.scope_query_string;e in ki||(ki[e]=(async()=>{const t=await fetch(e,{headers:{Accept:"application/json"}});return await t.json()})());const i=await ki[e];return t.element.setAttribute("placeholder",t.placeholder),i}catch(e){return e}}}set_config(){const e=this;return{name:"autocomplete",selector:"#"+e.element_id,wrapper:e.wrapper,debounce:100,data:{src:e.datas(e.env),keys:e.keys,cache:!0,filter:t=>e.filter_results(t)},searchEngine:(t,i)=>e.search_engine(t,i),placeHolder:e.placeholder,resultsList:{id:e.element_id+"-results-list",class:"results-list",noResults:!0,maxResults:e.max_results,tabSelect:!0,element:(t,i)=>e.build_results_list(t,i)},resultItem:{class:"result-item",element:(t,i)=>e.build_result_item(t,i),highlight:"highlight",selected:"selected"},submit:e.allow_submit,events:{input:{focus:()=>{e.element.value.length&&e.ac.start()}}}}}};class Si extends xt{set vendor(e){return this.vendor}p3_file_id=null;p3_project_id=(()=>window.oi_preload.p3_project_id||!1)();p3_player_type=(()=>window.oi_preload.p3_player_type||!1)();p3_sdk_version=(()=>window.oi_preload.p3_sdk_version||"1.10.7")();title=null;label=null;video=!1;autoload=null;is_mounted=!1;monitor=null;track=!0;get has_controls(){return this.has("controls")}get has_autoplay(){return this.has("autoplay")}get has_mute(){return this.has("mute")}get has_loop(){return this.has("loop")}has(e){const t=this.video.dataset.oiVideoHas||!1;if(t){return t.split(",").includes(e)}return!1}constructor(e){if(super(),this.id=e,this.video=document.getElementById(this.id),this.container_id=this.id+"-container",this.container=document.getElementById(this.container_id),this.video_id=this.video.dataset.oiVideoVendorVideoId,this.autoload=this.video.dataset.oiVideoAutoload,this.is_loaded=this.video.dataset.iframeIsLoaded,this.date_uploaded=this.video.dataset.oiVideoDateUploaded,this.p3_project_id=this.video.dataset.p3ProjectId||this.p3_project_id,this.p3_player_type=this.video.dataset.p3PlayerType||this.p3_player_type,this.p3_file_id=this.video.dataset.p3FileId||!1,this.is_background_video()&&(this.track=!1),this.pause_offscreen&&!this.is_background_video()){let e=this;window.addEventListener("oi.loaded.video."+this.id,(function(){zi.pause_offscreen.observe(Ut.video[e.id].video)}))}}is_background_video(){return!this.has_controls&&!!(this.has_autoplay&&this.has_loop&&this.has_mute)}init_monitor(){if(this.track){const e=this;this.monitor=setInterval(e.on_progress,2e3,e)}return this.monitor}clear_monitor(){if(this.monitor){const e=this;this.monitor=clearInterval(e.monitor)}return this.monitor}get is_dupe(){return this.video.dataset.oiVideoDupe>0}get pause_offscreen(){return!("video_pause_offscreen"in Rt&&!Rt.video_pause_offscreen)}p3(){return this.p3_file_id&&this.p3_project_id&&this.p3_player_type}p3_plugin(){if(!this.p3())return!1;const e=this.p3_file_id,t=this.p3_sdk_version,i=this.p3_project_id,o=this.p3_player_type,n="p3sdk-target-"+this.id;return`https://plugin.3playmedia.com/ajax.js?mf=${e}
6&p3sdk_version=${t}&p=${i}&pt=${o}&vembed=0&video_id=${this.video_id}&video_target=${this.id}&target=${n}`}async load_p3_plugin(){this.p3()&&(await Bt([this.p3_plugin()]),this.console.log("3Play plugin loaded."))}get_api(){const e=this;return new Promise(((i,o)=>{let n;if((t.oivideo_api_ready.has(e.vendor)||e.api_in_window())&&i(),t.oivideo_api_requested.has(e.vendor)){n=0;let t=setInterval((function(){e.api_in_window()?(clearInterval(t),i()):n>19?(clearInterval(t),o()):n+=1}),100)}else t.oivideo_api_requested.add(e.vendor),Bt([e.api_url]).then((()=>{n=0;let s=setInterval((function(){if(e.api_in_window()){t.oivideo_api_ready.add(e.vendor);let o=new Event("oivideo_"+e.vendor+"api_ready");window.dispatchEvent(o),e.console.log("oivideo_"+e.vendor+"api_ready"),clearInterval(s),i()}else n>19?(clearInterval(s),o()):n+=1}),100)}))}))}gtm_send(e,t){window.dataLayer=window.dataLayer||[],this.track&&"object"==typeof google_tag_manager&&window.dataLayer.push({event:this.vendor,eventCategory:"Engagement",eventAction:e||null,eventLabel:t||this.label})}hfa_send(){this.track&&window.hfaDataLayer&&window.hfaDataLayer.push({event:"oi-video"})}}class Oi extends Si{get vendor(){return"youtube"}api_url="https://www.youtube.com/iframe_api";api_in_window(){return"YT"in window}constructor(e){super(e),this.console.lib="oivideo",this.console.id=this.id,this.is_loaded?this.mount():this.video.dataset.src||(this.video.removeAttribute("onload"),this.video.setAttribute("onload","oi.video.onload_mount(this)")),Ut.video[this.id]=this}mount(){if(this.is_mounted)return;this.is_mounted="pending",this.console.log("Mounting begin"),!this.video.src&&this.video.dataset.src&&(this.video.src=this.video.dataset.src);let e=this;this.get_api().then((function(){e.load_p3_plugin(),e.player=new YT.Player(e.id,{events:{onReady:e.player_ready,onStateChange:e.state_change}}),e.is_mounted=!0,e.console.log("Mounting complete.")})).catch((()=>{e.mounted=!1}))}player_ready(e){const t=e.target.getIframe().id;if(!t)return zi.console.error("Iframe cannot be located in YouTube event object"),zi.console.error(e),!1;let i=Ut.video[t];i.player.duration=i.player.getDuration();const o=i.player.getVideoData();i.title=Mt.collapse_whitespace(o.title),i.label="YouTube | "+i.title+" | "+i.video_id,""==i.video.getAttribute("title")&&i.video.setAttribute("title",i.title),i.player.is_playing=i.has_autoplay;let n=new Event("oi.loaded.video."+i.id);window.dispatchEvent(n),i.console.log("dispatched: oi.loaded.video."+i.id)}state_change(e){const t=e.target.getIframe().id;if(!t)return zi.console.error("Iframe cannot be located in YouTube event object"),zi.console.error(e),!1;let i=Ut.video[t],o=e.data;if(o==YT.PlayerState.PLAYING){oi.video.last_played=i.id;const e=new Event("oivideo_play");window.dispatchEvent(e),i.console.log("dispatched: oivideo_play"),oi.video.pause(!1,i.id),i.gtm_send("Video Play",i.label),i.hfa_send(),i.init_monitor(),i.player.is_playing=!0}else if(o==YT.PlayerState.PAUSED){const e=new Event("oivideo_pause");window.dispatchEvent(e),i.console.log("dispatched: oivideo_pause"),i.clear_monitor(),i.player.is_playing=!1}}on_progress(e){if(e.player.getPlayerState()==YT.PlayerState.PLAYING){let t=e.player.getCurrentTime();t=parseFloat(t).toFixed(1),e.console.log("Checking progress: "+t+"s watched");const i=e.player.duration-e.player.getCurrentTime()<=1.5?1:(Math.floor(e.player.getCurrentTime()/e.player.duration*4)/4).toFixed(2);if((!e.player.lastPosition||i>e.player.lastPosition)&&(e.player.lastPosition=i,100*i!=0)){let t=100*i;const o=new Event("oivideo_progress_"+t);window.dispatchEvent(o),e.console.log("dispatched: oivideo_progress_"+t);let n="Video "+t+"% Played";e.gtm_send(n,e.label)}}}play(){return this.player.is_playing?0:(this.player.playVideo(),this.console.log("Played by oi.video."),1)}pause(){return this.player.is_playing?(this.player.pauseVideo(),this.console.log("Paused by oi.video."),1):0}mute(){return this.player.mute(),this.console.log("Muted by oi.video."),1}unmute(){return this.player.unMute(),this.console.log("Unmuted by oi.video."),1}}
6class Pi extends Si{get vendor(){return"vimeo"}api_url="https://player.vimeo.com/api/player.js";api_in_window(){return"Vimeo"in window}constructor(e){super(e),this.console.lib="oivideo",this.console.id=this.id,this.is_loaded?this.mount():this.video.dataset.src||(this.video.removeAttribute("onload"),this.video.setAttribute("onload","oi.video.onload_mount(this)")),Ut.video[this.id]=this}mount(){if(this.is_mounted)return;this.is_mounted="pending",this.console.log("Mounting begins"),!this.video.src&&this.video.dataset.src&&(this.video.src=this.video.dataset.src);let e=this;e.get_api().then((()=>{e.load_p3_plugin(),e.player=new Vimeo.Player(e.video),e.player_ready(),e.is_mounted=!0,e.console.log("Mounting complete.")})).catch((()=>{e.mounted=!1}))}player_ready(){let e=this;this.player.getDuration().then((function(t){e.player.duration=t,e.player.getVideoTitle().then((function(t){""==e.video.getAttribute("title")&&e.video.setAttribute("title",t),e.title=t,e.label="Vimeo | "+t+" | "+e.video_id})).catch((function(e){}))})).catch((function(e){})),this.has_autoplay&&this.do_action_onplay(),this.player.on("play",(function(){e.player.is_playing||e.do_action_onplay()})),this.player.on("pause",(function(){if(e.player.is_playing){const t=new Event("oivideo_pause");window.dispatchEvent(t),e.console.log("dispatched: oivideo_pause"),e.clear_monitor(),e.player.is_playing=!1}}));let t=new Event("oi.loaded.video."+e.id);window.dispatchEvent(t),e.console.log("dispatched: oi.loaded.video."+e.id)}do_action_onplay(){zi.last_played=this.id;const e=new Event("oivideo_play");window.dispatchEvent(e),this.console.log("dispatched: oivideo_play"),zi.pause(!1,this.id),this.gtm_send("Video Play",this.label),this.hfa_send(),this.init_monitor(),this.player.is_playing=!0}on_progress(e){let t=e.player;t.getCurrentTime().then((function(i){e.console.log("Checking progress: "+i+"s watched");const o=t.duration-i<=1.5?1:(Math.floor(i/t.duration*4)/4).toFixed(2);if((!t.lastPosition||o>t.lastPosition)&&(t.lastPosition=o,100*o!=0)){let t=100*o;const i=new Event("oivideo_progress_"+t);window.dispatchEvent(i),e.console.log("dispatched: oivideo_progress_"+t);const n="Video "+t+"% Played";e.gtm_send(n,e.label)}})).catch((function(t){e.console.error(t)}))}play(){return this.player.is_playing?0:(this.player.play(),this.console.log("Played by oi.video."),1)}pause(){return this.player.is_playing?(this.player.pause(),this.console.log("Paused by oi.video."),1):0}mute(){return this.player.setMuted(!0),this.console.log("Muted by oi.video."),1}unmute(){return this.player.setMuted(!1),this.console.log("Unmuted by oi.video."),1}}class Ai extends xt{_json={};get json(){return this._json}set json(e){}context="https://schema.org/";otype=null;script;constructor(e,t){if(super(),this.console.lib="oijsonld",this.console.id=e,this.script=document.createElement("script"),this.script.setAttribute("type","application/ld+json"),this.add_property("@context",this.context),this.otype=e,"video"==this.otype){this.add_property("@type","VideoObject");for(const[e,i]of Object.entries(t))this.add_property(e,i)}}remove_property(e){return!(e in["@content","@type"])&&delete this._json[e]}add_property(e,t){e||this.console.warn("Attribute add failed. No attribute name provided.");let i=t||"";if("duration"==e){if("string"!=typeof i&&"number"!=typeof i)return void this.console.warn("The "+e+" JSON-LD attr was not a string or a number as expected");const t=Mt.iso.make_duration(i);t?this._json.duration=t:this.console.warn("The duration JSON-LD attr was rejected for an unparsable value.")}else if(["uploadDate","datePublished"].includes(e)){if("string"!=typeof i)return void this.console.warn("The "+e+" JSON-LD attr was not a string as expected");if(!Mt.iso.is_date(i))return void this.console.warn("The "+e+" JSON-LD attr was rejected for an invalid date format.");this._json[e]=i}else this._json[e]=i}publish(){this.has_required()?(this.script.textContent=JSON.stringify(this.json),document.head.appendChild(this.script)):this.console.warn("JSON-LD not published. Missing required attributes.")}has_required(){let e=!1;return"video"==this.otype&&(e=this.validate_video()),e}validate_video(){const e=this;let t=!0;return["name","description","thumbnailUrl","uploadDate"].forEach((i=>{void 0===e.json[i]?(t=!1,this.console.warn("Required attr, "+i+", is undefined.")):e.json[i]||(t=!1,this.console.warn("Required attr, "+i+", is false."))})),t}}
6class Ti extends Si{get vendor(){return"native"}constructor(e){super(e),this.console.lib="oivideo",this.console.id=this.id,this.is_loaded=!0,this.mount(),Ut.video[this.id]=this}mount(){this.console.log("Mounting begin"),this.player=this.video,this.is_mounted=!0,this.console.log("Mounting complete."),this.player_ready()}player_ready(){if(this.player.is_playing=!this.player.paused,this.title=this.video.getAttribute("title"),!this.title){const e=this.video.querySelector("source");if(!!e&&e.getAttribute("src")){const e=this.video.src.split("/");this.title=e[e.length-1],this.video.setAttribute("title",this.title)}}this.label="Native | "+this.title+" | "+this.video_id;const e=this;this.video.addEventListener("play",(t=>{zi.last_played=e.id;const i=new Event("oivideo_play");window.dispatchEvent(i),e.console.log("dispatched: oivideo_play"),zi.pause(!1,e.id),e.gtm_send("Video Play",e.label),e.hfa_send(),e.init_monitor(),e.player.is_playing=!0})),this.video.addEventListener("pause",(t=>{const i=new Event("oivideo_pause");window.dispatchEvent(i),e.console.log("dispatched: oivideo_pause"),e.clear_monitor(),e.player.is_playing=!1})),this.video.addEventListener("loadedmetadata",(t=>{e.is_dupe||e.is_background_video()||e.inject_jsonld(e);let i=new Event("oi.loaded.video."+e.id);window.dispatchEvent(i),e.console.log("dispatched: oi.loaded.video."+e.id)}))}on_progress(e){if(!e.player.paused){let t=e.player.currentTime;t=parseFloat(t).toFixed(1),e.console.log("Checking progress: "+t+"s watched");const i=e.player.duration-e.player.currentTime<=1.5?1:(Math.floor(e.player.currentTime/e.player.duration*4)/4).toFixed(2);if((!e.player.lastPosition||i>e.player.lastPosition)&&(e.player.lastPosition=i,100*i!=0)){let t=100*i;const o=new Event("oivideo_progress_"+t);window.dispatchEvent(o),e.console.log("dispatched: oivideo_progress_"+t);let n="Video "+t+"% Played";e.gtm_send(n,e.label)}}}inject_jsonld(e){const t={};t.name=e.title,t.description=e.title;const i=e.video.getAttribute("poster");i&&(t.thumbnailUrl=i);const o=e.video.querySelector("source"),n=!!o&&o.getAttribute("src");n&&(t.contentUrl=n),t.uploadDate=e.date_uploaded,t.duration=e.video.duration;new Ai("video",t).publish()}play(){return this.player.paused?(this.player.play(),this.console.log("Played by oi.video."),1):0}pause(){return this.player.paused?0:(this.player.pause(),this.console.log("Paused by oi.video."),1)}mute(){return this.player.muted=!0,this.console.log("Muted by oi.video."),1}unmute(){return this.player.muted=!1,this.console.log("Unmuted by oi.video."),1}}class Ci extends Si{get vendor(){return"acquia"}constructor(e){super(e),this.console.lib="oivideo",this.console.id=this.id,this.title=this.video.getAttribute("title")||this.video_id,this.label="Acquia | "+this.title+" | "+this.video_id,Ut.video[this.id]=this}mount(){this.is_loaded=!0,this.is_mounted=!0,this.console.log("Mounting complete.");const e=new Event("oi.loaded.video."+this.id);window.dispatchEvent(e),this.console.log("dispatched: oi.loaded.video."+this.id)}play(){return 0}pause(){return 0}mute(){return 1}unmute(){return 1}}class Ii extends xt{last_played=!1;get is_playing(){return!!this.last_played&&Ut.video[this.last_played].player.is_playing}constructor(){super(),this.console.lib="oivideo",this.console.id="all",this.added_video.observe(document.body,{subtree:!0,childList:!0}),this.autoload()}autoload(){let e=document.querySelectorAll("[data-oi-video-autoload]");if(e.length){const i={youtube:[],vimeo:[],native:[],acquia:[]};e.forEach((e=>{if(e.id)if(t.oivideo_id_log.has(e.id)){document.querySelectorAll("#"+e.id).forEach(((e,o)=>{if(!t.oivideo_element_log.has(e)){const n=e.id+"_"+o,s=e.closest("#"+e.id+"-container");s.id=n+"-container",s.classList.remove("oi-video-uid-"+e.id),s.classList.add("oi-video-uid-"+n),e.id=n,e.dataset.oiVideoDupe=1,t.oivideo_id_log.add(e.id),t.oivideo_element_log.add(e),i[e.dataset.oiVideoVendor].push(e.id)}}))}else t.oivideo_id_log.add(e.id),t.oivideo_element_log.add(e),i[e.dataset.oiVideoVendor].push(e.id)}));for(const e in i)i[e].forEach((t=>{"youtube"==e?new Oi(t):"vimeo"==e?new Pi(t):"native"==e?new Ti(t):"acquia"==e&&new Ci(t)}))}}mount(e){let t=!1;if("string"==typeof e?t=document.getElementById(e):"object"==typeof e&&e.tagName&&"IFRAME"==e.tagName&&(t=e),!t)return!1;Ut.video[t.id].mount()}onload_mount(e){this.console.log("["+e.id+"] Mounting from iframe onload event."),this.mount(e)}added_video=(()=>new MutationObserver((function(e){e.forEach((function(e){e.addedNodes.forEac
6h((e=>{e.classList&&(e.classList.contains("oi-video")||e.querySelector(".oi-video")&&e.querySelector("[data-oi-video-autoload]"))&&zi.autoload()}))}))})))();pause_offscreen=(()=>new IntersectionObserver((function(e){for(let t=0;t<e.length;t++)if(!e[t].isIntersecting){let i=e[t].target.id,o=Ut.video[i].player||!1;o&&o.is_playing&&(zi.pause(i),Ut.video[i].console.log("Paused due to leaving the viewport."))}}),{threshold:[.25]}))();pause(e,t){if(e){let t=Ut.video[e];t?t.pause():this.console.warn("There is no loaded oi.video with the id of "+e+".")}else{let e=0;for(const[i,o]of Object.entries(Ut.video))if(o.player&&o.player.is_playing&&i!=t){e+=o.pause()}this.console.log(e+" video(s) paused by oi.video.")}}play(e){if(e){let t=Ut.video[e];t?t.play():this.console.warn("There is no loaded oi.video with the id of "+e+".")}else{let e=Object.keys(Ut.video);1==e.length?Ut.video[e[0]].play():e.length>1?this.last_played&&Ut.video[this.last_played]?Ut.video[this.last_played].play():(this.console.warn("Unable to identify which video should be played."),this.console.warn("No 'last_played' video exists, and playing of multiple video(s) is disabled."),this.console.warn("Include the id of the video you with to play. Ex: oi.video.play('_video_id_here_')")):this.console.warn("No loaded videos are available to play.")}}toggle(e){let t=!!this.last_played&&Ut.video[this.last_played];e&&(t=Ut.video[e]),t?t.player.is_playing?t.pause():t.play():this.console.warn("There is no loaded oi.video with the id of "+e+".")}mute(e){if(e){let t=Ut.video[e];t?t.mute():this.console.warn("mute() was called on oivideo id. "+e+". There is no loaded oi.video with that id.")}else this.last_played?Ut.video[this.last_played].mute():this.console.warn("No loaded videos are available to mute.")}unmute(e){if(e){let t=Ut.video[e];t?t.unmute():this.console.warn("unmute() was called on oivideo id. "+e+". There is no loaded oi.video with that id.")}else this.last_played?Ut.video[this.last_played].unmute():this.console.warn("No loaded videos are available to unmute.")}}const zi=new Ii;class ji{valid=null;valid_class="is-valid";invalid_class="is-invalid";disabled_class="is-disabled";display_html5_validation=!0;sibling_index=null;element;console;constructor(e,t,i){this.element=e,this.console=i,Object.assign(this,t),this.do_label_accessibility(),this.has_required_attribute()&&(this.element.addEventListener("invalid",(()=>{this.valid=!1,this.update_ui()})),this.element.addEventListener("blur",(e=>{this.valid=e.currentTarget.checkValidity(),this.update_ui()})))}get id(){return this.element.getAttribute("id")}get name(){return this.element.getAttribute("name")}get value(){return this.element.value}set value(e){this.element.value=e}get tag(){return this.element.tagName.toLowerCase()}get type(){return this.element.getAttribute("type")||this.tag}get form_group(){return this.element.closest(".form-group")}get form_group_message(){return this.form_group?this.form_group.querySelector(".form-group-message"):null}get label(){return window.document.querySelector("label[for='"+this.id+"']")}do_label_accessibility(){if(this.aria_label)return!0;if(this.label&&this.label.textContent)return Mt.style.is_hidden(this.label)&&(this.aria_label=this.label.textContent),!0;if(this.aria_labelledby&&this.aria_labelledby.textContent)return Mt.style.is_hidden(this.aria_labelledby)&&(this.aria_label=this.aria_labelledby.textContent),!0;if(this.placeholder)return this.aria_label=this.placeholder,!0;if(this.name){const e=/_/i;return this.aria_label=this.name.replace(e," "),!0}return!1}get placeholder(){return this.element.getAttribute("placeholder")||null}set placeholder(e){null===e?this.element.removeAttribute("placeholder"):this.element.setAttribute("placeholder",e)}get aria_label(){return this.element.getAttribute("aria-label")||null}set aria_label(e){null===e?this.element.removeAttribute("aria-label"):this.element.setAttribute("aria-label",e)}get aria_labelledby(){const e=this.element.getAttribute("aria-labelledby");return e&&document.getElementById(e)||null}has_required_attribute(){return null!==this.element.getAttribute("required")}has_required_class(){return!(!this.element.classList||!this.element.classList.contains("required"))||!!(this.form_group&&this.form_group.classList&&this.form_group.classList.contains("required"))}is_required(){return this.has_required_attribute()||this.has_required_class()}is_hidden(){return"hidden"==this.type}update_ui(){null===this.valid?this.style_null():1==this.valid?this.style_val
6id():this.style_invalid()}style_null(){const e=this;[this.element,this.form_group,this.form_group_message].forEach((t=>{t&&(t.classList.remove(e.invalid_class),t.classList.remove(e.valid_class))}))}style_valid(){const e=this;[this.element,this.form_group,this.form_group_message].forEach((t=>{t&&(t.classList.remove(e.invalid_class),t.classList.add(e.valid_class))}))}style_invalid(){const e=this;[this.element,this.form_group,this.form_group_message].forEach((t=>{t&&(t.classList.remove(e.valid_class),t.classList.add(e.invalid_class))}))}style_disabled(){const e=this;[this.element,this.form_group,this.form_group_message].forEach((t=>{t&&t.classList.add(e.disabled_class)}))}style_enabled(){const e=this;[this.element,this.form_group,this.form_group_message].forEach((t=>{t&&t.classList.remove(e.disabled_class)}))}set_message(e,t){t=void 0!==t&&t,this.valid=t,this.form_group_message&&(this.form_group_message.innerHTML=Array.isArray(e)?e.join(","):e),this.update_ui()}clear_message(e){e=void 0===e?void 0:e,this.set_message("",e)}disabled(e){e?(this.element.toggleAttribute("disabled",!0),this.style_disabled()):(this.element.toggleAttribute("disabled",!1),this.style_enabled())}reset_ui(){this.clear_message(),this.style_null()}}const Mi=(new $t).addProperty({name:"debug",type:"legacy"}).addProperty({name:"oicheck",type:"legacy"}).addProperty({name:"reset_on_valid",type:"legacy"}).addProperty({name:"scroll_target_id",type:"legacy"}).addProperty({name:"scroll_target_offset_y",type:"legacy"}).build();class Ri extends xt{constructor(e,t){if(super(),this.form_id=e,this.console.lib="oiform",this.console.id=this.form_id,this.oi_event=this.form.dataset.oiEvent||null,this.is_autoload()){const e=Mi.readAttributes(this.form,!0);Object.assign(this,e)}else t&&Object.assign(this,t);const i=[];this.action||i.push("Form is missing action attribute.\n"),this.button||i.push('Submit button does not have type="submit" attribute.\n');const o=document.querySelectorAll("#"+this.form_message_id);if(0===o.length?i.push('Missing element with id="'+this.form_message_id+'"\n'):o.length>1&&i.push("There are "+o.length+' elements with id="'+this.form_message_id+'" when only one is allowed.\n'),i.length&&this.debug){this.form.style.border="5px dotted red";let e=document.createElement("div");e.style.backgroundColor="#ffb8b8",e.classList.add("form-row","p-4");let t=document.createElement("h3");t.style.color="red",t.innerHTML="[oilib] cRItiCaL iSSuEs";let o=document.createElement("div");o.classList.add("col-12"),o.innerHTML="<ul><li>"+i.join("</li><li>")+"</li></ul>",e.append(o),e.prepend(t),this.form.prepend(e);let n="[oiform]["+this.form_id+"] Critical Issues:\n> ";throw window.alert(n+i.join("> ")),new Error(i[0])}const n=Rt.recaptcha_enterprise_key||!1;if(n){this.recaptchaEnabled=!0,this.recaptchaEnterpriseKey=n;const e=`https://www.google.com/recaptcha/enterprise.js?render=${n}`;this.recaptchaLoaded=Bt([e]),this.recaptchaLoaded.then((()=>{this.console.log("recaptcha enterprise JS loaded")}))}else this.recaptchaEnabled=!1,this.recaptchaLoaded=null,this.recaptchaEnterpriseKey=null}oicheck=!0;ga4_client_id=!0;recaptchaEnabled;recaptchaEnterpriseKey;recaptchaLoaded;valid_class="is-valid";invalid_class="is-invalid";disabled_class="is-disabled";autofill_fields=["page_url"];reset_on_valid=!0;is_autoload(){return this.form.dataset.oiFormAutoload&&"false"!=this.form.dataset.oiFormAutoload.toLowerCase()}autoloadable=["debug","oicheck","reset_on_valid","scroll_target_id","scroll_target_offset_y","ga4_client_id"];get id(){return this.form_id}set id(e){}_form_id;get form_id(){return this._form_id}set form_id(e){this._form_id||(this._form_id=e,this.console.id=e)}get form(){return document.getElementById(this.form_id)}get action(){return this.form.getAttribute("action")}get method(){const e=this.form.getAttribute("method");return e?e.toLowerCase():"post"}_oi_event=null;get oi_event(){return this._oi_event}set oi_event(e){this._oi_event=e}button_inner={ready:"",pending:'<i class="fa fa-spinner fa-spin"></i>'};get button(){return this.form.querySelector('button[type="submit"]')}fields={};get form_message_id(){return this.id+"_message"}set form_message_id(e){this.form_message_id=e}get form_message(){return document.getElementById(this.form_message_id)}set_form_message(e){this.form_message.innerHTML=e,this.form_message.style.display="block"}clear_form_message(){this.form_message.innerHTML="",this.form_message.style.display="none"}_scroll_target_offset_y=0;get scroll_target_offset_y(){return this._scroll_target_offset_y}set scroll_target_offset_y(e){this._scroll_target_offset_y=e?parseInt(e.toString()):0}_scroll_target_id=null;get scroll_target_id(){return this._scroll_target_id||this.form_message_id}set scroll_target_id(e){this._scroll_target_id=e}get scroll_target(){return document.getElementById(this.scroll_target_id)}reset_ui(){this.form.classList.remove(this.valid_class),this.form.classList.remove(this.invalid_class),this.clear_form_message();for(const[e,t]of Object.entries(this.fields))this.fields[e].reset_ui()}get_required_fields(e){const t=[];for(const[i,o]of Object.entries(this.fields))o.is_required()&&(e?t.push(i):t.push(o));return t}progress_audit(){const e=this.get_required_fields(),t={total:e.length,valid:0,invalid:0,incomplete:0};let i="";for(let n=0;n<e.length;n++){const o=e[n].valid;i=i+e[n].name+" "+(o?"is":"is not")+" valid. ",!1===o?t.invalid++:!0===o?t.valid++:t.incomplete++}const o=0==t.valid?0:t.valid/t.total*100;this.console.log(i),this.console.log(t),this.console.log("Completion: "+o+"%"),"progress"in this&&(this.progress=o)}gtm_events=[];hfa_events=[];get_params_from_dataset(){const e={},t="oiParam_";for(const i in this.form.dataset)if(i.startsWith(t)){e[i.substring(8)]=this.form.dataset[i]}return e}push_gtm_events(){void 0!==window.dataLayer&&(this.oi_event&&window.dataLayer.push({event:this.oi_event}
6),this.gtm_events.length&&this.gtm_events.forEach((e=>{window.dataLayer.push({event:e})})))}push_hfa_events(){void 0!==window.hfaDataLayer&&(this.oi_event&&window.hfaDataLayer.push({event:this.oi_event,...this.get_params_from_dataset()}),this.hfa_events.length&&this.hfa_events.forEach((e=>{window.hfaDataLayer.push({event:e})})))}autofill(e){"page_url"==e&&(this.fields.page_url.value||(this.fields.page_url.value=window.location.origin+window.location.pathname,this.console.log("The page_url input was autofilled with: "+this.fields.page_url.value)))}async getGoogleRecaptchaToken(){if(await this.recaptchaLoaded,await new Promise(((e,t)=>{grecaptcha.enterprise.ready(e)})),!this.recaptchaEnterpriseKey)throw new Error("reCAPTCHA enabled but no recaptcha_enterprise_key present. Did you add it to oi_preload?");const e=this.form_id.replace(/[^a-zA-Z_]/g,"_");return await grecaptcha.enterprise.execute(this.recaptchaEnterpriseKey,{action:`form_submission_${e}`})}}const Di=["min","max"];class Ni{inputs={};valid=null;valid_class="is-valid";invalid_class="is-invalid";disabled_class="is-disabled";display_html5_validation=!1;element;console;constructor(e,t,i){this.element=e,this.console=i,Object.assign(this,t),this.is_disabled()?this.style_disabled():Mt.style.is_hidden(this.element)||(this.legend?Mt.style.is_hidden(this.legend)&&this.console.error("["+this.element.id+"] The "+this.name+" <legend> attribute is inaccessibly hidden."):this.console.error("["+this.element.id+"] The "+this.name+" fieldset is missing a <legend> attribute."));const o=this;if(this.element.querySelectorAll("input").forEach(((e,i)=>{const n=new ji(e,t,this.console),s=n.sibling_index||i;o.inputs[s]=n})),this.is_required()){this.element.addEventListener("invalid",(function(){o.valid=!1,o.post_validity_eval_actions()}));for(const[e,t]of Object.entries(this.inputs))this.add_input_listeners(t)}}get id(){return this.element.getAttribute("id")}get name(){return this.element.getAttribute("name")}get value(){const e=this.element.closest("form");return new FormData(e).getAll(this.name)}set value(e){const t=Array.isArray(e)?e:[e],i=[];t.forEach((e=>{i.push(e.toString())}));for(const[o,n]of Object.entries(this.inputs))i.includes(n.value)?n.element.checked=!0:n.element.checked=!1}get type(){for(const[e,t]of Object.entries(this.inputs))return t.element.getAttribute("type");return null}get form_group_message(){return this.element.querySelector(".form-group-message")||null}get legend(){return this.element.querySelector("legend")||null}get_first_input(){for(const[e,t]of Object.entries(this.inputs))if(!Mt.style.is_hidden(t.element)&&null===t.element.getAttribute("disabled")&&!t.element.classList.contains(t.disabled_class))return t;return null}add_input_listeners(e){if(!e||!e.element)return;const t=this;e.element.addEventListener("change",(function(e){t.valid=t.validity_eval(),t.valid?t.post_validity_eval_actions():("min"==t.custom_validity_type&&(e.currentTarget.checked||t.value.length==t.custom_validity_value-1&&(t.valid=!1,t.post_validity_eval_actions())),"max"==t.custom_validity_type&&e.currentTarget.checked&&t.value.length==t.custom_validity_value+1&&(t.valid=!1,t.post_validity_eval_actions()))})),e.element.addEventListener("blur",(function(){t.element.matches(":focus-within:not(:focus)")||(t.valid=t.validity_eval(),t.post_validity_eval_actions())}))}incomplete_validity_eval(){null===this.valid&&(this.valid=this.validity_eval()),this.post_validity_eval_actions()}get has_custom_validity(){return this.custom_validity_type&&this.custom_validity_value}get custom_validity_type(){const e=this.element.dataset.customValidityType||null;return e?(t=e,Di.includes(t)?e:null):null;var t}get custom_validity_value(){const e=this.element.dataset.customValidityValue||null;return this.custom_validity_type&&e?parseInt(e):null}validity_eval(){const e=this.element.closest("form"),t=new FormData(e).getAll(this.name);return"min"==this.custom_validity_type?t.length>=this.custom_validity_value:"max"==this.custom_validity_type?t.length<=this.custom_validity_value:t.length>0}get invalid_message(){if(!this.is_required())return"";if(this.has_custom_validity){const e=this.custom_validity_value&&this.custom_validity_value>1?"items":"item";return"min"==this.custom_validity_type?"Please select at least "+this.custom_validity_value+" "+e:"max"==this.custom_validity_type?"Please select no more than "+this.custom_validity_value+" "+e:""}return"Please make a selection."}has_required_class(){return!(!this.element.classList||!this.element.classList.contains("required"))}is_required(){return this.has_required_class()||this.has_custom_validity}is_disabled(){return null!==this.element.getAttribute("disabled")}post_validity_eval_actions(){const e=this.get_first_input();!0===this.valid?(this.clear_message(),e&&e.element.setCustomValidity("")):!1===this.valid&&(this.set_message(this.invalid_message),e&&(e.element.setCustomValidity(this.invalid_message),this.display_html5_validation&&e.element.reportValidity())),this.update_ui()}update_ui(){null===this.valid?this.style_null():1==this.valid?this.style_val
6id():this.style_invalid()}style_null(){const e=this;[this.element,this.form_group_message].forEach((t=>{t&&(t.classList.remove(e.invalid_class),t.classList.remove(e.valid_class))}))}style_valid(){const e=this;[this.element,this.form_group_message].forEach((t=>{t&&(t.classList.remove(e.invalid_class),t.classList.add(e.valid_class))}))}style_invalid(){const e=this;[this.element,this.form_group_message].forEach((t=>{t&&(t.classList.remove(e.valid_class),t.classList.add(e.invalid_class))}))}style_disabled(){const e=this;[this.element,this.form_group_message].forEach((t=>{t&&t.classList.add(e.disabled_class)}))}style_enabled(){const e=this;[this.element,this.form_group_message].forEach((t=>{t&&t.classList.remove(e.disabled_class)}))}set_message(e,t){this.valid=Boolean(t),this.form_group_message&&(this.form_group_message.innerHTML=Array.isArray(e)?e.join(","):e),this.update_ui()}clear_message(){this.set_message("",!0)}disabled(e){e?(this.element.toggleAttribute("disabled",!0),this.style_disabled()):(this.element.toggleAttribute("disabled",!1),this.style_enabled())}reset_ui(){this.clear_message(),this.style_null()}}class qi extends Ri{kill=!1;kill_once=!1;constructor(e,t){super(e,t),this.button_inner.ready=this.button.innerHTML;const i={valid_class:this.valid_class,invalid_class:this.invalid_class,disabled_class:this.disabled_class};for(const[r,a]of Object.entries(this.form.elements)){let e;const t=Number.parseInt(r,10);if("FIELDSET"==a.tagName){e=a.getAttribute("name");const t=new Ni(a,i,this.console);this.fields[e]=t}else if(t<this.form.elements.length&&(e=a.getAttribute("name"),!this.fields[e])){const t=new ji(a,i,this.console);this.fields[e]=t}this.autofill_fields.includes(e)&&this.autofill(e)}var o=this;const n=this.get_required_fields();n.forEach((e=>{if(e instanceof Ni)for(const t of Array.from(e.element.elements))t.addEventListener("blur",(function(){o.progress_audit()}));else e.element.addEventListener("blur",(function(){o.progress_audit()}))})),this.button.addEventListener("click",(()=>{n.forEach((e=>{e instanceof Ni&&e.incomplete_validity_eval()}))})),this._bind_all(),Ut.form[this.id]=this;const s=new Event("oi.loaded.form."+this.id);window.dispatchEvent(s)}addProgressListener(e,t){}preSubmit(){}addFormData={};addSuccessAction(e,t){}addErrorAction(e){}_progress=0;set progress(e){const t=this._progress;this._progress=e,e!=t&&(this.console.log("Progress has changed to: "+e),this.progressListener(e,t))}get progress(){return this._progress}progressListener(e,t){this.toggle_button_ui(),"function"==typeof this.addProgressListener&&this.addProgressListener(e,t)}toggle_button_ui(){this.progress>199&&this.progress<250?(this.button.toggleAttribute("disabled",!0),this.button.innerHTML=this.button_inner.pending):(this.button.toggleAttribute("disabled",!1),this.button.innerHTML=this.button_inner.ready)}_bind_all(){const e=this;this.form.addEventListener("submit",(t=>{e.submit_bind(t)}))}submit_bind=e=>{e.preventDefault(),this.preSubmit(),this.do_request()};reset(){this.reset_on_valid&&this.form.reset(),this.progress=0}async do_request(){if(this.kill)return this.console.error("All submissions halted by kill property. Set this.kill=false to allow, or use this.kill_once instead."),this.progress=150,!1;if(this.kill_once)return this.console.error("Submission halted by kill_once property."),this.progress=150,this.kill_once=!1,!1;this.progress=200;const e=new FormData(this.form);if(this.oicheck&&e.append("oicheck",t.nonce),this.ga4_client_id&&t.ga4_client_id&&e.set("ga4_client_id",t.ga4_client_id),this.recaptchaEnabled){const t=await this.getGoogleRecaptchaToken();e.append("oicaptcha",t)}if(this.addFormData)for(const[t,n]of Object.entries(this.addFormData))e.append(t,n);const i=this;try{const t=await Lt[this.method](this.action,e);i.console.log(t),i.reset_ui(),i.progress=300,i.handle_valid_response(t),i.push_gtm_events(),i.push_hfa_events(),i.addSuccessAction(t,e),i.scroll_to_message()}catch(o){o&&"object"==typeof o&&"response"in o?(i.console.error(o.response),i.progress=250,i.handle_invalid_response(o),i.scroll_to_message(),i.addErrorAction(o)):o&&"object"==typeof o&&"request"in o?i.console.error(o.request):i.console.error("Error",o)}}handle_invalid_response(e){this.form.classList.add(this.invalid_class);const t=e.response.data.errors;this.console.error("errors:",Object.entries(t));for(const[i,o]of Object.entries(t))void 0!==this.fields[i]&&this.fields[i].set_message(t[i],!1);e.response.data.data.content&&this.set_form_message(e.response.data.data.content)}
6handle_valid_response(e){if(this.form.classList.add(this.valid_class),e.data.data["oi-event-override"]){const t=e.data.data["oi-event-override"];this.oi_event=t}if(e.data.data["oi-event-add"]){const t=e.data.data["oi-event-add"];this.oi_event!=t&&(this.gtm_events.includes(t)||this.gtm_events.push(t),this.hfa_events.includes(t)||this.hfa_events.push(t))}e.data.data.content&&this.set_form_message(e.data.data.content),this.reset()}scroll_to_message(){if(this.scroll_target)if(this.scroll_target_offset_y){const e=this.scroll_target.getBoundingClientRect().top+window.scrollY+this.scroll_target_offset_y;window.scrollTo({top:e,behavior:"smooth"})}else this.scroll_target.scrollIntoView({behavior:"smooth"});else this.console.error("Cannot find scroll_target, element.id = "+this.scroll_target_id)}}class Fi extends Ri{constructor(e,t){super(e,t),this.button_inner.ready=this.button.innerHTML,this.bind_submit(),Ut.form[this.id]=this;const i=new Event("oi.loaded.form."+this.id);window.dispatchEvent(i)}preSubmit(){}_state="ready";get state(){return this._state}set state(e){const t=this._state;this._state=e,e!=t&&this.stateListener(e,t)}stateListener(e,t){this.toggle_button_ui()}toggle_button_ui(){"pending"==this.state?(this.button.setAttribute("disabled","disabled"),this.button.innerHTML=this.button_inner.pending):(this.button.setAttribute("disabled",!1),this.button.removeAttribute("disabled"),this.button.innerHTML=this.button_inner.ready)}bind_submit(){this.form.addEventListener("submit",(e=>{e.preventDefault(),this.state="pending",this.preSubmit(),this.form.submit()}))}reset(){this.form.reset()}}let Bi;!function(e){e.ajax=class extends qi{};e.conventional=class extends Fi{};e.field=class extends ji{}}(Bi||(Bi={}));const Ui={ajax:qi,conventional:Fi},Hi={load(){let e=document.querySelectorAll("form[data-oi-form-autoload]");e.length&&e.forEach((function(e){if(Ut.form[e.id])window.console.error("[oiform] There are multiple forms using the id: "+e.id+". Rename to make each unique. Element IDs are required to be unique within a page.");else{const t=e.dataset.oiFormAutoload,i=e.dataset.debug&&"true"==e.dataset.debug.toLowerCase();Ui[t]&&((Rt.debug||i)&&window.addEventListener("oi.loaded.form."+e.id,(function(){Ut.form[e.id].console.log("Autoloaded")})),new Ui[t](e.id))}}))}},Wi={load(){let e=document.querySelectorAll("div[data-oi-isp-autoload]");e.length&&e.forEach((function(e){if("false"!=e.dataset.oiIspAutoload?.toLowerCase())if(Ut.isp[e.id])window.console.error("[oiisp] There are multiple ISPs using the id: "+e.id+". Rename to make each unique. Element IDs are required to be unique within a page.");else{const t=e.dataset.debug&&"true"==e.dataset.debug.toLowerCase();(Rt.debug||t)&&window.addEventListener("oi.loaded.isp."+e.id,(function(){Ut.isp[e.id].console.log("Autoloaded")})),new pi(e.id)}}))}},$i=Wi,Vi={load(){let e=document.querySelectorAll("iframe[data-oi-defer-src]");e.length&&e.forEach((e=>{if(Ut.defer[e.id])window.console.error("[oidefer] There are multiple elements using the id: "+e.id+". Unique id's are a requirement of valid HTML.");else{Rt.debug&&window.addEventListener("oi.loaded.defer."+e.id,(function(){Ut.defer[e.id].console.log("dispatched: oi.loaded.defer."+e.id)}));try{new Ht(e.id)}catch(t){console.error(t)}}}))}},Ji=Vi;function Gi(e){switch(e){case"single":case"multi":return e;default:throw new Error("Unknown value passed to data-oi-map-autoload. Expected 'single' or 'multi")}}const Yi={allow:["single","multi"],load(){let e=document.querySelectorAll("div[data-oi-map-autoload][data-nearby='true']");e.length&&e.forEach((function(e){if(Ut.map[e.id])window.console.error("[oimap] There are multiple map divs using the id: "+e.id+". Rename to make each to make them unique. Element IDs are required to be unique within a page.");else{const t=Gi(e.dataset.oiMapAutoload),i=e.dataset.debug&&"true"==e.dataset.debug.toLowerCase();ai[t]&&((Rt.debug||i)&&window.addEventListener("oi.loaded.map."+e.id,(function(){Ut.map[e.id].console.log("Autoloaded")})),new ai[t](e.id,{}))}}));let t=document.querySelectorAll("div[data-oi-map-autoload]:not([data-nearby='true'])");t.length&&t.forEach((function(e){if(Ut.map[e.id])window.console.error("[oiform] There are multiple map divs using the id: "+e.id+". Rename to make each to make them unique. Element IDs are required to be unique within a page.");else{const t=Gi(e.dataset.oiMapAutoload),i=e.dataset.debug&&"true"==e.dataset.debug.toLowerCase();ai[t]&&((Rt.debug||i)&&window.addEventListener("oi.loaded.map."+e.id,(function(){Ut.map[e.id].c
6onsole.log("Autoloaded")})),new ai[t](e.id,{}))}}))}};const Zi={autocomplete:{load(){let e=document.querySelectorAll("input[data-oi-autocomplete-autoload]");e.length&&e.forEach((function(e){if("false"!=e.dataset.oiAutocompleteAutoload.toLowerCase())if(Ut.autocomplete[e.id])window.console.error("[autocomplete] There are multiple Autocompletes using the id: "+e.id+". Rename to make each unique. Element IDs are required to be unique within a page.");else{const t=e.dataset.debug&&"true"==e.dataset.debug.toLowerCase();(Rt.debug||t)&&window.addEventListener("oi.loaded.autocomplete."+e.id,(function(){Ut.autocomplete[e.id].console.log("Autoloaded")})),new xi(e.id)}}))}},defer:Ji,form:Hi,isp:$i,map:Yi,user:{async load(){try{let e;if("undefined"!=typeof userFetch)e=userFetch;else{if("undefined"==typeof initialUserFetch)throw Error("Not userFetch or initialUserFetch present.");e=initialUserFetch}const t=await e;t.oiuser_init&&new bi(t)}catch(e){console.log(e)}},async reload(){const e=await fetchRetailUser();return e.oiuser_init?new bi(e):null}},ga4_client_id_autoloader:{async load(){await async function(e){if(void 0===e&&(e=2e3),t.ga4_client_id)return t.ga4_client_id;"undefined"!=typeof ganalyticsLoaded&&await ganalyticsLoaded;const i=Date.now();for(;Date.now()-i<e;){const e=Mt.cookie.get("_ga");if(e&&e.value)return t.ga4_client_id=e.value.split(".").slice(-2).join("."),t.ga4_client_id;await new Promise(((e,t)=>setTimeout(e,100)))}return null}()}}},Ki={LoadedBatch:class{static ITEMS_LOADED_EVENT="oiItemsLoaded";controller=null;done;constructor(e){this.done=this.start(e).catch(console.error)}async start(e){let{items:t,filterType:i="",form:o,loadAmount:n=6,url:s="/xhr/filter/load-more/",beforeLoad:r,afterLoad:a,beforeBatchLoad:l,afterBatchLoad:c}=e;const d=[...t];if(!d.length)return;const h=Number.isInteger(n)&&n>0&&n<=18?n:6;this.controller=new AbortController;const u=this.controller,m=()=>u.abort();window.addEventListener("beforeunload",m),r&&await r();try{for(;d.length;)try{l&&await l();const e=d.slice(0,h),t=new FormData;t.append("remaining",JSON.stringify(e)),t.append("filter_type",i);const n=await Lt({method:"post",url:s,data:t,headers:{"Content-Type":"multipart/form-data"},signal:u.signal});d.splice(0,h);const r=window.oi?.filter?.forms;if(r){const t=o??"unknown";r[t]||(r[t]={batches:[]}),r[t].batches.push({items:e,response:n,remaining:d.length})}c&&await c(n)}catch(p){if("AbortError"===p.name||"ERR_CANCELED"===p.code)return;console.error("Error loading batch:",p);break}}finally{window.removeEventListener("beforeunload",m),this.controller=null}a&&await a()}abort(){this.controller&&(this.controller.abort(),this.controller=null)}},forms:{}};function Xi(){return Zi.user.reload()}document.addEventListener("DOMContentLoaded",(()=>{window.onYouTubeIframeAPIReady=function(){t.oivideo_api_ready.add("youtube");let e=new Event("oivideo_youtubeapi_ready");window.dispatchEvent(e),zi.console.log("dispatched: oivideo_youtubeapi_ready")},Zi.ga4_client_id_autoloader.load(),Zi.user.load(),Zi.form.load(),Zi.isp.load(),Zi.map.load(),Zi.autocomplete.load(),Zi.defer.load();const e=new Event("oilib_loaded");window.dispatchEvent(e)}))})(),window.oi=r})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.