PageSourceSearch

https://seaworldparks.co.uk/wp-content/themes/basejump/js/libs/postcode-plugin.min.js?ver=7.0.5

js seaworldparks.co.uk collected 2026-10-04 07:13:17 UTC 9,137 bytes, 4 lines download raw bytes

1/*! Ideal Postcodes jQuery Plugin - v3.0.4 - 2016-07-29
2* https://github.com/ideal-postcodes/jquery.postcodes
32016 Ideal Postcodes; Licensed MIT */
4!function(a){"use strict";function b(b){this.config={},a.extend(this,e),b&&a.extend(this,b);var c={};for(var d in this.output_fields)void 0!==this.output_fields[d]&&(c[d]=a(this.output_fields[d]));this.$output_fields=c}var c=[],d={},e={api_key:"",output_fields:{line_1:"#line_1",line_2:"#line_2",line_3:"#line_3",post_town:"#post_town",postcode:"#postcode",postcode_inward:void 0,postcode_outward:void 0,udprn:void 0,dependant_locality:void 0,double_dependant_locality:void 0,thoroughfare:void 0,dependant_thoroughfare:void 0,building_number:void 0,building_name:void 0,sub_building_name:void 0,po_box:void 0,department_name:void 0,organisation_name:void 0,postcode_type:void 0,su_organisation_indicator:void 0,delivery_point_suffix:void 0},endpoint:"https://api.ideal-postcodes.co.uk/v1",input:void 0,$input:void 0,input_label:"Please enter your postcode",input_muted_style:"color:#CBCBCB;",input_class:"",input_id:"idpc_input",button:void 0,$button:void 0,button_id:"idpc_button",button_label:"Find my Address",button_class:"",button_disabled_message:"Looking up postcode...",$dropdown:void 0,dropdown_id:"idpc_dropdown",dropdown_select_message:"Please select your address",dropdown_class:"",dropdown_container:void 0,$error_message:void 0,error_message_id:"idpc_error_message",error_message_invalid_postcode:"Please check your postcode, it seems to be incorrect",error_message_not_found:"Your postcode could not be found. Please type in your address",error_message_address_not_found:"We could not find a match for your address. Please type in your address",error_message_default:"Sorry, we weren't able to get the address you were looking for. Please type your address manually",error_message_class:"",error_message_container:void 0,address_search:!1,last_lookup:"",disable_interval:1e3,debug_mode:!1,check_key:!1,remove_organisation:!1,licensee:null,address_formatters:{postcode_search:function(a){var b=[a.line_1];return""!==a.line_2&&b.push(a.line_2),b.join(" ")},address_search:function(a){var b=[a.line_1];return""!==a.line_2&&b.push(a.line_2),b.push(a.post_town),b.push(a.postcode_outward),b.join(", ")}},onLoaded:void 0,onFailedCheck:void 0,onSearchCompleted:void 0,onAddressesRetrieved:void 0,onAddressSelected:void 0,onDropdownCreated:void 0,onLookupTriggered:void 0,shouldLookupTrigger:void 0,onSearchError:void 0,tags:void 0};b.prototype.setupPostcodeInput=function(a){this.$context=a,this.setupInputField(),this.setupLookupButton()},b.prototype.setupInputField=function(){var b=this;return a(this.input).length?this.$input=a(this.input).first():this.$input
vendor: 4,665 bytes, line 4
4=a("<input />",{type:"text",id:this.input_id,value:this.input_label}).appendTo(this.$context).addClass(this.input_class).val(this.input_label).attr("style",this.input_muted_style).submit(function(){return!1}).keypress(function(a){13===a.which&&b.$button.trigger("click")}).focus(function(){b.$input.removeAttr("style").val("")}).blur(function(){b.$input.val()||(b.$input.val(b.input_label),b.$input.attr("style",b.input_muted_style))}),this.$input},b.prototype.setupLookupButton=function(){var b=this;return a(b.button).length?b.$button=a(b.button).first():b.$button=a("<button />",{html:b.button_label,id:b.button_id,type:"button"}).appendTo(b.$context).addClass(b.button_class).attr("onclick","return false;").submit(function(){return!1}),b.$button.click(function(){b.onLookupTriggered&&b.onLookupTriggered.call(b);var a=function(){var a=b.$input.val();b.last_lookup!==a&&(b.last_lookup=a,b.clearAll(),b.disableLookup(),b.executeSearch(a))};return b.shouldLookupTrigger?b.shouldLookupTrigger.call(b,a):a(),!1}),b.$button},b.prototype.disableLookup=function(a){this.button||(a=a||this.button_disabled_message,this.$button.prop("disabled",!0).html(a))},b.prototype.enableLookup=function(){if(!this.button){var a=this;0===a.disable_interval?a.$button.prop("disabled",!1).html(a.button_label):setTimeout(function(){a.$button.prop("disabled",!1).html(a.button_label)},a.disable_interval)}},b.prototype.clearAll=function(){this.setDropDown(),this.setErrorMessage()},b.prototype.removeAll=function(){this.$context=null,a.each([this.$input,this.$button,this.$dropdown,this.$error_message],function(a,b){b&&b.remove()})},b.prototype.executeSearch=function(a){var b,c=this,d=function(d,e,f){c.enableLookup(),c.cacheSearchResults(f),d?(b=c.debug_mode?d.message:c.error_message_default,c.setErrorMessage(b),c.onSearchError&&c.onSearchError.call(c,d)):e.length>0?(c.last_lookup=a,c.onAddressesRetrieved&&c.onAddressesRetrieved.call(c,e),c.setDropDown(e)):(b=c.address_search?c.error_message_address_not_found:c.error_message_not_found,c.setErrorMessage(b)),c.onSearchCompleted&&c.onSearchCompleted.call(c,f)};return c.address_search?c.executeAddressSearch(a,d):c.executePostcodeSearch(a,d)},b.prototype.executePostcodeSearch=function(b,c){var d=this,e={query:b,api_key:d.api_key};d.tags&&(e.tags=d.tags),d.licensee&&(e.licensee=d.licensee),a.idealPostcodes.lookupPostcode(e,c)},b.prototype.executeAddressSearch=function(b,c){var d=this,e={query:b,api_key:d.api_key};"object"==typeof d.address_search&&(e.limit=d.address_search.limit||10),d.tags&&(e.tags=d.tags),d.licensee&&(e.licensee=d.licensee),a.idealPostcodes.lookupAddress(e,c)},b.prototype.cacheSearchResults=function(a){return null===a?null:(this.response_code=a.code,this.response_message=a.message,this.result=a.result,a)},b.prototype.setDropDown=function(b){var c=this,d=c.address_formatters.postcode_search;if(c.address_search&&(d=c.address_formatters.address_search),this.$dropdown&&this.$dropdown.length&&(this.$dropdown.remove(),delete this.$dropdown),b){var e=a("<select />",{id:c.dropdown_id}).addClass(c.dropdown_class);a("<option />",{value:"ideal",text:c.dropdown_select_message}).appendTo(e);for(var g=b.length,h=0;g>h;h+=1)a("<option />",{value:h,text:d(b[h])}).appendTo(e);var i;return i=a(this.dropdown_container).length?a(this.dropdown_container).first():this.$context,e.appendTo(i).change(function(){var d,e=a(this).val();e>=0&&(d=c.remove_organisation?f(b[e]):b[e],c.setAddressFields(d),c.onAddressSelected&&c.onAddressSelected.call(c,d))}),c.onDropdownCreated&&c.onDropdownCreated.call(c,e),c.$dropdown=e,e}},b.prototype.setErrorMessage=function(b){if(this.$error_message&&this.$error_message.length&&(this.$error_message.remove(),delete this.$error_message),b){var c;return c=a(this.error_message_container).length?a(this.error_message_container).first():this.$context,this.$error_message=a("<p />",{html:b,id:this.error_message_id}).addClass(this.error_message_class).appendTo(c),this.$error_message}},b.prototype.setAddressFields=function(a){a=a||{};for(var b in this.$output_fields)this.$output_fields[b].val(a[b]||"")};var f=function(a){return 0!==a.organisation_name.length&&a.line_1===a.organisation_name&&(a.line_1=a.line_2,a.line_2=a.line_3,a.line_3=""),a},g=function(a){return a.code+" - "+a.message};a.idealPostcodes={defaults:function(){return e},keyCheckCache:d,lookupPostcode:function(b,c){var d,f=b.query||b.postcode||"",h=b.api_key||"",i=e.endpoint,j="postcodes",k=[i,j,encodeURI(f)].join("/"),l={api_key:h};d=b.error?b.error:function(a,b){return c(new Error("Request Failed: "+b),[],null,a)},b.tags&&a.isArray(b.tags)&&(l.tags=b.tags.join(",")),b.licensee&&(l.licensee=b.licensee);
4var m={url:k,data:l,dataType:"jsonp",timeout:1e4,success:function(a,b,d){return 2e3===a.code?c(null,a.result,a,d):4040===a.code?c(null,[],a,d):c(new Error(g(a)),[],a,d)},error:d};a.ajax(m)},lookupAddress:function(b,c){var d,f=b.query||"",h=b.api_key||"",i=e.endpoint,j="addresses",k=[i,j].join("/"),l={api_key:h,query:f};d=b.error?b.error:function(a,b){return c(new Error("Request Failed: "+b),[],null,a)},l.limit=b.limit||10,b.tags&&a.isArray(b.tags)&&(l.tags=b.tags.join(",")),b.licensee&&(l.licensee=b.licensee);var m={url:k,data:l,dataType:"jsonp",timeout:1e4,success:function(a,b,d){return 2e3===a.code?c(null,a.result.hits,a,d):c(new Error(g(a)),[],a,d)},error:d};a.ajax(m)},checkKey:function(b,c,f){var g=b.api_key||"";f=f||function(){};var h=d[g];if("boolean"==typeof h)return h?c():f();if("object"==typeof h)return d[g].success.push(c),void d[g].error.push(f);d[g]={success:[c],error:[f]};var i=e.endpoint,j="keys",k=[i,j,g].join("/"),l={url:k,dataType:"jsonp",timeout:1e4};b.licensee&&(l.data={licensee:b.licensee}),l.success=function(b){if(b&&b.result&&b.result.available){var c=d[g].success;d[g]=!0,a.each(c,function(a,c){c.call(null,b)})}else{var e=d[g].error;d[g]=!1,a.each(e,function(a,b){b.call()})}},l.error=function(){var b=d[g].error;delete d[g],a.each(b,function(a,b){b.call()})},a.ajax(l)},clearAll:function(){for(var a=c.length,b=0;a>b;b+=1)c[b].removeAll()}},a.fn.setupPostcodeLookup=function(d){var e=this;if(0===e.length)return e;var f=function(){a.each(e,function(e,f){var g=new b(d);c.push(g),g.setupPostcodeInput(a(f))}),a.isFunction(d.onLoaded)&&d.onLoaded.call(e)},g=function(){a.isFunction(d.onFailedCheck)&&d.onFailedCheck.call(e)};return d.check_key?a.idealPostcodes.checkKey({api_key:d.api_key},f,g):f(),e}}(jQuery);

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.