PageSourceSearch

https://digitalmgs.com/wp-content/plugins/woocommerce-mercadopago/…-checkout-classic-observer.min.js?ver=8.9.3

js digitalmgs.com collected 2026-10-08 23:35:15 UTC 3,199 bytes, 1 lines download raw bytes

1class MobileCheckoutClassicObserver{INIT_TIMEOUT_DELAY=1e4;constructor(e,t,i,o=null){this._cardForm=e,this._isChoCustomInitiallySelected=t,this._onCheckoutUpdate=i,this._onOrderPayInit=o,this._updateInFlight=!1,this._recoveryInFlight=!1,this._checkoutUpdateReceived=!1,this._structure=this._getCheckoutStructureLabel(),this._boundGuardedUpdate=this._guardedUpdate.bind(this),jQuery(document.body).on("cfw_pre_updated_checkout",this._boundGuardedUpdate),jQuery(document).on("updated_checkout",this._boundGuardedUpdate),jQuery(document.body).on("payment_method_selected",this._boundGuardedUpdate),this._emitCheckoutStartedMetric(),this._scheduleInitFailureDetector(),this._initIfOrderPayPage()}_guardedUpdate(){if(this._checkoutUpdateReceived=!0,clearTimeout(this._initTimeout),this._updateInFlight)return;this._updateInFlight=!0;const e=this._recoveryInFlight;this._recoveryInFlight=!1;let t=!1;Promise.resolve().then((()=>this._onCheckoutUpdate())).catch((e=>{t=!0,this._cardForm?.removeLoadSpinner?.(),this._emitUpdateErrorMetric(e)})).finally((()=>{this._updateInFlight=!1,e&&!t&&this._emitRecoveredMetric(!!this._cardForm?.formMounted)}))}_emitCheckoutStartedMetric(){"function"==typeof sendMetric&&sendMetric(this._getDeviceLabel(),this._structure,"mp_custom_checkout_mobile_started")}_emitUpdateErrorMetric(e){if("function"==typeof sendMetric){const t=e?.message||e?.name||"unknown";sendMetric(this._getDeviceLabel(),`${this._structure}/reason:${t}`,"mp_custom_checkout_mobile_update_error")}}_emitRecoveredMetric(e){"function"==typeof sendMetric&&sendMetric(this._getDeviceLabel(),`${this._structure}/mounted:${e?"yes":"no"}`,"mp_custom_checkout_mobile_recovered")}_scheduleInitFailureDetector(){this._initTimeout=setTimeout((()=>{if(!this._cardForm?.formMounted&&this._isChoCustomInitiallySelected?.()){if("function"==typeof sendMetric){const e=this._checkoutUpdateReceived?"yes":"no";sendMetric(this._getDeviceLabel(),`${this._structure}/event_received:${e}`,"mp_custom_checkout_mobile_timeout")}this._checkoutUpdateReceived||(this._recoveryInFlight=!0,this._guardedUpdate())}}),this.INIT_TIMEOUT_DELAY)}_getDeviceLabel(){const e=navigator.userAgent,t=e.match(/iPhone OS (\d+[_.]\d*)/);if(t)return`ios_${t[1].replace(/_/g,".")}`;const i=e.match(/Android (\d+\.?\d*)/);return i?`android_${i[1]}`:"other"}_getCheckoutStructureLabel(){try{const e=document.querySelector("form.woocommerce-checkout");return e?this._isFormHiddenByMultiStepPlugin(e)?"form-hidden":this._isFormWrappedOutsideWooCommerce(e)?"form-wrapped":"standard":"no-wc-form"}catch(e){return"unknown"}}_isFormHiddenByMultiStepPlugin(e){return null===e.offsetParent}_isFormWrappedOutsideWooCommerce(e){return!e.closest(".woocommerce")&&e.parentElement!==document.body}_initIfOrderPayPage(){(document.body?.classList?.contains("woocommerce-order-pay")||!!document.querySelector("form#order_review"))&&"function"==typeof this._onOrderPayInit&&this._onOrderPayInit()}destroy(){clearTimeout(this._initTimeout),jQuery(document.body).off("cfw_pre_updated_checkout",this._boundGuardedUpdate),jQuery(document).off("updated_checkout",this._boundGuardedUpdate),jQuery(document.body).off("payment_method_selected",this._boundGuardedUpdate)}}

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.