diff --git a/build/es6/node_modules/@lit-labs/motion/animate-controller.d.ts.map b/build/es6/node_modules/@lit-labs/motion/animate-controller.d.ts.map index 2c76bee57ba..329d0fd5426 100644 --- a/build/es6/node_modules/@lit-labs/motion/animate-controller.d.ts.map +++ b/build/es6/node_modules/@lit-labs/motion/animate-controller.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"animate-controller.d.ts","sourceRoot":"","sources":["../src/animate-controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,sBAAsB,EAAC,MAAM,KAAK,CAAC;AAC3C,OAAO,EAAC,OAAO,EAAE,OAAO,EAAC,MAAM,cAAc,CAAC;AAE9C,eAAO,MAAM,aAAa,EAAE,OAAO,CAAC,sBAAsB,EAAE,iBAAiB,CAC9D,CAAC;AAEhB;;;;;;GAMG;AACH,qBAAa,iBAAiB;IAC5B,IAAI,EAAE,sBAAsB,CAAC;IAC7B,cAAc,EAAE,OAAO,CAAC;IACxB,WAAW,UAAS;IACpB,QAAQ,UAAS;IACjB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;gBAGtB,IAAI,EAAE,sBAAsB,EAC5B,OAAO,EAAE;QACP,cAAc,CAAC,EAAE,OAAO,CAAC;QACzB,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;KACzB;IAUH;;OAEG;IACH,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,CAAa;IAElC,SAAS,CAAC,eAAe,UAAS;IAE5B,GAAG,CAAC,OAAO,EAAE,OAAO;IAa1B,MAAM,CAAC,OAAO,EAAE,OAAO;IAIvB;;OAEG;IACH,KAAK;IAIL;;OAEG;IACH,IAAI;IAIJ,MAAM;IAKN,MAAM;IAKN;;OAEG;IACH,UAAU;IAQV;;OAEG;IACH,IAAI,WAAW,YAEd;IAED;;OAEG;IACH,IAAI,SAAS,YAIZ;IAEK,QAAQ;CAGf"} \ No newline at end of file +{"version":3,"file":"animate-controller.d.ts","sourceRoot":"","sources":["../src/animate-controller.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAC,sBAAsB,EAAC,MAAM,KAAK,CAAC;AAC3C,OAAO,EAAC,OAAO,EAAE,OAAO,EAAC,MAAM,cAAc,CAAC;AAE9C,eAAO,MAAM,aAAa,EAAE,OAAO,CAAC,sBAAsB,EAAE,iBAAiB,CAC9D,CAAC;AAEhB;;;;;;GAMG;AACH,qBAAa,iBAAiB;IAC5B,IAAI,EAAE,sBAAsB,CAAC;IAC7B,cAAc,EAAE,OAAO,CAAC;IACxB,WAAW,UAAS;IACpB,QAAQ,UAAS;IACjB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;gBAGtB,IAAI,EAAE,sBAAsB,EAC5B,OAAO,EAAE;QACP,cAAc,CAAC,EAAE,OAAO,CAAC;QACzB,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;KACzB;IAUH;;OAEG;IACH,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,CAAa;IAElC,SAAS,CAAC,eAAe,UAAS;IAE5B,GAAG,CAAC,OAAO,EAAE,OAAO;IAa1B,MAAM,CAAC,OAAO,EAAE,OAAO;IAIvB;;OAEG;IACH,KAAK;IAIL;;OAEG;IACH,IAAI;IAIJ,MAAM;IAKN,MAAM;IAKN;;OAEG;IACH,UAAU;IAQV;;OAEG;IACH,IAAI,WAAW,YAEd;IAED;;OAEG;IACH,IAAI,SAAS,YAIZ;IAEK,QAAQ;CAGf"} \ No newline at end of file diff --git a/build/es6/node_modules/@lit-labs/motion/animate-controller.js.map b/build/es6/node_modules/@lit-labs/motion/animate-controller.js.map index 829b8eac161..820cdc498d1 100644 --- a/build/es6/node_modules/@lit-labs/motion/animate-controller.js.map +++ b/build/es6/node_modules/@lit-labs/motion/animate-controller.js.map @@ -1 +1 @@ -{"version":3,"file":"animate-controller.js","sources":["src/animate-controller.ts"],"sourcesContent":["import {ReactiveControllerHost} from 'lit';\nimport {Animate, Options} from './animate.js';\n\nexport const controllerMap: WeakMap =\n new WeakMap();\n\n/**\n * AnimateController can be used to provide default configuration options to all\n * `animate()` directives in a given component.\n *\n * It also provides control over all the `animate()` animations within a given\n * component, for example, `this.animateController.pause()` pauses all animations.\n */\nexport class AnimateController {\n host: ReactiveControllerHost;\n defaultOptions: Options;\n startPaused = false;\n disabled = false;\n onComplete?: () => void;\n\n constructor(\n host: ReactiveControllerHost,\n options: {\n defaultOptions?: Options;\n startPaused?: boolean;\n disabled?: boolean;\n onComplete?: () => void;\n }\n ) {\n this.host = host;\n this.defaultOptions = options.defaultOptions || {};\n this.startPaused = !!options.startPaused;\n this.disabled = !!options.disabled;\n this.onComplete = options.onComplete;\n controllerMap.set(this.host, this);\n }\n\n /**\n * Set of active `animate()` directives in the host component\n */\n clients: Set = new Set();\n\n protected pendingComplete = false;\n\n async add(animate: Animate) {\n this.clients.add(animate);\n if (this.startPaused) {\n animate.webAnimation?.pause();\n }\n this.pendingComplete = true;\n await animate.finished;\n if (this.pendingComplete && !this.isAnimating) {\n this.pendingComplete = false;\n this.onComplete?.();\n }\n }\n\n remove(animate: Animate) {\n this.clients.delete(animate);\n }\n\n /**\n * Pauses all animations running in the host component.\n */\n pause() {\n this.clients.forEach((f) => f.webAnimation?.pause());\n }\n\n /**\n * Plays all active animations in the host component.\n */\n play() {\n this.clients.forEach((f) => f.webAnimation?.play());\n }\n\n cancel() {\n this.clients.forEach((f) => f.webAnimation?.cancel());\n this.clients.clear();\n }\n\n finish() {\n this.clients.forEach((f) => f.webAnimation?.finish());\n this.clients.clear();\n }\n\n /**\n * Toggles the play/pause state of all active `animate()` animations in the host component.\n */\n togglePlay() {\n if (this.isPlaying) {\n this.pause();\n } else {\n this.play();\n }\n }\n\n /**\n * Returns true if the host component has any active `animate()` animations.\n */\n get isAnimating() {\n return this.clients.size > 0;\n }\n\n /**\n * Returns true if the host component has any playing `animate()` animations.\n */\n get isPlaying() {\n return Array.from(this.clients).some(\n (a) => a.webAnimation?.playState === 'running'\n );\n }\n\n async finished() {\n await Promise.all(Array.from(this.clients).map((f) => f.finished));\n }\n}\n"],"names":["controllerMap","WeakMap","AnimateController","constructor","host","options","this","startPaused","disabled","clients","Set","pendingComplete","defaultOptions","onComplete","set","async","animate","add","_a","webAnimation","pause","finished","isAnimating","_b","call","remove","delete","forEach","f","play","cancel","clear","finish","togglePlay","isPlaying","size","Array","from","some","a","playState","Promise","all","map"],"mappings":"AAGa,MAAAA,EACX,IAAIC,cASOC,EAOXC,YACEC,EACAC,GANFC,KAAWC,aAAG,EACdD,KAAQE,UAAG,EAuBXF,KAAAG,QAAwB,IAAIC,IAElBJ,KAAeK,iBAAG,EAb1BL,KAAKF,KAAOA,EACZE,KAAKM,eAAiBP,EAAQO,gBAAkB,CAAA,EAChDN,KAAKC,cAAgBF,EAAQE,YAC7BD,KAAKE,WAAaH,EAAQG,SAC1BF,KAAKO,WAAaR,EAAQQ,WAC1Bb,EAAcc,IAAIR,KAAKF,KAAME,KAC9B,CASDS,UAAUC,WACRV,KAAKG,QAAQQ,IAAID,GACbV,KAAKC,cACe,QAAtBW,EAAAF,EAAQG,oBAAc,IAAAD,GAAAA,EAAAE,SAExBd,KAAKK,iBAAkB,QACjBK,EAAQK,SACVf,KAAKK,kBAAoBL,KAAKgB,cAChChB,KAAKK,iBAAkB,EACR,QAAfY,EAAAjB,KAAKO,kBAAU,IAAAU,GAAAA,EAAAC,KAAAlB,MAElB,CAEDmB,OAAOT,GACLV,KAAKG,QAAQiB,OAAOV,EACrB,CAKDI,QACEd,KAAKG,QAAQkB,SAASC,IAAK,IAAAV,EAAC,OAAc,QAAdA,EAAAU,EAAET,oBAAY,IAAAD,OAAA,EAAAA,EAAEE,OAAO,GACpD,CAKDS,OACEvB,KAAKG,QAAQkB,SAASC,IAAK,IAAAV,EAAC,OAAc,QAAdA,EAAAU,EAAET,oBAAY,IAAAD,OAAA,EAAAA,EAAEW,MAAM,GACnD,CAEDC,SACExB,KAAKG,QAAQkB,SAASC,IAAK,IAAAV,EAAC,OAAc,QAAdA,EAAAU,EAAET,oBAAY,IAAAD,OAAA,EAAAA,EAAEY,QAAQ,IACpDxB,KAAKG,QAAQsB,OACd,CAEDC,SACE1B,KAAKG,QAAQkB,SAASC,IAAK,IAAAV,EAAC,OAAc,QAAdA,EAAAU,EAAET,oBAAY,IAAAD,OAAA,EAAAA,EAAEc,QAAQ,IACpD1B,KAAKG,QAAQsB,OACd,CAKDE,aACM3B,KAAK4B,UACP5B,KAAKc,QAELd,KAAKuB,MAER,CAKGP,kBACF,OAAOhB,KAAKG,QAAQ0B,KAAO,CAC5B,CAKGD,gBACF,OAAOE,MAAMC,KAAK/B,KAAKG,SAAS6B,MAC7BC,IAAK,IAAArB,EAAC,MAA8B,aAAd,QAAhBA,EAAAqB,EAAEpB,oBAAc,IAAAD,OAAA,EAAAA,EAAAsB,UAAuB,GAEjD,CAEDzB,uBACQ0B,QAAQC,IAAIN,MAAMC,KAAK/B,KAAKG,SAASkC,KAAKf,GAAMA,EAAEP,WACzD"} \ No newline at end of file +{"version":3,"file":"animate-controller.js","sources":["src/animate-controller.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nimport {ReactiveControllerHost} from 'lit';\nimport {Animate, Options} from './animate.js';\n\nexport const controllerMap: WeakMap =\n new WeakMap();\n\n/**\n * AnimateController can be used to provide default configuration options to all\n * `animate()` directives in a given component.\n *\n * It also provides control over all the `animate()` animations within a given\n * component, for example, `this.animateController.pause()` pauses all animations.\n */\nexport class AnimateController {\n host: ReactiveControllerHost;\n defaultOptions: Options;\n startPaused = false;\n disabled = false;\n onComplete?: () => void;\n\n constructor(\n host: ReactiveControllerHost,\n options: {\n defaultOptions?: Options;\n startPaused?: boolean;\n disabled?: boolean;\n onComplete?: () => void;\n }\n ) {\n this.host = host;\n this.defaultOptions = options.defaultOptions || {};\n this.startPaused = !!options.startPaused;\n this.disabled = !!options.disabled;\n this.onComplete = options.onComplete;\n controllerMap.set(this.host, this);\n }\n\n /**\n * Set of active `animate()` directives in the host component\n */\n clients: Set = new Set();\n\n protected pendingComplete = false;\n\n async add(animate: Animate) {\n this.clients.add(animate);\n if (this.startPaused) {\n animate.webAnimation?.pause();\n }\n this.pendingComplete = true;\n await animate.finished;\n if (this.pendingComplete && !this.isAnimating) {\n this.pendingComplete = false;\n this.onComplete?.();\n }\n }\n\n remove(animate: Animate) {\n this.clients.delete(animate);\n }\n\n /**\n * Pauses all animations running in the host component.\n */\n pause() {\n this.clients.forEach((f) => f.webAnimation?.pause());\n }\n\n /**\n * Plays all active animations in the host component.\n */\n play() {\n this.clients.forEach((f) => f.webAnimation?.play());\n }\n\n cancel() {\n this.clients.forEach((f) => f.webAnimation?.cancel());\n this.clients.clear();\n }\n\n finish() {\n this.clients.forEach((f) => f.webAnimation?.finish());\n this.clients.clear();\n }\n\n /**\n * Toggles the play/pause state of all active `animate()` animations in the host component.\n */\n togglePlay() {\n if (this.isPlaying) {\n this.pause();\n } else {\n this.play();\n }\n }\n\n /**\n * Returns true if the host component has any active `animate()` animations.\n */\n get isAnimating() {\n return this.clients.size > 0;\n }\n\n /**\n * Returns true if the host component has any playing `animate()` animations.\n */\n get isPlaying() {\n return Array.from(this.clients).some(\n (a) => a.webAnimation?.playState === 'running'\n );\n }\n\n async finished() {\n await Promise.all(Array.from(this.clients).map((f) => f.finished));\n }\n}\n"],"names":["controllerMap","WeakMap","AnimateController","constructor","host","options","this","startPaused","disabled","clients","Set","pendingComplete","defaultOptions","onComplete","set","async","animate","add","_a","webAnimation","pause","finished","isAnimating","_b","call","remove","delete","forEach","f","play","cancel","clear","finish","togglePlay","isPlaying","size","Array","from","some","a","playState","Promise","all","map"],"mappings":"AAQa,MAAAA,EACX,IAAIC,cASOC,EAOXC,YACEC,EACAC,GANFC,KAAWC,aAAG,E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hB,KAAKG,QAAQ0B,KAAO,CAC5B,CAKGD,gBACF,OAAOE,MAAMC,KAAK/B,KAAKG,SAAS6B,MAC7BC,IAAK,IAAArB,EAAC,MAA8B,aAAd,QAAhBA,EAAAqB,EAAEpB,oBAAc,IAAAD,OAAA,EAAAA,EAAAsB,UAAuB,GAEjD,CAEDzB,uBACQ0B,QAAQC,IAAIN,MAAMC,KAAK/B,KAAKG,SAASkC,KAAKf,GAAMA,EAAEP,WACzD"} \ No newline at end of file diff --git a/build/es6/node_modules/@lit-labs/motion/animate.d.ts.map b/build/es6/node_modules/@lit-labs/motion/animate.d.ts.map index 6953a3467be..5bd3d789e59 100644 --- a/build/es6/node_modules/@lit-labs/motion/animate.d.ts.map +++ b/build/es6/node_modules/@lit-labs/motion/animate.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"animate.d.ts","sourceRoot":"","sources":["../src/animate.ts"],"names":[],"mappings":"AACA,OAAO,EAAU,aAAa,EAAC,MAAM,aAAa,CAAC;AACnD,OAAO,EAAY,QAAQ,EAAW,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAC,cAAc,EAAC,MAAM,wBAAwB,CAAC;AAEtD,OAAO,EAAC,iBAAiB,EAAC,MAAM,yBAAyB,CAAC;AAE1D,oBAAY,SAAS,GAAG;IACtB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;CAClC,CAAC;AAEF,oBAAY,iBAAiB,GAAG,MAAM,EAAE,CAAC;AAQzC,oBAAY,OAAO,GAAG;IAEpB,eAAe,CAAC,EAAE,wBAAwB,CAAC;IAE3C,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAE/B,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,KAAK,CAAC,EAAE,MAAM,OAAO,CAAC;IAEtB,EAAE,CAAC,EAAE,OAAO,CAAC;IAEb,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC;IAEhB,GAA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build/es6/node_modules/@lit-labs/motion/animate.js +++ b/build/es6/node_modules/@lit-labs/motion/animate.js @@ -1 +1 @@ -import{nothing as t}from"../../lit/html.js";import{directive as i,PartType as e}from"../../lit/directive.js";import{AsyncDirective as s}from"../../lit/async-directive.js";import{controllerMap as o}from"./animate-controller.js";export{AnimateController}from"./animate-controller.js";let n=0;const r=new Map,l=new WeakSet,a=()=>new Promise((t=>requestAnimationFrame(t))),h=[{transform:"translateY(100%) scale(0)",opacity:0}],d=[{transform:"translateY(-100%) scale(0)",opacity:0}],p=[{transform:"translateX(-100%) scale(0)",opacity:0}],c=[{transform:"translateX(100%) scale(0)",opacity:0}],m=[{}],f=[{opacity:0}],u=f,v=[{opacity:0},{opacity:1}],y=[{opacity:0},{opacity:.25,offset:.75},{opacity:1}],g=(t,i)=>{const e=t-i;return 0===e?void 0:e},w=(t,i)=>{const e=t/i;return 1===e?void 0:e},b={left:(t,i)=>{const e=g(t,i);return{value:e,transform:e&&`translateX(${e}px)`}},top:(t,i)=>{const e=g(t,i);return{value:e,transform:e&&`translateY(${e}px)`}},width:(t,i)=>{const e=w(t,i);return{value:e,transform:e&&`scaleX(${e})`}},height:(t,i)=>{const e=w(t,i);return{value:e,transform:e&&`scaleY(${e})`}}},A={duration:333,easing:"ease-in-out"},O=["left","top","width","height","opacity","color","background"],C=new WeakMap;class S extends s{constructor(t){if(super(t),this.t=null,this.i=null,this.o=!0,this.shouldLog=!1,t.type===e.CHILD)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){var t;null===(t=this.resolveFinished)||void 0===t||t.call(this),this.finished=new Promise((t=>{this.h=t}))}async resolveFinished(){var t;null===(t=this.h)||void 0===t||t.call(this),this.h=void 0}render(i){return t}getController(){return o.get(this.l)}isDisabled(){var t;return this.options.disabled||(null===(t=this.getController())||void 0===t?void 0:t.disabled)}update(t,[i]){var e;const s=void 0===this.l;return s&&(this.l=null===(e=t.options)||void 0===e?void 0:e.host,this.l.addController(this),this.element=t.element,C.set(this.element,this)),this.optionsOrCallback=i,(s||"function"!=typeof i)&&this.u(i),this.render(i)}u(t){var i,e;t=null!=t?t:{};const s=this.getController();void 0!==s&&((t={...s.defaultOptions,...t}).keyframeOptions={...s.defaultOptions.keyframeOptions,...t.keyframeOptions}),null!==(i=(e=t).properties)&&void 0!==i||(e.properties=O),this.options=t}v(){const t={},i=this.element.getBoundingClientRect(),e=getComputedStyle(this.element);return this.options.properties.forEach((s=>{var o;const n=null!==(o=i[s])&&void 0!==o?o:b[s]?void 0:e[s],r=Number(n);t[s]=isNaN(r)?n+"":r})),t}p(){let t,i=!0;return this.options.guard&&(t=this.options.guard(),i=((t,i)=>{if(Array.isArray(t)){if(Array.isArray(i)&&i.length===t.length&&t.every(((t,e)=>t===i[e])))return!1}else if(i===t)return!1;return!0})(t,this.m)),this.o=this.l.hasUpdated&&!this.isDisabled()&&!this.isAnimating()&&i&&this.element.isConnected,this.o&&(this.m=Array.isArray(t)?Array.from(t):t),this.o}hostUpdate(){var t;"function"==typeof this.optionsOrCallback&&this.u(this.optionsOrCallback()),this.p()&&(this.g=this.v(),this.t=null!==(t=this.t)&&void 0!==t?t:this.element.parentNode,this.i=this.element.nextSibling)}async hostUpdated(){if(!this.o||!this.element.isConnected||this.options.skipInitial&&!this.isHostRendered)return;let t;this.prepare(),await a;const i=this._(),e=this.A(this.options.keyframeOptions,i),s=this.v();if(void 0!==this.g){const{from:e,to:o}=this.O(this.g,s,i);this.log("measured",[this.g,s,e,o]),t=this.calculateKeyframes(e,o)}else{const e=r.get(this.options.inId);if(e){r.delete(this.options.inId);const{from:o,to:l}=this.O(e,s,i);t=this.calculateKeyframes(o,l),t=this.options.in?[{...this.options.in[0],...t[0]},...this.options.in.slice(1),t[1]]:t,n++,t.forEach((t=>t.zIndex=n))}else this.options.in&&(t=[...this.options.in,{}])}this.animate(t,e)}resetStyles(){var t;void 0!==this.P&&(this.element.setAttribute("style",null!==(t=this.P)&&void 0!==t?t:""),this.P=void 0)}commitStyles(){var t,i;this.P=this.element.getAttribute("style"),null===(t=this.webAnimation)||void 0===t||t.commitStyles(),null===(i=this.webAnimation)||void 0===i||i.cancel()}reconnected(){}async disconnected(){var t;if(!this.o)return;if(void 0!==this.options.id&&r.set(this.options.id,this.g),void 0===this.options.out)return;if(this.prepare(),await a(),null===(t=this.t)||void 0===t?void 0:t.isConnected){const t=this.i&&this.i.parentNode===this.t?this.i:null;if(this.t.insertBefore(this.element,t),this.options.stabilizeOut){const t=this.v();this.log("stabilizing out");const i=this.g.left-t.left,e=this.g.top-t.top;!("static"===getComputedStyle(this.element).position)||0===i&&0===e||(this.element.style.position="relative"),0!==i&&(this.element.style.left=i+"px"),0!==e&&(this.element.style.top=e+"px")}}const i=this.A(this.options.keyframeOptions);await this.animate(this.options.out,i),this.element.remove()}prepare(){this.createFinished()}start(){var t,i;null===(i=(t=this.options).onStart)||void 0===i||i.call(t,this)}didFinish(t){var i,e;t&&(null===(e=(i=this.options).onComplete)||void 0===e||e.call(i,this)),this.g=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}_(){const t=[];for(let i=this.element.parentNode;i;i=null==i?void 0:i.parentNode){const e=C.get(i);e&&!e.isDisabled()&&e&&t.push(e)}return t}get isHostRendered(){const t=l.has(this.l);return t||this.l.updateComplete.then((()=>{l.add(this.l)})),t}A(t,i=this._()){const e={...A};return i.forEach((t=>Object.assign(e,t.options.keyframeOptions))),Object.assign(e,t),e}O(t,i,e){t={...t},i={...i};const s=e.map((t=>t.animatingProperties)).filter((t=>void 0!==t));let o=1,n=1;return void 0!==s&&(s.forEach((t=>{t.width&&(o/=t.width),t.height&&(n/=t.height)})),void 0!==t.left&&void 0!==i.left&&(t.left=o*t.left,i.left=o*i.left),void 0!==t.top&&void 0!==i.top&&(t.top=n*t.top,i.top=n*i.top)),{from:t,to:i}}calculateKeyframes(t,i,e=!1){var s;const o={},n={};let r=!1;const l={};for(const e in i){const h=t[e],d=i[e];if(e in b){const t=b[e];if(void 0===h||void 0===d)continue;const i=t(h,d);void 0!==i.transform&&(l[e]=i.value,r=!0,o.transform=`${null!==(s=o.transform)&&void 0!==s?s:""} ${i.transform}`)}else h!==d&&void 0!==h&&void 0!==d&&(r=!0,o[e]=h,n[e]=d)}return o.transformOrigin=n.transformOrigin=e?"center center":"top left",this.animatingProperties=l,r?[o,n]:void 0}async animate(t,i=this.options.keyframeOptions){this.start(),this.frames=t;let e=!1;if(!this.isAnimating()&&!this.isDisabled()&&(this.options.onFrames&&(this.frames=t=this.options.onFrames(this),this.log("modified frames",t)),void 0!==t)){this.log("animate",[t,i]),e=!0,this.webAnimation=this.element.animate(t,i);const s=this.getController();null==s||s.add(this);try{await this.webAnimation.finished}catch(t){}null==s||s.remove(this)}return this.didFinish(e),e}isAnimating(){var t,i;return"running"===(null===(t=this.webAnimation)||void 0===t?void 0:t.playState)||(null===(i=this.webAnimation)||void 0===i?void 0:i.pending)}log(t,i){this.shouldLog&&!this.isDisabled()&&console.log(t,this.options.id,i)}}const k=i(S);export{S as Animate,k as animate,a as animationFrame,O as defaultCssProperties,A as defaultKeyframeOptions,u as fade,v as fadeIn,y as fadeInSlow,f as fadeOut,d as flyAbove,h as flyBelow,p as flyLeft,c as flyRight,m as none,b as transformProps}; \ No newline at end of file +import{nothing as t}from"../../lit/html.js";import{directive as i,PartType as e}from"../../lit/directive.js";import{AsyncDirective as s}from"../../lit/async-directive.js";import{controllerMap as o}from"./animate-controller.js";export{AnimateController}from"./animate-controller.js";let n=0;const r=new Map,l=new WeakSet,a=()=>new Promise((t=>requestAnimationFrame(t))),h=[{transform:"translateY(100%) scale(0)",opacity:0}],d=[{transform:"translateY(-100%) scale(0)",opacity:0}],p=[{transform:"translateX(-100%) scale(0)",opacity:0}],m=[{transform:"translateX(100%) scale(0)",opacity:0}],c=[{}],u=[{opacity:0}],f=u,v=[{opacity:0},{opacity:1}],y=[{opacity:0},{opacity:.25,offset:.75},{opacity:1}],g=(t,i)=>{const e=t-i;return 0===e?void 0:e},w=(t,i)=>{const e=t/i;return 1===e?void 0:e},b={left:(t,i)=>{const e=g(t,i);return{value:e,transform:null==e||isNaN(e)?void 0:`translateX(${e}px)`}},top:(t,i)=>{const e=g(t,i);return{value:e,transform:null==e||isNaN(e)?void 0:`translateY(${e}px)`}},width:(t,i)=>{let e;0===i&&(i=1,e={width:"1px"});const s=w(t,i);return{value:s,overrideFrom:e,transform:null==s||isNaN(s)?void 0:`scaleX(${s})`}},height:(t,i)=>{let e;0===i&&(i=1,e={height:"1px"});const s=w(t,i);return{value:s,overrideFrom:e,transform:null==s||isNaN(s)?void 0:`scaleY(${s})`}}},A={duration:333,easing:"ease-in-out"},O=["left","top","width","height","opacity","color","background"],C=new WeakMap;class x extends s{constructor(t){if(super(t),this.t=null,this.i=null,this.o=!0,this.shouldLog=!1,t.type===e.CHILD)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){var t;null===(t=this.resolveFinished)||void 0===t||t.call(this),this.finished=new Promise((t=>{this.h=t}))}async resolveFinished(){var t;null===(t=this.h)||void 0===t||t.call(this),this.h=void 0}render(i){return t}getController(){return o.get(this.l)}isDisabled(){var t;return this.options.disabled||(null===(t=this.getController())||void 0===t?void 0:t.disabled)}update(t,[i]){var e;const s=void 0===this.l;return s&&(this.l=null===(e=t.options)||void 0===e?void 0:e.host,this.l.addController(this),this.element=t.element,C.set(this.element,this)),this.optionsOrCallback=i,(s||"function"!=typeof i)&&this.u(i),this.render(i)}u(t){var i,e;t=null!=t?t:{};const s=this.getController();void 0!==s&&((t={...s.defaultOptions,...t}).keyframeOptions={...s.defaultOptions.keyframeOptions,...t.keyframeOptions}),null!==(i=(e=t).properties)&&void 0!==i||(e.properties=O),this.options=t}v(){const t={},i=this.element.getBoundingClientRect(),e=getComputedStyle(this.element);return this.options.properties.forEach((s=>{var o;const n=null!==(o=i[s])&&void 0!==o?o:b[s]?void 0:e[s],r=Number(n);t[s]=isNaN(r)?n+"":r})),t}p(){let t,i=!0;return this.options.guard&&(t=this.options.guard(),i=((t,i)=>{if(Array.isArray(t)){if(Array.isArray(i)&&i.length===t.length&&t.every(((t,e)=>t===i[e])))return!1}else if(i===t)return!1;return!0})(t,this.m)),this.o=this.l.hasUpdated&&!this.isDisabled()&&!this.isAnimating()&&i&&this.element.isConnected,this.o&&(this.m=Array.isArray(t)?Array.from(t):t),this.o}hostUpdate(){var t;"function"==typeof this.optionsOrCallback&&this.u(this.optionsOrCallback()),this.p()&&(this.g=this.v(),this.t=null!==(t=this.t)&&void 0!==t?t:this.element.parentNode,this.i=this.element.nextSibling)}async hostUpdated(){if(!this.o||!this.element.isConnected||this.options.skipInitial&&!this.isHostRendered)return;let t;this.prepare(),await a;const i=this._(),e=this.A(this.options.keyframeOptions,i),s=this.v();if(void 0!==this.g){const{from:e,to:o}=this.O(this.g,s,i);this.log("measured",[this.g,s,e,o]),t=this.calculateKeyframes(e,o)}else{const e=r.get(this.options.inId);if(e){r.delete(this.options.inId);const{from:o,to:l}=this.O(e,s,i);t=this.calculateKeyframes(o,l),t=this.options.in?[{...this.options.in[0],...t[0]},...this.options.in.slice(1),t[1]]:t,n++,t.forEach((t=>t.zIndex=n))}else this.options.in&&(t=[...this.options.in,{}])}this.animate(t,e)}resetStyles(){var t;void 0!==this.j&&(this.element.setAttribute("style",null!==(t=this.j)&&void 0!==t?t:""),this.j=void 0)}commitStyles(){var t,i;this.j=this.element.getAttribute("style"),null===(t=this.webAnimation)||void 0===t||t.commitStyles(),null===(i=this.webAnimation)||void 0===i||i.cancel()}reconnected(){}async disconnected(){var t;if(!this.o)return;if(void 0!==this.options.id&&r.set(this.options.id,this.g),void 0===this.options.out)return;if(this.prepare(),await a(),null===(t=this.t)||void 0===t?void 0:t.isConnected){const t=this.i&&this.i.parentNode===this.t?this.i:null;if(this.t.insertBefore(this.element,t),this.options.stabilizeOut){const t=this.v();this.log("stabilizing out");const i=this.g.left-t.left,e=this.g.top-t.top;!("static"===getComputedStyle(this.element).position)||0===i&&0===e||(this.element.style.position="relative"),0!==i&&(this.element.style.left=i+"px"),0!==e&&(this.element.style.top=e+"px")}}const i=this.A(this.options.keyframeOptions);await this.animate(this.options.out,i),this.element.remove()}prepare(){this.createFinished()}start(){var t,i;null===(i=(t=this.options).onStart)||void 0===i||i.call(t,this)}didFinish(t){var i,e;t&&(null===(e=(i=this.options).onComplete)||void 0===e||e.call(i,this)),this.g=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}_(){const t=[];for(let i=this.element.parentNode;i;i=null==i?void 0:i.parentNode){const e=C.get(i);e&&!e.isDisabled()&&e&&t.push(e)}return t}get isHostRendered(){const t=l.has(this.l);return t||this.l.updateComplete.then((()=>{l.add(this.l)})),t}A(t,i=this._()){const e={...A};return i.forEach((t=>Object.assign(e,t.options.keyframeOptions))),Object.assign(e,t),e}O(t,i,e){t={...t},i={...i};const s=e.map((t=>t.animatingProperties)).filter((t=>void 0!==t));let o=1,n=1;return void 0!==s&&(s.forEach((t=>{t.width&&(o/=t.width),t.height&&(n/=t.height)})),void 0!==t.left&&void 0!==i.left&&(t.left=o*t.left,i.left=o*i.left),void 0!==t.top&&void 0!==i.top&&(t.top=n*t.top,i.top=n*i.top)),{from:t,to:i}}calculateKeyframes(t,i,e=!1){var s;const o={},n={};let r=!1;const l={};for(const e in i){const h=t[e],d=i[e];if(e in b){const t=b[e];if(void 0===h||void 0===d)continue;const i=t(h,d);void 0!==i.transform&&(l[e]=i.value,r=!0,o.transform=`${null!==(s=o.transform)&&void 0!==s?s:""} ${i.transform}`,void 0!==i.overrideFrom&&Object.assign(o,i.overrideFrom))}else h!==d&&void 0!==h&&void 0!==d&&(r=!0,o[e]=h,n[e]=d)}return o.transformOrigin=n.transformOrigin=e?"center center":"top left",this.animatingProperties=l,r?[o,n]:void 0}async animate(t,i=this.options.keyframeOptions){this.start(),this.frames=t;let e=!1;if(!this.isAnimating()&&!this.isDisabled()&&(this.options.onFrames&&(this.frames=t=this.options.onFrames(this),this.log("modified frames",t)),void 0!==t)){this.log("animate",[t,i]),e=!0,this.webAnimation=this.element.animate(t,i);const s=this.getController();null==s||s.add(this);try{await this.webAnimation.finished}catch(t){}null==s||s.remove(this)}return this.didFinish(e),e}isAnimating(){var t,i;return"running"===(null===(t=this.webAnimation)||void 0===t?void 0:t.playState)||(null===(i=this.webAnimation)||void 0===i?void 0:i.pending)}log(t,i){this.shouldLog&&!this.isDisabled()&&console.log(t,this.options.id,i)}}const F=i(x);export{x as Animate,F as animate,a as animationFrame,O as defaultCssProperties,A as defaultKeyframeOptions,f as fade,v as fadeIn,y as fadeInSlow,u as fadeOut,d as flyAbove,h as flyBelow,p as flyLeft,m as flyRight,c as none,b as transformProps}; \ No newline at end of file diff --git a/build/es6/node_modules/@lit-labs/motion/animate.js.map b/build/es6/node_modules/@lit-labs/motion/animate.js.map index c0ba4e03796..f05f5514dea 100644 --- a/build/es6/node_modules/@lit-labs/motion/animate.js.map +++ b/build/es6/node_modules/@lit-labs/motion/animate.js.map @@ -1 +1 @@ -{"version":3,"file":"animate.js","sources":["src/animate.ts"],"sourcesContent":["import {LitElement, ReactiveControllerHost} from 'lit';\nimport {nothing, AttributePart} from 'lit/html.js';\nimport {directive, PartInfo, PartType} from 'lit/directive.js';\nimport {AsyncDirective} from 'lit/async-directive.js';\nimport {controllerMap} from './animate-controller.js';\nexport {AnimateController} from './animate-controller.js';\n\nexport type CSSValues = {\n [index: string]: string | number;\n};\n\nexport type CSSPropertiesList = string[];\n\n// zIndex for \"in\" animations\nlet z = 0;\n\nconst disconnectedProps: Map = new Map();\nconst renderedHosts: WeakSet = new WeakSet();\n\nexport type Options = {\n // Options used for the animation\n keyframeOptions?: KeyframeAnimationOptions;\n // List of css properties to animate\n properties?: CSSPropertiesList;\n // if `true`, the `animate` is disabled\n disabled?: boolean;\n // Callback run to produce a value which is dirty checked to determine if animation should run.\n guard?: () => unknown;\n // Id for this `animate`; used to link to other `animate`s via e.g. `inId`\n id?: unknown;\n // Set to the `animate` id to map to when rendering \"in\"\n inId?: unknown;\n // Keyframes to use when animating \"in\"\n in?: Keyframe[];\n // Keyframes to use when animating \"out\"\n out?: Keyframe[];\n // Set to true to match DOM position when animating \"out\"\n stabilizeOut?: boolean;\n // Skips animation when initially rendering\n skipInitial?: boolean;\n // Callback run when the `animate` animation starts\n onStart?: (animate: Animate) => void;\n // Callback run when the animation is complete\n onComplete?: (animate: Animate) => void;\n // Callback run to modify frames used to animate\n onFrames?: (animate: Animate) => Keyframe[] | undefined;\n};\n\nexport const animationFrame = () =>\n new Promise((resolve) => requestAnimationFrame(resolve));\n\n// Presets for animating \"in\" and \"out\" of the DOM.\nexport const flyBelow = [{transform: 'translateY(100%) scale(0)', opacity: 0}];\nexport const flyAbove = [{transform: 'translateY(-100%) scale(0)', opacity: 0}];\nexport const flyLeft = [{transform: 'translateX(-100%) scale(0)', opacity: 0}];\nexport const flyRight = [{transform: 'translateX(100%) scale(0)', opacity: 0}];\nexport const none = [{}];\nexport const fadeOut = [{opacity: 0}];\nexport const fade = fadeOut;\nexport const fadeIn = [{opacity: 0}, {opacity: 1}];\nexport const fadeInSlow = [\n {opacity: 0},\n {opacity: 0.25, offset: 0.75},\n {opacity: 1},\n];\n\nconst diffOp = (a: number, b: number) => {\n const v = a - b;\n return v === 0 ? undefined : v;\n};\nconst quotientOp = (a: number, b: number) => {\n const v = a / b;\n return v === 1 ? undefined : v;\n};\n\n// Computes a transform given a before and after input for given properties.\nexport const transformProps = {\n left: (a: number, b: number) => {\n const value = diffOp(a, b);\n return {value, transform: value && `translateX(${value}px)`};\n },\n top: (a: number, b: number) => {\n const value = diffOp(a, b);\n return {value, transform: value && `translateY(${value}px)`};\n },\n width: (a: number, b: number) => {\n const value = quotientOp(a, b);\n return {value, transform: value && `scaleX(${value})`};\n },\n height: (a: number, b: number) => {\n const value = quotientOp(a, b);\n return {value, transform: value && `scaleY(${value})`};\n },\n};\n\nexport const defaultKeyframeOptions: KeyframeAnimationOptions = {\n duration: 333,\n easing: `ease-in-out`,\n};\n\nexport const defaultCssProperties: CSSPropertiesList = [\n 'left',\n 'top',\n 'width',\n 'height',\n 'opacity',\n 'color',\n 'background',\n];\n\n// Dirty checks the value received from the `guard` option.\nconst isDirty = (value: unknown, previous: unknown) => {\n if (Array.isArray(value)) {\n // Dirty-check arrays by item\n if (\n Array.isArray(previous) &&\n previous.length === value.length &&\n value.every((v, i) => v === (previous as Array)[i])\n ) {\n return false;\n }\n } else if (previous === value) {\n // Dirty-check non-arrays by identity\n return false;\n }\n return true;\n};\n\n// Mapping of node on which the `animate` directive is used to the `animate` directive.\n// Used to get the ancestor `animate` animations (which are used to modify\n// `animate` transforms), done by ascending the DOM.\nconst nodeToAnimateMap: WeakMap = new WeakMap();\n\n/**\n * `animate` directive class. Animates a node's position between renders.\n */\nexport class Animate extends AsyncDirective {\n private _host?: LitElement;\n private _fromValues?: CSSValues;\n private _parentNode: Element | null = null;\n private _nextSibling: Node | null = null;\n private _shouldAnimate = true;\n private _previousValue: unknown;\n private _styles?: string | undefined | null;\n element!: HTMLElement;\n\n shouldLog = false;\n animatingProperties?: CSSValues;\n frames?: Keyframe[];\n webAnimation?: Animation;\n options!: Options;\n optionsOrCallback?: (() => Options) | Options;\n\n finished!: Promise;\n private _resolveFinished?: () => void;\n\n constructor(part: PartInfo) {\n super(part);\n if (part.type === PartType.CHILD) {\n throw new Error(\n 'The `animate` directive must be used in attribute position.'\n );\n }\n this.createFinished();\n }\n\n createFinished() {\n this.resolveFinished?.();\n this.finished = new Promise((r) => {\n this._resolveFinished = r;\n });\n }\n\n async resolveFinished() {\n this._resolveFinished?.();\n this._resolveFinished = undefined;\n }\n\n render(_options?: (() => Options) | Options) {\n return nothing;\n }\n\n getController() {\n return controllerMap.get(this._host!);\n }\n\n isDisabled() {\n return this.options.disabled || this.getController()?.disabled;\n }\n\n override update(part: AttributePart, [options]: Parameters) {\n const firstUpdate = this._host === undefined;\n if (firstUpdate) {\n this._host = part.options?.host as LitElement;\n this._host.addController(this);\n this.element = part.element;\n nodeToAnimateMap.set(this.element, this);\n }\n this.optionsOrCallback = options;\n if (firstUpdate || typeof options !== 'function') {\n this._setOptions(options as Options);\n }\n return this.render(options);\n }\n\n // TODO(sorvell): instead of a function/object, just use an object that the\n // user can mutate and create accessors for the data that do lookups as needed.\n // We're doing this every hostUpdate anyway and these lookups are fast.\n private _setOptions(options?: Options) {\n options = options ?? {};\n // Mixin controller options.\n const controller = this.getController();\n if (controller !== undefined) {\n options = {\n ...controller.defaultOptions,\n ...options,\n };\n options.keyframeOptions = {\n ...controller.defaultOptions.keyframeOptions,\n ...options.keyframeOptions,\n };\n }\n // Ensure there are some properties to animation and some animation options.\n options!.properties ??= defaultCssProperties;\n this.options = options;\n }\n\n // Measures and returns metrics for the element's bounding box and styling\n private _measure() {\n const props: CSSValues = {};\n const bounds = this.element.getBoundingClientRect();\n const computedStyle = getComputedStyle(this.element);\n this.options.properties!.forEach((p) => {\n const v =\n bounds[p as keyof typeof bounds] ??\n (!transformProps[p as keyof typeof transformProps]\n ? computedStyle[p as keyof CSSStyleDeclaration]\n : undefined);\n const asNum = Number(v);\n props[p] = isNaN(asNum) ? String(v) : asNum;\n });\n return props;\n }\n\n // Returns true if a `animate` should be started.\n private _canStart() {\n let dirty = true,\n value = undefined;\n if (this.options.guard) {\n value = this.options.guard();\n dirty = isDirty(value, this._previousValue);\n }\n this._shouldAnimate =\n this._host!.hasUpdated &&\n !this.isDisabled() &&\n !this.isAnimating() &&\n dirty &&\n this.element.isConnected;\n if (this._shouldAnimate) {\n // Copy the value if it's an array so that if it's mutated we don't forget\n // what the previous values were.\n this._previousValue = Array.isArray(value) ? Array.from(value) : value;\n }\n return this._shouldAnimate;\n }\n\n hostUpdate() {\n // TODO(sorvell): If options will change that will affect measuring,\n // then the user must pass a callback which can be called at update time.\n if (typeof this.optionsOrCallback === 'function') {\n this._setOptions(this.optionsOrCallback());\n }\n if (this._canStart()) {\n this._fromValues = this._measure();\n // Record parent and nextSibling used to re-attach node when animating \"out\"\n this._parentNode =\n this._parentNode ?? (this.element.parentNode as Element);\n this._nextSibling = this.element.nextSibling;\n }\n }\n\n async hostUpdated() {\n if (\n !this._shouldAnimate ||\n !this.element.isConnected ||\n (this.options.skipInitial && !this.isHostRendered)\n ) {\n return;\n }\n this.prepare();\n // Wait for rendering so any sub-elements have a chance to render.\n await animationFrame;\n let frames: Keyframe[] | undefined;\n const ancestors = this._getAncestors();\n // These inherit from ancestors. This allows easier synchronization of\n // child `animate`s within ancestor `animate`s.\n const animationOptions = this._calculateKeyframeOptions(\n this.options.keyframeOptions,\n ancestors\n );\n const toValues = this._measure();\n // Normal or inverse scale\n if (this._fromValues !== undefined) {\n const {from, to} = this._applyAncestorAdjustments(\n this._fromValues,\n toValues,\n ancestors\n );\n this.log('measured', [this._fromValues, toValues, from, to]);\n frames = this.calculateKeyframes(from, to);\n // \"In\" `animate`.\n } else {\n const disconnected = disconnectedProps.get(this.options.inId);\n if (disconnected) {\n // use disconnected data only once.\n disconnectedProps.delete(this.options.inId);\n const {from, to} = this._applyAncestorAdjustments(\n disconnected!,\n toValues,\n ancestors\n );\n frames = this.calculateKeyframes(from, to);\n // \"merge\" with \"in\" frames\n frames = this.options.in\n ? [\n {...this.options.in[0], ...frames![0]},\n ...this.options.in.slice(1),\n frames![1],\n ]\n : frames;\n // adjust z so always on top...\n z++;\n frames!.forEach((f) => (f.zIndex = z));\n } else if (this.options.in) {\n frames = [...this.options.in, {}];\n }\n }\n this.animate(frames, animationOptions);\n }\n\n resetStyles() {\n if (this._styles !== undefined) {\n this.element.setAttribute('style', this._styles ?? '');\n this._styles = undefined;\n }\n }\n\n commitStyles() {\n this._styles = this.element.getAttribute('style');\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (this.webAnimation as any)?.commitStyles();\n this.webAnimation?.cancel();\n }\n\n override reconnected() {}\n\n // Experimental animate out functionality.\n override async disconnected() {\n if (!this._shouldAnimate) {\n return;\n }\n if (this.options.id !== undefined) {\n disconnectedProps.set(this.options.id, this._fromValues!);\n }\n if (this.options.out === undefined) {\n return;\n }\n this.prepare();\n await animationFrame();\n if (this._parentNode?.isConnected) {\n // put element back in DOM\n const ref =\n this._nextSibling && this._nextSibling.parentNode === this._parentNode\n ? this._nextSibling\n : null;\n this._parentNode.insertBefore(this.element, ref);\n // Optionally move element back to its position before it was detached.\n if (this.options.stabilizeOut) {\n // Measure current position after re-attaching.\n const shifted = this._measure();\n this.log('stabilizing out');\n // TODO(sorvell): these nudges could conflict with existing styling\n // or animation but setting left/top should be rare, especially via\n // animation.\n const left =\n (this._fromValues!.left as number) - (shifted.left as number);\n const top = (this._fromValues!.top as number) - (shifted.top as number);\n const isStatic = getComputedStyle(this.element).position === 'static';\n if (isStatic && (left !== 0 || top !== 0)) {\n this.element.style.position = 'relative';\n }\n if (left !== 0) {\n this.element.style.left = left + 'px';\n }\n if (top !== 0) {\n this.element.style.top = top + 'px';\n }\n }\n }\n // These inherit from ancestors. This allows easier synchronization of\n // child `animate`s within ancestor `animate`s.\n const keyframeOptions = this._calculateKeyframeOptions(\n this.options.keyframeOptions\n );\n await this.animate(this.options.out, keyframeOptions);\n this.element.remove();\n }\n\n prepare() {\n this.createFinished();\n }\n\n start() {\n this.options.onStart?.(this);\n }\n\n didFinish(didAnimate: boolean) {\n if (didAnimate) {\n this.options.onComplete?.(this);\n }\n this._fromValues = undefined;\n this.animatingProperties = undefined;\n this.frames = undefined;\n this.resolveFinished();\n }\n\n private _getAncestors() {\n const ancestors = [];\n for (\n let p: Node | null | undefined = this.element.parentNode;\n p;\n p = p?.parentNode\n ) {\n const a = nodeToAnimateMap.get(p!);\n if (a && !a.isDisabled() && a) {\n ancestors.push(a);\n }\n }\n return ancestors;\n }\n\n protected get isHostRendered() {\n const hostRendered = renderedHosts.has(this._host!);\n if (!hostRendered) {\n this._host!.updateComplete.then(() => {\n renderedHosts.add(this._host!);\n });\n }\n return hostRendered;\n }\n\n private _calculateKeyframeOptions(\n options: KeyframeAnimationOptions | undefined,\n ancestors: Animate[] = this._getAncestors()\n ) {\n // merges this `animate`'s options over ancestor options over defaults\n const keyframeOptions = {...defaultKeyframeOptions};\n ancestors.forEach((a) =>\n Object.assign(keyframeOptions, a.options.keyframeOptions)\n );\n Object.assign(keyframeOptions, options);\n return keyframeOptions;\n }\n\n // Adjust position based on ancestor scaling.\n private _applyAncestorAdjustments(\n from: CSSValues,\n to: CSSValues,\n ancestors: Animate[]\n ) {\n from = {...from};\n to = {...to};\n const ancestorProps = ancestors\n .map((a) => a.animatingProperties)\n .filter((a) => a !== undefined) as CSSValues[];\n let dScaleX = 1;\n let dScaleY = 1;\n if (ancestorProps !== undefined) {\n // gather scaling data for ancestors\n ancestorProps.forEach((a) => {\n if (a.width) {\n dScaleX = dScaleX / (a.width as number);\n }\n if (a.height) {\n dScaleY = dScaleY / (a.height as number);\n }\n });\n // Move position by ancestor scaling amount.\n if (from.left !== undefined && to.left !== undefined) {\n from.left = dScaleX * (from.left as number);\n to.left = dScaleX * (to.left as number);\n }\n if (from.top !== undefined && to.top !== undefined) {\n from.top = dScaleY * (from.top as number);\n to.top = dScaleY * (to.top as number);\n }\n }\n return {from, to};\n }\n\n protected calculateKeyframes(from: CSSValues, to: CSSValues, center = false) {\n const fromFrame: Keyframe = {};\n const toFrame: Keyframe = {};\n let hasFrames = false;\n const props: CSSValues = {};\n for (const p in to) {\n const f = from[p],\n t = to[p];\n if (p in transformProps) {\n const tp = transformProps[p as keyof typeof transformProps];\n if (f === undefined || t === undefined) {\n continue;\n }\n const op = tp(f as number, t as number);\n if (op.transform !== undefined) {\n props[p] = op.value!;\n hasFrames = true;\n fromFrame.transform = `${fromFrame.transform ?? ''} ${op.transform}`;\n }\n } else if (f !== t && f !== undefined && t !== undefined) {\n hasFrames = true;\n fromFrame[p] = f;\n toFrame[p] = t;\n }\n }\n fromFrame.transformOrigin = toFrame.transformOrigin = center\n ? 'center center'\n : 'top left';\n this.animatingProperties = props;\n return hasFrames ? [fromFrame, toFrame] : undefined;\n }\n\n protected async animate(\n frames: Keyframe[] | undefined,\n options = this.options.keyframeOptions\n ) {\n this.start();\n this.frames = frames;\n let didAnimate = false;\n if (!this.isAnimating() && !this.isDisabled()) {\n if (this.options.onFrames) {\n this.frames = frames = this.options.onFrames(this);\n this.log('modified frames', frames);\n }\n if (frames !== undefined) {\n this.log('animate', [frames, options]);\n didAnimate = true;\n this.webAnimation = this.element.animate(frames, options);\n const controller = this.getController();\n controller?.add(this);\n try {\n await this.webAnimation.finished;\n } catch (e) {\n // cancelled.\n }\n controller?.remove(this);\n }\n }\n this.didFinish(didAnimate);\n return didAnimate;\n }\n\n protected isAnimating() {\n return (\n this.webAnimation?.playState === 'running' || this.webAnimation?.pending\n );\n }\n\n log(message: string, data?: unknown) {\n if (this.shouldLog && !this.isDisabled()) {\n console.log(message, this.options.id, data);\n }\n }\n}\n\n/**\n * The `animate` directive animates a node's layout between renders.\n * It will perform a \"tweening\" animation between the two states based on\n * the options given. In addition, elements can animate when they initially\n * render to DOM and when they are removed.\n *\n * Options include:\n * * animationOptions: configure animation via standard KeyframeAnimationOptions\n * * properties: list of properties to animate, defaults to\n * ['left', 'top','width', 'height', 'opacity', 'color', 'background']\n * * disabled: disables animation\n * * guard: function producing values that must change for the `animate` to run\n * * in: keyframes to use when animating in\n * * out: keyframes to use when animating out\n * * skipInitial: skip animating in the first time\n * * id: used to link to other `animate`s via `inId`\n * * inId: id of the `animate` to render from when animating in\n * * onStart: run when the `animate` starts\n * * onComplete: run when the `animate` completes\n * * onFrames: run when the frames are produces, use to modify frames\n */\nexport const animate = directive(Animate);\n"],"names":["z","disconnectedProps","Map","renderedHosts","WeakSet","animationFrame","Promise","resolve","requestAnimationFrame","flyBelow","transform","opacity","flyAbove","flyLeft","flyRight","none","fadeOut","fade","fadeIn","fadeInSlow","offset","diffOp","a","b","v","undefined","quotientOp","transformProps","left","value","top","width","height","defaultKeyframeOptions","duration","easing","defaultCssProperties","nodeToAnimateMap","WeakMap","Animate","AsyncDirective","constructor","part","super","this","_parentNode","_nextSibling","_shouldAnimate","shouldLog","type","PartType","CHILD","Error","createFinished","_a","resolveFinished","call","finished","r","_resolveFinished","async","render","_options","nothing","getController","controllerMap","get","_host","isDisabled","options","disabled","update","firstUpdate","host","addController","element","set","optionsOrCallback","_setOptions","controller","defaultOptions","keyframeOptions","_b","properties","_measure","props","bounds","getBoundingClientRect","computedStyle","getComputedStyle","forEach","p","asNum","Number","isNaN","String","_canStart","dirty","guard","previous","Array","isArray","length","every","i","isDirty","_previousValue","hasUpdated","isAnimating","isConnected","from","hostUpdate","_fromValues","parentNode","nextSibling","skipInitial","isHostRendered","frames","prepare","ancestors","_getAncestors","animationOptions","_calculateKeyframeOptions","toValues","to","_applyAncestorAdjustments","log","calculateKeyframes","disconnected","inId","delete","in","slice","f","zIndex","animate","resetStyles","_styles","setAttribute","commitStyles","getAttribute","webAnimation","cancel","reconnected","id","out","ref","insertBefore","stabilizeOut","shifted","position","style","remove","start","onStart","didFinish","didAnimate","onComplete","animatingProperties","push","hostRendered","has","updateComplete","then","add","Object","assign","ancestorProps","map","filter","dScaleX","dScaleY","center","fromFrame","toFrame","hasFrames","t","tp","op","transformOrigin","onFrames","e","playState","pending","message","data","console","directive"],"mappings":"wQAcA,IAAIA,EAAI,EAER,MAAMC,EAA6C,IAAIC,IACjDC,EAAiD,IAAIC,QA+B9CC,EAAiB,IAC5B,IAAIC,SAASC,GAAYC,sBAAsBD,KAGpCE,EAAW,CAAC,CAACC,UAAW,4BAA6BC,QAAS,IAC9DC,EAAW,CAAC,CAACF,UAAW,6BAA8BC,QAAS,IAC/DE,EAAU,CAAC,CAACH,UAAW,6BAA8BC,QAAS,IAC9DG,EAAW,CAAC,CAACJ,UAAW,4BAA6BC,QAAS,IAC9DI,EAAO,CAAC,CAAA,GACRC,EAAU,CAAC,CAACL,QAAS,IACrBM,EAAOD,EACPE,EAAS,CAAC,CAACP,QAAS,GAAI,CAACA,QAAS,IAClCQ,EAAa,CACxB,CAACR,QAAS,GACV,CAACA,QAAS,IAAMS,OAAQ,KACxB,CAACT,QAAS,IA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R,CAEShD,sBACR,MACmC,qBAAjCtD,EAAAV,KAAKiG,mCAAcyC,qBAA2BpG,EAAAtC,KAAKiG,mCAAc0C,QAEpE,CAEDzD,IAAI0D,EAAiBC,GACf7I,KAAKI,YAAcJ,KAAKwB,cAC1BsH,QAAQ5D,IAAI0D,EAAS5I,KAAKyB,QAAQ2E,GAAIyC,EAEzC,QAwBUlD,EAAUoD,EAAUpJ"} \ No newline at end of file +{"version":3,"file":"animate.js","sources":["src/animate.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nimport {LitElement, ReactiveControllerHost} from 'lit';\nimport {nothing, AttributePart} from 'lit/html.js';\nimport {directive, PartInfo, PartType} from 'lit/directive.js';\nimport {AsyncDirective} from 'lit/async-directive.js';\nimport {controllerMap} from './animate-controller.js';\nexport {AnimateController} from './animate-controller.js';\n\nexport type CSSValues = {\n [index: string]: string | number;\n};\n\nexport type CSSPropertiesList = string[];\n\n// zIndex for \"in\" animations\nlet z = 0;\n\nconst disconnectedProps: Map = new Map();\nconst renderedHosts: WeakSet = new WeakSet();\n\nexport type Options = {\n // Options used for the animation\n keyframeOptions?: KeyframeAnimationOptions;\n // List of css properties to animate\n properties?: CSSPropertiesList;\n // if `true`, the `animate` is disabled\n disabled?: boolean;\n // Callback run to produce a value which is dirty checked to determine if animation should run.\n guard?: () => unknown;\n // Id for this `animate`; used to link to other `animate`s via e.g. `inId`\n id?: unknown;\n // Set to the `animate` id to map to when rendering \"in\"\n inId?: unknown;\n // Keyframes to use when animating \"in\"\n in?: Keyframe[];\n // Keyframes to use when animating \"out\"\n out?: Keyframe[];\n // Set to true to match DOM position when animating \"out\"\n stabilizeOut?: boolean;\n // Skips animation when initially rendering\n skipInitial?: boolean;\n // Callback run when the `animate` animation starts\n onStart?: (animate: Animate) => void;\n // Callback run when the animation is complete\n onComplete?: (animate: Animate) => void;\n // Callback run to modify frames used to animate\n onFrames?: (animate: Animate) => Keyframe[] | undefined;\n};\n\nexport const animationFrame = () =>\n new Promise((resolve) => requestAnimationFrame(resolve));\n\n// Presets for animating \"in\" and \"out\" of the DOM.\nexport const flyBelow = [{transform: 'translateY(100%) scale(0)', opacity: 0}];\nexport const flyAbove = [{transform: 'translateY(-100%) scale(0)', opacity: 0}];\nexport const flyLeft = [{transform: 'translateX(-100%) scale(0)', opacity: 0}];\nexport const flyRight = [{transform: 'translateX(100%) scale(0)', opacity: 0}];\nexport const none = [{}];\nexport const fadeOut = [{opacity: 0}];\nexport const fade = fadeOut;\nexport const fadeIn = [{opacity: 0}, {opacity: 1}];\nexport const fadeInSlow = [\n {opacity: 0},\n {opacity: 0.25, offset: 0.75},\n {opacity: 1},\n];\n\nconst diffOp = (a: number, b: number) => {\n const v = a - b;\n return v === 0 ? undefined : v;\n};\nconst quotientOp = (a: number, b: number) => {\n const v = a / b;\n return v === 1 ? undefined : v;\n};\n\n// Computes a transform given a before and after input for given properties.\nexport const transformProps: {\n [p: string]: (\n a: number,\n b: number\n ) => {\n value?: number;\n transform?: string;\n overrideFrom?: {[k: string]: string};\n };\n} = {\n left: (a: number, b: number) => {\n const value = diffOp(a, b);\n const transform =\n value == null || isNaN(value) ? undefined : `translateX(${value}px)`;\n return {value, transform};\n },\n top: (a: number, b: number) => {\n const value = diffOp(a, b);\n const transform =\n value == null || isNaN(value) ? undefined : `translateY(${value}px)`;\n return {value, transform};\n },\n width: (a: number, b: number) => {\n let override: {} | undefined = undefined;\n // 'To' values of 0 would cause `value` to be Infinity. Instead we override\n // `b` to be 1 and add 1px as an override of width.\n if (b === 0) {\n b = 1;\n override = {width: '1px'};\n }\n const value = quotientOp(a, b);\n const transform =\n value == null || isNaN(value) ? undefined : `scaleX(${value})`;\n return {value, overrideFrom: override, transform};\n },\n height: (a: number, b: number) => {\n let override: {} | undefined = undefined;\n // 'To' values of 0 would cause `value` to be Infinity. Instead we override\n // `b` to be 1 and add 1px as an override of height.\n if (b === 0) {\n b = 1;\n override = {height: '1px'};\n }\n const value = quotientOp(a, b);\n const transform =\n value == null || isNaN(value) ? undefined : `scaleY(${value})`;\n return {value, overrideFrom: override, transform};\n },\n};\n\nexport const defaultKeyframeOptions: KeyframeAnimationOptions = {\n duration: 333,\n easing: `ease-in-out`,\n};\n\nexport const defaultCssProperties: CSSPropertiesList = [\n 'left',\n 'top',\n 'width',\n 'height',\n 'opacity',\n 'color',\n 'background',\n];\n\n// Dirty checks the value received from the `guard` option.\nconst isDirty = (value: unknown, previous: unknown) => {\n if (Array.isArray(value)) {\n // Dirty-check arrays by item\n if (\n Array.isArray(previous) &&\n previous.length === value.length &&\n value.every((v, i) => v === (previous as Array)[i])\n ) {\n return false;\n }\n } else if (previous === value) {\n // Dirty-check non-arrays by identity\n return false;\n }\n return true;\n};\n\n// Mapping of node on which the `animate` directive is used to the `animate` directive.\n// Used to get the ancestor `animate` animations (which are used to modify\n// `animate` transforms), done by ascending the DOM.\nconst nodeToAnimateMap: WeakMap = new WeakMap();\n\n/**\n * `animate` directive class. Animates a node's position between renders.\n */\nexport class Animate extends AsyncDirective {\n private _host?: LitElement;\n private _fromValues?: CSSValues;\n private _parentNode: Element | null = null;\n private _nextSibling: Node | null = null;\n private _shouldAnimate = true;\n private _previousValue: unknown;\n private _styles?: string | undefined | null;\n element!: HTMLElement;\n\n shouldLog = false;\n animatingProperties?: CSSValues;\n frames?: Keyframe[];\n webAnimation?: Animation;\n options!: Options;\n optionsOrCallback?: (() => Options) | Options;\n\n finished!: Promise;\n private _resolveFinished?: () => void;\n\n constructor(part: PartInfo) {\n super(part);\n if (part.type === PartType.CHILD) {\n throw new Error(\n 'The `animate` directive must be used in attribute position.'\n );\n }\n this.createFinished();\n }\n\n createFinished() {\n this.resolveFinished?.();\n this.finished = new Promise((r) => {\n this._resolveFinished = r;\n });\n }\n\n async resolveFinished() {\n this._resolveFinished?.();\n this._resolveFinished = undefined;\n }\n\n render(_options?: (() => Options) | Options) {\n return nothing;\n }\n\n getController() {\n return controllerMap.get(this._host!);\n }\n\n isDisabled() {\n return this.options.disabled || this.getController()?.disabled;\n }\n\n override update(part: AttributePart, [options]: Parameters) {\n const firstUpdate = this._host === undefined;\n if (firstUpdate) {\n this._host = part.options?.host as LitElement;\n this._host.addController(this);\n this.element = part.element;\n nodeToAnimateMap.set(this.element, this);\n }\n this.optionsOrCallback = options;\n if (firstUpdate || typeof options !== 'function') {\n this._setOptions(options as Options);\n }\n return this.render(options);\n }\n\n // TODO(sorvell): instead of a function/object, just use an object that the\n // user can mutate and create accessors for the data that do lookups as needed.\n // We're doing this every hostUpdate anyway and these lookups are fast.\n private _setOptions(options?: Options) {\n options = options ?? {};\n // Mixin controller options.\n const controller = this.getController();\n if (controller !== undefined) {\n options = {\n ...controller.defaultOptions,\n ...options,\n };\n options.keyframeOptions = {\n ...controller.defaultOptions.keyframeOptions,\n ...options.keyframeOptions,\n };\n }\n // Ensure there are some properties to animation and some animation options.\n options!.properties ??= defaultCssProperties;\n this.options = options;\n }\n\n // Measures and returns metrics for the element's bounding box and styling\n private _measure() {\n const props: CSSValues = {};\n const bounds = this.element.getBoundingClientRect();\n const computedStyle = getComputedStyle(this.element);\n this.options.properties!.forEach((p) => {\n const v =\n bounds[p as keyof typeof bounds] ??\n (!transformProps[p as keyof typeof transformProps]\n ? computedStyle[p as keyof CSSStyleDeclaration]\n : undefined);\n const asNum = Number(v);\n props[p] = isNaN(asNum) ? String(v) : asNum;\n });\n return props;\n }\n\n // Returns true if a `animate` should be started.\n private _canStart() {\n let dirty = true,\n value = undefined;\n if (this.options.guard) {\n value = this.options.guard();\n dirty = isDirty(value, this._previousValue);\n }\n this._shouldAnimate =\n this._host!.hasUpdated &&\n !this.isDisabled() &&\n !this.isAnimating() &&\n dirty &&\n this.element.isConnected;\n if (this._shouldAnimate) {\n // Copy the value if it's an array so that if it's mutated we don't forget\n // what the previous values were.\n this._previousValue = Array.isArray(value) ? Array.from(value) : value;\n }\n return this._shouldAnimate;\n }\n\n hostUpdate() {\n // TODO(sorvell): If options will change that will affect measuring,\n // then the user must pass a callback which can be called at update time.\n if (typeof this.optionsOrCallback === 'function') {\n this._setOptions(this.optionsOrCallback());\n }\n if (this._canStart()) {\n this._fromValues = this._measure();\n // Record parent and nextSibling used to re-attach node when animating \"out\"\n this._parentNode =\n this._parentNode ?? (this.element.parentNode as Element);\n this._nextSibling = this.element.nextSibling;\n }\n }\n\n async hostUpdated() {\n if (\n !this._shouldAnimate ||\n !this.element.isConnected ||\n (this.options.skipInitial && !this.isHostRendered)\n ) {\n return;\n }\n this.prepare();\n // Wait for rendering so any sub-elements have a chance to render.\n await animationFrame;\n let frames: Keyframe[] | undefined;\n const ancestors = this._getAncestors();\n // These inherit from ancestors. This allows easier synchronization of\n // child `animate`s within ancestor `animate`s.\n const animationOptions = this._calculateKeyframeOptions(\n this.options.keyframeOptions,\n ancestors\n );\n const toValues = this._measure();\n // Normal or inverse scale\n if (this._fromValues !== undefined) {\n const {from, to} = this._applyAncestorAdjustments(\n this._fromValues,\n toValues,\n ancestors\n );\n this.log('measured', [this._fromValues, toValues, from, to]);\n frames = this.calculateKeyframes(from, to);\n // \"In\" `animate`.\n } else {\n const disconnected = disconnectedProps.get(this.options.inId);\n if (disconnected) {\n // use disconnected data only once.\n disconnectedProps.delete(this.options.inId);\n const {from, to} = this._applyAncestorAdjustments(\n disconnected!,\n toValues,\n ancestors\n );\n frames = this.calculateKeyframes(from, to);\n // \"merge\" with \"in\" frames\n frames = this.options.in\n ? [\n {...this.options.in[0], ...frames![0]},\n ...this.options.in.slice(1),\n frames![1],\n ]\n : frames;\n // adjust z so always on top...\n z++;\n frames!.forEach((f) => (f['zIndex'] = z));\n } else if (this.options.in) {\n frames = [...this.options.in, {}];\n }\n }\n noAwait(this.animate(frames, animationOptions));\n }\n\n resetStyles() {\n if (this._styles !== undefined) {\n this.element.setAttribute('style', this._styles ?? '');\n this._styles = undefined;\n }\n }\n\n commitStyles() {\n this._styles = this.element.getAttribute('style');\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (this.webAnimation as any)?.commitStyles();\n this.webAnimation?.cancel();\n }\n\n override reconnected() {}\n\n // Experimental animate out functionality.\n override async disconnected() {\n if (!this._shouldAnimate) {\n return;\n }\n if (this.options.id !== undefined) {\n disconnectedProps.set(this.options.id, this._fromValues!);\n }\n if (this.options.out === undefined) {\n return;\n }\n this.prepare();\n await animationFrame();\n if (this._parentNode?.isConnected) {\n // put element back in DOM\n const ref =\n this._nextSibling && this._nextSibling.parentNode === this._parentNode\n ? this._nextSibling\n : null;\n this._parentNode.insertBefore(this.element, ref);\n // Optionally move element back to its position before it was detached.\n if (this.options.stabilizeOut) {\n // Measure current position after re-attaching.\n const shifted = this._measure();\n this.log('stabilizing out');\n // TODO(sorvell): these nudges could conflict with existing styling\n // or animation but setting left/top should be rare, especially via\n // animation.\n const left =\n (this._fromValues!['left'] as number) - (shifted['left'] as number);\n const top =\n (this._fromValues!['top'] as number) - (shifted['top'] as number);\n const isStatic = getComputedStyle(this.element).position === 'static';\n if (isStatic && (left !== 0 || top !== 0)) {\n this.element.style.position = 'relative';\n }\n if (left !== 0) {\n this.element.style.left = left + 'px';\n }\n if (top !== 0) {\n this.element.style.top = top + 'px';\n }\n }\n }\n // These inherit from ancestors. This allows easier synchronization of\n // child `animate`s within ancestor `animate`s.\n const keyframeOptions = this._calculateKeyframeOptions(\n this.options.keyframeOptions\n );\n await this.animate(this.options.out, keyframeOptions);\n this.element.remove();\n }\n\n prepare() {\n this.createFinished();\n }\n\n start() {\n this.options.onStart?.(this);\n }\n\n didFinish(didAnimate: boolean) {\n if (didAnimate) {\n this.options.onComplete?.(this);\n }\n this._fromValues = undefined;\n this.animatingProperties = undefined;\n this.frames = undefined;\n this.resolveFinished();\n }\n\n private _getAncestors() {\n const ancestors = [];\n for (\n let p: Node | null | undefined = this.element.parentNode;\n p;\n p = p?.parentNode\n ) {\n const a = nodeToAnimateMap.get(p!);\n if (a && !a.isDisabled() && a) {\n ancestors.push(a);\n }\n }\n return ancestors;\n }\n\n protected get isHostRendered() {\n const hostRendered = renderedHosts.has(this._host!);\n if (!hostRendered) {\n this._host!.updateComplete.then(() => {\n renderedHosts.add(this._host!);\n });\n }\n return hostRendered;\n }\n\n private _calculateKeyframeOptions(\n options: KeyframeAnimationOptions | undefined,\n ancestors: Animate[] = this._getAncestors()\n ) {\n // merges this `animate`'s options over ancestor options over defaults\n const keyframeOptions = {...defaultKeyframeOptions};\n ancestors.forEach((a) =>\n Object.assign(keyframeOptions, a.options.keyframeOptions)\n );\n Object.assign(keyframeOptions, options);\n return keyframeOptions;\n }\n\n // Adjust position based on ancestor scaling.\n private _applyAncestorAdjustments(\n from: CSSValues,\n to: CSSValues,\n ancestors: Animate[]\n ) {\n from = {...from};\n to = {...to};\n const ancestorProps = ancestors\n .map((a) => a.animatingProperties)\n .filter((a) => a !== undefined) as CSSValues[];\n let dScaleX = 1;\n let dScaleY = 1;\n if (ancestorProps !== undefined) {\n // gather scaling data for ancestors\n ancestorProps.forEach((a) => {\n if (a['width']) {\n dScaleX = dScaleX / (a['width'] as number);\n }\n if (a['height']) {\n dScaleY = dScaleY / (a['height'] as number);\n }\n });\n // Move position by ancestor scaling amount.\n if (from['left'] !== undefined && to['left'] !== undefined) {\n from['left'] = dScaleX * (from['left'] as number);\n to['left'] = dScaleX * (to['left'] as number);\n }\n if (from['top'] !== undefined && to['top'] !== undefined) {\n from['top'] = dScaleY * (from['top'] as number);\n to['top'] = dScaleY * (to['top'] as number);\n }\n }\n return {from, to};\n }\n\n protected calculateKeyframes(from: CSSValues, to: CSSValues, center = false) {\n const fromFrame: Keyframe = {};\n const toFrame: Keyframe = {};\n let hasFrames = false;\n const props: CSSValues = {};\n for (const p in to) {\n const f = from[p],\n t = to[p];\n if (p in transformProps) {\n const tp = transformProps[p as keyof typeof transformProps];\n if (f === undefined || t === undefined) {\n continue;\n }\n const op = tp(f as number, t as number);\n if (op.transform !== undefined) {\n props[p] = op.value!;\n hasFrames = true;\n fromFrame['transform'] = `${fromFrame['transform'] ?? ''} ${\n op['transform']\n }`;\n if (op.overrideFrom !== undefined) {\n Object.assign(fromFrame, op.overrideFrom);\n }\n }\n } else if (f !== t && f !== undefined && t !== undefined) {\n hasFrames = true;\n fromFrame[p] = f;\n toFrame[p] = t;\n }\n }\n fromFrame['transformOrigin'] = toFrame['transformOrigin'] = center\n ? 'center center'\n : 'top left';\n this.animatingProperties = props;\n return hasFrames ? [fromFrame, toFrame] : undefined;\n }\n\n protected async animate(\n frames: Keyframe[] | undefined,\n options = this.options.keyframeOptions\n ) {\n this.start();\n this.frames = frames;\n let didAnimate = false;\n if (!this.isAnimating() && !this.isDisabled()) {\n if (this.options.onFrames) {\n this.frames = frames = this.options.onFrames(this);\n this.log('modified frames', frames);\n }\n if (frames !== undefined) {\n this.log('animate', [frames, options]);\n didAnimate = true;\n this.webAnimation = this.element.animate(frames, options);\n const controller = this.getController();\n noAwait(controller?.add(this));\n try {\n await this.webAnimation.finished;\n } catch (e) {\n // cancelled.\n }\n controller?.remove(this);\n }\n }\n this.didFinish(didAnimate);\n return didAnimate;\n }\n\n protected isAnimating() {\n return (\n this.webAnimation?.playState === 'running' || this.webAnimation?.pending\n );\n }\n\n log(message: string, data?: unknown) {\n if (this.shouldLog && !this.isDisabled()) {\n console.log(message, this.options.id, data);\n }\n }\n}\n\n/**\n * Used in an async function to mark a promise that we're deliberately not\n * awaiting.\n */\nfunction noAwait(_p: null | undefined | Promise) {}\n\n/**\n * The `animate` directive animates a node's layout between renders.\n * It will perform a \"tweening\" animation between the two states based on\n * the options given. In addition, elements can animate when they initially\n * render to DOM and when they are removed.\n *\n * Options include:\n * * animationOptions: configure animation via standard KeyframeAnimationOptions\n * * properties: list of properties to animate, defaults to\n * ['left', 'top','width', 'height', 'opacity', 'color', 'background']\n * * disabled: disables animation\n * * guard: function producing values that must change for the `animate` to run\n * * in: keyframes to use when animating in\n * * out: keyframes to use when animating out\n * * skipInitial: skip animating in the first time\n * * id: used to link to other `animate`s via `inId`\n * * inId: id of the `animate` to render from when animating in\n * * onStart: run when the `animate` starts\n * * onComplete: run when the `animate` completes\n * * onFrames: run when the frames are produces, use to modify frames\n */\nexport const animate = directive(Animate);\n"],"names":["z","disconnectedProps","Map","renderedHosts","WeakSet","animationFrame","Promise","resolve","requestAnimationFrame","flyBelow","transform","opacity","flyAbove","flyLeft","flyRight","none","fadeOut","fade","fadeIn","fadeInSlow","offset","diffOp","a","b","v","undefined","quotientOp","transformProps","left","value","isNaN","top","width","override","overrideFrom","height","defaultKeyframeOptions","duration","easing","defaultCssProperties","nodeToAnimateMap","WeakMap","Animate","AsyncDirective","constructor","part","super","this","_parentNode","_nextSibling","_shouldAnimate","shouldLog","type","PartType","CHILD","Error","createFinished","_a","resolveFinished","call","finished","r","_resolveFinished","async","render","_options","nothing","getController","controllerMap","get","_host","isDisabled","options","disabled","update","firstUpdate","host","addController","element","set","optionsOrCallback","_setOptions","controller","defaultOptions","keyframeOptions","_b","properties","_measure","props","bounds","getBoundingClientRect","computedStyle","getComputedStyle","forEach","p","asNum","Number","String","_canStart","dirty","guard","previous","Array","isArray","length","every","i","isDirty","_previousValue","hasUpdated","isAnimating","isConnected","from","hostUpdate","_fromValues","parentNode","nextSibling","skipInitial","isHostRendered","frames","prepare","ancestors","_getAncestors","animationOptions","_calculateKeyframeOptions","toValues","to","_applyAncestorAdjustments","log","calculateKeyframes","disconnected","inId","delete","in","slice","f","animate","resetStyles","_styles","setAttribute","commitStyles","getAttribute","webAnimation","cancel","reconnected","id","out","ref","insertBefore","stabilizeOut","shifted","position","style","remove","start","onStart","didFinish","didAnimate","onComplete","animatingProperties","push","hostRendered","has","updateComplete","then","add","Object","assign","ancestorProps","map","filter","dScaleX","dScaleY","center","fromFrame","toFrame","hasFrames","t","tp","op","onFrames","e","playState","pending","message","data","console","directive"],"mappings":"wQAmBA,IAAIA,EAAI,EAER,MAAMC,EAA6C,IAAIC,IACjDC,EAAiD,IAAIC,QA+B9CC,EAAiB,IAC5B,IAAIC,SAASC,GAAYC,sBAAsB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A2B,gBAAIC,EAAyB,gBAAIF,EACxD,gBACA,WACJ9H,KAAKgH,oBAAsBvE,EACpBwF,EAAY,CAACF,EAAWC,QAAWtJ,CAC3C,CAESsC,cACRwD,EACA/C,EAAUzB,KAAKyB,QAAQY,iBAEvBrC,KAAK2G,QACL3G,KAAKwE,OAASA,EACd,IAAIsC,GAAa,EACjB,IAAK9G,KAAK+D,gBAAkB/D,KAAKwB,eAC3BxB,KAAKyB,QAAQ4G,WACfrI,KAAKwE,OAASA,EAASxE,KAAKyB,QAAQ4G,SAASrI,MAC7CA,KAAKiF,IAAI,kBAAmBT,SAEf9F,IAAX8F,GAAsB,CACxBxE,KAAKiF,IAAI,UAAW,CAACT,EAAQ/C,IAC7BqF,GAAa,EACb9G,KAAK+F,aAAe/F,KAAK+B,QAAQ0D,QAAQjB,EAAQ/C,GACjD,MAAMU,EAAanC,KAAKoB,gBAChBe,SAAAA,EAAYmF,IAAItH,MACxB,UACQA,KAAK+F,aAAalF,QACzB,CAAC,MAAOyH,GAER,CACDnG,SAAAA,EAAYuE,OAAO1G,KACpB,CAGH,OADAA,KAAK6G,UAAUC,GACRA,CACR,CAES/C,sBACR,MACmC,qBAAjCrD,EAAAV,KAAK+F,mCAAcwC,qBAA2BjG,EAAAtC,KAAK+F,mCAAcyC,QAEpE,CAEDvD,IAAIwD,EAAiBC,GACf1I,KAAKI,YAAcJ,KAAKwB,cAC1BmH,QAAQ1D,IAAIwD,EAASzI,KAAKyB,QAAQyE,GAAIwC,EAEzC,QA8BUjD,EAAUmD,EAAUjJ"} \ No newline at end of file diff --git a/build/es6/node_modules/@lit-labs/motion/position.d.ts.map b/build/es6/node_modules/@lit-labs/motion/position.d.ts.map index 4c9ff109390..9fd9aa10585 100644 --- a/build/es6/node_modules/@lit-labs/motion/position.d.ts.map +++ b/build/es6/node_modules/@lit-labs/motion/position.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"position.d.ts","sourceRoot":"","sources":["../src/position.ts"],"names":[],"mappings":"AAC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aAAa,CAAC;AACnD,OAAO,EAAY,QAAQ,EAAW,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAC,cAAc,EAAC,MAAM,wBAAwB,CAAC;AAEtD,UAAU,aAAa;IACrB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,aAAK,GAAG,GAAG;IAAC,KAAK,EAAE,WAAW,CAAA;CAAC,CAAC;AAChC,oBAAY,mBAAmB,GAAG,CAAC,MAAM,WAAW,CAAC,GAAG,GAAG,CAAC;AAE5D,oBAAY,SAAS,GAAG,KAAK,CAAC,MAAM,aAAa,CAAC,CAAC;AAInD,qBAAa,QAAS,SAAQ,cAAc;IAC1C,OAAO,CAAC,KAAK,CAAC,CAAa;IAC3B,OAAO,CAAC,QAAQ,CAAC,CAAU;IAC3B,OAAO,CAAC,oBAAoB,CAAuB;IACnD,OAAO,CAAC,UAAU,CAAC,CAAY;gBAEnB,IAAI,EAAE,QAAQ;IAS1B,MAAM,CAAC,oBAAoB,EAAE,mBAAmB,EAAE,UAAU,EAAE,SAAS;IAI9D,MAAM,CACb,IAAI,EAAE,aAAa,EACnB,CAAC,MAAM,EAAE,SAAS,CAAC,EAAE,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAYjD,WAAW;IAIX,OAAO,CAAC,SAAS;CAgBlB;AAED;;;GAGG;AACH,eAAO,MAAM,QAAQ,wIAAsB,CAAC"} \ No newline at end of file diff --git a/build/es6/node_modules/@lit-labs/motion/position.js b/build/es6/node_modules/@lit-labs/motion/position.js index a830f066811..fb6d72e5c63 100644 --- a/build/es6/node_modules/@lit-labs/motion/position.js +++ b/build/es6/node_modules/@lit-labs/motion/position.js @@ -1 +1 @@ -import{nothing as t}from"../../lit/html.js";import{directive as i,PartType as o}from"../../lit/directive.js";import{AsyncDirective as s}from"../../lit/async-directive.js";const n=["top","right","bottom","left"];class e extends s{constructor(t){if(super(t),t.type!==o.ELEMENT)throw Error("The `position` directive must be used in attribute position.")}render(i,o){return t}update(t,[i,o]){var s;return void 0===this.l&&(this.l=null===(s=t.options)||void 0===s?void 0:s.host,this.l.addController(this)),this.j=t.element,this.S=i,this.C=null!=o?o:["left","top","width","height"],this.render(i,o)}hostUpdated(){this.F()}F(){var t,i;const o="function"==typeof this.S?this.S():null===(t=this.S)||void 0===t?void 0:t.value,s=o.offsetParent;if(void 0===o||!s)return;const r=o.getBoundingClientRect(),l=s.getBoundingClientRect();null===(i=this.C)||void 0===i||i.forEach((t=>{const i=n.includes(t)?r[t]-l[t]:r[t];this.j.style[t]=i+"px"}))}}const r=i(e);export{e as Position,r as position}; \ No newline at end of file +import{nothing as t}from"../../lit/html.js";import{directive as i,PartType as o}from"../../lit/directive.js";import{AsyncDirective as s}from"../../lit/async-directive.js";const n=["top","right","bottom","left"];class e extends s{constructor(t){if(super(t),t.type!==o.ELEMENT)throw Error("The `position` directive must be used in attribute position.")}render(i,o){return t}update(t,[i,o]){var s;return void 0===this.l&&(this.l=null===(s=t.options)||void 0===s?void 0:s.host,this.l.addController(this)),this.N=t.element,this.P=i,this.S=null!=o?o:["left","top","width","height"],this.render(i,o)}hostUpdated(){this.C()}C(){var t,i;const o="function"==typeof this.P?this.P():null===(t=this.P)||void 0===t?void 0:t.value,s=o.offsetParent;if(void 0===o||!s)return;const r=o.getBoundingClientRect(),l=s.getBoundingClientRect();null===(i=this.S)||void 0===i||i.forEach((t=>{const i=n.includes(t)?r[t]-l[t]:r[t];this.N.style[t]=i+"px"}))}}const r=i(e);export{e as Position,r as position}; \ No newline at end of file diff --git a/build/es6/node_modules/@lit-labs/motion/position.js.map b/build/es6/node_modules/@lit-labs/motion/position.js.map index 3e02fe32362..f82e1fd0d7f 100644 --- a/build/es6/node_modules/@lit-labs/motion/position.js.map +++ b/build/es6/node_modules/@lit-labs/motion/position.js.map @@ -1 +1 @@ -{"version":3,"file":"position.js","sources":["src/position.ts"],"sourcesContent":["import {LitElement} from 'lit';\nimport {nothing, AttributePart} from 'lit/html.js';\nimport {directive, PartInfo, PartType} from 'lit/directive.js';\nimport {AsyncDirective} from 'lit/async-directive.js';\n\ninterface Positionables {\n readonly bottom: number;\n readonly height: number;\n readonly left: number;\n readonly right: number;\n readonly top: number;\n readonly width: number;\n}\n\ntype Ref = {value: HTMLElement};\nexport type TargetCallbackOrRef = (() => HTMLElement) | Ref;\n\nexport type Positions = Array;\n\nconst positionedPoints = ['top', 'right', 'bottom', 'left'];\n\nexport class Position extends AsyncDirective {\n private _host?: LitElement;\n private _element?: Element;\n private _targetCallbackOrRef!: TargetCallbackOrRef;\n private _positions?: Positions;\n\n constructor(part: PartInfo) {\n super(part);\n if (part.type !== PartType.ELEMENT) {\n throw new Error(\n 'The `position` directive must be used in attribute position.'\n );\n }\n }\n\n render(_targetCallbackOrRef: TargetCallbackOrRef, _positions: Positions) {\n return nothing;\n }\n\n override update(\n part: AttributePart,\n [target, positions]: Parameters\n ) {\n if (this._host === undefined) {\n this._host = part.options?.host as LitElement;\n this._host.addController(this);\n }\n this._element = part.element;\n this._targetCallbackOrRef = target;\n this._positions = positions ?? ['left', 'top', 'width', 'height'];\n return this.render(target, positions);\n }\n\n hostUpdated() {\n this._position();\n }\n\n private _position() {\n const target =\n typeof this._targetCallbackOrRef === 'function'\n ? this._targetCallbackOrRef()\n : this._targetCallbackOrRef?.value;\n const parent = target.offsetParent;\n if (target === undefined || !parent) {\n return;\n }\n const tr = target.getBoundingClientRect();\n const pr = parent.getBoundingClientRect();\n this._positions?.forEach((p) => {\n const x = positionedPoints.includes(p) ? tr[p] - pr[p] : tr[p];\n (this._element as HTMLElement).style[p] = `${x}px`;\n });\n }\n}\n\n/**\n * Positions and sizes the element on which the `position()` directive is used\n * relative to the given target element.\n */\nexport const position = directive(Position);\n"],"names":["positionedPoints","Position","AsyncDirective","constructor","part","super","type","PartType","ELEMENT","Error","render","_targetCallbackOrRef","_positions","nothing","update","target","positions","undefined","this","_host","_a","options","host","addController","_element","element","hostUpdated","_position","value","parent","offsetParent","tr","getBoundingClientRect","pr","_b","forEach","p","x","includes","style","position","directive"],"mappings":"yJAmBA,MAAMA,EAAmB,CAAC,MAAO,QAAS,SAAU,QAE9C,MAAOC,UAAiBC,EAM5BC,YAAYC,GAEV,GADAC,MAAMD,GACFA,EAAKE,OAASC,EAASC,QACzB,MAAUC,MACR,+DAGL,CAEDC,OAAOC,EAA2CC,GAChD,OAAOC,CACR,CAEQC,OACPV,GACCW,EAAQC,UAST,YAPmBC,IAAfC,KAAKC,IACPD,KAAKC,EAAsB,QAAdC,EAAAhB,EAAKiB,eAAS,IAAAD,OAAA,EAAAA,EAAAE,KAC3BJ,KAAKC,EAAMI,cAAcL,OAE3BA,KAAKM,EAAWpB,EAAKqB,QACrBP,KAAKP,EAAuBI,EAC5BG,KAAKN,EAAaI,QAAAA,EAAa,CAAC,OAAQ,MAAO,QAAS,UACjDE,KAAKR,OAAOK,EAAQC,EAC5B,CAEDU,cACER,KAAKS,GACN,CAEOA,YACN,MAAMZ,EACiC,mBAA9BG,KAAKP,EACRO,KAAKP,IACoB,QAAzBS,EAAAF,KAAKP,SAAoB,IAAAS,OAAA,EAAAA,EAAEQ,MAC3BC,EAASd,EAAOe,aACtB,QAAeb,IAAXF,IAAyBc,EAC3B,OAEF,MAAME,EAAKhB,EAAOiB,wBACZC,EAAKJ,EAAOG,wBACH,QAAfE,EAAAhB,KAAKN,SAAU,IAAAsB,GAAAA,EAAEC,SAASC,IACxB,MAAMC,EAAIrC,EAAiBsC,SAASF,GAAKL,EAAGK,GAAKH,EAAGG,GAAKL,EAAGK,GAC3DlB,KAAKM,EAAyBe,MAAMH,GAAQC,EAAH,IAAQ,GAErD,QAOUG,EAAWC,EAAUxC"} \ No newline at end of file +{"version":3,"file":"position.js","sources":["src/position.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nimport {LitElement} from 'lit';\nimport {nothing, AttributePart} from 'lit/html.js';\nimport {directive, PartInfo, PartType} from 'lit/directive.js';\nimport {AsyncDirective} from 'lit/async-directive.js';\n\ninterface Positionables {\n readonly bottom: number;\n readonly height: number;\n readonly left: number;\n readonly right: number;\n readonly top: number;\n readonly width: number;\n}\n\ntype Ref = {value: HTMLElement};\nexport type TargetCallbackOrRef = (() => HTMLElement) | Ref;\n\nexport type Positions = Array;\n\nconst positionedPoints = ['top', 'right', 'bottom', 'left'];\n\nexport class Position extends AsyncDirective {\n private _host?: LitElement;\n private _element?: Element;\n private _targetCallbackOrRef!: TargetCallbackOrRef;\n private _positions?: Positions;\n\n constructor(part: PartInfo) {\n super(part);\n if (part.type !== PartType.ELEMENT) {\n throw new Error(\n 'The `position` directive must be used in attribute position.'\n );\n }\n }\n\n render(_targetCallbackOrRef: TargetCallbackOrRef, _positions: Positions) {\n return nothing;\n }\n\n override update(\n part: AttributePart,\n [target, positions]: Parameters\n ) {\n if (this._host === undefined) {\n this._host = part.options?.host as LitElement;\n this._host.addController(this);\n }\n this._element = part.element;\n this._targetCallbackOrRef = target;\n this._positions = positions ?? ['left', 'top', 'width', 'height'];\n return this.render(target, positions);\n }\n\n hostUpdated() {\n this._position();\n }\n\n private _position() {\n const target =\n typeof this._targetCallbackOrRef === 'function'\n ? this._targetCallbackOrRef()\n : this._targetCallbackOrRef?.value;\n const parent = target.offsetParent;\n if (target === undefined || !parent) {\n return;\n }\n const tr = target.getBoundingClientRect();\n const pr = parent.getBoundingClientRect();\n this._positions?.forEach((p) => {\n const x = positionedPoints.includes(p) ? tr[p] - pr[p] : tr[p];\n (this._element as HTMLElement).style[p] = `${x}px`;\n });\n }\n}\n\n/**\n * Positions and sizes the element on which the `position()` directive is used\n * relative to the given target element.\n */\nexport const position = directive(Position);\n"],"names":["positionedPoints","Position","AsyncDirective","constructor","part","super","type","PartType","ELEMENT","Error","render","_targetCallbackOrRef","_positions","nothing","update","target","positions","undefined","this","_host","_a","options","host","addController","_element","element","hostUpdated","_position","value","parent","offsetParent","tr","getBoundingClientRect","pr","_b","forEach","p","x","includes","style","position","directive"],"mappings":"yJAwBA,MAAMA,EAAmB,CAAC,MAAO,QAAS,SAAU,QAE9C,MAAOC,UAAiBC,EAM5BC,YAAYC,GAEV,GADAC,MAAMD,GACFA,EAAKE,OAASC,EAASC,QACzB,MAAUC,MACR,+DAGL,CAEDC,OAAOC,EAA2CC,GAChD,OAAOC,CACR,CAEQC,OACPV,GACCW,EAAQC,UAST,YAPmBC,IAAfC,KAAKC,IACPD,KAAKC,EAAsB,QAAdC,EAAAhB,EAAKiB,eAAS,IAAAD,OAAA,EAAAA,EAAAE,KAC3BJ,KAAKC,EAAMI,cAAcL,OAE3BA,KAAKM,EAAWpB,EAAKqB,QACrBP,KAAKP,EAAuBI,EAC5BG,KAAKN,EAAaI,QAAAA,EAAa,CAAC,OAAQ,MAAO,QAAS,UACjDE,KAAKR,OAAOK,EAAQC,EAC5B,CAEDU,cACER,KAAKS,GACN,CAEOA,YACN,MAAMZ,EACiC,mBAA9BG,KAAKP,EACRO,KAAKP,IACoB,QAAzBS,EAAAF,KAAKP,SAAoB,IAAAS,OAAA,EAAAA,EAAEQ,MAC3BC,EAASd,EAAOe,aACtB,QAAeb,IAAXF,IAAyBc,EAC3B,OAEF,MAAME,EAAKhB,EAAOiB,wBACZC,EAAKJ,EAAOG,wBACH,QAAfE,EAAAhB,KAAKN,SAAU,IAAAsB,GAAAA,EAAEC,SAASC,IACxB,MAAMC,EAAIrC,EAAiBsC,SAASF,GAAKL,EAAGK,GAAKH,EAAGG,GAAKL,EAAGK,GAC3DlB,KAAKM,EAAyBe,MAAMH,GAAQC,EAAH,IAAQ,GAErD,QAOUG,EAAWC,EAAUxC"} \ No newline at end of file diff --git a/build/es6/node_modules/@lrnwebcomponents/app-hax/lib/app-hax-theme.js b/build/es6/node_modules/@lrnwebcomponents/app-hax/lib/app-hax-theme.js index 73b86a31d46..525df449bf7 100644 --- a/build/es6/node_modules/@lrnwebcomponents/app-hax/lib/app-hax-theme.js +++ b/build/es6/node_modules/@lrnwebcomponents/app-hax/lib/app-hax-theme.js @@ -344,9 +344,6 @@ import{html as e,css as t,unsafeCSS as o}from"../../../lit/index.js";import{HAXC #slot ::slotted(iframe) { width: auto; } - #slot ::slotted(*) { - word-break: break-all; - } #slot ::slotted(h1), #slot ::slotted(h2), #slot ::slotted(h3) { diff --git a/build/es6/node_modules/@lrnwebcomponents/clean-one/clean-one.js b/build/es6/node_modules/@lrnwebcomponents/clean-one/clean-one.js index 99c0328a47b..03bf7c37dfa 100644 --- a/build/es6/node_modules/@lrnwebcomponents/clean-one/clean-one.js +++ b/build/es6/node_modules/@lrnwebcomponents/clean-one/clean-one.js @@ -2,7 +2,7 @@ * Copyright 2020 The Pennsylvania State University * @license Apache-2.0, see License.md for full text. */ -import{html as e,css as t}from"../../lit/index.js";import{HAXCMSLitElementTheme as o}from"../haxcms-elements/lib/core/HAXCMSLitElementTheme.js";import{HAXCMSThemeParts as i}from"../haxcms-elements/lib/core/utils/HAXCMSThemeParts.js";import{HAXCMSRememberRoute as s}from"../haxcms-elements/lib/core/utils/HAXCMSRememberRoute.js";import{QRCodeMixin as n}from"../haxcms-elements/lib/core/utils/QRCodeMixin.js";import{HAXCMSMobileMenuMixin as r}from"../haxcms-elements/lib/core/utils/HAXCMSMobileMenu.js";import{HAXCMSUserStylesMenuMixin as a}from"../haxcms-elements/lib/core/utils/HAXCMSUserStylesMenu.js";import{store as l}from"../haxcms-elements/lib/core/haxcms-site-store.js";import{autorun as c,toJS as m}from"../../mobx/dist/mobx.esm.js";import"../scroll-button/scroll-button.js";import"../haxcms-elements/lib/ui-components/active-item/site-active-title.js";import"../haxcms-elements/lib/ui-components/active-item/site-active-tags.js";import"../haxcms-elements/lib/ui-components/navigation/site-breadcrumb.js";import"./lib/clean-one-search-box.js";import{SimpleColorsSuper as h}from"../simple-colors/simple-colors.js";import{PrintBranchMixin as d}from"../haxcms-elements/lib/core/utils/PrintBranchMixin.js";import{MicroFrontendRegistry as p}from"../micro-frontend-registry/micro-frontend-registry.js";import{PDFPageMixin as u}from"../haxcms-elements/lib/core/utils/PDFPageMixin.js";class CleanOne extends(s(d(u(n(i(a(r(h(o))))))))){static get styles(){return[...super.styles,t` +import{html as e,css as t}from"../../lit/index.js";import{HAXCMSLitElementTheme as o}from"../haxcms-elements/lib/core/HAXCMSLitElementTheme.js";import{HAXCMSThemeParts as i}from"../haxcms-elements/lib/core/utils/HAXCMSThemeParts.js";import{HAXCMSRememberRoute as s}from"../haxcms-elements/lib/core/utils/HAXCMSRememberRoute.js";import{QRCodeMixin as n}from"../haxcms-elements/lib/core/utils/QRCodeMixin.js";import{HAXCMSMobileMenuMixin as r}from"../haxcms-elements/lib/core/utils/HAXCMSMobileMenu.js";import{HAXCMSUserStylesMenuMixin as a}from"../haxcms-elements/lib/core/utils/HAXCMSUserStylesMenu.js";import{store as l}from"../haxcms-elements/lib/core/haxcms-site-store.js";import{autorun as c,toJS as m}from"../../mobx/dist/mobx.esm.js";import"../scroll-button/scroll-button.js";import"../haxcms-elements/lib/ui-components/active-item/site-active-title.js";import"../haxcms-elements/lib/ui-components/active-item/site-active-tags.js";import"../haxcms-elements/lib/ui-components/navigation/site-breadcrumb.js";import"./lib/clean-one-search-box.js";import{SimpleColorsSuper as h}from"../simple-colors/simple-colors.js";import{PrintBranchMixin as p}from"../haxcms-elements/lib/core/utils/PrintBranchMixin.js";import{MicroFrontendRegistry as d}from"../micro-frontend-registry/micro-frontend-registry.js";import{PDFPageMixin as u}from"../haxcms-elements/lib/core/utils/PDFPageMixin.js";class CleanOne extends(s(p(u(n(i(a(r(h(o))))))))){static get styles(){return[...super.styles,t` :host { color: #242A31; width: 100%; @@ -420,9 +420,6 @@ import{html as e,css as t}from"../../lit/index.js";import{HAXCMSLitElementTheme #slot ::slotted(iframe) { width: auto; } - #slot ::slotted(*) { - word-break: break-all; - } #slot ::slotted(h1), #slot ::slotted(h2), #slot ::slotted(h3) { @@ -680,13 +677,13 @@ import{html as e,css as t}from"../../lit/index.js";import{HAXCMSLitElementTheme
${this.HAXCMSMobileMenuButton()} ${this.HAXCMSUserStylesMenu()} - ${p.has("@haxcms/siteToHtml")?this.PrintBranchButton("bottom"):e` + ${d.has("@haxcms/siteToHtml")?this.PrintBranchButton("bottom"):e` `} - ${p.has("@core/htmlToPdf")?this.PDFPageButton("bottom"):""} + ${d.has("@core/htmlToPdf")?this.PDFPageButton("bottom"):""}
${this.QRCodeButton()} diff --git a/build/es6/node_modules/@lrnwebcomponents/clean-two/clean-two.js b/build/es6/node_modules/@lrnwebcomponents/clean-two/clean-two.js index f88fe1feb14..92cca32a6b8 100644 --- a/build/es6/node_modules/@lrnwebcomponents/clean-two/clean-two.js +++ b/build/es6/node_modules/@lrnwebcomponents/clean-two/clean-two.js @@ -400,9 +400,6 @@ import{html as e,css as t}from"../../lit/index.js";import{HAXCMSLitElementTheme #slot ::slotted(iframe) { width: auto; } - #slot ::slotted(*) { - word-break: break-all; - } #slot ::slotted(h1), #slot ::slotted(h2), #slot ::slotted(h3) { diff --git a/build/es6/node_modules/@lrnwebcomponents/course-design/lib/worksheet-download.js b/build/es6/node_modules/@lrnwebcomponents/course-design/lib/worksheet-download.js index c29c4e90094..7ac9d276afa 100644 --- a/build/es6/node_modules/@lrnwebcomponents/course-design/lib/worksheet-download.js +++ b/build/es6/node_modules/@lrnwebcomponents/course-design/lib/worksheet-download.js @@ -1,4 +1,4 @@ -import{LitElement as t,html as e,css as o}from"../../../lit/index.js";import"../../simple-icon/lib/simple-icons.js";import"../../simple-icon/lib/simple-icon-lite.js";export class WorksheetDownload extends t{static get properties(){return{title:{type:String},link:{type:String}}}static get tag(){return"worksheet-download"}static get haxProperties(){return{canScale:!1,canPosition:!1,canEditSource:!1,gizmo:{title:"Worksheet Download",description:"A button for displaying files available for download.",icon:"icons:file-download",color:"blue",tags:["Instructional","link","worksheet","download","url","file"],meta:{author:"HAXTheWeb core team"}},settings:{configure:[{property:"title",title:"Title",description:"The title of the download.",inputMethod:"textfield",icon:"editor:title"},{property:"link",title:"Link",description:"The link for the download.",inputMethod:"textfield",icon:"editor:insert-link"}],advanced:[]},demoSchema:[{tag:"worksheet-download",properties:{title:"Download worksheet"},content:""}]}}haxHooks(){return{editModeChanged:"haxeditModeChanged",activeElementChanged:"haxactiveElementChanged"}}haxactiveElementChanged(t,e){e&&(this._haxstate=e)}haxeditModeChanged(t){this._haxstate=t}_clickLink(t){this._haxstate&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}constructor(){super(),this.title="",this.link=""}static get styles(){return[o` +import{LitElement as t,html as e,css as o}from"../../../lit/index.js";import"../../simple-icon/lib/simple-icons.js";import"../../simple-icon/lib/simple-icon-lite.js";export class WorksheetDownload extends t{static get properties(){return{title:{type:String},link:{type:String}}}static get tag(){return"worksheet-download"}static get haxProperties(){return{canScale:!1,canPosition:!1,canEditSource:!1,gizmo:{title:"Worksheet Download",description:"A button for displaying files available for download.",icon:"icons:file-download",color:"blue",tags:["Instructional","link","worksheet","download","url","file"],meta:{author:"HAXTheWeb core team"}},settings:{configure:[{property:"title",title:"Title",description:"The title of the download.",inputMethod:"textfield",icon:"editor:title"},{property:"link",title:"Link",description:"The link for the download.",inputMethod:"haxupload",icon:"editor:insert-link"}],advanced:[]},demoSchema:[{tag:"worksheet-download",properties:{title:"Download worksheet"},content:""}]}}haxHooks(){return{editModeChanged:"haxeditModeChanged",activeElementChanged:"haxactiveElementChanged"}}haxactiveElementChanged(t,e){e&&(this._haxstate=e)}haxeditModeChanged(t){this._haxstate=t}_clickLink(t){this._haxstate&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}constructor(){super(),this.title="",this.link=""}static get styles(){return[o` :host { display: block; } diff --git a/build/es6/node_modules/@lrnwebcomponents/h5p-element/lib/h5p/js/jquery.js b/build/es6/node_modules/@lrnwebcomponents/h5p-element/lib/h5p/js/jquery.js index ab7a7ecdcd6..89b4e0523d2 100644 --- a/build/es6/node_modules/@lrnwebcomponents/h5p-element/lib/h5p/js/jquery.js +++ b/build/es6/node_modules/@lrnwebcomponents/h5p-element/lib/h5p/js/jquery.js @@ -1,3 +1,3 @@ /*! jQuery v1.9.1 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license */ -!function(e,t){var n,l,f=typeof t,p=e.document,d=e.location,h=e.jQuery,g=e.$,m={},y=[],v="1.9.1",x=y.concat,T=y.push,w=y.slice,N=y.indexOf,C=m.toString,E=m.hasOwnProperty,S=v.trim,b=function(e,t){return new b.fn.init(e,t,l)},A=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,j=/\S+/g,D=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,O=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,_=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,B=/^[\],:{}\s]*$/,I=/(?:^|:|,)(?:\s*\[)+/g,z=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,X=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,U=/^-ms-/,V=/-([\da-z])/gi,L=function(e,t){return t.toUpperCase()},H=function(e){(p.addEventListener||"load"===e.type||"complete"===p.readyState)&&(q(),b.ready())},q=function(){p.addEventListener?(p.removeEventListener("DOMContentLoaded",H,!1),e.removeEventListener("load",H,!1)):(p.detachEvent("onreadystatechange",H),e.detachEvent("onload",H))};function M(e){var t=e.length,n=b.type(e);return!b.isWindow(e)&&(!(1!==e.nodeType||!t)||("array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)))}b.fn=b.prototype={jquery:v,constructor:b,init:function(e,n,l){var f,d;if(!e)return this;if("string"==typeof e){if(!(f="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:O.exec(e))||!f[1]&&n)return!n||n.jquery?(n||l).find(e):this.constructor(n).find(e);if(f[1]){if(n=n instanceof b?n[0]:n,b.merge(this,b.parseHTML(f[1],n&&n.nodeType?n.ownerDocument||n:p,!0)),_.test(f[1])&&b.isPlainObject(n))for(f in n)b.isFunction(this[f])?this[f](n[f]):this.attr(f,n[f]);return this}if((d=p.getElementById(f[2]))&&d.parentNode){if(d.id!==f[2])return l.find(e);this.length=1,this[0]=d}return this.context=p,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):b.isFunction(e)?l.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),b.makeArray(e,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return w.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=b.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return b.each(this,e,t)},ready:function(e){return b.ready.promise().done(e),this},slice:function(){return this.pushStack(w.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(b.map(this,(function(t,n){return e.call(t,n,t)})))},end:function(){return this.prevObject||this.constructor(null)},push:T,sort:[].sort,splice:[].splice},b.fn.init.prototype=b.fn,b.extend=b.fn.extend=function(){var e,n,l,f,p,d,h=arguments[0]||{},g=1,m=arguments.length,y=!1;for("boolean"==typeof h&&(y=h,h=arguments[1]||{},g=2),"object"==typeof h||b.isFunction(h)||(h={}),m===g&&(h=this,--g);m>g;g++)if(null!=(p=arguments[g]))for(f in p)e=h[f],h!==(l=p[f])&&(y&&l&&(b.isPlainObject(l)||(n=b.isArray(l)))?(n?(n=!1,d=e&&b.isArray(e)?e:[]):d=e&&b.isPlainObject(e)?e:{},h[f]=b.extend(y,d,l)):l!==t&&(h[f]=l));return h},b.extend({noConflict:function(t){return e.$===b&&(e.$=g),t&&e.jQuery===b&&(e.jQuery=h),b},isReady:!1,readyWait:1,holdReady:function(e){e?b.readyWait++:b.ready(!0)},ready:function(e){if(!0===e?!--b.readyWait:!b.isReady){if(!p.body)return setTimeout(b.ready);b.isReady=!0,!0!==e&&--b.readyWait>0||(n.resolveWith(p,[b]),b.fn.trigger&&b(p).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===b.type(e)},isArray:Array.isArray||function(e){return"array"===b.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?m[C.call(e)]||"object":typeof e},isPlainObject:function(e){if(!e||"object"!==b.type(e)||e.nodeType||b.isWindow(e))return!1;try{if(e.constructor&&!E.call(e,"constructor")&&!E.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(e){return!1}var n;for(n in e);return n===t||E.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||p;var l=_.exec(e),f=!n&&[];return l?[t.createElement(l[1])]:(l=b.buildFragment([e],t,f),f&&b(f).remove(),b.merge([],l.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&((n=b.trim(n))&&B.test(n.replace(z,"@").replace(X,"]").replace(I,"")))?Function("return "+n)():(b.error("Invalid JSON: "+n),t)},parseXML:function(n){var l;if(!n||"string"!=typeof n)return null;try{e.DOMParser?l=(new DOMParser).parseFromString(n,"text/xml"):((l=new ActiveXObject("Microsoft.XMLDOM")).async="false",l.loadXML(n))}catch(e){l=t}return l&&l.documentElement&&!l.getElementsByTagName("parsererror").length||b.error("Invalid XML: "+n),l},noop:function(){},globalEval:function(t){t&&b.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(U,"ms-").replace(V,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var l=0,f=e.length,p=M(e);if(n){if(p)for(;f>l&&!1!==t.apply(e[l],n);l++);else for(l in e)if(!1===t.apply(e[l],n))break}else if(p)for(;f>l&&!1!==t.call(e[l],l,e[l]);l++);else for(l in e)if(!1===t.call(e[l],l,e[l]))break;return e},trim:S&&!S.call("\ufeff ")?function(e){return null==e?"":S.call(e)}:function(e){return null==e?"":(e+"").replace(D,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?b.merge(n,"string"==typeof e?[e]:e):T.call(n,e)),n},inArray:function(e,t,n){var l;if(t){if(N)return N.call(t,e,n);for(l=t.length,n=n?0>n?Math.max(0,l+n):n:0;l>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var l=n.length,f=e.length,p=0;if("number"==typeof l)for(;l>p;p++)e[f++]=n[p];else for(;n[p]!==t;)e[f++]=n[p++];return e.length=f,e},grep:function(e,t,n){var l=[],f=0,p=e.length;for(n=!!n;p>f;f++)n!==!!t(e[f],f)&&l.push(e[f]);return l},map:function(e,t,n){var l,f=0,p=e.length,d=[];if(M(e))for(;p>f;f++)null!=(l=t(e[f],f,n))&&(d[d.length]=l);else for(f in e)null!=(l=t(e[f],f,n))&&(d[d.length]=l);return x.apply([],d)},guid:1,proxy:function(e,n){var l,f,p;return"string"==typeof n&&(p=e[n],n=e,e=p),b.isFunction(e)?(l=w.call(arguments,2),f=function(){return e.apply(n||this,l.concat(w.call(arguments)))},f.guid=e.guid=e.guid||b.guid++,f):t},access:function(e,n,l,f,p,d,h){var g=0,m=e.length,y=null==l;if("object"===b.type(l))for(g in p=!0,l)b.access(e,n,g,l[g],!0,d,h);else if(f!==t&&(p=!0,b.isFunction(f)||(h=!0),y&&(h?(n.call(e,f),n=null):(y=n,n=function(e,t,n){return y.call(b(e),n)})),n))for(;m>g;g++)n(e[g],l,h?f:f.call(e[g],g,n(e[g],l)));return p?e:y?n.call(e):m?n(e[0],l):d},now:function(){return(new Date).getTime()}}),b.ready.promise=function(t){if(!n)if(n=b.Deferred(),"complete"===p.readyState)setTimeout(b.ready);else if(p.addEventListener)p.addEventListener("DOMContentLoaded",H,!1),e.addEventListener("load",H,!1);else{p.attachEvent("onreadystatechange",H),e.attachEvent("onload",H);var l=!1;try{l=null==e.frameElement&&p.documentElement}catch(e){}l&&l.doScroll&&function a(){if(!b.isReady){try{l.doScroll("left")}catch(e){return setTimeout(a,50)}q(),b.ready()}}()}return n.promise(t)},b.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),(function(e,t){m["[object "+t+"]"]=t.toLowerCase()})),l=b(p);var Y={};b.Callbacks=function(e){e="string"==typeof e?Y[e]||function F(e){var t=Y[e]={};return b.each(e.match(j)||[],(function(e,n){t[n]=!0})),t}(e):b.extend({},e);var n,l,f,p,d,h,g=[],m=!e.once&&[],c=function(t){for(l=e.memory&&t,f=!0,d=h||0,h=0,p=g.length,n=!0;g&&p>d;d++)if(!1===g[d].apply(t[0],t[1])&&e.stopOnFalse){l=!1;break}n=!1,g&&(m?m.length&&c(m.shift()):l?g=[]:y.disable())},y={add:function(){if(g){var t=g.length;(function i(t){b.each(t,(function(t,n){var l=b.type(n);"function"===l?e.unique&&y.has(n)||g.push(n):n&&n.length&&"string"!==l&&i(n)}))})(arguments),n?p=g.length:l&&(h=t,c(l))}return this},remove:function(){return g&&b.each(arguments,(function(e,t){for(var l;(l=b.inArray(t,g,l))>-1;)g.splice(l,1),n&&(p>=l&&p--,d>=l&&d--)})),this},has:function(e){return e?b.inArray(e,g)>-1:!(!g||!g.length)},empty:function(){return g=[],this},disable:function(){return g=m=l=t,this},disabled:function(){return!g},lock:function(){return m=t,l||y.disable(),this},locked:function(){return!m},fireWith:function(e,t){return t=[e,(t=t||[]).slice?t.slice():t],!g||f&&!m||(n?m.push(t):c(t)),this},fire:function(){return y.fireWith(this,arguments),this},fired:function(){return!!f}};return y},b.extend({Deferred:function(e){var t=[["resolve","done",b.Callbacks("once memory"),"resolved"],["reject","fail",b.Callbacks("once memory"),"rejected"],["notify","progress",b.Callbacks("memory")]],n="pending",l={state:function(){return n},always:function(){return f.done(arguments).fail(arguments),this},then:function(){var e=arguments;return b.Deferred((function(n){b.each(t,(function(t,p){var d=p[0],h=b.isFunction(e[t])&&e[t];f[p[1]]((function(){var e=h&&h.apply(this,arguments);e&&b.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[d+"With"](this===l?n.promise():this,h?[e]:arguments)}))})),e=null})).promise()},promise:function(e){return null!=e?b.extend(e,l):l}},f={};return l.pipe=l.then,b.each(t,(function(e,p){var d=p[2],h=p[3];l[p[1]]=d.add,h&&d.add((function(){n=h}),t[1^e][2].disable,t[2][2].lock),f[p[0]]=function(){return f[p[0]+"With"](this===f?l:this,arguments),this},f[p[0]+"With"]=d.fireWith})),l.promise(f),e&&e.call(f,f),f},when:function(e){var t,n,l,f=0,p=w.call(arguments),d=p.length,h=1!==d||e&&b.isFunction(e.promise)?d:0,g=1===h?e:b.Deferred(),a=function(e,n,l){return function(f){n[e]=this,l[e]=arguments.length>1?w.call(arguments):f,l===t?g.notifyWith(n,l):--h||g.resolveWith(n,l)}};if(d>1)for(t=Array(d),n=Array(d),l=Array(d);d>f;f++)p[f]&&b.isFunction(p[f].promise)?p[f].promise().done(a(f,l,p)).fail(g.reject).progress(a(f,n,t)):--h;return h||g.resolveWith(l,p),g.promise()}}),b.support=function(){var t,n,l,d,h,g,m,y,v,x,T=p.createElement("div");if(T.setAttribute("className","t"),T.innerHTML="
a",n=T.getElementsByTagName("*"),l=T.getElementsByTagName("a")[0],!n||!l||!n.length)return{};m=(h=p.createElement("select")).appendChild(p.createElement("option")),d=T.getElementsByTagName("input")[0],l.style.cssText="top:1px;float:left;opacity:.5",t={getSetAttribute:"t"!==T.className,leadingWhitespace:3===T.firstChild.nodeType,tbody:!T.getElementsByTagName("tbody").length,htmlSerialize:!!T.getElementsByTagName("link").length,style:/top/.test(l.getAttribute("style")),hrefNormalized:"/a"===l.getAttribute("href"),opacity:/^0.5/.test(l.style.opacity),cssFloat:!!l.style.cssFloat,checkOn:!!d.value,optSelected:m.selected,enctype:!!p.createElement("form").enctype,html5Clone:"<:nav>"!==p.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===p.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},d.checked=!0,t.noCloneChecked=d.cloneNode(!0).checked,h.disabled=!0,t.optDisabled=!m.disabled;try{delete T.test}catch(e){t.deleteExpando=!1}for(x in(d=p.createElement("input")).setAttribute("value",""),t.input=""===d.getAttribute("value"),d.value="t",d.setAttribute("type","radio"),t.radioValue="t"===d.value,d.setAttribute("checked","t"),d.setAttribute("name","t"),(g=p.createDocumentFragment()).appendChild(d),t.appendChecked=d.checked,t.checkClone=g.cloneNode(!0).cloneNode(!0).lastChild.checked,T.attachEvent&&(T.attachEvent("onclick",(function(){t.noCloneEvent=!1})),T.cloneNode(!0).click()),{submit:!0,change:!0,focusin:!0})T.setAttribute(y="on"+x,"t"),t[x+"Bubbles"]=y in e||!1===T.attributes[y].expando;return T.style.backgroundClip="content-box",T.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===T.style.backgroundClip,b((function(){var n,l,d,h="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",g=p.getElementsByTagName("body")[0];g&&((n=p.createElement("div")).style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",g.appendChild(n).appendChild(T),T.innerHTML="
t
",(d=T.getElementsByTagName("td"))[0].style.cssText="padding:0;margin:0;border:0;display:none",v=0===d[0].offsetHeight,d[0].style.display="",d[1].style.display="none",t.reliableHiddenOffsets=v&&0===d[0].offsetHeight,T.innerHTML="",T.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%;",t.boxSizing=4===T.offsetWidth,t.doesNotIncludeMarginInBodyOffset=1!==g.offsetTop,e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(T,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(T,null)||{width:"4px"}).width,(l=T.appendChild(p.createElement("div"))).style.cssText=T.style.cssText=h,l.style.marginRight=l.style.width="0",T.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(l,null)||{}).marginRight)),typeof T.style.zoom!==f&&(T.innerHTML="",T.style.cssText=h+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===T.offsetWidth,T.style.display="block",T.innerHTML="
",T.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==T.offsetWidth,t.inlineBlockNeedsLayout&&(g.style.zoom=1)),g.removeChild(n),n=T=d=l=null)})),n=h=g=m=l=d=null,t}();var Q=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,J=/([A-Z])/g;function P(e,n,l,f){if(b.acceptData(e)){var p,d,h=b.expando,g="string"==typeof n,m=e.nodeType,v=m?b.cache:e,x=m?e[h]:e[h]&&h;if(x&&v[x]&&(f||v[x].data)||!g||l!==t)return x||(m?e[h]=x=y.pop()||b.guid++:x=h),v[x]||(v[x]={},m||(v[x].toJSON=b.noop)),("object"==typeof n||"function"==typeof n)&&(f?v[x]=b.extend(v[x],n):v[x].data=b.extend(v[x].data,n)),p=v[x],f||(p.data||(p.data={}),p=p.data),l!==t&&(p[b.camelCase(n)]=l),g?null==(d=p[n])&&(d=p[b.camelCase(n)]):d=p,d}}function R(e,t,n){if(b.acceptData(e)){var l,f,p,d=e.nodeType,h=d?b.cache:e,g=d?e[b.expando]:b.expando;if(h[g]){if(t&&(p=n?h[g]:h[g].data)){b.isArray(t)?t=t.concat(b.map(t,b.camelCase)):t in p?t=[t]:t=(t=b.camelCase(t))in p?[t]:t.split(" ");for(l=0,f=t.length;f>l;l++)delete p[t[l]];if(!(n?$:b.isEmptyObject)(p))return}(n||(delete h[g].data,$(h[g])))&&(d?b.cleanData([e],!0):b.support.deleteExpando||h!=h.window?delete h[g]:h[g]=null)}}}function W(e,n,l){if(l===t&&1===e.nodeType){var f="data-"+n.replace(J,"-$1").toLowerCase();if("string"==typeof(l=e.getAttribute(f))){try{l="true"===l||"false"!==l&&("null"===l?null:+l+""===l?+l:Q.test(l)?b.parseJSON(l):l)}catch(e){}b.data(e,n,l)}else l=t}return l}function $(e){var t;for(t in e)if(("data"!==t||!b.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}b.extend({cache:{},expando:"jQuery"+(v+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return!!(e=e.nodeType?b.cache[e[b.expando]]:e[b.expando])&&!$(e)},data:function(e,t,n){return P(e,t,n)},removeData:function(e,t){return R(e,t)},_data:function(e,t,n){return P(e,t,n,!0)},_removeData:function(e,t){return R(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&b.noData[e.nodeName.toLowerCase()];return!t||!0!==t&&e.getAttribute("classid")===t}}),b.fn.extend({data:function(e,n){var l,f,p=this[0],d=0,h=null;if(e===t){if(this.length&&(h=b.data(p),1===p.nodeType&&!b._data(p,"parsedAttrs"))){for(l=p.attributes;l.length>d;d++)(f=l[d].name).indexOf("data-")||(f=b.camelCase(f.slice(5)),W(p,f,h[f]));b._data(p,"parsedAttrs",!0)}return h}return"object"==typeof e?this.each((function(){b.data(this,e)})):b.access(this,(function(n){return n===t?p?W(p,e,b.data(p,e)):null:(this.each((function(){b.data(this,e,n)})),t)}),null,n,arguments.length>1,null,!0)},removeData:function(e){return this.each((function(){b.removeData(this,e)}))}}),b.extend({queue:function(e,n,l){var f;return e?(n=(n||"fx")+"queue",f=b._data(e,n),l&&(!f||b.isArray(l)?f=b._data(e,n,b.makeArray(l)):f.push(l)),f||[]):t},dequeue:function(e,t){t=t||"fx";var n=b.queue(e,t),l=n.length,f=n.shift(),p=b._queueHooks(e,t);"inprogress"===f&&(f=n.shift(),l--),p.cur=f,f&&("fx"===t&&n.unshift("inprogress"),delete p.stop,f.call(e,(function(){b.dequeue(e,t)}),p)),!l&&p&&p.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return b._data(e,n)||b._data(e,n,{empty:b.Callbacks("once memory").add((function(){b._removeData(e,t+"queue"),b._removeData(e,n)}))})}}),b.fn.extend({queue:function(e,n){var l=2;return"string"!=typeof e&&(n=e,e="fx",l--),l>arguments.length?b.queue(this[0],e):n===t?this:this.each((function(){var t=b.queue(this,e,n);b._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&b.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){b.dequeue(this,e)}))},delay:function(e,t){return e=b.fx&&b.fx.speeds[e]||e,t=t||"fx",this.queue(t,(function(t,n){var l=setTimeout(t,e);n.stop=function(){clearTimeout(l)}}))},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var l,f=1,p=b.Deferred(),d=this,h=this.length,u=function(){--f||p.resolveWith(d,[d])};for("string"!=typeof e&&(n=e,e=t),e=e||"fx";h--;)(l=b._data(d[h],e+"queueHooks"))&&l.empty&&(f++,l.empty.add(u));return u(),p.promise(n)}});var K,G,Z=/[\t\r\n]/g,ee=/\r/g,te=/^(?:input|select|textarea|button|object)$/i,ne=/^(?:a|area)$/i,re=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,ie=/^(?:checked|selected)$/i,oe=b.support.getSetAttribute,ae=b.support.input;b.fn.extend({attr:function(e,t){return b.access(this,b.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each((function(){b.removeAttr(this,e)}))},prop:function(e,t){return b.access(this,b.prop,e,t,arguments.length>1)},removeProp:function(e){return e=b.propFix[e]||e,this.each((function(){try{this[e]=t,delete this[e]}catch(e){}}))},addClass:function(e){var t,n,l,f,p,d=0,h=this.length,g="string"==typeof e&&e;if(b.isFunction(e))return this.each((function(t){b(this).addClass(e.call(this,t,this.className))}));if(g)for(t=(e||"").match(j)||[];h>d;d++)if(l=1===(n=this[d]).nodeType&&(n.className?(" "+n.className+" ").replace(Z," "):" ")){for(p=0;f=t[p++];)0>l.indexOf(" "+f+" ")&&(l+=f+" ");n.className=b.trim(l)}return this},removeClass:function(e){var t,n,l,f,p,d=0,h=this.length,g=0===arguments.length||"string"==typeof e&&e;if(b.isFunction(e))return this.each((function(t){b(this).removeClass(e.call(this,t,this.className))}));if(g)for(t=(e||"").match(j)||[];h>d;d++)if(l=1===(n=this[d]).nodeType&&(n.className?(" "+n.className+" ").replace(Z," "):"")){for(p=0;f=t[p++];)for(;l.indexOf(" "+f+" ")>=0;)l=l.replace(" "+f+" "," ");n.className=e?b.trim(l):""}return this},toggleClass:function(e,t){var n=typeof e,l="boolean"==typeof t;return b.isFunction(e)?this.each((function(n){b(this).toggleClass(e.call(this,n,this.className,t),t)})):this.each((function(){if("string"===n)for(var p,d=0,h=b(this),g=t,m=e.match(j)||[];p=m[d++];)g=l?g:!h.hasClass(p),h[g?"addClass":"removeClass"](p);else(n===f||"boolean"===n)&&(this.className&&b._data(this,"__className__",this.className),this.className=this.className||!1===e?"":b._data(this,"__className__")||"")}))},hasClass:function(e){for(var t=" "+e+" ",n=0,l=this.length;l>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(Z," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,l,f,p=this[0];return arguments.length?(f=b.isFunction(e),this.each((function(n){var p,d=b(this);1===this.nodeType&&(null==(p=f?e.call(this,n,d.val()):e)?p="":"number"==typeof p?p+="":b.isArray(p)&&(p=b.map(p,(function(e){return null==e?"":e+""}))),(l=b.valHooks[this.type]||b.valHooks[this.nodeName.toLowerCase()])&&"set"in l&&l.set(this,p,"value")!==t||(this.value=p))}))):p?(l=b.valHooks[p.type]||b.valHooks[p.nodeName.toLowerCase()])&&"get"in l&&(n=l.get(p,"value"))!==t?n:"string"==typeof(n=p.value)?n.replace(ee,""):null==n?"":n:void 0}}),b.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){for(var t,n,l=e.options,f=e.selectedIndex,p="select-one"===e.type||0>f,d=p?null:[],h=p?f+1:l.length,g=0>f?h:p?f:0;h>g;g++)if(!(!(n=l[g]).selected&&g!==f||(b.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&b.nodeName(n.parentNode,"optgroup"))){if(t=b(n).val(),p)return t;d.push(t)}return d},set:function(e,t){var n=b.makeArray(t);return b(e).find("option").each((function(){this.selected=b.inArray(b(this).val(),n)>=0})),n.length||(e.selectedIndex=-1),n}}},attr:function(e,n,l){var p,d,h,g=e.nodeType;if(e&&3!==g&&8!==g&&2!==g)return typeof e.getAttribute===f?b.prop(e,n,l):((d=1!==g||!b.isXMLDoc(e))&&(n=n.toLowerCase(),p=b.attrHooks[n]||(re.test(n)?G:K)),l===t?p&&d&&"get"in p&&null!==(h=p.get(e,n))?h:(typeof e.getAttribute!==f&&(h=e.getAttribute(n)),null==h?t:h):null!==l?p&&d&&"set"in p&&(h=p.set(e,l,n))!==t?h:(e.setAttribute(n,l+""),l):(b.removeAttr(e,n),t))},removeAttr:function(e,t){var n,l,f=0,p=t&&t.match(j);if(p&&1===e.nodeType)for(;n=p[f++];)l=b.propFix[n]||n,re.test(n)?!oe&&ie.test(n)?e[b.camelCase("default-"+n)]=e[l]=!1:e[l]=!1:b.attr(e,n,""),e.removeAttribute(oe?n:l)},attrHooks:{type:{set:function(e,t){if(!b.support.radioValue&&"radio"===t&&b.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly",for:"htmlFor",class:"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,l){var f,p,d=e.nodeType;if(e&&3!==d&&8!==d&&2!==d)return(1!==d||!b.isXMLDoc(e))&&(n=b.propFix[n]||n,p=b.propHooks[n]),l!==t?p&&"set"in p&&(f=p.set(e,l,n))!==t?f:e[n]=l:p&&"get"in p&&null!==(f=p.get(e,n))?f:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):te.test(e.nodeName)||ne.test(e.nodeName)&&e.href?0:t}}}}),G={get:function(e,n){var l=b.prop(e,n),f="boolean"==typeof l&&e.getAttribute(n),p="boolean"==typeof l?ae&&oe?null!=f:ie.test(n)?e[b.camelCase("default-"+n)]:!!f:e.getAttributeNode(n);return p&&!1!==p.value?n.toLowerCase():t},set:function(e,t,n){return!1===t?b.removeAttr(e,n):ae&&oe||!ie.test(n)?e.setAttribute(!oe&&b.propFix[n]||n,n):e[b.camelCase("default-"+n)]=e[n]=!0,n}},ae&&oe||(b.attrHooks.value={get:function(e,n){var l=e.getAttributeNode(n);return b.nodeName(e,"input")?e.defaultValue:l&&l.specified?l.value:t},set:function(e,n,l){return b.nodeName(e,"input")?(e.defaultValue=n,t):K&&K.set(e,n,l)}}),oe||(K=b.valHooks.button={get:function(e,n){var l=e.getAttributeNode(n);return l&&("id"===n||"name"===n||"coords"===n?""!==l.value:l.specified)?l.value:t},set:function(e,n,l){var f=e.getAttributeNode(l);return f||e.setAttributeNode(f=e.ownerDocument.createAttribute(l)),f.value=n+="","value"===l||n===e.getAttribute(l)?n:t}},b.attrHooks.contenteditable={get:K.get,set:function(e,t,n){K.set(e,""!==t&&t,n)}},b.each(["width","height"],(function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{set:function(e,l){return""===l?(e.setAttribute(n,"auto"),l):t}})}))),b.support.hrefNormalized||(b.each(["href","src","width","height"],(function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{get:function(e){var l=e.getAttribute(n,2);return null==l?t:l}})})),b.each(["href","src"],(function(e,t){b.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}))),b.support.style||(b.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),b.support.optSelected||(b.propHooks.selected=b.extend(b.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),b.support.enctype||(b.propFix.enctype="encoding"),b.support.checkOn||b.each(["radio","checkbox"],(function(){b.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}})),b.each(["radio","checkbox"],(function(){b.valHooks[this]=b.extend(b.valHooks[this],{set:function(e,n){return b.isArray(n)?e.checked=b.inArray(b(e).val(),n)>=0:t}})}));var se=/^(?:input|select|textarea)$/i,ue=/^key/,le=/^(?:mouse|contextmenu)|click/,ce=/^(?:focusinfocus|focusoutblur)$/,fe=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}b.event={global:{},add:function(e,n,l,p,d){var h,g,m,y,v,x,T,w,N,C,E,S=b._data(e);if(S){for(l.handler&&(l=(y=l).handler,d=y.selector),l.guid||(l.guid=b.guid++),(g=S.events)||(g=S.events={}),(x=S.handle)||(x=S.handle=function(e){return typeof b===f||e&&b.event.triggered===e.type?t:b.event.dispatch.apply(x.elem,arguments)},x.elem=e),m=(n=(n||"").match(j)||[""]).length;m--;)N=E=(h=fe.exec(n[m])||[])[1],C=(h[2]||"").split(".").sort(),v=b.event.special[N]||{},N=(d?v.delegateType:v.bindType)||N,v=b.event.special[N]||{},T=b.extend({type:N,origType:E,data:p,handler:l,guid:l.guid,selector:d,needsContext:d&&b.expr.match.needsContext.test(d),namespace:C.join(".")},y),(w=g[N])||((w=g[N]=[]).delegateCount=0,v.setup&&!1!==v.setup.call(e,p,C,x)||(e.addEventListener?e.addEventListener(N,x,!1):e.attachEvent&&e.attachEvent("on"+N,x))),v.add&&(v.add.call(e,T),T.handler.guid||(T.handler.guid=l.guid)),d?w.splice(w.delegateCount++,0,T):w.push(T),b.event.global[N]=!0;e=null}},remove:function(e,t,n,l,f){var p,d,h,g,m,y,v,x,T,w,N,C=b.hasData(e)&&b._data(e);if(C&&(y=C.events)){for(m=(t=(t||"").match(j)||[""]).length;m--;)if(T=N=(h=fe.exec(t[m])||[])[1],w=(h[2]||"").split(".").sort(),T){for(v=b.event.special[T]||{},x=y[T=(l?v.delegateType:v.bindType)||T]||[],h=h[2]&&RegExp("(^|\\.)"+w.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=p=x.length;p--;)d=x[p],!f&&N!==d.origType||n&&n.guid!==d.guid||h&&!h.test(d.namespace)||l&&l!==d.selector&&("**"!==l||!d.selector)||(x.splice(p,1),d.selector&&x.delegateCount--,v.remove&&v.remove.call(e,d));g&&!x.length&&(v.teardown&&!1!==v.teardown.call(e,w,C.handle)||b.removeEvent(e,T,C.handle),delete y[T])}else for(T in y)b.event.remove(e,T+t[m],n,l,!0);b.isEmptyObject(y)&&(delete C.handle,b._removeData(e,"events"))}},trigger:function(n,l,f,d){var h,g,m,y,v,x,T,w=[f||p],N=E.call(n,"type")?n.type:n,C=E.call(n,"namespace")?n.namespace.split("."):[];if(m=x=f=f||p,3!==f.nodeType&&8!==f.nodeType&&!ce.test(N+b.event.triggered)&&(N.indexOf(".")>=0&&(C=N.split("."),N=C.shift(),C.sort()),g=0>N.indexOf(":")&&"on"+N,(n=n[b.expando]?n:new b.Event(N,"object"==typeof n&&n)).isTrigger=!0,n.namespace=C.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+C.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=f),l=null==l?[n]:b.makeArray(l,[n]),v=b.event.special[N]||{},d||!v.trigger||!1!==v.trigger.apply(f,l))){if(!d&&!v.noBubble&&!b.isWindow(f)){for(y=v.delegateType||N,ce.test(y+N)||(m=m.parentNode);m;m=m.parentNode)w.push(m),x=m;x===(f.ownerDocument||p)&&w.push(x.defaultView||x.parentWindow||e)}for(T=0;(m=w[T++])&&!n.isPropagationStopped();)n.type=T>1?y:v.bindType||N,(h=(b._data(m,"events")||{})[n.type]&&b._data(m,"handle"))&&h.apply(m,l),(h=g&&m[g])&&b.acceptData(m)&&h.apply&&!1===h.apply(m,l)&&n.preventDefault();if(n.type=N,!(d||n.isDefaultPrevented()||v._default&&!1!==v._default.apply(f.ownerDocument,l)||"click"===N&&b.nodeName(f,"a"))&&b.acceptData(f)&&g&&f[N]&&!b.isWindow(f)){(x=f[g])&&(f[g]=null),b.event.triggered=N;try{f[N]()}catch(e){}b.event.triggered=t,x&&(f[g]=x)}return n.result}},dispatch:function(e){e=b.event.fix(e);var n,l,f,p,d,h=[],g=w.call(arguments),m=(b._data(this,"events")||{})[e.type]||[],y=b.event.special[e.type]||{};if(g[0]=e,e.delegateTarget=this,!y.preDispatch||!1!==y.preDispatch.call(this,e)){for(h=b.event.handlers.call(this,e,m),n=0;(p=h[n++])&&!e.isPropagationStopped();)for(e.currentTarget=p.elem,d=0;(f=p.handlers[d++])&&!e.isImmediatePropagationStopped();)(!e.namespace_re||e.namespace_re.test(f.namespace))&&(e.handleObj=f,e.data=f.data,(l=((b.event.special[f.origType]||{}).handle||f.handler).apply(p.elem,g))!==t&&!1===(e.result=l)&&(e.preventDefault(),e.stopPropagation()));return y.postDispatch&&y.postDispatch.call(this,e),e.result}},handlers:function(e,n){var l,f,p,d,h=[],g=n.delegateCount,m=e.target;if(g&&m.nodeType&&(!e.button||"click"!==e.type))for(;m!=this;m=m.parentNode||this)if(1===m.nodeType&&(!0!==m.disabled||"click"!==e.type)){for(p=[],d=0;g>d;d++)p[l=(f=n[d]).selector+" "]===t&&(p[l]=f.needsContext?b(l,this).index(m)>=0:b.find(l,this,null,[m]).length),p[l]&&p.push(f);p.length&&h.push({elem:m,handlers:p})}return n.length>g&&h.push({elem:this,handlers:n.slice(g)}),h},fix:function(e){if(e[b.expando])return e;var t,n,l,f=e.type,d=e,h=this.fixHooks[f];for(h||(this.fixHooks[f]=h=le.test(f)?this.mouseHooks:ue.test(f)?this.keyHooks:{}),l=h.props?this.props.concat(h.props):this.props,e=new b.Event(d),t=l.length;t--;)e[n=l[t]]=d[n];return e.target||(e.target=d.srcElement||p),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,h.filter?h.filter(e,d):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var l,f,d,h=n.button,g=n.fromElement;return null==e.pageX&&null!=n.clientX&&(d=(f=e.target.ownerDocument||p).documentElement,l=f.body,e.pageX=n.clientX+(d&&d.scrollLeft||l&&l.scrollLeft||0)-(d&&d.clientLeft||l&&l.clientLeft||0),e.pageY=n.clientY+(d&&d.scrollTop||l&&l.scrollTop||0)-(d&&d.clientTop||l&&l.clientTop||0)),!e.relatedTarget&&g&&(e.relatedTarget=g===e.target?n.toElement:g),e.which||h===t||(e.which=1&h?1:2&h?3:4&h?2:0),e}},special:{load:{noBubble:!0},click:{trigger:function(){return b.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t}},focus:{trigger:function(){if(this!==p.activeElement&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===p.activeElement&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,l){var f=b.extend(new b.Event,n,{type:e,isSimulated:!0,originalEvent:{}});l?b.event.trigger(f,null,t):b.event.dispatch.call(t,f),f.isDefaultPrevented()&&n.preventDefault()}},b.removeEvent=p.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var l="on"+t;e.detachEvent&&(typeof e[l]===f&&(e[l]=null),e.detachEvent(l,n))},b.Event=function(e,n){return this instanceof b.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||!1===e.returnValue||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&b.extend(this,n),this.timeStamp=e&&e.timeStamp||b.now(),this[b.expando]=!0,t):new b.Event(e,n)},b.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},b.each({mouseenter:"mouseover",mouseleave:"mouseout"},(function(e,t){b.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,l=e.relatedTarget,f=e.handleObj;return(!l||l!==this&&!b.contains(this,l))&&(e.type=f.origType,n=f.handler.apply(this,arguments),e.type=t),n}}})),b.support.submitBubbles||(b.event.special.submit={setup:function(){return!b.nodeName(this,"form")&&(b.event.add(this,"click._submit keypress._submit",(function(e){var n=e.target,l=b.nodeName(n,"input")||b.nodeName(n,"button")?n.form:t;l&&!b._data(l,"submitBubbles")&&(b.event.add(l,"submit._submit",(function(e){e._submit_bubble=!0})),b._data(l,"submitBubbles",!0))})),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&b.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return!b.nodeName(this,"form")&&(b.event.remove(this,"._submit"),t)}}),b.support.changeBubbles||(b.event.special.change={setup:function(){return se.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(b.event.add(this,"propertychange._change",(function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)})),b.event.add(this,"click._change",(function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),b.event.simulate("change",this,e,!0)}))),!1):(b.event.add(this,"beforeactivate._change",(function(e){var t=e.target;se.test(t.nodeName)&&!b._data(t,"changeBubbles")&&(b.event.add(t,"change._change",(function(e){!this.parentNode||e.isSimulated||e.isTrigger||b.event.simulate("change",this.parentNode,e,!0)})),b._data(t,"changeBubbles",!0))})),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return b.event.remove(this,"._change"),!se.test(this.nodeName)}}),b.support.focusinBubbles||b.each({focus:"focusin",blur:"focusout"},(function(e,t){var n=0,r=function(e){b.event.simulate(t,e.target,b.event.fix(e),!0)};b.event.special[t]={setup:function(){0==n++&&p.addEventListener(e,r,!0)},teardown:function(){0==--n&&p.removeEventListener(e,r,!0)}}})),b.fn.extend({on:function(e,n,l,f,p){var d,h;if("object"==typeof e){for(d in"string"!=typeof n&&(l=l||n,n=t),e)this.on(d,n,l,e[d],p);return this}if(null==l&&null==f?(f=n,l=n=t):null==f&&("string"==typeof n?(f=l,l=t):(f=l,l=n,n=t)),!1===f)f=ot;else if(!f)return this;return 1===p&&(h=f,f=function(e){return b().off(e),h.apply(this,arguments)},f.guid=h.guid||(h.guid=b.guid++)),this.each((function(){b.event.add(this,e,f,l,n)}))},one:function(e,t,n,l){return this.on(e,t,n,l,1)},off:function(e,n,l){var f,p;if(e&&e.preventDefault&&e.handleObj)return f=e.handleObj,b(e.delegateTarget).off(f.namespace?f.origType+"."+f.namespace:f.origType,f.selector,f.handler),this;if("object"==typeof e){for(p in e)this.off(p,n,e[p]);return this}return(!1===n||"function"==typeof n)&&(l=n,n=t),!1===l&&(l=ot),this.each((function(){b.event.remove(this,e,l,n)}))},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,l){return this.on(t,e,n,l)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each((function(){b.event.trigger(e,t,this)}))},triggerHandler:function(e,n){var l=this[0];return l?b.event.trigger(e,n,l,!0):t}}),function(e,t){var n,l,f,p,d,h,g,m,y,v,x,T,w,N,C,E,S,A="sizzle"+-new Date,j=e.document,D={},O=0,_=0,B=it(),I=it(),z=it(),X=typeof t,U=1<<31,V=[],Y=V.pop,Q=V.push,J=V.slice,K=V.indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(this[t]===e)return t;return-1},G="[\\x20\\t\\r\\n\\f]",Z="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ee=Z.replace("w","w#"),te="\\["+G+"*("+Z+")"+G+"*(?:([*^$|!~]?=)"+G+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+ee+")|)|)"+G+"*\\]",ne=":("+Z+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+te.replace(3,8)+")*)|.*)\\)|)",re=RegExp("^"+G+"+|((?:^|[^\\\\])(?:\\\\.)*)"+G+"+$","g"),ie=RegExp("^"+G+"*,"+G+"*"),oe=RegExp("^"+G+"*([\\x20\\t\\r\\n\\f>+~])"+G+"*"),ae=RegExp(ne),se=RegExp("^"+ee+"$"),ue={ID:RegExp("^#("+Z+")"),CLASS:RegExp("^\\.("+Z+")"),NAME:RegExp("^\\[name=['\"]?("+Z+")['\"]?\\]"),TAG:RegExp("^("+Z.replace("w","w*")+")"),ATTR:RegExp("^"+te),PSEUDO:RegExp("^"+ne),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+G+"*(even|odd|(([+-]|)(\\d*)n|)"+G+"*(?:([+-]|)"+G+"*(\\d+)|))"+G+"*\\)|)","i"),needsContext:RegExp("^"+G+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+G+"*((?:-\\d)?\\d*)"+G+"*\\)|)(?=[^-]|$)","i")},le=/[\x20\t\r\n\f]*[+~]/,ce=/^[^{]+\{\s*\[native code/,fe=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,pe=/^(?:input|select|textarea|button)$/i,de=/^h\d$/i,he=/'|\\/g,ge=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,me=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,tt=function(e,t){var n="0x"+t-65536;return n!=n?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(55296|n>>10,56320|1023&n)};try{J.call(j.documentElement.childNodes,0)[0].nodeType}catch(e){J=function(e){for(var t,n=[];t=this[e++];)n.push(t);return n}}function rt(e){return ce.test(e+"")}function it(){var e,t=[];return e=function(n,l){return t.push(n+=" ")>f.cacheLength&&delete e[t.shift()],e[n]=l}}function ot(e){return e[A]=!0,e}function at(e){var t=v.createElement("div");try{return e(t)}catch(e){return!1}finally{t=null}}function st(e,t,n,l){var f,p,d,h,g,m,x,N,C,S;if((t?t.ownerDocument||t:j)!==v&&y(t),n=n||[],!e||"string"!=typeof e)return n;if(1!==(h=(t=t||v).nodeType)&&9!==h)return[];if(!T&&!l){if(f=fe.exec(e))if(d=f[1]){if(9===h){if(!(p=t.getElementById(d))||!p.parentNode)return n;if(p.id===d)return n.push(p),n}else if(t.ownerDocument&&(p=t.ownerDocument.getElementById(d))&&E(t,p)&&p.id===d)return n.push(p),n}else{if(f[2])return Q.apply(n,J.call(t.getElementsByTagName(e),0)),n;if((d=f[3])&&D.getByClassName&&t.getElementsByClassName)return Q.apply(n,J.call(t.getElementsByClassName(d),0)),n}if(D.qsa&&!w.test(e)){if(x=!0,N=A,C=t,S=9===h&&e,1===h&&"object"!==t.nodeName.toLowerCase()){for(m=ft(e),(x=t.getAttribute("id"))?N=x.replace(he,"\\$&"):t.setAttribute("id",N),N="[id='"+N+"'] ",g=m.length;g--;)m[g]=N+dt(m[g]);C=le.test(e)&&t.parentNode||t,S=m.join(",")}if(S)try{return Q.apply(n,J.call(C.querySelectorAll(S),0)),n}catch(e){}finally{x||t.removeAttribute("id")}}}return wt(e.replace(re,"$1"),t,n,l)}function ut(e,t){var n=t&&e,l=n&&(~t.sourceIndex||U)-(~e.sourceIndex||U);if(l)return l;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function lt(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function ct(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function pt(e){return ot((function(t){return t=+t,ot((function(n,l){for(var f,p=e([],n.length,t),d=p.length;d--;)n[f=p[d]]&&(n[f]=!(l[f]=n[f]))}))}))}for(n in d=st.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},y=st.setDocument=function(e){var n=e?e.ownerDocument||e:j;return n!==v&&9===n.nodeType&&n.documentElement?(v=n,x=n.documentElement,T=d(n),D.tagNameNoComments=at((function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length})),D.attributes=at((function(e){e.innerHTML="";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t})),D.getByClassName=at((function(e){return e.innerHTML="",!(!e.getElementsByClassName||!e.getElementsByClassName("e").length)&&(e.lastChild.className="e",2===e.getElementsByClassName("e").length)})),D.getByName=at((function(e){e.id=A+0,e.innerHTML="
",x.insertBefore(e,x.firstChild);var t=n.getElementsByName&&n.getElementsByName(A).length===2+n.getElementsByName(A+0).length;return D.getIdNotName=!n.getElementById(A),x.removeChild(e),t})),f.attrHandle=at((function(e){return e.innerHTML="",e.firstChild&&typeof e.firstChild.getAttribute!==X&&"#"===e.firstChild.getAttribute("href")}))?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},D.getIdNotName?(f.find.ID=function(e,t){if(typeof t.getElementById!==X&&!T){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},f.filter.ID=function(e){var t=e.replace(me,tt);return function(e){return e.getAttribute("id")===t}}):(f.find.ID=function(e,n){if(typeof n.getElementById!==X&&!T){var l=n.getElementById(e);return l?l.id===e||typeof l.getAttributeNode!==X&&l.getAttributeNode("id").value===e?[l]:t:[]}},f.filter.ID=function(e){var t=e.replace(me,tt);return function(e){var n=typeof e.getAttributeNode!==X&&e.getAttributeNode("id");return n&&n.value===t}}),f.find.TAG=D.tagNameNoComments?function(e,n){return typeof n.getElementsByTagName!==X?n.getElementsByTagName(e):t}:function(e,t){var n,l=[],f=0,p=t.getElementsByTagName(e);if("*"===e){for(;n=p[f++];)1===n.nodeType&&l.push(n);return l}return p},f.find.NAME=D.getByName&&function(e,n){return typeof n.getElementsByName!==X?n.getElementsByName(name):t},f.find.CLASS=D.getByClassName&&function(e,n){return typeof n.getElementsByClassName===X||T?t:n.getElementsByClassName(e)},N=[],w=[":focus"],(D.qsa=rt(n.querySelectorAll))&&(at((function(e){e.innerHTML="",e.querySelectorAll("[selected]").length||w.push("\\["+G+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||w.push(":checked")})),at((function(e){e.innerHTML="",e.querySelectorAll("[i^='']").length&&w.push("[*^$]="+G+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").length||w.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),w.push(",.*:")}))),(D.matchesSelector=rt(C=x.matchesSelector||x.mozMatchesSelector||x.webkitMatchesSelector||x.oMatchesSelector||x.msMatchesSelector))&&at((function(e){D.disconnectedMatch=C.call(e,"div"),C.call(e,"[s!='']:x"),N.push("!=",ne)})),w=RegExp(w.join("|")),N=RegExp(N.join("|")),E=rt(x.contains)||x.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,l=t&&t.parentNode;return e===l||!(!l||1!==l.nodeType||!(n.contains?n.contains(l):e.compareDocumentPosition&&16&e.compareDocumentPosition(l)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},S=x.compareDocumentPosition?function(e,t){var l;return e===t?(g=!0,0):(l=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t))?1&l||e.parentNode&&11===e.parentNode.nodeType?e===n||E(j,e)?-1:t===n||E(j,t)?1:0:4&l?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var l,f=0,p=e.parentNode,d=t.parentNode,h=[e],m=[t];if(e===t)return g=!0,0;if(!p||!d)return e===n?-1:t===n?1:p?-1:d?1:0;if(p===d)return ut(e,t);for(l=e;l=l.parentNode;)h.unshift(l);for(l=t;l=l.parentNode;)m.unshift(l);for(;h[f]===m[f];)f++;return f?ut(h[f],m[f]):h[f]===j?-1:m[f]===j?1:0},g=!1,[0,0].sort(S),D.detectDuplicates=g,v):v},st.matches=function(e,t){return st(e,null,null,t)},st.matchesSelector=function(e,t){if((e.ownerDocument||e)!==v&&y(e),t=t.replace(ge,"='$1']"),!(!D.matchesSelector||T||N&&N.test(t)||w.test(t)))try{var n=C.call(e,t);if(n||D.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){}return st(t,v,null,[e]).length>0},st.contains=function(e,t){return(e.ownerDocument||e)!==v&&y(e),E(e,t)},st.attr=function(e,t){var n;return(e.ownerDocument||e)!==v&&y(e),T||(t=t.toLowerCase()),(n=f.attrHandle[t])?n(e):T||D.attributes?e.getAttribute(t):((n=e.getAttributeNode(t))||e.getAttribute(t))&&!0===e[t]?t:n&&n.specified?n.value:null},st.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},st.uniqueSort=function(e){var t,n=[],l=1,f=0;if(g=!D.detectDuplicates,e.sort(S),g){for(;t=e[l];l++)t===e[l-1]&&(f=n.push(l));for(;f--;)e.splice(n[f],1)}return e},p=st.getText=function(e){var t,n="",l=0,f=e.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=p(e)}else if(3===f||4===f)return e.nodeValue}else for(;t=e[l];l++)n+=p(t);return n},f=st.selectors={cacheLength:50,createPseudo:ot,match:ue,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(me,tt),e[3]=(e[4]||e[5]||"").replace(me,tt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||st.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&st.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return ue.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&ae.test(n)&&(t=ft(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){return"*"===e?function(){return!0}:(e=e.replace(me,tt).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=B[e+" "];return t||(t=RegExp("(^|"+G+")"+e+"("+G+"|$)"))&&B(e,(function(e){return t.test(e.className||typeof e.getAttribute!==X&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(l){var f=st.attr(l,e);return null==f?"!="===t:!t||(f+="","="===t?f===n:"!="===t?f!==n:"^="===t?n&&0===f.indexOf(n):"*="===t?n&&f.indexOf(n)>-1:"$="===t?n&&f.slice(-n.length)===n:"~="===t?(" "+f+" ").indexOf(n)>-1:"|="===t&&(f===n||f.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,l,f){var p="nth"!==e.slice(0,3),d="last"!==e.slice(-4),h="of-type"===t;return 1===l&&0===f?function(e){return!!e.parentNode}:function(t,n,g){var m,y,v,x,T,w,N=p!==d?"nextSibling":"previousSibling",C=t.parentNode,E=h&&t.nodeName.toLowerCase(),S=!g&&!h;if(C){if(p){for(;N;){for(v=t;v=v[N];)if(h?v.nodeName.toLowerCase()===E:1===v.nodeType)return!1;w=N="only"===e&&!w&&"nextSibling"}return!0}if(w=[d?C.firstChild:C.lastChild],d&&S){for(T=(m=(y=C[A]||(C[A]={}))[e]||[])[0]===O&&m[1],x=m[0]===O&&m[2],v=T&&C.childNodes[T];v=++T&&v&&v[N]||(x=T=0)||w.pop();)if(1===v.nodeType&&++x&&v===t){y[e]=[O,T,x];break}}else if(S&&(m=(t[A]||(t[A]={}))[e])&&m[0]===O)x=m[1];else for(;(v=++T&&v&&v[N]||(x=T=0)||w.pop())&&((h?v.nodeName.toLowerCase()!==E:1!==v.nodeType)||!++x||(S&&((v[A]||(v[A]={}))[e]=[O,x]),v!==t)););return(x-=f)===l||0==x%l&&x/l>=0}}},PSEUDO:function(e,t){var n,l=f.pseudos[e]||f.setFilters[e.toLowerCase()]||st.error("unsupported pseudo: "+e);return l[A]?l(t):l.length>1?(n=[e,e,"",t],f.setFilters.hasOwnProperty(e.toLowerCase())?ot((function(e,n){for(var f,p=l(e,t),d=p.length;d--;)e[f=K.call(e,p[d])]=!(n[f]=p[d])})):function(e){return l(e,0,n)}):l}},pseudos:{not:ot((function(e){var t=[],n=[],l=h(e.replace(re,"$1"));return l[A]?ot((function(e,t,n,f){for(var p,d=l(e,null,f,[]),h=e.length;h--;)(p=d[h])&&(e[h]=!(t[h]=p))})):function(e,f,p){return t[0]=e,l(t,null,p,n),!n.pop()}})),has:ot((function(e){return function(t){return st(e,t).length>0}})),contains:ot((function(e){return function(t){return(t.textContent||t.innerText||p(t)).indexOf(e)>-1}})),lang:ot((function(e){return se.test(e||"")||st.error("unsupported lang: "+e),e=e.replace(me,tt).toLowerCase(),function(t){var n;do{if(n=T?t.getAttribute("xml:lang")||t.getAttribute("lang"):t.lang)return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===x},focus:function(e){return e===v.activeElement&&(!v.hasFocus||v.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!f.pseudos.empty(e)},header:function(e){return de.test(e.nodeName)},input:function(e){return pe.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:pt((function(){return[0]})),last:pt((function(e,t){return[t-1]})),eq:pt((function(e,t,n){return[0>n?n+t:n]})),even:pt((function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e})),odd:pt((function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e})),lt:pt((function(e,t,n){for(var l=0>n?n+t:n;--l>=0;)e.push(l);return e})),gt:pt((function(e,t,n){for(var l=0>n?n+t:n;t>++l;)e.push(l);return e}))}},{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})f.pseudos[n]=lt(n);for(n in{submit:!0,reset:!0})f.pseudos[n]=ct(n);function ft(e,t){var n,l,p,d,h,g,m,y=I[e+" "];if(y)return t?0:y.slice(0);for(h=e,g=[],m=f.preFilter;h;){for(d in(!n||(l=ie.exec(h)))&&(l&&(h=h.slice(l[0].length)||h),g.push(p=[])),n=!1,(l=oe.exec(h))&&(n=l.shift(),p.push({value:n,type:l[0].replace(re," ")}),h=h.slice(n.length)),f.filter)!(l=ue[d].exec(h))||m[d]&&!(l=m[d](l))||(n=l.shift(),p.push({value:n,type:d,matches:l}),h=h.slice(n.length));if(!n)break}return t?h.length:h?st.error(e):I(e,g).slice(0)}function dt(e){for(var t=0,n=e.length,l="";n>t;t++)l+=e[t].value;return l}function ht(e,t,n){var f=t.dir,p=n&&"parentNode"===f,d=_++;return t.first?function(t,n,l){for(;t=t[f];)if(1===t.nodeType||p)return e(t,n,l)}:function(t,n,h){var g,m,y,v=O+" "+d;if(h){for(;t=t[f];)if((1===t.nodeType||p)&&e(t,n,h))return!0}else for(;t=t[f];)if(1===t.nodeType||p)if((m=(y=t[A]||(t[A]={}))[f])&&m[0]===v){if(!0===(g=m[1])||g===l)return!0===g}else if((m=y[f]=[v])[1]=e(t,n,h)||l,!0===m[1])return!0}}function gt(e){return e.length>1?function(t,n,l){for(var f=e.length;f--;)if(!e[f](t,n,l))return!1;return!0}:e[0]}function mt(e,t,n,l,f){for(var p,d=[],h=0,g=e.length,m=null!=t;g>h;h++)(p=e[h])&&(!n||n(p,l,f))&&(d.push(p),m&&t.push(h));return d}function yt(e,t,n,l,f,p){return l&&!l[A]&&(l=yt(l)),f&&!f[A]&&(f=yt(f,p)),ot((function(p,d,h,g){var m,y,v,x=[],T=[],w=d.length,N=p||function xt(e,t,n){for(var l=0,f=t.length;f>l;l++)st(e,t[l],n);return n}(t||"*",h.nodeType?[h]:h,[]),C=!e||!p&&t?N:mt(N,x,e,h,g),E=n?f||(p?e:w||l)?[]:d:C;if(n&&n(C,E,h,g),l)for(m=mt(E,T),l(m,[],h,g),y=m.length;y--;)(v=m[y])&&(E[T[y]]=!(C[T[y]]=v));if(p){if(f||e){if(f){for(m=[],y=E.length;y--;)(v=E[y])&&m.push(C[y]=v);f(null,E=[],m,g)}for(y=E.length;y--;)(v=E[y])&&(m=f?K.call(p,v):x[y])>-1&&(p[m]=!(d[m]=v))}}else E=mt(E===d?E.splice(w,E.length):E),f?f(null,d,E,g):Q.apply(d,E)}))}function vt(e){for(var t,n,l,p=e.length,d=f.relative[e[0].type],h=d||f.relative[" "],g=d?1:0,y=ht((function(e){return e===t}),h,!0),v=ht((function(e){return K.call(t,e)>-1}),h,!0),x=[function(e,n,l){return!d&&(l||n!==m)||((t=n).nodeType?y(e,n,l):v(e,n,l))}];p>g;g++)if(n=f.relative[e[g].type])x=[ht(gt(x),n)];else{if((n=f.filter[e[g].type].apply(null,e[g].matches))[A]){for(l=++g;p>l&&!f.relative[e[l].type];l++);return yt(g>1&>(x),g>1&&dt(e.slice(0,g-1)).replace(re,"$1"),n,l>g&&vt(e.slice(g,l)),p>l&&vt(e=e.slice(l)),p>l&&dt(e))}x.push(n)}return gt(x)}function bt(e,t){var n=0,p=t.length>0,d=e.length>0,s=function(h,g,y,x,T){var w,N,C,E=[],S=0,A="0",j=h&&[],D=null!=T,_=m,B=h||d&&f.find.TAG("*",T&&g.parentNode||g),I=O+=null==_?1:Math.random()||.1;for(D&&(m=g!==v&&g,l=n);null!=(w=B[A]);A++){if(d&&w){for(N=0;C=e[N++];)if(C(w,g,y)){x.push(w);break}D&&(O=I,l=++n)}p&&((w=!C&&w)&&S--,h&&j.push(w))}if(S+=A,p&&A!==S){for(N=0;C=t[N++];)C(j,E,g,y);if(h){if(S>0)for(;A--;)j[A]||E[A]||(E[A]=Y.call(x));E=mt(E)}Q.apply(x,E),D&&!h&&E.length>0&&S+t.length>1&&st.uniqueSort(x)}return D&&(O=I,m=_),j};return p?ot(s):s}function wt(e,t,n,l){var p,d,g,m,y,v=ft(e);if(!l&&1===v.length){if((d=v[0]=v[0].slice(0)).length>2&&"ID"===(g=d[0]).type&&9===t.nodeType&&!T&&f.relative[d[1].type]){if(!(t=f.find.ID(g.matches[0].replace(me,tt),t)[0]))return n;e=e.slice(d.shift().value.length)}for(p=ue.needsContext.test(e)?0:d.length;p--&&(g=d[p],!f.relative[m=g.type]);)if((y=f.find[m])&&(l=y(g.matches[0].replace(me,tt),le.test(d[0].type)&&t.parentNode||t))){if(d.splice(p,1),!(e=l.length&&dt(d)))return Q.apply(n,J.call(l,0)),n;break}}return h(e,v)(l,t,T,n,le.test(e)),n}function Tt(){}h=st.compile=function(e,t){var n,l=[],f=[],p=z[e+" "];if(!p){for(t||(t=ft(e)),n=t.length;n--;)(p=vt(t[n]))[A]?l.push(p):f.push(p);p=z(e,bt(f,l))}return p},f.pseudos.nth=f.pseudos.eq,f.filters=Tt.prototype=f.pseudos,f.setFilters=new Tt,y(),st.attr=b.attr,b.find=st,b.expr=st.selectors,b.expr[":"]=b.expr.pseudos,b.unique=st.uniqueSort,b.text=st.getText,b.isXMLDoc=st.isXML,b.contains=st.contains}(e);var pe=/Until$/,de=/^(?:parents|prev(?:Until|All))/,he=/^.[^:#\[\.,]*$/,ge=b.expr.match.needsContext,me={children:!0,contents:!0,next:!0,prev:!0};function pt(e,t){do{e=e[t]}while(e&&1!==e.nodeType);return e}function ft(e,t,n){if(t=t||0,b.isFunction(t))return b.grep(e,(function(e,l){return!!t.call(e,l,e)===n}));if(t.nodeType)return b.grep(e,(function(e){return e===t===n}));if("string"==typeof t){var l=b.grep(e,(function(e){return 1===e.nodeType}));if(he.test(t))return b.filter(t,l,!n);t=b.filter(t,l)}return b.grep(e,(function(e){return b.inArray(e,t)>=0===n}))}function dt(e){var t=ye.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}b.fn.extend({find:function(e){var t,n,l,f=this.length;if("string"!=typeof e)return l=this,this.pushStack(b(e).filter((function(){for(t=0;f>t;t++)if(b.contains(l[t],this))return!0})));for(n=[],t=0;f>t;t++)b.find(e,this[t],n);return(n=this.pushStack(f>1?b.unique(n):n)).selector=(this.selector?this.selector+" ":"")+e,n},has:function(e){var t,n=b(e,this),l=n.length;return this.filter((function(){for(t=0;l>t;t++)if(b.contains(this,n[t]))return!0}))},not:function(e){return this.pushStack(ft(this,e,!1))},filter:function(e){return this.pushStack(ft(this,e,!0))},is:function(e){return!!e&&("string"==typeof e?ge.test(e)?b(e,this.context).index(this[0])>=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){for(var n,l=0,f=this.length,p=[],d=ge.test(e)||"string"!=typeof e?b(e,t||this.context):0;f>l;l++)for(n=this[l];n&&n.ownerDocument&&n!==t&&11!==n.nodeType;){if(d?d.index(n)>-1:b.find.matchesSelector(n,e)){p.push(n);break}n=n.parentNode}return this.pushStack(p.length>1?b.unique(p):p)},index:function(e){return e?"string"==typeof e?b.inArray(this[0],b(e)):b.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?b(e,t):b.makeArray(e&&e.nodeType?[e]:e),l=b.merge(this.get(),n);return this.pushStack(b.unique(l))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),b.fn.andSelf=b.fn.addBack,b.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(e,t,n){return b.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(e,t,n){return b.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return b.dir(e,"previousSibling",n)},siblings:function(e){return b.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.merge([],e.childNodes)}},(function(e,t){b.fn[e]=function(n,l){var f=b.map(this,t,n);return pe.test(e)||(l=n),l&&"string"==typeof l&&(f=b.filter(l,f)),f=this.length>1&&!me[e]?b.unique(f):f,this.length>1&&de.test(e)&&(f=f.reverse()),this.pushStack(f)}})),b.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?b.find.matchesSelector(t[0],e)?[t[0]]:[]:b.find.matches(e,t)},dir:function(e,n,l){for(var f=[],p=e[n];p&&9!==p.nodeType&&(l===t||1!==p.nodeType||!b(p).is(l));)1===p.nodeType&&f.push(p),p=p[n];return f},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});var ye="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ve=/ jQuery\d+="(?:null|\d+)"/g,be=RegExp("<(?:"+ye+")[\\s/>]","i"),xe=/^\s+/,Te=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,we=/<([\w:]+)/,Ne=/\s*$/g,Le={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:b.support.htmlSerialize?[0,"",""]:[1,"X
","
"]},He=dt(p).appendChild(p.createElement("div"));function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function Ht(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function qt(e){var t=je.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Mt(e,t){for(var n,l=0;null!=(n=e[l]);l++)b._data(n,"globalEval",!t||b._data(t[l],"globalEval"))}function _t(e,t){if(1===t.nodeType&&b.hasData(e)){var n,l,f,p=b._data(e),d=b._data(t,p),h=p.events;if(h)for(n in delete d.handle,d.events={},h)for(l=0,f=h[n].length;f>l;l++)b.event.add(t,n,h[n][l]);d.data&&(d.data=b.extend({},d.data))}}function Ft(e,t){var n,l,f;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!b.support.noCloneEvent&&t[b.expando]){for(l in(f=b._data(t)).events)b.removeEvent(t,l,f.handle);t.removeAttribute(b.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),b.support.html5Clone&&e.innerHTML&&!b.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Ee.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}function Ot(e,n){var l,p,d=0,h=typeof e.getElementsByTagName!==f?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==f?e.querySelectorAll(n||"*"):t;if(!h)for(h=[],l=e.childNodes||e;null!=(p=l[d]);d++)!n||b.nodeName(p,n)?h.push(p):b.merge(h,Ot(p,n));return n===t||n&&b.nodeName(e,n)?b.merge([e],h):h}function Bt(e){Ee.test(e.type)&&(e.defaultChecked=e.checked)}Le.optgroup=Le.option,Le.tbody=Le.tfoot=Le.colgroup=Le.caption=Le.thead,Le.th=Le.td,b.fn.extend({text:function(e){return b.access(this,(function(e){return e===t?b.text(this):this.empty().append((this[0]&&this[0].ownerDocument||p).createTextNode(e))}),null,e,arguments.length)},wrapAll:function(e){if(b.isFunction(e))return this.each((function(t){b(this).wrapAll(e.call(this,t))}));if(this[0]){var t=b(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e})).append(this)}return this},wrapInner:function(e){return b.isFunction(e)?this.each((function(t){b(this).wrapInner(e.call(this,t))})):this.each((function(){var t=b(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=b.isFunction(e);return this.each((function(n){b(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(){return this.parent().each((function(){b.nodeName(this,"body")||b(this).replaceWith(this.childNodes)})).end()},append:function(){return this.domManip(arguments,!0,(function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.appendChild(e)}))},prepend:function(){return this.domManip(arguments,!0,(function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.insertBefore(e,this.firstChild)}))},before:function(){return this.domManip(arguments,!1,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return this.domManip(arguments,!1,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},remove:function(e,t){for(var n,l=0;null!=(n=this[l]);l++)(!e||b.filter(e,[n]).length>0)&&(t||1!==n.nodeType||b.cleanData(Ot(n)),n.parentNode&&(t&&b.contains(n.ownerDocument,n)&&Mt(Ot(n,"script")),n.parentNode.removeChild(n)));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&b.cleanData(Ot(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&b.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return b.clone(this,e,t)}))},html:function(e){return b.access(this,(function(e){var n=this[0]||{},l=0,f=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(ve,""):t;if(!("string"!=typeof e||ke.test(e)||!b.support.htmlSerialize&&be.test(e)||!b.support.leadingWhitespace&&xe.test(e)||Le[(we.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(Te,"<$1>");try{for(;f>l;l++)1===(n=this[l]||{}).nodeType&&(b.cleanData(Ot(n,!1)),n.innerHTML=e);n=0}catch(e){}}n&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(e){return b.isFunction(e)||"string"==typeof e||(e=b(e).not(this).detach()),this.domManip([e],!0,(function(e){var t=this.nextSibling,n=this.parentNode;n&&(b(this).remove(),n.insertBefore(e,t))}))},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,l){e=x.apply([],e);var f,p,d,h,g,m,y=0,v=this.length,T=this,w=v-1,N=e[0],C=b.isFunction(N);if(C||!(1>=v||"string"!=typeof N||b.support.checkClone)&&Se.test(N))return this.each((function(f){var p=T.eq(f);C&&(e[0]=N.call(this,f,n?p.html():t)),p.domManip(e,n,l)}));if(v&&(f=(m=b.buildFragment(e,this[0].ownerDocument,!1,this)).firstChild,1===m.childNodes.length&&(m=f),f)){for(n=n&&b.nodeName(f,"tr"),d=(h=b.map(Ot(m,"script"),Ht)).length;v>y;y++)p=m,y!==w&&(p=b.clone(p,!0,!0),d&&b.merge(h,Ot(p,"script"))),l.call(n&&b.nodeName(this[y],"table")?Lt(this[y],"tbody"):this[y],p,y);if(d)for(g=h[h.length-1].ownerDocument,b.map(h,qt),y=0;d>y;y++)p=h[y],Ae.test(p.type||"")&&!b._data(p,"globalEval")&&b.contains(g,p)&&(p.src?b.ajax({url:p.src,type:"GET",dataType:"script",async:!1,global:!1,throws:!0}):b.globalEval((p.text||p.textContent||p.innerHTML||"").replace(De,"")));m=f=null}return this}}),b.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){b.fn[e]=function(e){for(var n,l=0,f=[],p=b(e),d=p.length-1;d>=l;l++)n=l===d?this:this.clone(!0),b(p[l])[t](n),T.apply(f,n.get());return this.pushStack(f)}})),b.extend({clone:function(e,t,n){var l,f,p,d,h,g=b.contains(e.ownerDocument,e);if(b.support.html5Clone||b.isXMLDoc(e)||!be.test("<"+e.nodeName+">")?p=e.cloneNode(!0):(He.innerHTML=e.outerHTML,He.removeChild(p=He.firstChild)),!(b.support.noCloneEvent&&b.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||b.isXMLDoc(e)))for(l=Ot(p),h=Ot(e),d=0;null!=(f=h[d]);++d)l[d]&&Ft(f,l[d]);if(t)if(n)for(h=h||Ot(e),l=l||Ot(p),d=0;null!=(f=h[d]);d++)_t(f,l[d]);else _t(e,p);return(l=Ot(p,"script")).length>0&&Mt(l,!g&&Ot(e,"script")),l=h=f=null,p},buildFragment:function(e,t,n,l){for(var f,p,d,h,g,m,y,v=e.length,x=dt(t),T=[],w=0;v>w;w++)if((p=e[w])||0===p)if("object"===b.type(p))b.merge(T,p.nodeType?[p]:p);else if(Ce.test(p)){for(h=h||x.appendChild(t.createElement("div")),g=(we.exec(p)||["",""])[1].toLowerCase(),y=Le[g]||Le._default,h.innerHTML=y[1]+p.replace(Te,"<$1>")+y[2],f=y[0];f--;)h=h.lastChild;if(!b.support.leadingWhitespace&&xe.test(p)&&T.push(t.createTextNode(xe.exec(p)[0])),!b.support.tbody)for(f=(p="table"!==g||Ne.test(p)?""!==y[1]||Ne.test(p)?0:h:h.firstChild)&&p.childNodes.length;f--;)b.nodeName(m=p.childNodes[f],"tbody")&&!m.childNodes.length&&p.removeChild(m);for(b.merge(T,h.childNodes),h.textContent="";h.firstChild;)h.removeChild(h.firstChild);h=x.lastChild}else T.push(t.createTextNode(p));for(h&&x.removeChild(h),b.support.appendChecked||b.grep(Ot(T,"input"),Bt),w=0;p=T[w++];)if((!l||-1===b.inArray(p,l))&&(d=b.contains(p.ownerDocument,p),h=Ot(x.appendChild(p),"script"),d&&Mt(h),n))for(f=0;p=h[f++];)Ae.test(p.type||"")&&n.push(p);return h=null,x},cleanData:function(e,t){for(var n,l,p,d,h=0,g=b.expando,m=b.cache,v=b.support.deleteExpando,x=b.event.special;null!=(n=e[h]);h++)if((t||b.acceptData(n))&&(d=(p=n[g])&&m[p])){if(d.events)for(l in d.events)x[l]?b.event.remove(n,l):b.removeEvent(n,l,d.handle);m[p]&&(delete m[p],v?delete n[g]:typeof n.removeAttribute!==f?n.removeAttribute(g):n[g]=null,y.push(p))}}});var Me,qe,Oe,_e=/alpha\([^)]*\)/i,Fe=/opacity\s*=\s*([^)]*)/,Be=/^(top|right|bottom|left)$/,Pe=/^(none|table(?!-c[ea]).+)/,Re=/^margin/,We=RegExp("^("+A+")(.*)$","i"),$e=RegExp("^("+A+")(?!px)[a-z%]+$","i"),Ie=RegExp("^([+-])=("+A+")","i"),ze={BODY:"block"},Xe={position:"absolute",visibility:"hidden",display:"block"},Ue={letterSpacing:0,fontWeight:400},Ve=["Top","Right","Bottom","Left"],Ye=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;for(var n=t.charAt(0).toUpperCase()+t.slice(1),l=t,f=Ye.length;f--;)if((t=Ye[f]+n)in e)return t;return l}function nn(e,t){return e=t||e,"none"===b.css(e,"display")||!b.contains(e.ownerDocument,e)}function rn(e,t){for(var n,l,f,p=[],d=0,h=e.length;h>d;d++)(l=e[d]).style&&(p[d]=b._data(l,"olddisplay"),n=l.style.display,t?(p[d]||"none"!==n||(l.style.display=""),""===l.style.display&&nn(l)&&(p[d]=b._data(l,"olddisplay",un(l.nodeName)))):p[d]||(f=nn(l),(n&&"none"!==n||!f)&&b._data(l,"olddisplay",f?n:b.css(l,"display"))));for(d=0;h>d;d++)(l=e[d]).style&&(t&&"none"!==l.style.display&&""!==l.style.display||(l.style.display=t?p[d]||"":"none"));return e}function on(e,t,n){var l=We.exec(t);return l?Math.max(0,l[1]-(n||0))+(l[2]||"px"):t}function an(e,t,n,l,f){for(var p=n===(l?"border":"content")?4:"width"===t?1:0,d=0;4>p;p+=2)"margin"===n&&(d+=b.css(e,n+Ve[p],!0,f)),l?("content"===n&&(d-=b.css(e,"padding"+Ve[p],!0,f)),"margin"!==n&&(d-=b.css(e,"border"+Ve[p]+"Width",!0,f))):(d+=b.css(e,"padding"+Ve[p],!0,f),"padding"!==n&&(d+=b.css(e,"border"+Ve[p]+"Width",!0,f)));return d}function sn(e,t,n){var l=!0,f="width"===t?e.offsetWidth:e.offsetHeight,p=qe(e),d=b.support.boxSizing&&"border-box"===b.css(e,"boxSizing",!1,p);if(0>=f||null==f){if((0>(f=Oe(e,t,p))||null==f)&&(f=e.style[t]),$e.test(f))return f;l=d&&(b.support.boxSizingReliable||f===e.style[t]),f=parseFloat(f)||0}return f+an(e,t,n||(d?"border":"content"),l,p)+"px"}function un(e){var t=p,n=ze[e];return n||("none"!==(n=ln(e,t))&&n||((t=((Me=(Me||b("