function cf7msm_uniqueArray(e,t){for(var s={},r=[],n=2;n--;e=t)e.map(function(e){s[e]=s[e]||r.push(e)});return r}function cf7msm_hasSS(){var e="test";try{return sessionStorage.setItem(e,e),sessionStorage.removeItem(e),!0}catch(e){return!1}}function quoteattr(e,t){return t=t?"&#13;":"\n",(""+e).replace(/&/g,"&amp;").replace(/'/g,"&apos;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r\n/g,t).replace(/[\r\n]/g,t)}function escapeattr(e){return(""+e).replace(/\\/g,"\\\\").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\u00A0/g,"\\u00A0").replace(/&/g,"\\x26").replace(/'/g,"\\x27").replace(/"/g,"\\x22").replace(/</g,"\\x3C").replace(/>/g,"\\x3E")}var cf7msm_ss;jQuery(document).ready(function($){var e=cf7msm_posted_data,t=$("input[name='cf7msm-step']");if(0!=t.length){if(cf7msm_hasSS()){if(null!=(cf7msm_ss=sessionStorage.getObject("cf7msm"))&&t.length>0){var s=$(t[0].form);$.each(cf7msm_ss,function(e,r){"cf7msm_prev_urls"==e&&s.find(".wpcf7-back, .wpcf7-previous").click(function(e){window.location.href=r[t.val()],e.preventDefault()})})}}else $("input[name='cf7msm-no-ss']").val(1),$(".wpcf7-previous").hide();if(e){var s=$(t[0].form);$.each(e,function(e,t){if(e.indexOf("[]")===e.length-2&&(e=e.substring(0,e.length-2)),(0!=e.indexOf("_")||0==e.indexOf("_wpcf7_radio_free_text_")||0==e.indexOf("_wpcf7_checkbox_free_text_"))&&"cf7msm-step"!=e){var r=s.find('*[name="'+e+'"]:not([data-cf7msm-previous])'),n=s.find('input[name="'+e+'[]"]:not([data-cf7msm-previous])');r.length>0?"radio"==r.prop("type")||"checkbox"==r.prop("type")?r.filter(function(){return $(this).val()==t}).prop("checked",!0):r.val(t):n.length>0&&t.constructor===Array&&""!=t&&t.length>0&&$.each(t,function(e,t){n.filter(function(){return $(this).val()==t}).prop("checked",!0)})}})}document.addEventListener("wpcf7mailsent",function(e){if(cf7msm_hasSS()){var t=0,s=0,r=[],n={};cf7msm_ss=sessionStorage.getObject("cf7msm"),cf7msm_ss||(cf7msm_ss={}),$.each(e.detail.inputs,function(c){var a=e.detail.inputs[c].name,f=e.detail.inputs[c].value;if(a.indexOf("[]")===a.length-2?(-1===$.inArray(a,r)&&(n[a]=[]),n[a].push(f)):n[a]=f,"cf7msm-step"===a){if(-1!==f.indexOf("-")){var i={};cf7msm_ss&&cf7msm_ss.cf7msm_prev_urls&&(i=cf7msm_ss.cf7msm_prev_urls);var m=f.split("-");if(t=parseInt(m[0]),s=parseInt(m[1]),nextUrl=m[2],t<s){var o=1+parseInt(t)+"-"+s;i[o]=window.location.href,$("#"+e.detail.unitTag).find("div.wpcf7-mail-sent-ok").remove()}else t===s&&$("#"+e.detail.unitTag+" form").children().not("div.wpcf7-response-output").hide();cf7msm_ss.cf7msm_prev_urls=i}}else r.push(a)}),0!=t&&t===s&&(cf7msm_ss={}),sessionStorage.setObject("cf7msm",cf7msm_ss)}},!1)}}),Storage.prototype.setObject=function(e,t){this.setItem(e,JSON.stringify(t))},Storage.prototype.getObject=function(e){var t=this.getItem(e);return t&&JSON.parse(t)};