https://www.visitnc.com/modules/custom/visitnc_search/assets/dist/950.1179dc4b4afcda5d85d3.bundle.js
1"use strict";(self.webpackChunkcategory_listing=self.webpackChunkcategory_listing||[]).push([[950],{9950:(e,t,n)=>{n.r(t),n.d(t,{default:()=>q});var r,a=n(6540),i=n(7923),o=n(5660),l=n(3434),c=n(4414),s=n(5848),u=n(6572),d=(n(7819),n(9923)),f=n(8626),m=n(6067),p=n.n(m);function y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return g(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var v=(0,c.p)("UTLO2P1INL","9a36c67cb8907cbd739c345c64480672"),h=(0,f.d)();(0,s.Ay)("init",{appId:"UTLO2P1INL",apiKey:"9a36c67cb8907cbd739c345c64480672",useCookie:!0}),(0,s.Ay)("setUserToken",h);var _=(null===(r=window)||void 0===r||null===(r=r.drupalSettings)||void 0===r?void 0:r.category_listing)||{},b=_.region,w=void 0===b?[]:b,I=_.interests,j=void 0===I?[]:I,k=_.seasons,S=void 0===k?[]:k,E=_.travel_companions,x=void 0===E?[]:E,N=_.traveler_style,A=void 0===N?[]:N,D=_.travel_experiences,L=void 0===D?[]:D,C=_.traveler_type,O=void 0===C?[]:C,T=_.content_type,R=void 0===T?null:T;const q=function(){var e,t=y((0,a.useState)(null),2),n=t[0],r=t[1],c=y((0,a.useState)(""),2),f=c[0],m=c[1],g=y((0,a.useState)([]),2),_=g[0],b=g[1],I=y((0,a.useState)([]),2),k=I[0],E=I[1],N=y((0,a.useState)([]),2),D=N[0],C=N[1],T=y((0,a.useState)([]),2),q=T[0],U=T[1],P=y((0,a.useState)([]),2),H=P[0],B=P[1],z=y((0,a.useState)([]),2),M=z[0],V=z[1],G=(0,a.useRef)(null),J=function(e){return Array.isArray(e)?e[0]:e||null},K=function(e){return window.innerWidth<=767?J(null==e?void 0:e.mobile_image):J(null==e?void 0:e.thumbnail_image)};return(0,a.useEffect)((function(){var e=new URLSearchParams(window.location.search),t=function(e){return decodeURIComponent(e).toLowerCase().replace(/[_\s&]+/g,"-").replace(/[^\w-]/g,"")},n=function(n,r,a){var i=Array.from(new Set(e.getAll(n).join(",").split(",").filter(Boolean))).map(t);a(r.filter((function(e){var n=t(e.label);return i.includes(n)})).map((function(e){return e.label})))};n("region",w,(function(e){e.length>0&&(m(e[0]),r(e[0]))})),n("interests",j,b),n("seasons",S,E),n("travel_companions",x,C),n("traveler_style",A,U),n("travel_experiences",L,B),n("traveler_type",O,V)}),[]),a.createElement("div",{className:"category-listing-event blog-listing container",ref:G,"data-insights-index":"blog_itinerary_index"},a.createElement(i.G,{searchClient:v,indexName:"blog_itinerary_index",userToken:h},a.createElement("div",{className:"filters"},w.map((function(e){return 0==e.level&&a.createElement("span",{key:e.key,className:"ui-filter ui-filter--teal d-inline-flex jc-center ai-center border-radius-default t-t-uppercase ".concat(n===e.label?"active":""),onClick:function(){return function(e){var t=w.find((function(t){return t.key===e})),a=(null==t?void 0:t.label)||null,i=n===a?null:a,o=null==a?void 0:a.toLowerCase().replace(/\s+/g,"_");r(i),m(i||"");var l=new URLSearchParams(window.location.search);i&&o?l.set("region",o):l.delete("region");var c=_.map((function(e){return e.toLowerCase().replace(/\s+/g,"_")})).filter(Boolean);l.delete("interests"),c.forEach((function(e){return l.append("interests",e)}));var s="".concat(window.location.pathname,"?").concat(l.toString());window.history.replaceState(null,"",s)}(e.key)}},e.label)}))),a.createElement(o.Z,{filters:(e=["status:true","NOT field_checkbox:true"],R&&"string"==typeof R&&R.trim()&&e.push('type:"'.concat(R,'"')),f&&"string"==typeof f&&f.trim()&&e.push('region:"'.concat(f,'"')),_.length&&e.push("(".concat(_.map((function(e){return'interests:"'.concat(e,'"')})).join(" OR "),")")),k.length&&e.push("(".concat(k.map((function(e){return'seasons:"'.concat(e,'"')})).join(" OR "),")")),D.length&&e.push("(".concat(D.map((function(e){return'travel_companions:"'.concat(e,'"')})).join(" OR "),")")),q.length&&e.push("(".concat(q.map((function(e){return'traveler_style:"'.concat(e,'"')})).join(" OR "),")")),H.length&&e.push("(".concat(H.map((function(e){return'travel_experiences:"'.concat(e,'"')})).join(" OR "),")")),M.length&&e.push("(".concat(M.map((function(e){return'traveler_type:"'.concat(e,'"')})).join(" OR "),")")),e.join(" AND ")),hitsPerPage:d.rJ,userToken:h,clickAnalytics:!0,enablePersonalization:!0}),a.createElement(l.f,{hitComponent:function(e){var t,n=e.hit;return a.createElement("div",{className:"card pos-relative","data-insights-index":"blog_itinerary_index","data-insights-object-id":n.objectID,"data-insights-position":n.__position,"data-insights-query-id":n.__queryID},a.createElement("div",{className:"card__image pos-relative"},a.createElement("div",{className:"image"},a.createElement("a",{className:"overflow-hidden border-radius--img image",href:n.url},a.createElement("picture",null,a.createElement("img",{loading:"lazy",src:K(n)?K(n):d.Ab,alt:n.title,className:"transition-ui"}))))),a.createElement("div",{className:"rte card__copy"},a.createElement("h3",{className:"h3 m-0"},a.createElement("a",{className:"h3__btn",href:n.url,"aria-label":n.title},n.title)),a.createElement("p",{className:"t-small content",style:{lineHeight:"22px"},dangerouslySetInnerHTML:{__html:p().decode((null==n||null===(t=n._highlightResult)||void 0===t||null===(t=t.body)||void 0===t?void 0:t.value)||"")}})),a.createElement("a",{href:n.url,className:"link-cover","aria-label":n.title,onClick:function(){(0,s.Ay)("clickedObjectIDsAfterSearch",{index:"blog_itinerary_index",eventName:"Clicked Blog",objectIDs:[String(n.objectID)],userToken:h,queryID:n.__queryID,positions:[n.__position],attributes:{interests:n.interests||[],region:n.region||[]}}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Hit Clicked",objectID:n.objectID,queryID:n.__queryID,position:n.__position,index:"blog_itinerary_index",userToken:h})}}))},transformItems:function(e){if(e.length>0){var t=e.map((function(e){return String(e.objectID)}));(0,s.Ay)("viewedObjectIDs",{index:"blog_itinerary_index",eventName:"Hits Viewed",objectIDs:t,userToken:h}),window.dataLayer=window.dataLayer||[],h&&window.dataLayer.push({algoliaUserToken:h}),e.forEach((function(e){window.dataLayer.push({event:"Hits Viewed",hitsCount:1,queryID:e.__queryID,userToken:h,objectID:e.objectID,index:"blog_itinerary_index"})}))}return e}}
1),a.createElement(u.A,{scrollTargetRef:G})))}}}]);
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.