webviewjsbridge.umd.min.js 1.5 KB

1
  1. !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(this,function(){return function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=9)}({3:function(e,t,n){"use strict";e.exports=function(e){var t=e.headers||{},n=(t["content-type"]||t["Content-Type"]||"").toString().toLowerCase();-1!==n.indexOf("image")&&-1===e.responseText.indexOf("base64")&&(e.responseText="data:"+n+";base64,"+e.responseText)}},9:function(e,t,n){function o(e){if(window.WebViewJavascriptBridge)return e(WebViewJavascriptBridge);if(window.WVJBCallbacks)return window.WVJBCallbacks.push(e);window.WVJBCallbacks=[e];var t=document.createElement("iframe");t.style.display="none",t.src="https://__bridge_loaded__",document.documentElement.appendChild(t),setTimeout(function(){document.documentElement.removeChild(t)},0)}function r(e,t){o(function(n){n.callHandler("onAjaxRequest",e,function(n){n=JSON.parse(n),"stream"===e.responseType&&i(n),t(n)})})}var i=n(3);e.exports=r}})});