PageSourceSearch

https://www.pure-ip.com/hubfs/hub_generated/template_assets/1/1828…/template_resources.vue.min.js

js pure-ip.com collected 2026-10-02 10:24:29 UTC 3,826 bytes, 2 lines download raw bytes

1let app=new Vue({delimiters:["{!!","!!}"],el:"#resourcesHub",data:()=>({portalId:window.PORTAL_ID??null,tableId:window.HUBDB_TABLE_ID??null,filters:{},types:[],topics:[],resources:[],filteredResources:[],originalLimit:12,limit:12,increment:12,urlFilters:["type","topic"],activeMobileTrigger:!1,windowWidth:window.innerWidth}),created:async function(){const tableResults=await this.fetchTableData();this.resources=tableResults.results.map(x=>({...x.values,showOnPage:x.values.public_resource})),this.filteredResources=this.resources.filter(x=>x.showOnPage);const tableColumns=await this.fetchTableData({endpoint:""});this.types=tableColumns.columns.filter(x=>"type"===x.name).flatMap(y=>y.options.map(z=>({name:z.label}))),this.topics=tableColumns.columns.filter(x=>"topic"===x.name).flatMap(y=>y.options.map(z=>({name:z.label}))),window.addEventListener("resize",this.onWidthChange),this.$nextTick(()=>{this.searchForQueryParams()})},unmounted(){window.removeEventListener("resize",this.onWidthChange)},methods:{async fetchTableData({tableId:tableId=this.tableId,endpoint:endpoint="rows",queryParams:queryParams}={}){let url=`https://api.hubapi.com/cms/v3/hubdb/tables/${tableId}`;endpoint&&(url+=`/${endpoint}`),url+=`?portalId=${this.portalId}`,queryParams&&(url+=`&${queryParams}`);const response=await fetch(url);if(!response.ok){const message=`An error has occurred: ${response.status}`;throw new Error(message)}return await response.json()},urlParamsUpdate(key,val){const params=new URLSearchParams(window.location.search);params.set(key,val);const newUrl=`${window.location.pathname}?${params.toString()}`;history.replaceState({},null,newUrl)},resetUrlParams(){const params=new URLSearchParams(window.location.search);this.urlFilters.forEach(x=>params.has(x)&&params.delete(x));const newUrl=[...params].length>0?`${window.location.pathname}?${params.toString()}`:window.location.pathname;history.replaceState({},null,newUrl)},deleteUrlParam(key){const params=new URLSearchParams(window.location.search);params.has(key)&&params.delete(key);const newUrl=`${window.location.pathname}?${params.toString()}`;history.replaceState({},null,newUrl)},searchForQueryParams(){const params=new URLSearchParams(window.location.search);this.urlFilters.forEach(filter=>{params.has(filter)&&params.getAll(filter).length>0&&this.filter(filter,params.get(filter))})},filter(filter,value){this.limit=this.originalLimit,this.filters[filter]===value||"all"===value?(delete this.filters[filter],this.deleteUrlParam(filter)):(this.filters[filter]=value,this.urlParamsUpdate(filter,value)),Object.keys(this.filters).length?this.filteredResources=this.resources.filter(x=>Object.entries(this.filters).every(([k,v])=>"topic"===k&&x[k]?x[k].some(topic=>topic.label===v):x[k]?.name===v)&&x.showOnPage):this.resetFilters(),"type"===filter?this.$refs.resourceMobileTypeFilter.value=value:"topic"===filter&&(this.$refs.resourceTopicFilter.value=value)},resetFilters(){this.$refs.resourceMobileTypeFilter.selectedIndex=0,this.$refs.resourceTopicFilter.selectedIndex=0,this.filteredResources=this.resources,this.limit=this.originalLimit,this.filters={},this.resetUrlParams()},loadMore(){this.limit+=this.increment},onWidthChange(){this.windowWidth=window.innerWidth}},computed:{slicedResources(){return this.filteredResources.sort((a,b)=>new Date(b.published_date)-new Date(a.published_date)).slice(0,this.limit)}},filters:{upper:val=>{if(val)return(val=val.toString()).charAt(0).toUpperCase()+val.slice(1)},formatDate(val){if(!val)return"";const date=new Date(val),day=String(date.getDate()).padStart(2,"0");return`${String(date.getMonth()+1).padStart(2,"0")}-${day}-${date.getFullYear()}`}}});
2//# sourceURL=https://434319.fs1.hubspotusercontent-na1.net/hubfs/434319/hub_generated/template_assets/1/182837280821/1787219574271/template_resources.vue.js

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.