PageSourceSearch

https://form.racq.com.au/dist/racqforms20/js/678.be021a88.js

js racq.com.au collected 2026-09-24 09:07:31 UTC 12,671 bytes, 17 lines download raw bytes

1"use strict";(self["webpackChunkracqforms20"]=self["webpackChunkracqforms20"]||[]).push([[678],{70678:function(t,e,n){
2/*! *****************************************************************************
3Copyright (c) Microsoft Corporation.
4
5Permission to use, copy, modify, and/or distribute this software for any
6purpose with or without fee is hereby granted.
7
8THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14PERFORMANCE OF THIS SOFTWARE.
15***************************************************************************** */
16function o(t,e,n,o){var i,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(r=(a<3?i(r):a>3?i(e,n,r):i(e,n))||r);return a>3&&r&&Object.defineProperty(e,n,r),r}function i(t,e,n,o){function i(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,a){function r(t){try{d(o.next(t))}catch(e){a(e)}}function s(t){try{d(o["throw"](t))}catch(e){a(e)}}function d(t){t.done?n(t.value):i(t.value).then(r,s)}d((o=o.apply(t,e||[])).next())}))}function a(t){return t.replace(/[A-Z]+/g,(t=>`-${t}`)).replace(/^-/,"").toLowerCase()}function r(t){return function(e,n){const o=t||a(n);e.addObservedAttribute&&e.addObservedAttribute(o),Object.defineProperty(e,n,{get(){return this.getAttribute(o)},set(t){null===t||void 0===t?this.removeAttribute(o):this.setAttribute(o,t),this.notifyPropertyChanged(n)},enumerable:!0,configurable:!0})}}function s(t){return function(e,n){const o=t||a(n);e.addObservedAttribute&&e.addObservedAttribute(o),Object.defineProperty(e,n,{get(){return this.hasAttribute(o)},set(t){t?this.setAttribute(o,""):this.removeAttribute(o),this.notifyPropertyChanged(n)},enumerable:!0,configurable:!0})}}function d(t){return t?r(t):function(t,e){Object.defineProperty(t,e,{get(){return this[`$__${e}`]},set(t){this[`$__${e}`]=t,this.notifyPropertyChanged(e)},enumerable:!0,configurable:!0})}}function l(t){return function(e,n){Object.defineProperty(e,t,{get(){return this[n]},set(t){this[n]=t},enumerable:!0,configurable:!1})}}n.r(e),n.d(e,{default:function(){return f}});let c={};function u(t){const e=c[t];if(e)return e;const n=new Promise(((e,n)=>{const o=document.createElement("script");o.src=t,o.async=!0;const i=()=>{e()},a=()=>{r(),delete c[t],o.remove(),n(new Error(`Unable to load script ${t}`))};function r(){o.removeEventListener("load",i),o.removeEventListener("error",a)}o.addEventListener("load",i),o.addEventListener("error",a),document.body.appendChild(o)}));return c[t]=n,n}class h{constructor(t){this.handleClick=t=>i(this,void 0,void 0,(function*(){const e=this.config;if(!e)throw new Error("google-pay-button: Missing configuration");const n=this.createLoadPaymentDataRequest(e);try{if(e.onClick&&e.onClick(t),t.defaultPrevented)return;const o=yield this.client.loadPaymentData(n);e.onLoadPaymentData&&e.onLoadPaymentData(o)}catch(o){"CANCELED"===o.statusCode?e.onCancel&&e.onCancel(o):e.onError?e.onError(o):console.error(o)}})),this.options=t}getElement(){return this.element}isGooglePayLoaded(){var t,e;return"google"in(window||n.g)&&!!(null===(e=null===(t=null===google||void 0===google?void 0:google.payments)||void 0===t?void 0:t.api)||void 0===e?void 0:e.PaymentsClient)}mount(t){var e;return i(this,void 0,void 0,(function*(){if(!this.isGooglePayLoaded())try{yield u("https://pay.google.com/gp/p/js/pay.js")}catch(n){return void((null===(e=this.config)||void 0===e?void 0:e.onError)?this.config.onError(n):console.error(n))}this.element=t,t&&(this.appendStyles(),this.config&&this.updateElement())}))}unmount(){this.element=void 0}configure(t){let e;return this.config=t,this.oldInvalidationValues&&!this.isClientInvalidated(t)||(e=this.updateElement()),this.oldInvalidationValues=this.getInvalidationValues(t),null!==e&&void 0!==e?e:Promise.resolve()}createClientOptions(t){const e={environment:t.environment,merchantInfo:this.createMerchantInfo(t)};return(t.onPaymentDataChanged||t.onPaymentAuthorized)&&(e.paymentDataCallbacks={},t.onPaymentDataChanged&&(e.paymentDataCallbacks.onPaymentDataChanged=e=>{const n=t.onPaymentDataChanged(e);return n||{}}),t.onPaymentAuthorized&&(e.paymentDataCallbacks.onPaymentAuthorized=e=>{const n=t.onPaymentAuthorized(e);return n||{}})),e}createIsReadyToPayRequest(t){const e=t.paymentRequest,n={apiVersion:e.apiVersion,apiVersionMinor:e.apiVersionMinor,allowedPaymentMethods:e.allowedPaymentMethods,existingPaymentMethodRequired:t.existingPaymentMethodRequired};return n}createLoadPaymentDataRequest(t){const e=Object.assign(Object.assign({},t.paymentRequest),{merchantInfo:this.createMerchantInfo(t)});return e}createMerchantInfo(t){const e=Object.assign({},t.paymentRequest.merchantInfo);return e.softwareInfo||(e.softwareInfo={id:this.options.softwareInfoId,version:this.options.softwareInfoVersion}),e}isMounted(){return null!=this.element&&!1!==this.element.isConnected}removeButton(){if(this.element instanceof ShadowRoot||this.element instanceof Element)for(const t of Array.from(this.element.children))"STYLE"!==t.tagName&&t.remove()}updateElement(){return i(this,void 0,void 0,(function*(){if(!this.isMounted())return;const t=this.getElement();if(!this.config)throw new Error("google-pay-button: Missing configuration");this.removeButton();try{this.client=new google.payments.api.PaymentsClient(this.createClientOptions(this.config))}catch(r){return void(this.config.onError?this.config.onError(r):console.error(r))}const e={buttonType:this.config.buttonType,buttonColor:this.config.buttonColor,buttonRadius:this.config.buttonRadius,buttonSizeMode:this.config.buttonSizeMode,buttonLocale:this.config.buttonLocale,buttonBorderType:this.config.buttonBorderType,onClick:this.handleClick,allowedPaymentMethods:this.config.paymentRequest.allowedPaymentMethods},n=t.getRootNode();n instanceof ShadowRoot&&(e.buttonRootNode=n);const o=this.client.createButton(e);this.setClassName(t,[t.className,"not-ready"]),t.appendChild(o);let i,a=!1;try{i=yield this.client.isReadyToPay(this.createIsReadyToPayRequest(this.config)),a=i.result&&!this.config.existingPaymentMethodRequired||i.result&&i.paymentMethodPresent&&this.config.existingPaymentMethodRequired||!1}catch(r){this.config.onError?this.config.onError(r):console.error(r)}
16if(this.isMounted()){if(a){try{this.client.prefetchPaymentData(this.createLoadPaymentDataRequest(this.config))}catch(r){console.log("Error with prefetch",r)}this.setClassName(t,(t.className||"").split(" ").filter((t=>t&&"not-ready"!==t)))}if((this.isReadyToPay!==(null===i||void 0===i?void 0:i.result)||this.paymentMethodPresent!==(null===i||void 0===i?void 0:i.paymentMethodPresent))&&(this.isReadyToPay=!!(null===i||void 0===i?void 0:i.result),this.paymentMethodPresent=null===i||void 0===i?void 0:i.paymentMethodPresent,this.config.onReadyToPayChange)){const t={isButtonVisible:a,isReadyToPay:this.isReadyToPay};this.paymentMethodPresent&&(t.paymentMethodPresent=this.paymentMethodPresent),this.config.onReadyToPayChange(t)}}}))}setClassName(t,e){const n=e.filter((t=>t)).join(" ");n?t.className=n:t.removeAttribute("class")}appendStyles(){var t,e,n;if("undefined"===typeof document)return;const o=null===(t=this.element)||void 0===t?void 0:t.getRootNode(),i=`default-google-style-${this.options.cssSelector.replace(/[^\w-]+/g,"")}-${null===(e=this.config)||void 0===e?void 0:e.buttonLocale}`;if(o&&!(null===(n=o.getElementById)||void 0===n?void 0:n.call(o,i))){const t=document.createElement("style");t.id=i,t.type="text/css",t.innerHTML=`\n          ${this.options.cssSelector} {\n            display: inline-block;\n          }\n          ${this.options.cssSelector}.not-ready {\n            width: 0;\n            height: 0;\n            overflow: hidden;\n          }\n        `,o instanceof Document&&o.head?o.head.appendChild(t):o.appendChild(t)}}isClientInvalidated(t){if(!this.oldInvalidationValues)return!0;const e=this.getInvalidationValues(t);return e.some(((t,e)=>JSON.stringify(t)!==JSON.stringify(this.oldInvalidationValues[e])))}getInvalidationValues(t){var e,n;return[t.environment,t.existingPaymentMethodRequired,!!t.onPaymentDataChanged,!!t.onPaymentAuthorized,t.buttonType,t.buttonColor,t.buttonRadius,t.buttonLocale,t.buttonSizeMode,t.buttonBorderType,t.paymentRequest.merchantInfo.merchantId,t.paymentRequest.merchantInfo.merchantName,null===(e=t.paymentRequest.merchantInfo.softwareInfo)||void 0===e?void 0:e.id,null===(n=t.paymentRequest.merchantInfo.softwareInfo)||void 0===n?void 0:n.version,t.paymentRequest.allowedPaymentMethods]}}var y="@google-pay/button-element",m="3.2.1";function p(t,e=0){let n;return function(...o){window.clearTimeout(n);const i=function(){return n=void 0,t(...o)};return new Promise((t=>{n=window.setTimeout((()=>{const e=i();t(e)}),e)}))}}class f extends HTMLElement{constructor(){super(...arguments),this.manager=new h({cssSelector:"google-pay-button",softwareInfoId:y,softwareInfoVersion:m}),this.initializeButton=p((()=>
16{if(!this.assertRequiredProperty("paymentRequest"))return;if(!this.assertRequiredProperty("environment"))return;const t={paymentRequest:this.paymentRequest,environment:this.environment,existingPaymentMethodRequired:this.existingPaymentMethodRequired,onPaymentDataChanged:this.onPaymentDataChanged,onPaymentAuthorized:this.onPaymentAuthorized,buttonColor:this.buttonColor,buttonType:this.buttonType,buttonRadius:this.buttonRadius,buttonSizeMode:this.buttonSizeMode,buttonLocale:this.buttonLocale,buttonBorderType:this.buttonBorderType,onReadyToPayChange:t=>{this.onReadyToPayChange&&this.onReadyToPayChange(t),this.dispatch("readytopaychange",t)},onCancel:t=>{this.onCancel&&this.onCancel(t),this.dispatch("cancel",t)},onError:t=>{var e;this.onError&&(null===(e=this.onError)||void 0===e||e.call(this,t)),this.dispatchEvent(new ErrorEvent("error",{error:t}))},onLoadPaymentData:t=>{this.onLoadPaymentData&&this.onLoadPaymentData(t),this.dispatch("loadpaymentdata",t)},onClick:t=>{var e;this.onClick&&(null===(e=this.onClick)||void 0===e||e.call(this,t))}};this.manager.configure(t)}))}get isReadyToPay(){return this.manager.isReadyToPay}assertRequiredProperty(t){const e=this[t];return null!==e&&void 0!==e||(this.throwError(Error(`Required property not set: ${t}`)),!1)}throwError(t){throw t}static get observedAttributes(){return f._observedAttributes}addObservedAttribute(t){f._observedAttributes.push(t)}dispatch(t,e){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,cancelable:!1,detail:e}))}connectedCallback(){return i(this,void 0,void 0,(function*(){return yield this.manager.mount(this),this.initializeButton()}))}disconnectedCallback(){this.manager.unmount()}attributeChangedCallback(t){return this.initializeButton()}notifyPropertyChanged(t){return this.initializeButton()}}f._observedAttributes=[],o([d(),l("paymentrequest")],f.prototype,"paymentRequest",void 0),o([r()],f.prototype,"environment",void 0),o([s(),l("existingpaymentmethodrequired")],f.prototype,"existingPaymentMethodRequired",void 0),o([r(),l("buttoncolor")],f.prototype,"buttonColor",void 0),o([r(),l("buttontype")],f.prototype,"buttonType",void 0),o([r(),l("buttonradius")],f.prototype,"buttonRadius",void 0),o([r(),l("buttonsizemode")],f.prototype,"buttonSizeMode",void 0),o([r(),l("buttonlocale")],f.prototype,"buttonLocale",void 0),o([r(),l("buttonbordertype")],f.prototype,"buttonBorderType",void 0),o([d(),l("paymentDataChangedCallback"),l("paymentdatachangedcallback"),l("onpaymentdatachanged")],f.prototype,"onPaymentDataChanged",void 0),o([d(),l("paymentAuthorizedCallback"),l("paymentauthorizedcallback"),l("onpaymentauthorized")],f.prototype,"onPaymentAuthorized",void 0),o([l("readyToPayChangeCallback"),l("readytopaychangecallback"),l("onreadytopaychange")],f.prototype,"onReadyToPayChange",void 0),o([l("loadPaymentDataCallback"),l("loadpaymentdatacallback"),l("onloadpaymentdata")],f.prototype,"onLoadPaymentData",void 0),o([l("cancelCallback"),l("cancelcallback"),l("oncancel")],f.prototype,"onCancel",void 0),o([l("errorCallback"),l("errorcallback"),l("onerror")],f.prototype,"onError",void 0),o([l("clickCallback"),l("clickcallback"),l("onclick")],f.prototype,"onClick",void 0),customElements.define("google-pay-button",f)}}]);
17//# sourceMappingURL=678.be021a88.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.