├── .gitignore
├── .npmignore
├── LICENSE
├── README.md
├── docs
├── css
│ └── main.css
├── imgs
│ ├── bg.png
│ ├── blue.png
│ ├── logo.png
│ └── logo2.png
└── js
│ ├── jquery.js
│ ├── main.js
│ └── mclick.js
├── index.html
├── package.json
├── ppo.d.ts
├── ppo.js
├── ppo.min.js
└── ppo.min.js.map
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | node_modules
3 | package-lock.json
4 |
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | DS_Store
2 | docs/
3 | node_modules/
4 | example/
5 | .*.swp
6 | .DS_Store
7 | .git
8 | .hg
9 | .npmrc
10 | npm-debug.log
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) ppo authors.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 
2 |
3 | ## Overview
4 |
5 | Every frontend developer has written his own utils library, and we often write methods that are easily forgotten and highly used. [ppo](https://drawcall.github.io/ppo/) is a super small and useful utils library for JavaScript. It and [lodash](https://github.com/lodash/lodash) [underscore](https://github.com/jashkenas/underscore) [es-toolkit](https://github.com/toss/es-toolkit) almost no coupling.
6 | I sorted out the most frequently used function functions in everyday development. These functions are almost ubiquitous in your development, and they are not found in lodash underscore.
7 |
8 | Most of the code comes from the [stackoverflow](https://stackoverflow.com/) site in the high score answer, here to pay tribute to the original author.
9 |
10 | ppo little poor, gzip less than **3k**, so a library you can use it anytime, anywhere without worrying about anything.
11 |
12 | ## Documentation
13 |
14 | #### View the document please visit [https://drawcall.github.io/ppo/](https://drawcall.github.io/ppo/)
15 |
16 | ## Installation
17 |
18 | #### Install using npm
19 |
20 | ```shell
21 | npm install ppo --save
22 |
23 | ...
24 | import ppo from 'ppo';
25 | ```
26 |
27 | #### Include in html
28 |
29 | ```html
30 |
31 | ```
32 |
33 | ## Usage
34 |
35 | ```javascript
36 | import ppo from "ppo";
37 |
38 | const username = ppo.getCookie("username");
39 |
40 | if (ppo.isIOS()) console.log("this is ios");
41 |
42 | ppo.loadjs('http://x.com/a.js', callback);
43 |
44 | ppo.getUrlParam('a' ,'http://xxx.com?a=3&b=sd23s');
45 |
46 | const id = ppo.setTimesout(word => {
47 | console.log(word);
48 | console.log(this); // log {index: 3 ,times: 8, over: false}
49 | }, 1000/20, 8, 'helloworld')
50 | ```
51 |
52 | ## Why ppo?
53 |
54 | When you use react, vue, angular often need to write a lot of utils method. But lodash and underscore these libraries are not omnipotent. So you have to find a lot of tool library. Use ppo, you can solve the daily development of many small problems. Simple and compact!
55 |
56 | ## Download
57 |
58 | - [ppo.js](https://raw.githubusercontent.com/drawcall/ppo/master/ppo.js)
59 | - [ppo.min.js](https://raw.githubusercontent.com/drawcall/ppo/master/ppo.min.js)
60 |
61 | ## License
62 |
63 | ppo is released under the MIT License. http://www.opensource.org/licenses/mit-license
64 |
--------------------------------------------------------------------------------
/docs/css/main.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-size: 14px;
3 | line-height: 22px;
4 | background: #fff;
5 | color: #000;
6 | font-family: Helvetica Neue, Helvetica, Arial;
7 | background-image: url('../imgs/bg.png')
8 | }
9 |
10 | p {
11 | margin: 20px 0;
12 | }
13 |
14 | a,
15 | a:visited {
16 | color: #444;
17 | }
18 |
19 | a:active,
20 | a:hover {
21 | color: #000;
22 | }
23 |
24 | h1,
25 | h2,
26 | h3,
27 | h4,
28 | h5,
29 | h6 {
30 | padding-top: 20px;
31 | }
32 |
33 | h2 {
34 | font-size: 20px;
35 | }
36 |
37 | b.header {
38 | font-size: 16px;
39 | line-height: 30px;
40 | }
41 |
42 | span.alias {
43 | font-size: 14px;
44 | font-style: italic;
45 | margin-left: 20px;
46 | }
47 |
48 | table,
49 | tr,
50 | td {
51 | margin: 0;
52 | padding: 0;
53 | }
54 |
55 | td {
56 | padding: 2px 12px 2px 0;
57 | }
58 |
59 | table .rule {
60 | height: 1px;
61 | background: #ccc;
62 | margin: 5px 0;
63 | }
64 |
65 | ul {
66 | list-style-type: circle;
67 | padding: 0 0 0 20px;
68 | }
69 |
70 | li {
71 | margin-bottom: 10px;
72 | }
73 |
74 | code,
75 | pre,
76 | tt {
77 | font-family: Monaco, Consolas, "Lucida Console", monospace;
78 | font-size: 12px;
79 | line-height: 18px;
80 | font-style: normal;
81 | }
82 |
83 | tt {
84 | padding: 0px 3px;
85 | background: #fff;
86 | border: 1px solid #ddd;
87 | zoom: 1;
88 | }
89 |
90 | code {
91 | margin-left: 20px;
92 | padding-bottom: 4px;
93 | border-bottom: 1px dashed #666;
94 | }
95 |
96 | .code{
97 | margin: 5px 0 10px;
98 | padding: 6px 15px;
99 | background: #eee;
100 | }
101 |
102 | pre {
103 | font-size: 12px;
104 | padding: 4px 0 3px 15px;
105 | border-left: 5px solid #0366d6;
106 | margin: 0px 0 12px;
107 | background: #eee;
108 | }
109 |
110 | .button{
111 | background-color: #0366d6;
112 | border: none;
113 | color: white;
114 | cursor: pointer;
115 | padding: 2px 12px;
116 | border-radius: 2px;
117 | text-align: center;
118 | text-decoration: none;
119 | display: inline-block;
120 | font-size: 12px;
121 | margin: 0 5px;
122 | -moz-user-select:none;
123 | -webkit-user-select:none;
124 | -ms-user-select:none;
125 | -khtml-user-select:none;
126 | user-select:none;
127 | }
128 |
129 | .button:hover{
130 | opacity: 0.6;
131 | }
132 |
133 | .installation{
134 | padding: 0;
135 | }
136 |
137 | .installation li{
138 | list-style: none;
139 | }
140 |
141 | .interface {
142 | font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, sans-serif !important;
143 | }
144 |
145 | #introduction{
146 | margin: 8px 0;
147 | }
148 |
149 | div#sidebar {
150 | background: #fff;
151 | position: fixed;
152 | top: 0;
153 | left: 0;
154 | bottom: 0;
155 | width: 200px;
156 | overflow-y: auto;
157 | overflow-x: hidden;
158 | -webkit-overflow-scrolling: touch;
159 | padding: 15px 0 30px 30px;
160 | border-right: 1px solid #bbb;
161 | box-shadow: 0 0 20px #ccc;
162 | -webkit-box-shadow: 0 0 20px #ccc;
163 | -moz-box-shadow: 0 0 20px #ccc;
164 | }
165 |
166 | a.toc_title,
167 | a.toc_title:visited {
168 | display: block;
169 | color: black;
170 | font-weight: bold;
171 | margin-top: 12px;
172 | }
173 |
174 | a.toc_title:hover {
175 | text-decoration: underline;
176 | }
177 |
178 | #sidebar .version {
179 | font-size: 10px;
180 | font-weight: normal;
181 | }
182 |
183 | ul.toc_section {
184 | font-size: 14px;
185 | line-height: 16px;
186 | margin: 5px 0 0 0;
187 | padding-left: 0px;
188 | list-style-type: none;
189 | }
190 |
191 | .toc_section li {
192 | cursor: pointer;
193 | margin: 0 0 2px 0;
194 | font-size: 13px;
195 | }
196 |
197 | .toc_section li a {
198 | text-decoration: none;
199 | color: black;
200 | }
201 |
202 | .toc_section li a:hover {
203 | text-decoration: underline;
204 | }
205 |
206 | input#function_filter {
207 | width: 80%;
208 | }
209 |
210 | div.container {
211 | width: 650px;
212 | margin: 20px 0 50px 260px;
213 | }
214 |
215 | img#logo {
216 | height: 100px;
217 | }
218 |
219 | p.instxt{
220 | margin: 0;
221 | }
222 |
223 | div.warning {
224 | margin-top: 15px;
225 | font: bold 11px Arial;
226 | color: #770000;
227 | }
228 |
229 | .link{
230 | color:#0366d6 !important;
231 | }
232 |
233 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5) and (max-width: 800px),
234 | only screen and (-o-min-device-pixel-ratio: 3/2) and (max-width: 800px),
235 | only screen and (min-device-pixel-ratio: 1.5) and (max-width: 800px) {
236 | img {
237 | max-width: 100%;
238 | }
239 |
240 | div#sidebar {
241 | -webkit-overflow-scrolling: initial;
242 | position: relative;
243 | width: 90%;
244 | height: 120px;
245 | left: 0;
246 | top: -7px;
247 | padding: 10px 0 10px 30px;
248 | border: 0;
249 | display: none;
250 | }
251 |
252 | img#logo {
253 | width: auto;
254 | height: auto;
255 | }
256 |
257 | div.container {
258 | margin: 0;
259 | width: 100%;
260 | }
261 |
262 | p,
263 | div.container ul {
264 | max-width: 98%;
265 | overflow-x: scroll;
266 | }
267 |
268 | pre {
269 | overflow: scroll;
270 | }
271 | }
--------------------------------------------------------------------------------
/docs/imgs/bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drawcall/ppo/937eb1f0d340e3dfe9a6317706aef00661bd0624/docs/imgs/bg.png
--------------------------------------------------------------------------------
/docs/imgs/blue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drawcall/ppo/937eb1f0d340e3dfe9a6317706aef00661bd0624/docs/imgs/blue.png
--------------------------------------------------------------------------------
/docs/imgs/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drawcall/ppo/937eb1f0d340e3dfe9a6317706aef00661bd0624/docs/imgs/logo.png
--------------------------------------------------------------------------------
/docs/imgs/logo2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drawcall/ppo/937eb1f0d340e3dfe9a6317706aef00661bd0624/docs/imgs/logo2.png
--------------------------------------------------------------------------------
/docs/js/jquery.js:
--------------------------------------------------------------------------------
1 | /*! jQuery v@1.8.0 jquery.com | jquery.org/license */
2 | (function(a,b){function G(a){var b=F[a]={};return p.each(a.split(s),function(a,c){b[c]=!0}),b}function J(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(I,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:+d+""===d?+d:H.test(d)?p.parseJSON(d):d}catch(f){}p.data(a,c,d)}else d=b}return d}function K(a){var b;for(b in a){if(b==="data"&&p.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function ba(){return!1}function bb(){return!0}function bh(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function bi(a,b){do a=a[b];while(a&&a.nodeType!==1);return a}function bj(a,b,c){b=b||0;if(p.isFunction(b))return p.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return p.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=p.grep(a,function(a){return a.nodeType===1});if(be.test(b))return p.filter(b,d,!c);b=p.filter(b,d)}return p.grep(a,function(a,d){return p.inArray(a,b)>=0===c})}function bk(a){var b=bl.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function bC(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function bD(a,b){if(b.nodeType!==1||!p.hasData(a))return;var c,d,e,f=p._data(a),g=p._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;d").appendTo(e.body),c=b.css("display");b.remove();if(c==="none"||c===""){bI=e.body.appendChild(bI||p.extend(e.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!bJ||!bI.createElement)bJ=(bI.contentWindow||bI.contentDocument).document,bJ.write(""),bJ.close();b=bJ.body.appendChild(bJ.createElement(a)),c=bH(b,"display"),e.body.removeChild(bI)}return bR[a]=c,c}function ch(a,b,c,d){var e;if(p.isArray(b))p.each(b,function(b,e){c||cd.test(a)?d(a,e):ch(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&p.type(b)==="object")for(e in b)ch(a+"["+e+"]",b[e],c,d);else d(a,b)}function cy(a){return function(b,c){typeof b!="string"&&(c=b,b="*");var d,e,f,g=b.toLowerCase().split(s),h=0,i=g.length;if(p.isFunction(c))for(;h)[^>]*$|#([\w\-]*)$)/,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,y=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,z=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,A=/^-ms-/,B=/-([\da-z])/gi,C=function(a,b){return(b+"").toUpperCase()},D=function(){e.addEventListener?(e.removeEventListener("DOMContentLoaded",D,!1),p.ready()):e.readyState==="complete"&&(e.detachEvent("onreadystatechange",D),p.ready())},E={};p.fn=p.prototype={constructor:p,init:function(a,c,d){var f,g,h,i;if(!a)return this;if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if(typeof a=="string"){a.charAt(0)==="<"&&a.charAt(a.length-1)===">"&&a.length>=3?f=[null,a,null]:f=u.exec(a);if(f&&(f[1]||!c)){if(f[1])return c=c instanceof p?c[0]:c,i=c&&c.nodeType?c.ownerDocument||c:e,a=p.parseHTML(f[1],i,!0),v.test(f[1])&&p.isPlainObject(c)&&this.attr.call(a,c,!0),p.merge(this,a);g=e.getElementById(f[2]);if(g&&g.parentNode){if(g.id!==f[2])return d.find(a);this.length=1,this[0]=g}return this.context=e,this.selector=a,this}return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a)}return p.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),p.makeArray(a,this))},selector:"",jquery:"1.8.0",length:0,size:function(){return this.length},toArray:function(){return k.call(this)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=p.merge(this.constructor(),a);return d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")"),d},each:function(a,b){return p.each(this,a,b)},ready:function(a){return p.ready.promise().done(a),this},eq:function(a){return a=+a,a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(k.apply(this,arguments),"slice",k.call(arguments).join(","))},map:function(a){return this.pushStack(p.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:j,sort:[].sort,splice:[].splice},p.fn.init.prototype=p.fn,p.extend=p.fn.extend=function(){var a,c,d,e,f,g,h=arguments[0]||{},i=1,j=arguments.length,k=!1;typeof h=="boolean"&&(k=h,h=arguments[1]||{},i=2),typeof h!="object"&&!p.isFunction(h)&&(h={}),j===i&&(h=this,--i);for(;i0)return;d.resolveWith(e,[p]),p.fn.trigger&&p(e).trigger("ready").off("ready")},isFunction:function(a){return p.type(a)==="function"},isArray:Array.isArray||function(a){return p.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):E[m.call(a)]||"object"},isPlainObject:function(a){if(!a||p.type(a)!=="object"||a.nodeType||p.isWindow(a))return!1;try{if(a.constructor&&!n.call(a,"constructor")&&!n.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||n.call(a,d)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},error:function(a){throw new Error(a)},parseHTML:function(a,b,c){var d;return!a||typeof a!="string"?null:(typeof b=="boolean"&&(c=b,b=0),b=b||e,(d=v.exec(a))?[b.createElement(d[1])]:(d=p.buildFragment([a],b,c?null:[]),p.merge([],(d.cacheable?p.clone(d.fragment):d.fragment).childNodes)))},parseJSON:function(b){if(!b||typeof b!="string")return null;b=p.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(w.test(b.replace(y,"@").replace(z,"]").replace(x,"")))return(new Function("return "+b))();p.error("Invalid JSON: "+b)},parseXML:function(c){var d,e;if(!c||typeof c!="string")return null;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(f){d=b}return(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&p.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&r.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(A,"ms-").replace(B,C)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var e,f=0,g=a.length,h=g===b||p.isFunction(a);if(d){if(h){for(e in a)if(c.apply(a[e],d)===!1)break}else for(;f0&&a[0]&&a[i-1]||i===0||p.isArray(a));if(j)for(;h-1)i.splice(c,1),e&&(c<=g&&g--,c<=h&&h--)}),this},has:function(a){return p.inArray(a,i)>-1},empty:function(){return i=[],this},disable:function(){return i=j=c=b,this},disabled:function(){return!i},lock:function(){return j=b,c||l.disable(),this},locked:function(){return!j},fireWith:function(a,b){return b=b||[],b=[a,b.slice?b.slice():b],i&&(!d||j)&&(e?j.push(b):k(b)),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!d}};return l},p.extend({Deferred:function(a){var b=[["resolve","done",p.Callbacks("once memory"),"resolved"],["reject","fail",p.Callbacks("once memory"),"rejected"],["notify","progress",p.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return p.Deferred(function(c){p.each(b,function(b,d){var f=d[0],g=a[b];e[d[1]](p.isFunction(g)?function(){var a=g.apply(this,arguments);a&&p.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f+"With"](this===e?c:this,[a])}:c[f])}),a=null}).promise()},promise:function(a){return typeof a=="object"?p.extend(a,d):d}},e={};return d.pipe=d.then,p.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[a^1][2].disable,b[2][2].lock),e[f[0]]=g.fire,e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=k.call(arguments),d=c.length,e=d!==1||a&&p.isFunction(a.promise)?d:0,f=e===1?a:p.Deferred(),g=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?k.call(arguments):d,c===h?f.notifyWith(b,c):--e||f.resolveWith(b,c)}},h,i,j;if(d>1){h=new Array(d),i=new Array(d),j=new Array(d);for(;ba",c=n.getElementsByTagName("*"),d=n.getElementsByTagName("a")[0],d.style.cssText="top:1px;float:left;opacity:.5";if(!c||!c.length||!d)return{};f=e.createElement("select"),g=f.appendChild(e.createElement("option")),h=n.getElementsByTagName("input")[0],b={leadingWhitespace:n.firstChild.nodeType===3,tbody:!n.getElementsByTagName("tbody").length,htmlSerialize:!!n.getElementsByTagName("link").length,style:/top/.test(d.getAttribute("style")),hrefNormalized:d.getAttribute("href")==="/a",opacity:/^0.5/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkOn:h.value==="on",optSelected:g.selected,getSetAttribute:n.className!=="t",enctype:!!e.createElement("form").enctype,html5Clone:e.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",boxModel:e.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},h.checked=!0,b.noCloneChecked=h.cloneNode(!0).checked,f.disabled=!0,b.optDisabled=!g.disabled;try{delete n.test}catch(o){b.deleteExpando=!1}!n.addEventListener&&n.attachEvent&&n.fireEvent&&(n.attachEvent("onclick",m=function(){b.noCloneEvent=!1}),n.cloneNode(!0).fireEvent("onclick"),n.detachEvent("onclick",m)),h=e.createElement("input"),h.value="t",h.setAttribute("type","radio"),b.radioValue=h.value==="t",h.setAttribute("checked","checked"),h.setAttribute("name","t"),n.appendChild(h),i=e.createDocumentFragment(),i.appendChild(n.lastChild),b.checkClone=i.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=h.checked,i.removeChild(h),i.appendChild(n);if(n.attachEvent)for(k in{submit:!0,change:!0,focusin:!0})j="on"+k,l=j in n,l||(n.setAttribute(j,"return;"),l=typeof n[j]=="function"),b[k+"Bubbles"]=l;return p(function(){var c,d,f,g,h="padding:0;margin:0;border:0;display:block;overflow:hidden;",i=e.getElementsByTagName("body")[0];if(!i)return;c=e.createElement("div"),c.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",i.insertBefore(c,i.firstChild),d=e.createElement("div"),c.appendChild(d),d.innerHTML="",f=d.getElementsByTagName("td"),f[0].style.cssText="padding:0;margin:0;border:0;display:none",l=f[0].offsetHeight===0,f[0].style.display="",f[1].style.display="none",b.reliableHiddenOffsets=l&&f[0].offsetHeight===0,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",b.boxSizing=d.offsetWidth===4,b.doesNotIncludeMarginInBodyOffset=i.offsetTop!==1,a.getComputedStyle&&(b.pixelPosition=(a.getComputedStyle(d,null)||{}).top!=="1%",b.boxSizingReliable=(a.getComputedStyle(d,null)||{width:"4px"}).width==="4px",g=e.createElement("div"),g.style.cssText=d.style.cssText=h,g.style.marginRight=g.style.width="0",d.style.width="1px",d.appendChild(g),b.reliableMarginRight=!parseFloat((a.getComputedStyle(g,null)||{}).marginRight)),typeof d.style.zoom!="undefined"&&(d.innerHTML="",d.style.cssText=h+"width:1px;padding:1px;display:inline;zoom:1",b.inlineBlockNeedsLayout=d.offsetWidth===3,d.style.display="block",d.style.overflow="visible",d.innerHTML="",d.firstChild.style.width="5px",b.shrinkWrapBlocks=d.offsetWidth!==3,c.style.zoom=1),i.removeChild(c),c=d=f=g=null}),i.removeChild(n),c=d=f=g=h=i=n=null,b}();var H=/^(?:\{.*\}|\[.*\])$/,I=/([A-Z])/g;p.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(p.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){return a=a.nodeType?p.cache[a[p.expando]]:a[p.expando],!!a&&!K(a)},data:function(a,c,d,e){if(!p.acceptData(a))return;var f,g,h=p.expando,i=typeof c=="string",j=a.nodeType,k=j?p.cache:a,l=j?a[h]:a[h]&&h;if((!l||!k[l]||!e&&!k[l].data)&&i&&d===b)return;l||(j?a[h]=l=p.deletedIds.pop()||++p.uuid:l=h),k[l]||(k[l]={},j||(k[l].toJSON=p.noop));if(typeof c=="object"||typeof c=="function")e?k[l]=p.extend(k[l],c):k[l].data=p.extend(k[l].data,c);return f=k[l],e||(f.data||(f.data={}),f=f.data),d!==b&&(f[p.camelCase(c)]=d),i?(g=f[c],g==null&&(g=f[p.camelCase(c)])):g=f,g},removeData:function(a,b,c){if(!p.acceptData(a))return;var d,e,f,g=a.nodeType,h=g?p.cache:a,i=g?a[p.expando]:p.expando;if(!h[i])return;if(b){d=c?h[i]:h[i].data;if(d){p.isArray(b)||(b in d?b=[b]:(b=p.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,f=b.length;e1,null,!1))},removeData:function(a){return this.each(function(){p.removeData(this,a)})}}),p.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=p._data(a,b),c&&(!d||p.isArray(c)?d=p._data(a,b,p.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=p.queue(a,b),d=c.shift(),e=p._queueHooks(a,b),f=function(){p.dequeue(a,b)};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),delete e.stop,d.call(a,f,e)),!c.length&&e&&e.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return p._data(a,c)||p._data(a,c,{empty:p.Callbacks("once memory").add(function(){p.removeData(a,b+"queue",!0),p.removeData(a,c,!0)})})}}),p.fn.extend({queue:function(a,c){var d=2;return typeof a!="string"&&(c=a,a="fx",d--),arguments.length1)},removeAttr:function(a){return this.each(function(){p.removeAttr(this,a)})},prop:function(a,b){return p.access(this,p.prop,a,b,arguments.length>1)},removeProp:function(a){return a=p.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g,h;if(p.isFunction(a))return this.each(function(b){p(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(s);for(c=0,d=this.length;c-1)d=d.replace(" "+c[f]+" "," ");e.className=a?p.trim(d):""}}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";return p.isFunction(a)?this.each(function(c){p(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if(c==="string"){var e,f=0,g=p(this),h=b,i=a.split(s);while(e=i[f++])h=d?h:!g.hasClass(e),g[h?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&p._data(this,"__className__",this.className),this.className=this.className||a===!1?"":p._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c-1)return!0;return!1},val:function(a){var c,d,e,f=this[0];if(!arguments.length){if(f)return c=p.valHooks[f.type]||p.valHooks[f.nodeName.toLowerCase()],c&&"get"in c&&(d=c.get(f,"value"))!==b?d:(d=f.value,typeof d=="string"?d.replace(P,""):d==null?"":d);return}return e=p.isFunction(a),this.each(function(d){var f,g=p(this);if(this.nodeType!==1)return;e?f=a.call(this,d,g.val()):f=a,f==null?f="":typeof f=="number"?f+="":p.isArray(f)&&(f=p.map(f,function(a){return a==null?"":a+""})),c=p.valHooks[this.type]||p.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,f,"value")===b)this.value=f})}}),p.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,f=a.selectedIndex,g=[],h=a.options,i=a.type==="select-one";if(f<0)return null;c=i?f:0,d=i?f+1:h.length;for(;c=0}),c.length||(a.selectedIndex=-1),c}}},attrFn:{},attr:function(a,c,d,e){var f,g,h,i=a.nodeType;if(!a||i===3||i===8||i===2)return;if(e&&p.isFunction(p.fn[c]))return p(a)[c](d);if(typeof a.getAttribute=="undefined")return p.prop(a,c,d);h=i!==1||!p.isXMLDoc(a),h&&(c=c.toLowerCase(),g=p.attrHooks[c]||(T.test(c)?M:L));if(d!==b){if(d===null){p.removeAttr(a,c);return}return g&&"set"in g&&h&&(f=g.set(a,d,c))!==b?f:(a.setAttribute(c,""+d),d)}return g&&"get"in g&&h&&(f=g.get(a,c))!==null?f:(f=a.getAttribute(c),f===null?b:f)},removeAttr:function(a,b){var c,d,e,f,g=0;if(b&&a.nodeType===1){d=b.split(s);for(;g=0}})});var V=/^(?:textarea|input|select)$/i,W=/^([^\.]*|)(?:\.(.+)|)$/,X=/(?:^|\s)hover(\.\S+|)\b/,Y=/^key/,Z=/^(?:mouse|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=function(a){return p.event.special.hover?a:a.replace(X,"mouseenter$1 mouseleave$1")};p.event={add:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,q,r;if(a.nodeType===3||a.nodeType===8||!c||!d||!(g=p._data(a)))return;d.handler&&(o=d,d=o.handler,f=o.selector),d.guid||(d.guid=p.guid++),i=g.events,i||(g.events=i={}),h=g.handle,h||(g.handle=h=function(a){return typeof p!="undefined"&&(!a||p.event.triggered!==a.type)?p.event.dispatch.apply(h.elem,arguments):b},h.elem=a),c=p.trim(_(c)).split(" ");for(j=0;j=0&&(s=s.slice(0,-1),i=!0),s.indexOf(".")>=0&&(t=s.split("."),s=t.shift(),t.sort());if((!f||p.event.customEvent[s])&&!p.event.global[s])return;c=typeof c=="object"?c[p.expando]?c:new p.Event(s,c):new p.Event(s),c.type=s,c.isTrigger=!0,c.exclusive=i,c.namespace=t.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+t.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,m=s.indexOf(":")<0?"on"+s:"";if(!f){h=p.cache;for(j in h)h[j].events&&h[j].events[s]&&p.event.trigger(c,d,h[j].handle.elem,!0);return}c.result=b,c.target||(c.target=f),d=d!=null?p.makeArray(d):[],d.unshift(c),n=p.event.special[s]||{};if(n.trigger&&n.trigger.apply(f,d)===!1)return;q=[[f,n.bindType||s]];if(!g&&!n.noBubble&&!p.isWindow(f)){r=n.delegateType||s,k=$.test(r+s)?f:f.parentNode;for(l=f;k;k=k.parentNode)q.push([k,r]),l=k;l===(f.ownerDocument||e)&&q.push([l.defaultView||l.parentWindow||a,r])}for(j=0;jq&&u.push({elem:this,matches:o.slice(q)});for(d=0;d0?this.on(b,null,a,c):this.trigger(b)},Y.test(b)&&(p.event.fixHooks[b]=p.event.keyHooks),Z.test(b)&&(p.event.fixHooks[b]=p.event.mouseHooks)}),function(a,b){function bd(a,b,c,d){var e=0,f=b.length;for(;e0?h(g,c,f):[]}function bf(a,c,d,e,f){var g,h,i,j,k,l,m,n,p=0,q=f.length,s=L.POS,t=new RegExp("^"+s.source+"(?!"+r+")","i"),u=function(){var a=1,c=arguments.length-2;for(;ai){m=a.slice(i,g.index),i=n,l=[c],B.test(m)&&(k&&(l=k),k=e);if(h=H.test(m))m=m.slice(0,-5).replace(B,"$&*");g.length>1&&g[0].replace(t,u),k=be(m,g[1],g[2],l,k,h)}}k?(j=j.concat(k),(m=a.slice(i))&&m!==")"?B.test(m)?bd(m,j,d,e):Z(m,c,d,e?e.concat(k):k):o.apply(d,j)):Z(a,c,d,e)}return q===1?d:Z.uniqueSort(d)}function bg(a,b,c){var d,e,f,g=[],i=0,j=D.exec(a),k=!j.pop()&&!j.pop(),l=k&&a.match(C)||[""],m=$.preFilter,n=$.filter,o=!c&&b!==h;for(;(e=l[i])!=null&&k;i++){g.push(d=[]),o&&(e=" "+e);while(e){k=!1;if(j=B.exec(e))e=e.slice(j[0].length),k=d.push({part:j.pop().replace(A," "),captures:j});for(f in n)(j=L[f].exec(e))&&(!m[f]||(j=m[f](j,b,c)))&&(e=e.slice(j.shift().length),k=d.push({part:f,captures:j}));if(!k)break}}return k||Z.error(a),g}function bh(a,b,e){var f=b.dir,g=m++;return a||(a=function(a){return a===e}),b.first?function(b,c){while(b=b[f])if(b.nodeType===1)return a(b,c)&&b}:function(b,e){var h,i=g+"."+d,j=i+"."+c;while(b=b[f])if(b.nodeType===1){if((h=b[q])===j)return b.sizset;if(typeof h=="string"&&h.indexOf(i)===0){if(b.sizset)return b}else{b[q]=j;if(a(b,e))return b.sizset=!0,b;b.sizset=!1}}}}function bi(a,b){return a?function(c,d){var e=b(c,d);return e&&a(e===!0?c:e,d)}:b}function bj(a,b,c){var d,e,f=0;for(;d=a[f];f++)$.relative[d.part]?e=bh(e,$.relative[d.part],b):(d.captures.push(b,c),e=bi(e,$.filter[d.part].apply(null,d.captures)));return e}function bk(a){return function(b,c){var d,e=0;for(;d=a[e];e++)if(d(b,c))return!0;return!1}}var c,d,e,f,g,h=a.document,i=h.documentElement,j="undefined",k=!1,l=!0,m=0,n=[].slice,o=[].push,q=("sizcache"+Math.random()).replace(".",""),r="[\\x20\\t\\r\\n\\f]",s="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",t=s.replace("w","w#"),u="([*^$|!~]?=)",v="\\["+r+"*("+s+")"+r+"*(?:"+u+r+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+t+")|)|)"+r+"*\\]",w=":("+s+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|((?:[^,]|\\\\,|(?:,(?=[^\\[]*\\]))|(?:,(?=[^\\(]*\\))))*))\\)|)",x=":(nth|eq|gt|lt|first|last|even|odd)(?:\\((\\d*)\\)|)(?=[^-]|$)",y=r+"*([\\x20\\t\\r\\n\\f>+~])"+r+"*",z="(?=[^\\x20\\t\\r\\n\\f])(?:\\\\.|"+v+"|"+w.replace(2,7)+"|[^\\\\(),])+",A=new RegExp("^"+r+"+|((?:^|[^\\\\])(?:\\\\.)*)"+r+"+$","g"),B=new RegExp("^"+y),C=new RegExp(z+"?(?="+r+"*,|$)","g"),D=new RegExp("^(?:(?!,)(?:(?:^|,)"+r+"*"+z+")*?|"+r+"*(.*?))(\\)|$)"),E=new RegExp(z.slice(19,-6)+"\\x20\\t\\r\\n\\f>+~])+|"+y,"g"),F=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,G=/[\x20\t\r\n\f]*[+~]/,H=/:not\($/,I=/h\d/i,J=/input|select|textarea|button/i,K=/\\(?!\\)/g,L={ID:new RegExp("^#("+s+")"),CLASS:new RegExp("^\\.("+s+")"),NAME:new RegExp("^\\[name=['\"]?("+s+")['\"]?\\]"),TAG:new RegExp("^("+s.replace("[-","[-\\*")+")"),ATTR:new RegExp("^"+v),PSEUDO:new RegExp("^"+w),CHILD:new RegExp("^:(only|nth|last|first)-child(?:\\("+r+"*(even|odd|(([+-]|)(\\d*)n|)"+r+"*(?:([+-]|)"+r+"*(\\d+)|))"+r+"*\\)|)","i"),POS:new RegExp(x,"ig"),needsContext:new RegExp("^"+r+"*[>+~]|"+x,"i")},M={},N=[],O={},P=[],Q=function(a){return a.sizzleFilter=!0,a},R=function(a){return function(b){return b.nodeName.toLowerCase()==="input"&&b.type===a}},S=function(a){return function(b){var c=b.nodeName.toLowerCase();return(c==="input"||c==="button")&&b.type===a}},T=function(a){var b=!1,c=h.createElement("div");try{b=a(c)}catch(d){}return c=null,b},U=T(function(a){a.innerHTML="";var b=typeof a.lastChild.getAttribute("multiple");return b!=="boolean"&&b!=="string"}),V=T(function(a){a.id=q+0,a.innerHTML="",i.insertBefore(a,i.firstChild);var b=h.getElementsByName&&h.getElementsByName(q).length===2+h.getElementsByName(q+0).length;return g=!h.getElementById(q),i.removeChild(a),b}),W=T(function(a){return a.appendChild(h.createComment("")),a.getElementsByTagName("*").length===0}),X=T(function(a){return a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!==j&&a.firstChild.getAttribute("href")==="#"}),Y=T(function(a){return a.innerHTML="",!a.getElementsByClassName||a.getElementsByClassName("e").length===0?!1:(a.lastChild.className="e",a.getElementsByClassName("e").length!==1)}),Z=function(a,b,c,d){c=c||[],b=b||h;var e,f,g,i,j=b.nodeType;if(j!==1&&j!==9)return[];if(!a||typeof a!="string")return c;g=ba(b);if(!g&&!d)if(e=F.exec(a))if(i=e[1]){if(j===9){f=b.getElementById(i);if(!f||!f.parentNode)return c;if(f.id===i)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(i))&&bb(b,f)&&f.id===i)return c.push(f),c}else{if(e[2])return o.apply(c,n.call(b.getElementsByTagName(a),0)),c;if((i=e[3])&&Y&&b.getElementsByClassName)return o.apply(c,n.call(b.getElementsByClassName(i),0)),c}return bm(a,b,c,d,g)},$=Z.selectors={cacheLength:50,match:L,order:["ID","TAG"],attrHandle:{},createPseudo:Q,find:{ID:g?function(a,b,c){if(typeof b.getElementById!==j&&!c){var d=b.getElementById(a);return d&&d.parentNode?[d]:[]}}:function(a,c,d){if(typeof c.getElementById!==j&&!d){var e=c.getElementById(a);return e?e.id===a||typeof e.getAttributeNode!==j&&e.getAttributeNode("id").value===a?[e]:b:[]}},TAG:W?function(a,b){if(typeof b.getElementsByTagName!==j)return b.getElementsByTagName(a)}:function(a,b){var c=b.getElementsByTagName(a);if(a==="*"){var d,e=[],f=0;for(;d=c[f];f++)d.nodeType===1&&e.push(d);return e}return c}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(K,""),a[3]=(a[4]||a[5]||"").replace(K,""),a[2]==="~="&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),a[1]==="nth"?(a[2]||Z.error(a[0]),a[3]=+(a[3]?a[4]+(a[5]||1):2*(a[2]==="even"||a[2]==="odd")),a[4]=+(a[6]+a[7]||a[2]==="odd")):a[2]&&Z.error(a[0]),a},PSEUDO:function(a){var b,c=a[4];return L.CHILD.test(a[0])?null:(c&&(b=D.exec(c))&&b.pop()&&(a[0]=a[0].slice(0,b[0].length-c.length-1),c=b[0].slice(0,-1)),a.splice(2,3,c||a[3]),a)}},filter:{ID:g?function(a){return a=a.replace(K,""),function(b){return b.getAttribute("id")===a}}:function(a){return a=a.replace(K,""),function(b){var c=typeof b.getAttributeNode!==j&&b.getAttributeNode("id");return c&&c.value===a}},TAG:function(a){return a==="*"?function(){return!0}:(a=a.replace(K,"").toLowerCase(),function(b){return b.nodeName&&b.nodeName.toLowerCase()===a})},CLASS:function(a){var b=M[a];return b||(b=M[a]=new RegExp("(^|"+r+")"+a+"("+r+"|$)"),N.push(a),N.length>$.cacheLength&&delete M[N.shift()]),function(a){return b.test(a.className||typeof a.getAttribute!==j&&a.getAttribute("class")||"")}},ATTR:function(a,b,c){return b?function(d){var e=Z.attr(d,a),f=e+"";if(e==null)return b==="!=";switch(b){case"=":return f===c;case"!=":return f!==c;case"^=":return c&&f.indexOf(c)===0;case"*=":return c&&f.indexOf(c)>-1;case"$=":return c&&f.substr(f.length-c.length)===c;case"~=":return(" "+f+" ").indexOf(c)>-1;case"|=":return f===c||f.substr(0,c.length+1)===c+"-"}}:function(b){return Z.attr(b,a)!=null}},CHILD:function(a,b,c,d){if(a==="nth"){var e=m++;return function(a){var b,f,g=0,h=a;if(c===1&&d===0)return!0;b=a.parentNode;if(b&&(b[q]!==e||!a.sizset)){for(h=b.firstChild;h;h=h.nextSibling)if(h.nodeType===1){h.sizset=++g;if(h===a)break}b[q]=e}return f=a.sizset-d,c===0?f===0:f%c===0&&f/c>=0}}return function(b){var c=b;switch(a){case"only":case"first":while(c=c.previousSibling)if(c.nodeType===1)return!1;if(a==="first")return!0;c=b;case"last":while(c=c.nextSibling)if(c.nodeType===1)return!1;return!0}}},PSEUDO:function(a,b,c,d){var e=$.pseudos[a]||$.pseudos[a.toLowerCase()];return e||Z.error("unsupported pseudo: "+a),e.sizzleFilter?e(b,c,d):e}},pseudos:{not:Q(function(a,b,c){var d=bl(a.replace(A,"$1"),b,c);return function(a){return!d(a)}}),enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&!!a.checked||b==="option"&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},parent:function(a){return!$.pseudos.empty(a)},empty:function(a){var b;a=a.firstChild;while(a){if(a.nodeName>"@"||(b=a.nodeType)===3||b===4)return!1;a=a.nextSibling}return!0},contains:Q(function(a){return function(b){return(b.textContent||b.innerText||bc(b)).indexOf(a)>-1}}),has:Q(function(a){return function(b){return Z(a,b).length>0}}),header:function(a){return I.test(a.nodeName)},text:function(a){var b,c;return a.nodeName.toLowerCase()==="input"&&(b=a.type)==="text"&&((c=a.getAttribute("type"))==null||c.toLowerCase()===b)},radio:R("radio"),checkbox:R("checkbox"),file:R("file"),password:R("password"),image:R("image"),submit:S("submit"),reset:S("reset"),button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&a.type==="button"||b==="button"},input:function(a){return J.test(a.nodeName)},focus:function(a){var b=a.ownerDocument;return a===b.activeElement&&(!b.hasFocus||b.hasFocus())&&(!!a.type||!!a.href)},active:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b,c){return c?a.slice(1):[a[0]]},last:function(a,b,c){var d=a.pop();return c?a:[d]},even:function(a,b,c){var d=[],e=c?1:0,f=a.length;for(;e$.cacheLength&&delete O[P.shift()],g};Z.matches=function(a,b){return Z(a,null,null,b)},Z.matchesSelector=function(a,b){return Z(b,null,null,[a]).length>0};var bm=function(a,b,e,f,g){a=a.replace(A,"$1");var h,i,j,k,l,m,p,q,r,s=a.match(C),t=a.match(E),u=b.nodeType;if(L.POS.test(a))return bf(a,b,e,f,s);if(f)h=n.call(f,0);else if(s&&s.length===1){if(t.length>1&&u===9&&!g&&(s=L.ID.exec(t[0]))){b=$.find.ID(s[1],b,g)[0];if(!b)return e;a=a.slice(t.shift().length)}q=(s=G.exec(t[0]))&&!s.index&&b.parentNode||b,r=t.pop(),m=r.split(":not")[0];for(j=0,k=$.order.length;j",a.querySelectorAll("[selected]").length||e.push("\\["+r+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),a.querySelectorAll(":checked").length||e.push(":checked")}),T(function(a){a.innerHTML="",a.querySelectorAll("[test^='']").length&&e.push("[*^$]="+r+"*(?:\"\"|'')"),a.innerHTML="",a.querySelectorAll(":enabled").length||e.push(":enabled",":disabled")}),e=e.length&&new RegExp(e.join("|")),bm=function(a,d,f,g,h){if(!g&&!h&&(!e||!e.test(a)))if(d.nodeType===9)try{return o.apply(f,n.call(d.querySelectorAll(a),0)),f}catch(i){}else if(d.nodeType===1&&d.nodeName.toLowerCase()!=="object"){var j=d.getAttribute("id"),k=j||q,l=G.test(a)&&d.parentNode||d;j?k=k.replace(c,"\\$&"):d.setAttribute("id",k);try{return o.apply(f,n.call(l.querySelectorAll(a.replace(C,"[id='"+k+"'] $&")),0)),f}catch(i){}finally{j||d.removeAttribute("id")}}return b(a,d,f,g,h)},g&&(T(function(b){a=g.call(b,"div");try{g.call(b,"[test!='']:sizzle"),f.push($.match.PSEUDO)}catch(c){}}),f=new RegExp(f.join("|")),Z.matchesSelector=function(b,c){c=c.replace(d,"='$1']");if(!ba(b)&&!f.test(c)&&(!e||!e.test(c)))try{var h=g.call(b,c);if(h||a||b.document&&b.document.nodeType!==11)return h}catch(i){}return Z(c,null,null,[b]).length>0})}(),Z.attr=p.attr,p.find=Z,p.expr=Z.selectors,p.expr[":"]=p.expr.pseudos,p.unique=Z.uniqueSort,p.text=Z.getText,p.isXMLDoc=Z.isXML,p.contains=Z.contains}(a);var bc=/Until$/,bd=/^(?:parents|prev(?:Until|All))/,be=/^.[^:#\[\.,]*$/,bf=p.expr.match.needsContext,bg={children:!0,contents:!0,next:!0,prev:!0};p.fn.extend({find:function(a){var b,c,d,e,f,g,h=this;if(typeof a!="string")return p(a).filter(function(){for(b=0,c=h.length;b0)for(e=d;e=0:p.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c,d=0,e=this.length,f=[],g=bf.test(a)||typeof a!="string"?p(a,b||this.context):0;for(;d-1:p.find.matchesSelector(c,a)){f.push(c);break}c=c.parentNode}}return f=f.length>1?p.unique(f):f,this.pushStack(f,"closest",a)},index:function(a){return a?typeof a=="string"?p.inArray(this[0],p(a)):p.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(a,b){var c=typeof a=="string"?p(a,b):p.makeArray(a&&a.nodeType?[a]:a),d=p.merge(this.get(),c);return this.pushStack(bh(c[0])||bh(d[0])?d:p.unique(d))},addBack:function(a){return this.add(a==null?this.prevObject:this.prevObject.filter(a))}}),p.fn.andSelf=p.fn.addBack,p.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return p.dir(a,"parentNode")},parentsUntil:function(a,b,c){return p.dir(a,"parentNode",c)},next:function(a){return bi(a,"nextSibling")},prev:function(a){return bi(a,"previousSibling")},nextAll:function(a){return p.dir(a,"nextSibling")},prevAll:function(a){return p.dir(a,"previousSibling")},nextUntil:function(a,b,c){return p.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return p.dir(a,"previousSibling",c)},siblings:function(a){return p.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return p.sibling(a.firstChild)},contents:function(a){return p.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:p.merge([],a.childNodes)}},function(a,b){p.fn[a]=function(c,d){var e=p.map(this,b,c);return bc.test(a)||(d=c),d&&typeof d=="string"&&(e=p.filter(d,e)),e=this.length>1&&!bg[a]?p.unique(e):e,this.length>1&&bd.test(a)&&(e=e.reverse()),this.pushStack(e,a,k.call(arguments).join(","))}}),p.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),b.length===1?p.find.matchesSelector(b[0],a)?[b[0]]:[]:p.find.matches(a,b)},dir:function(a,c,d){var e=[],f=a[c];while(f&&f.nodeType!==9&&(d===b||f.nodeType!==1||!p(f).is(d)))f.nodeType===1&&e.push(f),f=f[c];return e},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var bl="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",bm=/ jQuery\d+="(?:null|\d+)"/g,bn=/^\s+/,bo=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bp=/<([\w:]+)/,bq=/]","i"),bv=/^(?:checkbox|radio)$/,bw=/checked\s*(?:[^=]|=\s*.checked.)/i,bx=/\/(java|ecma)script/i,by=/^\s*\s*$/g,bz={option:[1,""],legend:[1,""],thead:[1,""],tr:[2,""],td:[3,""],col:[2,""],area:[1,""],_default:[0,"",""]},bA=bk(e),bB=bA.appendChild(e.createElement("div"));bz.optgroup=bz.option,bz.tbody=bz.tfoot=bz.colgroup=bz.caption=bz.thead,bz.th=bz.td,p.support.htmlSerialize||(bz._default=[1,"X","
"]),p.fn.extend({text:function(a){return p.access(this,function(a){return a===b?p.text(this):this.empty().append((this[0]&&this[0].ownerDocument||e).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(p.isFunction(a))return this.each(function(b){p(this).wrapAll(a.call(this,b))});if(this[0]){var b=p(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return p.isFunction(a)?this.each(function(b){p(this).wrapInner(a.call(this,b))}):this.each(function(){var b=p(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=p.isFunction(a);return this.each(function(c){p(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){p.nodeName(this,"body")||p(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(a,this.firstChild)})},before:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(a,this),"before",this.selector)}},after:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(this,a),"after",this.selector)}},remove:function(a,b){var c,d=0;for(;(c=this[d])!=null;d++)if(!a||p.filter(a,[c]).length)!b&&c.nodeType===1&&(p.cleanData(c.getElementsByTagName("*")),p.cleanData([c])),c.parentNode&&c.parentNode.removeChild(c);return this},empty:function(){var a,b=0;for(;(a=this[b])!=null;b++){a.nodeType===1&&p.cleanData(a.getElementsByTagName("*"));while(a.firstChild)a.removeChild(a.firstChild)}return this},clone:function(a,b){return a=a==null?!1:a,b=b==null?a:b,this.map(function(){return p.clone(this,a,b)})},html:function(a){return p.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(bm,""):b;if(typeof a=="string"&&!bs.test(a)&&(p.support.htmlSerialize||!bu.test(a))&&(p.support.leadingWhitespace||!bn.test(a))&&!bz[(bp.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(bo,"<$1>$2>");try{for(;d1&&typeof j=="string"&&bw.test(j))return this.each(function(){p(this).domManip(a,c,d)});if(p.isFunction(j))return this.each(function(e){var f=p(this);a[0]=j.call(this,e,c?f.html():b),f.domManip(a,c,d)});if(this[0]){e=p.buildFragment(a,this,k),g=e.fragment,f=g.firstChild,g.childNodes.length===1&&(g=f);if(f){c=c&&p.nodeName(f,"tr");for(h=e.cacheable||l-1;i0?this.clone(!0):this).get(),p(g[e])[b](d),f=f.concat(d);return this.pushStack(f,a,g.selector)}}),p.extend({clone:function(a,b,c){var d,e,f,g;p.support.html5Clone||p.isXMLDoc(a)||!bu.test("<"+a.nodeName+">")?g=a.cloneNode(!0):(bB.innerHTML=a.outerHTML,bB.removeChild(g=bB.firstChild));if((!p.support.noCloneEvent||!p.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!p.isXMLDoc(a)){bE(a,g),d=bF(a),e=bF(g);for(f=0;d[f];++f)e[f]&&bE(d[f],e[f])}if(b){bD(a,g);if(c){d=bF(a),e=bF(g);for(f=0;d[f];++f)bD(d[f],e[f])}}return d=e=null,g},clean:function(a,b,c,d){var f,g,h,i,j,k,l,m,n,o,q,r,s=0,t=[];if(!b||typeof b.createDocumentFragment=="undefined")b=e;for(g=b===e&&bA;(h=a[s])!=null;s++){typeof h=="number"&&(h+="");if(!h)continue;if(typeof h=="string")if(!br.test(h))h=b.createTextNode(h);else{g=g||bk(b),l=l||g.appendChild(b.createElement("div")),h=h.replace(bo,"<$1>$2>"),i=(bp.exec(h)||["",""])[1].toLowerCase(),j=bz[i]||bz._default,k=j[0],l.innerHTML=j[1]+h+j[2];while(k--)l=l.lastChild;if(!p.support.tbody){m=bq.test(h),n=i==="table"&&!m?l.firstChild&&l.firstChild.childNodes:j[1]===""&&!m?l.childNodes:[];for(f=n.length-1;f>=0;--f)p.nodeName(n[f],"tbody")&&!n[f].childNodes.length&&n[f].parentNode.removeChild(n[f])}!p.support.leadingWhitespace&&bn.test(h)&&l.insertBefore(b.createTextNode(bn.exec(h)[0]),l.firstChild),h=l.childNodes,l=g.lastChild}h.nodeType?t.push(h):t=p.merge(t,h)}l&&(g.removeChild(l),h=l=g=null);if(!p.support.appendChecked)for(s=0;(h=t[s])!=null;s++)p.nodeName(h,"input")?bG(h):typeof h.getElementsByTagName!="undefined"&&p.grep(h.getElementsByTagName("input"),bG);if(c){q=function(a){if(!a.type||bx.test(a.type))return d?d.push(a.parentNode?a.parentNode.removeChild(a):a):c.appendChild(a)};for(s=0;(h=t[s])!=null;s++)if(!p.nodeName(h,"script")||!q(h))c.appendChild(h),typeof h.getElementsByTagName!="undefined"&&(r=p.grep(p.merge([],h.getElementsByTagName("script")),q),t.splice.apply(t,[s+1,0].concat(r)),s+=r.length)}return t},cleanData:function(a,b){var c,d,e,f,g=0,h=p.expando,i=p.cache,j=p.support.deleteExpando,k=p.event.special;for(;(e=a[g])!=null;g++)if(b||p.acceptData(e)){d=e[h],c=d&&i[d];if(c){if(c.events)for(f in c.events)k[f]?p.event.remove(e,f):p.removeEvent(e,f,c.handle);i[d]&&(delete i[d],j?delete e[h]:e.removeAttribute?e.removeAttribute(h):e[h]=null,p.deletedIds.push(d))}}}}),function(){var a,b;p.uaMatch=function(a){a=a.toLowerCase();var b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},a=p.uaMatch(g.userAgent),b={},a.browser&&(b[a.browser]=!0,b.version=a.version),b.webkit&&(b.safari=!0),p.browser=b,p.sub=function(){function a(b,c){return new a.fn.init(b,c)}p.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function c(c,d){return d&&d instanceof p&&!(d instanceof a)&&(d=a(d)),p.fn.init.call(this,c,d,b)},a.fn.init.prototype=a.fn;var b=a(e);return a}}();var bH,bI,bJ,bK=/alpha\([^)]*\)/i,bL=/opacity=([^)]*)/,bM=/^(top|right|bottom|left)$/,bN=/^margin/,bO=new RegExp("^("+q+")(.*)$","i"),bP=new RegExp("^("+q+")(?!px)[a-z%]+$","i"),bQ=new RegExp("^([-+])=("+q+")","i"),bR={},bS={position:"absolute",visibility:"hidden",display:"block"},bT={letterSpacing:0,fontWeight:400,lineHeight:1},bU=["Top","Right","Bottom","Left"],bV=["Webkit","O","Moz","ms"],bW=p.fn.toggle;p.fn.extend({css:function(a,c){return p.access(this,function(a,c,d){return d!==b?p.style(a,c,d):p.css(a,c)},a,c,arguments.length>1)},show:function(){return bZ(this,!0)},hide:function(){return bZ(this)},toggle:function(a,b){var c=typeof a=="boolean";return p.isFunction(a)&&p.isFunction(b)?bW.apply(this,arguments):this.each(function(){(c?a:bY(this))?p(this).show():p(this).hide()})}}),p.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bH(a,"opacity");return c===""?"1":c}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":p.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!a||a.nodeType===3||a.nodeType===8||!a.style)return;var f,g,h,i=p.camelCase(c),j=a.style;c=p.cssProps[i]||(p.cssProps[i]=bX(j,i)),h=p.cssHooks[c]||p.cssHooks[i];if(d===b)return h&&"get"in h&&(f=h.get(a,!1,e))!==b?f:j[c];g=typeof d,g==="string"&&(f=bQ.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat(p.css(a,c)),g="number");if(d==null||g==="number"&&isNaN(d))return;g==="number"&&!p.cssNumber[i]&&(d+="px");if(!h||!("set"in h)||(d=h.set(a,d,e))!==b)try{j[c]=d}catch(k){}},css:function(a,c,d,e){var f,g,h,i=p.camelCase(c);return c=p.cssProps[i]||(p.cssProps[i]=bX(a.style,i)),h=p.cssHooks[c]||p.cssHooks[i],h&&"get"in h&&(f=h.get(a,!0,e)),f===b&&(f=bH(a,c)),f==="normal"&&c in bT&&(f=bT[c]),d||e!==b?(g=parseFloat(f),d||p.isNumeric(g)?g||0:f):f},swap:function(a,b,c){var d,e,f={};for(e in b)f[e]=a.style[e],a.style[e]=b[e];d=c.call(a);for(e in b)a.style[e]=f[e];return d}}),a.getComputedStyle?bH=function(a,b){var c,d,e,f,g=getComputedStyle(a,null),h=a.style;return g&&(c=g[b],c===""&&!p.contains(a.ownerDocument.documentElement,a)&&(c=p.style(a,b)),bP.test(c)&&bN.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=c,c=g.width,h.width=d,h.minWidth=e,h.maxWidth=f)),c}:e.documentElement.currentStyle&&(bH=function(a,b){var c,d,e=a.currentStyle&&a.currentStyle[b],f=a.style;return e==null&&f&&f[b]&&(e=f[b]),bP.test(e)&&!bM.test(b)&&(c=f.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":e,e=f.pixelLeft+"px",f.left=c,d&&(a.runtimeStyle.left=d)),e===""?"auto":e}),p.each(["height","width"],function(a,b){p.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0||bH(a,"display")!=="none"?ca(a,b,d):p.swap(a,bS,function(){return ca(a,b,d)})},set:function(a,c,d){return b$(a,c,d?b_(a,b,d,p.support.boxSizing&&p.css(a,"boxSizing")==="border-box"):0)}}}),p.support.opacity||(p.cssHooks.opacity={get:function(a,b){return bL.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=p.isNumeric(b)?"alpha(opacity="+b*100+")":"",f=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&p.trim(f.replace(bK,""))===""&&c.removeAttribute){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bK.test(f)?f.replace(bK,e):f+" "+e}}),p(function(){p.support.reliableMarginRight||(p.cssHooks.marginRight={get:function(a,b){return p.swap(a,{display:"inline-block"},function(){if(b)return bH(a,"marginRight")})}}),!p.support.pixelPosition&&p.fn.position&&p.each(["top","left"],function(a,b){p.cssHooks[b]={get:function(a,c){if(c){var d=bH(a,b);return bP.test(d)?p(a).position()[b]+"px":d}}}})}),p.expr&&p.expr.filters&&(p.expr.filters.hidden=function(a){return a.offsetWidth===0&&a.offsetHeight===0||!p.support.reliableHiddenOffsets&&(a.style&&a.style.display||bH(a,"display"))==="none"},p.expr.filters.visible=function(a){return!p.expr.filters.hidden(a)}),p.each({margin:"",padding:"",border:"Width"},function(a,b){p.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bU[d]+b]=e[d]||e[d-2]||e[0];return f}},bN.test(a)||(p.cssHooks[a+b].set=b$)});var cc=/%20/g,cd=/\[\]$/,ce=/\r?\n/g,cf=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,cg=/^(?:select|textarea)/i;p.fn.extend({serialize:function(){return p.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?p.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||cg.test(this.nodeName)||cf.test(this.type))}).map(function(a,b){var c=p(this).val();return c==null?null:p.isArray(c)?p.map(c,function(a,c){return{name:b.name,value:a.replace(ce,"\r\n")}}):{name:b.name,value:c.replace(ce,"\r\n")}}).get()}}),p.param=function(a,c){var d,e=[],f=function(a,b){b=p.isFunction(b)?b():b==null?"":b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=p.ajaxSettings&&p.ajaxSettings.traditional);if(p.isArray(a)||a.jquery&&!p.isPlainObject(a))p.each(a,function(){f(this.name,this.value)});else for(d in a)ch(d,a[d],c,f);return e.join("&").replace(cc,"+")};var ci,cj,ck=/#.*$/,cl=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,cm=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,cn=/^(?:GET|HEAD)$/,co=/^\/\//,cp=/\?/,cq=/
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ppo",
3 | "version": "1.5.1",
4 | "description": "JavaScript's functional programming helper library.",
5 | "homepage": "https://drawcall.github.io/ppo/",
6 | "keywords": [
7 | "util",
8 | "functional",
9 | "lodash",
10 | "browser"
11 | ],
12 | "author": "drawcall ",
13 | "repository": {
14 | "type": "git",
15 | "url": "git://github.com/drawcall/ppo.git"
16 | },
17 | "main": "ppo.min.js",
18 | "types": "ppo.d.ts",
19 | "devDependencies": {},
20 | "scripts": {
21 | "build": "uglifyjs ppo.js -o ppo.min.js -c -m --source-map"
22 | },
23 | "license": "MIT",
24 | "files": [
25 | "ppo.d.ts",
26 | "ppo.js",
27 | "ppo.min.js",
28 | "ppo.min.map"
29 | ],
30 | "dependencies": {
31 | "uglify-js": "^3.0.28"
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/ppo.d.ts:
--------------------------------------------------------------------------------
1 | /** Declaration file generated by dts-gen */
2 |
3 | declare function ppo(): void;
4 |
5 | declare namespace ppo {
6 | const prototype: {
7 | };
8 |
9 | interface Trash {
10 | clear: () => void;
11 | log: () => void;
12 | [key: string]: any;
13 | }
14 |
15 | var trash: Trash;
16 |
17 | function args(e?: any, t?: number): any;
18 |
19 | function clearTimesout(e?: any): void;
20 |
21 | function delLastComma(t?: string): string;
22 |
23 | function deleteLastComma(t?: string): string;
24 |
25 | function construct(...args: any[]): any;
26 |
27 | function currency(e?: any): any;
28 |
29 | function delCookie(e: any): void;
30 |
31 | function delUrlParam(e: any, t?: any): any;
32 |
33 | function deleteCookie(e: string): void;
34 |
35 | function deleteUrlParam(e: any, t?: string): string;
36 |
37 | function fill0(e?: number): number;
38 |
39 | function floor(e?: number, t?: number): number;
40 |
41 | function getCookie(e?: any): null | string;
42 |
43 | function getDate(e?: string, t?: string): string;
44 |
45 | function getUrlParam(e?: string, t?: string): string;
46 |
47 | function hash(e?: string): any;
48 |
49 | function ieVer(): any;
50 |
51 | function ieVersion(): number;
52 |
53 | function isAndroid(): boolean;
54 |
55 | function isIE(): boolean;
56 |
57 | function isIOS(): boolean;
58 |
59 | function isIPad(): boolean;
60 |
61 | function isIos(): boolean;
62 |
63 | function isMobile(): boolean;
64 |
65 | function isPC(): boolean;
66 |
67 | function isTypeof(e?: any, t?: string): boolean;
68 |
69 | function isWeixin(): boolean;
70 |
71 | function judge(e: any, t?: any, o?: boolean | string): boolean;
72 |
73 | function judgment(e: any, t?: any, o?: any): any;
74 |
75 | function loadjs(e: string, t?: any, o?: any): void;
76 |
77 | function lockTouch(): void;
78 |
79 | function log(e?: string, t?: any): void;
80 |
81 | function logs(...args: any[]): void;
82 |
83 | function noop(): void;
84 |
85 | function open(e?: string): void;
86 |
87 | function paramsName(e?: any): any;
88 |
89 | function randomA2B(e?: any, t?: any, o?: any): any;
90 |
91 | function randomColor(): string;
92 |
93 | function randomFromA2B(e?: number, t?: number, o?: number): number;
94 |
95 | function randomFromArray(e?: any[]): any;
96 |
97 | function randomKey(e?: number): string;
98 |
99 | function randomfArr(e?: any): any;
100 |
101 | function removeConsole(e?: string|boolean): void;
102 |
103 | function setCookie(e: string, t?: any, o?: any): void;
104 |
105 | function setTimesout(...args: any[]): any;
106 |
107 | function setUrlParam(e: any, t?: any, o?: string): string;
108 |
109 | function toJSON(res: any): any;
110 |
111 | function toArray(obj, dot): any;
112 |
113 | function toJson(res: any): any;
114 |
115 | function tojson(res: any): any;
116 |
117 | function trigger(e: any, t?: any, o?: string): any;
118 |
119 | function ua(e?: any): string;
120 |
121 | function uuid(): string;
122 | }
123 |
124 | export default ppo;
--------------------------------------------------------------------------------
/ppo.js:
--------------------------------------------------------------------------------
1 | /*
2 | * PPO
3 | * +++++++++ a utility-belt library for JavaScript +++++++++
4 | * (c) 2011-2017 drawcall
5 | * https://github.com/drawcall
6 | */
7 |
8 | (function (global, factory) {
9 | if (typeof define === 'function' && define.amd) {
10 | define([], factory);
11 | } else if (typeof module !== 'undefined' && module.exports) {
12 | module.exports = factory();
13 | } else {
14 | global.ppo = factory();
15 | }
16 | })(this, function () {
17 |
18 | function ppo() { }
19 |
20 | /************************************************************************
21 | * Detecting
22 | *************************************************************************/
23 | /**
24 | * detect IOS
25 | * From https://stackoverflow.com/questions/9038625/detect-if-device-is-ios
26 | */
27 | ppo.isIOS = ppo.isIos = function () {
28 | return /iPad|iPhone|iPod/.test(ppo.ua());
29 | }
30 |
31 | ppo.isIPad = function () {
32 | return /iPad/.test(ppo.ua());
33 | }
34 |
35 | /**
36 | * detect Android
37 | * From https://stackoverflow.com/questions/6031412/detect-android-phone-via-javascript-jquery
38 | */
39 | ppo.isAndroid = function () {
40 | return ppo.ua('l').indexOf("android") > -1;
41 | }
42 |
43 | /**
44 | * detect PC / Mobile
45 | * From https://stackoverflow.com/questions/3514784/what-is-the-best-way-to-detect-a-mobile-device-in-jquery
46 | */
47 | ppo.isMobile = function () {
48 | return /android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(ppo.ua('l'));
49 | }
50 |
51 | ppo.isPC = function () {
52 | return !this.isMobile();
53 | }
54 |
55 | ppo.isWeixin = function () {
56 | return /MicroMessenger/i.test(ppo.ua('l'));
57 | }
58 |
59 | /**
60 | * detect ie
61 | * From https://stackoverflow.com/questions/10964966/detect-ie-version-prior-to-v9-in-javascript
62 | */
63 | ppo.isIE = function () {
64 | return ppo.ieVer() > 0;
65 | }
66 |
67 | /**
68 | * ie version
69 | * From https://codepen.io/gapcode/pen/vEJNZN
70 | * IE 10 ua = 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)';
71 | * IE 11 'Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko';
72 | * Edge 12 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0';
73 | * Edge 13 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586';
74 | */
75 | ppo.ieVersion = ppo.ieVer = function () {
76 | var ua = ppo.ua();
77 | var msie = ua.indexOf('MSIE ');
78 | if (msie > 0) {
79 | return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);
80 | }
81 |
82 | var trident = ua.indexOf('Trident/');
83 | if (trident > 0) {
84 | var rv = ua.indexOf('rv:');
85 | return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);
86 | }
87 |
88 | var edge = ua.indexOf('Edge/');
89 | if (edge > 0) {
90 | return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);
91 | }
92 |
93 | return -1;
94 | }
95 |
96 | /**
97 | * navigator.userAgent
98 | */
99 | ppo.ua = function (lower) {
100 | return lower ? window.navigator.userAgent.toLowerCase() : window.navigator.userAgent;
101 | }
102 |
103 | /************************************************************************
104 | * LOGS
105 | *************************************************************************/
106 | /**
107 | * log on mobile html body
108 | */
109 | ppo.log = function (msg, styles) {
110 | var ele = document.getElementById('_ppo_log');
111 | if (ele === null) {
112 | ele = document.createElement('div');
113 | ele.setAttribute('id', '_ppo_log');
114 | ele.setAttribute('style', 'position:fixed;left:0;top:0;z-index:9999;padding:4px;');
115 | document.body.appendChild(ele);
116 | }
117 |
118 | if (styles) {
119 | for (var style in styles) {
120 | ele.style[style] = styles[style];
121 | }
122 | }
123 | ele.innerHTML = msg;
124 | }
125 |
126 | /**
127 | * ppo.logs('onlyid&10', 1, 2);
128 | */
129 | ppo.logs = function () {
130 | if (window.console && window.console.log) {
131 | var onlyid = arguments[0] + '';
132 | var times = parseInt(onlyid.split('&')[1]) || 10;
133 | var logsCache = ppo._cache.logs;
134 |
135 | if (!logsCache[onlyid]) logsCache[onlyid] = {};
136 | if (!logsCache[onlyid].once) logsCache[onlyid].once = 1;
137 |
138 | if (logsCache[onlyid].once <= times) {
139 | console.log.apply(console, ppo.args(arguments, 1));
140 | logsCache[onlyid].once++;
141 | }
142 | }
143 | }
144 |
145 | ppo.removeConsole = function (clear) {
146 | try {
147 | if (!window.console) window.console = {};
148 | window.console.log = window.console.info = window.console.dir = window.console.warn = window.console.trace = ppo.noop;
149 | if (clear === 'clear' && window.console.clear) window.console.clear();
150 | } catch (e) {
151 | }
152 | }
153 |
154 |
155 | /************************************************************************
156 | * Bom and Dom
157 | *************************************************************************/
158 | /**
159 | * open new url dont not blocked by browser
160 | */
161 | ppo.open = function (href) {
162 | var id = '_ppo_open_proxy';
163 | var a = document.getElementById(id) || document.createElement('a');
164 | a.setAttribute('id', id);
165 | a.setAttribute('href', href);
166 | a.setAttribute('target', '_blank');
167 | a.style.display = 'none';
168 |
169 | if (!a.parentNode) document.body.appendChild(a);
170 | this.trigger(a, 'click', 'MouseEvents');
171 | }
172 |
173 | /**
174 | * trigger event
175 | * https://stackoverflow.com/questions/2490825/how-to-trigger-event-in-javascript
176 | */
177 | ppo.trigger = function (element, event, eventType) {
178 | if (document.createEventObject) {
179 | var e = document.createEventObject();
180 | return element.fireEvent('on' + event, e)
181 | } else {
182 | var e = document.createEvent(eventType || 'HTMLEvents');
183 | e.initEvent(event, true, true);
184 | element.dispatchEvent(e);
185 | }
186 | };
187 |
188 | /**
189 | * setInterval func fix times
190 | * https://stackoverflow.com/questions/2956966/javascript-telling-setinterval-to-only-fire-x-amount-of-times
191 | */
192 | ppo.setTimesout = function () {
193 | var func = arguments[0];
194 | var delay = arguments[1] === undefined ? 0 : parseFloat(arguments[1]);
195 | var times = arguments[2] === undefined ? 1 : parseInt(arguments[2]);
196 | var args = arguments.length > 3 ? ppo.args(arguments, 3) : null;
197 | var target = { index: 0, times: times, over: false };
198 |
199 | var id = setInterval(function () {
200 | target.index++;
201 | if (target.index > times) {
202 | clearInterval(id);
203 | } else {
204 | if (target.index == times) target.over = true;
205 | func.apply(target, args);
206 | }
207 | }, delay);
208 |
209 | return id;
210 | }
211 |
212 | ppo.clearTimesout = function (id) {
213 | clearInterval(id);
214 | }
215 |
216 | /**
217 | * construct
218 | * https://stackoverflow.com/questions/1606797/use-of-apply-with-new-operator-is-this-possible
219 | */
220 | ppo.construct = function () {
221 | var classs = arguments[0];
222 | return new (Function.prototype.bind.apply(classs, arguments));
223 | };
224 |
225 | /**
226 | * Gets all the formal parameter names of a function
227 | * https://www.zhihu.com/question/28912825
228 | */
229 | ppo.paramsName = function (fn) {
230 | return /\(\s*([\s\S]*?)\s*\)/.exec(fn.toString())[1].split(/\s*,\s*/);
231 | }
232 |
233 | /************************************************************************
234 | * Date
235 | *************************************************************************/
236 | /**
237 | * getDate
238 | * https://stackoverflow.com/questions/1531093/how-do-i-get-the-current-date-in-javascript
239 | */
240 | ppo.getDate = function (d1, d2) {
241 | var today = new Date();
242 |
243 | var dd = today.getDate();
244 | var mm = today.getMonth() + 1;
245 | var yyyy = today.getFullYear();
246 | var hh = today.getHours();
247 | var ms = today.getMinutes();
248 | var ss = today.getSeconds();
249 |
250 | dd = ppo.fill0(dd);
251 | mm = ppo.fill0(mm);
252 | hh = ppo.fill0(hh);
253 | ms = ppo.fill0(ms);
254 | ss = ppo.fill0(ss);
255 |
256 | d1 = d1 || '/';
257 | d2 = d2 || ':';
258 |
259 | return yyyy + d1 + mm + d1 + dd + ' ' + hh + d2 + ms + d2 + ss;
260 | }
261 |
262 |
263 | /************************************************************************
264 | * About Url Params
265 | *************************************************************************/
266 | /**
267 | * getUrlParam / deleteUrlParam
268 | * From https://stackoverflow.com/questions/901115/how-can-i-get-query-string-values-in-javascript
269 | */
270 | ppo.getUrlParam = function (name, url) {
271 | if (!url) url = window.location.href;
272 | name = name.replace(/[\[\]]/g, "\\$&");
273 | var regex = new RegExp("[?&]" + name + "(=([^]*)|&|#|$)"),
274 | results = regex.exec(url);
275 | if (!results) return null;
276 | if (!results[2]) return '';
277 |
278 | return decodeURIComponent(results[2].replace(/\+/g, " "));
279 | }
280 |
281 | /**
282 | * setUrlParam
283 | * From https://stackoverflow.com/questions/5999118/add-or-update-query-string-parameter
284 | */
285 | ppo.setUrlParam = function (key, value, url) {
286 | if (!url) url = window.location.href;
287 | var re = new RegExp("([?|&])" + key + "=.*?(&|#|$)", "i");
288 |
289 | if (url.match(re)) {
290 | return url.replace(re, "$1" + key + "=" + encodeURIComponent(value) + "$2");
291 | } else {
292 | var hash = "";
293 | if (url.indexOf("#") !== -1) {
294 | hash = url.replace(/.*#/, "#");
295 | url = url.replace(/#.*/, "");
296 | }
297 | var separator = url.indexOf("?") !== -1 ? "&" : "?";
298 | return url + separator + key + "=" + encodeURIComponent(value) + hash;
299 | }
300 | }
301 |
302 | ppo.deleteUrlParam = ppo.delUrlParam = function (param, url) {
303 | if (!url) url = window.location.href;
304 | //prefer to use l.search if you have a location/link object
305 | var urlparts = url.split('?');
306 | if (urlparts.length >= 2) {
307 |
308 | var prefix = encodeURIComponent(param) + '=';
309 | var pars = urlparts[1].split(/[&;]/g);
310 |
311 | //reverse iteration as may be destructive
312 | for (var i = pars.length; i-- > 0;) {
313 | //idiom for string.startsWith
314 | if (pars[i].lastIndexOf(prefix, 0) !== -1) {
315 | pars.splice(i, 1);
316 | }
317 | }
318 |
319 | url = urlparts[0] + (pars.length > 0 ? '?' + pars.join('&') : "");
320 | return url;
321 | } else {
322 | return url;
323 | }
324 | }
325 |
326 |
327 | /************************************************************************
328 | * Cookies
329 | *************************************************************************/
330 | /**
331 | * setCookie / getCookie / deleteCookie
332 | * From https://stackoverflow.com/questions/1458724/how-do-i-set-unset-cookie-with-jquery/1458728#1458728
333 | * change by drawcall
334 | */
335 | ppo.setCookie = function (name, value, option) {
336 | var longTime = 10;
337 | var path = "; path=/";
338 | var val = option && option.raw ? value : encodeURIComponent(value);
339 | var cookie = encodeURIComponent(name) + "=" + val;
340 |
341 | if (option) {
342 | if (option.days) {
343 | var date = new Date();
344 | var ms = option.days * 24 * 3600 * 1000;
345 | date.setTime(date.getTime() + ms);
346 | cookie += "; expires=" + date.toGMTString();
347 | } else if (option.hour) {
348 | var date = new Date();
349 | var ms = option.hour * 3600 * 1000;
350 | date.setTime(date.getTime() + ms);
351 | cookie += "; expires=" + date.toGMTString();
352 | } else {
353 | var date = new Date();
354 | var ms = longTime * 365 * 24 * 3600 * 1000;
355 | date.setTime(date.getTime() + ms);
356 | cookie += "; expires=" + date.toGMTString();
357 | }
358 |
359 | if (option.path) cookie += "; path=" + option.path;
360 | if (option.domain) cookie += "; domain=" + option.domain;
361 | if (option.secure) cookie += "; true";
362 | }
363 |
364 | document.cookie = cookie;
365 | }
366 |
367 | ppo.getCookie = function (name) {
368 | var nameEQ = encodeURIComponent(name) + "=";
369 | var ca = document.cookie.split(';');
370 | for (var i = 0; i < ca.length; i++) {
371 | var c = ca[i];
372 | while (c.charAt(0) === ' ') c = c.substring(1, c.length);
373 | if (c.indexOf(nameEQ) === 0) return decodeURIComponent(c.substring(nameEQ.length, c.length));
374 | }
375 |
376 | return null;
377 | }
378 |
379 | ppo.deleteCookie = ppo.delCookie = function (name) {
380 | this.setCookie(name, "", { hour: -1 });
381 | }
382 |
383 |
384 | /************************************************************************
385 | * Random And Math
386 | *************************************************************************/
387 | ppo.randomColor = function () {
388 | return '#' + ('00000' + (Math.random() * 0x1000000 << 0).toString(16)).slice(-6);
389 | }
390 |
391 | ppo.randomFromArray = ppo.randomfArr = function (arr) {
392 | return arr[Math.floor(Math.random() * arr.length)];
393 | }
394 |
395 | ppo.randomFromA2B = ppo.randomA2B = function (a, b, int) {
396 | var result = Math.random() * (b - a) + a;
397 | return int ? Math.floor(result) : result;
398 | }
399 |
400 | ppo.randomKey = function (length) {
401 | var key = "";
402 | var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
403 | length = length || 6;
404 |
405 | for (var i = 0; i < length; i++)
406 | key += possible.charAt(Math.floor(Math.random() * possible.length));
407 | return key;
408 | }
409 |
410 | ppo.floor = function (n, m) {
411 | m = m || 0;
412 | return Math.floor(n * Math.pow(10, m)) / Math.pow(10, m);
413 | }
414 |
415 | ppo.fill0 = function (num) {
416 | num = parseFloat(num);
417 | return num < 10 ? '0' + num : num;
418 | }
419 |
420 | ppo.currency = function (val) {
421 | m = m || 0;
422 | return Math.floor(n * Math.pow(10, m)) / Math.pow(10, m);
423 | }
424 |
425 | /************************************************************************
426 | * Mobile
427 | *************************************************************************/
428 | /**
429 | * lock touch in mobile phone
430 | */
431 | ppo.lockTouch = function () {
432 | document.addEventListener("touchmove", function (e) { e.preventDefault(); }, !1);
433 | document.addEventListener('touchstart', preventDefault, !1);
434 | document.addEventListener('touchend', preventDefault, !1);
435 |
436 | function not(e, tag) {
437 | return e.target.tagName != tag.toUpperCase() && e.target.tagName != tag.toLowerCase();
438 | }
439 |
440 | function preventDefault(e) {
441 | if (not(e, 'input') && not(e, 'textarea') && not(e, 'select') && not(e, 'menus'))
442 | e.preventDefault();
443 | }
444 | }
445 |
446 |
447 | /************************************************************************
448 | * Assets
449 | *************************************************************************/
450 | /**
451 | * load js
452 | * 1. ppo.loadjs("//your_url/a.js",func);
453 | * 2. ppo.loadjs("//your_url/a.js","only_id",func);
454 | */
455 | ppo.loadjs = function (url, b, c) {
456 | var onlyId,
457 | callback;
458 |
459 | if (typeof b == "function") {
460 | onlyId = this.hash(url + "") + "";
461 | callback = b;
462 | } else if (typeof b == "undefined") {
463 | onlyId = this.hash(url + "") + "";
464 | callback = null;
465 | } else {
466 | onlyId = b + "";
467 | callback = c;
468 | }
469 |
470 | if (ppo._cache.urls[onlyId]) {
471 | callback && callback();
472 | } else {
473 | var func = typeof url == "string" ? _insertScript : _insertScripts;
474 | func.call(this, url, function () {
475 | ppo._cache.urls[onlyId] = true;
476 | callback && callback();
477 | });
478 | }
479 | }
480 |
481 |
482 | /************************************************************************
483 | * Other
484 | *************************************************************************/
485 | /**
486 | * generate uuid
487 | * From https://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript
488 | */
489 | ppo.uuid = function () {
490 | return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
491 | var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
492 | return v.toString(16);
493 | });
494 | }
495 |
496 | /**
497 | * string hash map
498 | * From https://stackoverflow.com/questions/7616461/generate-a-hash-from-string-in-javascript-jquery
499 | */
500 | ppo.hash = function (str) {
501 | str += "";
502 | var hash = 0, i, chr;
503 | if (str.length === 0) return hash;
504 | for (i = 0; i < str.length; i++) {
505 | chr = str.charCodeAt(i);
506 | hash = ((hash << 5) - hash) + chr;
507 | hash |= 0; // Convert to 32bit integer
508 | }
509 |
510 | return hash;
511 | }
512 |
513 | /**
514 | * map condition judge
515 | */
516 | ppo.judge = ppo.judgment = function (v, vals, strict) {
517 | if (!this.isTypeof(vals, 'array')) return false;
518 |
519 | for (var key in vals) {
520 | if (strict) {
521 | if (v === vals[key])
522 | return true;
523 | } else {
524 | if (v == vals[key])
525 | return true;
526 | }
527 | }
528 |
529 | return false;
530 | }
531 |
532 | /**
533 | * is typeof type
534 | */
535 | ppo.isTypeof = function (val, type) {
536 | return Object.prototype.toString.call(val).slice(8, -1).toLowerCase() === type;
537 | }
538 |
539 | /**
540 | * to json
541 | */
542 | ppo.toJSON = ppo.tojson = ppo.toJson = function (res) {
543 | if (!res) return null;
544 |
545 | if (typeof res == 'string') {
546 | try {
547 | return JSON.parse(res);
548 | } catch (e) {
549 | return eval('(' + res + ')');
550 | }
551 | } else if (this.isTypeof(res.json, 'function')) {
552 | return res.json();
553 | } else {
554 | return res;
555 | }
556 | }
557 |
558 | /**
559 | * to array
560 | */
561 | ppo.toArray = function (obj, dot) {
562 | if (!obj) return null;
563 |
564 | if (ppo.isTypeof(obj, 'array')) {
565 | return obj;
566 | } else if (ppo.isTypeof(obj, 'string') && obj.indexOf(",") > 0) {
567 | return obj.split(',');
568 | } else {
569 | if (dot && ppo.isTypeof(obj, 'string'))
570 | return obj.split(dot);
571 | else
572 | return [obj];
573 | }
574 | }
575 |
576 | /**
577 | * arguments to array
578 | */
579 | ppo.args = function ($arguments, first) {
580 | return Array.prototype.slice.call($arguments, first || 0);
581 | }
582 |
583 | ppo.delLastComma = ppo.deleteLastComma = function (str) {
584 | str += '';
585 | str = (str.slice(str.length - 1) === ',') ? str.slice(0, -1) : str;
586 | return str;
587 | }
588 |
589 | /**
590 | * a trash object
591 | */
592 | ppo.trash = {
593 | clear: function () {
594 | for (var key in ppo.trash) {
595 | if (key !== 'log' && key !== 'clear')
596 | delete ppo.trash[key];
597 | }
598 | },
599 | log: function () {
600 | for (var key in ppo.trash) {
601 | if (key !== 'log' && key !== 'clear')
602 | console.log('ppo.trash:: ', key, ppo.trash[key]);
603 | }
604 | }
605 | };
606 |
607 | ppo.noop = function () { };
608 |
609 | /************************************************************************
610 | *
611 | * Private Method
612 | *
613 | *************************************************************************/
614 | ppo._cache = { urls: {}, logs: {} };
615 |
616 | var _insertScripts = function (arr, callback) {
617 | for (var i = 0; i < arr.length; i++) {
618 | _insertScript(arr[i], loaded);
619 | }
620 |
621 | var _index = 0;
622 | function loaded() {
623 | _index++;
624 | if (_index >= arr.length) {
625 | callback && callback();
626 | }
627 | }
628 | }
629 |
630 | var _insertScript = function (src, callback) {
631 | var script = document.createElement("script");
632 | script.setAttribute("type", "text/javascript");
633 | script.setAttribute("src", src);
634 | document.getElementsByTagName("head")[0].appendChild(script);
635 |
636 | if (/msie/.test(ppo.ua('l'))) {
637 | script.onreadystatechange = function () {
638 | if (this.readyState == "loaded" || this.readyState == "complete") {
639 | callback();
640 | }
641 | };
642 | } else if (/gecko/.test(ppo.ua('l'))) {
643 | script.onload = function () {
644 | callback();
645 | };
646 | } else {
647 | setTimeout(function () { callback(); }, 50);
648 | }
649 | }
650 |
651 |
652 | return ppo;
653 | });
654 |
--------------------------------------------------------------------------------
/ppo.min.js:
--------------------------------------------------------------------------------
1 | !function(e,o){"function"==typeof define&&define.amd?define([],o):"undefined"!=typeof module&&module.exports?module.exports=o():e.ppo=o()}(this,function(){function ppo(){}ppo.isIOS=ppo.isIos=function(){return/iPad|iPhone|iPod/.test(ppo.ua())},ppo.isIPad=function(){return/iPad/.test(ppo.ua())},ppo.isAndroid=function(){return-1=e.length&&o&&o()}},_insertScript=function(e,o){var t=document.createElement("script");t.setAttribute("type","text/javascript"),t.setAttribute("src",e),document.getElementsByTagName("head")[0].appendChild(t),/msie/.test(ppo.ua("l"))?t.onreadystatechange=function(){"loaded"!=this.readyState&&"complete"!=this.readyState||o()}:/gecko/.test(ppo.ua("l"))?t.onload=function(){o()}:setTimeout(function(){o()},50)};return ppo});
--------------------------------------------------------------------------------
/ppo.min.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"sources":["ppo.js"],"names":["global","factory","define","amd","module","exports","ppo","this","isIOS","isIos","test","ua","isIPad","isAndroid","indexOf","isMobile","isPC","isWeixin","isIE","ieVer","ieVersion","msie","parseInt","substring","rv","edge","lower","window","navigator","userAgent","toLowerCase","log","msg","styles","ele","document","getElementById","createElement","setAttribute","body","appendChild","style","innerHTML","logs","onlyid","times","logsCache","console","arguments","split","_cache","once","apply","args","removeConsole","clear","info","dir","warn","trace","noop","e","open","href","id","a","display","parentNode","trigger","element","event","eventType","createEventObject","fireEvent","createEvent","initEvent","dispatchEvent","setTimesout","func","delay","undefined","parseFloat","length","target","index","over","setInterval","clearInterval","clearTimesout","construct","Function","prototype","bind","paramsName","fn","exec","toString","getDate","d1","d2","today","Date","dd","mm","getMonth","yyyy","getFullYear","hh","getHours","ms","getMinutes","ss","getSeconds","fill0","getUrlParam","name","url","location","replace","results","RegExp","decodeURIComponent","setUrlParam","key","value","separator","re","match","encodeURIComponent","hash","deleteUrlParam","delUrlParam","param","urlparts","prefix","pars","i","lastIndexOf","splice","join","setCookie","option","date","val","raw","cookie","days","hour","longTime","setTime","getTime","toGMTString","path","domain","secure","getCookie","nameEQ","ca","c","charAt","deleteCookie","delCookie","randomColor","Math","random","slice","randomFromArray","randomfArr","arr","floor","randomFromA2B","randomA2B","b","int","result","randomKey","possible","n","m","pow","num","currency","lockTouch","not","tag","tagName","toUpperCase","preventDefault","addEventListener","loadjs","onlyId","callback","urls","_insertScript","_insertScripts","call","uuid","r","str","charCodeAt","judge","judgment","v","vals","strict","isTypeof","type","Object","toJSON","tojson","toJson","res","json","JSON","parse","eval","toArray","obj","dot","$arguments","first","Array","delLastComma","deleteLastComma","trash","loaded","_index","src","script","getElementsByTagName","onreadystatechange","readyState","onload","setTimeout"],"mappings":"AAOA,CAAA,SAAWA,EAAQC,GACO,YAAlB,OAAOC,QAAyBA,OAAOC,IACvCD,OAAO,GAAID,CAAO,EACO,aAAlB,OAAOG,QAA0BA,OAAOC,QAC/CD,OAAOC,QAAUJ,EAAQ,EAEzBD,EAAOM,IAAML,EAAQ,CAE5B,EAAEM,KAAM,WAEL,SAASD,OASTA,IAAIE,MAAQF,IAAIG,MAAQ,WACpB,MAAO,mBAAmBC,KAAKJ,IAAIK,GAAG,CAAC,CAC3C,EAEAL,IAAIM,OAAS,WACT,MAAO,OAAOF,KAAKJ,IAAIK,GAAG,CAAC,CAC/B,EAMAL,IAAIO,UAAY,WACZ,MAAwC,CAAC,EAAlCP,IAAIK,GAAG,GAAG,EAAEG,QAAQ,SAAS,CACxC,EAMAR,IAAIS,SAAW,WACX,MAAO,iEAAiEL,KAAKJ,IAAIK,GAAG,GAAG,CAAC,CAC5F,EAEAL,IAAIU,KAAO,WACP,MAAO,CAACT,KAAKQ,SAAS,CAC1B,EAEAT,IAAIW,SAAW,WACX,MAAO,kBAAkBP,KAAKJ,IAAIK,GAAG,GAAG,CAAC,CAC7C,EAMAL,IAAIY,KAAO,WACP,OAAqB,EAAdZ,IAAIa,MAAM,CACrB,EAUAb,IAAIc,UAAYd,IAAIa,MAAQ,WACxB,IAAIR,EAAKL,IAAIK,GAAG,EACZU,EAAOV,EAAGG,QAAQ,OAAO,EAC7B,OAAW,EAAP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