"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Re(C){return Re=Object.setPrototypeOf?Object.getPrototypeOf:function(P){return P.__proto__||Object.getPrototypeOf(P)},Re(C)}function me(C,D,P){return D in C?Object.defineProperty(C,D,{value:P,enumerable:!0,configurable:!0,writable:!0}):C[D]=P,C}var ze=["onChange","onOpen","onClose","onMonthChange","onYearChange","onReady","onValueUpdate","onDayCreate"],Ie=r.default.oneOfType([r.default.func,r.default.arrayOf(r.default.func)]),Te=["onCreate","onDestroy"],st=r.default.func,L=function(C){R(P,C);var D=j(P);function P(){var _;v(this,P);for(var $=arguments.length,Q=new Array($),we=0;we<$;we++)Q[we]=arguments[we];return _=D.call.apply(D,[this].concat(Q)),me(W(_),"createFlatpickrInstance",function(){var pe=p({onClose:function(){_.node.blur&&_.node.blur()}},_.props.options);pe=Y(pe,_.props),_.flatpickr=(0,i.default)(_.node,pe),_.props.hasOwnProperty("value")&&_.flatpickr.setDate(_.props.value,!1);var Ge=_.props.onCreate;Ge&&Ge(_.flatpickr)}),me(W(_),"destroyFlatpickrInstance",function(){var pe=_.props.onDestroy;pe&&pe(_.flatpickr),_.flatpickr.destroy(),_.flatpickr=null}),me(W(_),"handleNodeChange",function(pe){_.node=pe,_.flatpickr&&(_.destroyFlatpickrInstance(),_.createFlatpickrInstance())}),_}return A(P,[{key:"componentDidUpdate",value:function($){var Q=this.props.options,we=$.options;Q=Y(Q,this.props),we=Y(we,$);for(var pe=Object.getOwnPropertyNames(Q),Ge=pe.length-1;Ge>=0;Ge--){var wt=pe[Ge],He=Q[wt];He!==we[wt]&&(ze.indexOf(wt)!==-1&&!Array.isArray(He)&&(He=[He]),this.flatpickr.set(wt,He))}this.props.hasOwnProperty("value")&&!(this.props.value&&Array.isArray(this.props.value)&&$.value&&Array.isArray($.value)&&this.props.value.every(function(Pt,B){$[B]}))&&this.props.value!==$.value&&this.flatpickr.setDate(this.props.value,!1)}},{key:"componentDidMount",value:function(){this.createFlatpickrInstance()}},{key:"componentWillUnmount",value:function(){this.destroyFlatpickrInstance()}},{key:"render",value:function(){var $=this.props,Q=$.options,we=$.defaultValue,pe=$.value,Ge=$.children,wt=$.render,He=g($,["options","defaultValue","value","children","render"]);return ze.forEach(function(Pt){delete He[Pt]}),Te.forEach(function(Pt){delete He[Pt]}),wt?wt(p(p({},He),{},{defaultValue:we,value:pe}),this.handleNodeChange):Q.wrap?t.default.createElement("div",y({},He,{ref:this.handleNodeChange}),Ge):t.default.createElement("input",y({},He,{defaultValue:we,ref:this.handleNodeChange}))}}]),P}(t.Component);me(L,"propTypes",{defaultValue:r.default.string,options:r.default.object,onChange:Ie,onOpen:Ie,onClose:Ie,onMonthChange:Ie,onYearChange:Ie,onReady:Ie,onValueUpdate:Ie,onDayCreate:Ie,onCreate:st,onDestroy:st,value:r.default.oneOfType([r.default.string,r.default.array,r.default.object,r.default.number]),children:r.default.node,className:r.default.string,render:r.default.func}),me(L,"defaultProps",{options:{}});function Y(C,D){var P=p({},C);return ze.forEach(function(_){if(D.hasOwnProperty(_)){var $;P[_]&&!Array.isArray(P[_])?P[_]=[P[_]]:P[_]||(P[_]=[]);var Q=Array.isArray(D[_])?D[_]:[D[_]];($=P[_]).push.apply($,u(Q))}}),P}var K=L;e.default=K})(Eh);const g1=yu(Eh),v1="/rememrify/assets/queen-bee-602aa693.svg",y1=({loadData:e,dateRange:n,selectWholeWeek:t})=>M.jsxs("div",{id:"weekpicker",children:[e&&M.jsx("div",{className:"loading-overlay",children:M.jsx("div",{children:M.jsxs("span",{children:[M.jsx("div",{className:"load-chart",children:"Loading Chart..."}),M.jsx("div",{className:"floating",children:M.jsx("figure",{className:"bee-character",children:M.jsx("img",{className:"svg",src:v1,alt:"Queen Bee"})})})]})})}),M.jsx(g1,{value:n,options:{mode:"range",inline:!0,dateFormat:"d/m/y",minDate:new Date(1957,0,5),maxDate:new Date(2012,3,27),locale:{firstDayOfWeek:6}},onChange:r=>t(r)})]}),w1=({total:e,weekStart:n,tableOutput:t})=>M.jsxs("div",{className:"content",children:[M.jsxs("h2",{children:["UK Top ",e," Chart"]}),M.jsxs("div",{className:"spacer",children:["Week starting: ",M.jsx("strong",{children:n})]}),M.jsx("hr",{}),M.jsx("article",{id:"wikichart",children:t}),M.jsx("hr",{}),M.jsx("p",{children:"Note: Some results returned may not be completely precise!"})]}),S1=()=>{const n=d=>{const h=d[0],S=h.getDay()!==6?h.setDate(h.getDate()-(h.getDay()+1)):h.setDate(h.getDate()),x=h.getDay()!==5?h.setDate(h.getDate()+(5+(7-h.getDay()))%7):h.setDate(h.getDate());r([new Date(S),new Date(x)]),o(new Date(S).toLocaleDateString("en-GB"))},[t,r]=It.useState(),[i,o]=It.useState("");It.useEffect(()=>{if(window.location.hash){const d=window.location.hash.substring(1).replace("date=","").split("/"),h=d[2]+","+d[1]+","+d[0];return n([new Date(h)])}else return n([new Date(2e3,0,1)])},[]);const[l,a]=It.useState(!1),[u,c]=It.useState(null);return It.useEffect(()=>{c(null),i&&(window.location.hash=`date=${i}`,a(!0),Xc.get(`https://uk-charts-archive.wikia.com/api.php?action=parse&format=json&page=UK_Singles_%26_Album_Chart_(${i})`).then(d=>{const h=d.data.parse.text["*"],y=new DOMParser().parseFromString(h,"text/html").getElementsByTagName("table")[0],g=[],z=[];(()=>{const m=(E,A,R)=>{E.contains("song-row")&&(A&&(g.push(A.textContent),A.textContent&&(A.textContent=A.textContent.replace(/\//g," / "))),R&&(z.push(R.textContent),R.textContent&&(R.textContent=R.textContent.replace(/\//g," / "))))},p=E=>{const A=document.createElement("td"),R=document.createElement("table");R.style.width="100%";const N=document.createElement("tr");switch(N.classList.add("wrapper"),E.children.length){case 5:case 10:N.classList.add("five-columns"),m(E.classList,E.querySelector("td:nth-of-type(4)"),E.querySelector("td:nth-of-type(5)"));break;case 6:case 11:N.classList.add("six-columns"),m(E.classList,E.querySelector("td:nth-of-type(5)"),E.querySelector("td:nth-of-type(6)"));break;case 7:case 12:N.classList.add("seven-columns"),m(E.classList,E.querySelector("td:nth-of-type(6)"),E.querySelector("td:nth-of-type(7)"));break}return Array.from(E.children).forEach(j=>{N.appendChild(j)}),R.appendChild(N),A.appendChild(R),A},v=y.querySelector("tr:first-of-type");v&&(v.classList.add("info-row"),v.appendChild(p(v))),y.querySelectorAll("tr+tr").forEach((E,A)=>{E.classList.add("song-row"),A>=20?E.remove():E.appendChild(p(E))}),c(Vn(y.outerHTML))})(),(()=>{const m=p=>new Promise(v=>{const E=N=>{if(N)return N.replace("%","").replace(" &","+").replace(" And","+").split(" Ft")[0].replace(" Ft","+").split(" ft")[0].replace(" ft","+").split(" Ft.")[0].replace(" Ft.","+").split(" ft.")[0].replace(" ft.","+").split(/\//g)[0].replace(/\//g,"+").replace(/\s+/g,"+").replace(/ *\([^)]*\) */g,"+").replace(/"/g,"'")},A=E(g[p]);let R=E(z[p]);if(R){const N=R.split("+");N.forEach((j,te)=>{(j.indexOf("*")!==-1||j.indexOf("{")!==-1||j.indexOf("}")!==-1)&&(N[te]="")}),R=N.join("+")}Xc.post("http://localhost:3001/",{spotifyUrl:`https://api.spotify.com/v1/search?q=${A}${R}&type=track&market=GB&limit=1`}).then(N=>{const j=N.data,te=W=>{const fe=document.querySelector(`#wikichart tr:nth-of-type(${p+2}) tr.wrapper`);fe&&fe.after(W)};if(!j.tracks.items[0])te((()=>{const fe=document.createElement("tr");return fe.classList.add("no-song-wrapper"),fe.innerHTML=`
+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d(C,D){if(C){if(typeof C=="string")return x(C,D);var P=Object.prototype.toString.call(C).slice(8,-1);if(P==="Object"&&C.constructor&&(P=C.constructor.name),P==="Map"||P==="Set")return Array.from(C);if(P==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(P))return x(C,D)}}function h(C){if(typeof Symbol<"u"&&Symbol.iterator in Object(C))return Array.from(C)}function S(C){if(Array.isArray(C))return x(C)}function x(C,D){(D==null||D>C.length)&&(D=C.length);for(var P=0,_=new Array(D);P =0)&&Object.prototype.propertyIsEnumerable.call(C,_)&&(P[_]=C[_])}return P}function z(C,D){if(C==null)return{};var P={},_=Object.keys(C),$,Q;for(Q=0;Q<_.length;Q++)$=_[Q],!(D.indexOf($)>=0)&&(P[$]=C[$]);return P}function m(C,D){var P=Object.keys(C);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(C);D&&(_=_.filter(function($){return Object.getOwnPropertyDescriptor(C,$).enumerable})),P.push.apply(P,_)}return P}function p(C){for(var D=1;D"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Re(C){return Re=Object.setPrototypeOf?Object.getPrototypeOf:function(P){return P.__proto__||Object.getPrototypeOf(P)},Re(C)}function me(C,D,P){return D in C?Object.defineProperty(C,D,{value:P,enumerable:!0,configurable:!0,writable:!0}):C[D]=P,C}var ze=["onChange","onOpen","onClose","onMonthChange","onYearChange","onReady","onValueUpdate","onDayCreate"],Ie=r.default.oneOfType([r.default.func,r.default.arrayOf(r.default.func)]),Te=["onCreate","onDestroy"],st=r.default.func,L=function(C){R(P,C);var D=j(P);function P(){var _;v(this,P);for(var $=arguments.length,Q=new Array($),we=0;we<$;we++)Q[we]=arguments[we];return _=D.call.apply(D,[this].concat(Q)),me(W(_),"createFlatpickrInstance",function(){var pe=p({onClose:function(){_.node.blur&&_.node.blur()}},_.props.options);pe=Y(pe,_.props),_.flatpickr=(0,i.default)(_.node,pe),_.props.hasOwnProperty("value")&&_.flatpickr.setDate(_.props.value,!1);var Ge=_.props.onCreate;Ge&&Ge(_.flatpickr)}),me(W(_),"destroyFlatpickrInstance",function(){var pe=_.props.onDestroy;pe&&pe(_.flatpickr),_.flatpickr.destroy(),_.flatpickr=null}),me(W(_),"handleNodeChange",function(pe){_.node=pe,_.flatpickr&&(_.destroyFlatpickrInstance(),_.createFlatpickrInstance())}),_}return A(P,[{key:"componentDidUpdate",value:function($){var Q=this.props.options,we=$.options;Q=Y(Q,this.props),we=Y(we,$);for(var pe=Object.getOwnPropertyNames(Q),Ge=pe.length-1;Ge>=0;Ge--){var wt=pe[Ge],He=Q[wt];He!==we[wt]&&(ze.indexOf(wt)!==-1&&!Array.isArray(He)&&(He=[He]),this.flatpickr.set(wt,He))}this.props.hasOwnProperty("value")&&!(this.props.value&&Array.isArray(this.props.value)&&$.value&&Array.isArray($.value)&&this.props.value.every(function(Pt,B){$[B]}))&&this.props.value!==$.value&&this.flatpickr.setDate(this.props.value,!1)}},{key:"componentDidMount",value:function(){this.createFlatpickrInstance()}},{key:"componentWillUnmount",value:function(){this.destroyFlatpickrInstance()}},{key:"render",value:function(){var $=this.props,Q=$.options,we=$.defaultValue,pe=$.value,Ge=$.children,wt=$.render,He=g($,["options","defaultValue","value","children","render"]);return ze.forEach(function(Pt){delete He[Pt]}),Te.forEach(function(Pt){delete He[Pt]}),wt?wt(p(p({},He),{},{defaultValue:we,value:pe}),this.handleNodeChange):Q.wrap?t.default.createElement("div",y({},He,{ref:this.handleNodeChange}),Ge):t.default.createElement("input",y({},He,{defaultValue:we,ref:this.handleNodeChange}))}}]),P}(t.Component);me(L,"propTypes",{defaultValue:r.default.string,options:r.default.object,onChange:Ie,onOpen:Ie,onClose:Ie,onMonthChange:Ie,onYearChange:Ie,onReady:Ie,onValueUpdate:Ie,onDayCreate:Ie,onCreate:st,onDestroy:st,value:r.default.oneOfType([r.default.string,r.default.array,r.default.object,r.default.number]),children:r.default.node,className:r.default.string,render:r.default.func}),me(L,"defaultProps",{options:{}});function Y(C,D){var P=p({},C);return ze.forEach(function(_){if(D.hasOwnProperty(_)){var $;P[_]&&!Array.isArray(P[_])?P[_]=[P[_]]:P[_]||(P[_]=[]);var Q=Array.isArray(D[_])?D[_]:[D[_]];($=P[_]).push.apply($,u(Q))}}),P}var K=L;e.default=K})(Eh);const g1=yu(Eh),v1="/rememrify/assets/queen-bee-602aa693.svg",y1=({loadData:e,dateRange:n,selectWholeWeek:t})=>M.jsxs("div",{id:"weekpicker",children:[e&&M.jsx("div",{className:"loading-overlay",children:M.jsx("div",{children:M.jsxs("span",{children:[M.jsx("div",{className:"load-chart",children:"Loading Chart..."}),M.jsx("div",{className:"floating",children:M.jsx("figure",{className:"bee-character",children:M.jsx("img",{className:"svg",src:v1,alt:"Queen Bee"})})})]})})}),M.jsx(g1,{value:n,options:{mode:"range",inline:!0,dateFormat:"d/m/y",minDate:new Date(1957,0,5),maxDate:new Date(2012,3,27),locale:{firstDayOfWeek:6}},onChange:r=>t(r)})]}),w1=({total:e,weekStart:n,tableOutput:t})=>M.jsxs("div",{className:"content",children:[M.jsxs("h2",{children:["UK Top ",e," Chart"]}),M.jsxs("div",{className:"spacer",children:["Week starting: ",M.jsx("strong",{children:n})]}),M.jsx("hr",{}),M.jsx("article",{id:"wikichart",children:t}),M.jsx("hr",{}),M.jsx("p",{children:"Note: Some results returned may not be completely precise!"})]}),S1=()=>{const n=d=>{const h=d[0],S=h.getDay()!==6?h.setDate(h.getDate()-(h.getDay()+1)):h.setDate(h.getDate()),x=h.getDay()!==5?h.setDate(h.getDate()+(5+(7-h.getDay()))%7):h.setDate(h.getDate());r([new Date(S),new Date(x)]),o(new Date(S).toLocaleDateString("en-GB"))},[t,r]=It.useState(),[i,o]=It.useState("");It.useEffect(()=>{if(window.location.hash){const d=window.location.hash.substring(1).replace("date=","").split("/"),h=d[2]+","+d[1]+","+d[0];return n([new Date(h)])}else return n([new Date(2e3,0,1)])},[]);const[l,a]=It.useState(!1),[u,c]=It.useState(null);return It.useEffect(()=>{c(null),i&&(window.location.hash=`date=${i}`,a(!0),Xc.get(`https://uk-charts-archive.wikia.com/api.php?action=parse&format=json&page=UK_Singles_%26_Album_Chart_(${i})&origin=*`).then(d=>{const h=d.data.parse.text["*"],y=new DOMParser().parseFromString(h,"text/html").getElementsByTagName("table")[0],g=[],z=[];(()=>{const m=(E,A,R)=>{E.contains("song-row")&&(A&&(g.push(A.textContent),A.textContent&&(A.textContent=A.textContent.replace(/\//g," / "))),R&&(z.push(R.textContent),R.textContent&&(R.textContent=R.textContent.replace(/\//g," / "))))},p=E=>{const A=document.createElement("td"),R=document.createElement("table");R.style.width="100%";const N=document.createElement("tr");switch(N.classList.add("wrapper"),E.children.length){case 5:case 10:N.classList.add("five-columns"),m(E.classList,E.querySelector("td:nth-of-type(4)"),E.querySelector("td:nth-of-type(5)"));break;case 6:case 11:N.classList.add("six-columns"),m(E.classList,E.querySelector("td:nth-of-type(5)"),E.querySelector("td:nth-of-type(6)"));break;case 7:case 12:N.classList.add("seven-columns"),m(E.classList,E.querySelector("td:nth-of-type(6)"),E.querySelector("td:nth-of-type(7)"));break}return Array.from(E.children).forEach(j=>{N.appendChild(j)}),R.appendChild(N),A.appendChild(R),A},v=y.querySelector("tr:first-of-type");v&&(v.classList.add("info-row"),v.appendChild(p(v))),y.querySelectorAll("tr+tr").forEach((E,A)=>{E.classList.add("song-row"),A>=20?E.remove():E.appendChild(p(E))}),c(Vn(y.outerHTML))})(),(()=>{const m=p=>new Promise(v=>{const E=N=>{if(N)return N.replace("%","").replace(" &","+").replace(" And","+").split(" Ft")[0].replace(" Ft","+").split(" ft")[0].replace(" ft","+").split(" Ft.")[0].replace(" Ft.","+").split(" ft.")[0].replace(" ft.","+").split(/\//g)[0].replace(/\//g,"+").replace(/\s+/g,"+").replace(/ *\([^)]*\) */g,"+").replace(/"/g,"'")},A=E(g[p]);let R=E(z[p]);if(R){const N=R.split("+");N.forEach((j,te)=>{(j.indexOf("*")!==-1||j.indexOf("{")!==-1||j.indexOf("}")!==-1)&&(N[te]="")}),R=N.join("+")}Xc.post("http://localhost:3001/",{spotifyUrl:`https://api.spotify.com/v1/search?q=${A}${R}&type=track&market=GB&limit=1`}).then(N=>{const j=N.data,te=W=>{const fe=document.querySelector(`#wikichart tr:nth-of-type(${p+2}) tr.wrapper`);fe&&fe.after(W)};if(!j.tracks.items[0])te((()=>{const fe=document.createElement("tr");return fe.classList.add("no-song-wrapper"),fe.innerHTML=`
No song found on Spotify!
| `,fe})());else if(j.tracks.items[0]){te((()=>{const Te=document.createElement("tr");return Te.classList.add("load-wrapper"),Te.innerHTML=`
Loading song...
diff --git a/index.html b/index.html
index 402289a..b52c2de 100644
--- a/index.html
+++ b/index.html
@@ -35,7 +35,7 @@
-->
-
+
| |