unpoly-rails 3.0.0.rc2 → 3.0.0.rc3
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 +46 -13
- data/assets/unpoly/unpoly-migrate.min.js +1 -1
- data/assets/unpoly/unpoly.es6.js +373 -327
- data/assets/unpoly/unpoly.es6.min.js +1 -1
- data/assets/unpoly/unpoly.js +356 -326
- data/assets/unpoly/unpoly.min.js +1 -1
- data/lib/unpoly/rails/change/field.rb +4 -4
- data/lib/unpoly/rails/change/layer.rb +3 -3
- data/lib/unpoly/rails/change.rb +1 -1
- data/lib/unpoly/rails/request_echo_headers.rb +6 -2
- data/lib/unpoly/rails/util.rb +25 -0
- data/lib/unpoly/rails/version.rb +1 -1
- data/lib/unpoly-rails.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de8f088d5834dc9173f8d21f9e94d8fa297b7c8eabfe423e2441bc182da36499
|
4
|
+
data.tar.gz: dccf743d250036a656cd461553c301ab510b2da0a4dff27a5832116061c7526c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13edf900a62d337fafc2771e0ef6daeb499b4e9b3824c263c26b7cdc52914c8c6386283927f3aaabaece33a239ef66571d0b7341a4f4f54079ae4db36d29c3ba
|
7
|
+
data.tar.gz: 456ec9dc4a93e19a19a7a143f6aa82f606bbd9e65011c1f7a42f77a36d95889a0ff402465eb72f3048d4282055cae9b7ba7b7c77267ad7329a9aa4fd23599b40
|
@@ -9,29 +9,44 @@ up.migrate = (function () {
|
|
9
9
|
const config = new up.Config(() => ({
|
10
10
|
logLevel: 'warn'
|
11
11
|
}));
|
12
|
-
function renamedProperty(object, oldKey, newKey) {
|
13
|
-
const
|
12
|
+
function renamedProperty(object, oldKey, newKey, warning) {
|
13
|
+
const doWarn = u.memoize(() => warning ? warn(warning) : warn('Property { %s } has been renamed to { %s } (found in %o)', oldKey, newKey, object));
|
14
14
|
Object.defineProperty(object, oldKey, {
|
15
15
|
get() {
|
16
|
-
|
16
|
+
doWarn();
|
17
17
|
return this[newKey];
|
18
18
|
},
|
19
19
|
set(newValue) {
|
20
|
-
|
20
|
+
doWarn();
|
21
21
|
this[newKey] = newValue;
|
22
22
|
}
|
23
23
|
});
|
24
24
|
}
|
25
|
-
function removedProperty(object, key) {
|
26
|
-
const
|
25
|
+
function removedProperty(object, key, warning) {
|
26
|
+
const doWarn = u.memoize(() => warning ? warn(warning) : warn('Property { %s } has been removed without replacement (found in %o)', key, object));
|
27
|
+
let value = object[key];
|
27
28
|
Object.defineProperty(object, key, {
|
28
29
|
get() {
|
29
|
-
|
30
|
-
return
|
30
|
+
doWarn();
|
31
|
+
return value;
|
31
32
|
},
|
32
33
|
set(newValue) {
|
33
|
-
|
34
|
-
|
34
|
+
doWarn();
|
35
|
+
value = newValue;
|
36
|
+
}
|
37
|
+
});
|
38
|
+
}
|
39
|
+
function forbiddenPropertyValue(object, key, forbiddenValue, errorMessage) {
|
40
|
+
let value = object[key];
|
41
|
+
Object.defineProperty(object, key, {
|
42
|
+
get() {
|
43
|
+
return value;
|
44
|
+
},
|
45
|
+
set(newValue) {
|
46
|
+
if (newValue === forbiddenValue) {
|
47
|
+
throw new Error(errorMessage);
|
48
|
+
}
|
49
|
+
value = newValue;
|
35
50
|
}
|
36
51
|
});
|
37
52
|
}
|
@@ -122,6 +137,7 @@ up.migrate = (function () {
|
|
122
137
|
renamedPackage,
|
123
138
|
renamedProperty,
|
124
139
|
removedProperty,
|
140
|
+
forbiddenPropertyValue,
|
125
141
|
renamedAttribute,
|
126
142
|
formerlyAsync,
|
127
143
|
renamedEvent,
|
@@ -422,11 +438,12 @@ up.migrate.preprocessRenderOptions = function (options) {
|
|
422
438
|
options.abort = (options) => { up.network.abort(solo, options); };
|
423
439
|
}
|
424
440
|
else if (solo === true) {
|
425
|
-
up.migrate.
|
441
|
+
up.migrate.deprecated('Option { solo: true }', "{ abort: 'all' }");
|
426
442
|
options.abort = 'all';
|
427
443
|
}
|
428
444
|
else if (solo === false) {
|
429
|
-
up.migrate.
|
445
|
+
up.migrate.deprecated('Option { solo: false }', "{ abort: false }");
|
446
|
+
up.migrate.warn('Unpoly 3+ only aborts requests targeting the same fragment. Setting [up-solo=false] or { solo: false } may no longer be necessary.');
|
430
447
|
options.abort = false;
|
431
448
|
}
|
432
449
|
up.migrate.fixKey(options, 'keep', 'useKeep');
|
@@ -743,6 +760,18 @@ up.migrate.clearCacheFromXHR = function (xhr) {
|
|
743
760
|
}
|
744
761
|
}
|
745
762
|
};
|
763
|
+
up.migrate.titleFromXHR = function (xhr) {
|
764
|
+
let value = xhr.getResponseHeader('X-Up-Title');
|
765
|
+
if (value) {
|
766
|
+
if (value === 'false') {
|
767
|
+
return false;
|
768
|
+
}
|
769
|
+
else if (value[0] !== '"') {
|
770
|
+
up.migrate.warn('X-Up-Title must now be a JSON-encoded string');
|
771
|
+
return value;
|
772
|
+
}
|
773
|
+
}
|
774
|
+
};
|
746
775
|
|
747
776
|
|
748
777
|
/***/ }),
|
@@ -774,8 +803,11 @@ Object.defineProperty(up.network.config, 'preloadDelay', {
|
|
774
803
|
});
|
775
804
|
up.migrate.renamedProperty(up.network.config, 'maxRequests', 'concurrency');
|
776
805
|
up.migrate.renamedProperty(up.network.config, 'slowDelay', 'badResponseTime');
|
777
|
-
up.migrate.renamedProperty(up.network.config, 'cacheExpiry', 'cacheExpireAge');
|
806
|
+
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.');
|
778
807
|
up.migrate.renamedProperty(up.network.config, 'clearCache', 'expireCache');
|
808
|
+
up.migrate.forbiddenPropertyValue(up.network.config, 'cacheSize', 0, 'Disabling the cache with up.network.config.cacheSize = 0 is no longer supported. To disable caching, set up.fragment.config.navigateOptions.cache = false instead.');
|
809
|
+
up.network.config.requestMetaKeys = [];
|
810
|
+
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.');
|
779
811
|
up.migrate.handleRequestOptions = function (options) {
|
780
812
|
up.migrate.fixKey(options, 'clearCache', 'expireCache');
|
781
813
|
if (options.solo) {
|
@@ -813,6 +845,7 @@ up.Request.prototype.navigate = function () {
|
|
813
845
|
up.migrate.deprecated('up.Request#navigate()', 'up.Request#loadPage()');
|
814
846
|
this.loadPage();
|
815
847
|
};
|
848
|
+
up.migrate.renamedProperty(up.Request.prototype, 'preload', 'background');
|
816
849
|
up.Response.prototype.isSuccess = function () {
|
817
850
|
up.migrate.deprecated('up.Response#isSuccess()', 'up.Response#ok');
|
818
851
|
return this.ok;
|
@@ -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,t){return up.migrate.deprecated("up.element.matches()","Element#matches()"),e.matches(t)},up.element.closest=function(e,t){return up.migrate.deprecated("up.element.closest()","Element#closest()"),e.closest(t)},up.element.replace=function(e,t){return up.migrate.deprecated("up.element.replace()","Element#replaceWith()"),e.replaceWith(t)},up.element.all=function(...e){up.migrate.deprecated("up.element.all()","Document#querySelectorAll() or Element#querySelectorAll()");const t=e.pop();return(e[0]||document).querySelectorAll(t)},up.element.toggleClass=function(e,t,r){const p=e.classList;return null==r&&(r=!p.contains(t)),r?p.add(t):p.remove(t)},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()","element.isConnected"),e.isConnected},up.element.isDetached=function(e){return up.migrate.deprecated("up.element.isDetached()","!element.isConnected"),!e.isConnected}},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){let t=e.pop();up.on(...e,(function(e,r,p){let a=jQuery(r);t.call(a,e,a,p)}))},up.$off=up.event.off},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 t=e.replace(/:has\(:origin\)$/,"");return e!==t&&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),t}))},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.migrate.renamedAttribute("up-restore-scroll","up-scroll",{mapValue:e=>"true"===e?"restore":"reset"}),up.observe=function(...e){if(up.migrate.deprecated("up.observe()","up.watch()"),up.util.isList(e[0])&&e[0].length>1){let t=e.shift();up.migrate.warn("Calling up.observe() with a list of multiple elements is no longer supported by up.watch()");let r=up.util.map(t,(t=>up.watch(t,...e)));return up.util.sequence(r)}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"),up.replace=function(e,t,r){return up.migrate.deprecated("up.replace(target, url)","up.navigate(target, { url })"),up.navigate(Object.assign(Object.assign({},r),{target:e,url:t}))},up.extract=function(e,t,r){return up.migrate.deprecated("up.extract(target, document)","up.navigate(target, { document })"),up.navigate(Object.assign(Object.assign({},r),{target:e,document:t}))},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(t){e.isString(t.history)&&"auto"!==t.history&&(up.migrate.warn("Passing a URL as { history } option is deprecated. Pass it as { location } instead."),t.location=t.history,t.history="auto");for(let r of["target","origin"])e.isJQuery(t[r])&&(up.migrate.warn("Passing a jQuery collection as { %s } is deprecated. Pass it as a native element instead.",r),t[r]=up.element.get(t[r]));"auto"===t.fail&&(up.migrate.warn("The option { fail: 'auto' } is deprecated. Omit the option instead."),delete t.fail);let r=e.pluckKey(t,"solo");e.isString(r)?(up.migrate.warn("The up.render() option { solo } has been replaced by { abort } and { abort } no longer accepts a URL pattern. Check if you can use { abort: 'target'} or use up.network.abort(pattern) instead."),t.abort=e=>up.network.abort(r,e)):e.isFunction(r)?(up.migrate.warn("The up.render() option { solo } has been replaced by { 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."),t.abort=e=>{up.network.abort(r,e)}):!0===r?(up.migrate.warn("Option { solo: true }","{ abort: 'all' }"),t.abort="all"):!1===r&&(up.migrate.warn("Option { solo: false }","{ abort: false }"),t.abort=!1),up.migrate.fixKey(t,"keep","useKeep"),up.migrate.fixKey(t,"hungry","useHungry"),up.migrate.fixKey(t,"failOnFinished","onFailFinished"),e.isString(t.reveal)?(up.migrate.deprecated(`Option { reveal: '${t.reveal}' }`,`{ scroll: '${t.reveal}' }`),t.scroll=t.reveal):!0===t.reveal?(up.migrate.deprecated("Option { reveal: true }","{ scroll: 'target' }"),t.scroll="target"):!1===t.reveal&&(up.migrate.deprecated("Option { reveal: false }","{ scroll: false }"),t.scroll=!1),e.isDefined(t.resetScroll)&&(up.migrate.deprecated("Option { resetScroll: true }","{ scroll: 'reset' }"),t.scroll="teset"),e.isDefined(t.restoreScroll)&&(up.migrate.deprecated("Option { restoreScroll: true }","{ scroll: 'restore' }"),t.scroll="restore")},up.migrate.postprocessReloadOptions=function(e){var t;let r,p=null===(t=e.headers)||void 0===t?void 0:t["If-Modified-Since"];r=p?Math.floor(.001*new Date(p)).toString():"0",e.headers[up.protocol.headerize("reloadFromTime")]=r};const t=/\[([\w-]+)(?:([~|^$*]?=)(["'])?([^\3\]]*?)\3)?]/g;up.migrate.resolveOrigin=function(e,{origin:r}={}){let p=new RegExp(t.source+"|&|:origin\\b","g");return e.replace(p,(function(t){return":origin"!==t&&"&"!==t?t:("&"===t&&up.migrate.deprecated("Origin shorthand '&'",":origin"),r?up.fragment.toTarget(r):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 r=up.fragment.config.runScripts,p=!1;Object.defineProperty(up.fragment.config,"runScripts",{get:()=>r,set(e){r=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(t){let r=up.element.booleanOrStringAttr(t,"up-keep");e.isString(r)&&(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(t,"up-on-keep",`if (!newFragment.matches(${JSON.stringify(r)})) event.preventDefault()`),t.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")},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 t of["width","maxWidth","height"])e[t]&&up.migrate.warn(`Layer option { ${t} } 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[t,r]=e.position.split("-");r&&(up.migrate.warn("The position value %o is deprecated. Use %o instead.",e.position,{position:t,align:r}),e.position=t,e.align=r)},up.migrate.registerLayerCloser=e=>e.registerClickCloser("up-close",((t,r)=>{up.migrate.deprecated("[up-close]","[up-dismiss]"),e.dismiss(t,r)})),up.migrate.handleLayerConfig=e=>up.migrate.fixKey(e,"historyVisible","history"),up.util.getter(up.Layer.prototype,"historyVisible",(function(){return up.migrate.deprecated("up.Layer#historyVisible","up.Layer#history"),this.history}))},969:()=>{up.migrate.parseFollowOptions=function(e){e.string("flavor"),e.string("width"),e.string("height"),e.boolean("closable"),e.booleanOrString("solo"),e.booleanOrString("reveal"),e.boolean("resetScroll"),e.boolean("restoreScroll"),e.booleanOrString("historyVisible"),e.booleanOrString("clearCache")},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:up.link.preloadSelector})},992:()=>{const e=up.util;up.migrate=function(){const t=new up.Config((()=>({logLevel:"warn"}))),r={},p={};function a(e){let t=r[e];if(t)return n(`Event ${e} has been renamed to ${t}`),t;if(e in p){let t=`Event ${e} has been removed`,r=p[e];return r&&(t+=`. Use ${r} instead.`),n(t),e}return e}const u={};function n(r,...p){const a=e.sprintf(r,...p);u[a]||(u[a]=!0,up.log[t.logLevel]("unpoly-migrate",r,...p))}return up.on("up:framework:reset",(function(){t.reset()})),{deprecated:function(e,t){n(`${e} has been deprecated. Use ${t} instead.`)},renamedPackage:function(e,t){Object.defineProperty(up,e,{get:()=>(n(`up.${e} has been renamed to up.${t}`),up[t])})},renamedProperty:function(e,t,r){const p=()=>n("Property { %s } has been renamed to { %s } (found in %o)",t,r,e);Object.defineProperty(e,t,{get(){return p(),this[r]},set(e){p(),this[r]=e}})},removedProperty:function(e,t){const r=()=>n("Property { %s } has been removed without replacement (found in %o)",t,e);Object.defineProperty(e,t,{get(){return r(),this[t]},set(e){r(),this[t]=e}})},renamedAttribute:function(e,t,{scope:r,mapValue:p}={}){let a=r||`[${e}]`;up.macro(a,{priority:-1e3},(function(r){if(r.hasAttribute(e)){n("Attribute [%s] has been renamed to [%s] (found in %o)",e,t,r);let a=r.getAttribute(e);p&&(a=p(a)),r.setAttribute(t,a),r.removeAttribute(e)}}))},formerlyAsync:function(e){const t=Promise.resolve(),r=t.then;return t.then=function(){return n(`${e} no longer returns a promise`),r.apply(this,arguments)},t},renamedEvent:function(e,t){r[e]=t},removedEvent:function(e,t=null){p[e]=t},fixEventTypes:function(t){return e.uniq(e.map(t,a))},fixKey:function(t,r,p){e.isDefined(t[r])&&(n("Property { %s } has been renamed to { %s } (found in %o)",r,p,t),e.renameKey(t,r,p))},warn:n,loaded:!0,config:t}}()},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,t={})=>(up.migrate.deprecated("up.modal.visit(url)",'up.layer.open({ url, mode: "modal" })'),up.layer.open(Object.assign(Object.assign({},t),{url:e,mode:"modal"}))),follow:(e,t={})=>(up.migrate.deprecated("up.modal.follow(link)",'up.follow(link, { layer: "modal" })'),up.follow(e,Object.assign(Object.assign({},t),{layer:"modal"}))),extract:(e,t,r={})=>(up.migrate.deprecated("up.modal.extract(target, document)",'up.layer.open({ document, mode: "modal" })'),up.layer.open(Object.assign(Object.assign({},r),{target:e,html:t,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 t=()=>up.migrate.deprecated("up.proxy.config.preloadDelay","up.link.config.preloadDelay");Object.defineProperty(up.network.config,"preloadDelay",{get:()=>(t(),up.link.config.preloadDelay),set(e){t(),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"),up.migrate.renamedProperty(up.network.config,"clearCache","expireCache"),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(t){2===t.length&&e.isString(t[1])&&(up.migrate.warn("up.network.abort() no longer takes a reason as a second argument. Pass it as { reason } option instead."),t[1]={reason:t[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.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 r=up.network.config.progressBar;function p(){up.network.config.progressBar=function(){return function(){const t=up.EventListener.allNonDefault(document);return e.find(t,(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):r}}p(),up.on("up:framework:reset",p)},69:()=>{up.popup={attach:(e,t={})=>(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({},t),{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 t=e.getResponseHeader("X-Up-Clear-Cache");if(t)return up.migrate.deprecated("X-Up-Clear-Cache","X-Up-Expire-Cache"),"false"!==t&&t}},228:()=>{up.migrate.renamedProperty(up.radio.config,"hungry","hungrySelectors")},629:()=>{const e=up.util,t=up.element;up.migrate.postCompile=function(t,r){let p;if(p=r.keep){up.migrate.warn("The { keep: true } option for up.compiler() has been removed. Have the compiler set [up-keep] attribute instead.");const r=e.isString(p)?p:"";for(let e of t)e.setAttribute("up-keep",r)}},up.migrate.targetMacro=function(r,p,a){up.macro(`[${r}]`,(function(u){let n;const o=e.copy(p);(n=u.getAttribute(r))?o["up-target"]=n:o["up-follow"]="",t.setMissingAttrs(u,o),u.removeAttribute(r),null==a||a()}))},up.$compiler=function(e,...t){let r=t.pop();up.compiler(...t,(function(e,...t){let p=jQuery(e);return r(p,...t)}))},up.$macro=function(e,...t){let r=t.pop();up.macro(...t,(function(e,...t){let p=jQuery(e);return r(p,...t)}))}},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,...t){return up.migrate.deprecated("up.util.only(object, ...keys)","up.util.pick(object, keys)"),up.util.pick(e,t)},up.util.except=function(e,...t){return up.migrate.deprecated("up.util.except(object, ...keys)","up.util.omit(object, keys)"),up.util.omit(e,t)},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,t){up.migrate.deprecated("up.util.times()","a `for` loop");for(let r=0;r<e;r++)t()},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)}},338:()=>{up.migrate.renamedPackage("layout","viewport"),up.migrate.renamedProperty(up.viewport.config,"viewports","viewportSelectors"),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,t,r={}){return(e=up.fragment.get(e,r)).scrollTo(Object.assign(Object.assign({},r),{top:t})),up.migrate.formerlyAsync("up.scroll()")},up.scroll=up.viewport.scroll}},t={};function r(p){var a=t[p];if(void 0!==a)return a.exports;var u=t[p]={exports:{}};return e[p](u,u.exports,r),u.exports}up.framework.startExtension(),r(992),r(480),r(294),r(700),r(394),r(629),r(305),r(354),r(234),r(869),r(729),r(969),r(905),r(413),r(69),r(197),r(677),r(885),r(228),r(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,t){return up.migrate.deprecated("up.element.matches()","Element#matches()"),e.matches(t)},up.element.closest=function(e,t){return up.migrate.deprecated("up.element.closest()","Element#closest()"),e.closest(t)},up.element.replace=function(e,t){return up.migrate.deprecated("up.element.replace()","Element#replaceWith()"),e.replaceWith(t)},up.element.all=function(...e){up.migrate.deprecated("up.element.all()","Document#querySelectorAll() or Element#querySelectorAll()");const t=e.pop();return(e[0]||document).querySelectorAll(t)},up.element.toggleClass=function(e,t,r){const a=e.classList;return null==r&&(r=!a.contains(t)),r?a.add(t):a.remove(t)},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()","element.isConnected"),e.isConnected},up.element.isDetached=function(e){return up.migrate.deprecated("up.element.isDetached()","!element.isConnected"),!e.isConnected}},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){let t=e.pop();up.on(...e,(function(e,r,a){let p=jQuery(r);t.call(p,e,p,a)}))},up.$off=up.event.off},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 t=e.replace(/:has\(:origin\)$/,"");return e!==t&&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),t}))},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.migrate.renamedAttribute("up-restore-scroll","up-scroll",{mapValue:e=>"true"===e?"restore":"reset"}),up.observe=function(...e){if(up.migrate.deprecated("up.observe()","up.watch()"),up.util.isList(e[0])&&e[0].length>1){let t=e.shift();up.migrate.warn("Calling up.observe() with a list of multiple elements is no longer supported by up.watch()");let r=up.util.map(t,(t=>up.watch(t,...e)));return up.util.sequence(r)}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"),up.replace=function(e,t,r){return up.migrate.deprecated("up.replace(target, url)","up.navigate(target, { url })"),up.navigate(Object.assign(Object.assign({},r),{target:e,url:t}))},up.extract=function(e,t,r){return up.migrate.deprecated("up.extract(target, document)","up.navigate(target, { document })"),up.navigate(Object.assign(Object.assign({},r),{target:e,document:t}))},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(t){e.isString(t.history)&&"auto"!==t.history&&(up.migrate.warn("Passing a URL as { history } option is deprecated. Pass it as { location } instead."),t.location=t.history,t.history="auto");for(let r of["target","origin"])e.isJQuery(t[r])&&(up.migrate.warn("Passing a jQuery collection as { %s } is deprecated. Pass it as a native element instead.",r),t[r]=up.element.get(t[r]));"auto"===t.fail&&(up.migrate.warn("The option { fail: 'auto' } is deprecated. Omit the option instead."),delete t.fail);let r=e.pluckKey(t,"solo");e.isString(r)?(up.migrate.warn("The up.render() option { solo } has been replaced by { abort } and { abort } no longer accepts a URL pattern. Check if you can use { abort: 'target'} or use up.network.abort(pattern) instead."),t.abort=e=>up.network.abort(r,e)):e.isFunction(r)?(up.migrate.warn("The up.render() option { solo } has been replaced by { 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."),t.abort=e=>{up.network.abort(r,e)}):!0===r?(up.migrate.deprecated("Option { solo: true }","{ abort: 'all' }"),t.abort="all"):!1===r&&(up.migrate.deprecated("Option { solo: false }","{ abort: false }"),up.migrate.warn("Unpoly 3+ only aborts requests targeting the same fragment. Setting [up-solo=false] or { solo: false } may no longer be necessary."),t.abort=!1),up.migrate.fixKey(t,"keep","useKeep"),up.migrate.fixKey(t,"hungry","useHungry"),up.migrate.fixKey(t,"failOnFinished","onFailFinished"),e.isString(t.reveal)?(up.migrate.deprecated(`Option { reveal: '${t.reveal}' }`,`{ scroll: '${t.reveal}' }`),t.scroll=t.reveal):!0===t.reveal?(up.migrate.deprecated("Option { reveal: true }","{ scroll: 'target' }"),t.scroll="target"):!1===t.reveal&&(up.migrate.deprecated("Option { reveal: false }","{ scroll: false }"),t.scroll=!1),e.isDefined(t.resetScroll)&&(up.migrate.deprecated("Option { resetScroll: true }","{ scroll: 'reset' }"),t.scroll="teset"),e.isDefined(t.restoreScroll)&&(up.migrate.deprecated("Option { restoreScroll: true }","{ scroll: 'restore' }"),t.scroll="restore")},up.migrate.postprocessReloadOptions=function(e){var t;let r,a=null===(t=e.headers)||void 0===t?void 0:t["If-Modified-Since"];r=a?Math.floor(.001*new Date(a)).toString():"0",e.headers[up.protocol.headerize("reloadFromTime")]=r};const t=/\[([\w-]+)(?:([~|^$*]?=)(["'])?([^\3\]]*?)\3)?]/g;up.migrate.resolveOrigin=function(e,{origin:r}={}){let a=new RegExp(t.source+"|&|:origin\\b","g");return e.replace(a,(function(t){return":origin"!==t&&"&"!==t?t:("&"===t&&up.migrate.deprecated("Origin shorthand '&'",":origin"),r?up.fragment.toTarget(r):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 r=up.fragment.config.runScripts,a=!1;Object.defineProperty(up.fragment.config,"runScripts",{get:()=>r,set(e){r=e,a=!0}}),up.on("up:framework:boot",(function(){a||up.migrate.warn("Scripts within fragments are now executed. Configure up.fragment.config.runScripts to remove this warning.")})),up.compiler("[up-keep]",(function(t){let r=up.element.booleanOrStringAttr(t,"up-keep");e.isString(r)&&(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(t,"up-on-keep",`if (!newFragment.matches(${JSON.stringify(r)})) event.preventDefault()`),t.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")},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 t of["width","maxWidth","height"])e[t]&&up.migrate.warn(`Layer option { ${t} } 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[t,r]=e.position.split("-");r&&(up.migrate.warn("The position value %o is deprecated. Use %o instead.",e.position,{position:t,align:r}),e.position=t,e.align=r)},up.migrate.registerLayerCloser=e=>e.registerClickCloser("up-close",((t,r)=>{up.migrate.deprecated("[up-close]","[up-dismiss]"),e.dismiss(t,r)})),up.migrate.handleLayerConfig=e=>up.migrate.fixKey(e,"historyVisible","history"),up.util.getter(up.Layer.prototype,"historyVisible",(function(){return up.migrate.deprecated("up.Layer#historyVisible","up.Layer#history"),this.history}))},969:()=>{up.migrate.parseFollowOptions=function(e){e.string("flavor"),e.string("width"),e.string("height"),e.boolean("closable"),e.booleanOrString("solo"),e.booleanOrString("reveal"),e.boolean("resetScroll"),e.boolean("restoreScroll"),e.booleanOrString("historyVisible"),e.booleanOrString("clearCache")},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:up.link.preloadSelector})},992:()=>{const e=up.util;up.migrate=function(){const t=new up.Config((()=>({logLevel:"warn"}))),r={},a={};function p(e){let t=r[e];if(t)return o(`Event ${e} has been renamed to ${t}`),t;if(e in a){let t=`Event ${e} has been removed`,r=a[e];return r&&(t+=`. Use ${r} instead.`),o(t),e}return e}const u={};function o(r,...a){const p=e.sprintf(r,...a);u[p]||(u[p]=!0,up.log[t.logLevel]("unpoly-migrate",r,...a))}return up.on("up:framework:reset",(function(){t.reset()})),{deprecated:function(e,t){o(`${e} has been deprecated. Use ${t} instead.`)},renamedPackage:function(e,t){Object.defineProperty(up,e,{get:()=>(o(`up.${e} has been renamed to up.${t}`),up[t])})},renamedProperty:function(t,r,a,p){const u=e.memoize((()=>p?o(p):o("Property { %s } has been renamed to { %s } (found in %o)",r,a,t)));Object.defineProperty(t,r,{get(){return u(),this[a]},set(e){u(),this[a]=e}})},removedProperty:function(t,r,a){const p=e.memoize((()=>a?o(a):o("Property { %s } has been removed without replacement (found in %o)",r,t)));let u=t[r];Object.defineProperty(t,r,{get:()=>(p(),u),set(e){p(),u=e}})},forbiddenPropertyValue:function(e,t,r,a){let p=e[t];Object.defineProperty(e,t,{get:()=>p,set(e){if(e===r)throw new Error(a);p=e}})},renamedAttribute:function(e,t,{scope:r,mapValue:a}={}){let p=r||`[${e}]`;up.macro(p,{priority:-1e3},(function(r){if(r.hasAttribute(e)){o("Attribute [%s] has been renamed to [%s] (found in %o)",e,t,r);let p=r.getAttribute(e);a&&(p=a(p)),r.setAttribute(t,p),r.removeAttribute(e)}}))},formerlyAsync:function(e){const t=Promise.resolve(),r=t.then;return t.then=function(){return o(`${e} no longer returns a promise`),r.apply(this,arguments)},t},renamedEvent:function(e,t){r[e]=t},removedEvent:function(e,t=null){a[e]=t},fixEventTypes:function(t){return e.uniq(e.map(t,p))},fixKey:function(t,r,a){e.isDefined(t[r])&&(o("Property { %s } has been renamed to { %s } (found in %o)",r,a,t),e.renameKey(t,r,a))},warn:o,loaded:!0,config:t}}()},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,t={})=>(up.migrate.deprecated("up.modal.visit(url)",'up.layer.open({ url, mode: "modal" })'),up.layer.open(Object.assign(Object.assign({},t),{url:e,mode:"modal"}))),follow:(e,t={})=>(up.migrate.deprecated("up.modal.follow(link)",'up.follow(link, { layer: "modal" })'),up.follow(e,Object.assign(Object.assign({},t),{layer:"modal"}))),extract:(e,t,r={})=>(up.migrate.deprecated("up.modal.extract(target, document)",'up.layer.open({ document, mode: "modal" })'),up.layer.open(Object.assign(Object.assign({},r),{target:e,html:t,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 t=()=>up.migrate.deprecated("up.proxy.config.preloadDelay","up.link.config.preloadDelay");Object.defineProperty(up.network.config,"preloadDelay",{get:()=>(t(),up.link.config.preloadDelay),set(e){t(),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 caching, 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(t){2===t.length&&e.isString(t[1])&&(up.migrate.warn("up.network.abort() no longer takes a reason as a second argument. Pass it as { reason } option instead."),t[1]={reason:t[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 r=up.network.config.progressBar;function a(){up.network.config.progressBar=function(){return function(){const t=up.EventListener.allNonDefault(document);return e.find(t,(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):r}}a(),up.on("up:framework:reset",a)},69:()=>{up.popup={attach:(e,t={})=>(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({},t),{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 t=e.getResponseHeader("X-Up-Clear-Cache");if(t)return up.migrate.deprecated("X-Up-Clear-Cache","X-Up-Expire-Cache"),"false"!==t&&t},up.migrate.titleFromXHR=function(e){let t=e.getResponseHeader("X-Up-Title");if(t){if("false"===t)return!1;if('"'!==t[0])return up.migrate.warn("X-Up-Title must now be a JSON-encoded string"),t}}},228:()=>{up.migrate.renamedProperty(up.radio.config,"hungry","hungrySelectors")},629:()=>{const e=up.util,t=up.element;up.migrate.postCompile=function(t,r){let a;if(a=r.keep){up.migrate.warn("The { keep: true } option for up.compiler() has been removed. Have the compiler set [up-keep] attribute instead.");const r=e.isString(a)?a:"";for(let e of t)e.setAttribute("up-keep",r)}},up.migrate.targetMacro=function(r,a,p){up.macro(`[${r}]`,(function(u){let o;const n=e.copy(a);(o=u.getAttribute(r))?n["up-target"]=o:n["up-follow"]="",t.setMissingAttrs(u,n),u.removeAttribute(r),null==p||p()}))},up.$compiler=function(e,...t){let r=t.pop();up.compiler(...t,(function(e,...t){let a=jQuery(e);return r(a,...t)}))},up.$macro=function(e,...t){let r=t.pop();up.macro(...t,(function(e,...t){let a=jQuery(e);return r(a,...t)}))}},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,...t){return up.migrate.deprecated("up.util.only(object, ...keys)","up.util.pick(object, keys)"),up.util.pick(e,t)},up.util.except=function(e,...t){return up.migrate.deprecated("up.util.except(object, ...keys)","up.util.omit(object, keys)"),up.util.omit(e,t)},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,t){up.migrate.deprecated("up.util.times()","a `for` loop");for(let r=0;r<e;r++)t()},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)}},338:()=>{up.migrate.renamedPackage("layout","viewport"),up.migrate.renamedProperty(up.viewport.config,"viewports","viewportSelectors"),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,t,r={}){return(e=up.fragment.get(e,r)).scrollTo(Object.assign(Object.assign({},r),{top:t})),up.migrate.formerlyAsync("up.scroll()")},up.scroll=up.viewport.scroll}},t={};function r(a){var p=t[a];if(void 0!==p)return p.exports;var u=t[a]={exports:{}};return e[a](u,u.exports,r),u.exports}up.framework.startExtension(),r(992),r(480),r(294),r(700),r(394),r(629),r(305),r(354),r(234),r(869),r(729),r(969),r(905),r(413),r(69),r(197),r(677),r(885),r(228),r(338),up.framework.stopExtension()})();
|