PageSourceSearch

https://www.buffalowildwings.com/_next/static/chunks/992.ff45b8cc8b8caf17.js

js buffalowildwings.com collected 2026-09-24 09:09:42 UTC 10,419 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[992],{89084:function(e,t,i){i.d(t,{B:function(){return s},I:function(){return o},P:function(){return d},a:function(){return l}});var r,n=i(59499),a=i(44865),s={INACTIVE:"inactive",DISABLED:"disabled",SUCCESS:"success",ERROR:"error",EMPTY_ERROR:"empty_error"},o={SINGLE_LINE:"SingleLine",MULTILINE:"MultiLine",PROMO_CODE:"PromoCode",PASSWORD:"Password"},l={DECIMAL:"decimal",EMAIL:"email",NUMERIC:"numeric",SEARCH:"search",TEL:"tel",TEXT:"text",URL:"url"},u="Remove",h="Apply",d={PROMO_CODE_BUTTON_LABEL:(r={},(0,n.Z)(r,s.SUCCESS,u),(0,n.Z)(r,s.DISABLED,h),(0,n.Z)(r,s.EMPTY_ERROR,h),(0,n.Z)(r,s.ERROR,u),(0,n.Z)(r,s.INACTIVE,h),r),PROMO_CODE_BUTTON_VARIANT_TYPE:a.V.SECONDARY,PROMO_CODE_BUTTON_VARIANT:a.a.SMALL}},50992:function(e,t,i){i.r(t),i.d(t,{email_phone_input:function(){return h}});var r=i(92777),n=i(82262),a=i(48625),s=i(89084),o=i(72657),l=i(74646),u=i(39819);i(44865),i(60594);var h=function(){function e(t){var i=this;(0,r.Z)(this,e),(0,a.r)(this,t),this.valueChanged=(0,a.c)(this,"valueChanged",7),this.inputBlur=(0,a.c)(this,"inputBlur",7),this.maxPhoneDigits=10,this.handleKeyDown=function(e){if(i.inputMode===u.E.PHONE){var t=e.key,r=/^\d$/.test(t),n=e.metaKey||e.ctrlKey;if(!["Backspace","Delete","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Tab","Enter","Home","End"].includes(t)&&!r&&!n){e.preventDefault();return}r&&!n&&i.isPhoneDigitLimitReached(e)&&e.preventDefault()}},this.handlePaste=function(e){if(i.inputMode===u.E.PHONE){var t,r,n=e.detail;n.preventDefault();var a=null!==(r=null===(t=n.clipboardData)||void 0===t?void 0:t.getData("text"))&&void 0!==r?r:"",s=i.normalizePhoneDigits(a);i.internalValue=s,i.showError=!1,i.updateInputState(i.internalValue,!0),i.valueChanged.emit({value:i.internalValue,type:i.inputType,isValid:i.isInputValid,errorMessage:i.inputError})}},this.handleValueChanged=function(e){e.stopPropagation();var t=e.detail.value;if(i.inputMode===u.E.PHONE)t=i.normalizePhoneDigits(t);else if(i.inputMode===u.E.BOTH){var r=/\d/.test(t),n=/@/.test(t);r&&!n&&(t=i.stripUsCountryCode(t.replace(/\D/g,"")))}i.internalValue=t,i.showError=!1,i.updateInputState(i.internalValue,!0),i.valueChanged.emit({value:i.internalValue,type:i.inputType,isValid:i.isInputValid,errorMessage:i.inputError})},this.handleBlur=function(e){e.stopPropagation(),i.showError=!0,i.ensureErrorMessage(),i.inputBlur.emit(e.detail)},this.getInputVariant=function(){return i.variant?i.variant:i.showAlreadyExistError||i.showError&&!i.isInputValid?s.B.ERROR:s.B.INACTIVE}
1,this.getInputMode=function(){return i.inputMode===u.E.EMAIL?s.a.EMAIL:i.inputMode===u.E.PHONE?s.a.TEL:i.inputType===u.a.PHONE?s.a.TEL:s.a.EMAIL},this.getMaxLength=function(){return i.inputMode===u.E.PHONE?void 0:i.maxLength},this.getDisplayValue=function(){if(i.inputMode!==u.E.EMAIL&&i.inputType===u.a.PHONE){var e=i.internalValue.replace(/\D/g,"");return(0,o.m)(e)}return i.internalValue},this.label=void 0,this.placeholder=void 0,this.value="",this.isRequired=!0,this.maxLength=void 0,this.errorMessages=void 0,this.forceShowError=!1,this.inputMode=u.E.BOTH,this.variant=void 0,this.isEditable=!0,this.showAlreadyExistError=!1,this.autocomplete=void 0,this.name=void 0,this.internalValue="",this.inputType=u.a.EMAIL,this.inputError="",this.isInputValid=!1,this.showError=!1}return(0,n.Z)(e,[{key:"componentWillLoad",value:function(){var e;this.internalValue=null!==(e=this.value)&&void 0!==e?e:"",this.updateInputState(this.internalValue),this.showAlreadyExistError&&this.applyAlreadyExistError(),this.internalValue&&this.valueChanged.emit({value:this.internalValue,type:this.inputType,isValid:this.isInputValid,errorMessage:this.inputError})}},{key:"handleValueChange",value:function(e){this.internalValue=null!=e?e:"",this.updateInputState(this.internalValue)}},{key:"handleForceShowErrorChange",value:function(e){e&&(this.showError=!0,this.ensureErrorMessage())}},{key:"handleShowAlreadyExistErrorChange",value:function(e){e?this.applyAlreadyExistError():(this.showError=!1,this.updateInputState(this.internalValue))}},{key:"applyAlreadyExistError",value:function(){this.showError=!0,this.isInputValid=!1;var e,t,i=null===(t=null===(e=this.errorMessages)||void 0===e?void 0:e[this.inputType])||void 0===t?void 0:t.alreadyExists;i&&(this.inputError=i)}},{key:"updateInputState",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=(0,l.v)(null!=e?e:"",this.errorMessages,this.inputMode);this.inputType=i.type,this.isInputValid=i.isValid,this.inputError=i.errorMessage||"",!t&&this.showAlreadyExistError&&this.applyAlreadyExistError()}},{key:"ensureErrorMessage",value:function(){var e,t,i;if(this.internalValue.trim())this.isInputValid||this.updateInputState(this.internalValue);else{var r=this.inputType===u.a.EMAIL?l.I:l.b;this.inputError=null!==(i=null===(t=null===(e=this.errorMessages)||void 0===e?void 0:e[this.inputType])||void 0===t?void 0:t.empty)&&void 0!==i?i:r,this.isInputValid=!1}}},{key:"isPhoneDigitLimitReached",value:function(e){var t,i=e.target;return(!i||i.selectionStart===i.selectionEnd)&&(null!==(t=null==i?void 0:i.value)&&void 0!==t?t:this.internalValue).replace(/\D/g,"").length>=this.maxPhoneDigits}},{key:"stripUsCountryCode",value:function(e){return 11===e.length&&e.startsWith("1")?e.slice(1):e}},{key:"normalizePhoneDigits",value:function(e){return this.stripUsCountryCode(e.replace(/\D/g,"")).slice(0,this.maxPhoneDigits)}},{key:"render",value:function(){return(0,a.h)("basic-input",{key:"71bb8046c5896e8835c528a194a2a5cf30272076",variant:this.getInputVariant(),"basic-input-label":this.label,placeholder:this.placeholder,"basic-input-value":this.getDisplayValue(),"error-message":this.inputError,"input-type":s.I.SINGLE_LINE,"input-mode":this.getInputMode(),"max-length":this.getMaxLength(),isRequired:this.isRequired,isEditable:this.isEditable,showErrorMessage:this.showError,autocomplete:this.autocomplete,name:this.name,inputId:"".concat(this.name,"-input"),onValueChanged:this.handleValueChanged,onInputBlur:this.handleBlur,onKeyDown:this.handleKeyDown,onInputPaste:this.handlePaste})}}],[{key:"watchers",get:function(){return{value:["handleValueChange"],forceShowError:["handleForceShowErrorChange"],showAlreadyExistError:["handleShowAlreadyExistErrorChange"]}}}]),e}();h.style=".sc-email-phone-input-h{display:block}"},72657:function(e,t,i){i.d(t,{a:function(){return o},m:function(){return s}});var r=i(52100);i(60594);var n=/^(\d?)(\d?)(\d?)(\d?)(\d?)(\d?)(\d?)(\d?)(\d?)(\d?)(.*)/,a=/^(\d?)(\d?)(\d?)(\d?)(\d?)(\d?)(\d?)(\d?)/,s=function(e){return(0,r.q)(e).replace(n,function(e,t,i,r,n,a,s,o,l,u,h){return"".concat(t&&"(").concat(t||"").concat(i||"").concat(r||"").concat(n&&") ").concat(n||"").concat(a||"").concat(s||"").concat(o&&"-").concat(o||"").concat(l||"").concat(u||"").concat(h||"")})},o=function(e){return(0,r.q)(e).replace(a,function(e,t,i,r,n,a,s,o,l){var u="".concat(t||"").concat(i||""),h="".concat(r||"").concat(n||""),d="".concat(a||"").concat(s||"").concat(o||"").concat(l||""),c=u;return r&&(c+="/".concat(h)),a&&(c+="/".concat(d)),c})}},39819:function(e,t,i){var r,n,a,s;i.d(t,{E:function(){return n},a:function(){return r}}
1),(a=r||(r={})).EMAIL="email",a.PHONE="phone",(s=n||(n={})).EMAIL="email",s.PHONE="phone",s.BOTH="both"},74646:function(e,t,i){i.d(t,{I:function(){return a},a:function(){return c},b:function(){return n},p:function(){return d},v:function(){return g}});var r=i(39819),n="Please enter your phone number",a="Please enter your email address",s=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,10}$/,o=/^\d{10}$/,l=/@/,u=/^[\d\s\-().+]+$/,h=/^\d{3}\.\d{3}\.\d{4}$/,d=function(e){var t=e.trim().split(/\s+/);return 0===t.length?{firstName:"",lastName:""}:1===t.length?{firstName:t[0]||"",lastName:""}:{firstName:t[0]||"",lastName:t.slice(1).join(" ")}},c=function(e){var t=e.trim(),i=d(t),r=i.firstName,n=i.lastName,a=!t||!r||!n;if(a)return{isValid:!1,isEmptyOrIncomplete:a,hasNoLetter:!1,isTooShort:!1,isTooLong:!1,hasInvalidChars:!1};var s=t.replace(/\s+/g," "),o=t.length,l=!/[A-Za-z]/.test(r)||!/[A-Za-z]/.test(n),u=o>0&&o<2,h=r.length>30||n.length>30,c=!/^[A-Za-z]+(['\u2019-][A-Za-z]+)*\.?( [A-Za-z]+(['\u2019-][A-Za-z]+)*\.?)*$/.test(s);return{isValid:!l&&!u&&!h&&!c,isEmptyOrIncomplete:!1,hasNoLetter:l,isTooShort:u,isTooLong:h,hasInvalidChars:c}},p=function(e,t){var i,r,n,o={empty:null!==(i=null==t?void 0:t.empty)&&void 0!==i?i:a,incorrect:null!==(r=null==t?void 0:t.incorrect)&&void 0!==r?r:"Enter a valid email address",domainIncorrect:null!==(n=null==t?void 0:t.domainIncorrect)&&void 0!==n?n:"Email domain is not allowed"},l=e.trim().toLowerCase();if(!l)return{isValid:!1,errorMessage:o.empty};if(!l.includes("@"))return{isValid:!1,errorMessage:o.incorrect};var u=l.split("@");if(2!==u.length||!u[0]||!u[1])return{isValid:!1,errorMessage:o.incorrect};var h=u[0],d=u[1];if(!d||""===d.trim())return{isValid:!1,errorMessage:o.domainIncorrect};if(/\.\./.test(h)||h.endsWith(".")||l.length>254||d.startsWith(".")||d.endsWith(".")||/\.\./.test(d)||/\s/.test(d)||/\s/.test(h))return{isValid:!1,errorMessage:o.incorrect};if(!d.includes("."))return{isValid:!1,errorMessage:o.domainIncorrect};var c=d.split("."),p=c[c.length-1]||"";return/^[a-zA-Z]{2,10}$/.test(p)?s.test(l)?{isValid:!0}:{isValid:!1,errorMessage:o.incorrect}:{isValid:!1,errorMessage:o.domainIncorrect}},E=function(e,t){var i,r,a={empty:null!==(i=null==t?void 0:t.empty)&&void 0!==i?i:n,incorrect:null!==(r=null==t?void 0:t.incorrect)&&void 0!==r?r:"Enter a valid phone number"},s=e.replace(/\D/g,"");return s?o.test(s)?{isValid:!0}:{isValid:!1,errorMessage:a.incorrect}:{isValid:!1,errorMessage:a.empty}},v=function(e){if(!e||l.test(e))return r.a.EMAIL;if(u.test(e)){if(e.includes(".")){if(h.test(e))return r.a.PHONE}else if(e.replace(/\D/g,"").length>=4)return r.a.PHONE}return r.a.EMAIL},g=function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r.E.BOTH,n=e.trim();if(i===r.E.EMAIL)return Object.assign(Object.assign({},p(n,null==t?void 0:t.email)),{type:r.a.EMAIL});if(i===r.E.PHONE)return Object.assign(Object.assign({},E(n,null==t?void 0:t.phone)),{type:r.a.PHONE});var a=v(n);return a===r.a.EMAIL?Object.assign(Object.assign({},p(n,null==t?void 0:t.email)),{type:r.a.EMAIL}):a===r.a.PHONE?Object.assign(Object.assign({},E(n,null==t?void 0:t.phone)),{type:r.a.PHONE}):{isValid:!1,type:r.a.EMAIL}}}}]);
2//# sourceMappingURL=992.ff45b8cc8b8caf17.js.map

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.