nimble-ui
Version:
1 lines • 13.2 kB
JavaScript
module.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s="nHB9")}({"0Zk/":function(t,e,n){"use strict";e.a=function(t,e){return Object(r.a)(t,e).replace(/^[a-z]/,function(t){return t.toUpperCase()})};var r=n("lXuC")},"5fCB":function(t,e,n){"use strict";var r=n("E5mE"),o=n("eY/N");e.a=function t(){for(var e=!0,n=void 0,i=arguments.length,s=Array(i),a=0;a<i;a++)s[a]=arguments[a];if(s instanceof Array&&(n=s.slice(0,1)[0]),"boolean"==typeof n&&(e=n,s.splice(0,1),e||(n=s.splice(0,1)[0])),s&&s.length<1)return"boolean"==typeof n?s[1]:n;e&&(n=null);for(var u=0;u<s.length;u++){var c=s[u];if(c instanceof Object)if(e){for(var f in n&&n instanceof Object||(n=c instanceof Array?[]:{}),c)if(c.hasOwnProperty(f)){var l=c[f];if(h(l)){var p=h(n[f])&&n[f]||(l instanceof Array?[]:{});n[f]=t(p,l)}else void 0!==l?n[f]=l:void 0!==n[f]&&(n[f]=l)}}else n=n&&n instanceof Object?Object.assign(n,c):c}return n;function h(t){return t&&(Object(r.a)(t,"Array")||Object(o.a)(t))||!1}}},E5mE:function(t,e,n){"use strict";e.a=function(t,e){var n=!1;try{n=Object.prototype.toString.call(t)==="[object "+e+"]"}catch(t){}return n}},FNmr:function(t,e,n){"use strict";e.a=function(t,e){var n="";if(t&&e)if(e.name){var o="$s"+(n=Object(r.a)(e.name));t.prototype&&!t.prototype[o]&&function(t,e,n){if(t&&e&&n){t[n]=e;try{Object.defineProperty(t,n,{get:function(){var t=this;return e._getParent=function(){return t},e},enumerable:!1,configurable:!1})}catch(t){}}}(t.prototype,e,o)}else console.error("Mount is not defined for the image name");return n};var r=n("0Zk/")},XAAj:function(t,e,n){"use strict";e.a=function(t){var e=document.createEvent("undefined"!=typeof MouseEvent?"MouseEvents":"Event");return e.initEvent(t,!0,!1),e}},Z05q:function(t,e,n){"use strict";e.a=function(t,e,n){if(t&&(t.tagName||t===window||t===document)&&e&&"string"==typeof e){var i=Object(r.a)(e);i._constructed=!0,i=Object(o.a)(!1,i,n),t.dispatchEvent(i)}};var r=n("XAAj"),o=n("5fCB")},Z9R9:function(t,e,n){"use strict";var r=n("qd2b");e.a=r.a},ZMJv:function(t,e,n){"use strict";var r=n("uGS0");e.a=r.a},"eY/N":function(t,e,n){"use strict";e.a=function(t){if(!Object(r.a)(t,"Object"))return!1;var e=Object.getPrototypeOf(t);if(!e)return!0;var n=o.call(e,"constructor")&&e.constructor;return"function"==typeof n&&o.toString.call(n)===o.toString.call(Object)};var r=n("E5mE"),o=Object.prototype.hasOwnProperty},ekq3:function(t,e,n){"use strict";var r=n("zagf");e.a=r.a},hpoY:function(t,e,n){"use strict";n.d(e,"b",function(){return r}),n.d(e,"c",function(){return o}),n.d(e,"a",function(){return i}),n.d(e,"d",function(){return s});var r={force:!0,isReset:!1,getAddressData:null,getUserInfo:null,message:null},o={REDIRECT:"redirect",CHECKED_ADDRESS:"checkedAddress",CANCEL_ADDRESS:"cancelAddress",SUCCESS:"success"},i={GET_FORM_CONFIG:"getFormConfig",GET_ADDRESSES:"getAddresses",SET_DEFAULT:"setDefault",DELETE_ADDRESS:"deleteAddress",GET_REGION_NAME:"getRegionName",ADD_OR_EDIT_ADDRESS:"addOrEditAddress"},s={ADDRESS_LIST:"myaddress",ADDRESS_EDIT:"addressEdit"}},lXuC:function(t,e,n){"use strict";e.a=function(t,e){var n="("+(e||"_|-")+")";return t=(t=(t=(t+"").replace(new RegExp(n+"?(?:(?:[A-Z]{2,}[A-Z]"+n+"*$)|(?:[A-Z]{2,}(?=[A-Z])))","g"),function(t){return(((e||"")+"").split("|")[0]||"-")+(t=t.replace(new RegExp(n),"")).toLowerCase()})).replace(new RegExp("(?:^"+n+"?([a-z]))|(?:"+n+"$)","gi"),function(t,e,n){return(n||"").toLowerCase()})).replace(new RegExp(n+"([a-z])","gi"),function(t,e,n){return(n||"").toUpperCase()})}},nHB9:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("ZMJv"),o=n("ekq3"),i=n("rRBi"),s=n("q44f"),a=n("hpoY");var u=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,n));return r.defaultOption=a.b,r.name="Address",r.setDefaultOptions(n),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefault=function(t){var e=this,n=e.getOptions(t);n.isReset&&(e._addressInfo=null);var r=e._getDefaultPromise||new Promise(function(t,r){e._addressInfo?t(e._addressInfo):e._getUserInfo({type:"getDefault"}).then(function(o){o&&o.islogin?e.getAddresses().then(function(o){o=o||[];for(var i=void 0,s=0;s<o.length;s++){var u=o[s];if(u&&u.isDefault){i=u;break}}!i&&n.force?(o.length&&(n=Object.assign({},n,{type:a.d.ADDRESS_EDIT})),e.select(n).then(t,r)):e.successfilter(i||null).then(t,r)},r):t(null)},r)});return r.then(function(){e._getDefaultPromise=null},function(){e._getDefaultPromise=null}),e._getDefaultPromise=r,r},e.prototype.select=function(t){var e=this;return new Promise(function(n,r){e._getUserInfo({type:"selectAddress"}).then(function(o){o&&o.islogin?e._toAddressPage(t).then(n,r):r(new Error("islogin false"))},r)})},e.prototype.getAddresses=function(){var t=this;return new Promise(function(e,n){t._getUserInfo({type:a.a.GET_ADDRESSES}).then(function(r){r&&r.islogin?t._getData(a.a.GET_ADDRESSES).then(e,n):n(new Error("islogin false"))},n)})},e.prototype.setDefault=function(t){var e=this;return e._addressInfo=null,new Promise(function(n,r){e._getUserInfo({type:a.a.SET_DEFAULT}).then(function(o){o&&o.islogin?e._getData(a.a.SET_DEFAULT,t).then(n,r):r(new Error("islogin false"))},r)})},e.prototype.deleteAddress=function(t){var e=this;return e._addressInfo=null,new Promise(function(n,r){e._getUserInfo().then(function(o){o&&o.islogin?e._getData(a.a.DELETE_ADDRESS,t).then(n,r):r(new Error("islogin false"))},r)})},e.prototype.getRegionName=function(t){return this._getData(a.a.GET_REGION_NAME,t)},e.prototype.addOrEditAddress=function(t){var e=this;return e._addressInfo=null,new Promise(function(n,r){e._getUserInfo().then(function(o){o&&o.islogin?(t=t||{},e._getData(a.a.ADD_OR_EDIT_ADDRESS,t).then(n,r)):r(new Error("islogin false"))},r)})},e.prototype.cancel=function(){this.$emit(a.c.CANCEL_ADDRESS)},e.prototype.checked=function(t){this.$emit(a.c.CHECKED_ADDRESS,t)},e}(function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,n));return r.defaultOption=a.b,r._addressInfo=null,r.setDefaultOptions(n),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype._getUserInfo=function(t){var e=this,n=e.defaultOption,o=e.getUserPromise||new Promise(function(e,o){n.getUserInfo?Object(r.a)(n.getUserInfo,[t]).then(function(t){e(t||{})},o):e({isLogin:!1})});return o.then(function(){e.getUserPromise=null},function(){e.getUserPromise=null}),e.getUserPromise=o,o},e.prototype._getData=function(t,e,n){var o=this.defaultOption;return Object(r.a)(o.getAddressData,[t,e,n])},e.prototype._toAddressPage=function(t){var e=this,n=e.addressPromise||new Promise(function(n,r){!function(){function t(t){e.addressPromise=null,e.$off(a.c.CHECKED_ADDRESS,o),e.$off(a.c.CANCEL_ADDRESS,i),n(t)}function o(n){e.successfilter(n||null).then(t,r)}function i(e){t(Object.assign({},e,{_handleType:"cancel"}))}e.$on(a.c.CHECKED_ADDRESS,o),e.$on(a.c.CANCEL_ADDRESS,i)}();var o=e.getOptions(t);e.$emit(a.c.REDIRECT,{type:o.type||a.d.ADDRESS_LIST,options:o})});return e.addressPromise=n,n},e.prototype.getFormConfig=function(t){return this._getData(a.a.GET_FORM_CONFIG,t)},e.prototype.successfilter=function(t,e){var n=this,s=n.getOptions();return new Promise(function(u,c){Object(r.a)(s.successfilter||t,[t]).then(function(t){u(t),e||Object(o.a)(s.diffData||!1,[t,n._nowCarData])||setTimeout(function(){n.$emit(a.c.SUCCESS,Object(i.a)(t))},0),n._addressInfo=t})})},e.prototype.message=function(t,e){var n=this.defaultOption;return Object(r.a)(n.message,[t,e])},e}(s.a));function c(t,e){return new u(e)}c.install=function(t,e){t.use(c(0,e))};e.default=c},q44f:function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.inputBlur=function(){var t=document.activeElement;if(t&&"input"===(t.tagName||"").toLowerCase()){var e=t;e.blur(),setTimeout(function(){e.scrollIntoView()},20)}},e}(n("Z9R9").a)},qd2b:function(t,e,n){"use strict";var r=n("5fCB"),o=n("Z05q"),i=n("zagf");var s=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._events={}}return t.prototype.$dispatchEvent=function(t,e,n){return Object(o.a)(t,e,n)},t.prototype.$on=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this;this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push([e,n])},t.prototype.$once=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this,r=this,o=!1,i=function i(){r.$off(t,i),o||(o=!0,e.apply(n,arguments))};i.fn=e,r.$on(t,i)},t.prototype.$off=function(t,e){var n=this._events&&this._events[t];if(n)for(var r=n.length;r--;)(n[r][0]===e||n[r][0]&&n[r][0].fn===e)&&(n[r][0]=void 0)},t.prototype.$emit=function(t){var e=this._events&&this._events[t];if(e){for(var n=e.length,r=[].concat(e),o=arguments.length,s=Array(o>1?o-1:0),a=1;a<o;a++)s[a-1]=arguments[a];for(var u=0;u<n;u++){var c=r[u],f=c[0],l=c[1];Object(i.a)(f,s,l)}}},t}(),a=n("FNmr");n.d(e,"a",function(){return u});var u=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return r.name="",r.defaultOption={},r.setDefaultOptions(!0,n),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.singleton=function(t){var e=this._singleton||this.instance(t);return this._singleton=e,e},e.instance=function(t){return new this(t)},e.install=function(t,e){var n=this.instance(e);return t&&t.use instanceof Function&&t.use(n,e),n},e.prototype.getParent=function(){return Object(i.a)(this._getParent||this._vue&&this._vue.prototype||null,[],this)},e.prototype.install=function(t,e){this._vue=this._vue||t;var n=Object(a.a)(t,this);return this.setDefaultOptions(e&&n&&e[n]||e),this},e.prototype.setDefaultOptions=function(t){var e=void 0,n=!0;"boolean"==typeof t?(n=t,e=arguments[1]||{}):e=t,e&&(this.defaultOption=Object(r.a)(n,this.defaultOption||{},e))},e.prototype.getOptions=function(){for(var t=[{},this.defaultOption||{}],e=!0,n=arguments.length,o=Array(n),i=0;i<n;i++)o[i]=arguments[i];return"boolean"==typeof o[0]&&(e=o[0],o.splice(0,1)),o&&o.length>0&&(t=t.concat(o)),r.a.apply(void 0,[e].concat(t))},e.prototype.preload=function(){var t=this;return new Promise(function(e,n){e(t)})},e}(s)},rRBi:function(t,e,n){"use strict";var r=n("5fCB");e.a=r.a},uGS0:function(t,e,n){"use strict";e.a=function(t,e,n,i){var s=t;!e||e instanceof Array||(e=[e]);return new Promise(function(a,u){(s=Object(r.a)(t||s,e,i||null))instanceof Promise||Object(o.a)(s,"Promise")||s&&s.then instanceof Function?s.then(a,u):a(n?{default:s}:s)})};var r=n("zagf"),o=n("E5mE")},zagf:function(t,e,n){"use strict";e.a=function(t,e,n){var r=t;t instanceof Function&&(r=t.apply(n,e));return r}}});