unpoly-rails 3.8.0.rc1 → 3.8.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/assets/unpoly/unpoly-migrate.js +49 -2
- data/assets/unpoly/unpoly-migrate.min.js +1 -1
- data/assets/unpoly/unpoly.es6.js +58 -88
- data/assets/unpoly/unpoly.es6.min.js +1 -1
- data/assets/unpoly/unpoly.js +58 -88
- data/assets/unpoly/unpoly.min.js +1 -1
- data/lib/unpoly/rails/controller.rb +4 -2
- data/lib/unpoly/rails/request_echo_headers.rb +4 -2
- data/lib/unpoly/rails/request_method_cookie.rb +4 -2
- data/lib/unpoly/rails/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ead521bbe6065f311c3d2ed666a3a70fd2b5bc4ea903add6402340e8b9a10d52
|
4
|
+
data.tar.gz: 583e2982290b245e843829c48515d3c0889d990c6ff28a1f249703bbc23cb5c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea8b9993749cfb43f966ac6723b3b1de2b8fe3bde64756fdfbb59c1b2325aa6cc20374f6ee236df1261aa2d636ac4b635ac3fbde40d6580690ac798495ca2272
|
7
|
+
data.tar.gz: da6dc221ce79a664764d41cb43379e7b067e452910a43b53c607f46a71d86168606d2c2d35d0bd64c9fdd0376218dffb9dd3e2b4221fc3a56df2d78b875c836a
|
@@ -126,13 +126,13 @@ up.migrate = (function () {
|
|
126
126
|
});
|
127
127
|
}
|
128
128
|
const warnedMessages = {};
|
129
|
-
|
129
|
+
const warn = up.mockable((message, ...args) => {
|
130
130
|
const formattedMessage = u.sprintf(message, ...args);
|
131
131
|
if (!warnedMessages[formattedMessage]) {
|
132
132
|
warnedMessages[formattedMessage] = true;
|
133
133
|
up.log[config.logLevel]('unpoly-migrate', message, ...args);
|
134
134
|
}
|
135
|
-
}
|
135
|
+
});
|
136
136
|
function deprecated(deprecatedExpression, replacementExpression) {
|
137
137
|
warn(`${deprecatedExpression} has been deprecated. Use ${replacementExpression} instead.`);
|
138
138
|
}
|
@@ -145,6 +145,52 @@ up.migrate = (function () {
|
|
145
145
|
};
|
146
146
|
return promise;
|
147
147
|
}
|
148
|
+
const CSS_LENGTH_PROPS = [
|
149
|
+
'top', 'right', 'bottom', 'left',
|
150
|
+
'padding', 'padding-top', 'padding-right', 'padding-bottom', 'padding-left',
|
151
|
+
'margin', 'margin-top', 'margin-right', 'margin-bottom', 'margin-left',
|
152
|
+
'border-width', 'border-top-width', 'border-right-width', 'border-bottom-width', 'border-left-width',
|
153
|
+
'width', 'height',
|
154
|
+
'max-width', 'max-height',
|
155
|
+
'min-width', 'min-height',
|
156
|
+
];
|
157
|
+
function fixStylePropName(prop) {
|
158
|
+
if (/[A-Z]/.test(prop)) {
|
159
|
+
warn(`CSS property names must be in kebab-case, but got camelCase "${prop}"`);
|
160
|
+
return u.camelToKebabCase(prop);
|
161
|
+
}
|
162
|
+
else {
|
163
|
+
return prop;
|
164
|
+
}
|
165
|
+
}
|
166
|
+
function fixStylePropValue(prop, value, unit) {
|
167
|
+
if (!unit && CSS_LENGTH_PROPS.includes(prop) && /^[\d.]+$/.test(value)) {
|
168
|
+
warn(`CSS length values must have a unit, but got "${prop}: ${value}". Use "${prop}: ${value}px" instead.`);
|
169
|
+
return value + "px";
|
170
|
+
}
|
171
|
+
else {
|
172
|
+
return value;
|
173
|
+
}
|
174
|
+
}
|
175
|
+
function fixStyleProps(arg, unit) {
|
176
|
+
let transformed;
|
177
|
+
if (u.isString(arg)) {
|
178
|
+
transformed = fixStylePropName(arg);
|
179
|
+
}
|
180
|
+
else if (u.isArray(arg)) {
|
181
|
+
transformed = arg.map(fixStylePropName);
|
182
|
+
}
|
183
|
+
else if (u.isObject(arg)) {
|
184
|
+
transformed = {};
|
185
|
+
for (let name in arg) {
|
186
|
+
let value = arg[name];
|
187
|
+
name = fixStylePropName(name);
|
188
|
+
value = fixStylePropValue(name, value, unit);
|
189
|
+
transformed[name] = value;
|
190
|
+
}
|
191
|
+
}
|
192
|
+
return transformed;
|
193
|
+
}
|
148
194
|
return {
|
149
195
|
deprecated,
|
150
196
|
renamedPackage,
|
@@ -157,6 +203,7 @@ up.migrate = (function () {
|
|
157
203
|
formerlyAsync,
|
158
204
|
renamedEvent,
|
159
205
|
removedEvent,
|
206
|
+
fixStyleProps,
|
160
207
|
fixEventTypes,
|
161
208
|
fixKey,
|
162
209
|
warn,
|
@@ -1 +1 @@
|
|
1
|
-
(()=>{var e={294:()=>{up.browser.loadPage=function(...e){return up.migrate.deprecated("up.browser.loadPage()","up.network.loadPage()"),up.network.loadPage(...e)},up.browser.isSupported=function(...e){return up.migrate.deprecated("up.browser.isSupported()","up.framework.isSupported()"),up.framework.isSupported(...e)}},700:()=>{up.element.first=function(...e){return up.migrate.deprecated("up.element.first()","up.element.get()"),up.element.get(...e)},up.element.createFromHtml=function(...e){return up.migrate.deprecated("up.element.createFromHtml()","up.element.createFromHTML()"),up.element.createFromHTML(...e)},up.element.remove=function(e){return up.migrate.deprecated("up.element.remove()","Element#remove()"),e.remove()},up.element.matches=function(e,u){return up.migrate.deprecated("up.element.matches()","Element#matches()"),e.matches(u)},up.element.closest=function(e,u){return up.migrate.deprecated("up.element.closest()","Element#closest()"),e.closest(u)},up.element.replace=function(e,u){return up.migrate.deprecated("up.element.replace()","Element#replaceWith()"),e.replaceWith(u)},up.element.all=function(...e){up.migrate.deprecated("up.element.all()","Document#querySelectorAll() or Element#querySelectorAll()");const u=e.pop();return(e[0]||document).querySelectorAll(u)},up.element.toggleClass=function(e,u,t){up.migrate.deprecated("up.element.toggleClass()","element.classList.toggle()");const p=e.classList;return null==t&&(t=!p.contains(u)),t?p.add(u):p.remove(u)},up.element.toSelector=function(...e){return up.migrate.deprecated("up.element.toSelector()","up.fragment.toTarget()"),up.fragment.toTarget(...e)},up.element.isAttached=function(e){return up.migrate.deprecated("up.element.isAttached()","document.contains(element)"),document.contains(e)},up.element.isDetached=function(e){return up.migrate.deprecated("up.element.isDetached()","!document.contains(element)"),!up.element.isAttached(e)}},937:()=>{class DeprecatedCannotCompile extends up.Error{}Object.defineProperty(up,"CannotCompile",{get:function(){return up.migrate.warn('The error up.CannotCompile is no longer thrown. Compiler errors now emit an "error" event on window, but no longer crash the render pass.'),DeprecatedCannotCompile}})},394:()=>{up.migrate.renamedPackage("bus","event"),up.event.nobodyPrevents=function(...e){return up.migrate.deprecated("up.event.nobodyPrevents(type)","!up.emit(type).defaultPrevented"),!up.emit(...e).defaultPrevented},up.$on=function(...e){up.migrate.warn("up.$on() has been deprecated. Instead use up.on() with a callback that wraps the given native element in a jQuery collection.");let u=e.pop();return u.upNativeCallback=function(e,t,p){let r=jQuery(t);u.call(r,e,r,p)},up.on(...e,u.upNativeCallback)},up.$off=function(...e){up.migrate.deprecated("up.$off()","up.off()");let u=e.pop().upNativeCallback;return u||up.fail("The callback passed to up.$off() was never registered with up.$on()"),up.off(...e,u)}},729:()=>{up.migrate.renamedPackage("navigation","feedback"),up.migrate.renamedProperty(up.feedback.config,"navs","navSelectors")},305:()=>{up.migrate.renamedProperty(up.form.config,"fields","fieldSelectors"),up.migrate.renamedProperty(up.form.config,"submitButtons","submitButtonSelectors"),up.migrate.renamedProperty(up.form.config,"validateTargets","groupSelectors"),up.migrate.renamedProperty(up.form.config,"observeDelay","watchInputDelay"),up.migrate.migratedFormGroupSelectors=function(){return up.form.config.groupSelectors.map((e=>{let u=e.replace(/:has\((:origin|&)\)$/,"");return e!==u&&up.migrate.warn('Selectors in up.form.config.groupSelectors must not contain ":has(:origin)". The suffix is added automatically where required. Found in "%s".',e),u}))},up.migrate.renamedAttribute("up-observe","up-watch"),up.migrate.renamedAttribute("up-fieldset","up-form-group"),up.migrate.renamedAttribute("up-delay","up-watch-delay",{scope:"[up-autosubmit]"}),up.migrate.renamedAttribute("up-delay","up-watch-delay",{scope:"[up-watch]"}),up.observe=function(...e){if(up.migrate.deprecated("up.observe()","up.watch()"),up.util.isList(e[0])&&e[0].length>1){let u=e.shift();up.migrate.warn("Calling up.observe() with a list of multiple elements is no longer supported by up.watch()");let t=up.util.map(u,(u=>up.watch(u,...e)));return up.util.sequence(t)}return up.watch(...e)}},354:()=>{const e=up.util;up.migrate.renamedPackage("flow","fragment"),up.migrate.renamedPackage("dom","fragment"),up.migrate.renamedProperty(up.fragment.config,"fallbacks","mainTargets"),up.migrate.handleResponseDocOptions=e=>up.migrate.fixKey(e,"html","document");let u=()=>up.migrate.deprecated("up.fragment.config.matchAroundOrigin","up.fragment.config.match");Object.defineProperty(up.fragment.config,"matchAroundOrigin",{get:function(){return u(),"closest"===this.match},set:function(e){u(),this.match=e?"region":"first"}}),up.replace=function(e,u,t){return up.migrate.deprecated("up.replace(target, url)","up.navigate(target, { url })"),up.navigate(Object.assign(Object.assign({},t),{target:e,url:u}))},up.extract=function(e,u,t){return up.migrate.deprecated("up.extract(target, document)","up.navigate(target, { document })"),up.navigate(Object.assign(Object.assign({},t),{target:e,document:u}))},up.fragment.first=function(...e){return up.migrate.deprecated("up.fragment.first()","up.fragment.get()"),up.fragment.get(...e)},up.first=up.fragment.first,up.migrate.preprocessRenderOptions=function(u){e.isString(u.history)&&"auto"!==u.history&&(up.migrate.warn("Passing a URL as { history } option is deprecated. Pass it as { location } instead."),u.location=u.history,u.history="auto");for(let t of["target","origin"])e.isJQuery(u[t])&&(up.migrate.warn("Passing a jQuery collection as { %s } is deprecated. Pass it as a native element instead.",t),u[t]=up.element.get(u[t]));"auto"===u.fail&&(up.migrate.warn("The option { fail: 'auto' } is deprecated. Omit the option instead."),delete u.fail);let t=e.pluckKey(u,"solo");e.isString(t)?(up.migrate.warn("The up.render() option { solo } has been replaced with { abort } and { abort } no longer accepts a URL pattern. Check if you can use { abort: 'target'} or use up.network.abort(pattern) instead."),u.abort=e=>up.network.abort(t,e)):e.isFunction(t)?(up.migrate.warn("The up.render() option { solo } has been replaced with { abort } and { abort } no longer accepts a Function(up.Request): boolean. Check if you can use { abort: 'target'} or use up.network.abort(fn) instead."),u.abort=e=>{up.network.abort(t,e)}):!0===t?(up.migrate.deprecated("Option { solo: true }","{ abort: 'all' }"),u.abort="all"):!1===t&&(up.migrate.deprecated("Option { solo: false }","{ abort: false }"),up.migrate.warn("Unpoly 3+ only aborts requests targeting the same fragment. Setting { solo: false } may no longer be necessary."),u.abort=!1),up.migrate.fixKey(u,"keep","useKeep"),up.migrate.fixKey(u,"hungry","useHungry"),up.migrate.fixKey(u,"failOnFinished","onFailFinished"),e.isString(u.reveal)?(up.migrate.deprecated(`Option { reveal: '${u.reveal}' }`,`{ scroll: '${u.reveal}' }`),u.scroll=u.reveal):!0===u.reveal?(up.migrate.deprecated("Option { reveal: true }","{ scroll: 'target' }"),u.scroll="target"):!1===u.reveal&&(up.migrate.deprecated("Option { reveal: false }","{ scroll: false }"),u.scroll=!1),!0===u.resetScroll&&(up.migrate.deprecated("Option { resetScroll: true }","{ scroll: 'reset' }"),u.scroll="reset"),!1===u.resetScroll&&(up.migrate.deprecated("Option { resetScroll: false }","{ scroll: false }"),u.scroll=!1),!0===u.restoreScroll&&(up.migrate.deprecated("Option { restoreScroll: true }","{ scroll: 'restore' }"),u.scroll="restore"),!1===u.restoreScroll&&(up.migrate.deprecated("Option { restoreScroll: false }","{ scroll: false }"),u.scroll=!1)},up.migrate.postprocessReloadOptions=function(e){var u;let t,p=null===(u=e.headers)||void 0===u?void 0:u["If-Modified-Since"];t=p?Math.floor(.001*new Date(p)).toString():"0",e.headers[up.protocol.headerize("reloadFromTime")]=t},up.migrate.resolveOrigin=function(e,{origin:u}={}){return e.replace(/"[^"]*"|'[^']*'|&|:origin\b/g,(function(t){return":origin"!==t&&"&"!==t?t:("&"===t&&up.migrate.deprecated("Origin shorthand '&'",":origin"),u?up.fragment.toTarget(u):void up.fail('Missing { origin } element to resolve "%s" reference (found in %s)',t,e))}))},up.migrate.removedEvent("up:fragment:kept","up:fragment:keep");let t=up.fragment.config.runScripts,p=!1;Object.defineProperty(up.fragment.config,"runScripts",{get:()=>t,set(e){t=e,p=!0}}),up.on("up:framework:boot",(function(){p||up.migrate.warn("Scripts within fragments are now executed. Configure up.fragment.config.runScripts to remove this warning.")})),up.compiler("[up-keep]",(function(u){let t=up.element.booleanOrStringAttr(u,"up-keep");e.isString(t)&&(up.migrate.warn('The [up-keep] attribute no longer supports a selector value. Elements will be matched by their derived target. You may prevent keeping with [up-on-keep="if(condition) event.preventDefault()"]. '),up.element.setMissingAttr(u,"up-on-keep",`if (!newFragment.matches(${JSON.stringify(t)})) event.preventDefault()`),u.setAttribute("up-keep",""))}))},234:()=>{up.migrate.renamedEvent("up:app:booted","up:framework:booted")},869:()=>{up.migrate.renamedProperty(up.history.config,"popTargets","restoreTargets"),up.history.url=function(){return up.migrate.deprecated("up.history.url()","up.history.location"),up.history.location},up.migrate.renamedEvent("up:history:push","up:location:changed"),up.migrate.renamedEvent("up:history:pushed","up:location:changed"),up.migrate.renamedEvent("up:history:restore","up:location:changed"),up.migrate.renamedEvent("up:history:restored","up:location:changed"),up.migrate.renamedEvent("up:history:replaced","up:location:changed"),up.migrate.removedEvent("up:fragment:kept","up:fragment:keep");let e=up.history.config.updateMetaTags,u=!1;Object.defineProperty(up.history.config,"updateMetaTags",{get:()=>e,set(t){e=t,u=!0}}),up.on("up:framework:boot",(function(){u||up.migrate.warn("Meta tags in the <head> are now updated automatically. Configure up.history.config.updateMetaTags to remove this warning.")})),up.migrate.warnOfHungryMetaTags=function(e){let u=up.radio.config.selector("hungrySelectors"),t=up.util.filter(e,(e=>e.matches(u)));t.length&&up.migrate.warn("Meta tags in the <head> are now updated automatically. Remove the [up-hungry] attribute from %o.",t)}},905:()=>{up.migrate.handleLayerOptions=function(e){up.migrate.fixKey(e,"flavor","mode"),up.migrate.fixKey(e,"closable","dismissable"),up.migrate.fixKey(e,"closeLabel","dismissLabel");for(let u of["width","maxWidth","height"])e[u]&&up.migrate.warn(`Layer option { ${u} } has been removed. Use { size } or { class } instead.`);e.sticky&&up.migrate.warn("Layer option { sticky } has been removed. Give links an [up-peel=false] attribute to prevent layer dismissal on click."),e.template&&up.migrate.warn("Layer option { template } has been removed. Use { class } or modify the layer HTML on up:layer:open."),"page"===e.layer&&(up.migrate.warn("Option { layer: 'page' } has been renamed to { layer: 'root' }."),e.layer="root"),"modal"!==e.layer&&"popup"!==e.layer||(up.migrate.warn(`Option { layer: '${e.layer}' } has been removed. Did you mean { layer: 'overlay' }?`),e.layer="overlay")},up.migrate.handleTetherOptions=function(e){const[u,t]=e.position.split("-");t&&(up.migrate.warn("The position value %o is deprecated. Use %o instead.",e.position,{position:u,align:t}),e.position=u,e.align=t)},up.migrate.registerLayerCloser=e=>e.registerClickCloser("up-close",((u,t)=>{up.migrate.deprecated("[up-close]","[up-dismiss]"),e.dismiss(u,t)})),up.migrate.handleLayerConfig=e=>up.migrate.fixKey(e,"historyVisible","history"),Object.defineProperty(up.Layer.prototype,"historyVisible",{get:function(){return up.migrate.deprecated("up.Layer#historyVisible","up.Layer#history"),this.history}})},969:()=>{const e=up.link.config.selectorFn("followSelectors"),u=up.link.config.selectorFn("preloadSelectors");up.migrate.renamedAttribute("up-flavor","up-mode",{scope:e}),up.migrate.renamedAttribute("up-closable","up-dismissable",{scope:e}),up.migrate.removedAttribute("up-width",{scope:e,replacement:"[up-size] or [up-class]"}),up.migrate.removedAttribute("up-height",{scope:e,replacement:"[up-size] or [up-class]"}),up.migrate.renamedAttribute("up-history-visible","up-history",{scope:e}),up.migrate.renamedAttribute("up-clear-cache","up-expire-cache",{scope:e}),up.migrate.transformAttribute("up-solo",(function(e,u){switch(u){case"":up.migrate.warn('Attribute [up-solo] has been replaced with [up-abort="all"]'),e.setAttribute("up-abort","all");break;case"true":up.migrate.warn('Attribute [up-solo="true"] has been replaced with [up-abort="all"]'),e.setAttribute("up-abort","all");break;case"false":up.migrate.warn('Attribute [up-solo="false"] has been replaced with [up-abort="false"]'),up.migrate.warn('Unpoly 3+ only aborts requests targeting the same fragment. Setting [up-solo="false"] may no longer be necessary.'),e.setAttribute("up-abort","false");break;default:up.migrate.warn('Attribute [up-solo] has been renamed to [up-abort] and [up-abort] no longer accepts a URL pattern. Check if you can use [up-abort="target"] instead.'),e.setAttribute("up-abort","target")}})),up.migrate.transformAttribute("up-reveal",(function(e,u){switch(u){case"":up.migrate.warn('Attribute [up-reveal] has been replaced with [up-scroll="target"]'),e.setAttribute("up-scroll","target");break;case"true":up.migrate.warn('Attribute [up-reveal="true"] has been replaced with [up-scroll="target"]'),e.setAttribute("up-scroll","target");break;case"false":up.migrate.warn('Attribute [up-reveal="false"] has been replaced with [up-scroll="false"]'),e.setAttribute("up-scroll","false");break;default:up.migrate.warn('Attribute [up-reveal="%s"] has been replaced with [up-scroll="%s"]',u)}})),up.migrate.transformAttribute("up-reset-scroll",(function(e,u){switch(u){case"":up.migrate.warn('Attribute [up-reset-scroll] has been replaced with [up-scroll="reset"]'),e.setAttribute("up-scroll","reset");break;case"true":up.migrate.warn('Attribute [up-reset-scroll="true"] has been replaced with [up-scroll="reset"]'),e.setAttribute("up-scroll","reset");break;case"false":up.migrate.warn('Attribute [up-reset-scroll="false"] has been replaced with [up-scroll="false"]'),e.setAttribute("up-scroll","false")}})),up.migrate.transformAttribute("up-restore-scroll",(function(e,u){switch(u){case"":up.migrate.warn('Attribute [up-restore-scroll] has been replaced with [up-scroll="restore"]'),e.setAttribute("up-scroll","restore");break;case"true":up.migrate.warn('Attribute [up-restore-scroll="true"] has been replaced with [up-scroll="restore"]'),e.setAttribute("up-scroll","restore");break;case"false":up.migrate.warn('Attribute [up-restore-scroll="false"] has been replaced with [up-scroll="false"]'),e.setAttribute("up-scroll","false")}})),up.migrate.targetMacro("up-dash",{"up-preload":"","up-instant":""},(()=>up.migrate.deprecated("a[up-dash]","up.link.config.instantSelectors and up.link.config.preloadSelectors"))),up.migrate.renamedAttribute("up-delay","up-preload-delay",{scope:u}),up.link.config.preloadEnabled=!0;let t=up.migrate.removedProperty(up.link.config,"preloadEnabled","The configuration up.link.config.preloadEnabled has been removed. To disable preloading, prevent up:link:preload instead.");up.on("up:link:preload",(function(e){t[0]||e.preventDefault()}))},992:()=>{const e=up.util;up.migrate=function(){const u=new up.Config((()=>({logLevel:"warn"})));function t(u,...t){let p=e.extractCallback(t),{scope:r}=e.extractOptions(t),o=r||`[${u}]`;up.macro(o,{priority:-1e3},(function(e){if(e.hasAttribute(u)){let t=e.getAttribute(u);p(e,t)}}))}const p={},r={};function o(e){let u=p[e];if(u)return a(`Event ${e} has been renamed to ${u}`),u;if(e in r){let u=`Event ${e} has been removed`,t=r[e];return t&&(u+=`. Use ${t} instead.`),a(u),e}return e}const n={};function a(t,...p){const r=e.sprintf(t,...p);n[r]||(n[r]=!0,up.log[u.logLevel]("unpoly-migrate",t,...p))}return{deprecated:function(e,u){a(`${e} has been deprecated. Use ${u} instead.`)},renamedPackage:function(e,u){Object.defineProperty(up,e,{get:()=>(a(`up.${e} has been renamed to up.${u}`),up[u])})},renamedProperty:function(u,t,p,r){const o=e.memoize((()=>r?a(r):a("Property { %s } has been renamed to { %s } (found in %o)",t,p,u)));Object.defineProperty(u,t,{get(){return o(),this[p]},set(e){o(),this[p]=e}})},removedProperty:function(u,t,p){const r=e.memoize((()=>p?a(p):a("Property { %s } has been removed without replacement (found in %o)",t,u)));let o=[u[t]];return Object.defineProperty(u,t,{get:()=>(r(),o[0]),set(e){r(),o[0]=e}}),o},forbiddenPropertyValue:function(e,u,t,p){let r=e[u];Object.defineProperty(e,u,{get:()=>r,set(e){if(e===t)throw new Error(p);r=e}})},transformAttribute:t,renamedAttribute:function(u,p,{scope:r,mapValue:o}={}){t(u,{scope:r},(function(t,r){a("Attribute [%s] has been renamed to [%s] (found in %o)",u,p,t),o&&(r=e.evalOption(o,r)),t.setAttribute(p,r)}))},removedAttribute:function(e,{scope:u,replacement:p}={}){t(e,{scope:u},(function(u,t){p?a("Attribute [%s] has been removed (found in %o). Use %s instead.",e,u,p):a("Attribute [%s] has been removed without replacement (found in %o)",e,u)}))},formerlyAsync:function(e){const u=Promise.resolve(),t=u.then;return u.then=function(){return a(`${e} no longer returns a promise`),t.apply(this,arguments)},u},renamedEvent:function(e,u){p[e]=u},removedEvent:function(e,u=null){r[e]=u},fixEventTypes:function(u){return e.uniq(e.map(u,o))},fixKey:function(u,t,p){e.isDefined(u[t])&&(a("Property { %s } has been renamed to { %s } (found in %o)",t,p,u),e.renameKey(u,t,p))},warn:a,loaded:!0,config:u}}()},413:()=>{const e=new Error("up.modal.flavors has been removed without direct replacement. You may give new layers a { class } or modify layer elements on up:layer:open.");up.modal={visit:(e,u={})=>(up.migrate.deprecated("up.modal.visit(url)",'up.layer.open({ url, mode: "modal" })'),up.layer.open(Object.assign(Object.assign({},u),{url:e,mode:"modal"}))),follow:(e,u={})=>(up.migrate.deprecated("up.modal.follow(link)",'up.follow(link, { layer: "modal" })'),up.follow(e,Object.assign(Object.assign({},u),{layer:"modal"}))),extract:(e,u,t={})=>(up.migrate.deprecated("up.modal.extract(target, document)",'up.layer.open({ document, mode: "modal" })'),up.layer.open(Object.assign(Object.assign({},t),{target:e,html:u,layer:"modal"}))),close:(e={})=>(up.migrate.deprecated("up.modal.close()","up.layer.dismiss()"),up.layer.dismiss(null,e),up.migrate.formerlyAsync("up.layer.dismiss()")),url:()=>(up.migrate.deprecated("up.modal.url()","up.layer.location"),up.layer.location),coveredUrl(){var e;return up.migrate.deprecated("up.modal.coveredUrl()","up.layer.parent.location"),null===(e=up.layer.parent)||void 0===e?void 0:e.location},get config(){return up.migrate.deprecated("up.modal.config","up.layer.config.modal"),up.layer.config.modal},contains:e=>(up.migrate.deprecated("up.modal.contains()","up.layer.contains()"),up.layer.contains(e)),isOpen:()=>(up.migrate.deprecated("up.modal.isOpen()","up.layer.isOverlay()"),up.layer.isOverlay()),get flavors(){throw e},flavor(){throw e}},up.migrate.renamedEvent("up:modal:open","up:layer:open"),up.migrate.renamedEvent("up:modal:opened","up:layer:opened"),up.migrate.renamedEvent("up:modal:close","up:layer:dismiss"),up.migrate.renamedEvent("up:modal:closed","up:layer:dismissed"),up.migrate.targetMacro("up-modal",{"up-layer":"new modal"},(()=>up.migrate.deprecated("a[up-modal]",'a[up-layer="new modal"]'))),up.migrate.targetMacro("up-drawer",{"up-layer":"new drawer"},(()=>up.migrate.deprecated("a[up-drawer]",'a[up-layer="new drawer"]')))},885:()=>{const e=up.util;up.migrate.renamedPackage("proxy","network"),up.migrate.renamedEvent("up:proxy:load","up:request:load"),up.migrate.renamedEvent("up:proxy:received","up:request:loaded"),up.migrate.renamedEvent("up:proxy:loaded","up:request:loaded"),up.migrate.renamedEvent("up:proxy:fatal","up:request:offline"),up.migrate.renamedEvent("up:request:fatal","up:request:offline"),up.migrate.renamedEvent("up:proxy:aborted","up:request:aborted"),up.migrate.renamedEvent("up:proxy:slow","up:network:late"),up.migrate.renamedEvent("up:proxy:recover","up:network:recover"),up.migrate.renamedEvent("up:request:late","up:network:late"),up.migrate.renamedEvent("up:request:recover","up:network:recover");const u=()=>up.migrate.deprecated("up.proxy.config.preloadDelay","up.link.config.preloadDelay");Object.defineProperty(up.network.config,"preloadDelay",{get:()=>(u(),up.link.config.preloadDelay),set(e){u(),up.link.config.preloadDelay=e}}),up.migrate.renamedProperty(up.network.config,"maxRequests","concurrency"),up.migrate.renamedProperty(up.network.config,"slowDelay","badResponseTime"),up.migrate.renamedProperty(up.network.config,"cacheExpiry","cacheExpireAge",'The configuration up.network.config.cacheExpiry has been renamed to up.network.config.cacheExpireAge. Note that Unpoly 3+ automatically reloads cached content after rendering to ensure users always see fresh data ("cache revalidation"). Setting a custom expiry may no longer be necessary.'),up.migrate.renamedProperty(up.network.config,"clearCache","expireCache"),up.migrate.forbiddenPropertyValue(up.network.config,"cacheSize",0,"Disabling the cache with up.network.config.cacheSize = 0 is no longer supported. To disable automatic caching during navigation, set up.fragment.config.navigateOptions.cache = false instead."),up.network.config.requestMetaKeys=[],up.migrate.removedProperty(up.network.config,"requestMetaKeys","The configuration up.network.config.requestMetaKeys has been removed. Servers that optimize responses based on request headers should instead set a Vary response header."),up.migrate.handleRequestOptions=function(e){up.migrate.fixKey(e,"clearCache","expireCache"),e.solo&&up.migrate.warn("The option up.request({ solo }) has been removed. Use up.network.abort() or up.fragment.abort() instead.")},up.ajax=function(...e){return up.migrate.deprecated("up.ajax()","up.request()"),up.request(...e).then((e=>e.text))},up.network.clear=function(){up.migrate.deprecated("up.proxy.clear()","up.cache.expire()"),up.cache.expire()},up.Request.Cache.prototype.clear=function(...e){up.migrate.deprecated("up.cache.clear()","up.cache.expire()"),this.expire(...e)},up.network.preload=function(...e){return up.migrate.deprecated("up.proxy.preload(link)","up.link.preload(link)"),up.link.preload(...e)},up.migrate.preprocessAbortArgs=function(u){2===u.length&&e.isString(u[1])&&(up.migrate.warn("up.network.abort() no longer takes a reason as a second argument. Pass it as { reason } option instead."),u[1]={reason:u[1]})},up.network.isIdle=function(){return up.migrate.deprecated("up.network.isIdle()","!up.network.isBusy()"),!up.network.isBusy()},up.Request.prototype.navigate=function(){up.migrate.deprecated("up.Request#navigate()","up.Request#loadPage()"),this.loadPage()},up.migrate.renamedProperty(up.Request.prototype,"preload","background"),up.Response.prototype.isSuccess=function(){return up.migrate.deprecated("up.Response#isSuccess()","up.Response#ok"),this.ok},up.Response.prototype.getHeader=function(e){return up.migrate.deprecated("up.Response#getHeader()","up.Response#header()"),this.header(e)},up.Response.prototype.isError=function(){return up.migrate.deprecated("up.Response#isError()","!up.Response#ok"),!this.ok};const t=up.network.config.progressBar;function p(){up.network.config.progressBar=function(){return function(){const u=up.EventListener.allNonDefault(document);return e.find(u,(e=>"up:network:late"===e.eventType))}()?(up.migrate.warn("Disabled the default progress bar as may have built a custom loading indicator with your up:network:late listener. Please set up.network.config.progressBar to true or false."),!1):t}}p(),up.on("up:framework:reset",p),up.network.shouldReduceRequests=function(){return up.migrate("up.network.shouldReduceRequests() has been removed without replacement"),!1},up.migrate.removedProperty(up.network.config,"badRTT"),up.migrate.removedProperty(up.network.config,"badDownlink")},69:()=>{up.popup={attach:(e,u={})=>(e=up.fragment.get(e),up.migrate.deprecated("up.popup.attach(origin)","up.layer.open({ origin, layer: 'popup' })"),up.layer.open(Object.assign(Object.assign({},u),{origin:e,layer:"popup"}))),close:(e={})=>(up.migrate.deprecated("up.popup.close()","up.layer.dismiss()"),up.layer.dismiss(null,e),up.migrate.formerlyAsync("up.layer.dismiss()")),url:()=>(up.migrate.deprecated("up.popup.url()","up.layer.location"),up.layer.location),coveredUrl(){var e;return up.migrate.deprecated("up.popup.coveredUrl()","up.layer.parent.location"),null===(e=up.layer.parent)||void 0===e?void 0:e.location},get config(){return up.migrate.deprecated("up.popup.config","up.layer.config.popup"),up.layer.config.popup},contains:e=>(up.migrate.deprecated("up.popup.contains()","up.layer.contains()"),up.layer.contains(e)),isOpen:()=>(up.migrate.deprecated("up.popup.isOpen()","up.layer.isOverlay()"),up.layer.isOverlay()),sync:()=>(up.migrate.deprecated("up.popup.sync()","up.layer.sync()"),up.layer.sync())},up.migrate.renamedEvent("up:popup:open","up:layer:open"),up.migrate.renamedEvent("up:popup:opened","up:layer:opened"),up.migrate.renamedEvent("up:popup:close","up:layer:dismiss"),up.migrate.renamedEvent("up:popup:closed","up:layer:dismissed"),up.migrate.targetMacro("up-popup",{"up-layer":"new popup"},(()=>up.migrate.deprecated("[up-popup]",'[up-layer="new popup"]')))},677:()=>{up.migrate.clearCacheFromXHR=function(e){let u=e.getResponseHeader("X-Up-Clear-Cache");if(u)return up.migrate.deprecated("X-Up-Clear-Cache","X-Up-Expire-Cache"),"false"!==u&&u},up.migrate.titleFromXHR=function(e){let u=e.getResponseHeader("X-Up-Title");if(u){if("false"===u)return!1;if('"'!==u[0])return up.migrate.warn("X-Up-Title must now be a JSON-encoded string"),u}}},228:()=>{const e=up.element;up.migrate.renamedProperty(up.radio.config,"hungry","hungrySelectors"),up.radio.config.pollEnabled=!0;let u=up.migrate.removedProperty(up.radio.config,"pollEnabled","The configuration up.radio.config.pollEnabled has been removed. To disable polling, prevent up:fragment:poll instead.");up.on("up:fragment:poll",(function(e){u[0]||e.preventDefault()})),up.compiler("[up-hungry][up-if-history]",(function(u){e.booleanAttr(u,"up-if-history")&&u.addEventListener("up:fragment:hungry",(function(e){e.renderOptions.history||e.preventDefault()}))}))},771:()=>{const e=up.util,u=up.element;up.migrate.renamedPackage("syntax","script"),up.migrate.postCompile=function(u,t){let p;if(p=t.keep){up.migrate.warn("The { keep: true } option for up.compiler() has been removed. Have the compiler set [up-keep] attribute instead.");const t=e.isString(p)?p:"";for(let e of u)e.setAttribute("up-keep",t)}},up.migrate.targetMacro=function(t,p,r){up.macro(`[${t}]`,(function(o){let n;const a=e.copy(p);(n=o.getAttribute(t))?a["up-target"]=n:a["up-follow"]="",u.setMissingAttrs(o,a),o.removeAttribute(t),null==r||r()}))},up.$compiler=function(...e){up.migrate.warn("up.$compiler() has been deprecated. Instead use up.compiler() with a callback that wraps the given native element in a jQuery collection.");let u=e.pop();return up.compiler(...e,(function(e,...t){let p=jQuery(e);return u(p,...t)}))},up.$macro=function(...e){up.migrate.warn("up.$macro() has been deprecated. Instead use up.macro() with a callback that wraps the given native element in a jQuery collection.");let u=e.pop();return up.macro(...e,(function(e,...t){let p=jQuery(e);return u(p,...t)}))},up.migrate.processCompilerPassMeta=function(e,u){Object.defineProperty(e,"response",{get:()=>(up.migrate.warn("Accessing meta.response from a compiler has been deprecated without replacement. Avoid fragments that compile differently for the initial page load vs. subsequent fragment updates."),u)})}},197:()=>{up.macro("[up-tooltip]",(function(e){up.migrate.warn("[up-tooltip] has been deprecated. A [title] was set instead."),up.element.setMissingAttr(e,"title",e.getAttribute("up-tooltip"))}))},480:()=>{up.util.only=function(e,...u){return up.migrate.deprecated("up.util.only(object, ...keys)","up.util.pick(object, keys)"),up.util.pick(e,u)},up.util.except=function(e,...u){return up.migrate.deprecated("up.util.except(object, ...keys)","up.util.omit(object, keys)"),up.util.omit(e,u)},up.util.parseUrl=function(...e){return up.migrate.deprecated("up.util.parseUrl()","up.util.parseURL()"),up.util.parseURL(...e)},up.util.any=function(...e){return up.migrate.deprecated("up.util.any()","up.util.some()"),up.util.some(...e)},up.util.all=function(...e){return up.migrate.deprecated("up.util.all()","up.util.every()"),up.util.every(...e)},up.util.detect=function(...e){return up.migrate.deprecated("up.util.detect()","up.util.find()"),up.util.find(...e)},up.util.select=function(...e){return up.migrate.deprecated("up.util.select()","up.util.filter()"),up.util.filter(...e)},up.util.setTimer=function(...e){return up.migrate.deprecated("up.util.setTimer()","up.util.timer()"),up.util.timer(...e)},up.util.escapeHtml=function(...e){return up.migrate.deprecated("up.util.escapeHtml()","up.util.escapeHTML()"),up.util.escapeHTML(...e)},up.util.selectorForElement=function(...e){return up.migrate.deprecated("up.util.selectorForElement()","up.fragment.toTarget()"),up.fragment.toTarget(...e)},up.util.nextFrame=function(...e){return up.migrate.deprecated("up.util.nextFrame()","up.util.task()"),up.util.task(...e)},up.util.times=function(e,u){up.migrate.deprecated("up.util.times()","a `for` loop");for(let t=0;t<e;t++)u()},up.util.assign=function(...e){return up.migrate.deprecated("up.util.assign()","Object.assign()"),Object.assign(...e)},up.util.values=function(...e){return up.migrate.deprecated("up.util.values()","Object.values()"),Object.values(...e)},up.util.microtask=window.queueMicrotask},338:()=>{up.migrate.renamedPackage("layout","viewport"),up.migrate.renamedProperty(up.viewport.config,"viewports","viewportSelectors"),up.migrate.renamedProperty(up.viewport.config,"fixedTop","fixedTopSelectors"),up.migrate.renamedProperty(up.viewport.config,"fixedBottom","fixedBottomSelectors"),up.migrate.renamedProperty(up.viewport.config,"anchoredRight","anchoredRightSelectors"),up.migrate.renamedProperty(up.viewport.config,"snap","revealSnap"),up.migrate.removedProperty(up.viewport.config,"scrollSpeed"),up.viewport.closest=function(...e){return up.migrate.deprecated("up.viewport.closest()","up.viewport.get()"),up.viewport.get(...e)},up.viewport.scroll=function(e,u,t={}){return up.migrate.deprecated("up.scroll()","Element#scrollTo()"),(e=up.fragment.get(e,t)).scrollTo(Object.assign(Object.assign({},t),{top:u})),up.migrate.formerlyAsync("up.scroll()")},up.scroll=up.viewport.scroll}},u={};function t(p){var r=u[p];if(void 0!==r)return r.exports;var o=u[p]={exports:{}};return e[p](o,o.exports,t),o.exports}up.framework.startExtension(),t(992),t(480),t(937),t(294),t(700),t(394),t(771),t(305),t(354),t(234),t(869),t(729),t(969),t(905),t(413),t(69),t(197),t(677),t(885),t(228),t(338),up.framework.stopExtension()})();
|
1
|
+
(()=>{var e={294:()=>{up.browser.loadPage=function(...e){return up.migrate.deprecated("up.browser.loadPage()","up.network.loadPage()"),up.network.loadPage(...e)},up.browser.isSupported=function(...e){return up.migrate.deprecated("up.browser.isSupported()","up.framework.isSupported()"),up.framework.isSupported(...e)}},700:()=>{up.element.first=function(...e){return up.migrate.deprecated("up.element.first()","up.element.get()"),up.element.get(...e)},up.element.createFromHtml=function(...e){return up.migrate.deprecated("up.element.createFromHtml()","up.element.createFromHTML()"),up.element.createFromHTML(...e)},up.element.remove=function(e){return up.migrate.deprecated("up.element.remove()","Element#remove()"),e.remove()},up.element.matches=function(e,u){return up.migrate.deprecated("up.element.matches()","Element#matches()"),e.matches(u)},up.element.closest=function(e,u){return up.migrate.deprecated("up.element.closest()","Element#closest()"),e.closest(u)},up.element.replace=function(e,u){return up.migrate.deprecated("up.element.replace()","Element#replaceWith()"),e.replaceWith(u)},up.element.all=function(...e){up.migrate.deprecated("up.element.all()","Document#querySelectorAll() or Element#querySelectorAll()");const u=e.pop();return(e[0]||document).querySelectorAll(u)},up.element.toggleClass=function(e,u,t){up.migrate.deprecated("up.element.toggleClass()","element.classList.toggle()");const p=e.classList;return null==t&&(t=!p.contains(u)),t?p.add(u):p.remove(u)},up.element.toSelector=function(...e){return up.migrate.deprecated("up.element.toSelector()","up.fragment.toTarget()"),up.fragment.toTarget(...e)},up.element.isAttached=function(e){return up.migrate.deprecated("up.element.isAttached()","document.contains(element)"),document.contains(e)},up.element.isDetached=function(e){return up.migrate.deprecated("up.element.isDetached()","!document.contains(element)"),!up.element.isAttached(e)}},937:()=>{class DeprecatedCannotCompile extends up.Error{}Object.defineProperty(up,"CannotCompile",{get:function(){return up.migrate.warn('The error up.CannotCompile is no longer thrown. Compiler errors now emit an "error" event on window, but no longer crash the render pass.'),DeprecatedCannotCompile}})},394:()=>{up.migrate.renamedPackage("bus","event"),up.event.nobodyPrevents=function(...e){return up.migrate.deprecated("up.event.nobodyPrevents(type)","!up.emit(type).defaultPrevented"),!up.emit(...e).defaultPrevented},up.$on=function(...e){up.migrate.warn("up.$on() has been deprecated. Instead use up.on() with a callback that wraps the given native element in a jQuery collection.");let u=e.pop();return u.upNativeCallback=function(e,t,p){let r=jQuery(t);u.call(r,e,r,p)},up.on(...e,u.upNativeCallback)},up.$off=function(...e){up.migrate.deprecated("up.$off()","up.off()");let u=e.pop().upNativeCallback;return u||up.fail("The callback passed to up.$off() was never registered with up.$on()"),up.off(...e,u)}},729:()=>{up.migrate.renamedPackage("navigation","feedback"),up.migrate.renamedProperty(up.feedback.config,"navs","navSelectors")},305:()=>{up.migrate.renamedProperty(up.form.config,"fields","fieldSelectors"),up.migrate.renamedProperty(up.form.config,"submitButtons","submitButtonSelectors"),up.migrate.renamedProperty(up.form.config,"validateTargets","groupSelectors"),up.migrate.renamedProperty(up.form.config,"observeDelay","watchInputDelay"),up.migrate.migratedFormGroupSelectors=function(){return up.form.config.groupSelectors.map((e=>{let u=e.replace(/:has\((:origin|&)\)$/,"");return e!==u&&up.migrate.warn('Selectors in up.form.config.groupSelectors must not contain ":has(:origin)". The suffix is added automatically where required. Found in "%s".',e),u}))},up.migrate.renamedAttribute("up-observe","up-watch"),up.migrate.renamedAttribute("up-fieldset","up-form-group"),up.migrate.renamedAttribute("up-delay","up-watch-delay",{scope:"[up-autosubmit]"}),up.migrate.renamedAttribute("up-delay","up-watch-delay",{scope:"[up-watch]"}),up.observe=function(...e){if(up.migrate.deprecated("up.observe()","up.watch()"),up.util.isList(e[0])&&e[0].length>1){let u=e.shift();up.migrate.warn("Calling up.observe() with a list of multiple elements is no longer supported by up.watch()");let t=up.util.map(u,(u=>up.watch(u,...e)));return up.util.sequence(t)}return up.watch(...e)}},354:()=>{const e=up.util;up.migrate.renamedPackage("flow","fragment"),up.migrate.renamedPackage("dom","fragment"),up.migrate.renamedProperty(up.fragment.config,"fallbacks","mainTargets"),up.migrate.handleResponseDocOptions=e=>up.migrate.fixKey(e,"html","document");let u=()=>up.migrate.deprecated("up.fragment.config.matchAroundOrigin","up.fragment.config.match");Object.defineProperty(up.fragment.config,"matchAroundOrigin",{get:function(){return u(),"closest"===this.match},set:function(e){u(),this.match=e?"region":"first"}}),up.replace=function(e,u,t){return up.migrate.deprecated("up.replace(target, url)","up.navigate(target, { url })"),up.navigate(Object.assign(Object.assign({},t),{target:e,url:u}))},up.extract=function(e,u,t){return up.migrate.deprecated("up.extract(target, document)","up.navigate(target, { document })"),up.navigate(Object.assign(Object.assign({},t),{target:e,document:u}))},up.fragment.first=function(...e){return up.migrate.deprecated("up.fragment.first()","up.fragment.get()"),up.fragment.get(...e)},up.first=up.fragment.first,up.migrate.preprocessRenderOptions=function(u){e.isString(u.history)&&"auto"!==u.history&&(up.migrate.warn("Passing a URL as { history } option is deprecated. Pass it as { location } instead."),u.location=u.history,u.history="auto");for(let t of["target","origin"])e.isJQuery(u[t])&&(up.migrate.warn("Passing a jQuery collection as { %s } is deprecated. Pass it as a native element instead.",t),u[t]=up.element.get(u[t]));"auto"===u.fail&&(up.migrate.warn("The option { fail: 'auto' } is deprecated. Omit the option instead."),delete u.fail);let t=e.pluckKey(u,"solo");e.isString(t)?(up.migrate.warn("The up.render() option { solo } has been replaced with { abort } and { abort } no longer accepts a URL pattern. Check if you can use { abort: 'target'} or use up.network.abort(pattern) instead."),u.abort=e=>up.network.abort(t,e)):e.isFunction(t)?(up.migrate.warn("The up.render() option { solo } has been replaced with { abort } and { abort } no longer accepts a Function(up.Request): boolean. Check if you can use { abort: 'target'} or use up.network.abort(fn) instead."),u.abort=e=>{up.network.abort(t,e)}):!0===t?(up.migrate.deprecated("Option { solo: true }","{ abort: 'all' }"),u.abort="all"):!1===t&&(up.migrate.deprecated("Option { solo: false }","{ abort: false }"),up.migrate.warn("Unpoly 3+ only aborts requests targeting the same fragment. Setting { solo: false } may no longer be necessary."),u.abort=!1),up.migrate.fixKey(u,"keep","useKeep"),up.migrate.fixKey(u,"hungry","useHungry"),up.migrate.fixKey(u,"failOnFinished","onFailFinished"),e.isString(u.reveal)?(up.migrate.deprecated(`Option { reveal: '${u.reveal}' }`,`{ scroll: '${u.reveal}' }`),u.scroll=u.reveal):!0===u.reveal?(up.migrate.deprecated("Option { reveal: true }","{ scroll: 'target' }"),u.scroll="target"):!1===u.reveal&&(up.migrate.deprecated("Option { reveal: false }","{ scroll: false }"),u.scroll=!1),!0===u.resetScroll&&(up.migrate.deprecated("Option { resetScroll: true }","{ scroll: 'reset' }"),u.scroll="reset"),!1===u.resetScroll&&(up.migrate.deprecated("Option { resetScroll: false }","{ scroll: false }"),u.scroll=!1),!0===u.restoreScroll&&(up.migrate.deprecated("Option { restoreScroll: true }","{ scroll: 'restore' }"),u.scroll="restore"),!1===u.restoreScroll&&(up.migrate.deprecated("Option { restoreScroll: false }","{ scroll: false }"),u.scroll=!1)},up.migrate.postprocessReloadOptions=function(e){var u;let t,p=null===(u=e.headers)||void 0===u?void 0:u["If-Modified-Since"];t=p?Math.floor(.001*new Date(p)).toString():"0",e.headers[up.protocol.headerize("reloadFromTime")]=t},up.migrate.resolveOrigin=function(e,{origin:u}={}){return e.replace(/"[^"]*"|'[^']*'|&|:origin\b/g,(function(t){return":origin"!==t&&"&"!==t?t:("&"===t&&up.migrate.deprecated("Origin shorthand '&'",":origin"),u?up.fragment.toTarget(u):void up.fail('Missing { origin } element to resolve "%s" reference (found in %s)',t,e))}))},up.migrate.removedEvent("up:fragment:kept","up:fragment:keep");let t=up.fragment.config.runScripts,p=!1;Object.defineProperty(up.fragment.config,"runScripts",{get:()=>t,set(e){t=e,p=!0}}),up.on("up:framework:boot",(function(){p||up.migrate.warn("Scripts within fragments are now executed. Configure up.fragment.config.runScripts to remove this warning.")})),up.compiler("[up-keep]",(function(u){let t=up.element.booleanOrStringAttr(u,"up-keep");e.isString(t)&&(up.migrate.warn('The [up-keep] attribute no longer supports a selector value. Elements will be matched by their derived target. You may prevent keeping with [up-on-keep="if(condition) event.preventDefault()"]. '),up.element.setMissingAttr(u,"up-on-keep",`if (!newFragment.matches(${JSON.stringify(t)})) event.preventDefault()`),u.setAttribute("up-keep",""))}))},234:()=>{up.migrate.renamedEvent("up:app:booted","up:framework:booted")},869:()=>{up.migrate.renamedProperty(up.history.config,"popTargets","restoreTargets"),up.history.url=function(){return up.migrate.deprecated("up.history.url()","up.history.location"),up.history.location},up.migrate.renamedEvent("up:history:push","up:location:changed"),up.migrate.renamedEvent("up:history:pushed","up:location:changed"),up.migrate.renamedEvent("up:history:restore","up:location:changed"),up.migrate.renamedEvent("up:history:restored","up:location:changed"),up.migrate.renamedEvent("up:history:replaced","up:location:changed"),up.migrate.removedEvent("up:fragment:kept","up:fragment:keep");let e=up.history.config.updateMetaTags,u=!1;Object.defineProperty(up.history.config,"updateMetaTags",{get:()=>e,set(t){e=t,u=!0}}),up.on("up:framework:boot",(function(){u||up.migrate.warn("Meta tags in the <head> are now updated automatically. Configure up.history.config.updateMetaTags to remove this warning.")})),up.migrate.warnOfHungryMetaTags=function(e){let u=up.radio.config.selector("hungrySelectors"),t=up.util.filter(e,(e=>e.matches(u)));t.length&&up.migrate.warn("Meta tags in the <head> are now updated automatically. Remove the [up-hungry] attribute from %o.",t)}},905:()=>{up.migrate.handleLayerOptions=function(e){up.migrate.fixKey(e,"flavor","mode"),up.migrate.fixKey(e,"closable","dismissable"),up.migrate.fixKey(e,"closeLabel","dismissLabel");for(let u of["width","maxWidth","height"])e[u]&&up.migrate.warn(`Layer option { ${u} } has been removed. Use { size } or { class } instead.`);e.sticky&&up.migrate.warn("Layer option { sticky } has been removed. Give links an [up-peel=false] attribute to prevent layer dismissal on click."),e.template&&up.migrate.warn("Layer option { template } has been removed. Use { class } or modify the layer HTML on up:layer:open."),"page"===e.layer&&(up.migrate.warn("Option { layer: 'page' } has been renamed to { layer: 'root' }."),e.layer="root"),"modal"!==e.layer&&"popup"!==e.layer||(up.migrate.warn(`Option { layer: '${e.layer}' } has been removed. Did you mean { layer: 'overlay' }?`),e.layer="overlay")},up.migrate.handleTetherOptions=function(e){const[u,t]=e.position.split("-");t&&(up.migrate.warn("The position value %o is deprecated. Use %o instead.",e.position,{position:u,align:t}),e.position=u,e.align=t)},up.migrate.registerLayerCloser=e=>e.registerClickCloser("up-close",((u,t)=>{up.migrate.deprecated("[up-close]","[up-dismiss]"),e.dismiss(u,t)})),up.migrate.handleLayerConfig=e=>up.migrate.fixKey(e,"historyVisible","history"),Object.defineProperty(up.Layer.prototype,"historyVisible",{get:function(){return up.migrate.deprecated("up.Layer#historyVisible","up.Layer#history"),this.history}})},969:()=>{const e=up.link.config.selectorFn("followSelectors"),u=up.link.config.selectorFn("preloadSelectors");up.migrate.renamedAttribute("up-flavor","up-mode",{scope:e}),up.migrate.renamedAttribute("up-closable","up-dismissable",{scope:e}),up.migrate.removedAttribute("up-width",{scope:e,replacement:"[up-size] or [up-class]"}),up.migrate.removedAttribute("up-height",{scope:e,replacement:"[up-size] or [up-class]"}),up.migrate.renamedAttribute("up-history-visible","up-history",{scope:e}),up.migrate.renamedAttribute("up-clear-cache","up-expire-cache",{scope:e}),up.migrate.transformAttribute("up-solo",(function(e,u){switch(u){case"":up.migrate.warn('Attribute [up-solo] has been replaced with [up-abort="all"]'),e.setAttribute("up-abort","all");break;case"true":up.migrate.warn('Attribute [up-solo="true"] has been replaced with [up-abort="all"]'),e.setAttribute("up-abort","all");break;case"false":up.migrate.warn('Attribute [up-solo="false"] has been replaced with [up-abort="false"]'),up.migrate.warn('Unpoly 3+ only aborts requests targeting the same fragment. Setting [up-solo="false"] may no longer be necessary.'),e.setAttribute("up-abort","false");break;default:up.migrate.warn('Attribute [up-solo] has been renamed to [up-abort] and [up-abort] no longer accepts a URL pattern. Check if you can use [up-abort="target"] instead.'),e.setAttribute("up-abort","target")}})),up.migrate.transformAttribute("up-reveal",(function(e,u){switch(u){case"":up.migrate.warn('Attribute [up-reveal] has been replaced with [up-scroll="target"]'),e.setAttribute("up-scroll","target");break;case"true":up.migrate.warn('Attribute [up-reveal="true"] has been replaced with [up-scroll="target"]'),e.setAttribute("up-scroll","target");break;case"false":up.migrate.warn('Attribute [up-reveal="false"] has been replaced with [up-scroll="false"]'),e.setAttribute("up-scroll","false");break;default:up.migrate.warn('Attribute [up-reveal="%s"] has been replaced with [up-scroll="%s"]',u)}})),up.migrate.transformAttribute("up-reset-scroll",(function(e,u){switch(u){case"":up.migrate.warn('Attribute [up-reset-scroll] has been replaced with [up-scroll="reset"]'),e.setAttribute("up-scroll","reset");break;case"true":up.migrate.warn('Attribute [up-reset-scroll="true"] has been replaced with [up-scroll="reset"]'),e.setAttribute("up-scroll","reset");break;case"false":up.migrate.warn('Attribute [up-reset-scroll="false"] has been replaced with [up-scroll="false"]'),e.setAttribute("up-scroll","false")}})),up.migrate.transformAttribute("up-restore-scroll",(function(e,u){switch(u){case"":up.migrate.warn('Attribute [up-restore-scroll] has been replaced with [up-scroll="restore"]'),e.setAttribute("up-scroll","restore");break;case"true":up.migrate.warn('Attribute [up-restore-scroll="true"] has been replaced with [up-scroll="restore"]'),e.setAttribute("up-scroll","restore");break;case"false":up.migrate.warn('Attribute [up-restore-scroll="false"] has been replaced with [up-scroll="false"]'),e.setAttribute("up-scroll","false")}})),up.migrate.targetMacro("up-dash",{"up-preload":"","up-instant":""},(()=>up.migrate.deprecated("a[up-dash]","up.link.config.instantSelectors and up.link.config.preloadSelectors"))),up.migrate.renamedAttribute("up-delay","up-preload-delay",{scope:u}),up.link.config.preloadEnabled=!0;let t=up.migrate.removedProperty(up.link.config,"preloadEnabled","The configuration up.link.config.preloadEnabled has been removed. To disable preloading, prevent up:link:preload instead.");up.on("up:link:preload",(function(e){t[0]||e.preventDefault()}))},992:()=>{const e=up.util;up.migrate=function(){const u=new up.Config((()=>({logLevel:"warn"})));function t(u,...t){let p=e.extractCallback(t),{scope:r}=e.extractOptions(t),o=r||`[${u}]`;up.macro(o,{priority:-1e3},(function(e){if(e.hasAttribute(u)){let t=e.getAttribute(u);p(e,t)}}))}const p={},r={};function o(e){let u=p[e];if(u)return a(`Event ${e} has been renamed to ${u}`),u;if(e in r){let u=`Event ${e} has been removed`,t=r[e];return t&&(u+=`. Use ${t} instead.`),a(u),e}return e}const n={},a=up.mockable(((t,...p)=>{const r=e.sprintf(t,...p);n[r]||(n[r]=!0,up.log[u.logLevel]("unpoly-migrate",t,...p))})),i=["top","right","bottom","left","padding","padding-top","padding-right","padding-bottom","padding-left","margin","margin-top","margin-right","margin-bottom","margin-left","border-width","border-top-width","border-right-width","border-bottom-width","border-left-width","width","height","max-width","max-height","min-width","min-height"];function l(u){return/[A-Z]/.test(u)?(a(`CSS property names must be in kebab-case, but got camelCase "${u}"`),e.camelToKebabCase(u)):u}function s(e,u,t){return!t&&i.includes(e)&&/^[\d.]+$/.test(u)?(a(`CSS length values must have a unit, but got "${e}: ${u}". Use "${e}: ${u}px" instead.`),u+"px"):u}return{deprecated:function(e,u){a(`${e} has been deprecated. Use ${u} instead.`)},renamedPackage:function(e,u){Object.defineProperty(up,e,{get:()=>(a(`up.${e} has been renamed to up.${u}`),up[u])})},renamedProperty:function(u,t,p,r){const o=e.memoize((()=>r?a(r):a("Property { %s } has been renamed to { %s } (found in %o)",t,p,u)));Object.defineProperty(u,t,{get(){return o(),this[p]},set(e){o(),this[p]=e}})},removedProperty:function(u,t,p){const r=e.memoize((()=>p?a(p):a("Property { %s } has been removed without replacement (found in %o)",t,u)));let o=[u[t]];return Object.defineProperty(u,t,{get:()=>(r(),o[0]),set(e){r(),o[0]=e}}),o},forbiddenPropertyValue:function(e,u,t,p){let r=e[u];Object.defineProperty(e,u,{get:()=>r,set(e){if(e===t)throw new Error(p);r=e}})},transformAttribute:t,renamedAttribute:function(u,p,{scope:r,mapValue:o}={}){t(u,{scope:r},(function(t,r){a("Attribute [%s] has been renamed to [%s] (found in %o)",u,p,t),o&&(r=e.evalOption(o,r)),t.setAttribute(p,r)}))},removedAttribute:function(e,{scope:u,replacement:p}={}){t(e,{scope:u},(function(u,t){p?a("Attribute [%s] has been removed (found in %o). Use %s instead.",e,u,p):a("Attribute [%s] has been removed without replacement (found in %o)",e,u)}))},formerlyAsync:function(e){const u=Promise.resolve(),t=u.then;return u.then=function(){return a(`${e} no longer returns a promise`),t.apply(this,arguments)},u},renamedEvent:function(e,u){p[e]=u},removedEvent:function(e,u=null){r[e]=u},fixStyleProps:function(u,t){let p;if(e.isString(u))p=l(u);else if(e.isArray(u))p=u.map(l);else if(e.isObject(u)){p={};for(let e in u){let r=u[e];e=l(e),r=s(e,r,t),p[e]=r}}return p},fixEventTypes:function(u){return e.uniq(e.map(u,o))},fixKey:function(u,t,p){e.isDefined(u[t])&&(a("Property { %s } has been renamed to { %s } (found in %o)",t,p,u),e.renameKey(u,t,p))},warn:a,loaded:!0,config:u}}()},413:()=>{const e=new Error("up.modal.flavors has been removed without direct replacement. You may give new layers a { class } or modify layer elements on up:layer:open.");up.modal={visit:(e,u={})=>(up.migrate.deprecated("up.modal.visit(url)",'up.layer.open({ url, mode: "modal" })'),up.layer.open(Object.assign(Object.assign({},u),{url:e,mode:"modal"}))),follow:(e,u={})=>(up.migrate.deprecated("up.modal.follow(link)",'up.follow(link, { layer: "modal" })'),up.follow(e,Object.assign(Object.assign({},u),{layer:"modal"}))),extract:(e,u,t={})=>(up.migrate.deprecated("up.modal.extract(target, document)",'up.layer.open({ document, mode: "modal" })'),up.layer.open(Object.assign(Object.assign({},t),{target:e,html:u,layer:"modal"}))),close:(e={})=>(up.migrate.deprecated("up.modal.close()","up.layer.dismiss()"),up.layer.dismiss(null,e),up.migrate.formerlyAsync("up.layer.dismiss()")),url:()=>(up.migrate.deprecated("up.modal.url()","up.layer.location"),up.layer.location),coveredUrl(){var e;return up.migrate.deprecated("up.modal.coveredUrl()","up.layer.parent.location"),null===(e=up.layer.parent)||void 0===e?void 0:e.location},get config(){return up.migrate.deprecated("up.modal.config","up.layer.config.modal"),up.layer.config.modal},contains:e=>(up.migrate.deprecated("up.modal.contains()","up.layer.contains()"),up.layer.contains(e)),isOpen:()=>(up.migrate.deprecated("up.modal.isOpen()","up.layer.isOverlay()"),up.layer.isOverlay()),get flavors(){throw e},flavor(){throw e}},up.migrate.renamedEvent("up:modal:open","up:layer:open"),up.migrate.renamedEvent("up:modal:opened","up:layer:opened"),up.migrate.renamedEvent("up:modal:close","up:layer:dismiss"),up.migrate.renamedEvent("up:modal:closed","up:layer:dismissed"),up.migrate.targetMacro("up-modal",{"up-layer":"new modal"},(()=>up.migrate.deprecated("a[up-modal]",'a[up-layer="new modal"]'))),up.migrate.targetMacro("up-drawer",{"up-layer":"new drawer"},(()=>up.migrate.deprecated("a[up-drawer]",'a[up-layer="new drawer"]')))},885:()=>{const e=up.util;up.migrate.renamedPackage("proxy","network"),up.migrate.renamedEvent("up:proxy:load","up:request:load"),up.migrate.renamedEvent("up:proxy:received","up:request:loaded"),up.migrate.renamedEvent("up:proxy:loaded","up:request:loaded"),up.migrate.renamedEvent("up:proxy:fatal","up:request:offline"),up.migrate.renamedEvent("up:request:fatal","up:request:offline"),up.migrate.renamedEvent("up:proxy:aborted","up:request:aborted"),up.migrate.renamedEvent("up:proxy:slow","up:network:late"),up.migrate.renamedEvent("up:proxy:recover","up:network:recover"),up.migrate.renamedEvent("up:request:late","up:network:late"),up.migrate.renamedEvent("up:request:recover","up:network:recover");const u=()=>up.migrate.deprecated("up.proxy.config.preloadDelay","up.link.config.preloadDelay");Object.defineProperty(up.network.config,"preloadDelay",{get:()=>(u(),up.link.config.preloadDelay),set(e){u(),up.link.config.preloadDelay=e}}),up.migrate.renamedProperty(up.network.config,"maxRequests","concurrency"),up.migrate.renamedProperty(up.network.config,"slowDelay","badResponseTime"),up.migrate.renamedProperty(up.network.config,"cacheExpiry","cacheExpireAge",'The configuration up.network.config.cacheExpiry has been renamed to up.network.config.cacheExpireAge. Note that Unpoly 3+ automatically reloads cached content after rendering to ensure users always see fresh data ("cache revalidation"). Setting a custom expiry may no longer be necessary.'),up.migrate.renamedProperty(up.network.config,"clearCache","expireCache"),up.migrate.forbiddenPropertyValue(up.network.config,"cacheSize",0,"Disabling the cache with up.network.config.cacheSize = 0 is no longer supported. To disable automatic caching during navigation, set up.fragment.config.navigateOptions.cache = false instead."),up.network.config.requestMetaKeys=[],up.migrate.removedProperty(up.network.config,"requestMetaKeys","The configuration up.network.config.requestMetaKeys has been removed. Servers that optimize responses based on request headers should instead set a Vary response header."),up.migrate.handleRequestOptions=function(e){up.migrate.fixKey(e,"clearCache","expireCache"),e.solo&&up.migrate.warn("The option up.request({ solo }) has been removed. Use up.network.abort() or up.fragment.abort() instead.")},up.ajax=function(...e){return up.migrate.deprecated("up.ajax()","up.request()"),up.request(...e).then((e=>e.text))},up.network.clear=function(){up.migrate.deprecated("up.proxy.clear()","up.cache.expire()"),up.cache.expire()},up.Request.Cache.prototype.clear=function(...e){up.migrate.deprecated("up.cache.clear()","up.cache.expire()"),this.expire(...e)},up.network.preload=function(...e){return up.migrate.deprecated("up.proxy.preload(link)","up.link.preload(link)"),up.link.preload(...e)},up.migrate.preprocessAbortArgs=function(u){2===u.length&&e.isString(u[1])&&(up.migrate.warn("up.network.abort() no longer takes a reason as a second argument. Pass it as { reason } option instead."),u[1]={reason:u[1]})},up.network.isIdle=function(){return up.migrate.deprecated("up.network.isIdle()","!up.network.isBusy()"),!up.network.isBusy()},up.Request.prototype.navigate=function(){up.migrate.deprecated("up.Request#navigate()","up.Request#loadPage()"),this.loadPage()},up.migrate.renamedProperty(up.Request.prototype,"preload","background"),up.Response.prototype.isSuccess=function(){return up.migrate.deprecated("up.Response#isSuccess()","up.Response#ok"),this.ok},up.Response.prototype.getHeader=function(e){return up.migrate.deprecated("up.Response#getHeader()","up.Response#header()"),this.header(e)},up.Response.prototype.isError=function(){return up.migrate.deprecated("up.Response#isError()","!up.Response#ok"),!this.ok};const t=up.network.config.progressBar;function p(){up.network.config.progressBar=function(){return function(){const u=up.EventListener.allNonDefault(document);return e.find(u,(e=>"up:network:late"===e.eventType))}()?(up.migrate.warn("Disabled the default progress bar as may have built a custom loading indicator with your up:network:late listener. Please set up.network.config.progressBar to true or false."),!1):t}}p(),up.on("up:framework:reset",p),up.network.shouldReduceRequests=function(){return up.migrate("up.network.shouldReduceRequests() has been removed without replacement"),!1},up.migrate.removedProperty(up.network.config,"badRTT"),up.migrate.removedProperty(up.network.config,"badDownlink")},69:()=>{up.popup={attach:(e,u={})=>(e=up.fragment.get(e),up.migrate.deprecated("up.popup.attach(origin)","up.layer.open({ origin, layer: 'popup' })"),up.layer.open(Object.assign(Object.assign({},u),{origin:e,layer:"popup"}))),close:(e={})=>(up.migrate.deprecated("up.popup.close()","up.layer.dismiss()"),up.layer.dismiss(null,e),up.migrate.formerlyAsync("up.layer.dismiss()")),url:()=>(up.migrate.deprecated("up.popup.url()","up.layer.location"),up.layer.location),coveredUrl(){var e;return up.migrate.deprecated("up.popup.coveredUrl()","up.layer.parent.location"),null===(e=up.layer.parent)||void 0===e?void 0:e.location},get config(){return up.migrate.deprecated("up.popup.config","up.layer.config.popup"),up.layer.config.popup},contains:e=>(up.migrate.deprecated("up.popup.contains()","up.layer.contains()"),up.layer.contains(e)),isOpen:()=>(up.migrate.deprecated("up.popup.isOpen()","up.layer.isOverlay()"),up.layer.isOverlay()),sync:()=>(up.migrate.deprecated("up.popup.sync()","up.layer.sync()"),up.layer.sync())},up.migrate.renamedEvent("up:popup:open","up:layer:open"),up.migrate.renamedEvent("up:popup:opened","up:layer:opened"),up.migrate.renamedEvent("up:popup:close","up:layer:dismiss"),up.migrate.renamedEvent("up:popup:closed","up:layer:dismissed"),up.migrate.targetMacro("up-popup",{"up-layer":"new popup"},(()=>up.migrate.deprecated("[up-popup]",'[up-layer="new popup"]')))},677:()=>{up.migrate.clearCacheFromXHR=function(e){let u=e.getResponseHeader("X-Up-Clear-Cache");if(u)return up.migrate.deprecated("X-Up-Clear-Cache","X-Up-Expire-Cache"),"false"!==u&&u},up.migrate.titleFromXHR=function(e){let u=e.getResponseHeader("X-Up-Title");if(u){if("false"===u)return!1;if('"'!==u[0])return up.migrate.warn("X-Up-Title must now be a JSON-encoded string"),u}}},228:()=>{const e=up.element;up.migrate.renamedProperty(up.radio.config,"hungry","hungrySelectors"),up.radio.config.pollEnabled=!0;let u=up.migrate.removedProperty(up.radio.config,"pollEnabled","The configuration up.radio.config.pollEnabled has been removed. To disable polling, prevent up:fragment:poll instead.");up.on("up:fragment:poll",(function(e){u[0]||e.preventDefault()})),up.compiler("[up-hungry][up-if-history]",(function(u){e.booleanAttr(u,"up-if-history")&&u.addEventListener("up:fragment:hungry",(function(e){e.renderOptions.history||e.preventDefault()}))}))},771:()=>{const e=up.util,u=up.element;up.migrate.renamedPackage("syntax","script"),up.migrate.postCompile=function(u,t){let p;if(p=t.keep){up.migrate.warn("The { keep: true } option for up.compiler() has been removed. Have the compiler set [up-keep] attribute instead.");const t=e.isString(p)?p:"";for(let e of u)e.setAttribute("up-keep",t)}},up.migrate.targetMacro=function(t,p,r){up.macro(`[${t}]`,(function(o){let n;const a=e.copy(p);(n=o.getAttribute(t))?a["up-target"]=n:a["up-follow"]="",u.setMissingAttrs(o,a),o.removeAttribute(t),null==r||r()}))},up.$compiler=function(...e){up.migrate.warn("up.$compiler() has been deprecated. Instead use up.compiler() with a callback that wraps the given native element in a jQuery collection.");let u=e.pop();return up.compiler(...e,(function(e,...t){let p=jQuery(e);return u(p,...t)}))},up.$macro=function(...e){up.migrate.warn("up.$macro() has been deprecated. Instead use up.macro() with a callback that wraps the given native element in a jQuery collection.");let u=e.pop();return up.macro(...e,(function(e,...t){let p=jQuery(e);return u(p,...t)}))},up.migrate.processCompilerPassMeta=function(e,u){Object.defineProperty(e,"response",{get:()=>(up.migrate.warn("Accessing meta.response from a compiler has been deprecated without replacement. Avoid fragments that compile differently for the initial page load vs. subsequent fragment updates."),u)})}},197:()=>{up.macro("[up-tooltip]",(function(e){up.migrate.warn("[up-tooltip] has been deprecated. A [title] was set instead."),up.element.setMissingAttr(e,"title",e.getAttribute("up-tooltip"))}))},480:()=>{up.util.only=function(e,...u){return up.migrate.deprecated("up.util.only(object, ...keys)","up.util.pick(object, keys)"),up.util.pick(e,u)},up.util.except=function(e,...u){return up.migrate.deprecated("up.util.except(object, ...keys)","up.util.omit(object, keys)"),up.util.omit(e,u)},up.util.parseUrl=function(...e){return up.migrate.deprecated("up.util.parseUrl()","up.util.parseURL()"),up.util.parseURL(...e)},up.util.any=function(...e){return up.migrate.deprecated("up.util.any()","up.util.some()"),up.util.some(...e)},up.util.all=function(...e){return up.migrate.deprecated("up.util.all()","up.util.every()"),up.util.every(...e)},up.util.detect=function(...e){return up.migrate.deprecated("up.util.detect()","up.util.find()"),up.util.find(...e)},up.util.select=function(...e){return up.migrate.deprecated("up.util.select()","up.util.filter()"),up.util.filter(...e)},up.util.setTimer=function(...e){return up.migrate.deprecated("up.util.setTimer()","up.util.timer()"),up.util.timer(...e)},up.util.escapeHtml=function(...e){return up.migrate.deprecated("up.util.escapeHtml()","up.util.escapeHTML()"),up.util.escapeHTML(...e)},up.util.selectorForElement=function(...e){return up.migrate.deprecated("up.util.selectorForElement()","up.fragment.toTarget()"),up.fragment.toTarget(...e)},up.util.nextFrame=function(...e){return up.migrate.deprecated("up.util.nextFrame()","up.util.task()"),up.util.task(...e)},up.util.times=function(e,u){up.migrate.deprecated("up.util.times()","a `for` loop");for(let t=0;t<e;t++)u()},up.util.assign=function(...e){return up.migrate.deprecated("up.util.assign()","Object.assign()"),Object.assign(...e)},up.util.values=function(...e){return up.migrate.deprecated("up.util.values()","Object.values()"),Object.values(...e)},up.util.microtask=window.queueMicrotask},338:()=>{up.migrate.renamedPackage("layout","viewport"),up.migrate.renamedProperty(up.viewport.config,"viewports","viewportSelectors"),up.migrate.renamedProperty(up.viewport.config,"fixedTop","fixedTopSelectors"),up.migrate.renamedProperty(up.viewport.config,"fixedBottom","fixedBottomSelectors"),up.migrate.renamedProperty(up.viewport.config,"anchoredRight","anchoredRightSelectors"),up.migrate.renamedProperty(up.viewport.config,"snap","revealSnap"),up.migrate.removedProperty(up.viewport.config,"scrollSpeed"),up.viewport.closest=function(...e){return up.migrate.deprecated("up.viewport.closest()","up.viewport.get()"),up.viewport.get(...e)},up.viewport.scroll=function(e,u,t={}){return up.migrate.deprecated("up.scroll()","Element#scrollTo()"),(e=up.fragment.get(e,t)).scrollTo(Object.assign(Object.assign({},t),{top:u})),up.migrate.formerlyAsync("up.scroll()")},up.scroll=up.viewport.scroll}},u={};function t(p){var r=u[p];if(void 0!==r)return r.exports;var o=u[p]={exports:{}};return e[p](o,o.exports,t),o.exports}up.framework.startExtension(),t(992),t(480),t(937),t(294),t(700),t(394),t(771),t(305),t(354),t(234),t(869),t(729),t(969),t(905),t(413),t(69),t(197),t(677),t(885),t(228),t(338),up.framework.stopExtension()})();
|
data/assets/unpoly/unpoly.es6.js
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
/***/ (() => {
|
6
6
|
|
7
7
|
window.up = {
|
8
|
-
version: '3.8.0
|
8
|
+
version: '3.8.0'
|
9
9
|
};
|
10
10
|
|
11
11
|
|
@@ -884,7 +884,9 @@ up.fail = up.error.fail;
|
|
884
884
|
/* 5 */
|
885
885
|
/***/ (() => {
|
886
886
|
|
887
|
-
up.migrate = {
|
887
|
+
up.migrate = {
|
888
|
+
config: {},
|
889
|
+
};
|
888
890
|
|
889
891
|
|
890
892
|
/***/ }),
|
@@ -1220,16 +1222,9 @@ up.element = (function () {
|
|
1220
1222
|
paint(element);
|
1221
1223
|
return undo;
|
1222
1224
|
}
|
1223
|
-
function hasCSSTransition(
|
1224
|
-
|
1225
|
-
|
1226
|
-
styleHash = elementOrStyleHash;
|
1227
|
-
}
|
1228
|
-
else {
|
1229
|
-
styleHash = computedStyle(elementOrStyleHash);
|
1230
|
-
}
|
1231
|
-
const prop = styleHash.transitionProperty;
|
1232
|
-
const duration = styleHash.transitionDuration;
|
1225
|
+
function hasCSSTransition(styleHash) {
|
1226
|
+
const prop = styleHash['transition-property'];
|
1227
|
+
const duration = styleHash['transition-duration'];
|
1233
1228
|
const noTransition = ((prop === 'none') || ((prop === 'all') && (duration === 0)));
|
1234
1229
|
return !noTransition;
|
1235
1230
|
}
|
@@ -1238,8 +1233,8 @@ up.element = (function () {
|
|
1238
1233
|
element.style.position = 'absolute';
|
1239
1234
|
const offsetParentRect = element.offsetParent.getBoundingClientRect();
|
1240
1235
|
setInlineStyle(element, {
|
1241
|
-
left: elementRectAsFixed.left - computedStyleNumber(element, 'margin-left') - offsetParentRect.left,
|
1242
|
-
top: elementRectAsFixed.top - computedStyleNumber(element, 'margin-top') - offsetParentRect.top,
|
1236
|
+
left: (elementRectAsFixed.left - computedStyleNumber(element, 'margin-left') - offsetParentRect.left) + 'px',
|
1237
|
+
top: (elementRectAsFixed.top - computedStyleNumber(element, 'margin-top') - offsetParentRect.top) + 'px',
|
1243
1238
|
right: '',
|
1244
1239
|
bottom: ''
|
1245
1240
|
});
|
@@ -1360,7 +1355,7 @@ up.element = (function () {
|
|
1360
1355
|
}
|
1361
1356
|
function computedStyleNumber(element, prop) {
|
1362
1357
|
const rawValue = computedStyle(element, prop);
|
1363
|
-
if (u.
|
1358
|
+
if (u.isPresent(rawValue)) {
|
1364
1359
|
return parseFloat(rawValue);
|
1365
1360
|
}
|
1366
1361
|
}
|
@@ -1369,14 +1364,18 @@ up.element = (function () {
|
|
1369
1364
|
return extractFromStyleObject(style, props);
|
1370
1365
|
}
|
1371
1366
|
function extractFromStyleObject(style, keyOrKeys) {
|
1367
|
+
if (up.migrate.loaded)
|
1368
|
+
keyOrKeys = up.migrate.fixStyleProps(keyOrKeys);
|
1372
1369
|
if (u.isString(keyOrKeys)) {
|
1373
|
-
return style
|
1370
|
+
return style.getPropertyValue(keyOrKeys);
|
1374
1371
|
}
|
1375
1372
|
else {
|
1376
|
-
return u.
|
1373
|
+
return u.mapObject(keyOrKeys, (key) => [key, style.getPropertyValue(key)]);
|
1377
1374
|
}
|
1378
1375
|
}
|
1379
|
-
function setInlineStyle(element, props) {
|
1376
|
+
function setInlineStyle(element, props, unit = '') {
|
1377
|
+
if (up.migrate.loaded)
|
1378
|
+
props = up.migrate.fixStyleProps(props, unit);
|
1380
1379
|
if (u.isString(props)) {
|
1381
1380
|
element.setAttribute('style', props);
|
1382
1381
|
}
|
@@ -1384,37 +1383,10 @@ up.element = (function () {
|
|
1384
1383
|
const { style } = element;
|
1385
1384
|
for (let key in props) {
|
1386
1385
|
let value = props[key];
|
1387
|
-
|
1388
|
-
style[key] = value;
|
1386
|
+
style.setProperty(key, value + unit);
|
1389
1387
|
}
|
1390
1388
|
}
|
1391
1389
|
}
|
1392
|
-
function normalizeStyleValueForWrite(key, value) {
|
1393
|
-
if (u.isMissing(value)) {
|
1394
|
-
value = '';
|
1395
|
-
}
|
1396
|
-
else if (CSS_LENGTH_PROPS.has(key.toLowerCase().replace(/-/, ''))) {
|
1397
|
-
value = cssLength(value);
|
1398
|
-
}
|
1399
|
-
return value;
|
1400
|
-
}
|
1401
|
-
const CSS_LENGTH_PROPS = new Set([
|
1402
|
-
'top', 'right', 'bottom', 'left',
|
1403
|
-
'padding', 'paddingtop', 'paddingright', 'paddingbottom', 'paddingleft',
|
1404
|
-
'margin', 'margintop', 'marginright', 'marginbottom', 'marginleft',
|
1405
|
-
'borderwidth', 'bordertopwidth', 'borderrightwidth', 'borderbottomwidth', 'borderleftwidth',
|
1406
|
-
'width', 'height',
|
1407
|
-
'maxwidth', 'maxheight',
|
1408
|
-
'minwidth', 'minheight',
|
1409
|
-
]);
|
1410
|
-
function cssLength(obj) {
|
1411
|
-
if (u.isNumber(obj) || (u.isString(obj) && /^\d+$/.test(obj))) {
|
1412
|
-
return obj.toString() + "px";
|
1413
|
-
}
|
1414
|
-
else {
|
1415
|
-
return obj;
|
1416
|
-
}
|
1417
|
-
}
|
1418
1390
|
function isVisible(element) {
|
1419
1391
|
return !!(element.offsetWidth || element.offsetHeight || element.getClientRects().length);
|
1420
1392
|
}
|
@@ -1825,6 +1797,7 @@ up.BodyShifter = class BodyShifter {
|
|
1825
1797
|
constructor() {
|
1826
1798
|
this._anchoredElements = new Set();
|
1827
1799
|
this._stack = 0;
|
1800
|
+
this._cleaners = [];
|
1828
1801
|
}
|
1829
1802
|
lowerStack() {
|
1830
1803
|
if (--this._stack === 0)
|
@@ -1844,7 +1817,9 @@ up.BodyShifter = class BodyShifter {
|
|
1844
1817
|
}
|
1845
1818
|
_shiftNow() {
|
1846
1819
|
this._rootScrollbarWidth = up.viewport.rootScrollbarWidth();
|
1847
|
-
|
1820
|
+
this._cleaners.push(e.setTemporaryStyle(e.root, {
|
1821
|
+
'--up-scrollbar-width': this._rootScrollbarWidth + 'px'
|
1822
|
+
}));
|
1848
1823
|
this._shiftElement(document.body, 'padding-right');
|
1849
1824
|
for (let element of this._anchoredElements) {
|
1850
1825
|
this._shiftElement(element, 'right');
|
@@ -1854,12 +1829,12 @@ up.BodyShifter = class BodyShifter {
|
|
1854
1829
|
if (!this._isShifted())
|
1855
1830
|
return;
|
1856
1831
|
let originalValue = e.style(element, styleProp);
|
1857
|
-
|
1858
|
-
element.classList.add(SHIFT_CLASS);
|
1832
|
+
this._cleaners.push(e.setTemporaryStyle(e.root, { ['--up-original-' + styleProp]: originalValue }), e.addTemporaryClass(element, SHIFT_CLASS));
|
1859
1833
|
}
|
1860
1834
|
_unshiftNow() {
|
1861
|
-
|
1862
|
-
|
1835
|
+
let cleaner;
|
1836
|
+
while (cleaner = this._cleaners.pop()) {
|
1837
|
+
cleaner();
|
1863
1838
|
}
|
1864
1839
|
}
|
1865
1840
|
};
|
@@ -3241,20 +3216,17 @@ up.CompilerPass = class CompilerPass {
|
|
3241
3216
|
const u = up.util;
|
3242
3217
|
const e = up.element;
|
3243
3218
|
up.CSSTransition = class CSSTransition {
|
3244
|
-
constructor(element,
|
3219
|
+
constructor(element, lastFrame, options) {
|
3245
3220
|
this._element = element;
|
3246
|
-
this.
|
3247
|
-
this.
|
3248
|
-
if (u.some(this._lastFrameKeysKebab, key => key.match(/A-Z/))) {
|
3249
|
-
up.fail('Animation keys must be kebab-case');
|
3250
|
-
}
|
3221
|
+
this._lastFrame = lastFrame;
|
3222
|
+
this._lastFrameKeys = Object.keys(this._lastFrame);
|
3251
3223
|
this._finishEvent = options.finishEvent;
|
3252
3224
|
this._duration = options.duration;
|
3253
3225
|
this._easing = options.easing;
|
3254
3226
|
this._finished = false;
|
3255
3227
|
}
|
3256
3228
|
start() {
|
3257
|
-
if (this.
|
3229
|
+
if (this._lastFrameKeys.length === 0) {
|
3258
3230
|
this._finished = true;
|
3259
3231
|
return Promise.resolve();
|
3260
3232
|
}
|
@@ -3278,9 +3250,7 @@ up.CSSTransition = class CSSTransition {
|
|
3278
3250
|
}
|
3279
3251
|
_startFallbackTimer() {
|
3280
3252
|
const timingTolerance = 100;
|
3281
|
-
this._fallbackTimer = u.timer((this._duration + timingTolerance), () =>
|
3282
|
-
this._finish();
|
3283
|
-
});
|
3253
|
+
this._fallbackTimer = u.timer((this._duration + timingTolerance), () => this._finish());
|
3284
3254
|
}
|
3285
3255
|
_stopFallbackTimer() {
|
3286
3256
|
clearTimeout(this._fallbackTimer);
|
@@ -3296,11 +3266,10 @@ up.CSSTransition = class CSSTransition {
|
|
3296
3266
|
if (elapsed <= (0.25 * this._duration)) {
|
3297
3267
|
return;
|
3298
3268
|
}
|
3299
|
-
const
|
3300
|
-
if (
|
3301
|
-
|
3269
|
+
const completedProperty = event.propertyName;
|
3270
|
+
if (u.contains(this._lastFrameKeys, completedProperty)) {
|
3271
|
+
this._finish();
|
3302
3272
|
}
|
3303
|
-
this._finish();
|
3304
3273
|
}
|
3305
3274
|
_finish() {
|
3306
3275
|
var _a, _b;
|
@@ -3317,16 +3286,16 @@ up.CSSTransition = class CSSTransition {
|
|
3317
3286
|
}
|
3318
3287
|
_pauseOldTransition() {
|
3319
3288
|
const oldTransition = e.style(this._element, [
|
3320
|
-
'
|
3321
|
-
'
|
3322
|
-
'
|
3323
|
-
'
|
3289
|
+
'transition-property',
|
3290
|
+
'transition-duration',
|
3291
|
+
'transition-delay',
|
3292
|
+
'transition-timing-function'
|
3324
3293
|
]);
|
3325
3294
|
if (e.hasCSSTransition(oldTransition)) {
|
3326
|
-
if (oldTransition
|
3327
|
-
const oldTransitionProperties = oldTransition.
|
3328
|
-
const
|
3329
|
-
this._setOldTransitionTargetFrame = e.setTemporaryStyle(this._element,
|
3295
|
+
if (oldTransition['transition-property'] !== 'all') {
|
3296
|
+
const oldTransitionProperties = oldTransition['transition-property'].split(/\s*,\s*/);
|
3297
|
+
const oldTransitionFrame = e.style(this._element, oldTransitionProperties);
|
3298
|
+
this._setOldTransitionTargetFrame = e.setTemporaryStyle(this._element, oldTransitionFrame);
|
3330
3299
|
}
|
3331
3300
|
this._setOldTransition = e.concludeCSSTransition(this._element);
|
3332
3301
|
}
|
@@ -3338,11 +3307,11 @@ up.CSSTransition = class CSSTransition {
|
|
3338
3307
|
}
|
3339
3308
|
_startMotion() {
|
3340
3309
|
e.setStyle(this._element, {
|
3341
|
-
|
3342
|
-
|
3343
|
-
|
3310
|
+
'transition-property': this._lastFrameKeys.join(),
|
3311
|
+
'transition-duration': `${this._duration}ms`,
|
3312
|
+
'transition-timing-function': this._easing
|
3344
3313
|
});
|
3345
|
-
e.setStyle(this._element, this.
|
3314
|
+
e.setStyle(this._element, this._lastFrame);
|
3346
3315
|
}
|
3347
3316
|
};
|
3348
3317
|
|
@@ -7390,10 +7359,10 @@ up.Tether = class Tether {
|
|
7390
7359
|
sync() {
|
7391
7360
|
const elementBox = this._element.getBoundingClientRect();
|
7392
7361
|
const elementMargin = {
|
7393
|
-
top: e.styleNumber(this._element, '
|
7394
|
-
right: e.styleNumber(this._element, '
|
7395
|
-
bottom: e.styleNumber(this._element, '
|
7396
|
-
left: e.styleNumber(this._element, '
|
7362
|
+
top: e.styleNumber(this._element, 'margin-top'),
|
7363
|
+
right: e.styleNumber(this._element, 'margin-right'),
|
7364
|
+
bottom: e.styleNumber(this._element, 'margin-bottom'),
|
7365
|
+
left: e.styleNumber(this._element, 'margin-left')
|
7397
7366
|
};
|
7398
7367
|
const anchorBox = this._anchor.getBoundingClientRect();
|
7399
7368
|
let left;
|
@@ -7461,7 +7430,7 @@ up.Tether = class Tether {
|
|
7461
7430
|
_setOffset(left, top) {
|
7462
7431
|
this.offsetLeft = left;
|
7463
7432
|
this.offsetTop = top;
|
7464
|
-
e.setStyle(this._element, { left, top });
|
7433
|
+
e.setStyle(this._element, { left, top }, 'px');
|
7465
7434
|
}
|
7466
7435
|
};
|
7467
7436
|
|
@@ -8254,10 +8223,8 @@ up.history = (function () {
|
|
8254
8223
|
return;
|
8255
8224
|
}
|
8256
8225
|
let location = currentLocation();
|
8257
|
-
if (up.emit('up:location:restore', { location, log: `Restoring location ${location}` }).defaultPrevented) {
|
8258
|
-
return;
|
8259
|
-
}
|
8260
8226
|
up.render({
|
8227
|
+
guardEvent: up.event.build('up:location:restore', { location, log: `Restoring location ${location}` }),
|
8261
8228
|
url: location,
|
8262
8229
|
target: config.restoreTargets,
|
8263
8230
|
fail: false,
|
@@ -8265,7 +8232,8 @@ up.history = (function () {
|
|
8265
8232
|
location,
|
8266
8233
|
peel: true,
|
8267
8234
|
layer: 'root',
|
8268
|
-
cache:
|
8235
|
+
cache: 'auto',
|
8236
|
+
revalidate: 'auto',
|
8269
8237
|
saveScroll: false,
|
8270
8238
|
scroll: ['restore', 'auto'],
|
8271
8239
|
saveFocus: false,
|
@@ -9128,7 +9096,7 @@ up.viewport = (function () {
|
|
9128
9096
|
const moveBounds = function (diffX, diffY) {
|
9129
9097
|
boundsRect.left += diffX;
|
9130
9098
|
boundsRect.top += diffY;
|
9131
|
-
return e.setStyle(bounds, boundsRect);
|
9099
|
+
return e.setStyle(bounds, boundsRect, 'px');
|
9132
9100
|
};
|
9133
9101
|
moveBounds(0, 0);
|
9134
9102
|
const newElementRect = element.getBoundingClientRect();
|
@@ -9275,6 +9243,8 @@ up.motion = (function () {
|
|
9275
9243
|
return Promise.resolve();
|
9276
9244
|
}
|
9277
9245
|
function animateNow(element, lastFrame, options) {
|
9246
|
+
if (up.migrate.loaded)
|
9247
|
+
lastFrame = up.migrate.fixStyleProps(lastFrame);
|
9278
9248
|
options = Object.assign(Object.assign({}, options), { finishEvent: motionController.finishEvent });
|
9279
9249
|
const cssTransition = new up.CSSTransition(element, lastFrame, options);
|
9280
9250
|
return cssTransition.start();
|
@@ -9432,7 +9402,7 @@ up.motion = (function () {
|
|
9432
9402
|
return { transform: `translate(${dx}px, ${dy}px)` };
|
9433
9403
|
}
|
9434
9404
|
function noTranslateCSS() {
|
9435
|
-
return { transform:
|
9405
|
+
return { transform: '' };
|
9436
9406
|
}
|
9437
9407
|
function untranslatedBox(element) {
|
9438
9408
|
e.setStyle(element, noTranslateCSS());
|