text: (window.webpackJsonp=window.webpackJsonp||[]).push([[44],{292:function(t,n,e){"use strict";e.r(n);var r=e(148),a=e(585),u=e(632);n.default=Object(r.b)(null,function(t){return{search:function(n){return t(Object(a.w)(n))}}},null,{pure:!0})(function(t){var n,e,r,a,c=t.element,o=t.search,i=function(t){return t.classList.toggle("focused")},s=c,f=s.querySelector("#js-search-input"),d=f.parentElement.querySelector(".search-clear-button"),l=(n=f,e=d,function(){var t=n.value.trim();o(t),t?(e.classList.add("enabled"),e.setAttribute("tabindex",0)):(e.classList.remove("enabled"),e.setAttribute("tabindex",-1))}),p=(r=f,a=l,function(t){t.preventDefault(),r.value="",r.focus(),a()});f.addEventListener("keyup",l,!1),f.addEventListener("focus",function(){return i(f)},!1),f.addEventListener("blur",function(){return i(f)},!1),d.addEventListener("click",p,!1),d.addEventListener("focus",function(){return i(d)},!1),d.addEventListener("blur",function(){return i(d)},!1),document.addEventListener("cancel-search",function(t){t.preventDefault(),f.value="",l()},!1),document.addEventListener("keyup",function(t){if(!d.classList.contains("focused")&&!f.classList.contains("focused"))return!1;if(t.preventDefault(),27===t.keyCode&&p(t),13===t.keyCode){if(d.classList.contains("focused"))return p(t);0<f.value.length&&!document.location.pathname.match(/^\/search\//)&&(window.location="/search/?q=".concat(f.value))}return!1},!1);var S=document.location.search.match(/[?&]q=([^&]+)/);return S&&(f.value=decodeURIComponent(S[1])),Object(u.a)(f),s.addEventListener("submit",function(t){return t.preventDefault()}),f.value.trim()&&o(f.value.trim()),null})},584:function(t,n,e){"use strict";var r=e(598),a=new(e.n(r).a)({APIUrl:"/.netlify/commerce"});n.a=a},585:function(t,n,e){"use strict";(function(t){e.d(n,"f",function(){return C}),e.d(n,"C",function(){return R}),e.d(n,"B",function(){return T}),e.d(n,"h",function(){return O}),e.d(n,"k",function(){return b}),e.d(n,"l",function(){return U}),e.d(n,"j",function(){return v}),e.d(n,"q",function(){return g}),e.d(n,"a",function(){return D}),e.d(n,"i",function(){return I}),e.d(n,"d",function(){return w}),e.d(n,"E",function(){return L}),e.d(n,"z",function(){return j}),e.d(n,"g",function(){return F}),e.d(n,"c",function(){return N}),e.d(n,"m",function(){return P}),e.d(n,"u",function(){return k}),e.d(n,"e",function(){return M}),e.d(n,"v",function(){return x}),e.d(n,"o",function(){return G}),e.d(n,"F",function(){return Q}),e.d(n,"H",function(){return V}),e.d(n,"G",function(){return q}),e.d(n,"s",function(){return W}),e.d(n,"p",function(){return H}),e.d(n,"n",function(){return z}),e.d(n,"D",function(){return Y}),e.d(n,"A",function(){return X}),e.d(n,"y",function(){return $}),e.d(n,"r",function(){return B}),e.d(n,"t",function(){return J}),e.d(n,"b",function(){return K}),e.d(n,"w",function(){return Z}),e.d(n,"x",function(){return tt});var r=e(16),a=e.n(r),u=e(3),c=e.n(u),o=e(150),i=e.n(o),s=e(593),f=e.n(s),d=e(588),l=e(36),p=e(2),S=e(586),_=e(584),E=e(587),y=e(589),m=e(35),h=function(t){return t.getUserData().then(function(t){return t.jwt()}).then(function(n){t._claims=JSON.parse(atob(n.split(".")[1])),t.claims=function(){return t._claims};var e=t.app_metadata||{};return t.plan=e.subscription&&e.subscription.plan,t})},C=function(t){return function(n){return n({type:p.a.CHECK_ROUTE,route:t})}},R=function(t){return function(n){return n({type:p.a.SETTINGS_SET,settings:t})}},T=function(){return function(t){var n,e=window.Cookiebot;t({type:p.a.PRIVACY_SET,payload:(n=e,{responded:c()(n,"hasResponse"),accepted:c()(n,"consented"),declined:c()(n,"declined"),necessary:c()(n,"consent.necessary")})})}},A=function(t,n){n({type:p.a.HISTORY_GO,path:t}),window.history.replaceState({},"","/".concat(t,"/"))},O=function(){return function(n){return n({type:p.a.REQUEST_ADS_START}),t("".concat(l.a.PROXY_URL,"friskies")).then(function(t){return t.json()}).then(function(n){return t("".concat(l.a.PROXY_URL,"friskies")).then(function(t){return t.json()}).then(function(t){return(c()(n,"ads")||[]).concat(c()(t,"ads")||[])})}).then(function(t){return n({type:p.a.REQUEST_ADS_SUCCESS,ads:t})}).catch(function(t){return n({type:p.a.REQUEST_ADS_FAIL,error:Object(m.n)(t)})})}},b=function(t){return function(n){_.a.setUser(E.a.currentUser()),n({type:p.a.REQUEST_ORDER_START}),_.a.orderDetails(t).then(function(t){return n({type:p.a.REQUEST_ORDER_SUCCESS,order:t})}).catch(function(t){return n({type:p.a.REQUEST_ORDER_FAIL,error:Object(m.n)(t)})})}},U=function(){return function(t){_.a.setUser(E.a.currentUser()),t({type:p.a.REQUEST_ORDERS_START}),_.a.orderHistory().then(function(n){return t({type:p.a.REQUEST_ORDERS_SUCCESS,orders:n.orders})}).catch(function(n){return t({type:p.a.REQUEST_ORDERS_FAIL,error:Object(m.n)(n)})})}},v=function(){return function(t){_.a.setUser(E.a.currentUser()),t({type:p.a.REQUEST_DOWNLOADS_START}),_.a.downloads().then(function(n){return t({type:p.a.REQUEST_DOWNLOADS_SUCCESS,downloads:n.downloads})}).catch(function(n){return t({type:p.a.REQUEST_DOWNLOADS_FAIL,error:Object(m.n)(n)})})}},g=function(t){return function(){_.a.downloadURL(t).then(function(t){var n=document.createElement("a");n.download=!0,n.href=t,document.body.appendChild(n),n.click(),n.remove()}).catch(function(){})}},D=function(t){return function(n){return n({type:p.a.ADD_COUPON_START}),_.a.setCoupon(t).then(function(e){n({type:p.a.ADD_COUPON_SUCCESS,code:t,coupon:e}),n({type:p.a.REQUEST_CART_SUCCESS,cart:_.a.getCart()})}).catch(function(t){return n({type:p.a.ADD_COUPON_FAIL,error:Object(m.n)(t)})})}},I=function(){return function(t,n){var e=n(),r=e.cart,a=E.a.currentUser();if(t({type:p.a.REQUEST_CART_START}),!r||!r.isFetching){if(c()(e.order,"details.billingAddress.country")){var u=c()(e.order,"details.billingAddress.country");u.includes("Czech")&&(u="Czech"),_.a.setCountry(u),_.a.setCurrency(Object(m.f)(u)||"USD")}r=_.a.getCart(),c()(e.order,"coupon.code")&&r&&0<Object.keys(r.items).length&&t(D(c()(e.order,"coupon.code"))),a?h(a).then(function(n){t({type:p.a.GET_USER_SUCCESS,user:n}),_.a.setUser(n);var e=n.user_metadata||{};e.shippingAddress&&e.shippingAddress.country&&_.a.setCountry(e.shippingAddress.country),e.shippingAddress&&e.shippingAddress.country&&_.a.setCurrency(Object(m.f)(e.shippingAddress.country)||"USD"),t({type:p.a.REQUEST_CART_SUCCESS,cart:_.a.getCart()})}).catch(function(n){return t({type:p.a.REQUEST_CART_FAIL,error:Object(m.n)(n)})}):(t({type:p.a.GET_USER_SUCCESS,user:null}),t({type:p.a.REQUEST_CART_SUCCESS,cart:_.a.getCart()}))}}},w=function(t,n){return function(e){return _.a.loadSettings().then(function(){return e({type:p.a.CALCULATE_MEMBER_PRICE_SUCCESS,price:_.a.calculatePrice(t,n?{app_metadata:{subscription:{plan:n}}}:null),item:t})})}},L=function(t,n){return function(e){_.a.updateCart(t,n),e({type:p.a.UPDATE_CART_SUCCESS,cart:_.a.getCart(),item:{sku:t,quantity:n}})}},j=function(t,n){return function(e,r){var a=r().auth;t.email||(t.email=c()(a,"user.email"));var u,o=c()(t,"billingAddress.country");e((u=o,function(t){if(!u)return null;u.includes("Czech")&&(u="Czech"),_.a.setCountry(u),_.a.setCurrency(Object(m.f)(u)||"USD"),t({type:p.a.REQUEST_CART_SUCCESS,cart:_.a.getCart()})})),e({type:p.a.ORDER_SET_DETAILS_SUCCESS,details:t}),n||A("checkout/payment",e)}},F=function(){return function(t){_.a.clearCart(),t({type:p.a.EMPTY_CART_SUCCESS,cart:_.a.getCart()}),t({type:p.a.ORDER_CLEAR})}},N=function(t){return function(n,e){var r=e().cart;(!i()(r.items,t.sku)||Object(m.b)(r.items[t.sku].type))&&(n({type:p.a.ADD_TO_CART_START}),_.a.addToCart(t).then(function(e){n({type:p.a.ADD_TO_CART_SUCCESS,cart:e,item:t})}).catch(function(e){return n({type:p.a.ADD_TO_CART_FAIL,error:Object(m.n)(e),item:t})}))}},P=function(){return function(t){var n=E.a.currentUser();if(n)return t({type:p.a.GET_USER_START}),h(n).then(function(n){return t({type:p.a.GET_USER_SUCCESS,user:n})}).catch(function(n){return t({type:p.a.GET_USER_FAIL,error:Object(m.n)(n)})});t({type:p.a.GET_USER_SUCCESS,user:null})}},k=function(t){return function(n){var e=E.a.currentUser(),r={data:{}};return n({type:p.a.UPDATE_USER_START}),e.email!==t.email&&(r.email=t.email),r.data.twitter=t.twitter,r.data.firstname=t.firstname,r.data.lastname=t.lastname,e.update(r).then(function(t){return n({type:p.a.UPDATE_USER_SUCCESS,user:t,emailChanged:!!r.email})}).catch(function(t){return n({type:p.a.UPDATE_USER_FAIL,error:Object(m.n)(t)})})}},M=function(t){return function(n){var e=E.a.currentUser();return n({type:p.a.UPDATE_PASSWORD_START}),e.update(t).then(function(t){return n({type:p.a.UPDATE_PASSWORD_SUCCESS,user:t})}).catch(function(t){return n({type:p.a.UPDATE_PASSWORD_FAIL,error:Object(m.n)(t)})})}},x=function(t){return function(n){var e=E.a.currentUser();return n({type:p.a.UPDATE_USER_METADATA_START}),e.update({data:a()({},f()(t,["email","confirmed"]),{updatedAt:(new Date).toISOString()})}).then(function(t){return n({type:p.a.UPDATE_USER_METADATA_SUCCESS,user:t})}).catch(function(t){return n({type:p.a.UPDATE_USER_METADATA_FAIL,error:Object(m.n)(t)})})}},G=function(t){return function(n){n({type:p.a.LOGIN_START}),E.a.login(t.email,t.password,!0).then(function(t){n({type:p.a.LOGIN_SUCCESS,user:t}),Object(d.a)(t)}).catch(function(t){return n({type:p.a.LOGIN_FAIL,error:Object(m.n)(t)})})}},Q=function(t){return function(n){n({type:p.a.VERIFICATION_START}),E.a.confirm(t).then(function(t){Object(d.a)(t),n({type:p.a.VERIFICATION_SUCCESS,user:t})}).catch(function(t){return n({type:p.a.VERIFICATION_FAIL,error:t})})}},V=function(t){return function(n){n({type:p.a.VERIFICATION_START}),localStorage.setItem("auth.return_to","/membership/recover-password"),E.a.recover(t,!0).then(function(t){Object(d.a)(t),n({type:p.a.VERIFICATION_SUCCESS,user:t})}).catch(function(t){return n({type:p.a.VERIFICATION_FAIL,error:Object(m.n)(t)})})}},q=function(t){return function(n){var e=E.a.currentUser();n({type:p.a.VERIFICATION_START}),e?e.update({email_change_token:t}).then(function(t){Object(d.a)(t),n({type:p.a.VERIFICATION_SUCCESS,user:t})}).catch(function(t){return n({type:p.a.VERIFICATION_FAIL,error:Object(m.n)(t)})}):(localStorage.setItem("auth.return_to",document.location.pathname),window.location.replace("/auth/"))}},W=function(t){return function(n){n({type:p.a.RECOVER_START}),E.a.requestPasswordRecovery(t.email).then(function(){window.location.replace("/auth/confirmation/?email=".concat(t.email)),n({type:p.a.RECOVER_SUCCESS})}).catch(function(t){return n({type:p.a.RECOVER_FAIL,error:Object(m.n)(t)})})}},H=function(){return function(t){var n=E.a.currentUser();t({type:p.a.LOGOUT_START}),n.logout().then(function(){return t({type:p.a.LOGOUT_SUCCESS,user:null})}).catch(function(n){return t({type:p.a.LOGOUT_FAIL,error:Object(m.n)(n)})})}},z=function(){return function(t,n){var e=n(),r=e.cart,a=e.order,u=c()(a.details,"billingAddress.country")||c()(a.details,"shippingAddress.country"),o=Object.keys(r.items).map(function(t){var n=r.items[t];return{label:"".concat(n.title),amount:n.price.cents}});c()(r,"memberDiscount.cents")&&o.push({label:"Membership discount 🦁",amount:-c()(r,"memberDiscount.cents")}),c()(r,"couponDiscount.cents")&&o.push({label:"Coupon discount",amount:-c()(r,"couponDiscount.cents")});try{var i=S.c.paymentRequest({country:Object(m.d)(u)||"US",currency:c()(r,"total.currency").toLowerCase(),total:{label:"Total",amount:c()(r,"total.cents")},displayItems:o});return i.on("paymentmethod",function(n){var e=n.paymentMethod;return e&&e.id?(t({type:p.a.ORDER_SET_CC_SUCCESS,key:e.id}),A("checkout/confirmation",t),n.complete("success")):n.complete("fail")}),i.canMakePayment().then(function(t){if(t){var n=document.querySelector(".stripe-button");n&&(n.addEventListener("click",function(t){t.preventDefault(),t.stopPropagation(),i.show()}),n.classList.remove("hidden"))}return t})}catch(n){}}},Y=function(t,n,e,r){return function(a){a({type:p.a.SIGNUP_START}),E.a.signup(t,n,e||{}).then(function(){return E.a.login(t,n,!0).then(function(t){Object(d.a)(t,!r),a({type:p.a.SIGNUP_SUCCESS,user:t}),r&&window.location.replace("/membership")})}).catch(function(t){return a({type:p.a.SIGNUP_FAIL,error:Object(m.n)(t)})})}},X=function(t){return function(n){n({type:p.a.ORDER_SET_PAYPAL_SUCCESS,paypal:t}),A("checkout/confirmation",n)}},$=function(t){return function(n,e){var r=e().order;return n({type:p.a.ORDER_SET_CC_START,cc:t}),Object(S.b)(S.a,r.details).then(function(t){n({type:p.a.ORDER_SET_CC_SUCCESS,key:t.id}),A("checkout/confirmation",n)}).catch(function(t){return n({type:p.a.ORDER_SET_CC_FAIL,error:Object(m.n)(t)})})}},B=function(){return function(t,n){var e=n(),r=e.order,a=e.cart;t({type:p.a.ORDER_CONFIRM_START}),_.a.order({email:r.details.email,shipping_address:Object(m.h)(r.details.shippingAddress),billing_address:Object(m.h)(r.details.billingAddress)}).then(function(n){return _.a.payment({order_id:n.order.id,amount:n.cart.total.cents,provider:r.paypal?"paypal":"stripe",stripe_payment_method_id:r.key,paypal_payment_id:r.paypal&&r.paypal.paymentID,paypal_user_id:r.paypal&&r.paypal.payerID}).then(function(t){var n=c()(t,"provider_metadata.payment_intent_secret");return"pending"===t.status&&n?S.c.handleCardAction(n).then(function(n){return n.error?Promise.reject(n.error):_.a.paymentConfirm(t.id)}):t}).then(function(t){return _.a.orderDetails(t.order_id)}).then(function(n){var e=c()(n,"transactions.[0]");t({type:p.a.ORDER_CONFIRM_SUCCESS,transaction:Object.assign({},e,{order:n}),cart:a}),A("checkout/confirmation/".concat(n.id),t),t(F()),t(function(t){return t({type:p.a.ORDER_CLEAR})})})}).catch(function(n){t({type:p.a.ORDER_CONFIRM_FAIL,error:Object(m.n)(n)}),A("checkout/payment",t)})}},J=function(t,n){return function(e){e({type:p.a.ORDER_RESEND_CONFIRMATION_START}),_.a.resendConfirmation(t,n).then(function(t){return e({type:p.a.ORDER_RESEND_CONFIRMATION_SUCCESS,result:t})}).catch(function(t){return e({type:p.a.ORDER_RESEND_CONFIRMATION_FAIL,error:Object(m.n)(t)})})}},K=function(t){return function(n){var e=[];t.featured_addon&&e.push("featured"),t.tweet_addon&&e.push("tweet"),t.facebook_addon&&e.push("facebook");var r="full-time"===t.commitment?"job-posting-fulltime":"job-posting-freelance",u=a()({},t);delete u.errors;var c={path:t.path,sku:r,quantity:1,meta:u,addons:e};return n({type:p.a.ADD_TO_CART_START}),_.a.addToCart(c).then(function(){window.location.replace("/checkout")}).catch(function(t){return n({type:p.a.ADD_TO_CART_FAIL,item:c,error:Object(m.n)(t)})})}},Z=function(t){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;return function(e){e({type:p.a.SEARCH_START,query:t}),y.a.search(t,{hitsPerPage:15*(n+1),page:0},function(t,r){if(t)return e({type:p.a.SEARCH_FAIL,error:Object(m.n)(t)});e({type:p.a.SEARCH_SUCCESS,results:r,page:n})})}},tt=function(){return function(t){return t({type:p.a.AD_BLOCKED})}}}).call(this,e(104))},586:function(t,n,e){"use strict";e.d(n,"c",function(){return a}),e.d(n,"a",function(){return c}),e.d(n,"b",function(){return o});var r=e(35),a=window.Stripe?window.Stripe("pk_live_4a6o5tXVqFE97apgZblp0VXX"):null,u=window.Stripe?a.elements({fonts:[{family:"Elena",src:'local("Elena"), local("elena"), url(https://d33wubrfki0l68.cloudfront.net/a978f759fa0230c1e590d1bdb5a1c03ceb538cec/fed6b/fonts/elenawebregular/elenawebregular.woff2)'},{family:"Mija",src:'local("Mija"), local("Mija"), url(https://d33wubrfki0l68.cloudfront.net/b324ee03d5048d2d1831100e323b0b6336ffce68/0445e/fonts/mijaregular/mija_regular-webfont.woff2)'}]}):null,c=window.Stripe?u.create("card",{hidePostalCode:!0,style:{base:{fontFamily:"Mija",fontSize:"18px","::placeholder":{color:"#aaa",fontFamily:"Elena",fontWeight:300,letterSpacing:"-0.25px",fontSize:"16px"}},complete:{fontWeight:"bold",color:"#20a12c"},invalid:{color:"#CC3428"}},classes:{base:"form__field__input stripe-element",complete:"success",focus:"focused",invalid:"error",empty:"empty"}}):null,o=function(t,n){return new Promise(function(e,u){a.createPaymentMethod("card",t,{billing_details:Object(r.m)(n)}).then(function(t){t.error?u(t.error):e(t.paymentMethod)})})}},587:function(t,n,e){"use strict";var r=e(599),a=e.n(r),u=e(36),c=new a.a({APIUrl:u.a.API_NETLIFY_AUTH,setCookie:!0});n.a=c},588:function(t,n,e){"use strict";e.d(n,"a",function(){return a});var r=e(584),a=function(t,n){r.a.setUser(t);var e=localStorage.getItem("auth.return_to")||"/membership/";localStorage.removeItem("auth.return_to"),r.a.claimOrders().then(function(){return!n&&window.location.replace(e)}).catch(function(){return!n&&window.location.replace(e)})}},589:function(t,n,e){"use strict";var r=e(600),a=e.n(r)()("5RAJI8U6UH","c996d58ec6bf7789719889b76dc89aa1").initIndex("smashingmagazine");n.a=a},632:function(t,n,e){"use strict";e.d(n,"c",function(){return u}),e.d(n,"a",function(){return c}),e.d(n,"b",function(){return o}),e.d(n,"d",function(){return f});var r=e(633),a=e.n(r);function u(t,n){n=n||1;var e=t.getBoundingClientRect(),r=window.innerHeight||document.documentElement.clientHeight,a=window.innerWidth||document.documentElement.clientWidth,u=e.top-n<=r&&0<=e.top+e.height,c=e.left-n<=a&&0<=e.left+e.width;return u&&c}function c(t){var n=document,e=n.querySelector('meta[name="viewport"]'),r=e.content,a=",maximum-scale=",u=/,*maximum-scale=\d*\.*\d*/;function c(t){e.content=r+("blur"===t.type?r.match(u,"")?"":a+10:a+1)}t.addEventListener&&n.querySelector&&(t.addEventListener("focus",c,!0),t.addEventListener("blur",c,!1))}function o(t,n){var e,r,a=n.charAt(0),u="classList"in document.documentElement;for("["===a&&1<(e=(n=n.substr(1,n.length-2)).split("=")).length&&(r=!0,e[1]=e[1].replace(/"/g,"").replace(/'/g,""));t&&t!==document&&1===t.nodeType;t=t.parentNode){if("."===a)if(u){if(t.classList.contains(n.substr(1)))return t}else if(new RegExp("(^|\\s)".concat(n.substr(1),"(\\s|$)")).test(t.className))return t;if("#"===a&&t.id===n.substr(1))return t;if("["===a&&t.hasAttribute(e[0])){if(!r)return t;if(t.getAttribute(e[0])===e[1])return t}if(t.tagName.toLowerCase()===n)return t}return null}var i=!1;try{var s=Object.defineProperty({},"passive",{get:function(){i=!0}});window.addEventListener("test",null,s)}catch(t){}function f(t){window.addEventListener("scroll",a()(t,100),!!i&&{passive:!0})}},633:function(t,n,e){var r=e(634),a=e(105);t.exports=function(t,n,e){var u=!0,c=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return a(e)&&(u="leading"in e?!!e.leading:u,c="trailing"in e?!!e.trailing:c),r(t,n,{leading:u,maxWait:n,trailing:c})}},634:function(t,n,e){var r=e(105),a=e(635),u=e(636),c=Math.max,o=Math.min;t.exports=function(t,n,e){var i,s,f,d,l,p,S=0,_=!1,E=!1,y=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function m(n){var e=i,r=s;return i=s=void 0,S=n,d=t.apply(r,e)}function h(t){var e=t-p;return void 0===p||n<=e||e<0||E&&f<=t-S}function C(){var t,e,r=a();if(h(r))return R(r);l=setTimeout(C,(e=n-((t=r)-p),E?o(e,f-(t-S)):e))}function R(t){return l=void 0,y&&i?m(t):(i=s=void 0,d)}function T(){var t,e=a(),r=h(e);if(i=arguments,s=this,p=e,r){if(void 0===l)return S=t=p,l=setTimeout(C,n),_?m(t):d;if(E)return l=setTimeout(C,n),m(p)}return void 0===l&&(l=setTimeout(C,n)),d}return n=u(n)||0,r(e)&&(_=!!e.leading,f=(E="maxWait"in e)?c(u(e.maxWait)||0,n):f,y="trailing"in e?!!e.trailing:y),T.cancel=function(){void 0!==l&&clearTimeout(l),i=p=s=l=void(S=0)},T.flush=function(){return void 0===l?d:R(a())},T}},635:function(t,n,e){var r=e(81);t.exports=function(){return r.Date.now()}},636:function(t,n,e){var r=e(105),a=e(41),u=/^\s+|\s+$/g,c=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,i=/^0o[0-7]+$/i,s=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(a(t))return NaN;if(r(t)){var n="function"==typeof t.valueOf?t.valueOf():t;t=r(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(u,"");var e=o.test(t);return e||i.test(t)?s(t.slice(2),e?2:8):c.test(t)?NaN:+t}}}]);