1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6968,7454],{16157(e,n,i){i.r(n),i.d(n,{default:()=>o}),i.dn(o);var t=i(764),s=i.n(t),a=(i(55549),i(43082),i(21759),i(73049),i(41669)),r=i.n(a),l=new(i(30663).default);function o(e){var n=200,i=".radio__visual-input",t="radio__visual-input_inactive",a=".breed-select-progress",o="breed-select-progress__bar_blue",d=[],m=null,u=0,c=0,f=null,g=(r()(this).find(".js-option-image-volume"),r()(a+" .breed-select-progress__bar")),h=r()(e).find(".js-question"),v=r()(e).find(".breed-select-volume-control__button_left-inner"),_=r()(e).find(".breed-select-volume-control__button_right-inner"),b=[],p=[],w=function(e){e.stopPropagation(),e.preventDefault()},x=function(e){if(e>=d.length)return y();if(null!==f&&f.length<=10)return y();f&&(b=f.slice(),p=l.getAnswers().slice());var i=m;m=e;var t=null!==i?d[i]:null,s=d[m];B(),t?r()(t.el).fadeOut(n,function(){r()(s.el).fadeIn(n)}):r()(".js-breed-select-body").fadeOut(n,function(){r()(a).css("visibility","visible"),r()(s.el).fadeIn(n)}),c=0},y=function(){var e=f,n=l.getAnswers();e.length<3&&(e=b,n=p);var i=s()(e,function(e){return e.ID});i=i.slice(0,10);var t="/dog-breed-selector/?breeds="+encodeURIComponent(JSON.stringify(i))+"&answers="+encodeURIComponent(JSON.stringify(n));window.location.href=t},B=function(){h.each(function(e){e<=m?r()(g[e]).addClass(o):r()(g[e]).removeClass(o)})},A=function(e,n){if(!(e<0||e>9)){var i=n+(u=e)+".svg";r()(".js-option-image-volume").attr("src",i)}},k=function(e){e.fadeTo(100,.5,function(){e.fadeTo(100,1)})};r()(e).find(".breed-select-body__featured-content a.button").click(function(e){w(e),x(0)}),r()(e).find(".js-volume-up").click(function(){var e=r()(this).data("image-base");k(_),A(u+1,e)}),r()(e).find(".js-volume-down").click(function(){var e=r()(this).data("image-base");k(v),A(u-1,e)}),h.each(function(e){var n=r()(this).find(".js-question-option"),s=r()(this).data("image-base"),a=r()(this).find(".js-option-image");d.push({selected:0,el:this}),n.each(function(l){var o=s+l.toString()+".svg";(new Image).src=o,r()(this).find(".radio__input").click(function(){c=l,d[e].selected=l,a.attr("src",o),n.each(function(e){var n=e===l;r()(this).find(".radio__input").attr("checked",n),n?r()(this).find(i).removeClass(t):r()(this).find(i).addClass(t)})})}),r()(this).find(".js-continue-button a.button").click(function(e){w(e);var n=r()(".js-question-number-"+m.toString()).data("question-key");f="volume"===n?l.setAnswer(n,u):l.setAnswer(n,c),x(0===m&&0===c?m+2:2!==m||1!==c&&2!==c?m+1:m+2)})})}},30663(e,n,i){i.r(n),i.d(n,{default:()=>d}),i.dn(d);var t=i(58466),s=i.n(t),a=i(87493),r=i.n(a),l=(i(63348),i(21759),i(4267),i(22901),i(41669)),o=i.n(l);function d(e){var n="#breed-select-template",i={experience:{type:"range",field:"field_breed_owner_personality",values:[{min:1,max:3},{min:1,max:4},{min:1,max:5}]},training:{type:"range",field:"field_breed_trainability",values:[{min:4,max:5},{min:3,max:5},{min:1,max:5}]},"home-type":{type:"range",field:"field_breed_size",values:[{min:1,max:2},{min:1,max:3},{min:1,max:5}]},apartments:{type:"bool",field:"field_breed_apartment_suitable",values:[!0,!1]},children:{type:"range",field:"field_breed_good_with_children",values:[{min:5,max:5},{min:1,max:5}]},volume:{type:"range",field:"field_breed_barking_level",values:[{min:1,max:2},{min:1,max:2},{min:1,max:3},{min:1,max:3},{min:1,max:4},{min:1,max:4},{min:1,max:5},{min:1,max:5},{min:1,max:5},{min:1,max:5}]},shedding:{type:"range",field:"field_breed_shedding",values:[{min:1,max:2},{min:1,max:5}]},"activity-level":{type:"range",field:"field_breed_activity_level",values:[{min:1,max:2},{min:2,max:4},{min:3,max:5}]},"good-with-dogs":{type:"range",field:"field_breed_activity_level",values:[{min:3,max:5}]}},t=o()(n).data("json-breed-data");o()(n).data("json-question-data"),this.remainingBreeds=r()(t,"breed_rank"),this.answers=[],this.getAnswers=function(){return this.answers},this.setAnswer=function(e,n){var t=i[e];if(!t)return console.warn(e+" not foud"),this.remainingBreeds;this.answers.push({key:e,answer:n});var a=t.field;if("range"===t.type){var r=t.values[n];this.remainingBreeds=s()(this.remainingBreeds,function(e){return e[a]&&e[a].value&&e[a].value>=r.min&&e[a].value<=r.max})}else"bool"===t.type&&(this.remainingBreeds=s()(this.remainingBreeds,function(e){return e[a]&&!0===e[a]}));return"experience"===e&&1===n&&this.setAnswer("good-with-dogs",0),this.remainingBreeds},this.test=function(){console.log("all breeds",this.remainingBreeds.length),this.setAnswer("experience",2),console.log("experience",this.remainingBreeds.length),this.setAnswer("training",2),console.log("training",this.remainingBreeds.length),this.setAnswer("size",2),console.log("size",this.remainingBreeds.length),this.setAnswer("apartments",!1),console.log("ap
1artments",this.remainingBreeds.length),this.setAnswer("children",1),console.log("children",this.remainingBreeds.length),this.setAnswer("volume",9),console.log("volume",this.remainingBreeds.length),this.setAnswer("shedding",1),console.log("shedding",this.remainingBreeds.length),this.setAnswer("activity-level",2),console.log("activity-level",this.remainingBreeds.length)}}}}]);
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.