@feature.ninja/widget
Advanced tools
Comparing version 0.0.19 to 0.0.20
@@ -1,2 +0,2 @@ | ||
"use strict";var e,n,t,_,o,r,l=Object.defineProperty,i=Object.defineProperties,s=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,c=(e,n,t)=>n in e?l(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,d=(e,n)=>{for(var t in n||(n={}))a.call(n,t)&&c(e,t,n[t]);if(u)for(var t of u(n))f.call(n,t)&&c(e,t,n[t]);return e},p=(e,n)=>i(e,s(n)),h={},m=[],v=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function y(e,n){for(var t in n)e[t]=n[t];return e}function g(e){var n=e.parentNode;n&&n.removeChild(e)}function b(n,t,_){var o,r,l,i={};for(l in t)"key"==l?o=t[l]:"ref"==l?r=t[l]:i[l]=t[l];if(arguments.length>2&&(i.children=arguments.length>3?e.call(arguments,2):_),"function"==typeof n&&null!=n.defaultProps)for(l in n.defaultProps)void 0===i[l]&&(i[l]=n.defaultProps[l]);return x(n,i,o,r,null)}function x(e,_,o,r,l){var i={type:e,props:_,key:o,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==l?++t:l};return null!=n.vnode&&n.vnode(i),i}function k(e){return e.children}function w(e,n){this.props=e,this.context=n}function E(e,n){if(null==n)return e.__?E(e.__,e.__.__k.indexOf(e)+1):null;for(var t;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e)return t.__e;return"function"==typeof e.type?E(e):null}function N(e){var n,t;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,n=0;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e){e.__e=e.__c.base=t.__e;break}return N(e)}}function S(e){(!e.__d&&(e.__d=!0)&&_.push(e)&&!P.__r++||r!==n.debounceRendering)&&((r=n.debounceRendering)||o)(P)}function P(){for(var e;P.__r=_.length;)e=_.sort((function(e,n){return e.__v.__b-n.__v.__b})),_=[],e.some((function(e){var n,t,_,o,r,l;e.__d&&(r=(o=(n=e).__v).__e,(l=n.__P)&&(t=[],(_=y({},o)).__v=o.__v+1,U(l,o,_,n.__n,void 0!==l.ownerSVGElement,null!=o.__h?[r]:null,t,null==r?E(o):r,o.__h),j(t,o),o.__e!=r&&N(o)))}))}function R(e,n,t,_,o,r,l,i,s,u){var a,f,c,d,p,v,y,g=_&&_.__k||m,b=g.length;for(t.__k=[],a=0;a<n.length;a++)if(null!=(d=t.__k[a]=null==(d=n[a])||"boolean"==typeof d?null:"string"==typeof d||"number"==typeof d||"bigint"==typeof d?x(null,d,null,null,d):Array.isArray(d)?x(k,{children:d},null,null,null):d.__b>0?x(d.type,d.props,d.key,null,d.__v):d)){if(d.__=t,d.__b=t.__b+1,null===(c=g[a])||c&&d.key==c.key&&d.type===c.type)g[a]=void 0;else for(f=0;f<b;f++){if((c=g[f])&&d.key==c.key&&d.type===c.type){g[f]=void 0;break}c=null}U(e,d,c=c||h,o,r,l,i,s,u),p=d.__e,(f=d.ref)&&c.ref!=f&&(y||(y=[]),c.ref&&y.push(c.ref,null,d),y.push(f,d.__c||p,d)),null!=p?(null==v&&(v=p),"function"==typeof d.type&&null!=d.__k&&d.__k===c.__k?d.__d=s=O(d,s,e):s=D(e,d,c,g,p,s),u||"option"!==t.type?"function"==typeof t.type&&(t.__d=s):e.value=""):s&&c.__e==s&&s.parentNode!=e&&(s=E(c))}for(t.__e=v,a=b;a--;)null!=g[a]&&("function"==typeof t.type&&null!=g[a].__e&&g[a].__e==t.__d&&(t.__d=E(_,a+1)),F(g[a],g[a]));if(y)for(a=0;a<y.length;a++)C(y[a],y[++a],y[++a])}function O(e,n,t){var _,o;for(_=0;_<e.__k.length;_++)(o=e.__k[_])&&(o.__=e,n="function"==typeof o.type?O(o,n,t):D(t,o,o,e.__k,o.__e,n));return n}function D(e,n,t,_,o,r){var l,i,s;if(void 0!==n.__d)l=n.__d,n.__d=void 0;else if(null==t||o!=r||null==o.parentNode)e:if(null==r||r.parentNode!==e)e.appendChild(o),l=null;else{for(i=r,s=0;(i=i.nextSibling)&&s<_.length;s+=2)if(i==o)break e;e.insertBefore(o,r),l=r}return void 0!==l?l:o.nextSibling}function T(e,n,t){"-"===n[0]?e.setProperty(n,t):e[n]=null==t?"":"number"!=typeof t||v.test(n)?t:t+"px"}function A(e,n,t,_,o){var r;e:if("style"===n)if("string"==typeof t)e.style.cssText=t;else{if("string"==typeof _&&(e.style.cssText=_=""),_)for(n in _)t&&n in t||T(e.style,n,"");if(t)for(n in t)_&&t[n]===_[n]||T(e.style,n,t[n])}else if("o"===n[0]&&"n"===n[1])r=n!==(n=n.replace(/Capture$/,"")),n=n.toLowerCase()in e?n.toLowerCase().slice(2):n.slice(2),e.l||(e.l={}),e.l[n+r]=t,t?_||e.addEventListener(n,r?L:H,r):e.removeEventListener(n,r?L:H,r);else if("dangerouslySetInnerHTML"!==n){if(o)n=n.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==n&&"list"!==n&&"form"!==n&&"tabIndex"!==n&&"download"!==n&&n in e)try{e[n]=null==t?"":t;break e}catch(l){}"function"==typeof t||(null!=t&&(!1!==t||"a"===n[0]&&"r"===n[1])?e.setAttribute(n,t):e.removeAttribute(n))}}function H(e){this.l[e.type+!1](n.event?n.event(e):e)}function L(e){this.l[e.type+!0](n.event?n.event(e):e)}function U(t,_,o,r,l,i,s,u,a){var f,c,d,p,m,v,b,x,N,S,P,O=_.type;if(void 0!==_.constructor)return null;null!=o.__h&&(a=o.__h,u=_.__e=o.__e,_.__h=null,i=[u]),(f=n.__b)&&f(_);try{e:if("function"==typeof O){if(x=_.props,N=(f=O.contextType)&&r[f.__c],S=f?N?N.props.value:f.__:r,o.__c?b=(c=_.__c=o.__c).__=c.__E:("prototype"in O&&O.prototype.render?_.__c=c=new O(x,S):(_.__c=c=new w(x,S),c.constructor=O,c.render=M),N&&N.sub(c),c.props=x,c.state||(c.state={}),c.context=S,c.__n=r,d=c.__d=!0,c.__h=[]),null==c.__s&&(c.__s=c.state),null!=O.getDerivedStateFromProps&&(c.__s==c.state&&(c.__s=y({},c.__s)),y(c.__s,O.getDerivedStateFromProps(x,c.__s))),p=c.props,m=c.state,d)null==O.getDerivedStateFromProps&&null!=c.componentWillMount&&c.componentWillMount(),null!=c.componentDidMount&&c.__h.push(c.componentDidMount);else{if(null==O.getDerivedStateFromProps&&x!==p&&null!=c.componentWillReceiveProps&&c.componentWillReceiveProps(x,S),!c.__e&&null!=c.shouldComponentUpdate&&!1===c.shouldComponentUpdate(x,c.__s,S)||_.__v===o.__v){c.props=x,c.state=c.__s,_.__v!==o.__v&&(c.__d=!1),c.__v=_,_.__e=o.__e,_.__k=o.__k,_.__k.forEach((function(e){e&&(e.__=_)})),c.__h.length&&s.push(c);break e}null!=c.componentWillUpdate&&c.componentWillUpdate(x,c.__s,S),null!=c.componentDidUpdate&&c.__h.push((function(){c.componentDidUpdate(p,m,v)}))}c.context=S,c.props=x,c.state=c.__s,(f=n.__r)&&f(_),c.__d=!1,c.__v=_,c.__P=t,f=c.render(c.props,c.state,c.context),c.state=c.__s,null!=c.getChildContext&&(r=y(y({},r),c.getChildContext())),d||null==c.getSnapshotBeforeUpdate||(v=c.getSnapshotBeforeUpdate(p,m)),P=null!=f&&f.type===k&&null==f.key?f.props.children:f,R(t,Array.isArray(P)?P:[P],_,o,r,l,i,s,u,a),c.base=_.__e,_.__h=null,c.__h.length&&s.push(c),b&&(c.__E=c.__=null),c.__e=!1}else null==i&&_.__v===o.__v?(_.__k=o.__k,_.__e=o.__e):_.__e=function(n,t,_,o,r,l,i,s){var u,a,f,c=_.props,d=t.props,p=t.type,m=0;if("svg"===p&&(r=!0),null!=l)for(;m<l.length;m++)if((u=l[m])&&(u===n||(p?u.localName==p:3==u.nodeType))){n=u,l[m]=null;break}if(null==n){if(null===p)return document.createTextNode(d);n=r?document.createElementNS("http://www.w3.org/2000/svg",p):document.createElement(p,d.is&&d),l=null,s=!1}if(null===p)c===d||s&&n.data===d||(n.data=d);else{if(l=l&&e.call(n.childNodes),a=(c=_.props||h).dangerouslySetInnerHTML,f=d.dangerouslySetInnerHTML,!s){if(null!=l)for(c={},m=0;m<n.attributes.length;m++)c[n.attributes[m].name]=n.attributes[m].value;(f||a)&&(f&&(a&&f.__html==a.__html||f.__html===n.innerHTML)||(n.innerHTML=f&&f.__html||""))}if(function(e,n,t,_,o){var r;for(r in t)"children"===r||"key"===r||r in n||A(e,r,null,t[r],_);for(r in n)o&&"function"!=typeof n[r]||"children"===r||"key"===r||"value"===r||"checked"===r||t[r]===n[r]||A(e,r,n[r],t[r],_)}(n,d,c,r,s),f)t.__k=[];else if(m=t.props.children,R(n,Array.isArray(m)?m:[m],t,_,o,r&&"foreignObject"!==p,l,i,l?l[0]:_.__k&&E(_,0),s),null!=l)for(m=l.length;m--;)null!=l[m]&&g(l[m]);s||("value"in d&&void 0!==(m=d.value)&&(m!==n.value||"progress"===p&&!m)&&A(n,"value",m,c.value,!1),"checked"in d&&void 0!==(m=d.checked)&&m!==n.checked&&A(n,"checked",m,c.checked,!1))}return n}(o.__e,_,o,r,l,i,s,a);(f=n.diffed)&&f(_)}catch(D){_.__v=null,(a||null!=i)&&(_.__e=u,_.__h=!!a,i[i.indexOf(u)]=null),n.__e(D,_,o)}}function j(e,t){n.__c&&n.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(_){n.__e(_,t.__v)}}))}function C(e,t,_){try{"function"==typeof e?e(t):e.current=t}catch(o){n.__e(o,_)}}function F(e,t,_){var o,r;if(n.unmount&&n.unmount(e),(o=e.ref)&&(o.current&&o.current!==e.__e||C(o,null,t)),null!=(o=e.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(l){n.__e(l,t)}o.base=o.__P=null}if(o=e.__k)for(r=0;r<o.length;r++)o[r]&&F(o[r],t,"function"!=typeof e.type);_||null==e.__e||g(e.__e),e.__e=e.__d=void 0}function M(e,n,t){return this.constructor(e,t)}e=m.slice,n={__e:function(e,n){for(var t,_,o;n=n.__;)if((t=n.__c)&&!t.__)try{if((_=t.constructor)&&null!=_.getDerivedStateFromError&&(t.setState(_.getDerivedStateFromError(e)),o=t.__d),null!=t.componentDidCatch&&(t.componentDidCatch(e),o=t.__d),o)return t.__E=t}catch(r){e=r}throw e}},t=0,w.prototype.setState=function(e,n){var t;t=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=y({},this.state),"function"==typeof e&&(e=e(y({},t),this.props)),e&&y(t,e),null!=e&&this.__v&&(n&&this.__h.push(n),S(this))},w.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),S(this))},w.prototype.render=k,_=[],o="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,P.__r=0;var I,q,W,B=0,$=[],V=n.__b,Q=n.__r,z=n.diffed,G=n.__c,J=n.unmount;function K(e,t){n.__h&&n.__h(q,e,B||t),B=0;var _=q.__H||(q.__H={__:[],__h:[]});return e>=_.__.length&&_.__.push({}),_.__[e]}function X(){$.forEach((function(e){if(e.__P)try{e.__H.__h.forEach(ne),e.__H.__h.forEach(te),e.__H.__h=[]}catch(t){e.__H.__h=[],n.__e(t,e.__v)}})),$=[]}n.__b=function(e){q=null,V&&V(e)},n.__r=function(e){Q&&Q(e),I=0;var n=(q=e.__c).__H;n&&(n.__h.forEach(ne),n.__h.forEach(te),n.__h=[])},n.diffed=function(e){z&&z(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(1!==$.push(t)&&W===n.requestAnimationFrame||((W=n.requestAnimationFrame)||function(e){var n,t=function(){clearTimeout(_),ee&&cancelAnimationFrame(n),setTimeout(e)},_=setTimeout(t,100);ee&&(n=requestAnimationFrame(t))})(X)),q=void 0},n.__c=function(e,t){t.some((function(e){try{e.__h.forEach(ne),e.__h=e.__h.filter((function(e){return!e.__||te(e)}))}catch(_){t.some((function(e){e.__h&&(e.__h=[])})),t=[],n.__e(_,e.__v)}})),G&&G(e,t)},n.unmount=function(e){J&&J(e);var t=e.__c;if(t&&t.__H)try{t.__H.__.forEach(ne)}catch(_){n.__e(_,t.__v)}};var Y,Z,ee="function"==typeof requestAnimationFrame;function ne(e){var n=q;"function"==typeof e.__c&&e.__c(),q=n}function te(e){var n=q;e.__c=e.__(),q=n}function _e(e,n){return"function"==typeof n?n(e):n}(Z=Y||(Y={})).UPVOTE="UPVOTE",Z.FEATURE_REQUESTS_LOADED="FEATURE_REQUESTS_LOADED",Z.HANDLE_ERROR="HANDLE_ERROR";const oe={data:{},meta:{from:0,to:0,total:0},links:{prev:null,next:null}},re=(e,n)=>{switch(console.log(n),n.type){case Y.UPVOTE:return p(d({},e),{data:p(d({},e.data),{[n.id]:p(d({},e.data[n.id]),{votes:e.data[n.id].votes_count+1})})});case Y.FEATURE_REQUESTS_LOADED:return p(d({},e),{data:n.response.data,meta:n.response.meta,links:n.response.links});case Y.HANDLE_ERROR:return p(d({},e),{error:n.error});default:throw new Error("Unexpected action: "+JSON.stringify(n))}};function le(e){const{featureRequest:n}=e;return b("div",{className:"flex py-6 px-4 sm:px-6 gap-4"},b("div",{className:"flex flex-col w-10 items-center"},b("button",{type:"button",className:"flex flex-col items-center rounded-full text-gray-400 hover:text-green-400 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-400 text-sm"},b("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"h-12 w-12 -m-2","aria-hidden":"true"},b("path",{fillRule:"evenodd",d:"M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z",clipRule:"evenodd"}))),b("div",{className:"text-gray-500"})),b("div",{className:"flex flex-col flex-grow justify-between truncate"},b("div",{className:"text-md text-gray-700 font-semibold truncate"},n.title),b("div",{className:"text-sm text-gray-700 truncate"},n.description),b("div",{className:"flex justify-between mt-2"},b("div",{className:"flex gap-2"},b("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800 "},"boombox")),b("div",{className:"flex text-gray-500 text-sm"},n.votes_count,b("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",className:"w-5 h-5"},b("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"}))))))}function ie(e){const{options:{workspace:t,projects:_}}=e,[o,r]=(l=re,i=oe,(u=K(I++,2)).t=l,u.__c||(u.__=[s?s(i):_e(void 0,i),function(e){var n=u.t(u.__[0],e);u.__[0]!==n&&(u.__=[n,u.__[1]],u.__c.setState({}))}],u.__c=q),u.__);var l,i,s,u;const{error:a,data:f,meta:c,links:d}=o;return function(e,t){var _,o,r=K(I++,3);!n.__s&&(_=r.__H,o=t,!_||_.length!==o.length||o.some((function(e,n){return e!==_[n]})))&&(r.__=e,r.__H=t,q.__H.__h.push(r))}((()=>{(()=>{return e=this,n=null,o=function*(){const e=yield fetch(`https://api.feature.ninja/workspaces/${t}/feature-requests${_?`?projects=${_.join(",")}`:""}`),n=yield e.json();if(e.ok)r({type:Y.FEATURE_REQUESTS_LOADED,response:n});else{const n=yield e.text();console.error("Error loading feature requests, response was:",n),r({type:Y.HANDLE_ERROR,error:new Error("Oops, something went wrong when loading the feature requests...")})}},new Promise(((t,_)=>{var r=e=>{try{i(o.next(e))}catch(n){_(n)}},l=e=>{try{i(o.throw(e))}catch(n){_(n)}},i=e=>e.done?t(e.value):Promise.resolve(e.value).then(r,l);i((o=o.apply(e,n)).next())}));var e,n,o})()}),[t,_]),b("div",{className:"fn-max-w-4xl fn-mx-auto fn-sm:px-6 fn-lg:px-8"},a&&b("div",{className:"fn-bg-red-400"},a.message),b("div",{className:"fn-py-4 fn-px-4"},b("span",{className:"fn-sr-only"},"Search..."),b("input",{type:"text",className:"fn-shadow-sm fn-focus:ring-green-400 fn-focus:border-green-400 fn-block fn-p-4 fn-w-full fn-border-gray-300 fn-rounded-md ",placeholder:"Search..."})),b("div",{className:"fn-divide-y fn-divide-gray-200 fn-mt-4"},Object.values(f).map((e=>b(le,{key:e.id,featureRequest:e})))),b("nav",{className:"fn-bg-white fn-px-4 fn-py-3 fn-flex fn-items-center fn-justify-between fn-border-t fn-border-gray-200 fn-sm:px-6","aria-label":"Pagination"},b("div",{className:"fn-hidden fn-sm:block"},b("p",{className:"fn-text-sm fn-text-gray-700"},"Showing ",b("span",{className:"fn-font-medium"},c.from)," to"," ",b("span",{className:"fn-font-medium"},c.to)," of"," ",b("span",{className:"fn-font-medium"},c.total)," results")),b("div",{className:"fn-fn-flex-1 fn-fn-flex fn-fn-justify-between fn-fn-sm:justify-end"},b("button",{className:"fn-relative fn-inline-flex fn-items-center fn-px-4 fn-py-2 fn-border fn-border-gray-300 fn-text-sm fn-font-medium fn-rounded-md fn-text-gray-700 fn-bg-white fn-hover:bg-gray-50 fn-disabled:opacity-25",disabled:null===d.prev},"Previous"),b("button",{className:"fn-ml-3 fn-relative fn-inline-flex fn-items-center fn-px-4 fn-py-2 fn-border fn-border-gray-300 fn-text-sm fn-font-medium fn-rounded-md fn-text-gray-700 fn-bg-white fn-hover:bg-gray-50 fn-disabled:opacity-25",disabled:null===d.next},"Next"))))}const se=document.currentScript;function ue(t){window.addEventListener("DOMContentLoaded",(()=>{const _=d(d({},{elementId:"feature-ninja-widget"}),t);let o=document.getElementById(_.elementId);var r,l,i,s,u,a;o||(o=document.createElement("div"),o.id=_.elementId,se?se.insertBefore(o,se):document.body.appendChild(o)),r=b(ie,{options:_}),l=o,n.__&&n.__(r,l),u=(s="function"==typeof i)?null:i&&i.__k||l.__k,a=[],U(l,r=(!s&&i||l).__k=b(k,null,[r]),u||h,h,void 0!==l.ownerSVGElement,!s&&i?[i]:u?null:l.firstChild?e.call(l.childNodes):null,a,!s&&i?i:u?u.__e:l.firstChild,s),j(a,r)}))}window.featureNinja=ue,module&&module.exports&&(module.exports=ue),(function () { function styleInject(css,ref){if(ref===void 0){ref={}}var insertAt=ref.insertAt;if(!css||typeof document==="undefined"){return}var head=document.head||document.getElementsByTagName("head")[0];var style=document.createElement("style");style.type="text/css";if(insertAt==="top"){if(head.firstChild){head.insertBefore(style,head.firstChild)}else{head.appendChild(style)}}else{head.appendChild(style)}if(style.styleSheet){style.styleSheet.cssText=css}else{style.appendChild(document.createTextNode(css))}};styleInject(`@import url('https://rsms.me/inter/inter.css'); | ||
"use strict";var e,n,t,_,r,o,l=Object.defineProperty,i=Object.defineProperties,s=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,c=(e,n,t)=>n in e?l(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,d=(e,n)=>{for(var t in n||(n={}))a.call(n,t)&&c(e,t,n[t]);if(u)for(var t of u(n))f.call(n,t)&&c(e,t,n[t]);return e},p=(e,n)=>i(e,s(n)),h={},m=[],v=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function y(e,n){for(var t in n)e[t]=n[t];return e}function g(e){var n=e.parentNode;n&&n.removeChild(e)}function b(n,t,_){var r,o,l,i={};for(l in t)"key"==l?r=t[l]:"ref"==l?o=t[l]:i[l]=t[l];if(arguments.length>2&&(i.children=arguments.length>3?e.call(arguments,2):_),"function"==typeof n&&null!=n.defaultProps)for(l in n.defaultProps)void 0===i[l]&&(i[l]=n.defaultProps[l]);return x(n,i,r,o,null)}function x(e,_,r,o,l){var i={type:e,props:_,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==l?++t:l};return null!=n.vnode&&n.vnode(i),i}function k(e){return e.children}function w(e,n){this.props=e,this.context=n}function E(e,n){if(null==n)return e.__?E(e.__,e.__.__k.indexOf(e)+1):null;for(var t;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e)return t.__e;return"function"==typeof e.type?E(e):null}function N(e){var n,t;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,n=0;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e){e.__e=e.__c.base=t.__e;break}return N(e)}}function S(e){(!e.__d&&(e.__d=!0)&&_.push(e)&&!P.__r++||o!==n.debounceRendering)&&((o=n.debounceRendering)||r)(P)}function P(){for(var e;P.__r=_.length;)e=_.sort((function(e,n){return e.__v.__b-n.__v.__b})),_=[],e.some((function(e){var n,t,_,r,o,l;e.__d&&(o=(r=(n=e).__v).__e,(l=n.__P)&&(t=[],(_=y({},r)).__v=r.__v+1,U(l,r,_,n.__n,void 0!==l.ownerSVGElement,null!=r.__h?[o]:null,t,null==o?E(r):o,r.__h),j(t,r),r.__e!=o&&N(r)))}))}function R(e,n,t,_,r,o,l,i,s,u){var a,f,c,d,p,v,y,g=_&&_.__k||m,b=g.length;for(t.__k=[],a=0;a<n.length;a++)if(null!=(d=t.__k[a]=null==(d=n[a])||"boolean"==typeof d?null:"string"==typeof d||"number"==typeof d||"bigint"==typeof d?x(null,d,null,null,d):Array.isArray(d)?x(k,{children:d},null,null,null):d.__b>0?x(d.type,d.props,d.key,null,d.__v):d)){if(d.__=t,d.__b=t.__b+1,null===(c=g[a])||c&&d.key==c.key&&d.type===c.type)g[a]=void 0;else for(f=0;f<b;f++){if((c=g[f])&&d.key==c.key&&d.type===c.type){g[f]=void 0;break}c=null}U(e,d,c=c||h,r,o,l,i,s,u),p=d.__e,(f=d.ref)&&c.ref!=f&&(y||(y=[]),c.ref&&y.push(c.ref,null,d),y.push(f,d.__c||p,d)),null!=p?(null==v&&(v=p),"function"==typeof d.type&&null!=d.__k&&d.__k===c.__k?d.__d=s=O(d,s,e):s=D(e,d,c,g,p,s),u||"option"!==t.type?"function"==typeof t.type&&(t.__d=s):e.value=""):s&&c.__e==s&&s.parentNode!=e&&(s=E(c))}for(t.__e=v,a=b;a--;)null!=g[a]&&("function"==typeof t.type&&null!=g[a].__e&&g[a].__e==t.__d&&(t.__d=E(_,a+1)),F(g[a],g[a]));if(y)for(a=0;a<y.length;a++)C(y[a],y[++a],y[++a])}function O(e,n,t){var _,r;for(_=0;_<e.__k.length;_++)(r=e.__k[_])&&(r.__=e,n="function"==typeof r.type?O(r,n,t):D(t,r,r,e.__k,r.__e,n));return n}function D(e,n,t,_,r,o){var l,i,s;if(void 0!==n.__d)l=n.__d,n.__d=void 0;else if(null==t||r!=o||null==r.parentNode)e:if(null==o||o.parentNode!==e)e.appendChild(r),l=null;else{for(i=o,s=0;(i=i.nextSibling)&&s<_.length;s+=2)if(i==r)break e;e.insertBefore(r,o),l=o}return void 0!==l?l:r.nextSibling}function T(e,n,t){"-"===n[0]?e.setProperty(n,t):e[n]=null==t?"":"number"!=typeof t||v.test(n)?t:t+"px"}function A(e,n,t,_,r){var o;e:if("style"===n)if("string"==typeof t)e.style.cssText=t;else{if("string"==typeof _&&(e.style.cssText=_=""),_)for(n in _)t&&n in t||T(e.style,n,"");if(t)for(n in t)_&&t[n]===_[n]||T(e.style,n,t[n])}else if("o"===n[0]&&"n"===n[1])o=n!==(n=n.replace(/Capture$/,"")),n=n.toLowerCase()in e?n.toLowerCase().slice(2):n.slice(2),e.l||(e.l={}),e.l[n+o]=t,t?_||e.addEventListener(n,o?L:H,o):e.removeEventListener(n,o?L:H,o);else if("dangerouslySetInnerHTML"!==n){if(r)n=n.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==n&&"list"!==n&&"form"!==n&&"tabIndex"!==n&&"download"!==n&&n in e)try{e[n]=null==t?"":t;break e}catch(l){}"function"==typeof t||(null!=t&&(!1!==t||"a"===n[0]&&"r"===n[1])?e.setAttribute(n,t):e.removeAttribute(n))}}function H(e){this.l[e.type+!1](n.event?n.event(e):e)}function L(e){this.l[e.type+!0](n.event?n.event(e):e)}function U(t,_,r,o,l,i,s,u,a){var f,c,d,p,m,v,b,x,N,S,P,O=_.type;if(void 0!==_.constructor)return null;null!=r.__h&&(a=r.__h,u=_.__e=r.__e,_.__h=null,i=[u]),(f=n.__b)&&f(_);try{e:if("function"==typeof O){if(x=_.props,N=(f=O.contextType)&&o[f.__c],S=f?N?N.props.value:f.__:o,r.__c?b=(c=_.__c=r.__c).__=c.__E:("prototype"in O&&O.prototype.render?_.__c=c=new O(x,S):(_.__c=c=new w(x,S),c.constructor=O,c.render=M),N&&N.sub(c),c.props=x,c.state||(c.state={}),c.context=S,c.__n=o,d=c.__d=!0,c.__h=[]),null==c.__s&&(c.__s=c.state),null!=O.getDerivedStateFromProps&&(c.__s==c.state&&(c.__s=y({},c.__s)),y(c.__s,O.getDerivedStateFromProps(x,c.__s))),p=c.props,m=c.state,d)null==O.getDerivedStateFromProps&&null!=c.componentWillMount&&c.componentWillMount(),null!=c.componentDidMount&&c.__h.push(c.componentDidMount);else{if(null==O.getDerivedStateFromProps&&x!==p&&null!=c.componentWillReceiveProps&&c.componentWillReceiveProps(x,S),!c.__e&&null!=c.shouldComponentUpdate&&!1===c.shouldComponentUpdate(x,c.__s,S)||_.__v===r.__v){c.props=x,c.state=c.__s,_.__v!==r.__v&&(c.__d=!1),c.__v=_,_.__e=r.__e,_.__k=r.__k,_.__k.forEach((function(e){e&&(e.__=_)})),c.__h.length&&s.push(c);break e}null!=c.componentWillUpdate&&c.componentWillUpdate(x,c.__s,S),null!=c.componentDidUpdate&&c.__h.push((function(){c.componentDidUpdate(p,m,v)}))}c.context=S,c.props=x,c.state=c.__s,(f=n.__r)&&f(_),c.__d=!1,c.__v=_,c.__P=t,f=c.render(c.props,c.state,c.context),c.state=c.__s,null!=c.getChildContext&&(o=y(y({},o),c.getChildContext())),d||null==c.getSnapshotBeforeUpdate||(v=c.getSnapshotBeforeUpdate(p,m)),P=null!=f&&f.type===k&&null==f.key?f.props.children:f,R(t,Array.isArray(P)?P:[P],_,r,o,l,i,s,u,a),c.base=_.__e,_.__h=null,c.__h.length&&s.push(c),b&&(c.__E=c.__=null),c.__e=!1}else null==i&&_.__v===r.__v?(_.__k=r.__k,_.__e=r.__e):_.__e=function(n,t,_,r,o,l,i,s){var u,a,f,c=_.props,d=t.props,p=t.type,m=0;if("svg"===p&&(o=!0),null!=l)for(;m<l.length;m++)if((u=l[m])&&(u===n||(p?u.localName==p:3==u.nodeType))){n=u,l[m]=null;break}if(null==n){if(null===p)return document.createTextNode(d);n=o?document.createElementNS("http://www.w3.org/2000/svg",p):document.createElement(p,d.is&&d),l=null,s=!1}if(null===p)c===d||s&&n.data===d||(n.data=d);else{if(l=l&&e.call(n.childNodes),a=(c=_.props||h).dangerouslySetInnerHTML,f=d.dangerouslySetInnerHTML,!s){if(null!=l)for(c={},m=0;m<n.attributes.length;m++)c[n.attributes[m].name]=n.attributes[m].value;(f||a)&&(f&&(a&&f.__html==a.__html||f.__html===n.innerHTML)||(n.innerHTML=f&&f.__html||""))}if(function(e,n,t,_,r){var o;for(o in t)"children"===o||"key"===o||o in n||A(e,o,null,t[o],_);for(o in n)r&&"function"!=typeof n[o]||"children"===o||"key"===o||"value"===o||"checked"===o||t[o]===n[o]||A(e,o,n[o],t[o],_)}(n,d,c,o,s),f)t.__k=[];else if(m=t.props.children,R(n,Array.isArray(m)?m:[m],t,_,r,o&&"foreignObject"!==p,l,i,l?l[0]:_.__k&&E(_,0),s),null!=l)for(m=l.length;m--;)null!=l[m]&&g(l[m]);s||("value"in d&&void 0!==(m=d.value)&&(m!==n.value||"progress"===p&&!m)&&A(n,"value",m,c.value,!1),"checked"in d&&void 0!==(m=d.checked)&&m!==n.checked&&A(n,"checked",m,c.checked,!1))}return n}(r.__e,_,r,o,l,i,s,a);(f=n.diffed)&&f(_)}catch(D){_.__v=null,(a||null!=i)&&(_.__e=u,_.__h=!!a,i[i.indexOf(u)]=null),n.__e(D,_,r)}}function j(e,t){n.__c&&n.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(_){n.__e(_,t.__v)}}))}function C(e,t,_){try{"function"==typeof e?e(t):e.current=t}catch(r){n.__e(r,_)}}function F(e,t,_){var r,o;if(n.unmount&&n.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||C(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(l){n.__e(l,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&F(r[o],t,"function"!=typeof e.type);_||null==e.__e||g(e.__e),e.__e=e.__d=void 0}function M(e,n,t){return this.constructor(e,t)}e=m.slice,n={__e:function(e,n){for(var t,_,r;n=n.__;)if((t=n.__c)&&!t.__)try{if((_=t.constructor)&&null!=_.getDerivedStateFromError&&(t.setState(_.getDerivedStateFromError(e)),r=t.__d),null!=t.componentDidCatch&&(t.componentDidCatch(e),r=t.__d),r)return t.__E=t}catch(o){e=o}throw e}},t=0,w.prototype.setState=function(e,n){var t;t=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=y({},this.state),"function"==typeof e&&(e=e(y({},t),this.props)),e&&y(t,e),null!=e&&this.__v&&(n&&this.__h.push(n),S(this))},w.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),S(this))},w.prototype.render=k,_=[],r="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,P.__r=0;var I,q,W,B=0,$=[],V=n.__b,Q=n.__r,z=n.diffed,G=n.__c,J=n.unmount;function K(e,t){n.__h&&n.__h(q,e,B||t),B=0;var _=q.__H||(q.__H={__:[],__h:[]});return e>=_.__.length&&_.__.push({}),_.__[e]}function X(){$.forEach((function(e){if(e.__P)try{e.__H.__h.forEach(ne),e.__H.__h.forEach(te),e.__H.__h=[]}catch(t){e.__H.__h=[],n.__e(t,e.__v)}})),$=[]}n.__b=function(e){q=null,V&&V(e)},n.__r=function(e){Q&&Q(e),I=0;var n=(q=e.__c).__H;n&&(n.__h.forEach(ne),n.__h.forEach(te),n.__h=[])},n.diffed=function(e){z&&z(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(1!==$.push(t)&&W===n.requestAnimationFrame||((W=n.requestAnimationFrame)||function(e){var n,t=function(){clearTimeout(_),ee&&cancelAnimationFrame(n),setTimeout(e)},_=setTimeout(t,100);ee&&(n=requestAnimationFrame(t))})(X)),q=void 0},n.__c=function(e,t){t.some((function(e){try{e.__h.forEach(ne),e.__h=e.__h.filter((function(e){return!e.__||te(e)}))}catch(_){t.some((function(e){e.__h&&(e.__h=[])})),t=[],n.__e(_,e.__v)}})),G&&G(e,t)},n.unmount=function(e){J&&J(e);var t=e.__c;if(t&&t.__H)try{t.__H.__.forEach(ne)}catch(_){n.__e(_,t.__v)}};var Y,Z,ee="function"==typeof requestAnimationFrame;function ne(e){var n=q;"function"==typeof e.__c&&e.__c(),q=n}function te(e){var n=q;e.__c=e.__(),q=n}function _e(e,n){return"function"==typeof n?n(e):n}(Z=Y||(Y={})).UPVOTE="UPVOTE",Z.FEATURE_REQUESTS_LOADED="FEATURE_REQUESTS_LOADED",Z.HANDLE_ERROR="HANDLE_ERROR";const re={data:{},meta:{from:0,to:0,total:0},links:{prev:null,next:null}},oe=(e,n)=>{switch(console.log(n),n.type){case Y.UPVOTE:return p(d({},e),{data:p(d({},e.data),{[n.id]:p(d({},e.data[n.id]),{votes:e.data[n.id].votes_count+1})})});case Y.FEATURE_REQUESTS_LOADED:return p(d({},e),{data:n.response.data,meta:n.response.meta,links:n.response.links});case Y.HANDLE_ERROR:return p(d({},e),{error:n.error});default:throw new Error("Unexpected action: "+JSON.stringify(n))}};function le(e){const{featureRequest:n}=e;return b("div",{className:"flex py-6 px-4 sm:px-6 gap-4"},b("div",{className:"flex flex-col w-10 items-center"},b("button",{type:"button",className:"flex flex-col items-center rounded-full text-gray-400 hover:text-green-400 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-400 text-sm"},b("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"h-12 w-12 -m-2","aria-hidden":"true"},b("path",{fillRule:"evenodd",d:"M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z",clipRule:"evenodd"}))),b("div",{className:"text-gray-500"})),b("div",{className:"flex flex-col flex-grow justify-between truncate"},b("div",{className:"text-md text-gray-700 font-semibold truncate"},n.title),b("div",{className:"text-sm text-gray-700 truncate"},n.description),b("div",{className:"flex justify-between mt-2"},b("div",{className:"flex gap-2"},b("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800 "},"boombox")),b("div",{className:"flex text-gray-500 text-sm"},n.votes_count,b("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",className:"w-5 h-5"},b("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"}))))))}function ie(e){const{options:{workspace:t,projects:_}}=e,[r,o]=(l=oe,i=re,(u=K(I++,2)).t=l,u.__c||(u.__=[s?s(i):_e(void 0,i),function(e){var n=u.t(u.__[0],e);u.__[0]!==n&&(u.__=[n,u.__[1]],u.__c.setState({}))}],u.__c=q),u.__);var l,i,s,u;const{error:a,data:f,meta:c,links:d}=r;return function(e,t){var _,r,o=K(I++,3);!n.__s&&(_=o.__H,r=t,!_||_.length!==r.length||r.some((function(e,n){return e!==_[n]})))&&(o.__=e,o.__H=t,q.__H.__h.push(o))}((()=>{(()=>{return e=this,n=null,r=function*(){const e=yield fetch(`https://api.feature.ninja/workspaces/${t}/feature-requests${_?`?projects=${_.join(",")}`:""}`),n=yield e.json();if(e.ok)o({type:Y.FEATURE_REQUESTS_LOADED,response:n});else{const n=yield e.text();console.error("Error loading feature requests, response was:",n),o({type:Y.HANDLE_ERROR,error:new Error("Oops, something went wrong when loading the feature requests...")})}},new Promise(((t,_)=>{var o=e=>{try{i(r.next(e))}catch(n){_(n)}},l=e=>{try{i(r.throw(e))}catch(n){_(n)}},i=e=>e.done?t(e.value):Promise.resolve(e.value).then(o,l);i((r=r.apply(e,n)).next())}));var e,n,r})()}),[t,_]),b("div",{className:"fn-max-w-4xl fn-mx-auto fn-sm:px-6 fn-lg:px-8"},a&&b("div",{className:"fn-bg-red-400"},a.message),b("div",{className:"fn-py-4 fn-px-4"},b("span",{className:"fn-sr-only"},"Search..."),b("input",{type:"text",className:"fn-shadow-sm fn-focus:ring-green-400 fn-focus:border-green-400 fn-block fn-p-4 fn-w-full fn-border-gray-300 fn-rounded-md ",placeholder:"Search..."})),b("div",{className:"fn-divide-y fn-divide-gray-200 fn-mt-4"},Object.values(f).map((e=>b(le,{key:e.id,featureRequest:e})))),b("nav",{className:"fn-bg-white fn-px-4 fn-py-3 fn-flex fn-items-center fn-justify-between fn-border-t fn-border-gray-200 fn-sm:px-6","aria-label":"Pagination"},b("div",{className:"fn-hidden fn-sm:block"},b("p",{className:"fn-text-sm fn-text-gray-700"},"Showing ",b("span",{className:"fn-font-medium"},c.from)," to"," ",b("span",{className:"fn-font-medium"},c.to)," of"," ",b("span",{className:"fn-font-medium"},c.total)," results")),b("div",{className:"fn-fn-flex-1 fn-fn-flex fn-fn-justify-between fn-fn-sm:justify-end"},b("button",{className:"fn-relative fn-inline-flex fn-items-center fn-px-4 fn-py-2 fn-border fn-border-gray-300 fn-text-sm fn-font-medium fn-rounded-md fn-text-gray-700 fn-bg-white fn-hover:bg-gray-50 fn-disabled:opacity-25",disabled:null===d.prev},"Previous"),b("button",{className:"fn-ml-3 fn-relative fn-inline-flex fn-items-center fn-px-4 fn-py-2 fn-border fn-border-gray-300 fn-text-sm fn-font-medium fn-rounded-md fn-text-gray-700 fn-bg-white fn-hover:bg-gray-50 fn-disabled:opacity-25",disabled:null===d.next},"Next"))))}const se=document.currentScript;function ue(t){window.addEventListener("DOMContentLoaded",(()=>{var _;const r=d(d({},{elementId:"feature-ninja-widget"}),t);let o=document.getElementById(r.elementId);var l,i,s,u,a,f;o||(o=document.createElement("div"),o.id=r.elementId,se?null==(_=se.parentElement)||_.insertBefore(o,se):document.body.appendChild(o)),l=b(ie,{options:r}),i=o,n.__&&n.__(l,i),a=(u="function"==typeof s)?null:s&&s.__k||i.__k,f=[],U(i,l=(!u&&s||i).__k=b(k,null,[l]),a||h,h,void 0!==i.ownerSVGElement,!u&&s?[s]:a?null:i.firstChild?e.call(i.childNodes):null,f,!u&&s?s:a?a.__e:i.firstChild,u),j(f,l)}))}window.featureNinja=ue,module&&module.exports&&(module.exports=ue),(function () { function styleInject(css,ref){if(ref===void 0){ref={}}var insertAt=ref.insertAt;if(!css||typeof document==="undefined"){return}var head=document.head||document.getElementsByTagName("head")[0];var style=document.createElement("style");style.type="text/css";if(insertAt==="top"){if(head.firstChild){head.insertBefore(style,head.firstChild)}else{head.appendChild(style)}}else{head.appendChild(style)}if(style.styleSheet){style.styleSheet.cssText=css}else{style.appendChild(document.createTextNode(css))}};styleInject(`@import url('https://rsms.me/inter/inter.css'); | ||
@@ -3,0 +3,0 @@ /*! tailwindcss v2.2.16 | MIT License | https://tailwindcss.com */ |
@@ -1,2 +0,2 @@ | ||
var e,n,t,_,o,r,l=Object.defineProperty,i=Object.defineProperties,s=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,c=(e,n,t)=>n in e?l(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,d=(e,n)=>{for(var t in n||(n={}))a.call(n,t)&&c(e,t,n[t]);if(u)for(var t of u(n))f.call(n,t)&&c(e,t,n[t]);return e},p=(e,n)=>i(e,s(n)),h={},m=[],v=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function y(e,n){for(var t in n)e[t]=n[t];return e}function g(e){var n=e.parentNode;n&&n.removeChild(e)}function b(n,t,_){var o,r,l,i={};for(l in t)"key"==l?o=t[l]:"ref"==l?r=t[l]:i[l]=t[l];if(arguments.length>2&&(i.children=arguments.length>3?e.call(arguments,2):_),"function"==typeof n&&null!=n.defaultProps)for(l in n.defaultProps)void 0===i[l]&&(i[l]=n.defaultProps[l]);return x(n,i,o,r,null)}function x(e,_,o,r,l){var i={type:e,props:_,key:o,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==l?++t:l};return null!=n.vnode&&n.vnode(i),i}function k(e){return e.children}function w(e,n){this.props=e,this.context=n}function E(e,n){if(null==n)return e.__?E(e.__,e.__.__k.indexOf(e)+1):null;for(var t;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e)return t.__e;return"function"==typeof e.type?E(e):null}function N(e){var n,t;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,n=0;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e){e.__e=e.__c.base=t.__e;break}return N(e)}}function S(e){(!e.__d&&(e.__d=!0)&&_.push(e)&&!P.__r++||r!==n.debounceRendering)&&((r=n.debounceRendering)||o)(P)}function P(){for(var e;P.__r=_.length;)e=_.sort((function(e,n){return e.__v.__b-n.__v.__b})),_=[],e.some((function(e){var n,t,_,o,r,l;e.__d&&(r=(o=(n=e).__v).__e,(l=n.__P)&&(t=[],(_=y({},o)).__v=o.__v+1,U(l,o,_,n.__n,void 0!==l.ownerSVGElement,null!=o.__h?[r]:null,t,null==r?E(o):r,o.__h),j(t,o),o.__e!=r&&N(o)))}))}function R(e,n,t,_,o,r,l,i,s,u){var a,f,c,d,p,v,y,g=_&&_.__k||m,b=g.length;for(t.__k=[],a=0;a<n.length;a++)if(null!=(d=t.__k[a]=null==(d=n[a])||"boolean"==typeof d?null:"string"==typeof d||"number"==typeof d||"bigint"==typeof d?x(null,d,null,null,d):Array.isArray(d)?x(k,{children:d},null,null,null):d.__b>0?x(d.type,d.props,d.key,null,d.__v):d)){if(d.__=t,d.__b=t.__b+1,null===(c=g[a])||c&&d.key==c.key&&d.type===c.type)g[a]=void 0;else for(f=0;f<b;f++){if((c=g[f])&&d.key==c.key&&d.type===c.type){g[f]=void 0;break}c=null}U(e,d,c=c||h,o,r,l,i,s,u),p=d.__e,(f=d.ref)&&c.ref!=f&&(y||(y=[]),c.ref&&y.push(c.ref,null,d),y.push(f,d.__c||p,d)),null!=p?(null==v&&(v=p),"function"==typeof d.type&&null!=d.__k&&d.__k===c.__k?d.__d=s=O(d,s,e):s=D(e,d,c,g,p,s),u||"option"!==t.type?"function"==typeof t.type&&(t.__d=s):e.value=""):s&&c.__e==s&&s.parentNode!=e&&(s=E(c))}for(t.__e=v,a=b;a--;)null!=g[a]&&("function"==typeof t.type&&null!=g[a].__e&&g[a].__e==t.__d&&(t.__d=E(_,a+1)),F(g[a],g[a]));if(y)for(a=0;a<y.length;a++)C(y[a],y[++a],y[++a])}function O(e,n,t){var _,o;for(_=0;_<e.__k.length;_++)(o=e.__k[_])&&(o.__=e,n="function"==typeof o.type?O(o,n,t):D(t,o,o,e.__k,o.__e,n));return n}function D(e,n,t,_,o,r){var l,i,s;if(void 0!==n.__d)l=n.__d,n.__d=void 0;else if(null==t||o!=r||null==o.parentNode)e:if(null==r||r.parentNode!==e)e.appendChild(o),l=null;else{for(i=r,s=0;(i=i.nextSibling)&&s<_.length;s+=2)if(i==o)break e;e.insertBefore(o,r),l=r}return void 0!==l?l:o.nextSibling}function T(e,n,t){"-"===n[0]?e.setProperty(n,t):e[n]=null==t?"":"number"!=typeof t||v.test(n)?t:t+"px"}function A(e,n,t,_,o){var r;e:if("style"===n)if("string"==typeof t)e.style.cssText=t;else{if("string"==typeof _&&(e.style.cssText=_=""),_)for(n in _)t&&n in t||T(e.style,n,"");if(t)for(n in t)_&&t[n]===_[n]||T(e.style,n,t[n])}else if("o"===n[0]&&"n"===n[1])r=n!==(n=n.replace(/Capture$/,"")),n=n.toLowerCase()in e?n.toLowerCase().slice(2):n.slice(2),e.l||(e.l={}),e.l[n+r]=t,t?_||e.addEventListener(n,r?L:H,r):e.removeEventListener(n,r?L:H,r);else if("dangerouslySetInnerHTML"!==n){if(o)n=n.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==n&&"list"!==n&&"form"!==n&&"tabIndex"!==n&&"download"!==n&&n in e)try{e[n]=null==t?"":t;break e}catch(l){}"function"==typeof t||(null!=t&&(!1!==t||"a"===n[0]&&"r"===n[1])?e.setAttribute(n,t):e.removeAttribute(n))}}function H(e){this.l[e.type+!1](n.event?n.event(e):e)}function L(e){this.l[e.type+!0](n.event?n.event(e):e)}function U(t,_,o,r,l,i,s,u,a){var f,c,d,p,m,v,b,x,N,S,P,O=_.type;if(void 0!==_.constructor)return null;null!=o.__h&&(a=o.__h,u=_.__e=o.__e,_.__h=null,i=[u]),(f=n.__b)&&f(_);try{e:if("function"==typeof O){if(x=_.props,N=(f=O.contextType)&&r[f.__c],S=f?N?N.props.value:f.__:r,o.__c?b=(c=_.__c=o.__c).__=c.__E:("prototype"in O&&O.prototype.render?_.__c=c=new O(x,S):(_.__c=c=new w(x,S),c.constructor=O,c.render=M),N&&N.sub(c),c.props=x,c.state||(c.state={}),c.context=S,c.__n=r,d=c.__d=!0,c.__h=[]),null==c.__s&&(c.__s=c.state),null!=O.getDerivedStateFromProps&&(c.__s==c.state&&(c.__s=y({},c.__s)),y(c.__s,O.getDerivedStateFromProps(x,c.__s))),p=c.props,m=c.state,d)null==O.getDerivedStateFromProps&&null!=c.componentWillMount&&c.componentWillMount(),null!=c.componentDidMount&&c.__h.push(c.componentDidMount);else{if(null==O.getDerivedStateFromProps&&x!==p&&null!=c.componentWillReceiveProps&&c.componentWillReceiveProps(x,S),!c.__e&&null!=c.shouldComponentUpdate&&!1===c.shouldComponentUpdate(x,c.__s,S)||_.__v===o.__v){c.props=x,c.state=c.__s,_.__v!==o.__v&&(c.__d=!1),c.__v=_,_.__e=o.__e,_.__k=o.__k,_.__k.forEach((function(e){e&&(e.__=_)})),c.__h.length&&s.push(c);break e}null!=c.componentWillUpdate&&c.componentWillUpdate(x,c.__s,S),null!=c.componentDidUpdate&&c.__h.push((function(){c.componentDidUpdate(p,m,v)}))}c.context=S,c.props=x,c.state=c.__s,(f=n.__r)&&f(_),c.__d=!1,c.__v=_,c.__P=t,f=c.render(c.props,c.state,c.context),c.state=c.__s,null!=c.getChildContext&&(r=y(y({},r),c.getChildContext())),d||null==c.getSnapshotBeforeUpdate||(v=c.getSnapshotBeforeUpdate(p,m)),P=null!=f&&f.type===k&&null==f.key?f.props.children:f,R(t,Array.isArray(P)?P:[P],_,o,r,l,i,s,u,a),c.base=_.__e,_.__h=null,c.__h.length&&s.push(c),b&&(c.__E=c.__=null),c.__e=!1}else null==i&&_.__v===o.__v?(_.__k=o.__k,_.__e=o.__e):_.__e=function(n,t,_,o,r,l,i,s){var u,a,f,c=_.props,d=t.props,p=t.type,m=0;if("svg"===p&&(r=!0),null!=l)for(;m<l.length;m++)if((u=l[m])&&(u===n||(p?u.localName==p:3==u.nodeType))){n=u,l[m]=null;break}if(null==n){if(null===p)return document.createTextNode(d);n=r?document.createElementNS("http://www.w3.org/2000/svg",p):document.createElement(p,d.is&&d),l=null,s=!1}if(null===p)c===d||s&&n.data===d||(n.data=d);else{if(l=l&&e.call(n.childNodes),a=(c=_.props||h).dangerouslySetInnerHTML,f=d.dangerouslySetInnerHTML,!s){if(null!=l)for(c={},m=0;m<n.attributes.length;m++)c[n.attributes[m].name]=n.attributes[m].value;(f||a)&&(f&&(a&&f.__html==a.__html||f.__html===n.innerHTML)||(n.innerHTML=f&&f.__html||""))}if(function(e,n,t,_,o){var r;for(r in t)"children"===r||"key"===r||r in n||A(e,r,null,t[r],_);for(r in n)o&&"function"!=typeof n[r]||"children"===r||"key"===r||"value"===r||"checked"===r||t[r]===n[r]||A(e,r,n[r],t[r],_)}(n,d,c,r,s),f)t.__k=[];else if(m=t.props.children,R(n,Array.isArray(m)?m:[m],t,_,o,r&&"foreignObject"!==p,l,i,l?l[0]:_.__k&&E(_,0),s),null!=l)for(m=l.length;m--;)null!=l[m]&&g(l[m]);s||("value"in d&&void 0!==(m=d.value)&&(m!==n.value||"progress"===p&&!m)&&A(n,"value",m,c.value,!1),"checked"in d&&void 0!==(m=d.checked)&&m!==n.checked&&A(n,"checked",m,c.checked,!1))}return n}(o.__e,_,o,r,l,i,s,a);(f=n.diffed)&&f(_)}catch(D){_.__v=null,(a||null!=i)&&(_.__e=u,_.__h=!!a,i[i.indexOf(u)]=null),n.__e(D,_,o)}}function j(e,t){n.__c&&n.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(_){n.__e(_,t.__v)}}))}function C(e,t,_){try{"function"==typeof e?e(t):e.current=t}catch(o){n.__e(o,_)}}function F(e,t,_){var o,r;if(n.unmount&&n.unmount(e),(o=e.ref)&&(o.current&&o.current!==e.__e||C(o,null,t)),null!=(o=e.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(l){n.__e(l,t)}o.base=o.__P=null}if(o=e.__k)for(r=0;r<o.length;r++)o[r]&&F(o[r],t,"function"!=typeof e.type);_||null==e.__e||g(e.__e),e.__e=e.__d=void 0}function M(e,n,t){return this.constructor(e,t)}e=m.slice,n={__e:function(e,n){for(var t,_,o;n=n.__;)if((t=n.__c)&&!t.__)try{if((_=t.constructor)&&null!=_.getDerivedStateFromError&&(t.setState(_.getDerivedStateFromError(e)),o=t.__d),null!=t.componentDidCatch&&(t.componentDidCatch(e),o=t.__d),o)return t.__E=t}catch(r){e=r}throw e}},t=0,w.prototype.setState=function(e,n){var t;t=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=y({},this.state),"function"==typeof e&&(e=e(y({},t),this.props)),e&&y(t,e),null!=e&&this.__v&&(n&&this.__h.push(n),S(this))},w.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),S(this))},w.prototype.render=k,_=[],o="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,P.__r=0;var I,q,W,B=0,$=[],V=n.__b,Q=n.__r,z=n.diffed,G=n.__c,J=n.unmount;function K(e,t){n.__h&&n.__h(q,e,B||t),B=0;var _=q.__H||(q.__H={__:[],__h:[]});return e>=_.__.length&&_.__.push({}),_.__[e]}function X(){$.forEach((function(e){if(e.__P)try{e.__H.__h.forEach(ne),e.__H.__h.forEach(te),e.__H.__h=[]}catch(t){e.__H.__h=[],n.__e(t,e.__v)}})),$=[]}n.__b=function(e){q=null,V&&V(e)},n.__r=function(e){Q&&Q(e),I=0;var n=(q=e.__c).__H;n&&(n.__h.forEach(ne),n.__h.forEach(te),n.__h=[])},n.diffed=function(e){z&&z(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(1!==$.push(t)&&W===n.requestAnimationFrame||((W=n.requestAnimationFrame)||function(e){var n,t=function(){clearTimeout(_),ee&&cancelAnimationFrame(n),setTimeout(e)},_=setTimeout(t,100);ee&&(n=requestAnimationFrame(t))})(X)),q=void 0},n.__c=function(e,t){t.some((function(e){try{e.__h.forEach(ne),e.__h=e.__h.filter((function(e){return!e.__||te(e)}))}catch(_){t.some((function(e){e.__h&&(e.__h=[])})),t=[],n.__e(_,e.__v)}})),G&&G(e,t)},n.unmount=function(e){J&&J(e);var t=e.__c;if(t&&t.__H)try{t.__H.__.forEach(ne)}catch(_){n.__e(_,t.__v)}};var Y,Z,ee="function"==typeof requestAnimationFrame;function ne(e){var n=q;"function"==typeof e.__c&&e.__c(),q=n}function te(e){var n=q;e.__c=e.__(),q=n}function _e(e,n){return"function"==typeof n?n(e):n}(Z=Y||(Y={})).UPVOTE="UPVOTE",Z.FEATURE_REQUESTS_LOADED="FEATURE_REQUESTS_LOADED",Z.HANDLE_ERROR="HANDLE_ERROR";const oe={data:{},meta:{from:0,to:0,total:0},links:{prev:null,next:null}},re=(e,n)=>{switch(console.log(n),n.type){case Y.UPVOTE:return p(d({},e),{data:p(d({},e.data),{[n.id]:p(d({},e.data[n.id]),{votes:e.data[n.id].votes_count+1})})});case Y.FEATURE_REQUESTS_LOADED:return p(d({},e),{data:n.response.data,meta:n.response.meta,links:n.response.links});case Y.HANDLE_ERROR:return p(d({},e),{error:n.error});default:throw new Error("Unexpected action: "+JSON.stringify(n))}};function le(e){const{featureRequest:n}=e;return b("div",{className:"flex py-6 px-4 sm:px-6 gap-4"},b("div",{className:"flex flex-col w-10 items-center"},b("button",{type:"button",className:"flex flex-col items-center rounded-full text-gray-400 hover:text-green-400 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-400 text-sm"},b("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"h-12 w-12 -m-2","aria-hidden":"true"},b("path",{fillRule:"evenodd",d:"M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z",clipRule:"evenodd"}))),b("div",{className:"text-gray-500"})),b("div",{className:"flex flex-col flex-grow justify-between truncate"},b("div",{className:"text-md text-gray-700 font-semibold truncate"},n.title),b("div",{className:"text-sm text-gray-700 truncate"},n.description),b("div",{className:"flex justify-between mt-2"},b("div",{className:"flex gap-2"},b("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800 "},"boombox")),b("div",{className:"flex text-gray-500 text-sm"},n.votes_count,b("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",className:"w-5 h-5"},b("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"}))))))}function ie(e){const{options:{workspace:t,projects:_}}=e,[o,r]=(l=re,i=oe,(u=K(I++,2)).t=l,u.__c||(u.__=[s?s(i):_e(void 0,i),function(e){var n=u.t(u.__[0],e);u.__[0]!==n&&(u.__=[n,u.__[1]],u.__c.setState({}))}],u.__c=q),u.__);var l,i,s,u;const{error:a,data:f,meta:c,links:d}=o;return function(e,t){var _,o,r=K(I++,3);!n.__s&&(_=r.__H,o=t,!_||_.length!==o.length||o.some((function(e,n){return e!==_[n]})))&&(r.__=e,r.__H=t,q.__H.__h.push(r))}((()=>{(()=>{return e=this,n=null,o=function*(){const e=yield fetch(`https://api.feature.ninja/workspaces/${t}/feature-requests${_?`?projects=${_.join(",")}`:""}`),n=yield e.json();if(e.ok)r({type:Y.FEATURE_REQUESTS_LOADED,response:n});else{const n=yield e.text();console.error("Error loading feature requests, response was:",n),r({type:Y.HANDLE_ERROR,error:new Error("Oops, something went wrong when loading the feature requests...")})}},new Promise(((t,_)=>{var r=e=>{try{i(o.next(e))}catch(n){_(n)}},l=e=>{try{i(o.throw(e))}catch(n){_(n)}},i=e=>e.done?t(e.value):Promise.resolve(e.value).then(r,l);i((o=o.apply(e,n)).next())}));var e,n,o})()}),[t,_]),b("div",{className:"fn-max-w-4xl fn-mx-auto fn-sm:px-6 fn-lg:px-8"},a&&b("div",{className:"fn-bg-red-400"},a.message),b("div",{className:"fn-py-4 fn-px-4"},b("span",{className:"fn-sr-only"},"Search..."),b("input",{type:"text",className:"fn-shadow-sm fn-focus:ring-green-400 fn-focus:border-green-400 fn-block fn-p-4 fn-w-full fn-border-gray-300 fn-rounded-md ",placeholder:"Search..."})),b("div",{className:"fn-divide-y fn-divide-gray-200 fn-mt-4"},Object.values(f).map((e=>b(le,{key:e.id,featureRequest:e})))),b("nav",{className:"fn-bg-white fn-px-4 fn-py-3 fn-flex fn-items-center fn-justify-between fn-border-t fn-border-gray-200 fn-sm:px-6","aria-label":"Pagination"},b("div",{className:"fn-hidden fn-sm:block"},b("p",{className:"fn-text-sm fn-text-gray-700"},"Showing ",b("span",{className:"fn-font-medium"},c.from)," to"," ",b("span",{className:"fn-font-medium"},c.to)," of"," ",b("span",{className:"fn-font-medium"},c.total)," results")),b("div",{className:"fn-fn-flex-1 fn-fn-flex fn-fn-justify-between fn-fn-sm:justify-end"},b("button",{className:"fn-relative fn-inline-flex fn-items-center fn-px-4 fn-py-2 fn-border fn-border-gray-300 fn-text-sm fn-font-medium fn-rounded-md fn-text-gray-700 fn-bg-white fn-hover:bg-gray-50 fn-disabled:opacity-25",disabled:null===d.prev},"Previous"),b("button",{className:"fn-ml-3 fn-relative fn-inline-flex fn-items-center fn-px-4 fn-py-2 fn-border fn-border-gray-300 fn-text-sm fn-font-medium fn-rounded-md fn-text-gray-700 fn-bg-white fn-hover:bg-gray-50 fn-disabled:opacity-25",disabled:null===d.next},"Next"))))}const se=document.currentScript;function ue(t){window.addEventListener("DOMContentLoaded",(()=>{const _=d(d({},{elementId:"feature-ninja-widget"}),t);let o=document.getElementById(_.elementId);var r,l,i,s,u,a;o||(o=document.createElement("div"),o.id=_.elementId,se?se.insertBefore(o,se):document.body.appendChild(o)),r=b(ie,{options:_}),l=o,n.__&&n.__(r,l),u=(s="function"==typeof i)?null:i&&i.__k||l.__k,a=[],U(l,r=(!s&&i||l).__k=b(k,null,[r]),u||h,h,void 0!==l.ownerSVGElement,!s&&i?[i]:u?null:l.firstChild?e.call(l.childNodes):null,a,!s&&i?i:u?u.__e:l.firstChild,s),j(a,r)}))}window.featureNinja=ue,module&&module.exports&&(module.exports=ue),(function () { function styleInject(css,ref){if(ref===void 0){ref={}}var insertAt=ref.insertAt;if(!css||typeof document==="undefined"){return}var head=document.head||document.getElementsByTagName("head")[0];var style=document.createElement("style");style.type="text/css";if(insertAt==="top"){if(head.firstChild){head.insertBefore(style,head.firstChild)}else{head.appendChild(style)}}else{head.appendChild(style)}if(style.styleSheet){style.styleSheet.cssText=css}else{style.appendChild(document.createTextNode(css))}};styleInject(`@import url('https://rsms.me/inter/inter.css'); | ||
var e,n,t,_,r,o,l=Object.defineProperty,i=Object.defineProperties,s=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,c=(e,n,t)=>n in e?l(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,d=(e,n)=>{for(var t in n||(n={}))a.call(n,t)&&c(e,t,n[t]);if(u)for(var t of u(n))f.call(n,t)&&c(e,t,n[t]);return e},p=(e,n)=>i(e,s(n)),h={},m=[],v=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function y(e,n){for(var t in n)e[t]=n[t];return e}function g(e){var n=e.parentNode;n&&n.removeChild(e)}function b(n,t,_){var r,o,l,i={};for(l in t)"key"==l?r=t[l]:"ref"==l?o=t[l]:i[l]=t[l];if(arguments.length>2&&(i.children=arguments.length>3?e.call(arguments,2):_),"function"==typeof n&&null!=n.defaultProps)for(l in n.defaultProps)void 0===i[l]&&(i[l]=n.defaultProps[l]);return x(n,i,r,o,null)}function x(e,_,r,o,l){var i={type:e,props:_,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==l?++t:l};return null!=n.vnode&&n.vnode(i),i}function k(e){return e.children}function w(e,n){this.props=e,this.context=n}function E(e,n){if(null==n)return e.__?E(e.__,e.__.__k.indexOf(e)+1):null;for(var t;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e)return t.__e;return"function"==typeof e.type?E(e):null}function N(e){var n,t;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,n=0;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e){e.__e=e.__c.base=t.__e;break}return N(e)}}function S(e){(!e.__d&&(e.__d=!0)&&_.push(e)&&!P.__r++||o!==n.debounceRendering)&&((o=n.debounceRendering)||r)(P)}function P(){for(var e;P.__r=_.length;)e=_.sort((function(e,n){return e.__v.__b-n.__v.__b})),_=[],e.some((function(e){var n,t,_,r,o,l;e.__d&&(o=(r=(n=e).__v).__e,(l=n.__P)&&(t=[],(_=y({},r)).__v=r.__v+1,U(l,r,_,n.__n,void 0!==l.ownerSVGElement,null!=r.__h?[o]:null,t,null==o?E(r):o,r.__h),j(t,r),r.__e!=o&&N(r)))}))}function R(e,n,t,_,r,o,l,i,s,u){var a,f,c,d,p,v,y,g=_&&_.__k||m,b=g.length;for(t.__k=[],a=0;a<n.length;a++)if(null!=(d=t.__k[a]=null==(d=n[a])||"boolean"==typeof d?null:"string"==typeof d||"number"==typeof d||"bigint"==typeof d?x(null,d,null,null,d):Array.isArray(d)?x(k,{children:d},null,null,null):d.__b>0?x(d.type,d.props,d.key,null,d.__v):d)){if(d.__=t,d.__b=t.__b+1,null===(c=g[a])||c&&d.key==c.key&&d.type===c.type)g[a]=void 0;else for(f=0;f<b;f++){if((c=g[f])&&d.key==c.key&&d.type===c.type){g[f]=void 0;break}c=null}U(e,d,c=c||h,r,o,l,i,s,u),p=d.__e,(f=d.ref)&&c.ref!=f&&(y||(y=[]),c.ref&&y.push(c.ref,null,d),y.push(f,d.__c||p,d)),null!=p?(null==v&&(v=p),"function"==typeof d.type&&null!=d.__k&&d.__k===c.__k?d.__d=s=O(d,s,e):s=D(e,d,c,g,p,s),u||"option"!==t.type?"function"==typeof t.type&&(t.__d=s):e.value=""):s&&c.__e==s&&s.parentNode!=e&&(s=E(c))}for(t.__e=v,a=b;a--;)null!=g[a]&&("function"==typeof t.type&&null!=g[a].__e&&g[a].__e==t.__d&&(t.__d=E(_,a+1)),F(g[a],g[a]));if(y)for(a=0;a<y.length;a++)C(y[a],y[++a],y[++a])}function O(e,n,t){var _,r;for(_=0;_<e.__k.length;_++)(r=e.__k[_])&&(r.__=e,n="function"==typeof r.type?O(r,n,t):D(t,r,r,e.__k,r.__e,n));return n}function D(e,n,t,_,r,o){var l,i,s;if(void 0!==n.__d)l=n.__d,n.__d=void 0;else if(null==t||r!=o||null==r.parentNode)e:if(null==o||o.parentNode!==e)e.appendChild(r),l=null;else{for(i=o,s=0;(i=i.nextSibling)&&s<_.length;s+=2)if(i==r)break e;e.insertBefore(r,o),l=o}return void 0!==l?l:r.nextSibling}function T(e,n,t){"-"===n[0]?e.setProperty(n,t):e[n]=null==t?"":"number"!=typeof t||v.test(n)?t:t+"px"}function A(e,n,t,_,r){var o;e:if("style"===n)if("string"==typeof t)e.style.cssText=t;else{if("string"==typeof _&&(e.style.cssText=_=""),_)for(n in _)t&&n in t||T(e.style,n,"");if(t)for(n in t)_&&t[n]===_[n]||T(e.style,n,t[n])}else if("o"===n[0]&&"n"===n[1])o=n!==(n=n.replace(/Capture$/,"")),n=n.toLowerCase()in e?n.toLowerCase().slice(2):n.slice(2),e.l||(e.l={}),e.l[n+o]=t,t?_||e.addEventListener(n,o?L:H,o):e.removeEventListener(n,o?L:H,o);else if("dangerouslySetInnerHTML"!==n){if(r)n=n.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==n&&"list"!==n&&"form"!==n&&"tabIndex"!==n&&"download"!==n&&n in e)try{e[n]=null==t?"":t;break e}catch(l){}"function"==typeof t||(null!=t&&(!1!==t||"a"===n[0]&&"r"===n[1])?e.setAttribute(n,t):e.removeAttribute(n))}}function H(e){this.l[e.type+!1](n.event?n.event(e):e)}function L(e){this.l[e.type+!0](n.event?n.event(e):e)}function U(t,_,r,o,l,i,s,u,a){var f,c,d,p,m,v,b,x,N,S,P,O=_.type;if(void 0!==_.constructor)return null;null!=r.__h&&(a=r.__h,u=_.__e=r.__e,_.__h=null,i=[u]),(f=n.__b)&&f(_);try{e:if("function"==typeof O){if(x=_.props,N=(f=O.contextType)&&o[f.__c],S=f?N?N.props.value:f.__:o,r.__c?b=(c=_.__c=r.__c).__=c.__E:("prototype"in O&&O.prototype.render?_.__c=c=new O(x,S):(_.__c=c=new w(x,S),c.constructor=O,c.render=M),N&&N.sub(c),c.props=x,c.state||(c.state={}),c.context=S,c.__n=o,d=c.__d=!0,c.__h=[]),null==c.__s&&(c.__s=c.state),null!=O.getDerivedStateFromProps&&(c.__s==c.state&&(c.__s=y({},c.__s)),y(c.__s,O.getDerivedStateFromProps(x,c.__s))),p=c.props,m=c.state,d)null==O.getDerivedStateFromProps&&null!=c.componentWillMount&&c.componentWillMount(),null!=c.componentDidMount&&c.__h.push(c.componentDidMount);else{if(null==O.getDerivedStateFromProps&&x!==p&&null!=c.componentWillReceiveProps&&c.componentWillReceiveProps(x,S),!c.__e&&null!=c.shouldComponentUpdate&&!1===c.shouldComponentUpdate(x,c.__s,S)||_.__v===r.__v){c.props=x,c.state=c.__s,_.__v!==r.__v&&(c.__d=!1),c.__v=_,_.__e=r.__e,_.__k=r.__k,_.__k.forEach((function(e){e&&(e.__=_)})),c.__h.length&&s.push(c);break e}null!=c.componentWillUpdate&&c.componentWillUpdate(x,c.__s,S),null!=c.componentDidUpdate&&c.__h.push((function(){c.componentDidUpdate(p,m,v)}))}c.context=S,c.props=x,c.state=c.__s,(f=n.__r)&&f(_),c.__d=!1,c.__v=_,c.__P=t,f=c.render(c.props,c.state,c.context),c.state=c.__s,null!=c.getChildContext&&(o=y(y({},o),c.getChildContext())),d||null==c.getSnapshotBeforeUpdate||(v=c.getSnapshotBeforeUpdate(p,m)),P=null!=f&&f.type===k&&null==f.key?f.props.children:f,R(t,Array.isArray(P)?P:[P],_,r,o,l,i,s,u,a),c.base=_.__e,_.__h=null,c.__h.length&&s.push(c),b&&(c.__E=c.__=null),c.__e=!1}else null==i&&_.__v===r.__v?(_.__k=r.__k,_.__e=r.__e):_.__e=function(n,t,_,r,o,l,i,s){var u,a,f,c=_.props,d=t.props,p=t.type,m=0;if("svg"===p&&(o=!0),null!=l)for(;m<l.length;m++)if((u=l[m])&&(u===n||(p?u.localName==p:3==u.nodeType))){n=u,l[m]=null;break}if(null==n){if(null===p)return document.createTextNode(d);n=o?document.createElementNS("http://www.w3.org/2000/svg",p):document.createElement(p,d.is&&d),l=null,s=!1}if(null===p)c===d||s&&n.data===d||(n.data=d);else{if(l=l&&e.call(n.childNodes),a=(c=_.props||h).dangerouslySetInnerHTML,f=d.dangerouslySetInnerHTML,!s){if(null!=l)for(c={},m=0;m<n.attributes.length;m++)c[n.attributes[m].name]=n.attributes[m].value;(f||a)&&(f&&(a&&f.__html==a.__html||f.__html===n.innerHTML)||(n.innerHTML=f&&f.__html||""))}if(function(e,n,t,_,r){var o;for(o in t)"children"===o||"key"===o||o in n||A(e,o,null,t[o],_);for(o in n)r&&"function"!=typeof n[o]||"children"===o||"key"===o||"value"===o||"checked"===o||t[o]===n[o]||A(e,o,n[o],t[o],_)}(n,d,c,o,s),f)t.__k=[];else if(m=t.props.children,R(n,Array.isArray(m)?m:[m],t,_,r,o&&"foreignObject"!==p,l,i,l?l[0]:_.__k&&E(_,0),s),null!=l)for(m=l.length;m--;)null!=l[m]&&g(l[m]);s||("value"in d&&void 0!==(m=d.value)&&(m!==n.value||"progress"===p&&!m)&&A(n,"value",m,c.value,!1),"checked"in d&&void 0!==(m=d.checked)&&m!==n.checked&&A(n,"checked",m,c.checked,!1))}return n}(r.__e,_,r,o,l,i,s,a);(f=n.diffed)&&f(_)}catch(D){_.__v=null,(a||null!=i)&&(_.__e=u,_.__h=!!a,i[i.indexOf(u)]=null),n.__e(D,_,r)}}function j(e,t){n.__c&&n.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(_){n.__e(_,t.__v)}}))}function C(e,t,_){try{"function"==typeof e?e(t):e.current=t}catch(r){n.__e(r,_)}}function F(e,t,_){var r,o;if(n.unmount&&n.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||C(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(l){n.__e(l,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&F(r[o],t,"function"!=typeof e.type);_||null==e.__e||g(e.__e),e.__e=e.__d=void 0}function M(e,n,t){return this.constructor(e,t)}e=m.slice,n={__e:function(e,n){for(var t,_,r;n=n.__;)if((t=n.__c)&&!t.__)try{if((_=t.constructor)&&null!=_.getDerivedStateFromError&&(t.setState(_.getDerivedStateFromError(e)),r=t.__d),null!=t.componentDidCatch&&(t.componentDidCatch(e),r=t.__d),r)return t.__E=t}catch(o){e=o}throw e}},t=0,w.prototype.setState=function(e,n){var t;t=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=y({},this.state),"function"==typeof e&&(e=e(y({},t),this.props)),e&&y(t,e),null!=e&&this.__v&&(n&&this.__h.push(n),S(this))},w.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),S(this))},w.prototype.render=k,_=[],r="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,P.__r=0;var I,q,W,B=0,$=[],V=n.__b,Q=n.__r,z=n.diffed,G=n.__c,J=n.unmount;function K(e,t){n.__h&&n.__h(q,e,B||t),B=0;var _=q.__H||(q.__H={__:[],__h:[]});return e>=_.__.length&&_.__.push({}),_.__[e]}function X(){$.forEach((function(e){if(e.__P)try{e.__H.__h.forEach(ne),e.__H.__h.forEach(te),e.__H.__h=[]}catch(t){e.__H.__h=[],n.__e(t,e.__v)}})),$=[]}n.__b=function(e){q=null,V&&V(e)},n.__r=function(e){Q&&Q(e),I=0;var n=(q=e.__c).__H;n&&(n.__h.forEach(ne),n.__h.forEach(te),n.__h=[])},n.diffed=function(e){z&&z(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(1!==$.push(t)&&W===n.requestAnimationFrame||((W=n.requestAnimationFrame)||function(e){var n,t=function(){clearTimeout(_),ee&&cancelAnimationFrame(n),setTimeout(e)},_=setTimeout(t,100);ee&&(n=requestAnimationFrame(t))})(X)),q=void 0},n.__c=function(e,t){t.some((function(e){try{e.__h.forEach(ne),e.__h=e.__h.filter((function(e){return!e.__||te(e)}))}catch(_){t.some((function(e){e.__h&&(e.__h=[])})),t=[],n.__e(_,e.__v)}})),G&&G(e,t)},n.unmount=function(e){J&&J(e);var t=e.__c;if(t&&t.__H)try{t.__H.__.forEach(ne)}catch(_){n.__e(_,t.__v)}};var Y,Z,ee="function"==typeof requestAnimationFrame;function ne(e){var n=q;"function"==typeof e.__c&&e.__c(),q=n}function te(e){var n=q;e.__c=e.__(),q=n}function _e(e,n){return"function"==typeof n?n(e):n}(Z=Y||(Y={})).UPVOTE="UPVOTE",Z.FEATURE_REQUESTS_LOADED="FEATURE_REQUESTS_LOADED",Z.HANDLE_ERROR="HANDLE_ERROR";const re={data:{},meta:{from:0,to:0,total:0},links:{prev:null,next:null}},oe=(e,n)=>{switch(console.log(n),n.type){case Y.UPVOTE:return p(d({},e),{data:p(d({},e.data),{[n.id]:p(d({},e.data[n.id]),{votes:e.data[n.id].votes_count+1})})});case Y.FEATURE_REQUESTS_LOADED:return p(d({},e),{data:n.response.data,meta:n.response.meta,links:n.response.links});case Y.HANDLE_ERROR:return p(d({},e),{error:n.error});default:throw new Error("Unexpected action: "+JSON.stringify(n))}};function le(e){const{featureRequest:n}=e;return b("div",{className:"flex py-6 px-4 sm:px-6 gap-4"},b("div",{className:"flex flex-col w-10 items-center"},b("button",{type:"button",className:"flex flex-col items-center rounded-full text-gray-400 hover:text-green-400 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-400 text-sm"},b("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"h-12 w-12 -m-2","aria-hidden":"true"},b("path",{fillRule:"evenodd",d:"M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z",clipRule:"evenodd"}))),b("div",{className:"text-gray-500"})),b("div",{className:"flex flex-col flex-grow justify-between truncate"},b("div",{className:"text-md text-gray-700 font-semibold truncate"},n.title),b("div",{className:"text-sm text-gray-700 truncate"},n.description),b("div",{className:"flex justify-between mt-2"},b("div",{className:"flex gap-2"},b("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800 "},"boombox")),b("div",{className:"flex text-gray-500 text-sm"},n.votes_count,b("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",className:"w-5 h-5"},b("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"}))))))}function ie(e){const{options:{workspace:t,projects:_}}=e,[r,o]=(l=oe,i=re,(u=K(I++,2)).t=l,u.__c||(u.__=[s?s(i):_e(void 0,i),function(e){var n=u.t(u.__[0],e);u.__[0]!==n&&(u.__=[n,u.__[1]],u.__c.setState({}))}],u.__c=q),u.__);var l,i,s,u;const{error:a,data:f,meta:c,links:d}=r;return function(e,t){var _,r,o=K(I++,3);!n.__s&&(_=o.__H,r=t,!_||_.length!==r.length||r.some((function(e,n){return e!==_[n]})))&&(o.__=e,o.__H=t,q.__H.__h.push(o))}((()=>{(()=>{return e=this,n=null,r=function*(){const e=yield fetch(`https://api.feature.ninja/workspaces/${t}/feature-requests${_?`?projects=${_.join(",")}`:""}`),n=yield e.json();if(e.ok)o({type:Y.FEATURE_REQUESTS_LOADED,response:n});else{const n=yield e.text();console.error("Error loading feature requests, response was:",n),o({type:Y.HANDLE_ERROR,error:new Error("Oops, something went wrong when loading the feature requests...")})}},new Promise(((t,_)=>{var o=e=>{try{i(r.next(e))}catch(n){_(n)}},l=e=>{try{i(r.throw(e))}catch(n){_(n)}},i=e=>e.done?t(e.value):Promise.resolve(e.value).then(o,l);i((r=r.apply(e,n)).next())}));var e,n,r})()}),[t,_]),b("div",{className:"fn-max-w-4xl fn-mx-auto fn-sm:px-6 fn-lg:px-8"},a&&b("div",{className:"fn-bg-red-400"},a.message),b("div",{className:"fn-py-4 fn-px-4"},b("span",{className:"fn-sr-only"},"Search..."),b("input",{type:"text",className:"fn-shadow-sm fn-focus:ring-green-400 fn-focus:border-green-400 fn-block fn-p-4 fn-w-full fn-border-gray-300 fn-rounded-md ",placeholder:"Search..."})),b("div",{className:"fn-divide-y fn-divide-gray-200 fn-mt-4"},Object.values(f).map((e=>b(le,{key:e.id,featureRequest:e})))),b("nav",{className:"fn-bg-white fn-px-4 fn-py-3 fn-flex fn-items-center fn-justify-between fn-border-t fn-border-gray-200 fn-sm:px-6","aria-label":"Pagination"},b("div",{className:"fn-hidden fn-sm:block"},b("p",{className:"fn-text-sm fn-text-gray-700"},"Showing ",b("span",{className:"fn-font-medium"},c.from)," to"," ",b("span",{className:"fn-font-medium"},c.to)," of"," ",b("span",{className:"fn-font-medium"},c.total)," results")),b("div",{className:"fn-fn-flex-1 fn-fn-flex fn-fn-justify-between fn-fn-sm:justify-end"},b("button",{className:"fn-relative fn-inline-flex fn-items-center fn-px-4 fn-py-2 fn-border fn-border-gray-300 fn-text-sm fn-font-medium fn-rounded-md fn-text-gray-700 fn-bg-white fn-hover:bg-gray-50 fn-disabled:opacity-25",disabled:null===d.prev},"Previous"),b("button",{className:"fn-ml-3 fn-relative fn-inline-flex fn-items-center fn-px-4 fn-py-2 fn-border fn-border-gray-300 fn-text-sm fn-font-medium fn-rounded-md fn-text-gray-700 fn-bg-white fn-hover:bg-gray-50 fn-disabled:opacity-25",disabled:null===d.next},"Next"))))}const se=document.currentScript;function ue(t){window.addEventListener("DOMContentLoaded",(()=>{var _;const r=d(d({},{elementId:"feature-ninja-widget"}),t);let o=document.getElementById(r.elementId);var l,i,s,u,a,f;o||(o=document.createElement("div"),o.id=r.elementId,se?null==(_=se.parentElement)||_.insertBefore(o,se):document.body.appendChild(o)),l=b(ie,{options:r}),i=o,n.__&&n.__(l,i),a=(u="function"==typeof s)?null:s&&s.__k||i.__k,f=[],U(i,l=(!u&&s||i).__k=b(k,null,[l]),a||h,h,void 0!==i.ownerSVGElement,!u&&s?[s]:a?null:i.firstChild?e.call(i.childNodes):null,f,!u&&s?s:a?a.__e:i.firstChild,u),j(f,l)}))}window.featureNinja=ue,module&&module.exports&&(module.exports=ue),(function () { function styleInject(css,ref){if(ref===void 0){ref={}}var insertAt=ref.insertAt;if(!css||typeof document==="undefined"){return}var head=document.head||document.getElementsByTagName("head")[0];var style=document.createElement("style");style.type="text/css";if(insertAt==="top"){if(head.firstChild){head.insertBefore(style,head.firstChild)}else{head.appendChild(style)}}else{head.appendChild(style)}if(style.styleSheet){style.styleSheet.cssText=css}else{style.appendChild(document.createTextNode(css))}};styleInject(`@import url('https://rsms.me/inter/inter.css'); | ||
@@ -3,0 +3,0 @@ /*! tailwindcss v2.2.16 | MIT License | https://tailwindcss.com */ |
@@ -1,2 +0,2 @@ | ||
var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,n,t)=>n in e?__defProp(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,__spreadValues=(e,n)=>{for(var t in n||(n={}))__hasOwnProp.call(n,t)&&__defNormalProp(e,t,n[t]);if(__getOwnPropSymbols)for(var t of __getOwnPropSymbols(n))__propIsEnum.call(n,t)&&__defNormalProp(e,t,n[t]);return e},__spreadProps=(e,n)=>__defProps(e,__getOwnPropDescs(n)),__async=(e,n,t)=>new Promise(((_,r)=>{var o=e=>{try{s(t.next(e))}catch(n){r(n)}},l=e=>{try{s(t.throw(e))}catch(n){r(n)}},s=e=>e.done?_(e.value):Promise.resolve(e.value).then(o,l);s((t=t.apply(e,n)).next())}));!function(){"use strict";var e,n,t,_,r,o,l={},s=[],i=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function a(e,n){for(var t in n)e[t]=n[t];return e}function u(e){var n=e.parentNode;n&&n.removeChild(e)}function f(n,t,_){var r,o,l,s={};for(l in t)"key"==l?r=t[l]:"ref"==l?o=t[l]:s[l]=t[l];if(arguments.length>2&&(s.children=arguments.length>3?e.call(arguments,2):_),"function"==typeof n&&null!=n.defaultProps)for(l in n.defaultProps)void 0===s[l]&&(s[l]=n.defaultProps[l]);return c(n,s,r,o,null)}function c(e,_,r,o,l){var s={type:e,props:_,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==l?++t:l};return null!=n.vnode&&n.vnode(s),s}function p(e){return e.children}function d(e,n){this.props=e,this.context=n}function h(e,n){if(null==n)return e.__?h(e.__,e.__.__k.indexOf(e)+1):null;for(var t;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e)return t.__e;return"function"==typeof e.type?h(e):null}function m(e){var n,t;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,n=0;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e){e.__e=e.__c.base=t.__e;break}return m(e)}}function v(e){(!e.__d&&(e.__d=!0)&&_.push(e)&&!y.__r++||o!==n.debounceRendering)&&((o=n.debounceRendering)||r)(y)}function y(){for(var e;y.__r=_.length;)e=_.sort((function(e,n){return e.__v.__b-n.__v.__b})),_=[],e.some((function(e){var n,t,_,r,o,l;e.__d&&(o=(r=(n=e).__v).__e,(l=n.__P)&&(t=[],(_=a({},r)).__v=r.__v+1,P(l,r,_,n.__n,void 0!==l.ownerSVGElement,null!=r.__h?[o]:null,t,null==o?h(r):o,r.__h),S(t,r),r.__e!=o&&m(r)))}))}function g(e,n,t,_,r,o,i,a,u,f){var d,m,v,y,g,w,k,E=_&&_.__k||s,N=E.length;for(t.__k=[],d=0;d<n.length;d++)if(null!=(y=t.__k[d]=null==(y=n[d])||"boolean"==typeof y?null:"string"==typeof y||"number"==typeof y||"bigint"==typeof y?c(null,y,null,null,y):Array.isArray(y)?c(p,{children:y},null,null,null):y.__b>0?c(y.type,y.props,y.key,null,y.__v):y)){if(y.__=t,y.__b=t.__b+1,null===(v=E[d])||v&&y.key==v.key&&y.type===v.type)E[d]=void 0;else for(m=0;m<N;m++){if((v=E[m])&&y.key==v.key&&y.type===v.type){E[m]=void 0;break}v=null}P(e,y,v=v||l,r,o,i,a,u,f),g=y.__e,(m=y.ref)&&v.ref!=m&&(k||(k=[]),v.ref&&k.push(v.ref,null,y),k.push(m,y.__c||g,y)),null!=g?(null==w&&(w=g),"function"==typeof y.type&&null!=y.__k&&y.__k===v.__k?y.__d=u=b(y,u,e):u=x(e,y,v,E,g,u),f||"option"!==t.type?"function"==typeof t.type&&(t.__d=u):e.value=""):u&&v.__e==u&&u.parentNode!=e&&(u=h(v))}for(t.__e=w,d=N;d--;)null!=E[d]&&("function"==typeof t.type&&null!=E[d].__e&&E[d].__e==t.__d&&(t.__d=h(_,d+1)),D(E[d],E[d]));if(k)for(d=0;d<k.length;d++)O(k[d],k[++d],k[++d])}function b(e,n,t){var _,r;for(_=0;_<e.__k.length;_++)(r=e.__k[_])&&(r.__=e,n="function"==typeof r.type?b(r,n,t):x(t,r,r,e.__k,r.__e,n));return n}function x(e,n,t,_,r,o){var l,s,i;if(void 0!==n.__d)l=n.__d,n.__d=void 0;else if(null==t||r!=o||null==r.parentNode)e:if(null==o||o.parentNode!==e)e.appendChild(r),l=null;else{for(s=o,i=0;(s=s.nextSibling)&&i<_.length;i+=2)if(s==r)break e;e.insertBefore(r,o),l=o}return void 0!==l?l:r.nextSibling}function w(e,n,t){"-"===n[0]?e.setProperty(n,t):e[n]=null==t?"":"number"!=typeof t||i.test(n)?t:t+"px"}function k(e,n,t,_,r){var o;e:if("style"===n)if("string"==typeof t)e.style.cssText=t;else{if("string"==typeof _&&(e.style.cssText=_=""),_)for(n in _)t&&n in t||w(e.style,n,"");if(t)for(n in t)_&&t[n]===_[n]||w(e.style,n,t[n])}else if("o"===n[0]&&"n"===n[1])o=n!==(n=n.replace(/Capture$/,"")),n=n.toLowerCase()in e?n.toLowerCase().slice(2):n.slice(2),e.l||(e.l={}),e.l[n+o]=t,t?_||e.addEventListener(n,o?N:E,o):e.removeEventListener(n,o?N:E,o);else if("dangerouslySetInnerHTML"!==n){if(r)n=n.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==n&&"list"!==n&&"form"!==n&&"tabIndex"!==n&&"download"!==n&&n in e)try{e[n]=null==t?"":t;break e}catch(l){}"function"==typeof t||(null!=t&&(!1!==t||"a"===n[0]&&"r"===n[1])?e.setAttribute(n,t):e.removeAttribute(n))}}function E(e){this.l[e.type+!1](n.event?n.event(e):e)}function N(e){this.l[e.type+!0](n.event?n.event(e):e)}function P(t,_,r,o,s,i,f,c,m){var v,y,b,x,w,E,N,P,S,O,D,T=_.type;if(void 0!==_.constructor)return null;null!=r.__h&&(m=r.__h,c=_.__e=r.__e,_.__h=null,i=[c]),(v=n.__b)&&v(_);try{e:if("function"==typeof T){if(P=_.props,S=(v=T.contextType)&&o[v.__c],O=v?S?S.props.value:v.__:o,r.__c?N=(y=_.__c=r.__c).__=y.__E:("prototype"in T&&T.prototype.render?_.__c=y=new T(P,O):(_.__c=y=new d(P,O),y.constructor=T,y.render=R),S&&S.sub(y),y.props=P,y.state||(y.state={}),y.context=O,y.__n=o,b=y.__d=!0,y.__h=[]),null==y.__s&&(y.__s=y.state),null!=T.getDerivedStateFromProps&&(y.__s==y.state&&(y.__s=a({},y.__s)),a(y.__s,T.getDerivedStateFromProps(P,y.__s))),x=y.props,w=y.state,b)null==T.getDerivedStateFromProps&&null!=y.componentWillMount&&y.componentWillMount(),null!=y.componentDidMount&&y.__h.push(y.componentDidMount);else{if(null==T.getDerivedStateFromProps&&P!==x&&null!=y.componentWillReceiveProps&&y.componentWillReceiveProps(P,O),!y.__e&&null!=y.shouldComponentUpdate&&!1===y.shouldComponentUpdate(P,y.__s,O)||_.__v===r.__v){y.props=P,y.state=y.__s,_.__v!==r.__v&&(y.__d=!1),y.__v=_,_.__e=r.__e,_.__k=r.__k,_.__k.forEach((function(e){e&&(e.__=_)})),y.__h.length&&f.push(y);break e}null!=y.componentWillUpdate&&y.componentWillUpdate(P,y.__s,O),null!=y.componentDidUpdate&&y.__h.push((function(){y.componentDidUpdate(x,w,E)}))}y.context=O,y.props=P,y.state=y.__s,(v=n.__r)&&v(_),y.__d=!1,y.__v=_,y.__P=t,v=y.render(y.props,y.state,y.context),y.state=y.__s,null!=y.getChildContext&&(o=a(a({},o),y.getChildContext())),b||null==y.getSnapshotBeforeUpdate||(E=y.getSnapshotBeforeUpdate(x,w)),D=null!=v&&v.type===p&&null==v.key?v.props.children:v,g(t,Array.isArray(D)?D:[D],_,r,o,s,i,f,c,m),y.base=_.__e,_.__h=null,y.__h.length&&f.push(y),N&&(y.__E=y.__=null),y.__e=!1}else null==i&&_.__v===r.__v?(_.__k=r.__k,_.__e=r.__e):_.__e=function(n,t,_,r,o,s,i,a){var f,c,p,d=_.props,m=t.props,v=t.type,y=0;if("svg"===v&&(o=!0),null!=s)for(;y<s.length;y++)if((f=s[y])&&(f===n||(v?f.localName==v:3==f.nodeType))){n=f,s[y]=null;break}if(null==n){if(null===v)return document.createTextNode(m);n=o?document.createElementNS("http://www.w3.org/2000/svg",v):document.createElement(v,m.is&&m),s=null,a=!1}if(null===v)d===m||a&&n.data===m||(n.data=m);else{if(s=s&&e.call(n.childNodes),c=(d=_.props||l).dangerouslySetInnerHTML,p=m.dangerouslySetInnerHTML,!a){if(null!=s)for(d={},y=0;y<n.attributes.length;y++)d[n.attributes[y].name]=n.attributes[y].value;(p||c)&&(p&&(c&&p.__html==c.__html||p.__html===n.innerHTML)||(n.innerHTML=p&&p.__html||""))}if(function(e,n,t,_,r){var o;for(o in t)"children"===o||"key"===o||o in n||k(e,o,null,t[o],_);for(o in n)r&&"function"!=typeof n[o]||"children"===o||"key"===o||"value"===o||"checked"===o||t[o]===n[o]||k(e,o,n[o],t[o],_)}(n,m,d,o,a),p)t.__k=[];else if(y=t.props.children,g(n,Array.isArray(y)?y:[y],t,_,r,o&&"foreignObject"!==v,s,i,s?s[0]:_.__k&&h(_,0),a),null!=s)for(y=s.length;y--;)null!=s[y]&&u(s[y]);a||("value"in m&&void 0!==(y=m.value)&&(y!==n.value||"progress"===v&&!y)&&k(n,"value",y,d.value,!1),"checked"in m&&void 0!==(y=m.checked)&&y!==n.checked&&k(n,"checked",y,d.checked,!1))}return n}(r.__e,_,r,o,s,i,f,m);(v=n.diffed)&&v(_)}catch(A){_.__v=null,(m||null!=i)&&(_.__e=c,_.__h=!!m,i[i.indexOf(c)]=null),n.__e(A,_,r)}}function S(e,t){n.__c&&n.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(_){n.__e(_,t.__v)}}))}function O(e,t,_){try{"function"==typeof e?e(t):e.current=t}catch(r){n.__e(r,_)}}function D(e,t,_){var r,o;if(n.unmount&&n.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||O(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(l){n.__e(l,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&D(r[o],t,"function"!=typeof e.type);_||null==e.__e||u(e.__e),e.__e=e.__d=void 0}function R(e,n,t){return this.constructor(e,t)}e=s.slice,n={__e:function(e,n){for(var t,_,r;n=n.__;)if((t=n.__c)&&!t.__)try{if((_=t.constructor)&&null!=_.getDerivedStateFromError&&(t.setState(_.getDerivedStateFromError(e)),r=t.__d),null!=t.componentDidCatch&&(t.componentDidCatch(e),r=t.__d),r)return t.__E=t}catch(o){e=o}throw e}},t=0,d.prototype.setState=function(e,n){var t;t=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=a({},this.state),"function"==typeof e&&(e=e(a({},t),this.props)),e&&a(t,e),null!=e&&this.__v&&(n&&this.__h.push(n),v(this))},d.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),v(this))},d.prototype.render=p,_=[],r="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,y.__r=0;var T,A,H,L=0,U=[],j=n.__b,C=n.__r,F=n.diffed,M=n.__c,V=n.unmount;function I(e,t){n.__h&&n.__h(A,e,L||t),L=0;var _=A.__H||(A.__H={__:[],__h:[]});return e>=_.__.length&&_.__.push({}),_.__[e]}function q(){U.forEach((function(e){if(e.__P)try{e.__H.__h.forEach(Q),e.__H.__h.forEach(z),e.__H.__h=[]}catch(t){e.__H.__h=[],n.__e(t,e.__v)}})),U=[]}n.__b=function(e){A=null,j&&j(e)},n.__r=function(e){C&&C(e),T=0;var n=(A=e.__c).__H;n&&(n.__h.forEach(Q),n.__h.forEach(z),n.__h=[])},n.diffed=function(e){F&&F(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(1!==U.push(t)&&H===n.requestAnimationFrame||((H=n.requestAnimationFrame)||function(e){var n,t=function(){clearTimeout(_),$&&cancelAnimationFrame(n),setTimeout(e)},_=setTimeout(t,100);$&&(n=requestAnimationFrame(t))})(q)),A=void 0},n.__c=function(e,t){t.some((function(e){try{e.__h.forEach(Q),e.__h=e.__h.filter((function(e){return!e.__||z(e)}))}catch(_){t.some((function(e){e.__h&&(e.__h=[])})),t=[],n.__e(_,e.__v)}})),M&&M(e,t)},n.unmount=function(e){V&&V(e);var t=e.__c;if(t&&t.__H)try{t.__H.__.forEach(Q)}catch(_){n.__e(_,t.__v)}};var W,B,$="function"==typeof requestAnimationFrame;function Q(e){var n=A;"function"==typeof e.__c&&e.__c(),A=n}function z(e){var n=A;e.__c=e.__(),A=n}function G(e,n){return"function"==typeof n?n(e):n}(B=W||(W={})).UPVOTE="UPVOTE",B.FEATURE_REQUESTS_LOADED="FEATURE_REQUESTS_LOADED",B.HANDLE_ERROR="HANDLE_ERROR";const J={data:{},meta:{from:0,to:0,total:0},links:{prev:null,next:null}},K=(e,n)=>{switch(console.log(n),n.type){case W.UPVOTE:return __spreadProps(__spreadValues({},e),{data:__spreadProps(__spreadValues({},e.data),{[n.id]:__spreadProps(__spreadValues({},e.data[n.id]),{votes:e.data[n.id].votes_count+1})})});case W.FEATURE_REQUESTS_LOADED:return __spreadProps(__spreadValues({},e),{data:n.response.data,meta:n.response.meta,links:n.response.links});case W.HANDLE_ERROR:return __spreadProps(__spreadValues({},e),{error:n.error});default:throw new Error("Unexpected action: "+JSON.stringify(n))}};function X(e){const{featureRequest:n}=e;return f("div",{className:"flex py-6 px-4 sm:px-6 gap-4"},f("div",{className:"flex flex-col w-10 items-center"},f("button",{type:"button",className:"flex flex-col items-center rounded-full text-gray-400 hover:text-green-400 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-400 text-sm"},f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"h-12 w-12 -m-2","aria-hidden":"true"},f("path",{fillRule:"evenodd",d:"M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z",clipRule:"evenodd"}))),f("div",{className:"text-gray-500"})),f("div",{className:"flex flex-col flex-grow justify-between truncate"},f("div",{className:"text-md text-gray-700 font-semibold truncate"},n.title),f("div",{className:"text-sm text-gray-700 truncate"},n.description),f("div",{className:"flex justify-between mt-2"},f("div",{className:"flex gap-2"},f("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800 "},"boombox")),f("div",{className:"flex text-gray-500 text-sm"},n.votes_count,f("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",className:"w-5 h-5"},f("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"}))))))}function Y(e){const{options:{workspace:t,projects:_}}=e,[r,o]=(l=K,s=J,(a=I(T++,2)).t=l,a.__c||(a.__=[i?i(s):G(void 0,s),function(e){var n=a.t(a.__[0],e);a.__[0]!==n&&(a.__=[n,a.__[1]],a.__c.setState({}))}],a.__c=A),a.__);var l,s,i,a;const{error:u,data:c,meta:p,links:d}=r;return function(e,t){var _,r,o=I(T++,3);!n.__s&&(_=o.__H,r=t,!_||_.length!==r.length||r.some((function(e,n){return e!==_[n]})))&&(o.__=e,o.__H=t,A.__H.__h.push(o))}((()=>{(()=>{__async(this,null,(function*(){const e=yield fetch(`https://api.feature.ninja/workspaces/${t}/feature-requests${_?`?projects=${_.join(",")}`:""}`),n=yield e.json();if(e.ok)o({type:W.FEATURE_REQUESTS_LOADED,response:n});else{const n=yield e.text();console.error("Error loading feature requests, response was:",n),o({type:W.HANDLE_ERROR,error:new Error("Oops, something went wrong when loading the feature requests...")})}}))})()}),[t,_]),f("div",{className:"fn-max-w-4xl fn-mx-auto fn-sm:px-6 fn-lg:px-8"},u&&f("div",{className:"fn-bg-red-400"},u.message),f("div",{className:"fn-py-4 fn-px-4"},f("span",{className:"fn-sr-only"},"Search..."),f("input",{type:"text",className:"fn-shadow-sm fn-focus:ring-green-400 fn-focus:border-green-400 fn-block fn-p-4 fn-w-full fn-border-gray-300 fn-rounded-md ",placeholder:"Search..."})),f("div",{className:"fn-divide-y fn-divide-gray-200 fn-mt-4"},Object.values(c).map((e=>f(X,{key:e.id,featureRequest:e})))),f("nav",{className:"fn-bg-white fn-px-4 fn-py-3 fn-flex fn-items-center fn-justify-between fn-border-t fn-border-gray-200 fn-sm:px-6","aria-label":"Pagination"},f("div",{className:"fn-hidden fn-sm:block"},f("p",{className:"fn-text-sm fn-text-gray-700"},"Showing ",f("span",{className:"fn-font-medium"},p.from)," to"," ",f("span",{className:"fn-font-medium"},p.to)," of"," ",f("span",{className:"fn-font-medium"},p.total)," results")),f("div",{className:"fn-fn-flex-1 fn-fn-flex fn-fn-justify-between fn-fn-sm:justify-end"},f("button",{className:"fn-relative fn-inline-flex fn-items-center fn-px-4 fn-py-2 fn-border fn-border-gray-300 fn-text-sm fn-font-medium fn-rounded-md fn-text-gray-700 fn-bg-white fn-hover:bg-gray-50 fn-disabled:opacity-25",disabled:null===d.prev},"Previous"),f("button",{className:"fn-ml-3 fn-relative fn-inline-flex fn-items-center fn-px-4 fn-py-2 fn-border fn-border-gray-300 fn-text-sm fn-font-medium fn-rounded-md fn-text-gray-700 fn-bg-white fn-hover:bg-gray-50 fn-disabled:opacity-25",disabled:null===d.next},"Next"))))}const Z=document.currentScript;function ee(t){window.addEventListener("DOMContentLoaded",(()=>{const _=__spreadValues(__spreadValues({},{elementId:"feature-ninja-widget"}),t);let r=document.getElementById(_.elementId);var o,s,i,a,u,c;r||(r=document.createElement("div"),r.id=_.elementId,Z?Z.insertBefore(r,Z):document.body.appendChild(r)),o=f(Y,{options:_}),s=r,n.__&&n.__(o,s),u=(a="function"==typeof i)?null:i&&i.__k||s.__k,c=[],P(s,o=(!a&&i||s).__k=f(p,null,[o]),u||l,l,void 0!==s.ownerSVGElement,!a&&i?[i]:u?null:s.firstChild?e.call(s.childNodes):null,c,!a&&i?i:u?u.__e:s.firstChild,a),S(c,o)}))}window.featureNinja=ee,module&&module.exports&&(module.exports=ee),(function () { function styleInject(css,ref){if(ref===void 0){ref={}}var insertAt=ref.insertAt;if(!css||typeof document==="undefined"){return}var head=document.head||document.getElementsByTagName("head")[0];var style=document.createElement("style");style.type="text/css";if(insertAt==="top"){if(head.firstChild){head.insertBefore(style,head.firstChild)}else{head.appendChild(style)}}else{head.appendChild(style)}if(style.styleSheet){style.styleSheet.cssText=css}else{style.appendChild(document.createTextNode(css))}};styleInject(`@import url('https://rsms.me/inter/inter.css'); | ||
var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,n,t)=>n in e?__defProp(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,__spreadValues=(e,n)=>{for(var t in n||(n={}))__hasOwnProp.call(n,t)&&__defNormalProp(e,t,n[t]);if(__getOwnPropSymbols)for(var t of __getOwnPropSymbols(n))__propIsEnum.call(n,t)&&__defNormalProp(e,t,n[t]);return e},__spreadProps=(e,n)=>__defProps(e,__getOwnPropDescs(n)),__async=(e,n,t)=>new Promise(((_,r)=>{var o=e=>{try{s(t.next(e))}catch(n){r(n)}},l=e=>{try{s(t.throw(e))}catch(n){r(n)}},s=e=>e.done?_(e.value):Promise.resolve(e.value).then(o,l);s((t=t.apply(e,n)).next())}));!function(){"use strict";var e,n,t,_,r,o,l={},s=[],i=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function a(e,n){for(var t in n)e[t]=n[t];return e}function u(e){var n=e.parentNode;n&&n.removeChild(e)}function f(n,t,_){var r,o,l,s={};for(l in t)"key"==l?r=t[l]:"ref"==l?o=t[l]:s[l]=t[l];if(arguments.length>2&&(s.children=arguments.length>3?e.call(arguments,2):_),"function"==typeof n&&null!=n.defaultProps)for(l in n.defaultProps)void 0===s[l]&&(s[l]=n.defaultProps[l]);return c(n,s,r,o,null)}function c(e,_,r,o,l){var s={type:e,props:_,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==l?++t:l};return null!=n.vnode&&n.vnode(s),s}function p(e){return e.children}function d(e,n){this.props=e,this.context=n}function h(e,n){if(null==n)return e.__?h(e.__,e.__.__k.indexOf(e)+1):null;for(var t;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e)return t.__e;return"function"==typeof e.type?h(e):null}function m(e){var n,t;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,n=0;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e){e.__e=e.__c.base=t.__e;break}return m(e)}}function v(e){(!e.__d&&(e.__d=!0)&&_.push(e)&&!y.__r++||o!==n.debounceRendering)&&((o=n.debounceRendering)||r)(y)}function y(){for(var e;y.__r=_.length;)e=_.sort((function(e,n){return e.__v.__b-n.__v.__b})),_=[],e.some((function(e){var n,t,_,r,o,l;e.__d&&(o=(r=(n=e).__v).__e,(l=n.__P)&&(t=[],(_=a({},r)).__v=r.__v+1,P(l,r,_,n.__n,void 0!==l.ownerSVGElement,null!=r.__h?[o]:null,t,null==o?h(r):o,r.__h),S(t,r),r.__e!=o&&m(r)))}))}function g(e,n,t,_,r,o,i,a,u,f){var d,m,v,y,g,w,k,E=_&&_.__k||s,N=E.length;for(t.__k=[],d=0;d<n.length;d++)if(null!=(y=t.__k[d]=null==(y=n[d])||"boolean"==typeof y?null:"string"==typeof y||"number"==typeof y||"bigint"==typeof y?c(null,y,null,null,y):Array.isArray(y)?c(p,{children:y},null,null,null):y.__b>0?c(y.type,y.props,y.key,null,y.__v):y)){if(y.__=t,y.__b=t.__b+1,null===(v=E[d])||v&&y.key==v.key&&y.type===v.type)E[d]=void 0;else for(m=0;m<N;m++){if((v=E[m])&&y.key==v.key&&y.type===v.type){E[m]=void 0;break}v=null}P(e,y,v=v||l,r,o,i,a,u,f),g=y.__e,(m=y.ref)&&v.ref!=m&&(k||(k=[]),v.ref&&k.push(v.ref,null,y),k.push(m,y.__c||g,y)),null!=g?(null==w&&(w=g),"function"==typeof y.type&&null!=y.__k&&y.__k===v.__k?y.__d=u=b(y,u,e):u=x(e,y,v,E,g,u),f||"option"!==t.type?"function"==typeof t.type&&(t.__d=u):e.value=""):u&&v.__e==u&&u.parentNode!=e&&(u=h(v))}for(t.__e=w,d=N;d--;)null!=E[d]&&("function"==typeof t.type&&null!=E[d].__e&&E[d].__e==t.__d&&(t.__d=h(_,d+1)),D(E[d],E[d]));if(k)for(d=0;d<k.length;d++)O(k[d],k[++d],k[++d])}function b(e,n,t){var _,r;for(_=0;_<e.__k.length;_++)(r=e.__k[_])&&(r.__=e,n="function"==typeof r.type?b(r,n,t):x(t,r,r,e.__k,r.__e,n));return n}function x(e,n,t,_,r,o){var l,s,i;if(void 0!==n.__d)l=n.__d,n.__d=void 0;else if(null==t||r!=o||null==r.parentNode)e:if(null==o||o.parentNode!==e)e.appendChild(r),l=null;else{for(s=o,i=0;(s=s.nextSibling)&&i<_.length;i+=2)if(s==r)break e;e.insertBefore(r,o),l=o}return void 0!==l?l:r.nextSibling}function w(e,n,t){"-"===n[0]?e.setProperty(n,t):e[n]=null==t?"":"number"!=typeof t||i.test(n)?t:t+"px"}function k(e,n,t,_,r){var o;e:if("style"===n)if("string"==typeof t)e.style.cssText=t;else{if("string"==typeof _&&(e.style.cssText=_=""),_)for(n in _)t&&n in t||w(e.style,n,"");if(t)for(n in t)_&&t[n]===_[n]||w(e.style,n,t[n])}else if("o"===n[0]&&"n"===n[1])o=n!==(n=n.replace(/Capture$/,"")),n=n.toLowerCase()in e?n.toLowerCase().slice(2):n.slice(2),e.l||(e.l={}),e.l[n+o]=t,t?_||e.addEventListener(n,o?N:E,o):e.removeEventListener(n,o?N:E,o);else if("dangerouslySetInnerHTML"!==n){if(r)n=n.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==n&&"list"!==n&&"form"!==n&&"tabIndex"!==n&&"download"!==n&&n in e)try{e[n]=null==t?"":t;break e}catch(l){}"function"==typeof t||(null!=t&&(!1!==t||"a"===n[0]&&"r"===n[1])?e.setAttribute(n,t):e.removeAttribute(n))}}function E(e){this.l[e.type+!1](n.event?n.event(e):e)}function N(e){this.l[e.type+!0](n.event?n.event(e):e)}function P(t,_,r,o,s,i,f,c,m){var v,y,b,x,w,E,N,P,S,O,D,T=_.type;if(void 0!==_.constructor)return null;null!=r.__h&&(m=r.__h,c=_.__e=r.__e,_.__h=null,i=[c]),(v=n.__b)&&v(_);try{e:if("function"==typeof T){if(P=_.props,S=(v=T.contextType)&&o[v.__c],O=v?S?S.props.value:v.__:o,r.__c?N=(y=_.__c=r.__c).__=y.__E:("prototype"in T&&T.prototype.render?_.__c=y=new T(P,O):(_.__c=y=new d(P,O),y.constructor=T,y.render=R),S&&S.sub(y),y.props=P,y.state||(y.state={}),y.context=O,y.__n=o,b=y.__d=!0,y.__h=[]),null==y.__s&&(y.__s=y.state),null!=T.getDerivedStateFromProps&&(y.__s==y.state&&(y.__s=a({},y.__s)),a(y.__s,T.getDerivedStateFromProps(P,y.__s))),x=y.props,w=y.state,b)null==T.getDerivedStateFromProps&&null!=y.componentWillMount&&y.componentWillMount(),null!=y.componentDidMount&&y.__h.push(y.componentDidMount);else{if(null==T.getDerivedStateFromProps&&P!==x&&null!=y.componentWillReceiveProps&&y.componentWillReceiveProps(P,O),!y.__e&&null!=y.shouldComponentUpdate&&!1===y.shouldComponentUpdate(P,y.__s,O)||_.__v===r.__v){y.props=P,y.state=y.__s,_.__v!==r.__v&&(y.__d=!1),y.__v=_,_.__e=r.__e,_.__k=r.__k,_.__k.forEach((function(e){e&&(e.__=_)})),y.__h.length&&f.push(y);break e}null!=y.componentWillUpdate&&y.componentWillUpdate(P,y.__s,O),null!=y.componentDidUpdate&&y.__h.push((function(){y.componentDidUpdate(x,w,E)}))}y.context=O,y.props=P,y.state=y.__s,(v=n.__r)&&v(_),y.__d=!1,y.__v=_,y.__P=t,v=y.render(y.props,y.state,y.context),y.state=y.__s,null!=y.getChildContext&&(o=a(a({},o),y.getChildContext())),b||null==y.getSnapshotBeforeUpdate||(E=y.getSnapshotBeforeUpdate(x,w)),D=null!=v&&v.type===p&&null==v.key?v.props.children:v,g(t,Array.isArray(D)?D:[D],_,r,o,s,i,f,c,m),y.base=_.__e,_.__h=null,y.__h.length&&f.push(y),N&&(y.__E=y.__=null),y.__e=!1}else null==i&&_.__v===r.__v?(_.__k=r.__k,_.__e=r.__e):_.__e=function(n,t,_,r,o,s,i,a){var f,c,p,d=_.props,m=t.props,v=t.type,y=0;if("svg"===v&&(o=!0),null!=s)for(;y<s.length;y++)if((f=s[y])&&(f===n||(v?f.localName==v:3==f.nodeType))){n=f,s[y]=null;break}if(null==n){if(null===v)return document.createTextNode(m);n=o?document.createElementNS("http://www.w3.org/2000/svg",v):document.createElement(v,m.is&&m),s=null,a=!1}if(null===v)d===m||a&&n.data===m||(n.data=m);else{if(s=s&&e.call(n.childNodes),c=(d=_.props||l).dangerouslySetInnerHTML,p=m.dangerouslySetInnerHTML,!a){if(null!=s)for(d={},y=0;y<n.attributes.length;y++)d[n.attributes[y].name]=n.attributes[y].value;(p||c)&&(p&&(c&&p.__html==c.__html||p.__html===n.innerHTML)||(n.innerHTML=p&&p.__html||""))}if(function(e,n,t,_,r){var o;for(o in t)"children"===o||"key"===o||o in n||k(e,o,null,t[o],_);for(o in n)r&&"function"!=typeof n[o]||"children"===o||"key"===o||"value"===o||"checked"===o||t[o]===n[o]||k(e,o,n[o],t[o],_)}(n,m,d,o,a),p)t.__k=[];else if(y=t.props.children,g(n,Array.isArray(y)?y:[y],t,_,r,o&&"foreignObject"!==v,s,i,s?s[0]:_.__k&&h(_,0),a),null!=s)for(y=s.length;y--;)null!=s[y]&&u(s[y]);a||("value"in m&&void 0!==(y=m.value)&&(y!==n.value||"progress"===v&&!y)&&k(n,"value",y,d.value,!1),"checked"in m&&void 0!==(y=m.checked)&&y!==n.checked&&k(n,"checked",y,d.checked,!1))}return n}(r.__e,_,r,o,s,i,f,m);(v=n.diffed)&&v(_)}catch(A){_.__v=null,(m||null!=i)&&(_.__e=c,_.__h=!!m,i[i.indexOf(c)]=null),n.__e(A,_,r)}}function S(e,t){n.__c&&n.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(_){n.__e(_,t.__v)}}))}function O(e,t,_){try{"function"==typeof e?e(t):e.current=t}catch(r){n.__e(r,_)}}function D(e,t,_){var r,o;if(n.unmount&&n.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||O(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(l){n.__e(l,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&D(r[o],t,"function"!=typeof e.type);_||null==e.__e||u(e.__e),e.__e=e.__d=void 0}function R(e,n,t){return this.constructor(e,t)}e=s.slice,n={__e:function(e,n){for(var t,_,r;n=n.__;)if((t=n.__c)&&!t.__)try{if((_=t.constructor)&&null!=_.getDerivedStateFromError&&(t.setState(_.getDerivedStateFromError(e)),r=t.__d),null!=t.componentDidCatch&&(t.componentDidCatch(e),r=t.__d),r)return t.__E=t}catch(o){e=o}throw e}},t=0,d.prototype.setState=function(e,n){var t;t=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=a({},this.state),"function"==typeof e&&(e=e(a({},t),this.props)),e&&a(t,e),null!=e&&this.__v&&(n&&this.__h.push(n),v(this))},d.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),v(this))},d.prototype.render=p,_=[],r="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,y.__r=0;var T,A,H,L=0,U=[],j=n.__b,C=n.__r,F=n.diffed,M=n.__c,V=n.unmount;function I(e,t){n.__h&&n.__h(A,e,L||t),L=0;var _=A.__H||(A.__H={__:[],__h:[]});return e>=_.__.length&&_.__.push({}),_.__[e]}function q(){U.forEach((function(e){if(e.__P)try{e.__H.__h.forEach(Q),e.__H.__h.forEach(z),e.__H.__h=[]}catch(t){e.__H.__h=[],n.__e(t,e.__v)}})),U=[]}n.__b=function(e){A=null,j&&j(e)},n.__r=function(e){C&&C(e),T=0;var n=(A=e.__c).__H;n&&(n.__h.forEach(Q),n.__h.forEach(z),n.__h=[])},n.diffed=function(e){F&&F(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(1!==U.push(t)&&H===n.requestAnimationFrame||((H=n.requestAnimationFrame)||function(e){var n,t=function(){clearTimeout(_),$&&cancelAnimationFrame(n),setTimeout(e)},_=setTimeout(t,100);$&&(n=requestAnimationFrame(t))})(q)),A=void 0},n.__c=function(e,t){t.some((function(e){try{e.__h.forEach(Q),e.__h=e.__h.filter((function(e){return!e.__||z(e)}))}catch(_){t.some((function(e){e.__h&&(e.__h=[])})),t=[],n.__e(_,e.__v)}})),M&&M(e,t)},n.unmount=function(e){V&&V(e);var t=e.__c;if(t&&t.__H)try{t.__H.__.forEach(Q)}catch(_){n.__e(_,t.__v)}};var W,B,$="function"==typeof requestAnimationFrame;function Q(e){var n=A;"function"==typeof e.__c&&e.__c(),A=n}function z(e){var n=A;e.__c=e.__(),A=n}function G(e,n){return"function"==typeof n?n(e):n}(B=W||(W={})).UPVOTE="UPVOTE",B.FEATURE_REQUESTS_LOADED="FEATURE_REQUESTS_LOADED",B.HANDLE_ERROR="HANDLE_ERROR";const J={data:{},meta:{from:0,to:0,total:0},links:{prev:null,next:null}},K=(e,n)=>{switch(console.log(n),n.type){case W.UPVOTE:return __spreadProps(__spreadValues({},e),{data:__spreadProps(__spreadValues({},e.data),{[n.id]:__spreadProps(__spreadValues({},e.data[n.id]),{votes:e.data[n.id].votes_count+1})})});case W.FEATURE_REQUESTS_LOADED:return __spreadProps(__spreadValues({},e),{data:n.response.data,meta:n.response.meta,links:n.response.links});case W.HANDLE_ERROR:return __spreadProps(__spreadValues({},e),{error:n.error});default:throw new Error("Unexpected action: "+JSON.stringify(n))}};function X(e){const{featureRequest:n}=e;return f("div",{className:"flex py-6 px-4 sm:px-6 gap-4"},f("div",{className:"flex flex-col w-10 items-center"},f("button",{type:"button",className:"flex flex-col items-center rounded-full text-gray-400 hover:text-green-400 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-400 text-sm"},f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"h-12 w-12 -m-2","aria-hidden":"true"},f("path",{fillRule:"evenodd",d:"M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z",clipRule:"evenodd"}))),f("div",{className:"text-gray-500"})),f("div",{className:"flex flex-col flex-grow justify-between truncate"},f("div",{className:"text-md text-gray-700 font-semibold truncate"},n.title),f("div",{className:"text-sm text-gray-700 truncate"},n.description),f("div",{className:"flex justify-between mt-2"},f("div",{className:"flex gap-2"},f("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800 "},"boombox")),f("div",{className:"flex text-gray-500 text-sm"},n.votes_count,f("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",className:"w-5 h-5"},f("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"}))))))}function Y(e){const{options:{workspace:t,projects:_}}=e,[r,o]=(l=K,s=J,(a=I(T++,2)).t=l,a.__c||(a.__=[i?i(s):G(void 0,s),function(e){var n=a.t(a.__[0],e);a.__[0]!==n&&(a.__=[n,a.__[1]],a.__c.setState({}))}],a.__c=A),a.__);var l,s,i,a;const{error:u,data:c,meta:p,links:d}=r;return function(e,t){var _,r,o=I(T++,3);!n.__s&&(_=o.__H,r=t,!_||_.length!==r.length||r.some((function(e,n){return e!==_[n]})))&&(o.__=e,o.__H=t,A.__H.__h.push(o))}((()=>{(()=>{__async(this,null,(function*(){const e=yield fetch(`https://api.feature.ninja/workspaces/${t}/feature-requests${_?`?projects=${_.join(",")}`:""}`),n=yield e.json();if(e.ok)o({type:W.FEATURE_REQUESTS_LOADED,response:n});else{const n=yield e.text();console.error("Error loading feature requests, response was:",n),o({type:W.HANDLE_ERROR,error:new Error("Oops, something went wrong when loading the feature requests...")})}}))})()}),[t,_]),f("div",{className:"fn-max-w-4xl fn-mx-auto fn-sm:px-6 fn-lg:px-8"},u&&f("div",{className:"fn-bg-red-400"},u.message),f("div",{className:"fn-py-4 fn-px-4"},f("span",{className:"fn-sr-only"},"Search..."),f("input",{type:"text",className:"fn-shadow-sm fn-focus:ring-green-400 fn-focus:border-green-400 fn-block fn-p-4 fn-w-full fn-border-gray-300 fn-rounded-md ",placeholder:"Search..."})),f("div",{className:"fn-divide-y fn-divide-gray-200 fn-mt-4"},Object.values(c).map((e=>f(X,{key:e.id,featureRequest:e})))),f("nav",{className:"fn-bg-white fn-px-4 fn-py-3 fn-flex fn-items-center fn-justify-between fn-border-t fn-border-gray-200 fn-sm:px-6","aria-label":"Pagination"},f("div",{className:"fn-hidden fn-sm:block"},f("p",{className:"fn-text-sm fn-text-gray-700"},"Showing ",f("span",{className:"fn-font-medium"},p.from)," to"," ",f("span",{className:"fn-font-medium"},p.to)," of"," ",f("span",{className:"fn-font-medium"},p.total)," results")),f("div",{className:"fn-fn-flex-1 fn-fn-flex fn-fn-justify-between fn-fn-sm:justify-end"},f("button",{className:"fn-relative fn-inline-flex fn-items-center fn-px-4 fn-py-2 fn-border fn-border-gray-300 fn-text-sm fn-font-medium fn-rounded-md fn-text-gray-700 fn-bg-white fn-hover:bg-gray-50 fn-disabled:opacity-25",disabled:null===d.prev},"Previous"),f("button",{className:"fn-ml-3 fn-relative fn-inline-flex fn-items-center fn-px-4 fn-py-2 fn-border fn-border-gray-300 fn-text-sm fn-font-medium fn-rounded-md fn-text-gray-700 fn-bg-white fn-hover:bg-gray-50 fn-disabled:opacity-25",disabled:null===d.next},"Next"))))}const Z=document.currentScript;function ee(t){window.addEventListener("DOMContentLoaded",(()=>{var _;const r=__spreadValues(__spreadValues({},{elementId:"feature-ninja-widget"}),t);let o=document.getElementById(r.elementId);var s,i,a,u,c,d;o||(o=document.createElement("div"),o.id=r.elementId,Z?null==(_=Z.parentElement)||_.insertBefore(o,Z):document.body.appendChild(o)),s=f(Y,{options:r}),i=o,n.__&&n.__(s,i),c=(u="function"==typeof a)?null:a&&a.__k||i.__k,d=[],P(i,s=(!u&&a||i).__k=f(p,null,[s]),c||l,l,void 0!==i.ownerSVGElement,!u&&a?[a]:c?null:i.firstChild?e.call(i.childNodes):null,d,!u&&a?a:c?c.__e:i.firstChild,u),S(d,s)}))}window.featureNinja=ee,module&&module.exports&&(module.exports=ee),(function () { function styleInject(css,ref){if(ref===void 0){ref={}}var insertAt=ref.insertAt;if(!css||typeof document==="undefined"){return}var head=document.head||document.getElementsByTagName("head")[0];var style=document.createElement("style");style.type="text/css";if(insertAt==="top"){if(head.firstChild){head.insertBefore(style,head.firstChild)}else{head.appendChild(style)}}else{head.appendChild(style)}if(style.styleSheet){style.styleSheet.cssText=css}else{style.appendChild(document.createTextNode(css))}};styleInject(`@import url('https://rsms.me/inter/inter.css'); | ||
@@ -3,0 +3,0 @@ /*! tailwindcss v2.2.16 | MIT License | https://tailwindcss.com */ |
@@ -730,11 +730,13 @@ "use strict"; | ||
window.addEventListener("DOMContentLoaded", function () { | ||
var _ = __spreadValues(__spreadValues({}, { | ||
var _; | ||
var r = __spreadValues(__spreadValues({}, { | ||
elementId: "feature-ninja-widget" | ||
}), t); | ||
var r = document.getElementById(_.elementId); | ||
var o, s, i, a, u, c; | ||
r || (r = document.createElement("div"), r.id = _.elementId, Z ? Z.insertBefore(r, Z) : document.body.appendChild(r)), o = f(Y, { | ||
options: _ | ||
}), s = r, n.__ && n.__(o, s), u = (a = "function" == typeof i) ? null : i && i.__k || s.__k, c = [], P(s, o = (!a && i || s).__k = f(p, null, [o]), u || l, l, void 0 !== s.ownerSVGElement, !a && i ? [i] : u ? null : s.firstChild ? e.call(s.childNodes) : null, c, !a && i ? i : u ? u.__e : s.firstChild, a), S(c, o); | ||
var o = document.getElementById(r.elementId); | ||
var s, i, a, u, c, d; | ||
o || (o = document.createElement("div"), o.id = r.elementId, Z ? null == (_ = Z.parentElement) || _.insertBefore(o, Z) : document.body.appendChild(o)), s = f(Y, { | ||
options: r | ||
}), i = o, n.__ && n.__(s, i), c = (u = "function" == typeof a) ? null : a && a.__k || i.__k, d = [], P(i, s = (!u && a || i).__k = f(p, null, [s]), c || l, l, void 0 !== i.ownerSVGElement, !u && a ? [a] : c ? null : i.firstChild ? e.call(i.childNodes) : null, d, !u && a ? a : c ? c.__e : i.firstChild, u), S(d, s); | ||
}); | ||
@@ -741,0 +743,0 @@ } |
@@ -732,11 +732,13 @@ "use strict"; | ||
window.addEventListener("DOMContentLoaded", function () { | ||
var _ = __spreadValues(__spreadValues({}, { | ||
var _; | ||
var r = __spreadValues(__spreadValues({}, { | ||
elementId: "feature-ninja-widget" | ||
}), t); | ||
var r = document.getElementById(_.elementId); | ||
var o, s, i, a, u, c; | ||
r || (r = document.createElement("div"), r.id = _.elementId, Z ? Z.insertBefore(r, Z) : document.body.appendChild(r)), o = f(Y, { | ||
options: _ | ||
}), s = r, n.__ && n.__(o, s), u = (a = "function" == typeof i) ? null : i && i.__k || s.__k, c = [], P(s, o = (!a && i || s).__k = f(p, null, [o]), u || l, l, void 0 !== s.ownerSVGElement, !a && i ? [i] : u ? null : s.firstChild ? e.call(s.childNodes) : null, c, !a && i ? i : u ? u.__e : s.firstChild, a), S(c, o); | ||
var o = document.getElementById(r.elementId); | ||
var s, i, a, u, c, d; | ||
o || (o = document.createElement("div"), o.id = r.elementId, Z ? null == (_ = Z.parentElement) || _.insertBefore(o, Z) : document.body.appendChild(o)), s = f(Y, { | ||
options: r | ||
}), i = o, n.__ && n.__(s, i), c = (u = "function" == typeof a) ? null : a && a.__k || i.__k, d = [], P(i, s = (!u && a || i).__k = f(p, null, [s]), c || l, l, void 0 !== i.ownerSVGElement, !u && a ? [a] : c ? null : i.firstChild ? e.call(i.childNodes) : null, d, !u && a ? a : c ? c.__e : i.firstChild, u), S(d, s); | ||
}); | ||
@@ -743,0 +745,0 @@ } |
{ | ||
"name": "@feature.ninja/widget", | ||
"version": "0.0.19", | ||
"version": "0.0.20", | ||
"description": "Feature Ninja Widget", | ||
@@ -5,0 +5,0 @@ "main": "./dist/widget.umd.js", |
178663
3575