-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathko.ifQuery-1.0.0.min.js
More file actions
2 lines (2 loc) · 1.28 KB
/
ko.ifQuery-1.0.0.min.js
File metadata and controls
2 lines (2 loc) · 1.28 KB
1
2
(function(){var n="ifQuery",t=function(n,t){for(var r,i=0,f=n.length,u=[];i<f;i++)r=n[i].cloneNode(!0),u.push(t?ko.cleanNode(r):r);return u},i="__ko_ifQueryBindingData",r={small:"(max-width: 767px)","medium-down":"(max-width: 1279px)",medium:"(min-width: 768px) and (max-width: 1279px)","medium-up":"(min-width: 768px)","large-down":"(max-width: 1439px)",large:"(min-width: 1280px) and (max-width: 1439px)","large-up":"(min-width: 1280px)",xlarge:"(min-width: 1440px)",landscape:"(orientation: landscape)",portrait:"(orientation: portrait)"};ko.bindingHandlers[n]={init:function(n){return ko.utils.domData.set(n,i,{}),{controlsDescendantBindings:!0}},update:function(n,u,f,e,o){for(var s=ko.utils.domData.get(n,i),w=ko.utils.unwrapObservable(u()),a=!s.savedNodes,v=w.split(","),h="",y,l,p,c=0;c<v.length;c++)y=r[v[c]]||v[c],h+=h?" and "+y:y;h=h.replace("only screen and",""),l=matchMedia(h).matches,p=a||l!==s.didDisplayOnLastUpdate,p&&(a&&(s.savedNodes=t(ko.virtualElements.childNodes(n),!0)),l?(a||ko.virtualElements.setDomNodeChildren(n,t(s.savedNodes)),ko.applyBindingsToDescendants(o,n)):ko.virtualElements.emptyNode(n),s.didDisplayOnLastUpdate=l)}},ko.expressionRewriting.bindingRewriteValidators[n]=!1,ko.virtualElements.allowedBindings[n]=!0})();
//@ sourceMappingURL=ko.ifQuery-1.0.0.min.js.map