{"version":3,"sources":["../assets/scripts/app/angular-animate.min.js","../assets/scripts/app/angular-sanitize.min.js","../assets/scripts/app/app.js","../assets/scripts/app/blogCtrl.js","../assets/scripts/app/contactCtrl.js","../assets/scripts/app/directive.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC/UA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC1LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"app.js","sourcesContent":["/*\n AngularJS v1.6.6\n (c) 2010-2017 Google, Inc. http://angularjs.org\n License: MIT\n*/\n(function(S,q){'use strict';function Ea(a,b,c){if(!a)throw Pa(\"areq\",b||\"?\",c||\"required\");return a}function Fa(a,b){if(!a&&!b)return\"\";if(!a)return b;if(!b)return a;V(a)&&(a=a.join(\" \"));V(b)&&(b=b.join(\" \"));return a+\" \"+b}function Qa(a){var b={};a&&(a.to||a.from)&&(b.to=a.to,b.from=a.from);return b}function W(a,b,c){var d=\"\";a=V(a)?a:a&&C(a)&&a.length?a.split(/\\s+/):[];t(a,function(a,f){a&&0=a&&(a=g,g=0,b.push(e),e=[]);e.push(f.fn);f.children.forEach(function(a){g++;c.push(a)});a--}e.length&&b.push(e);return b}(c)}var s=[],y=X(a);return function(n,q,v){function E(a){a=a.hasAttribute(\"ng-animate-ref\")?\n[a]:a.querySelectorAll(\"[ng-animate-ref]\");var b=[];t(a,function(a){var c=a.getAttribute(\"ng-animate-ref\");c&&c.length&&b.push(a)});return b}function g(a){var b=[],c={};t(a,function(a,d){var k=J(a.element),g=0<=[\"enter\",\"move\"].indexOf(a.event),k=a.structural?E(k):[];if(k.length){var e=g?\"to\":\"from\";t(k,function(a){var b=a.getAttribute(\"ng-animate-ref\");c[b]=c[b]||{};c[b][e]={animationID:d,element:A(a)}})}else b.push(a)});var d={},g={};t(c,function(c,e){var f=c.from,p=c.to;if(f&&p){var H=a[f.animationID],\nz=a[p.animationID],m=f.animationID.toString();if(!g[m]){var l=g[m]={structural:!0,beforeStart:function(){H.beforeStart();z.beforeStart()},close:function(){H.close();z.close()},classes:M(H.classes,z.classes),from:H,to:z,anchors:[]};l.classes.length?b.push(l):(b.push(H),b.push(z))}g[m].anchors.push({out:f.element,\"in\":p.element})}else f=f?f.animationID:p.animationID,p=f.toString(),d[p]||(d[p]=!0,b.push(a[f]))});return b}function M(a,b){a=a.split(\" \");b=b.split(\" \");for(var c=[],d=0;d=P&&b>=N&&(ba=!0,m())}function ga(){function b(){if(!M){L(!1);t(x,function(a){k.style[a[0]]=a[1]});g(a,h);e.addClass(a,ca);\nif(r.recalculateTimingStyles){ma=k.getAttribute(\"class\")+\" \"+fa;ja=q(k,ma);B=E(k,ma,ja);$=B.maxDelay;w=Math.max($,0);N=B.maxDuration;if(0===N){m();return}r.hasTransitions=0s.expectedEndTime)?n.cancel(s.timer):f.push(m)}F&&(l=n(c,l,!1),f[0]={timer:l,expectedEndTime:d},f.push(m),a.data(\"$$animateCss\",f));if(ea.length)a.on(ea.join(\" \"),z);h.to&&(h.cleanupStyles&&Ma(p,k,Object.keys(h.to)),Ia(a,h))}}function c(){var b=a.data(\"$$animateCss\");\nif(b){for(var d=1;d/g,\">\")}function I(a){for(;a;){if(a.nodeType===s.Node.ELEMENT_NODE)for(var e=a.attributes,c=0,b=e.length;c\"))},end:function(a){a=p(a);c||!0!==n[a]||!0===h[a]||(b(\"\"));a==c&&(c=!1)},chars:function(a){c||b(H(a))}}};F=s.Node.prototype.contains||function(a){return!!(this.compareDocumentPosition(a)&16)};var L=/[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g,M=/([^#-~ |!])/g,h=g(\"area,br,col,hr,img,wbr\"),q=g(\"colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr\"),l=g(\"rp,rt\"),r=k({},l,q),q=k({},q,g(\"address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,section,table,ul\")),\nl=k({},l,g(\"a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var\")),z=g(\"circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,stop,svg,switch,text,title,tspan\"),A=g(\"script,style\"),n=k({},h,q,l,r),m=g(\"background,cite,href,longdesc,src,xlink:href\"),r=g(\"abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,valign,value,vspace,width\"),\nl=g(\"accent-height,accumulate,additive,alphabetic,arabic-form,ascent,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan\",\n!0),v=k({},m,l,r),u=function(a,e){function c(b){b=\"\"+b;try{var c=(new a.DOMParser).parseFromString(b,\"text/html\").body;c.firstChild.remove();return c}catch(e){}}function b(a){d.innerHTML=a;e.documentMode&&I(d);return d}var h;if(e&&e.implementation)h=e.implementation.createHTMLDocument(\"inert\");else throw x(\"noinert\");var d=(h.documentElement||h.getDocumentElement()).querySelector(\"body\");d.innerHTML='';return d.querySelector(\"svg\")?\n(d.innerHTML='

',d.querySelector(\"svg img\")?c:b):function(b){b=\"\"+b;try{b=encodeURI(b)}catch(c){return}var e=new a.XMLHttpRequest;e.responseType=\"document\";e.open(\"GET\",\"data:text/html;charset=utf-8,\"+b,!1);e.send(null);b=e.response.body;b.firstChild.remove();return b}}(s,s.document)}).info({angularVersion:\"1.6.6\"});d.module(\"ngSanitize\").filter(\"linky\",[\"$sanitize\",function(g){var k=/((ftp|https?):\\/\\/|(www\\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\\S*[^\\s.;,(){}<>\"\\u201d\\u2019]/i,\np=/^mailto:/i,s=d.$$minErr(\"linky\"),t=d.isDefined,y=d.isFunction,w=d.isObject,x=d.isString;return function(d,q,l){function r(a){a&&m.push(J(a))}function z(a,d){var c,b=A(a);m.push(\"');r(d);m.push(\"\")}if(null==d||\"\"===d)return d;if(!x(d))throw s(\"notstring\",d);for(var A=y(l)?l:w(l)?function(){return l}:function(){return{}},n=d,m=[],v,u;d=n.match(k);)v=d[0],d[2]||\nd[4]||(v=(d[3]?\"http://\":\"mailto:\")+v),u=d.index,r(n.substr(0,u)),z(v,d[0].replace(p,\"\")),n=n.substring(u+d[0].length);r(n);return g(m.join(\"\"))}}])})(window,window.angular);\n\n","\n'use strict';\nvar app = angular.module('sandhillApp', ['ngAnimate', 'ngSanitize']);\napp.filter('limitChar', function () {\n return function (content, length, tail) {\n if (isNaN(length))\n length = 50;\n\n if (tail === undefined)\n tail = \"\";\n\n if (content.length <= length || content.length - tail.length <= length) {\n return content;\n }\n else {\n return String(content).substring(0, length-tail.length) + tail;\n }\n };\n});\n\napp.filter('unique', function() {\n return function(collection, keyname) {\n var output = [],\n keys = [];\n angular.forEach(collection, function(item) {\n var key = item[keyname];\n if(keys.indexOf(key) === -1) {\n keys.push(key);\n output.push(item);\n }\n });\n return output;\n };\n})\n","app.controller('blogCtrl', ['$scope', '$http', '$filter', function ($scope, $http, $filter) {\n $scope.itemPerPage = 18; // set per page item number (predefine, change also in directive)\n $scope.items = [];\n $scope.count = '';\n $scope.author = [];\n $scope.author_id = [];\n $scope.tag_id = [];\n $scope.category_data = '';\n $scope.category = [];\n $scope.category_id = [];\n $scope.number = '';\n $scope.last_page = '';\n $scope.first = false;\n $scope.last = true;\n $scope.searchString = '';\n $scope.q = '';\n $scope.page_value = '';\n $scope.currentPage = 0;\n $scope.currentValue = 1;\n $scope.paginationSize = 3;\n var min = 0;\n var max = $scope.itemPerPage;\n var url = window.location.href;\n if (url.indexOf(\"?\") > -1) {\n var urlString = url.substr(url.indexOf(\"?\") + 1);\n var urlArray = urlString.split('=');\n }\n\n /*\n * Fetch all blog post on load\n */\n\n $http({\n method: 'GET',\n url: '/wp-content/uploads/blog-cache.json'\n }).then(function (response) {\n $scope.tempitems = response.data;\n if ($scope.tempitems) {\n $scope.pagination($scope.tempitems);\n }\n if ($scope.tempitems.length <= $scope.itemPerPage) {\n max = $scope.tempitems.length;\n $scope.itemPerPage = $scope.tempitems.length;\n }\n for (var i = min; i < max; i++) {\n $scope.items.push($scope.tempitems[i]);\n }\n }, function (error) {\n });\n\n\n /*\n * Fetch all blog post category on load\n */\n\n $http({\n method: 'GET',\n url: '/wp-content/themes/sandhill/templates/components/view/category.php'\n }).then(function (response) {\n $scope.category_data = response.data;\n }, function (error) {\n });\n\n\n /*\n * Call function on load time before apply any filter\n */\n\n $scope.pagination = function (str) {\n $scope.count = str.length;\n var str1 = parseInt($scope.count / $scope.itemPerPage);\n var str2 = $scope.count % $scope.itemPerPage;\n if (str2) {\n str2 = 1;\n }\n $scope.pagination_number = str1 + str2;\n $scope.page_no = [];\n for (var i = 1; i <= $scope.pagination_number; i++) {\n $scope.last_page = $scope.pagination_number;\n $scope.page_no.push(i);\n }\n }\n $scope.paginationOffset = function () {\n var range = Math.floor($scope.paginationSize / 2);\n if (($scope.currentValue - range) < 0) {\n return 0;\n }\n else if (($scope.currentValue + range) >= $scope.pagination_number) {\n return ($scope.pagination_number - $scope.paginationSize < 0) ? 0 : $scope.pagination_number - $scope.paginationSize;\n }\n else {\n return $scope.currentValue - range;\n }\n };\n\n $scope.clear_search = function () {\n $scope.number = 1;\n $scope.currentValue = 1;\n $scope.searchString = '';\n jQuery('.blog-landing .filter-wrap .form-outer form .clear-search').css({'opacity':'0', 'visibility':'hidden'});\n }\n\n $scope.reinit = function (str) {\n $scope.number = 1;\n $scope.currentValue = 1;\n if (!str) {\n $scope.searchString = '';\n }\n }\n /*\n * Get current active page on click\n */\n $scope.current_page = function (str, event) {\n $scope.number = str;\n $scope.currentValue = $scope.number;\n jQuery('li').removeClass('active');\n jQuery(\"html, body\").animate({scrollTop: jQuery('.blog-landing .filter-wrap .text-center').offset().top}, \"slow\");\n if (($scope.author_id == '') && ($scope.tag_id == '') && ($scope.category_id == '')) {\n max = $scope.itemPerPage * str;\n min = max - $scope.itemPerPage;\n\n if (max > $scope.count) {\n max = $scope.count;\n }\n $scope.items = [];\n for (var i = min; i < max; i++) {\n $scope.items.push($scope.tempitems[i]);\n }\n if (str == $scope.last_page) {\n $scope.last = false;\n $scope.first = true;\n }\n else if (str == 1) {\n $scope.last = true;\n $scope.first = false;\n } else {\n $scope.first = true;\n $scope.last = true;\n }\n }\n }\n\n /*\n * Call when click on next button\n */\n\n $scope.page_next = function () {\n $scope.first = true;\n jQuery(\"html, body\").animate({scrollTop: jQuery('.blog-landing .filter-wrap .text-center').offset().top}, \"slow\");\n var str = parseInt(jQuery('.pagination li.active').text());\n if (str != $scope.pagination_number) {\n var next_active = str + 1;\n $scope.currentValue = next_active;\n jQuery('.pagination li').removeClass('active');\n $scope.current_page(next_active);\n if (next_active == $scope.last_page) {\n $scope.last = false;\n }\n }\n }\n\n /*\n * Call when click on previous button\n */\n\n $scope.page_prev = function () {\n $scope.last = true;\n jQuery(\"html, body\").animate({scrollTop: jQuery('.blog-landing .filter-wrap .text-center').offset().top}, \"slow\");\n var str = parseInt(jQuery('.pagination li.active').text());\n if (str != 1) {\n var prev_active = str - 1;\n $scope.currentValue = prev_active;\n jQuery('.pagination li').removeClass('active');\n $scope.current_page(prev_active);\n if (prev_active == $scope.last_page) {\n $scope.last = false;\n }\n if (prev_active == 1) {\n $scope.first = false;\n }\n }\n }\n\n /*\n * Call when click on last button\n */\n\n $scope.page_last = function () {\n jQuery('li').removeClass('active');\n jQuery(\"html, body\").animate({scrollTop: jQuery('.blog-landing .filter-wrap .text-center').offset().top}, \"slow\");\n jQuery('li:nth-child(' + $scope.last_page + ')').addClass('active');\n $scope.current_page($scope.last_page);\n $scope.first = true;\n $scope.last = false;\n }\n\n /*\n * Call when click on first button\n */\n\n $scope.page_first = function () {\n jQuery(\"html, body\").animate({scrollTop: jQuery('.blog-landing .filter-wrap .text-center').offset().top}, \"slow\");\n jQuery('li').removeClass('active');\n jQuery('li:nth-child(' + 1 + ')').addClass('active');\n $scope.current_page(1);\n $scope.first = false;\n $scope.last = true;\n }\n\n /*\n * Add active class and remove active class on click of author name\n */\n\n $scope.remove_author = function () {\n $scope.author = [];\n $scope.author_id = [];\n $scope.number = 1;\n $scope.currentValue = 1;\n var current_url = window.location.pathname;\n window.history.pushState('url', 'Title', current_url);\n jQuery('.remove-auth').css({'z-index': '0'});\n jQuery('.info').removeClass('author-active');\n jQuery('.info').find('.remove-auth').empty();\n\n }\n\n $scope.author_click = function (id, name, des, term) {\n var current_url = window.location.pathname;\n $scope.currentValue = 1;\n window.history.pushState('url', 'Title', current_url);\n $scope.author = [];\n $scope.author_id = [];\n $scope.author.push({id: id, name: name, des: des, term: term});\n $scope.author_id.push(id);\n jQuery('.info').removeClass('author-active');\n jQuery('.info').find('.remove-auth').empty();\n jQuery('.remove-auth').css({'z-index': '0'});\n jQuery('.info').each(function () {\n if (jQuery(this).find('.col-four .title').attr('data-id') == id) {\n jQuery(this).find('.remove-auth').css({'z-index': '2'}).append('\"close-btn\"');\n jQuery(this).addClass('author-active');\n\n }\n });\n $scope.number = 1;\n }\n\n /*\n * Add active class and remove active class on click of category name for desktop\n */\n\n $scope.category_click = function (id, name) {\n $scope.currentValue = 1;\n jQuery('.category li').each(function () {\n if (jQuery(this).find('span').attr('data-id') == id) {\n if (jQuery(this).hasClass('category-active')) {\n jQuery(this).removeClass('category-active');\n for (var i = 0; i < $scope.category.length; i++) {\n if ($scope.category[i]['id'] == id) {\n $scope.category.splice(i, 1);\n }\n }\n var found = jQuery.inArray(id, $scope.category_id);\n if (found >= 0) {\n $scope.category_id.splice(found, 1);\n }\n } else {\n $scope.category.push({id: id, name: name, class: 'desktop'});\n $scope.category_id.push(id);\n jQuery(this).addClass('category-active');\n }\n $scope.number = 1;\n }\n });\n }\n\n /*\n * Call function after filter apply\n */\n\n $scope.filter_temp = '';\n $filter.pagination = function (str) {\n $scope.count = str.length;\n var str1 = parseInt($scope.count / $scope.itemPerPage);\n var str2 = $scope.count % $scope.itemPerPage;\n if (str2) {\n str2 = 1;\n }\n $scope.pagination_number = str1 + str2;\n $scope.page_no = [];\n for (var i = 1; i <= $scope.pagination_number; i++) {\n $scope.last_page = $scope.pagination_number;\n $scope.page_no.push(i);\n }\n $scope.filter_temp = str;\n }\n\n /*\n * Clear All Filter\n */\n\n $scope.clear_all = function(){\n $scope.category=[];\n $scope.category_id=[];\n $scope.author =[];\n $scope.author_id=[];\n $scope.searchString = '';\n jQuery('.remove-auth').css({'z-index': '0'});\n jQuery('.info').removeClass('author-active');\n jQuery('.info').find('.remove-auth').empty();\n jQuery('.category li').removeClass('category-active');\n jQuery('.blog-landing .filter-wrap .form-outer form .clear-search').css({'opacity':'0', 'visibility':'hidden'});\n }\n\n /*\n * Use for set the layout of boxes.\n */\n\n $scope.styleFunction = function (index, feature, number, author_id, tag_id, category_id, searchString) {\n if (((index == 0) || (index == 6) || (index == 12)) && feature && (number =='' || number == 1) && (author_id == '') && (tag_id == '') && (category_id == '') && (searchString=='')) {\n if (index == 6) {\n return \"col-seven right\";\n } else {\n return \"col-seven\";\n }\n } else {\n return \"col-three\";\n }\n }\n\n\n}]);\n\n\n\n","app.controller('contactCtrl', ['$scope', '$http', function ($scope, $http) {\n /*\n * Contact Us page mail form handling\n */\n $scope.submitForm = function ($event) {\n\n $scope.formData = {\n 'name': $scope.name,\n 'g-recaptcha-response': grecaptcha.getResponse(),\n 'email': $scope.email,\n 'subject': $scope.subject,\n 'message': $scope.message\n };\n $scope.submitted = true;\n if (grecaptcha.getResponse() == \"\") {\n jQuery('.g-recaptcha-err').html(\"You can't proceed! Please check reCAPTCHA to proceed.\");\n jQuery('.g-recaptcha-err').css({'color': 'red'});\n return false;\n }\n if ((!$scope.ContactForm.$valid) && (grecaptcha.getResponse() == \"\")) {\n }\n else if (($scope.ContactForm.$valid) && (grecaptcha.getResponse() != \"\")) {\n jQuery('.g-recaptcha-err').empty();\n $http({\n method: 'POST',\n url: '/wp-content/themes/sandhill/templates/components/mailer.php',\n data: jQuery.param($scope.formData), // pass in data as strings\n headers: {'Content-Type': 'application/x-www-form-urlencoded'} // set the headers so angular passing info as form data (not request payload)\n }).then(\n function (response) {\n /* Response */\n if(response.data == \"1\") {\n jQuery('input, textarea').val('').removeClass('used');\n jQuery('.contact-us .container .contact-form form .input-wrap').removeClass('focused');\n jQuery('.contact-pop-up').css({\n 'opacity': '1',\n 'z-index': '2',\n 'transition': 'all .2s ease-in-out'\n });\n jQuery(\".contact-pop-up .message-container\").addClass(\"move-up\").css({\n \"animation-duration\": \"0.8s\",\n \"animation-delay\": \"0.3s\",\n \"animation-name\": \"fadeInUp\"\n });\n jQuery('.g-recaptcha-err').html(\"\");\n $scope.name = '';\n $scope.email = '';\n $scope.subject = '';\n $scope.message = '';\n ;\n grecaptcha.reset();\n }\n else {\n jQuery('.unsuccess').css({'display': 'block'});\n jQuery('.unsuccess').html(\"Mail is not sent, Please try again\");\n }\n\n },\n function (error) {\n jQuery('.unsuccess').css({'display': 'block'});\n jQuery('.unsuccess').html(\"Mail is not sent, Please try again\");\n });\n }\n }\n\n /*\n * Footer Sign up form handling\n */\n\n jQuery(\".news-sign-up input\").focus(function () {\n jQuery('.news-sign-up .loading-sign-up').css({'display': 'none'}).empty();\n jQuery('.news-sign-up .success-sign-up').css({'display': 'none'});\n });\n\n $scope.signupForm = function ($event) {\n $scope.signupData = {\n 'signupEmail': $scope.signupEmail,\n };\n $scope.signupsubmitted = true;\n jQuery('.news-sign-up .loading-sign-up').css({'display': 'block'}).append('\"Loading');\n if (!$scope.SignupForm.$valid) {\n jQuery('.news-sign-up .loading-sign-up').css({'display': 'none'}).empty();\n jQuery('.news-sign-up .success-sign-up').css({'display': 'none'});\n jQuery('.news-sign-up .alert-sign-up').css({'display': 'none'});\n jQuery('.news-sign-up .alert-sign-up').css({'display': 'block'});\n }\n else if ($scope.SignupForm.$valid) {\n $http({\n method: 'POST',\n url: '/wp-content/themes/sandhill/templates/components/signup-form/news-signup.php',\n data: jQuery.param($scope.signupData), // pass in data as strings\n headers: {'Content-Type': 'application/x-www-form-urlencoded'} // set the headers so angular passing info as form data (not request payload)\n }).then(\n function (result) {\n if (result.data.id) {\n jQuery('.news-sign-up .loading-sign-up').css({'display': 'none'}).empty();\n jQuery('.news-sign-up .success-sign-up').css({'display': 'none'});\n jQuery('.news-sign-up .alert-sign-up').css({'display': 'none'});\n jQuery('.news-sign-up .success-sign-up').css({'display': 'block'});\n $scope.signupEmail = '';\n\n } else {\n jQuery('.news-sign-up .loading-sign-up').css({'display': 'none'}).empty();\n jQuery('.news-sign-up .success-sign-up').css({'display': 'none'});\n jQuery('.news-sign-up .alert-sign-up').css({'display': 'none'});\n jQuery('.news-sign-up .alert-sign-up').css({'display': 'block'});\n $scope.signupEmail = '';\n }\n },\n function (error) {\n });\n }\n }\n\n /*\n * Cta Sign up form\n */\n\n jQuery(\".cta-sign-up input\").focus(function () {\n jQuery('.cta-sign-up .loading-sign-up').css({'display': 'none'}).empty();\n jQuery('.cta-sign-up .success-sign-up').css({'display': 'none'});\n });\n\n $scope.newsForm = function ($event) {\n $scope.newsletterData = {\n 'newsletterEmail': $scope.newsEmail,\n 'g-recaptcha-response': grecaptcha.getResponse()\n };\n $scope.newslettersubmitted = true;\n if ((grecaptcha.getResponse() == \"\") && ($scope.newsletterForm.$valid)) {\n jQuery('.g-recaptcha-err').html(\"You can't proceed! Please check reCAPTCHA to proceed.\");\n jQuery('.g-recaptcha-err').css({'color': 'red'});\n return false;\n } else if ((!$scope.newsletterForm.$valid) && (grecaptcha.getResponse() == \"\")) {\n jQuery('.cta-sign-up .loading-sign-up').css({'display': 'none'}).empty();\n jQuery('.cta-sign-up .success-sign-up').css({'display': 'none'});\n jQuery('.cta-sign-up .alert-sign-up').css({'display': 'none'});\n jQuery('.cta-sign-up .alert-sign-up').css({'display': 'block'});\n jQuery('.g-recaptcha-err').html(\"You can't proceed! Please check reCAPTCHA to proceed.\");\n jQuery('.g-recaptcha-err').css({'color': 'red'});\n return false;\n }\n jQuery('.cta-sign-up .loading-sign-up').css({'display': 'block'}).append('\"Loading');\n\n if ((!$scope.newsletterForm.$valid) && (grecaptcha.getResponse() == \"\")) {\n jQuery('.cta-sign-up .loading-sign-up').css({'display': 'none'}).empty();\n jQuery('.cta-sign-up .success-sign-up').css({'display': 'none'});\n jQuery('.cta-sign-up .alert-sign-up').css({'display': 'none'});\n jQuery('.cta-sign-up .alert-sign-up').css({'display': 'block'});\n } else if ((!$scope.newsletterForm.$valid) && (grecaptcha.getResponse() != \"\")) {\n jQuery('.cta-sign-up .loading-sign-up').css({'display': 'none'}).empty();\n jQuery('.cta-sign-up .success-sign-up').css({'display': 'none'});\n jQuery('.cta-sign-up .alert-sign-up').css({'display': 'none'});\n jQuery('.cta-sign-up .alert-sign-up').css({'display': 'block'});\n }\n else if (($scope.newsletterForm.$valid) && (grecaptcha.getResponse() != \"\")) {\n $http({\n method: 'POST',\n url: '/wp-content/themes/sandhill/templates/components/signup-form/signup.php',\n data: jQuery.param($scope.newsletterData), // pass in data as strings\n headers: {'Content-Type': 'application/x-www-form-urlencoded'} // set the headers so angular passing info as form data (not request payload)\n }).then(\n function (result) {\n $scope.newsEmail = '';\n jQuery('.g-recaptcha-err').html(\"\");\n grecaptcha.reset();\n if (result.data.id) {\n jQuery('.cta-sign-up .loading-sign-up').css({'display': 'none'}).empty();\n jQuery('.cta-sign-up .success-sign-up').css({'display': 'none'});\n jQuery('.cta-sign-up .alert-sign-up').css({'display': 'none'});\n jQuery('.cta-sign-up .success-sign-up').css({'display': 'block'});\n jQuery('.cta-sign-up .input-wrap').removeClass('focused');\n } else {\n jQuery('.cta-sign-up .loading-sign-up').css({'display': 'none'}).empty();\n jQuery('.cta-sign-up .success-sign-up').css({'display': 'none'});\n jQuery('.cta-sign-up .alert-sign-up').css({'display': 'none'});\n jQuery('.cta-sign-up .alert-sign-up').css({'display': 'block'});\n jQuery('.cta-sign-up .input-wrap').removeClass('focused');\n }\n },\n function (error) {\n });\n }\n }\n\n}]);\n","app.directive('itemRepeatDirective', function () {\n return function (scope, element, attrs) {\n if (scope.$last) {\n setTimeout(function () {\n jQuery('.grid-outer').addClass('post-load');\n jQuery('.grid-outer, .pagination').css({'display': 'block'});\n jQuery('.loader').css({'display': 'none'});\n }, 100);\n }\n }\n});\napp.directive('paginationRepeatDirective', function () {\n return function (scope, element, attrs) {\n if (scope.$last) {\n setTimeout(function () {\n jQuery('.pagination').css({'display': 'block'});\n }, 400);\n }\n }\n});\napp.directive('authorRepeatDirective', function () {\n return function (scope, element, attrs) {\n if (scope.$last) {\n /*\n * Get parameter from url and add active class\n */\n var url = window.location.href;\n if (url.indexOf(\"?\") > -1) {\n var urlString = url.substr(url.indexOf(\"?\") + 1);\n if (urlString) {\n var urlArray = urlString.split('=');\n if (urlArray[0] == 'author_id') {\n\n setTimeout(function () {\n jQuery('.info-wrap > .info').each(function () {\n if (jQuery(this).find('.col-four .title').attr('data-id') == urlArray[1]) {\n var update_string = jQuery(this).find('.col-four > .title .v-middle').text();\n if((update_string) && (update_string.indexOf( ',' ) > 0)){\n var pos = update_string.indexOf( ',' );\n var author_name = update_string.substring( 0, pos );\n }else{\n var author_name = update_string;\n }\n var des = jQuery(this).find('.col-four > .title .short_certification').text();\n scope.author.push({id: parseInt(urlArray[1]), name: author_name, des: des});\n scope.author_id.push(parseInt(urlArray[1]));\n scope.$apply();\n jQuery(this).addClass('author-active');\n jQuery(this).find('.remove-auth').append('\"close-btn\"');\n\n }\n });\n }, 10);\n } else if (urlArray[0] == 'tag_id') {\n scope.tag_id.push(parseInt(urlArray[1]));\n }\n }\n }\n }\n }\n});\n\napp.directive('clearsearch', ['$compile', function ($compile) {\n return{\n scope: true,\n restrict: 'C',\n replace: false,\n link: function (scope, element, attr) {\n element.bind('click', function ($event) {\n scope.clear_search();\n scope.$apply();\n });\n }\n }\n}]);\n\napp.directive('clearall', ['$compile', function ($compile) {\n return{\n scope: true,\n restrict: 'C',\n replace: false,\n link: function (scope, element, attr) {\n element.bind('click', function ($event) {\n scope.clear_all();\n scope.$apply();\n });\n }\n }\n}]);\n\n/*\n* Custom filter\n*/\napp.filter('customFilter', [ '$filter', function ($filter) {\n return function (items, author_id, tag_id, category_id, tempitems, number, searchString) {\n var itemPerPage = 18; // set per page item number (predefine)\n var min, max;\n var result = [];\n var temp_result = [];\n var temp_result1 = [];\n var temp_result2 = [];\n var temp_result3 = [];\n\n if ((author_id == '') && (tag_id == '') && (category_id == '') && (number == '') && ((searchString == '') || (searchString == undefined))) {\n if (tempitems) {\n for (var i = 0; i < itemPerPage; i++) {\n result.push(tempitems[i]);\n }\n $filter.pagination(tempitems);\n }\n }\n else if ((author_id == '') && (tag_id == '') && (category_id == '') && (number !== '') && ((searchString == '') || (searchString == undefined))) {\n if (tempitems) {\n max = itemPerPage * number;\n min = max - itemPerPage;\n if (max > tempitems.length) {\n max = tempitems.length;\n }\n $filter.pagination(tempitems);\n for (var i = min; i < max; i++) {\n result.push(tempitems[i]);\n }\n }\n\n }\n\n if (number == '') {\n number = 1;\n }\n\n if ((author_id == '') && (tag_id == '') && (category_id == '') && (searchString != '')) {\n if (searchString) {\n searchString = searchString.toLowerCase();\n }\n angular.forEach(tempitems, function (item) {\n if ((item.title.toLowerCase().indexOf(searchString) !== -1)||(item.content.toLowerCase().indexOf(searchString) !== -1)) {\n temp_result.push(item);\n }\n });\n max = itemPerPage * number;\n min = max - itemPerPage;\n if (max > temp_result.length) {\n max = temp_result.length;\n }\n $filter.pagination(temp_result);\n for (var i = min; i < max; i++) {\n result.push(temp_result[i]);\n }\n }\n\n if ((author_id != '') && (tag_id == '') && (category_id == '') && ((searchString == '') || (searchString == undefined))) {\n for (var i = 0; i < author_id.length; i++) {\n for (var j = 0; j < tempitems.length; j++) {\n if (tempitems[j].author_id) {\n if (String(tempitems[j].author_id).indexOf(author_id[i]) >= 0) {\n var found = jQuery.inArray(tempitems[j], temp_result);\n if (found < 0) {\n temp_result.push(tempitems[j]);\n }\n }\n }\n }\n }\n max = itemPerPage * number;\n min = max - itemPerPage;\n if (max > temp_result.length) {\n max = temp_result.length;\n }\n $filter.pagination(temp_result);\n for (var i = min; i < max; i++) {\n result.push(temp_result[i]);\n }\n }\n\n if ((author_id == '') && (tag_id != '') && (category_id == '') && ((searchString == '') || (searchString == undefined))) {\n for (var i = 0; i < tag_id.length; i++) {\n\n for (var j = 0; j < tempitems.length; j++) {\n if (tempitems[j][\"tags\"].length > 0) {\n for (var k = 0; k < tempitems[j][\"tags\"].length; k++) {\n if (String(tempitems[j][\"tags\"][k].id) == String(tag_id[i])) {\n var found = jQuery.inArray(tempitems[j], temp_result);\n if (found < 0) {\n temp_result.push(tempitems[j]);\n }\n }\n }\n\n }\n }\n }\n max = itemPerPage * number;\n min = max - itemPerPage;\n if (max > temp_result.length) {\n max = temp_result.length;\n }\n $filter.pagination(temp_result);\n for (var i = min; i < max; i++) {\n result.push(temp_result[i]);\n }\n }\n\n if ((author_id == '') && (tag_id == '') && (category_id != '') && ((searchString == '') || (searchString == undefined))) {\n for (var i = 0; i < category_id.length; i++) {\n for (var j = 0; j < tempitems.length; j++) {\n if (tempitems[j][\"category\"].length > 0) {\n for (var k = 0; k < tempitems[j][\"category\"].length; k++) {\n if (String(tempitems[j][\"category\"][k].id) == String(category_id[i])) {\n var found = jQuery.inArray(tempitems[j], temp_result);\n if (found < 0) {\n temp_result.push(tempitems[j]);\n }\n }\n }\n\n }\n }\n }\n max = itemPerPage * number;\n min = max - itemPerPage;\n if (max > temp_result.length) {\n max = temp_result.length;\n }\n $filter.pagination(temp_result);\n for (var i = min; i < max; i++) {\n result.push(temp_result[i]);\n }\n }\n\n if ((author_id != '') && (tag_id == '') && (category_id == '') && (searchString != '')) {\n for (var i = 0; i < author_id.length; i++) {\n for (var j = 0; j < tempitems.length; j++) {\n if (tempitems[j].author_id) {\n if (String(tempitems[j].author_id).indexOf(author_id[i]) >= 0) {\n var found = jQuery.inArray(tempitems[j], temp_result1);\n if (found < 0) {\n temp_result1.push(tempitems[j]);\n }\n }\n }\n }\n }\n if (searchString) {\n searchString = searchString.toLowerCase();\n }\n angular.forEach(temp_result1, function (item) {\n\n if ((item.title.toLowerCase().indexOf(searchString) !== -1)||(item.content.toLowerCase().indexOf(searchString) !== -1)) {\n temp_result.push(item);\n }\n\n });\n max = itemPerPage * number;\n min = max - itemPerPage;\n if (max > temp_result.length) {\n max = temp_result.length;\n }\n $filter.pagination(temp_result);\n for (var i = min; i < max; i++) {\n result.push(temp_result[i]);\n }\n }\n\n if ((author_id == '') && (tag_id != '') && (category_id == '') && (searchString != '')) {\n for (var i = 0; i < tag_id.length; i++) {\n\n for (var j = 0; j < tempitems.length; j++) {\n if (tempitems[j][\"tags\"].length > 0) {\n for (var k = 0; k < tempitems[j][\"tags\"].length; k++) {\n if (String(tempitems[j][\"tags\"][k].id) == String(tag_id[i])) {\n var found = jQuery.inArray(tempitems[j], temp_result1);\n if (found < 0) {\n temp_result1.push(tempitems[j]);\n }\n }\n }\n\n }\n }\n }\n if (searchString) {\n searchString = searchString.toLowerCase();\n }\n angular.forEach(temp_result1, function (item) {\n\n if ((item.title.toLowerCase().indexOf(searchString) !== -1)||(item.content.toLowerCase().indexOf(searchString) !== -1)) {\n temp_result.push(item);\n }\n\n });\n max = itemPerPage * number;\n min = max - itemPerPage;\n if (max > temp_result.length) {\n max = temp_result.length;\n }\n $filter.pagination(temp_result);\n for (var i = min; i < max; i++) {\n result.push(temp_result[i]);\n }\n }\n\n if ((author_id == '') && (tag_id == '') && (category_id != '') && (searchString != '')) {\n for (var i = 0; i < category_id.length; i++) {\n for (var j = 0; j < tempitems.length; j++) {\n if (tempitems[j][\"category\"].length > 0) {\n for (var k = 0; k < tempitems[j][\"category\"].length; k++) {\n if (String(tempitems[j][\"category\"][k].id) == String(category_id[i])) {\n var found = jQuery.inArray(tempitems[j], temp_result1);\n if (found < 0) {\n temp_result1.push(tempitems[j]);\n }\n }\n }\n\n }\n }\n }\n if (searchString) {\n searchString = searchString.toLowerCase();\n }\n angular.forEach(temp_result1, function (item) {\n\n if ((item.title.toLowerCase().indexOf(searchString) !== -1)||(item.content.toLowerCase().indexOf(searchString) !== -1)) {\n temp_result.push(item);\n }\n\n });\n max = itemPerPage * number;\n min = max - itemPerPage;\n if (max > temp_result.length) {\n max = temp_result.length;\n }\n $filter.pagination(temp_result);\n for (var i = min; i < max; i++) {\n result.push(temp_result[i]);\n }\n }\n\n if ((author_id != '') && (tag_id != '') && (category_id == '') && (searchString == '')) {\n for (var i = 0; i < author_id.length; i++) {\n for (var j = 0; j < tempitems.length; j++) {\n if (tempitems[j].author_id) {\n if (String(tempitems[j].author_id).indexOf(author_id[i]) >= 0) {\n var found = jQuery.inArray(tempitems[j], temp_result1);\n if (found < 0) {\n temp_result1.push(tempitems[j]);\n }\n }\n }\n }\n }\n for (var i = 0; i < tag_id.length; i++) {\n for (var j = 0; j < temp_result1.length; j++) {\n if (temp_result1[j][\"tags\"].length > 0) {\n for (var k = 0; k < temp_result1[j][\"tags\"].length; k++) {\n if (String(temp_result1[j][\"tags\"][k].id) == String(tag_id[i])) {\n var found = jQuery.inArray(temp_result1[j], temp_result);\n if (found < 0) {\n temp_result.push(temp_result1[j]);\n }\n }\n }\n\n }\n }\n }\n max = itemPerPage * number;\n min = max - itemPerPage;\n if (max > temp_result.length) {\n max = temp_result.length;\n }\n $filter.pagination(temp_result);\n for (var i = min; i < max; i++) {\n result.push(temp_result[i]);\n }\n }\n\n if ((author_id != '') && (tag_id == '') && (category_id != '') && (searchString == '')) {\n for (var i = 0; i < author_id.length; i++) {\n for (var j = 0; j < tempitems.length; j++) {\n if (tempitems[j].author_id) {\n if (String(tempitems[j].author_id).indexOf(author_id[i]) >= 0) {\n var found = jQuery.inArray(tempitems[j], temp_result1);\n if (found < 0) {\n temp_result1.push(tempitems[j]);\n }\n }\n }\n }\n }\n for (var i = 0; i < category_id.length; i++) {\n for (var j = 0; j < temp_result1.length; j++) {\n if (temp_result1[j][\"category\"].length > 0) {\n for (var k = 0; k < temp_result1[j][\"category\"].length; k++) {\n if (String(temp_result1[j][\"category\"][k].id) == String(category_id[i])) {\n var found = jQuery.inArray(temp_result1[j], temp_result);\n if (found < 0) {\n temp_result.push(temp_result1[j]);\n }\n }\n }\n\n }\n }\n }\n max = itemPerPage * number;\n min = max - itemPerPage;\n if (max > temp_result.length) {\n max = temp_result.length;\n }\n $filter.pagination(temp_result);\n for (var i = min; i < max; i++) {\n result.push(temp_result[i]);\n }\n }\n\n if ((author_id != '') && (tag_id != '') && (category_id == '') && (searchString != '')) {\n for (var i = 0; i < author_id.length; i++) {\n for (var j = 0; j < tempitems.length; j++) {\n if (tempitems[j].author_id) {\n if (String(tempitems[j].author_id).indexOf(author_id[i]) >= 0) {\n var found = jQuery.inArray(tempitems[j], temp_result1);\n if (found < 0) {\n temp_result1.push(tempitems[j]);\n }\n }\n }\n }\n }\n for (var i = 0; i < tag_id.length; i++) {\n for (var j = 0; j < temp_result1.length; j++) {\n if (temp_result1[j][\"tags\"].length > 0) {\n for (var k = 0; k < temp_result1[j][\"tags\"].length; k++) {\n if (String(temp_result1[j][\"tags\"][k].id) == String(tag_id[i])) {\n var found = jQuery.inArray(temp_result1[j], temp_result2);\n if (found < 0) {\n temp_result2.push(temp_result1[j]);\n }\n }\n }\n\n }\n }\n }\n if (searchString) {\n searchString = searchString.toLowerCase();\n }\n angular.forEach(temp_result2, function (item) {\n\n if ((item.title.toLowerCase().indexOf(searchString) !== -1)||(item.content.toLowerCase().indexOf(searchString) !== -1)) {\n temp_result.push(item);\n }\n\n });\n max = itemPerPage * number;\n min = max - itemPerPage;\n if (max > temp_result.length) {\n max = temp_result.length;\n }\n $filter.pagination(temp_result);\n for (var i = min; i < max; i++) {\n result.push(temp_result[i]);\n }\n }\n\n if ((author_id != '') && (tag_id == '') && (category_id != '') && (searchString != '')) {\n for (var i = 0; i < author_id.length; i++) {\n for (var j = 0; j < tempitems.length; j++) {\n if (tempitems[j].author_id) {\n if (String(tempitems[j].author_id).indexOf(author_id[i]) >= 0) {\n var found = jQuery.inArray(tempitems[j], temp_result1);\n if (found < 0) {\n temp_result1.push(tempitems[j]);\n }\n }\n }\n }\n }\n for (var i = 0; i < category_id.length; i++) {\n for (var j = 0; j < temp_result1.length; j++) {\n if (temp_result1[j][\"category\"].length > 0) {\n for (var k = 0; k < temp_result1[j][\"category\"].length; k++) {\n if (String(temp_result1[j][\"category\"][k].id) == String(category_id[i])) {\n var found = jQuery.inArray(temp_result1[j], temp_result2);\n if (found < 0) {\n temp_result2.push(temp_result1[j]);\n }\n }\n }\n\n }\n }\n }\n if (searchString) {\n searchString = searchString.toLowerCase();\n }\n angular.forEach(temp_result2, function (item) {\n\n if ((item.title.toLowerCase().indexOf(searchString) !== -1)||(item.content.toLowerCase().indexOf(searchString) !== -1)) {\n temp_result.push(item);\n }\n\n });\n max = itemPerPage * number;\n min = max - itemPerPage;\n if (max > temp_result.length) {\n max = temp_result.length;\n }\n $filter.pagination(temp_result);\n for (var i = min; i < max; i++) {\n result.push(temp_result[i]);\n }\n }\n\n if ((author_id == '') && (tag_id != '') && (category_id != '') && (searchString == '')) {\n for (var i = 0; i < tag_id.length; i++) {\n for (var j = 0; j < tempitems.length; j++) {\n if (tempitems[j][\"tags\"].length > 0) {\n for (var k = 0; k < tempitems[j][\"tags\"].length; k++) {\n if (String(tempitems[j][\"tags\"][k].id) == String(tag_id[i])) {\n var found = jQuery.inArray(tempitems[j], temp_result1);\n if (found < 0) {\n temp_result1.push(tempitems[j]);\n }\n }\n }\n\n }\n }\n }\n for (var i = 0; i < category_id.length; i++) {\n for (var j = 0; j < temp_result1.length; j++) {\n if (temp_result1[j][\"category\"].length > 0) {\n for (var k = 0; k < temp_result1[j][\"category\"].length; k++) {\n if (String(temp_result1[j][\"category\"][k].id) == String(category_id[i])) {\n var found = jQuery.inArray(temp_result1[j], temp_result);\n if (found < 0) {\n temp_result.push(temp_result1[j]);\n }\n }\n }\n\n }\n }\n }\n max = itemPerPage * number;\n min = max - itemPerPage;\n if (max > temp_result.length) {\n max = temp_result.length;\n }\n $filter.pagination(temp_result);\n for (var i = min; i < max; i++) {\n result.push(temp_result[i]);\n }\n }\n\n if ((author_id == '') && (tag_id != '') && (category_id != '') && (searchString != '')) {\n for (var i = 0; i < tag_id.length; i++) {\n for (var j = 0; j < tempitems.length; j++) {\n if (tempitems[j][\"tags\"].length > 0) {\n for (var k = 0; k < tempitems[j][\"tags\"].length; k++) {\n if (String(tempitems[j][\"tags\"][k].id) == String(tag_id[i])) {\n var found = jQuery.inArray(tempitems[j], temp_result1);\n if (found < 0) {\n temp_result1.push(tempitems[j]);\n }\n }\n }\n\n }\n }\n }\n for (var i = 0; i < category_id.length; i++) {\n for (var j = 0; j < temp_result1.length; j++) {\n if (temp_result1[j][\"category\"].length > 0) {\n for (var k = 0; k < temp_result1[j][\"category\"].length; k++) {\n if (String(temp_result1[j][\"category\"][k].id) == String(category_id[i])) {\n var found = jQuery.inArray(temp_result1[j], temp_result2);\n if (found < 0) {\n temp_result2.push(temp_result1[j]);\n }\n }\n }\n\n }\n }\n }\n if (searchString) {\n searchString = searchString.toLowerCase();\n }\n angular.forEach(temp_result2, function (item) {\n\n if ((item.title.toLowerCase().indexOf(searchString) !== -1)||(item.content.toLowerCase().indexOf(searchString) !== -1)) {\n temp_result.push(item);\n }\n\n });\n max = itemPerPage * number;\n min = max - itemPerPage;\n if (max > temp_result.length) {\n max = temp_result.length;\n }\n $filter.pagination(temp_result);\n for (var i = min; i < max; i++) {\n result.push(temp_result[i]);\n }\n }\n\n if ((author_id != '') && (tag_id != '') && (category_id != '') && (searchString == '')) {\n for (var i = 0; i < tag_id.length; i++) {\n for (var j = 0; j < tempitems.length; j++) {\n if (tempitems[j][\"tags\"].length > 0) {\n for (var k = 0; k < tempitems[j][\"tags\"].length; k++) {\n if (String(tempitems[j][\"tags\"][k].id) == String(tag_id[i])) {\n var found = jQuery.inArray(tempitems[j], temp_result1);\n if (found < 0) {\n temp_result1.push(tempitems[j]);\n }\n }\n }\n\n }\n }\n }\n for (var i = 0; i < category_id.length; i++) {\n for (var j = 0; j < temp_result1.length; j++) {\n if (temp_result1[j][\"category\"].length > 0) {\n for (var k = 0; k < temp_result1[j][\"category\"].length; k++) {\n if (String(temp_result1[j][\"category\"][k].id) == String(category_id[i])) {\n var found = jQuery.inArray(temp_result1[j], temp_result2);\n if (found < 0) {\n temp_result2.push(temp_result1[j]);\n }\n }\n }\n\n }\n }\n }\n for (var i = 0; i < author_id.length; i++) {\n for (var j = 0; j < temp_result2.length; j++) {\n if (temp_result2[j].author_id) {\n if (String(temp_result2[j].author_id) == String(author_id[i])) {\n var found = jQuery.inArray(temp_result2[j], temp_result);\n if (found < 0) {\n temp_result.push(temp_result2[j]);\n }\n }\n }\n }\n }\n max = itemPerPage * number;\n min = max - itemPerPage;\n if (max > temp_result.length) {\n max = temp_result.length;\n }\n $filter.pagination(temp_result);\n for (var i = min; i < max; i++) {\n result.push(temp_result[i]);\n }\n }\n\n if ((author_id != '') && (tag_id != '') && (category_id != '') && (searchString != '')) {\n for (var i = 0; i < tag_id.length; i++) {\n for (var j = 0; j < tempitems.length; j++) {\n if (tempitems[j][\"tags\"].length > 0) {\n for (var k = 0; k < tempitems[j][\"tags\"].length; k++) {\n if (String(tempitems[j][\"tags\"][k].id) == String(tag_id[i])) {\n var found = jQuery.inArray(tempitems[j], temp_result1);\n if (found < 0) {\n temp_result1.push(tempitems[j]);\n }\n }\n }\n\n }\n }\n }\n for (var i = 0; i < category_id.length; i++) {\n for (var j = 0; j < temp_result1.length; j++) {\n if (temp_result1[j][\"category\"].length > 0) {\n for (var k = 0; k < temp_result1[j][\"category\"].length; k++) {\n if (String(temp_result1[j][\"category\"][k].id) == String(category_id[i])) {\n var found = jQuery.inArray(temp_result1[j], temp_result2);\n if (found < 0) {\n temp_result2.push(temp_result1[j]);\n }\n }\n }\n\n }\n }\n }\n for (var i = 0; i < author_id.length; i++) {\n for (var j = 0; j < temp_result2.length; j++) {\n if (temp_result2[j].author_id) {\n if (String(temp_result2[j].author_id) == String(author_id[i])) {\n var found = jQuery.inArray(temp_result2[j], temp_result3);\n if (found < 0) {\n temp_result3.push(temp_result2[j]);\n }\n }\n }\n }\n }\n if (searchString) {\n searchString = searchString.toLowerCase();\n }\n angular.forEach(temp_result3, function (item) {\n\n if ((item.title.toLowerCase().indexOf(searchString) !== -1)||(item.content.toLowerCase().indexOf(searchString) !== -1)) {\n temp_result.push(item);\n }\n\n });\n max = itemPerPage * number;\n min = max - itemPerPage;\n if (max > temp_result.length) {\n max = temp_result.length;\n }\n $filter.pagination(temp_result);\n for (var i = min; i < max; i++) {\n result.push(temp_result[i]);\n }\n }\n return result;\n }\n}]);\n\n\n"],"sourceRoot":"assets/scripts/"}