From ee617dc34587d4917cd1f73912577e7ad3a34b5c Mon Sep 17 00:00:00 2001 From: Federico Navarrete Date: Fri, 8 Mar 2024 14:18:55 +0100 Subject: [PATCH] Fixed JSON logic --- index.html | 38 +++++++++++++++++++------------------- js/apps.js | 2 +- js/apps.min.js | 2 +- js/libs/underscore-min.js | 6 ------ 4 files changed, 21 insertions(+), 27 deletions(-) delete mode 100644 js/libs/underscore-min.js diff --git a/index.html b/index.html index b1a92c3..5fecd6a 100644 --- a/index.html +++ b/index.html @@ -25,7 +25,7 @@ Federico Navarrete's — Projects Gallery - + @@ -63,9 +63,9 @@ @@ -77,22 +77,22 @@

- + - + - + \ No newline at end of file diff --git a/js/apps.js b/js/apps.js index b94f53d..b62d7ad 100644 --- a/js/apps.js +++ b/js/apps.js @@ -212,7 +212,7 @@ function setApps(appCollection, control, techs, customIcons) { let years = appCollection[item].yearStart; if (appCollection[item].yearStart !== appCollection[item].yearEnd) { - years += appCollection[item].yearEnd !== undefined ? ` - ${appCollection[item].yearEnd}` : " - now"; + years += appCollection[item].yearEnd !== null ? ` - ${appCollection[item].yearEnd}` : " - now"; } let tooltip = `${years}

${appCollection[item].description}`; diff --git a/js/apps.min.js b/js/apps.min.js index ae95bcd..a9970d9 100644 --- a/js/apps.min.js +++ b/js/apps.min.js @@ -1 +1 @@ -const cardTemplate='
\n {1}\n
\n
{2}
\n

{3}

\n
\n
',galleryTitle="Federico Navarrete — Projects Gallery",galleryFooter='Some icons were created by Freepik - www.flaticon.com. © Federico Navarrete & Supernova IC {0}.',iconSpan="{1}";let apps,panesOptions,tabsOptions;function load(){document.getElementById("galleryApps").innerHTML+=createTabs()+createPanes(),document.getElementById("galleryTitle").innerHTML+=galleryTitle;let e=(new Date).getFullYear();document.getElementById("galleryFooter").innerHTML+=galleryFooter.format(e);let t=[],r=[],o=[],s=[],a=[],n=[],i=[],l=[],p=[],c=[],d=[],g=[],m=[],u=[],y=[],f=[],h=[],b=[],w=[],$=[],E=[],S=[],A=[];new URLSearchParams(window.location.search).get("isIframe")||(document.getElementById("header").style.display="block",document.getElementById("header").classList.add("pt-4"),[...document.getElementsByClassName(".gallery-block")].forEach((function(e){e.style.paddingTop="60px"})));for(let e in apps)filterElem(apps[e],"android",!0,t),filterElem(apps[e],"android_huawei",!0,r),filterElem(apps[e],"android_samsung",!0,o),filterElem(apps[e],"android_amazon",!0,s),filterElem(apps[e],"windows10",!0,n),filterElem(apps[e],"android",!1,u),filterElem(apps[e],"windows10",!1,y),filterElem(apps[e],"windowsPhone",!1,h),filterElem(apps[e],"windows8",!1,b),filterElem(apps[e],"web",!0,l),filterElem(apps[e],"web",!1,w),filterElem(apps[e],"windowsXP",!1,f),filterElem(apps[e],"nuget",!0,c),filterElem(apps[e],"js_lib",!0,g),filterElem(apps[e],"uwp_lib",!0,m),filterElem(apps[e],"nuget",!1,$),filterElem(apps[e],"xamarin_forms",!1,E);setApps(t.sort(sortByProperty("order")),"playStore",a,A),setApps(r.sort(sortByProperty("order")),"huaweiStore",a,A),setApps(o.sort(sortByProperty("order")),"samsungStore",a,A),setApps(s.sort(sortByProperty("order")),"amazonStore",a,A),setApps(n.sort(sortByProperty("order")),"msStore",i,A),setApps(l.sort(sortByProperty("order")),"webStore",p,A),setApps(c.sort(sortByProperty("order")),"nugetsStore",d,A),setApps(g.sort(sortByProperty("order")),"jsLibStore",d,A),setApps(m.sort(sortByProperty("order")),"uwpLibStore",d,A),setApps(E.sort(sortByProperty("order")),"unsupportedXamarinForms",S,A),setApps(u.sort(sortByProperty("order")),"unsupportedAndroid",S,A),setApps(b.sort(sortByProperty("order")),"unsupportedWindows8",S,A),setApps(y.sort(sortByProperty("order")),"unsupportedWindows10",S,A),setApps(h.sort(sortByProperty("order")),"unsupportedWindowsPhone",S,A),setApps(w.sort(sortByProperty("order")),"unsupportedWeb",S,A),setApps(f.sort(sortByProperty("order")),"unsupportedVB",S,A),setApps($.sort(sortByProperty("order")),"unsupportedNuget",S,A),setTechUsed(a,"techsPlayStore",A),setTechUsed(i,"techsMSStore",A),setTechUsed(p,"techsWebStore",A),setTechUsed(S,"techsOldStore",A),setTechUsed(d,"techsLibsStore",A);[].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')).map((function(e){return new bootstrap.Tooltip(e)})),[].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]')).map((function(e){return new bootstrap.Popover(e)}))}function setTechUsed(e,t,r){const o={};for(let t=0;tt.id==s[e][0])),`×${s[e][1]}`,3):getTechPrint(s[e][0],`×${s[e][1]}`,3);document.getElementById(`${t}`).innerHTML+=a}function getTechPrint(e,t,r){let o="";for(let e=0;e<=r;e++)o+=" ";if(!Array.isArray(e))return`${iconSpan.format("",`${t}`)}${o}`;{let r="";switch(e[0].tooltip&&(r=`data-bs-toggle="tooltip" title="${e[0].tooltip}"`),e[0].type){case"text":return`${iconSpan.format(r,`${e[0].text}${t}`)}${o}`;case"mix-left-icon":return`${iconSpan.format(r,`${e[0].text}${t}`)}${o}`;case"mix-right-icon":return`${iconSpan.format(r,`${e[0].text}${t}`)}${o}`;case"mix-left-img":return`${iconSpan.format(r,`icon${e[0].text}${t}`)}${o}`;case"mix-right-img":return`${iconSpan.format(r,`${e[0].text}icon${t}`)}${o}`;case"img":return`${iconSpan.format(r,`icon${t}`)}${o}`;case"icon":return`${iconSpan.format(r,`${t}`)}${o}`}}}function setApps(e,t,r,o){for(let s in e){let a="";""!==e[s].storeLink&&(a+=``),""!==e[s].link&&e[s].isSupported?a+=``:void 0===e[s].secondaryLink||e[s].isSupported||""!==e[s].secondaryLink&&(a+=``),""!==e[s].preview&&(a+=``);let n=e[s].yearStart;e[s].yearStart!==e[s].yearEnd&&(n+=void 0!==e[s].yearEnd?` - ${e[s].yearEnd}`:" - now");let i=`${n}

${e[s].description}`,l="";for(let t in e[s].technologies)Array.isArray(e[s].technologies[t])?(l+=getTechPrint(e[s].technologies[t],"",1),addTech(r,e[s].technologies[t][0].id),void 0!==o&&null==_.findWhere(o,e[s].technologies[t][0])&&o.push(e[s].technologies[t][0])):(l+=getTechPrint(e[s].technologies[t],"",1),addTech(r,e[s].technologies[t]));i+=`

Technologies:

${l.replaceAll('"',"'")}
`,document.getElementById(`${t}`).innerHTML+=cardTemplate.format(e[s].logo,e[s].app,e[s].app,a,e[s].app,i)}}function addTech(e,t){void 0!==e&&(Array.isArray(e)?e.push(t):e.push(t.replaceAll(" ","_").replaceAll("-","__")))}function filterElem(e,t,r,o){let s=e.edition.filter((e=>e.mainTech==t&&e.isSupported===r))[0];void 0!==s&&o.push(createElem(e,s))}function createElem(e,t){return{app:e.app,link:e.link,description:e.description,logo:e.logo,preview:t.preview,storeLink:t.storeLink,technologies:t.technologies,yearStart:t.yearStart,yearEnd:t.yearEnd,technologies:t.technologies,isSupported:t.isSupported,secondaryLink:t.link,order:t.order}}function gAnalytics(){function e(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],e("js",new Date),e("config","G-WQKJ9Y00XJ")}function googleTranslateElementInit(){new google.translate.TranslateElement({pageLanguage:"en",includedLanguages:"es,nl,de,fr,it,en,pt",autoDisplay:!1,layout:google.translate.TranslateElement.InlineLayout.SIMPLE},"google_translate_element")}window.addEventListener("DOMContentLoaded",(()=>{fetchData("js/data/translations/en-us/external/apps.min.json").then((e=>{apps=e.apps,panesOptions=e.panesOptions,tabsOptions=e.tabsOptions,load()})).catch((e=>{console.error(e)}))})),googleTranslateElementInit(),gAnalytics(); \ No newline at end of file +const cardTemplate='
\n {1}\n
\n
{2}
\n

{3}

\n
\n
',galleryTitle="Federico Navarrete — Projects Gallery",galleryFooter='Some icons were created by Freepik - www.flaticon.com. © Federico Navarrete & Supernova IC {0}.',iconSpan="{1}";let apps,panesOptions,tabsOptions;function load(){document.getElementById("galleryApps").innerHTML+=createTabs()+createPanes(),document.getElementById("galleryTitle").innerHTML+=galleryTitle;let e=(new Date).getFullYear();document.getElementById("galleryFooter").innerHTML+=galleryFooter.format(e);let t=[],r=[],o=[],s=[],a=[],n=[],i=[],l=[],p=[],c=[],d=[],g=[],m=[],u=[],y=[],f=[],h=[],b=[],w=[],$=[],E=[],S=[],A=[];new URLSearchParams(window.location.search).get("isIframe")||(document.getElementById("header").style.display="block",document.getElementById("header").classList.add("pt-4"),[...document.getElementsByClassName(".gallery-block")].forEach((function(e){e.style.paddingTop="60px"})));for(let e in apps)filterElem(apps[e],"android",!0,t),filterElem(apps[e],"android_huawei",!0,r),filterElem(apps[e],"android_samsung",!0,o),filterElem(apps[e],"android_amazon",!0,s),filterElem(apps[e],"windows10",!0,n),filterElem(apps[e],"android",!1,u),filterElem(apps[e],"windows10",!1,y),filterElem(apps[e],"windowsPhone",!1,h),filterElem(apps[e],"windows8",!1,b),filterElem(apps[e],"web",!0,l),filterElem(apps[e],"web",!1,w),filterElem(apps[e],"windowsXP",!1,f),filterElem(apps[e],"nuget",!0,c),filterElem(apps[e],"js_lib",!0,g),filterElem(apps[e],"uwp_lib",!0,m),filterElem(apps[e],"nuget",!1,$),filterElem(apps[e],"xamarin_forms",!1,E);setApps(t.sort(sortByProperty("order")),"playStore",a,A),setApps(r.sort(sortByProperty("order")),"huaweiStore",a,A),setApps(o.sort(sortByProperty("order")),"samsungStore",a,A),setApps(s.sort(sortByProperty("order")),"amazonStore",a,A),setApps(n.sort(sortByProperty("order")),"msStore",i,A),setApps(l.sort(sortByProperty("order")),"webStore",p,A),setApps(c.sort(sortByProperty("order")),"nugetsStore",d,A),setApps(g.sort(sortByProperty("order")),"jsLibStore",d,A),setApps(m.sort(sortByProperty("order")),"uwpLibStore",d,A),setApps(E.sort(sortByProperty("order")),"unsupportedXamarinForms",S,A),setApps(u.sort(sortByProperty("order")),"unsupportedAndroid",S,A),setApps(b.sort(sortByProperty("order")),"unsupportedWindows8",S,A),setApps(y.sort(sortByProperty("order")),"unsupportedWindows10",S,A),setApps(h.sort(sortByProperty("order")),"unsupportedWindowsPhone",S,A),setApps(w.sort(sortByProperty("order")),"unsupportedWeb",S,A),setApps(f.sort(sortByProperty("order")),"unsupportedVB",S,A),setApps($.sort(sortByProperty("order")),"unsupportedNuget",S,A),setTechUsed(a,"techsPlayStore",A),setTechUsed(i,"techsMSStore",A),setTechUsed(p,"techsWebStore",A),setTechUsed(S,"techsOldStore",A),setTechUsed(d,"techsLibsStore",A);[].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')).map((function(e){return new bootstrap.Tooltip(e)})),[].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]')).map((function(e){return new bootstrap.Popover(e)}))}function setTechUsed(e,t,r){const o={};for(let t=0;tt.id==s[e][0])),`×${s[e][1]}`,3):getTechPrint(s[e][0],`×${s[e][1]}`,3);document.getElementById(`${t}`).innerHTML+=a}function getTechPrint(e,t,r){let o="";for(let e=0;e<=r;e++)o+=" ";if(!Array.isArray(e))return`${iconSpan.format("",`${t}`)}${o}`;{let r="";switch(e[0].tooltip&&(r=`data-bs-toggle="tooltip" title="${e[0].tooltip}"`),e[0].type){case"text":return`${iconSpan.format(r,`${e[0].text}${t}`)}${o}`;case"mix-left-icon":return`${iconSpan.format(r,`${e[0].text}${t}`)}${o}`;case"mix-right-icon":return`${iconSpan.format(r,`${e[0].text}${t}`)}${o}`;case"mix-left-img":return`${iconSpan.format(r,`icon${e[0].text}${t}`)}${o}`;case"mix-right-img":return`${iconSpan.format(r,`${e[0].text}icon${t}`)}${o}`;case"img":return`${iconSpan.format(r,`icon${t}`)}${o}`;case"icon":return`${iconSpan.format(r,`${t}`)}${o}`}}}function setApps(e,t,r,o){for(let s in e){let a="";""!==e[s].storeLink&&(a+=``),""!==e[s].link&&e[s].isSupported?a+=``:void 0===e[s].secondaryLink||e[s].isSupported||""!==e[s].secondaryLink&&(a+=``),""!==e[s].preview&&(a+=``);let n=e[s].yearStart;e[s].yearStart!==e[s].yearEnd&&(n+=null!==e[s].yearEnd?` - ${e[s].yearEnd}`:" - now");let i=`${n}

${e[s].description}`,l="";for(let t in e[s].technologies)Array.isArray(e[s].technologies[t])?(l+=getTechPrint(e[s].technologies[t],"",1),addTech(r,e[s].technologies[t][0].id),void 0!==o&&null==_.findWhere(o,e[s].technologies[t][0])&&o.push(e[s].technologies[t][0])):(l+=getTechPrint(e[s].technologies[t],"",1),addTech(r,e[s].technologies[t]));i+=`

Technologies:

${l.replaceAll('"',"'")}
`,document.getElementById(`${t}`).innerHTML+=cardTemplate.format(e[s].logo,e[s].app,e[s].app,a,e[s].app,i)}}function addTech(e,t){void 0!==e&&(Array.isArray(e)?e.push(t):e.push(t.replaceAll(" ","_").replaceAll("-","__")))}function filterElem(e,t,r,o){let s=e.edition.filter((e=>e.mainTech==t&&e.isSupported===r))[0];void 0!==s&&o.push(createElem(e,s))}function createElem(e,t){return{app:e.app,link:e.link,description:e.description,logo:e.logo,preview:t.preview,storeLink:t.storeLink,technologies:t.technologies,yearStart:t.yearStart,yearEnd:t.yearEnd,technologies:t.technologies,isSupported:t.isSupported,secondaryLink:t.link,order:t.order}}function gAnalytics(){function e(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],e("js",new Date),e("config","G-WQKJ9Y00XJ")}function googleTranslateElementInit(){new google.translate.TranslateElement({pageLanguage:"en",includedLanguages:"es,nl,de,fr,it,en,pt",autoDisplay:!1,layout:google.translate.TranslateElement.InlineLayout.SIMPLE},"google_translate_element")}window.addEventListener("DOMContentLoaded",(()=>{fetchData("js/data/translations/en-us/external/apps.min.json").then((e=>{apps=e.apps,panesOptions=e.panesOptions,tabsOptions=e.tabsOptions,load()})).catch((e=>{console.error(e)}))})),googleTranslateElementInit(),gAnalytics(); \ No newline at end of file diff --git a/js/libs/underscore-min.js b/js/libs/underscore-min.js deleted file mode 100644 index cf177d4..0000000 --- a/js/libs/underscore-min.js +++ /dev/null @@ -1,6 +0,0 @@ -!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define("underscore",r):(n="undefined"!=typeof globalThis?globalThis:n||self,function(){var t=n._,e=n._=r();e.noConflict=function(){return n._=t,e}}())}(this,(function(){ -// Underscore.js 1.13.1 -// https://underscorejs.org -// (c) 2009-2021 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors -// Underscore may be freely distributed under the MIT license. -var n="1.13.1",r="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},t=Array.prototype,e=Object.prototype,u="undefined"!=typeof Symbol?Symbol.prototype:null,o=t.push,i=t.slice,a=e.toString,f=e.hasOwnProperty,c="undefined"!=typeof ArrayBuffer,l="undefined"!=typeof DataView,s=Array.isArray,p=Object.keys,v=Object.create,h=c&&ArrayBuffer.isView,y=isNaN,d=isFinite,g=!{toString:null}.propertyIsEnumerable("toString"),b=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],m=Math.pow(2,53)-1;function j(n,r){return r=null==r?n.length-1:+r,function(){for(var t=Math.max(arguments.length-r,0),e=Array(t),u=0;u=0&&t<=m}}function J(n){return function(r){return null==r?void 0:r[n]}}var G=J("byteLength"),H=K(G),Q=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;var X=c?function(n){return h?h(n)&&!q(n):H(n)&&Q.test(a.call(n))}:C(!1),Y=J("length");function Z(n,r){r=function(n){for(var r={},t=n.length,e=0;e":">",'"':""","'":"'","`":"`"},Cn=Ln($n),Kn=Ln(_n($n)),Jn=tn.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},Gn=/(.)^/,Hn={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Qn=/\\|'|\r|\n|\u2028|\u2029/g;function Xn(n){return"\\"+Hn[n]}var Yn=/^\s*(\w|\$)+\s*$/;var Zn=0;function nr(n,r,t,e,u){if(!(e instanceof r))return n.apply(t,u);var o=Mn(n.prototype),i=n.apply(o,u);return _(i)?i:o}var rr=j((function(n,r){var t=rr.placeholder,e=function(){for(var u=0,o=r.length,i=Array(o),a=0;a1)ur(a,r-1,t,e),u=e.length;else for(var f=0,c=a.length;f0&&(t=r.apply(this,arguments)),n<=1&&(r=null),t}}var lr=rr(cr,2);function sr(n,r,t){r=qn(r,t);for(var e,u=nn(n),o=0,i=u.length;o0?0:u-1;o>=0&&o0?a=o>=0?o:Math.max(o+f,a):f=o>=0?Math.min(o+1,f):o+f+1;else if(t&&o&&f)return e[o=t(e,u)]===u?o:-1;if(u!=u)return(o=r(i.call(e,a,f),$))>=0?o+a:-1;for(o=n>0?a:f-1;o>=0&&o0?0:i-1;for(u||(e=r[o?o[a]:a],a+=n);a>=0&&a=3;return r(n,Fn(t,u,4),e,o)}}var Ar=wr(1),xr=wr(-1);function Sr(n,r,t){var e=[];return r=qn(r,t),jr(n,(function(n,t,u){r(n,t,u)&&e.push(n)})),e}function Or(n,r,t){r=qn(r,t);for(var e=!er(n)&&nn(n),u=(e||n).length,o=0;o=0}var Br=j((function(n,r,t){var e,u;return D(r)?u=r:(r=Nn(r),e=r.slice(0,-1),r=r[r.length-1]),_r(n,(function(n){var o=u;if(!o){if(e&&e.length&&(n=In(n,e)),null==n)return;o=n[r]}return null==o?o:o.apply(n,t)}))}));function Nr(n,r){return _r(n,Rn(r))}function Ir(n,r,t){var e,u,o=-1/0,i=-1/0;if(null==r||"number"==typeof r&&"object"!=typeof n[0]&&null!=n)for(var a=0,f=(n=er(n)?n:jn(n)).length;ao&&(o=e);else r=qn(r,t),jr(n,(function(n,t,e){((u=r(n,t,e))>i||u===-1/0&&o===-1/0)&&(o=n,i=u)}));return o}function Tr(n,r,t){if(null==r||t)return er(n)||(n=jn(n)),n[Wn(n.length-1)];var e=er(n)?En(n):jn(n),u=Y(e);r=Math.max(Math.min(r,u),0);for(var o=u-1,i=0;i1&&(e=Fn(e,r[1])),r=an(n)):(e=qr,r=ur(r,!1,!1),n=Object(n));for(var u=0,o=r.length;u1&&(t=r[1])):(r=_r(ur(r,!1,!1),String),e=function(n,t){return!Er(r,t)}),Ur(n,e,t)}));function zr(n,r,t){return i.call(n,0,Math.max(0,n.length-(null==r||t?1:r)))}function Lr(n,r,t){return null==n||n.length<1?null==r||t?void 0:[]:null==r||t?n[0]:zr(n,n.length-r)}function $r(n,r,t){return i.call(n,null==r||t?1:r)}var Cr=j((function(n,r){return r=ur(r,!0,!0),Sr(n,(function(n){return!Er(r,n)}))})),Kr=j((function(n,r){return Cr(n,r)}));function Jr(n,r,t,e){A(r)||(e=t,t=r,r=!1),null!=t&&(t=qn(t,e));for(var u=[],o=[],i=0,a=Y(n);ir?(e&&(clearTimeout(e),e=null),a=c,i=n.apply(u,o),e||(u=o=null)):e||!1===t.trailing||(e=setTimeout(f,l)),i};return c.cancel=function(){clearTimeout(e),a=0,e=u=o=null},c},debounce:function(n,r,t){var e,u,o,i,a,f=function(){var c=zn()-u;r>c?e=setTimeout(f,r-c):(e=null,t||(i=n.apply(a,o)),e||(o=a=null))},c=j((function(c){return a=this,o=c,u=zn(),e||(e=setTimeout(f,r),t&&(i=n.apply(a,o))),i}));return c.cancel=function(){clearTimeout(e),e=o=a=null},c},wrap:function(n,r){return rr(r,n)},negate:fr,compose:function(){var n=arguments,r=n.length-1;return function(){for(var t=r,e=n[r].apply(this,arguments);t--;)e=n[t].call(this,e);return e}},after:function(n,r){return function(){if(--n<1)return r.apply(this,arguments)}},before:cr,once:lr,findKey:sr,findIndex:vr,findLastIndex:hr,sortedIndex:yr,indexOf:gr,lastIndexOf:br,find:mr,detect:mr,findWhere:function(n,r){return mr(n,Dn(r))},each:jr,forEach:jr,map:_r,collect:_r,reduce:Ar,foldl:Ar,inject:Ar,reduceRight:xr,foldr:xr,filter:Sr,select:Sr,reject:function(n,r,t){return Sr(n,fr(qn(r)),t)},every:Or,all:Or,some:Mr,any:Mr,contains:Er,includes:Er,include:Er,invoke:Br,pluck:Nr,where:function(n,r){return Sr(n,Dn(r))},max:Ir,min:function(n,r,t){var e,u,o=1/0,i=1/0;if(null==r||"number"==typeof r&&"object"!=typeof n[0]&&null!=n)for(var a=0,f=(n=er(n)?n:jn(n)).length;ae||void 0===t)return 1;if(t