PageSourceSearch

https://www.sistic.com.sg/_next/static/chunks/8387-159e0cb3c51d90ec.js

js sistic.com.sg collected 2026-10-01 10:30:53 UTC 6,856 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8387],{48387:(t,e,l)=>{l.d(e,{A:()=>s});var n=l(83796),i=l(16570),r=l(82999),a=l(9049);class o{static setCookie(t,e,l){let n=new Date;n.setTime(n.getTime()+24*l*36e5);let i="expires="+n.toUTCString(),r="localhost"===window.location.hostname,a="https:"===window.location.protocol;document.cookie="".concat(t,"=").concat(encodeURIComponent(e),"; ").concat(i,"; path=/").concat("; SameSite=Lax").concat(a&&!r?"; Secure":"")}static getCookie(t){try{let e=document.cookie.match("(^|;)\\s*"+t+"\\s*=\\s*([^;]+)");return e?decodeURIComponent(e.pop()||""):""}catch(t){return console.log("ERROR: While getting cookie: ",t.toString()),""}}static convertTZ(t){return new Date(("string"==typeof t.date?new Date(t.date):t.date).toLocaleString("en-US",{timeZone:t.tzString}))}static rearrangeGenresListForPlanVisit(t){let e=["Concert","Musical","Theatre","Comedy"],l=[...t];return t.forEach((t,n)=>{if(e.includes(t.name)){let i=e.findIndex(e=>e==t.name),r=l[i];l[i]=t,l[n]=r}}),l}static rearrangeGenresList(t){let e=["Concert","Musical","Theatre","Comedy","Lifestyle/Leisure","Sports","Dance","Family Entertainment","Orchestra"],l=[...t];return t.forEach((t,n)=>{if(e.includes(t.name)){let i=e.findIndex(e=>e==t.name),r=l[i];l[i]=t,l[n]=r}}),l}}o.getPriceWithCurrencySymbol=(t,e,l)=>{let n="S$";return(l&&(n=l),t&&e)?"".concat(n).concat(t)+" - "+"".concat(n).concat(e):t?"".concat(n).concat(t):e?"".concat(n).concat(e):"-"},o.shareEvent=(t,e,l,n)=>{let i=encodeURIComponent(t),r=encodeURIComponent(e),a="";switch(l){case"WHATSAPP":a="https://".concat(n?"api":"web",".whatsapp.com/send?text=").concat(r,"%20").concat(i);break;case"FACEBOOK":a="https://www.facebook.com/sharer/sharer.php?u=".concat(i);break;case"X-TWITTER":a="https://twitter.com/intent/tweet?text=".concat(r,"&url=").concat(i);break;case"INSTA":a="".concat(n?"instagram://":"https://www.instagram.com/","story/share?url=").concat(i);break;case"TICKTOK":a="".concat(n?"tiktok://":"https://www.tiktok.com/","share?url=").concat(i);break;case"TELEGRAM":a="https://telegram.me/share/url?url=".concat(i,"&text=").concat(r)}window.open(a,"_blank")},o.addTargetToHref=t=>{let e=t;return e&&(e=e.replace(/href="(.*?)"/,function(t,e){return'href="'+e+'" target="_blank"'})),e},o.getColorCodeFormat=t=>{if(!t)return"";let e=t.split("#");return"#"+e[e.length-1]},o.formatStepperData=t=>{var e,l,n,i,r,a;let o=[];return(null==t?void 0:t.synopsis)&&(null==t||null==(e=t.synopsis)?void 0:e.length)>0&&o.push({id:"SYNOPSIS_ID",title:"Synopsis",isSelected:!1}),(null==t?void 0:t.ticket_pricing)&&(null==t||null==(l=t.ticket_pricing)?void 0:l.length)>0&&o.push({id:"PRICE_DETAILS_ID",title:"Price Details",isSelected:!1}),(null==t?void 0:t.seating_plan)&&(null==t||null==(n=t.seating_plan)?void 0:n.length)>0&&o.push({id:"SEAT_MAP_ID",title:"Seat Map",isSelected:!1}),(null==t?void 0:t.promotions)&&(null==t||null==(i=t.promotions)?void 0:i.length)>0&&o.push({id:"PROMOTIONS_ID",title:"Promotions",isSelected:!1}),(null==t?void 0:t.tabs)&&(null==t||null==(r=t.tabs)?void 0:r.length)>0&&(null==t||t.tabs.forEach((t,e)=>{o.push({id:"TABS_"+e+"_ID",title:t.title,isSelected:!1})})),(null==t?void 0:t.promoters)&&(null==t||null==(a=t.promoters)?void 0:a.length)>0&&o.push({id:"ORGANISER_ID",title:"Organiser",isSelected:!1}),o},o.removeBrfromString=t=>{if(!t)return"";let e=t;return((null==e?void 0:e.length)>0&&e.includes("<br>")||e.includes("</br>"))&&(e=(e=(e=(e=e.replaceAll(" <br>","")).replaceAll("<br>","")).replaceAll(" </br>","")).replaceAll("</br>","")),e},o.getUrl=t=>t.navigation_link?t.navigation_link:t.alias?t.alias.includes("http")?t.alias:"/events/"+t.alias:"/explore/1/"+t.id,o.setClientCookie=(t,e,l)=>{let n=new Date;n.setTime(n.getTime()+24*l*36e5);let i="; expires="+n.toUTCString();document.cookie="".concat(t,"=").concat(e).concat(i,"; path=/; SameSite=Lax;")}
1,o.getRequestParamsForEvents=t=>{let{genreIds:e,startDate:l,endDate:n,minPrice:i,maxPrice:o,search:s,culturePass:c,first:u,limit:d,stixLite:p}=t,h={first:0,limit:"1000",sort_type:"date",sort_order:"ASC",index:"global",client:r.Y.CLIENT_ID};if(null!=u){let t=(0,a.dD)(u);t.isValid&&t.sanitized&&(h.first=Number(t.sanitized))}if(null!=d){let t=String(d),e=(0,a.dD)(t);e.isValid&&e.sanitized&&(h.limit=e.sanitized)}if(e){let t=(0,a.gN)(e);t.isValid&&t.sanitized&&(h.genre=t.sanitized)}if(l&&(h.start_date=l),n&&(h.end_date=n),null!=i){let t=(0,a.cp)(i);t.isValid&&t.sanitized&&(h.min_price=Number(t.sanitized))}if(null!=o){let t=(0,a.cp)(o);t.isValid&&t.sanitized&&(h.max_price=Number(t.sanitized))}return s&&(h.search=s),!0===c&&(h.cp=!0),"boolean"==typeof p&&(h.stixlite=p),h},o.sortEventListData=(t,e,l)=>{let r=[];return new Promise(a=>{if("title"===e)a(r=t.sort((t,e)=>!1===l?t.title>e.title?-1:1:t.title>e.title?1:-1));else if("date"===e){if(r=t.sort((t,e)=>{let n=new Date(t.start_date),i=new Date(e.start_date);return!0===l?n-i:i-n}),!0===l){let t=new Date,e=[],l=[],a=[];r.forEach(r=>{let o=r.start_date,s=(0,n.qg)(o,"EEE, dd MM yyyy",new Date),c=(0,i.W)(t,s);c>0?e.push(r):c<0?l.push(r):a.push(r)}),r=[...a,...l,...e]}a(r)}else"price"===e&&a(r=t.sort((t,e)=>{var n,i,r,a;let o=null!=(n=null==t?void 0:t.min_price)?n:null,s=null!=(i=null==e?void 0:e.min_price)?i:null,c=null!=(r=null==t?void 0:t.max_price)?r:null,u=null!=(a=null==e?void 0:e.max_price)?a:null,d=null!==o?Number(o):null!==c?Number(c):null,p=null!==s?Number(s):null!==u?Number(u):null;return null===d&&null===p?0:null===d?1:null===p?-1:l?d-p:p-d}))})},o.sortSearchResultsEventListData=(t,e,l)=>{let r=[];return new Promise(a=>{if("title"===e)a(r=t.sort((t,e)=>!1===l?t.title>e.title?-1:1:t.title>e.title?1:-1));else if("date"===e){if(r=t.sort((t,e)=>{let n=new Date(t.start_date),i=new Date(e.start_date);return!0===l?n-i:i-n}),!0===l){let t=new Date,e=[],l=[],a=[];r.forEach(r=>{let o=r.event_date,s=(0,n.qg)(o,"EEE, dd MM yyyy",new Date),c=(0,i.W)(t,s);c>0?e.push(r):c<0?l.push(r):a.push(r)}),r=[...a,...l,...e]}a(r)}else"price"===e&&a(r=t.sort((t,e)=>{var n,i;let r=null!=(n=null==t?void 0:t.min_price)?n:null,a=null!=(i=null==e?void 0:e.min_price)?i:null;if(null===r&&null===a)return 0;if(null===r)return 1;if(null===a)return -1;let o=Number(r),s=Number(a);return l?o-s:s-o}))})},o.getProxyImageUrl=t=>{if(!t||""===t)return null;if(t.startsWith("http://")||t.startsWith("https://"))return t;let e=t.replace(/\\/g,"");if(e.includes("%"))try{e=decodeURIComponent(e)}catch(t){console.error("Failed to decode image path",t)}e.startsWith("/")||(e="/"+e);let l=e.startsWith("/sites/default/"),n=e.startsWith("/sistic/docroot/"),i="https://cms.sistic.com.sg";return(l||n)&&(l?e="".concat(i,"/sistic/docroot").concat(e):n&&(e="".concat(i).concat(e))),encodeURI(e)},o.getPlayableUrl=t=>{if(!t)return"";try{let e=new URL(t);return e.searchParams.delete("list"),e.toString()}catch(e){return t}};let s=o}}]);

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.