1var browserHistory;jQuery(document).ready(function(){var phoneorder_token=getParameterByName("token");phoneorder_token&&phoneorder_token!=null&&jQuery.ajax({dataType:"json",url:"https://shopifyapi.dbuytest.info/api/verify-token-permission",cache:!1,method:"GET",beforeSend:function(request){request.setRequestHeader("Authorization","Bearer"+phoneorder_token)},success:function(response){var phoneorder_session=sessionStorage.getItem("phoneorder-token");if(phoneorder_session!=""&&sessionStorage.removeItem("phoneorder-token"),sessionStorage.setItem("phoneorder-token",phoneorder_token),response.is_checkout_allowed=="false"||response.is_checkout_allowed==!1){var is_checkout_allowed=sessionStorage.getItem("is-checkout-allowed");is_checkout_allowed!=""&&sessionStorage.removeItem("is-checkout-allowed"),sessionStorage.setItem("is-checkout-allowed","no")}window.location.href="http://"+window.location.hostname}}),jQuery("body").prepend('<div id="dividebuy-shipping-loader" class="dividebuy-loader-set" style="margin:0;display: none"><div id="dividebuy-loader"></div></div>'),jQuery("body").prepend('<div class="dividebuy-softcredit"><div id="dividebuy_modal_softcredit_search" class="modal fade dividebuy-modal custom-modal soft-search dividebuy-soft-search"><div class="modal-dialog modal-lg"><div class="modal-header clearfix"><a href="javascript:void(0);" id="softcredit-scroll" data-dismiss="modal" class="close shopify_close">X</a></div><div class="modal-content" style="overflow:hidden"><div class="modal-body clearfix"><div class="popup"><div id="shipping-loader-softsearch" class="dividebuy-loader-set" style="margin:0;display: none"><div id="dividebuy-loader"></div></div></div></div></div></div></div></div>');var url=window.location.href;if(window.location.href.indexOf("?")>-1){var pieces=url.split("?"),cancelFlag=pieces[1].split("=");if(cancelFlag[0]=="cancel"){jQuery("html").addClass("loader-on"),jQuery("#dividebuy-shipping-loader").show();var settings={async:!0,crossDomain:!0,url:"https://shopifyapi.dbuytest.info/api/cancel-order-products?splashKey="+cancelFlag[1],method:"GET",headers:{"content-type":"application/json"},processData:!1};jQuery.ajax(settings).done(function(response){if(response.status=="ok"){var _array=response.products,addAjaxes=[];jQuery.each(_array,function(key,value2){var addAjax=jQuery.ajax({method:"post",url:"/cart/add.js",data:{quantity:_array[key].qty,id:_array[key].id}});addAjaxes.push(addAjax)}),jQuery.when(addAjaxes).then(function(){setTimeout(function(){location.href="/cart"},5e3)}),localStorage.clear()}else return alert("There is something went wrong with cart."),!1}).fail(function(){return alert("There is something went wrong with cart."),!1})}}});function getParameterByName(name,url){url||(url=window.location.href),name=name.replace(/[\[\]]/g,"\\$&");var regex=new RegExp("[?&]"+name+"(=([^&#]*)|&|#|$)"),results=regex.exec(url);return results?results[2]?decodeURIComponent(results[2].replace(/\+/g," ")):"":null}function unserialize(data){var $global=typeof window<"u"?window:global,utf8Overhead=function(str){for(var s=str.length,i=str.length-1;i>=0;i--){var code=str.charCodeAt(i);code>127&&code<=2047?s++:code>2047&&code<=65535&&(s+=2),code>=56320&&code<=57343&&i--}return s-1},error=function(type,msg,filename,line){throw new $global[type](msg,filename,line)},readUntil=function(data2,offset,stopchr){for(var i=2,buf=[],chr=data2.slice(offset,offset+1);chr!==stopchr;)i+offset>data2.length&&error("Error","Invalid"),buf.push(chr),chr=data2.slice(offset+(i-1),offset+i),i+=1;return[buf.length,buf.join("")]},readChrs=function(data2,offset,length){var i,chr,buf;for(buf=[],i=0;i<length;i++)chr=data2.slice(offset+(i-1),offset+i),buf.push(chr),length-=utf8Overhead(chr);return[buf.length,buf.join("")]};function _unserialize(data2,offset){var dtype,dataoffset,keyandchrs,keys,contig,length,array,readdata,readData,ccount,stringlength,i,key,kprops,kchrs,vprops,vchrs,value2,chrs=0,typeconvert=function(x){return x};switch(offset||(offset=0),dtype=data2.slice(offset,offset+1).toLowerCase(),dataoffset=offset+2,dtype){case"i":typeconvert=function(x){return parseInt(x,10)},readData=readUntil(data2,dataoffset,";
1"),chrs=readData[0],readdata=readData[1],dataoffset+=chrs+1;break;case"b":typeconvert=function(x){return parseInt(x,10)!==0},readData=readUntil(data2,dataoffset,";"),chrs=readData[0],readdata=readData[1],dataoffset+=chrs+1;break;case"d":typeconvert=function(x){return parseFloat(x)},readData=readUntil(data2,dataoffset,";"),chrs=readData[0],readdata=readData[1],dataoffset+=chrs+1;break;case"n":readdata=null;break;case"s":ccount=readUntil(data2,dataoffset,":"),chrs=ccount[0],stringlength=ccount[1],dataoffset+=chrs+2,readData=readChrs(data2,dataoffset+1,parseInt(stringlength,10)),chrs=readData[0],readdata=readData[1],dataoffset+=chrs+2,chrs!==parseInt(stringlength,10)&&chrs!==readdata.length&&error("SyntaxError","String length mismatch");break;case"a":for(readdata={},keyandchrs=readUntil(data2,dataoffset,":"),chrs=keyandchrs[0],keys=keyandchrs[1],dataoffset+=chrs+2,length=parseInt(keys,10),contig=!0,i=0;i<length;i++)kprops=_unserialize(data2,dataoffset),kchrs=kprops[1],key=kprops[2],dataoffset+=kchrs,vprops=_unserialize(data2,dataoffset),vchrs=vprops[1],value2=vprops[2],dataoffset+=vchrs,key!==i&&(contig=!1),readdata[key]=value2;if(contig){for(array=new Array(length),i=0;i<length;i++)array[i]=readdata[i];readdata=array}dataoffset+=1;break;default:error("SyntaxError","Unknown / Unhandled data type(s): "+dtype);break}return[dtype,dataoffset-offset,typeconvert(readdata)]}return _unserialize(data+"",0)[2]}function CheckIP(IpData){if(IpData=="0"||IpData=="")return jQuery(".dividebuy_logo_section").show(),!0;jQuery.getJSON("http://jsonip.com/?callback=?",function(data){var IpArray=IpData.split(","),flag="";jQuery.each(IpArray,function(key,value2){value2==data.ip&&(flag=1)}),flag==1&&(jQuery(".dividebuy_logo_section").show(),jQuery(".softcredit").show())})}function GetInstallmentData(serializedata,Dprice){var html="",disable="",Divideprice=Dprice;for(value in serializedata){var compare_price=serializedata[value].value;Divideprice<compare_price&&(disable="hover-disable");var month=serializedata[value].key,divideratio=(Divideprice/month).toFixed(2),totalprice=Divideprice.toFixed(2);totalprice=totalprice.replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1,"),divideratio=divideratio.replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1,"),html+='<div class="hover-instalment '+disable+'">',html+='<div class="highlights-instalments blue-text">'+month+" </div>",html+='<div class="monthly-instalments">monthly instalments of </div>',html+='<div class="highlights-amt blue-text"> \xC2\xA3'+divideratio+" = </div>",html+='<div class="highlights-amt green-text"> \xC2\xA3'+totalprice+"</div>",html+='<div class="clearfix"></div>',html+="</div>"}return html}function closePopup(){jQuery("html").addClass("loader-on"),jQuery("html,body").animate({scrollTop:jQuery("#test").css("top")},800,function(){jQuery("html, body").animate({scrollTop:0},800)}),jQuery("#dividebuy_modal").removeClass("in-modal"),jQuery("body").removeClass("dividebuy-modal"),setTimeout(function(){jQuery("#dividebuy_modal").css("display","none")},500),jQuery(".loader-set").css("display","block"),setTimeout(function(){location.reload()},5e3)}function closeSoftCreditPopup(){jQuery("#dividebuy_modal_softcredit_search").removeClass("in-modal"),jQuery("body").removeClass("dividebuy-modal-open"),jQuery("#frame-dividebuy-softcredit-check").remove(),setTimeout(function(){jQuery("#dividebuy_modal_softcredit_search").css("display","none")},500),window.localStorage.getItem("browserHistory")!==null&&(browserHistory=window.localStorage.getItem("browserHistory"),window.localStorage.removeItem("browserHistory"),window.history.go(browserHistory-history.length))}function checkPostCode(toCheck){var alpha1="[abcdefghijklmnoprstuwyz]",alpha2="[abcdefghklmnopqrstuvwxy]",alpha3="[abcdefghjkpmnrstuvwxy]",alpha4="[abehmnprvwxy]",alpha5="[abdefghjlnpqrstuwxyz]",BFPOa5="[abdefghjlnpqrst]",BFPOa6="[abdefghjlnpqrstuwzyz]",pcexp=new Array;pcexp.push(new RegExp("^(bf1)(\\s*)([0-6]{1}"+BFPOa5+"{1}"+BFPOa6+"{1})$","i")),pcexp.push(new RegExp("^("+alpha1+"{1}"+alpha2+"?[0-9]{1,2})(\\s*)([0-9]{1}"+alpha5+"{2})$","i")),pcexp.push(new RegExp("^("+alpha1+"{1}[0-9]{1}"+alpha3+"{1})(\\s*)([0-9]{1}"+alpha5+"{2})$","i")),pcexp.push(new RegExp("^("+alpha1+"{1}"+alpha2+"{1}?[0-9]{1}"+alpha4+"{1})(\\s*)([0-9]{1}"+alpha5+"{2})$","i")),pcexp.push(/^(GIR)(\s*)(0AA)$/i),pcexp.push(/^(bfpo)(\s*)([0-9]{1,4}
1)$/i),pcexp.push(/^(bfpo)(\s*)(c\/o\s*[0-9]{1,3})$/i),pcexp.push(/^([A-Z]{4})(\s*)(1ZZ)$/i),pcexp.push(/^(ai-2640)$/i);for(var postCode=toCheck,valid=!1,i=0;i<pcexp.length;i++)if(pcexp[i].test(postCode)){pcexp[i].exec(postCode),postCode=RegExp.$1.toUpperCase()+" "+RegExp.$3.toUpperCase(),postCode=postCode.replace(/C\/O\s*/,"c/o "),toCheck.toUpperCase()=="AI-2640"&&(postCode="AI-2640"),valid=!0;break}return valid?postCode:""}jQuery(document).bind("DOMNodeInserted",function(){jQuery("#user_postcode").keyup(function(){var newPostCode=checkPostCode(document.getElementById("user_postcode").value);newPostCode&&(document.getElementById("user_postcode").value=newPostCode)})});function updateTable(){jQuery("body").find(".shopping-scroll").length>1||jQuery("body").find(".cs-scroll").length>0?loadScript():setTimeout(updateTable,1e3)}updateTable();function loadScript(){setTimeout(function(){jQuery(".popup #dividebuy-shipping-loader").hide()},6e3)}function getOrderAmount(serializeData){var _sarray=[];for(value in serializeData)_sarray[value]=serializeData[value].value;var minValueInstall=Math.min.apply(Math,_sarray);return minValueInstall}function displayCreditPopup(softsearchSplashKey,page){jQuery("#dividebuy_modal_softcredit_search").css("display","block"),jQuery("#dividebuy_modal_softcredit_search").addClass("in-modal"),jQuery("body").addClass("dividebuy-modal-open"),jQuery(".popup #shipping-loader-softsearch").show(),jQuery("#frame-dividebuy-softcredit-check").remove();var iframeSrc="https://softsearch.dividebuy.co.uk?splashKey="+softsearchSplashKey;page=="checkout"&&(iframeSrc=iframeSrc+"&isShopify=1&customerEmail="+jQuery(".review-block__inner .review-block__content bdo").val()),jQuery("#dividebuy_modal_softcredit_search").find(".modal-content").append(`<iframe tabindex="3" frameborder="0" id="frame-dividebuy-softcredit-check" src="${iframeSrc}" width="100%" class="frame"></iframe>`);var iframe=document.getElementById("frame-dividebuy-softcredit-check");iframe.attachEvent?iframe.attachEvent("onload",function(){setTimeout(function(){window.localStorage.setItem("browserHistory",history.length-1),jQuery(".popup #shipping-loader-softsearch").hide()},3e3)}):iframe.onload=function(){setTimeout(function(){window.localStorage.setItem("browserHistory",history.length-1),jQuery(".popup #shipping-loader-softsearch").hide()},3e3)}}window.addEventListener("message",receiver,!1);function receiver(e){e.data=="soft-search-popup-close"&&closeSoftCreditPopup(),e.data=="soft-search-popup-back"&&jQuery("#frame-dividebuy-softcredit-check").length>0&&(jQuery("#dividebuy_modal_softcredit_search").removeClass("in-modal"),jQuery("body").removeClass("dividebuy-modal-open"),jQuery("#frame-dividebuy-softcredit-check").remove(),setTimeout(function(){jQuery("#dividebuy_modal_softcredit_search").css("display","none")},500),window.localStorage.getItem("browserHistory")!==null&&(browserHistory=window.localStorage.getItem("browserHistory"),window.localStorage.removeItem("browserHistory"),window.history.go(browserHistory-history.length))),e.data=="isShopify"&&(closeSoftCreditPopup(),jQuery("#checkout_payment_gateway_33848590447").trigger("click"),jQuery(".shown-if-js .step__footer__continue-btn").trigger("click")),e.data.isHeight&&jQuery("#frame-dividebuy-softcredit-check").height(e.data.isHeight)}window.onload=function(event){window.localStorage.getItem("browserHistory")!==null&&(browserHistory=window.localStorage.getItem("browserHistory"),window.localStorage.removeItem("browserHistory"),window.history.go(browserHistory-history.length))},jQuery(document).mouseup(function(e){var container=jQuery(".dividebuy-tooltip");!container.is(e.target)&&container.has(e.target).length===0&&container.hide()}),jQuery(document).on("keydown",function(e){var container=jQuery(".dividebuy-tooltip");e.keyCode===27&&container.hide()});function tooltipPosition(positionTop=!0,positionBottom=!0){var tooltipAnchorImage=document.getElementById("dividebuy-softsearch-text"),windowInnerHeight=window.innerHeight,tooltipAnchorBottom=tooltipAnchorImage.getBoundingClientRect().bottom,tooltipContentWrapperHeight=0,tooltipPosition2="bottom";document.querySelector(".dividebuy-tooltip").style.display="block",tooltipContentWrapperHeight=document.querySelector(".dividebuy-tooltip"),tooltipContentWrapperHeight=tooltipContentWrapperHeight.clientHeight,document.querySelector(".dividebuy-tooltip").style.display="none";var imageBanner=document.querySelector("#dividebuy_image_after_cart #dividebuy-text"),bannerHeight=imageBanner.clientHeight;if(positionTop==!0&&tooltipContentWrapperHeight+tooltipAnchorBottom>windowInnerHeight&&jQuery(".dividebuy-tooltip").css({bottom:bannerHeight+6,top:"auto"}),positionBottom==!0){var dividebuy_image_offset=jQuery("#dividebuy_image_after_cart").offset().top,dividebuy_softsearch_offset=jQuery("#dividebuy-softsearch-text").offset().top;jQuery(".dividebuy-tooltip").css({top:jQuery("#dividebuy-softsearch-text").innerHeight()+(dividebuy_softsearch_offset-dividebuy_image_offset)+4,bottom:"auto"})}jQuery(".tooltip-db").fadeIn("fast")} 2//# sourceMappingURL=/cdn/shop/t/1006/assets/dividebuy.js.map?v=66887463803859324781788860748
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.