hexsha
string
size
int64
ext
string
lang
string
max_stars_repo_path
string
max_stars_repo_name
string
max_stars_repo_head_hexsha
string
max_stars_repo_licenses
list
max_stars_count
int64
max_stars_repo_stars_event_min_datetime
string
max_stars_repo_stars_event_max_datetime
string
max_issues_repo_path
string
max_issues_repo_name
string
max_issues_repo_head_hexsha
string
max_issues_repo_licenses
list
max_issues_count
int64
max_issues_repo_issues_event_min_datetime
string
max_issues_repo_issues_event_max_datetime
string
max_forks_repo_path
string
max_forks_repo_name
string
max_forks_repo_head_hexsha
string
max_forks_repo_licenses
list
max_forks_count
int64
max_forks_repo_forks_event_min_datetime
string
max_forks_repo_forks_event_max_datetime
string
content
string
avg_line_length
float64
max_line_length
int64
alphanum_fraction
float64
9474f217b63286c82f188e0ac6140d67767bf411
654
js
JavaScript
source/components/form/elements/form-actions.spec.js
b2wads/grimorio-ui
4afceb5056706a3a3188065cc908d7dbd4bdffd6
[ "MIT" ]
30
2019-10-04T22:09:54.000Z
2021-11-23T10:40:59.000Z
source/components/form/elements/form-actions.spec.js
b2wads/grimorio-ui
4afceb5056706a3a3188065cc908d7dbd4bdffd6
[ "MIT" ]
81
2019-10-04T19:30:06.000Z
2022-02-24T17:08:17.000Z
source/components/form/elements/form-actions.spec.js
b2wads/grimorio-ui
4afceb5056706a3a3188065cc908d7dbd4bdffd6
[ "MIT" ]
11
2019-10-04T22:27:11.000Z
2021-03-02T20:56:37.000Z
import '../../../../internals/test/helper'; import FormActions from './form-actions'; /** @test {FormActions} */ describe('FormActions component', () => { /** @test {FormActions#render} */ describe('#render', () => { let wrapper; beforeAll(() => { wrapper = shallow( <FormActions className="test"> <span>test</span> </FormActions> ); }) it('render correctly', () => { expect(wrapper.debug()).toMatchSnapshot(); }); it('should add class form-group-actions to param class', () => { expect(wrapper.find('.test').hasClass('form-group-actions')).toBeTruthy(); }); }); });
23.357143
80
0.556575
9476e0fa007b2ec240dc10046f689bb88eb92289
95
js
JavaScript
dist/index.js
darwiin/liste-gros-mots
88a3854a293f339489a8c3b65c633ba2c3a71e44
[ "MIT" ]
19
2017-09-15T08:16:02.000Z
2022-03-21T09:12:27.000Z
dist/index.js
darwiin/liste-gros-mots
88a3854a293f339489a8c3b65c633ba2c3a71e44
[ "MIT" ]
null
null
null
dist/index.js
darwiin/liste-gros-mots
88a3854a293f339489a8c3b65c633ba2c3a71e44
[ "MIT" ]
11
2018-08-06T11:37:31.000Z
2021-06-16T10:49:39.000Z
module.exports={object:require("./object"),array:require("./array"),regex:require("./regexp")};
95
95
0.705263
94789cf6b86be8815e085bcb0107c7eba0fb08c1
2,681
js
JavaScript
projects/rings/Rings.js
KiloKilo/KiloKilo.github.io
68c7c1a12b5771ef7622c83cdf91dfc5657d601d
[ "MIT" ]
1
2015-09-17T15:53:08.000Z
2015-09-17T15:53:08.000Z
projects/rings/Rings.js
KiloKilo/KiloKilo.github.io
68c7c1a12b5771ef7622c83cdf91dfc5657d601d
[ "MIT" ]
null
null
null
projects/rings/Rings.js
KiloKilo/KiloKilo.github.io
68c7c1a12b5771ef7622c83cdf91dfc5657d601d
[ "MIT" ]
null
null
null
'use strict'; var scene, renderer, camera, cameraControls, obj, container, counter = 0, cWidth = 0, cHeight = 0, then; var attributes, uniforms; function init() { container = document.querySelector('.canvas'); buildScene(); buildObj(); resize(); update(Date.now()); window.addEventListener('resize', resize); } function buildScene() { renderer = new THREE.WebGLRenderer({ antialias: true, alpha: true }); renderer.setPixelRatio(window.devicePixelRatio ? window.devicePixelRatio : 1); renderer.setSize(cWidth, cHeight); container.appendChild(renderer.domElement); scene = new THREE.Scene(); camera = new THREE.PerspectiveCamera(35, cWidth / cHeight, 1, 10000); camera.position.set(-400, -1880, 345); camera.lookAt(new THREE.Vector3()); window.cam = camera; scene.add(camera); cameraControls = new THREE.TrackballControls(camera, container); } function buildObj() { var geo = new THREE.Geometry(); for (var i = 0; i < 400; i++) { var curve = new THREE.EllipseCurve( 0, 0, 300 + 5 * i, 300 + 5 * i, 0, 2 * Math.PI, false ); var path = new THREE.Path(curve.getPoints(200)); var geometry = path.createPointsGeometry(200); geo.merge(geometry); } attributes = {}; uniforms = { time: {type: 'f', value: 0.1}, strength: {type: 'f', value: 0}, color1: {type: 'c', value: new THREE.Color(0x1F343D)}, color2: {type: 'c', value: new THREE.Color(0xE50374)} }; var mat = new THREE.ShaderMaterial({ uniforms: uniforms, attributes: attributes, vertexShader: document.getElementById('vertexshader').textContent, fragmentShader: document.getElementById('fragmentshader').textContent, transparent: true, blending: THREE.AdditiveBlending, depthTest: false }); obj = new THREE.Line(geo, mat); scene.add(obj); } function resize() { cWidth = container.clientWidth; cHeight = container.clientHeight; camera.aspect = cWidth / cHeight; camera.updateProjectionMatrix(); renderer.setSize(cWidth, cHeight); } function update(time) { requestAnimationFrame(update); cameraControls.update(); if (!then) then = time; var delta = time - then; then = time; counter += 0.0002 * delta; obj.rotation.set(time * 0.00001, time * 0.00002, time * 0.00003); uniforms.time.value = time; uniforms.strength.value = Math.sin(time / 8000) * 100; renderer.render(scene, camera); } init();
20.945313
82
0.606863
9478c47071a9e688c87c8f1eb8179fe153930a9c
828
js
JavaScript
assets/js/feedback.js
CalvinRodo/c19-benefits-node
32f4124a7429b38925565babe0ab6e7d5cadf719
[ "MIT" ]
null
null
null
assets/js/feedback.js
CalvinRodo/c19-benefits-node
32f4124a7429b38925565babe0ab6e7d5cadf719
[ "MIT" ]
3
2020-05-23T00:29:12.000Z
2020-05-23T00:32:23.000Z
assets/js/feedback.js
CalvinRodo/c19-benefits-node
32f4124a7429b38925565babe0ab6e7d5cadf719
[ "MIT" ]
null
null
null
const getLocale = () => { return document.documentElement.lang || 'en'; } const form = document.getElementById('feedback-form'); const confirmation = document.getElementById('feedback-confirmation'); const errorMsg = document.getElementById('feedback-error'); const submitFeedback = (event) => { event.preventDefault(); // const formData = serialize(form); const data = new URLSearchParams(new FormData(form)); fetch(`/${getLocale()}/feedback`, { method: 'POST', body: data, }).then((response) => { if (response.ok) { form.classList.add('hidden'); confirmation.classList.remove('hidden'); } }).catch((error) => { console.log(error); errorMsg.classList.remove('hidden'); }) } if (form) { // intercept the form submit form.addEventListener('submit', submitFeedback); }
25.090909
70
0.665459
94798ed86367a5a64c9fdee86c9c1ae15d34ba9d
1,415
js
JavaScript
src/Components/Labs/index.js
Griffin-Sullivan/website
adfad0b092babf9d93adfd26a15ede8497452f58
[ "MIT" ]
1
2020-08-13T03:48:55.000Z
2020-08-13T03:48:55.000Z
src/Components/Labs/index.js
Griffin-Sullivan/website
adfad0b092babf9d93adfd26a15ede8497452f58
[ "MIT" ]
null
null
null
src/Components/Labs/index.js
Griffin-Sullivan/website
adfad0b092babf9d93adfd26a15ede8497452f58
[ "MIT" ]
5
2019-12-27T06:19:35.000Z
2020-08-27T21:16:18.000Z
import React from 'react'; import { LabHeading, LabSelection, LabSelectionCard } from './LabElements'; const Labs = () => { return ( <div> <LabHeading /> <LabSelection> <LabSelectionCard labName="NGINX Lab" src="https://clouddocs.f5.com/training/community/nginx/html/_images/module1.png" alt="nginx logo" anchorLink="#" labDesc="NGINX Lab for learning about web servers and basic linux commands" /> <LabSelectionCard labName="Docker Lab" src="https://i0.wp.com/www.docker.com/blog/wp-content/uploads/2013/11/homepage-docker-logo.png?resize=300%2C248&ssl=1" alt="docker logo" anchorLink="#" labDesc="Docker is a container solution for building applications" /> <LabSelectionCard labName="Linux/Git Lab" src="https://upload.wikimedia.org/wikipedia/commons/thumb/3/35/Tux.svg/150px-Tux.svg.png" alt="linux logo" anchorLink="#" labDesc="Docker is a container solution for building applications" /> </LabSelection> </div> ) } export default Labs;
35.375
138
0.506007
947b4da3ed4bc5497dd480c0bd494cd11a832fe7
772
js
JavaScript
src/icons/products/product-trusted-outline.js
icarasia-engineering/nitro-ui-svg-vue
06fdb8830ac1eed4e02cd425b03f4f46d3b459ba
[ "MIT" ]
null
null
null
src/icons/products/product-trusted-outline.js
icarasia-engineering/nitro-ui-svg-vue
06fdb8830ac1eed4e02cd425b03f4f46d3b459ba
[ "MIT" ]
8
2020-04-03T01:58:10.000Z
2022-02-18T14:21:00.000Z
src/icons/products/product-trusted-outline.js
icarasia/nitro-ui-svg-vue
06fdb8830ac1eed4e02cd425b03f4f46d3b459ba
[ "MIT" ]
null
null
null
/* eslint-disable */ var icon = require('vue-svgicon') icon.register({ 'products/product-trusted-outline': { width: 32, height: 32, viewBox: '0 0 32 32', data: '<path pid="0" d="M8.008 13.349H4v13.014h4.008a1 1 0 00.991-1.015V14.34a.994.994 0 00-.991-.991zm9.995-8.016h-.991c-.768 0-1.459.42-1.807 1.114L13.3 10.282l-2.892 3.859c-.274.346-.396.768-.396 1.212v8.015c0 1.09.888 1.98 1.98 1.98h1.536l1.584.816c.278.127.581.194.888.199h4.999c.667 0 1.286-.322 1.658-.888l3.909-5.839.84-.864c.396-.372.595-.886.595-1.411v-2.004a1.992 1.992 0 00-1.98-2.004h-6.583l.569-3.019V7.337a1.992 1.992 0 00-1.98-2.004h-.024zm0 2.004v2.995l-.991 5.023h8.98v2.004l-.991.991-4.008 6.011h-4.994l-2.004-.991h-2.004v-8.015l3.019-4.008 2.004-4.008h.991l-.002-.002z"/>' } })
70.181818
596
0.673575
947c99625ed91fc08fad6f8140e09649d85a1e03
15,335
js
JavaScript
admin/marketplace_builder/assets/insites_admin/scripts/web_components/insites/feufo4eh.js
CompBusOnline/insites-platform-os-admin
0e10affadf006845b9a45f42bdfd50c7c19be259
[ "Apache-2.0" ]
5
2018-07-06T20:37:42.000Z
2019-09-24T14:50:57.000Z
admin/marketplace_builder/assets/insites_admin/scripts/web_components/insites/feufo4eh.js
CompBusOnline/insites-platform-os-admin
0e10affadf006845b9a45f42bdfd50c7c19be259
[ "Apache-2.0" ]
null
null
null
admin/marketplace_builder/assets/insites_admin/scripts/web_components/insites/feufo4eh.js
CompBusOnline/insites-platform-os-admin
0e10affadf006845b9a45f42bdfd50c7c19be259
[ "Apache-2.0" ]
2
2018-07-06T21:48:47.000Z
2018-09-16T16:36:31.000Z
/*! Built with http://stenciljs.com */ const{h:e}=window.insites;import{b as t,c as n,d as r,a}from"./chunk-808dee56.js";class i{constructor(){this.breadcrumbs=[]}routePageHandler(e,t){let n=this.breadcrumbs.length,r=n-1===t;if(!e.withSubmenu&&!r){this.breadcrumbs.splice(t+1,n);let e=JSON.parse(JSON.stringify(this.breadcrumbs));this.routePage.emit({crumbs:e})}}updateCrumbs(e){this.breadcrumbs=e;let t=JSON.stringify(e);window.sessionStorage.setItem("ins_breadcrumbs",t);let n=JSON.parse(t).pop();n.app||n.withSubmenu||window.location.assign(n.link)}render(){if(this.breadcrumbs.length>1)return e("div",{class:"ins-breadcrumbs"},e("ul",null,this.breadcrumbs.map((t,n)=>e("li",null,e("span",{class:`crumb-label ${t.withSubmenu?"":"has-link"}`,onClick:()=>this.routePageHandler(t,n)},t.label),e("span",{class:"arrow-right"})))))}static get is(){return"ins-breadcrumbs"}static get properties(){return{breadcrumbs:{state:!0},updateCrumbs:{method:!0}}}static get events(){return[{name:"routePage",method:"routePage",bubbles:!0,cancelable:!0,composed:!0}]}static get style(){return".ins-breadcrumbs{position:absolute;top:calc(50% - 12px);right:calc(20px + .9375rem)}.ins-breadcrumbs ul{margin:0;padding:0;line-height:10px}.ins-breadcrumbs ul li{display:inline-block;padding-left:10px}.ins-breadcrumbs ul li .crumb-label{font-size:12px;color:#2c3148}.ins-breadcrumbs ul li .crumb-label.has-link:hover{cursor:pointer;color:#1e86e3}.ins-breadcrumbs ul li .arrow-right{width:7px;height:7px;border-top:1px solid #8c94a4;border-right:1px solid #8c94a4;display:inline-block;-webkit-transform:rotate(45deg);transform:rotate(45deg);margin-left:8px}.ins-breadcrumbs ul li:first-of-type{padding-left:0}.ins-breadcrumbs ul li:last-of-type a{color:#c9cdd4}.ins-breadcrumbs ul li:last-of-type .crumb-label{font-size:12px;color:#8c94a4}.ins-breadcrumbs ul li:last-of-type .crumb-label.has-link:hover{cursor:text;color:#8c94a4}.ins-breadcrumbs ul li:last-of-type .arrow-right{display:none}.ins-breadcrumbs ul li a{color:#8c94a4}"}}var o="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};"function"==typeof o.setTimeout&&setTimeout,"function"==typeof o.clearTimeout&&clearTimeout;function s(e,t){this.fun=e,this.array=t}s.prototype.run=function(){this.fun.apply(null,this.array)};var u=o.performance||{},l=(u.now||u.mozNow||u.msNow||u.oNow||u.webkitNow,new Date,function(){}),c={}.NODE_ENV,h=function(e,t,n,r,a,i,o,s){if("production"!==c&&void 0===t)throw new Error("invariant requires an error message argument");if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,a,i,o,s],h=0;(u=new Error(t.replace(/%s/g,function(){return l[h++]}))).name="Invariant Violation"}throw u.framesToPop=1,u}};function d(e){return"/"===e.charAt(0)}function f(e,t){for(var n=t,r=n+1,a=e.length;r<a;n+=1,r+=1)e[n]=e[r];e.pop()}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e&&e.split("/")||[],r=t&&t.split("/")||[],a=e&&d(e),i=t&&d(t),o=a||i;if(e&&d(e)?r=n:n.length&&(r.pop(),r=r.concat(n)),!r.length)return"/";var s=void 0;if(r.length){var u=r[r.length-1];s="."===u||".."===u||""===u}else s=!1;for(var l=0,c=r.length;c>=0;c--){var h=r[c];"."===h?f(r,c):".."===h?(f(r,c),l++):l&&(f(r,c),l--)}if(!o)for(;l--;l)r.unshift("..");!o||""===r[0]||r[0]&&d(r[0])||r.unshift("");var p=r.join("/");return s&&"/"!==p.substr(-1)&&(p+="/"),p}var m=Object.freeze({default:p}),v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function g(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(Array.isArray(e))return Array.isArray(t)&&e.length===t.length&&e.every(function(e,n){return g(e,t[n])});var n=void 0===e?"undefined":v(e);if(n!==(void 0===t?"undefined":v(t)))return!1;if("object"===n){var r=e.valueOf(),a=t.valueOf();if(r!==e||a!==t)return g(r,a);var i=Object.keys(e),o=Object.keys(t);return i.length===o.length&&i.every(function(n){return g(e[n],t[n])})}return!1}var b=Object.freeze({default:g}),y=r(function(e,t){t.__esModule=!0,t.addLeadingSlash=function(e){return"/"===e.charAt(0)?e:"/"+e},t.stripLeadingSlash=function(e){return"/"===e.charAt(0)?e.substr(1):e};var n=t.hasBasename=function(e,t){return new RegExp("^"+t+"(\\/|\\?|#|$)","i").test(e)};t.stripBasename=function(e,t){return n(e,t)?e.substr(t.length):e},t.stripTrailingSlash=function(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e},t.parsePath=function(e){var t=e||"/",n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substr(a),t=t.substr(0,a));var i=t.indexOf("?");return-1!==i&&(n=t.substr(i),t=t.substr(0,i)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}},t.createPath=function(e){var t=e.pathname,n=e.search,r=e.hash,a=t||"/";return n&&"?"!==n&&(a+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(a+="#"===r.charAt(0)?r:"#"+r),a}});n(y),y.addLeadingSlash,y.stripLeadingSlash,y.hasBasename,y.stripBasename,y.stripTrailingSlash,y.parsePath,y.createPath;var w=m&&p||m,S=b&&g||b,E=r(function(e,t){t.__esModule=!0,t.locationsAreEqual=t.createLocation=void 0;var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r=i(w),a=i(S);function i(e){return e&&e.__esModule?e:{default:e}}t.createLocation=function(e,t,a,i){var o=void 0;"string"==typeof e?(o=(0,y.parsePath)(e)).state=t:(void 0===(o=n({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return a&&(o.key=a),i?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=(0,r.default)(o.pathname,i.pathname)):o.pathname=i.pathname:o.pathname||(o.pathname="/"),o},t.locationsAreEqual=function(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&(0,a.default)(e.state,t.state)}});n(E),E.locationsAreEqual,E.createLocation;var O=r(function(e,t){t.__esModule=!0;var n,r=(n=l)&&n.__esModule?n:{default:n};t.default=function(){var e=null,t=[];return{setPrompt:function(t){return(0,r.default)(null==e,"A history supports only one prompt at a time"),e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,a,i){if(null!=e){var o="function"==typeof e?e(t,n):e;"string"==typeof o?"function"==typeof a?a(o,i):((0,r.default)(!1,"A history needs a getUserConfirmation function in order to use a prompt message"),i(!0)):i(!1!==o)}else i(!0)},appendListener:function(e){var n=!0,r=function(){n&&e.apply(void 0,arguments)};return t.push(r),function(){n=!1,t=t.filter(function(e){return e!==r})}},notifyListeners:function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];t.forEach(function(e){return e.apply(void 0,n)})}}}});n(O);var P=r(function(e,t){t.__esModule=!0,t.canUseDOM=!("undefined"==typeof window||!window.document||!window.document.createElement),t.addEventListener=function(e,t,n){return e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)},t.removeEventListener=function(e,t,n){return e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent("on"+t,n)},t.getConfirmation=function(e,t){return t(window.confirm(e))},t.supportsHistory=function(){var e=window.navigator.userAgent;return(-1===e.indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history},t.supportsPopStateOnHashChange=function(){return-1===window.navigator.userAgent.indexOf("Trident")},t.supportsGoWithoutReloadUsingHash=function(){return-1===window.navigator.userAgent.indexOf("Firefox")},t.isExtraneousPopstateEvent=function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")}});n(P),P.canUseDOM,P.addEventListener,P.removeEventListener,P.getConfirmation,P.supportsHistory,P.supportsPopStateOnHashChange,P.supportsGoWithoutReloadUsingHash,P.isExtraneousPopstateEvent;const k=n(r(function(e,t){t.__esModule=!0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=s(l),i=s(h),o=s(O);function s(e){return e&&e.__esModule?e:{default:e}}var u=function(){try{return window.history.state||{}}catch(e){return{}}};t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,i.default)(P.canUseDOM,"Browser history needs a DOM");var t=window.history,s=(0,P.supportsHistory)(),l=!(0,P.supportsPopStateOnHashChange)(),c=e.forceRefresh,h=void 0!==c&&c,d=e.getUserConfirmation,f=void 0===d?P.getConfirmation:d,p=e.keyLength,m=void 0===p?6:p,v=e.basename?(0,y.stripTrailingSlash)((0,y.addLeadingSlash)(e.basename)):"",g=function(e){var t=e||{},n=t.key,r=t.state,i=window.location,o=i.pathname+i.search+i.hash;return(0,a.default)(!v||(0,y.hasBasename)(o,v),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+o+'" to begin with "'+v+'".'),v&&(o=(0,y.stripBasename)(o,v)),(0,E.createLocation)(o,r,n)},b=function(){return Math.random().toString(36).substr(2,m)},w=(0,o.default)(),S=function(e){r(U,e),U.length=t.length,w.notifyListeners(U.location,U.action)},O=function(e){(0,P.isExtraneousPopstateEvent)(e)||A(g(e.state))},k=function(){A(g(u()))},L=!1,A=function(e){L?(L=!1,S()):w.confirmTransitionTo(e,"POP",f,function(t){t?S({action:"POP",location:e}):T(e)})},T=function(e){var t=U.location,n=C.indexOf(t.key);-1===n&&(n=0);var r=C.indexOf(e.key);-1===r&&(r=0);var a=n-r;a&&(L=!0,_(a))},x=g(u()),C=[x.key],R=function(e){return v+(0,y.createPath)(e)},_=function(e){t.go(e)},H=0,M=function(e){1===(H+=e)?((0,P.addEventListener)(window,"popstate",O),l&&(0,P.addEventListener)(window,"hashchange",k)):0===H&&((0,P.removeEventListener)(window,"popstate",O),l&&(0,P.removeEventListener)(window,"hashchange",k))},j=!1,U={length:t.length,action:"POP",location:x,createHref:R,push:function(e,r){(0,a.default)(!("object"===(void 0===e?"undefined":n(e))&&void 0!==e.state&&void 0!==r),"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");var i=(0,E.createLocation)(e,r,b(),U.location);w.confirmTransitionTo(i,"PUSH",f,function(e){if(e){var n=R(i),r=i.key,o=i.state;if(s)if(t.pushState({key:r,state:o},null,n),h)window.location.href=n;else{var u=C.indexOf(U.location.key),l=C.slice(0,-1===u?0:u+1);l.push(i.key),C=l,S({action:"PUSH",location:i})}else(0,a.default)(void 0===o,"Browser history cannot push state in browsers that do not support HTML5 history"),window.location.href=n}})},replace:function(e,r){(0,a.default)(!("object"===(void 0===e?"undefined":n(e))&&void 0!==e.state&&void 0!==r),"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");var i=(0,E.createLocation)(e,r,b(),U.location);w.confirmTransitionTo(i,"REPLACE",f,function(e){if(e){var n=R(i),r=i.key,o=i.state;if(s)if(t.replaceState({key:r,state:o},null,n),h)window.location.replace(n);else{var u=C.indexOf(U.location.key);-1!==u&&(C[u]=i.key),S({action:"REPLACE",location:i})}else(0,a.default)(void 0===o,"Browser history cannot replace state in browsers that do not support HTML5 history"),window.location.replace(n)}})},go:_,goBack:function(){return _(-1)},goForward:function(){return _(1)},block:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=w.setPrompt(e);return j||(M(1),j=!0),function(){return j&&(j=!1,M(-1)),t()}},listen:function(e){var t=w.appendListener(e);return M(1),function(){M(-1),t()}}};return U}}))();class L{constructor(){this.app=!1,this.pathname=window.location.pathname}val(e,t){let n={link:this.link,app:this.app,label:this.label};if(e&&"object"==typeof e&&!t);else{if(e&&!t)return this[e];if(!e||!t)return n;this[e]=t}}updateRoute(e){if(e.length){let t=e.length-1;this.route=e[t],setTimeout(()=>{this.insBreadCrumbsEl=this.insRendererEl.querySelector("ins-breadcrumbs"),this.insBreadCrumbsEl.updateCrumbs(e)},200),this.label=this.route.label,this.route.app&&setTimeout(()=>{this.insRendererEl.querySelector("#insRendererFrame").contentWindow.location.replace(this.route.link)},100)}}pushHistory(e,t=!1){let n=this.formatUrl(e);if(1==t){let t=window.location.hash;n=this.pathname+t+"/"+n;let r=JSON.parse(localStorage.getItem("insChildPages"))?JSON.parse(localStorage.getItem("insChildPages")):[];if(!a.find(r,{hash:n})){let a=this.insRendererEl.querySelector("#insRendererFrame");setTimeout(()=>{r.push({parentHash:this.pathname+t,hash:n,childLink:a.contentDocument.location.pathname,pageTitle:e}),localStorage.setItem("insChildPages",JSON.stringify(r))},500)}}else n=this.pathname+"#/app/"+n;k.push({pathname:n,state:{pageTitle:e,url:n}})}componentWillLoad(){this.link&&(this.route={label:this.label?this.label:"Default Page",app:this.app,link:this.link})}resizeIframe(){setTimeout(()=>{let e=this.insRendererEl.querySelector("#insRendererFrame");e.style.height=e.contentWindow.document.body.scrollHeight+"px",e.style.opacity="1"},500)}render(){if(this.route)return this.route.app?e("div",{class:"ins-renderer-wrap "},e("h1",{class:"ins-renderer-wrap__title"},this.route.label,e("ins-breadcrumbs",null)),e("iframe",{id:"insRendererFrame",width:"100%",frameborder:"0",marginheight:"0",marginwidth:"0"}),e("div",{class:"hide-slot"},e("slot",null))):e("div",{class:"ins-renderer-wrap"},e("h1",{class:"ins-renderer-wrap__title"},this.route.label,e("ins-breadcrumbs",null)),e("slot",null))}static get is(){return"ins-renderer"}static get properties(){return{app:{type:Boolean,attr:"app",mutable:!0},formatUrl:{context:"formatUrl"},insBreadCrumbsEl:{state:!0},insRendererEl:{elementRef:!0},label:{type:String,attr:"label",mutable:!0},link:{type:String,attr:"link",mutable:!0},pathname:{state:!0},pushHistory:{method:!0},resizeIframe:{method:!0},route:{state:!0},updateRoute:{method:!0},val:{method:!0}}}static get style(){return".ins-renderer-wrap{padding:0 0 0 20px;-webkit-box-sizing:border-box;box-sizing:border-box}\@media only screen and (min-width:768px){.ins-renderer-wrap{padding-right:0}}.ins-renderer-wrap__title{opacity:.87;color:#2c3148;font-size:32px;font-weight:300;margin-top:10px;padding:0 .9375rem;font-family:\"Open Sans\",sans-serif;position:relative}\@media only screen and (max-width:768px){.ins-renderer-wrap__title{padding:0}}.ins-renderer-wrap iframe{border:none;width:100%;height:calc(100vh - 137px);overflow:auto;-webkit-box-sizing:border-box;box-sizing:border-box}.hide-slot{display:none}\@media only screen and (max-width:320px){.ins-renderer-wrap__title h2{padding:0 10px}}"}}export{i as InsBreadcrumbs,L as InsRenderer};
7,667.5
15,296
0.709423
947ebbe5ff51e01186b11ddf8620b9ba71bc0341
153,140
js
JavaScript
img/profile_files/sDU0qNyz8nr.js
seifsay3d/personalCV
5711164f8270d333531af3c35de293028d8d0776
[ "MIT" ]
null
null
null
img/profile_files/sDU0qNyz8nr.js
seifsay3d/personalCV
5711164f8270d333531af3c35de293028d8d0776
[ "MIT" ]
null
null
null
img/profile_files/sDU0qNyz8nr.js
seifsay3d/personalCV
5711164f8270d333531af3c35de293028d8d0776
[ "MIT" ]
null
null
null
if (self.CavalryLogger) { CavalryLogger.start_js(["DCb+e"]); } __d("ActorURIConfig",[],(function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={PARAMETER_ACTOR:"av"};}),null); __d("BusinessConf",[],(function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={DOMAIN:"business",WWW_DOMAIN:"www",HOSTNAME:"business.facebook.com",BIZ_ID_PARAM_NAME:"business_id",BIZ_ID_AUTOMATICALLY_ATTACHED_API_PARAM_NAME:"__business_id",LABEL_ID_PARAM_NAME:"project_id",ACCOUNT_ID_PARAM_NAME:"act",ACCOUNT_ID_PARAM_NAME_LONG:"account_id",ACCOUNT_IDS_PARAM_NAME_LONG:"account_ids",ACCOUNT_ID_CATEGORY_NAME:"cat",PAGE_ID_PARAM_NAME:"id",PAGE_ADMIN_SELECTED_KEY:"sk",PRODUCT_CATALOG_ID_PARAM_NAME:"catalog_id",PRODUCT_FEED_ID_PARAM_NAME:"feed_id",LEGACY_ADS_MANAGER_PREFIX:"\/ads\/manage\/",CAMPAIGN_MANAGER_PREFIX:"\/ads\/manager\/",SAM_PREFIX:"\/ads\/management\/",AUDIENCE_INSIGHTS_PREFIX:"\/ads\/audience-insights\/",SHOW_ADD_PRODUCT_FEED_DIALOG:"add_feed",SHOW_SPLASH_PARAM_NAME:"splash",SHOW_GRAY_MIGRATE_COMPLETE_SPLASH_PARAM_NAME:"migrate",COMMENT_ID_PARAM_NAME:"comment_id",NAV_SOURCE_PARAM_NAME:"nav_source",WHITELISTED_URI_CLASS:"bizOK",OPT_OUT_KEY:"do_not_redirect_to_biz_site",GRAY_MIGRATE_KEY:"tried_to_migrate_from_gray_account",HIDE_OPT_OUT_KEY:"hide_opt_out",HIDE_HOME_V3_SPLASH_KEY:"hide_home_v3_splash",CAKE_NUX_IS_OPTED_OUT:"1",DPA_TD_WELCOME_NUX_KEY:"dpa_td_welcome_nux",HIDE_AD_ACCOUNT_MSG_PANEL:"hide_ad_account_msg_panel",DPA_TD_WELCOME_NUX_ID:3918,OPT_OUT_EXPIRE:259200,HIGHLANDER_OPT_OUT_KEY:"use_biz_page_in_highlander"};}),null); __d("ChatPerfEvent",[],(function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={ASYNC_REQUEST:"async_request",SIDEBAR_FROM_CLIENT_TTI:"sidebar_from_client_tti",SIDEBAR_FROM_SERVER_TTI:"sidebar_from_server_tti",SIDEBAR_DISPLAY_DONE:"sidebar_display_done",TTI:"tti",CHAT_CONVERSATION_TTI:"chat_conversation_tti",CHAT_INIT_STORES:"chat_init_stores",CHAT_INIT_DATA:"chat_init_data",CHAT_INIT_UI:"chat_init_ui",CHAT_INIT_SOUND:"chat_init_sound",CHAT_DISPLAY_DONE:"chat_display_done"};}),null); __d("EmojiStaticConfig",[],(function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={checksumBase:317426846,fileExt:".png",supportedSizes:{"16":"DP16","18":"DP18","20":"DP20","24":"DP24","30":"DP30","32":"DP32","64":"DP64","128":"DP128"},types:{FBEMOJI:"f",FB_EMOJI_EXTENDED:"e",MESSENGER:"z",UNICODE:"u"},sizeMap:{dp16:16,dp18:18,dp20:20,dp24:24,dp30:30,dp32:32,dp64:64,dp128:128,xsmall:16,small:32,medium:64,large:128}};}),null); __d("FBFeedLocations",[],(function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={NEWSFEED:1,GROUP:2,GROUP_PERMALINK:3,COMMUNITY:4,PERMALINK:5,SHARE_OVERLAY:6,PERMALINK_STREAM:7,GROUP_PINNED:8,FRIEND_LIST:9,TIMELINE:10,HASHTAG_FEED:11,TOPIC_FEED:12,PAGE:13,NOTIFICATION_FEED:14,GROUP_REPORTED:15,GROUP_PENDING:16,PAGES_FEED_IN_PAGES_MANAGER:17,TICKER_CLASSIC:18,PAGES_SUGGESTED_FEED_IN_PAGES_MANAGER:19,SEARCH:20,GROUP_SEARCH:21,NO_ATTACHMENT:22,EMBED:23,EMBED_FEED:24,ATTACHMENT_PREVIEW:25,STORIES_TO_SHARE:26,PROMPT_PERMALINK:27,TREND_HOVERCARD:28,OPEN_GRAPH_PREVIEW:30,HOTPOST_IN_PAGES_FEED:31,SCHEDULED_POSTS:32,TIMELINE_NOTES:33,PAGE_INSIGHTS:34,COMMENT_ATTACHMENT:35,PAGE_TIMELINE:36,GOODWILL_THROWBACK_PERMALINK:37,LIKE_CONFIRM:39,GOODWILL_THROWBACK_PROMOTION:40,SPACES_FEED:41,BROWSE_CONSOLE:42,GROUP_FOR_SALE_COMPACT:43,ENTITY_FEED:44,GROUP_FOR_SALE_DISCUSSION:45,PAGES_CONTENT_TAB_PREVIEW:46,GOODWILL_THROWBACK_SHARE:47,TIMELINE_VIDEO_SHARES:48,EVENT:49,PAGE_PLUGIN:50,SRT:51,PAGES_CONTENT_TAB_INSIGHTS:52,ADS_PE_CONTENT_TAB_INSIGHTS:53,PAGE_ACTIVITY_FEED:54,VIDEO_CHANNEL:55,POST_TO_PAGE:56,GROUPS_GSYM_HOVERCARD:57,GROUP_POST_TOPIC_FEED:58,FEED_SURVEY:59,PAGES_MODERATION:60,SAVED_DASHBOARD:61,PULSE_SEARCH:62,GROUP_NUX:63,GROUP_NUX_POST_VIEW:64,EVENT_PERMALINK:65,FUNDRAISER_PAGE:66,EXPLORE_FEED:67,CRT:68,REVIEWS_FEED:69,VIDEO_HOME_CHANNEL:70,NEWS:71,TIMELINE_FRIENDSHIP:72,SAVED_REMINDERS:73,PSYM:74,ADMIN_FEED:75,CAMPFIRE_NOTE:76,PAGES_CONTEXT_CARD:77,ACTIVITY_LOG:78,WALL_POST_REPORT:79,TIMELINE_BREAKUP:80,POLITICIANS_FEED:81,PRODUCT_DETAILS:82,SPORTS_PLAY_FEED:83,GROUP_TOP_STORIES:84,PAGE_TIMELINE_PERMALINK:86,OFFERS_WALLET:87,INSTREAM_VIDEO_IN_LIVE:88,SPOTLIGHT:89,SEARCH_DERP:90,SOCIAL_BALLOT:91,GROUP_SUGGESTIONS_WITH_STORY:92,SOCIAL_BALLOT_PERMALINK:93,LOCAL_SERP:94,FUNDRAISER_SELF_DONATION_FEED:95,MY_ACTIVITY:96,CONVERSATION_NUB:97,GROUP_TOP_SALE_STORIES:98,GROUP_LEARNING_COURSE_UNIT_FEED:99,SUPPORT_INBOX_READ_TIME_BLOCK:100,PAGE_POSTS_CARD:101,CRISIS_POST:102,SUPPORT_INBOX_GROUP_RESPONSIBLE:103,PAGE_POST_DIALOG:104,CRISIS_DIALOG_POST:105,PAGE_LIVE_VIDEOS_CARD:106,PAGE_POSTS_CARD_COMPACT:107,GROUP_MEMBER_BIO_FEED:108,LIVE_COMMENT_ATTACHMENT:109,GROUP_COMPOSER:110,GROUP_INBOX_GROUP:111,GROUP_INBOX_AGGREGATED:112,ENDORSEMENTS:113,EVENTS_DASHBOARD:114};}),null); __d("StickerInterfaces",[],(function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={MESSAGES:"messages",COMMENTS:"comments",STICKERED:"stickered",COMPOSER:"composer",POSTS:"posts",FRAMES:"frames",SMS:"sms",MONTAGE:"montage"};}),null); __d("UFIConstants",[],(function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={LikeReaction:1,UFIActionType:{COMMENT_LIKE:"fa-type:comment-like",COMMENT_REACTION:"fa-type:comment-reaction",COMMENT_SET_SPAM:"fa-type:mark-spam",DELETE_COMMENT:"fa-type:delete-comment",DISABLE_COMMENTS:"fa-type:disable-comments",LIVE_DELETE_COMMENT:"fa-type:live-delete-comment",LIKE_ACTION:"fa-type:like",SUBSCRIBE_ACTION:"fa-type:subscribe",REMOVE_PREVIEW:"fa-type:remove-preview",MARK_COMMENT_SPAM:"fa-type:mark-spam",CONFIRM_COMMENT_REMOVAL:"fa-type:confirm-remove",TRANSLATE_COMMENT:"fa-type:translate-comment",TRANSLATE_ALL:"fa-type:translate-all-comments",COMMENT_LIKECOUNT_UPDATE:"fa-type:comment-likecount-update",ADD_COMMENT_ACTION:"fa-type:add-comment",REACTION:"fa-type:reaction",UPDATE_CONSTITUENT_TITLE:"fa-type:comment_update_constituent_title"},UFICommentOrderingMode:{CHRONOLOGICAL:"chronological",RANKED_THREADED:"ranked_threaded",TOPLEVEL:"toplevel",RECENT_ACTIVITY:"recent_activity",FEATURED:"featured",FILTERED:"filtered",LIVE_STREAMING:"live_streaming"},UFIFeedbackMode:{EXPANDED:"expanded",NONE:"none",NEVER:"never",TOGGLE:"toggle"},UFIFeedbackSourceType:{PROFILE:0,NEWS_FEED:1,OBJECT:2,MOBILE:3,EMAIL:4,PROFILE_APPROVAL:10,TICKER:12,NONE:13,INTERN:14,ADS:15,EVENT_GOING_FLYOUT:16,PHOTOS_SNOWLIFT:17,PHOTOS_SNOWFLAKE:20,USER_TIMELINE:21,PAGE_TIMELINE:22,SEARCH:23,PAGE_TAB:24,TIMELINE_COLLECTION:25,ON_THIS_DAY:27,INLINE_COMMENT:28,VIDEOS_CHANNEL:29,PRODUCT_DETAILS:30,NEWSFEED_GROUP_TOP_STORIES:31,LIVE_MAP:32,REDSPACE:33,EVENT_MALL:34,LIVE_VIDEO:35,QUICKSILVER_SPOTLIGHT:36,GROUP_COMMERCE_BOOKMARK:37,WATCH_AND_SCROLL:38},UFIPayloadSourceType:{UNKNOWN:0,INITIAL_SERVER:1,LIVE_SEND:2,USER_ACTION:3,STREAMING:4,COLLAPSE_ACTION:7,ENDPOINT_LIKE:10,ENDPOINT_COMMENT_LIKE:11,ENDPOINT_ADD_COMMENT:12,ENDPOINT_EDIT_COMMENT:13,ENDPOINT_DELETE_COMMENT:14,ENDPOINT_HIDE_COMMENT:16,ENDPOINT_REMOVE_PREVIEW:17,ENDPOINT_ID_COMMENT_FETCH:18,ENDPOINT_COMMENT_FETCH:19,ENDPOINT_TRANSLATE_COMMENT:20,ENDPOINT_BAN:21,ENDPOINT_SUBSCRIBE:22,ENDPOINT_COMMENT_LIKECOUNT_UPDATE:23,ENDPOINT_DISABLE_COMMENTS:24,ENDPOINT_ACTOR_CHANGE:25,ENDPOINT_REACTION:26,ENDPOINT_PAGES_MODERATION:27,ENDPOINT_COMMENT_REACTION:28},UFIStatus:{DELETED:"status:deleted",SPAM:"status:spam",SPAM_DISPLAY:"status:spam-display",LIVE_DELETED:"status:live-deleted",FAILED_ADD:"status:failed-add",FAILED_EDIT:"status:failed-edit",PENDING_EDIT:"status:pending-edit"},UFIPaging:{TOP:"top",BOTTOM:"bottom",ALL:"all"},UFICommentPostedLiveState:{LIVE:"Live",ON_DEMAND:"OnDemand"},attachmentTruncationLength:80,commentTruncationLength:420,commentTruncationMaxLines:3,commentTruncationPercent:.6,commentURLTruncationLength:60,infiniteScrollRangeForQANDAPermalinks:1000,minCommentsForOrderingModeSelector:1,unavailableCommentKey:"unavailable_comment_key"};}),null); __d("VideoPlayerReason",[],(function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={AUTOPLAY:"autoplay_initiated",USER:"user_initiated",PAGE_VISIBILITY:"page_visibility_initiated",SEEK:"seek_initiated",LOOP:"loop_initiated",EMBEDDED_VIDEO_API:"embedded_video_api_initiated",CONNECTION:"host-connection-error",VIDEO_DATA_REPLACED:"video_data_replaced",VOD_NOT_READY:"vod_not_ready",VIDEO_DATA_SWITCH:"video_data_switch",FALLBACK_MODE:"fallback_mode",COMMERCIAL_BREAK:"commercial_break",SPHERICAL_FALLBACK:"spherical_fallback",UNLOADED:"unloaded",SPHERICAL_SWITCH_CANVAS:"spherical_switch_canvas",HOVER:"hover"};}),null); __d('CallbackManagerController',['ErrorUtils'],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(i){'use strict';this.$CallbackManagerController1=[];this.$CallbackManagerController2=[undefined];this.$CallbackManagerController3=i;}h.prototype.executeOrEnqueue=function(i,j,k){'use strict';k=k||{};var l=this.$CallbackManagerController4(j,i,k);if(l)return 0;this.$CallbackManagerController2.push({fn:j,request:i,options:k});var m=this.$CallbackManagerController2.length-1;this.$CallbackManagerController1.push(m);return m;};h.prototype.unsubscribe=function(i){'use strict';delete this.$CallbackManagerController2[i];};h.prototype.reset=function(){'use strict';this.$CallbackManagerController2=[];};h.prototype.getRequest=function(i){'use strict';return this.$CallbackManagerController2[i];};h.prototype.runPossibleCallbacks=function(){'use strict';var i=this.$CallbackManagerController1;this.$CallbackManagerController1=[];var j=[];i.forEach(function(k){var l=this.$CallbackManagerController2[k];if(!l)return;if(this.$CallbackManagerController3(l.request,l.options)){j.push(k);}else this.$CallbackManagerController1.push(k);}.bind(this));j.forEach(function(k){var l=this.$CallbackManagerController2[k];delete this.$CallbackManagerController2[k];this.$CallbackManagerController4(l.fn,l.request,l.options);}.bind(this));};h.prototype.$CallbackManagerController4=function(i,j,k){'use strict';var l=this.$CallbackManagerController3(j,k);if(l){var m={ids:j};c('ErrorUtils').applyWithGuard(i,m,l);}return !!l;};f.exports=h;}),null); __d('KeyedCallbackManager',['CallbackManagerController','ErrorUtils'],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(){'use strict';this.$KeyedCallbackManager1={};this.$KeyedCallbackManager2=new (c('CallbackManagerController'))(this.$KeyedCallbackManager3.bind(this));}h.prototype.executeOrEnqueue=function(i,j){'use strict';if(!(i instanceof Array)){var k=i,l=j;i=[i];j=function m(n){l(n[k]);};}i=i.filter(function(m){var n=m!==null&&m!==undefined;if(!n)c('ErrorUtils').applyWithGuard(function(){throw new Error('KeyedCallbackManager.executeOrEnqueue: key '+JSON.stringify(m)+' is invalid');});return n;});return this.$KeyedCallbackManager2.executeOrEnqueue(i,j);};h.prototype.unsubscribe=function(i){'use strict';this.$KeyedCallbackManager2.unsubscribe(i);};h.prototype.reset=function(){'use strict';this.$KeyedCallbackManager2.reset();this.$KeyedCallbackManager1={};};h.prototype.getUnavailableResources=function(i){'use strict';var j=this.$KeyedCallbackManager2.getRequest(i),k=[];if(j)k=j.request.filter(function(l){return !this.$KeyedCallbackManager1[l];}.bind(this));return k;};h.prototype.getUnavailableResourcesFromRequest=function(i){'use strict';var j=Array.isArray(i)?i:[i];return j.filter(function(k){if(k!==null&&k!==undefined)return !this.$KeyedCallbackManager1[k];},this);};h.prototype.addResourcesAndExecute=function(i){'use strict';Object.assign(this.$KeyedCallbackManager1,i);this.$KeyedCallbackManager2.runPossibleCallbacks();};h.prototype.setResource=function(i,j){'use strict';this.$KeyedCallbackManager1[i]=j;this.$KeyedCallbackManager2.runPossibleCallbacks();};h.prototype.getResource=function(i){'use strict';return this.$KeyedCallbackManager1[i];};h.prototype.getAllResources=function(){'use strict';return this.$KeyedCallbackManager1;};h.prototype.dumpResources=function(){'use strict';var i={};for(var j in this.$KeyedCallbackManager1){var k=this.$KeyedCallbackManager1[j];if(typeof k==='object')k=babelHelpers['extends']({},k);i[j]=k;}return i;};h.prototype.$KeyedCallbackManager3=function(i){'use strict';var j={};for(var k=0;k<i.length;k++){var l=i[k],m=this.$KeyedCallbackManager1[l];if(typeof m=='undefined')return false;j[l]=m;}return [j];};f.exports=h;}),null); __d('BaseAsyncLoader',['KeyedCallbackManager','setTimeoutAcrossTransitions'],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h={};function i(k,l,m){var n=new (c('KeyedCallbackManager'))(),o=false,p=[];function q(){if(!p.length||o)return;o=true;c('setTimeoutAcrossTransitions')(s,0);}function r(v){o=false;v.forEach(n.unsubscribe.bind(n));q();}function s(){var v={},w=[];p=p.filter(function(y){var z=n.getUnavailableResources(y);if(z.length){z.forEach(function(aa){v[aa]=true;});w.push(y);return true;}return false;});var x=Object.keys(v);if(x.length){m(k,x,w,t.bind(null,w),u.bind(null,w));}else o=false;}function t(v,w){var x=w.payload[l]||w.payload;n.addResourcesAndExecute(x);r(v);}function u(v){r(v);}return {get:function v(w,x){var y=n.executeOrEnqueue(w,x),z=n.getUnavailableResources(y);if(z.length){p.push(y);q();}},getCachedKeys:function v(){return Object.keys(n.getAllResources());},getNow:function v(w){return n.getResource(w)||null;},set:function v(w){n.addResourcesAndExecute(w);}};}function j(k,l){throw new Error('BaseAsyncLoader can\'t be instantiated');}Object.assign(j.prototype,{_getLoader:function k(){if(!h[this._endpoint])h[this._endpoint]=i(this._endpoint,this._type,this.send);return h[this._endpoint];},get:function k(l,m){return this._getLoader().get(l,m);},getCachedKeys:function k(){return this._getLoader().getCachedKeys();},getNow:function k(l){return this._getLoader().getNow(l);},reset:function k(){h[this._endpoint]=null;},set:function k(l){this._getLoader().set(l);}});f.exports=j;}),null); __d('LogHistory',['CircularBuffer'],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=500,i={},j=new (c('CircularBuffer'))(h);function k(s,t,event,u){if(typeof u[0]!=='string'||u.length!==1)return;j.write({date:Date.now(),level:s,category:t,event:event,args:u[0]});}function l(s){'use strict';this.category=s;}l.prototype.debug=function(event){'use strict';for(var s=arguments.length,t=Array(s>1?s-1:0),u=1;u<s;u++)t[u-1]=arguments[u];k('debug',this.category,event,t);return this;};l.prototype.log=function(event){'use strict';for(var s=arguments.length,t=Array(s>1?s-1:0),u=1;u<s;u++)t[u-1]=arguments[u];k('log',this.category,event,t);return this;};l.prototype.warn=function(event){'use strict';for(var s=arguments.length,t=Array(s>1?s-1:0),u=1;u<s;u++)t[u-1]=arguments[u];k('warn',this.category,event,t);return this;};l.prototype.error=function(event){'use strict';for(var s=arguments.length,t=Array(s>1?s-1:0),u=1;u<s;u++)t[u-1]=arguments[u];k('error',this.category,event,t);return this;};function m(s){if(!i[s])i[s]=new l(s);return i[s];}function n(){return j.read();}function o(){j.clear();}function p(s){}function q(s){return s.map(function(t){var u=/\d\d:\d\d:\d\d/.exec(new Date(t.date));return [u&&u[0],t.level,t.category,t.event,t.args].join(' | ');}).join('\n');}var r={MAX:h,getInstance:m,getEntries:n,clearEntries:o,toConsole:p,formatEntries:q};f.exports=r;}),null); __d('AjaxLoader',['AsyncRequest','BaseAsyncLoader','LogHistory'],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=c('LogHistory').getInstance('ajax_loader');function i(j,k){this._endpoint=j;this._type=k;}Object.assign(i.prototype,c('BaseAsyncLoader').prototype);i.prototype.send=function(j,k,l,m,n){new (c('AsyncRequest'))().setURI(j).setData({ids:k}).setMethod('POST').setReadOnly(true).setAllowCrossPageTransition(true).setHandler(function(o){m(o);}).setErrorHandler(function(o){n();h.error('fetch_error',{error_type:o.errorSummary,error_text:o.errorDescription});}).send();};f.exports=i;}),null); __d('NullBusinessID',[],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();f.exports='personal-business';}),null); __d('BizSiteIdentifier.brands',['BusinessConf','NullBusinessID','URI'],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=c('NullBusinessID'),i={isBizSite:function j(){return c('URI').getRequestURI(false).getSubdomain()===c('BusinessConf').DOMAIN;},getBusinessID:function j(){return c('URI').getRequestURI(false).getQueryData()[c('BusinessConf').BIZ_ID_PARAM_NAME];},createBusinessURL:function j(k,l){if(!l||l===h)return new (c('URI'))(k).setSubdomain('www');var m=new (c('URI'))(k).setSubdomain(c('BusinessConf').DOMAIN);if(i.isBizSite())m.setDomain(c('URI').getRequestURI(false).getDomain());var n=l||i.getBusinessID();m.addQueryData(c('BusinessConf').BIZ_ID_PARAM_NAME,n);return m;}};f.exports=i;}),null); __d('ChannelConstants',[],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h='channel/',i={CHANNEL_MANUAL_RECONNECT_DEFER_MSEC:2000,MUTE_WARNING_TIME_MSEC:25000,WARNING_COUNTDOWN_THRESHOLD_MSEC:15000,ON_SHUTDOWN:h+'shutdown',ON_INVALID_HISTORY:h+'invalid_history',ON_CONFIG:h+'config',ON_ENTER_STATE:h+'enter_state',ON_EXIT_STATE:h+'exit_state',ATTEMPT_RECONNECT:h+'attempt_reconnect',RTI_SESSION:h+'new_rti_address',GET_RTI_SESSION_REQUEST:h+'rti_session_request',SKYWALKER:h+'skywalker',CHANNEL_ESTABLISHED:h+'established',OK:'ok',ERROR:'error',ERROR_MAX:'error_max',ERROR_MISSING:'error_missing',ERROR_MSG_TYPE:'error_msg_type',ERROR_SHUTDOWN:'error_shutdown',ERROR_STALE:'error_stale',SYS_OWNER:'sys_owner',SYS_NONOWNER:'sys_nonowner',SYS_ONLINE:'sys_online',SYS_OFFLINE:'sys_offline',SYS_TIMETRAVEL:'sys_timetravel',HINT_AUTH:'shutdown auth',HINT_CONN:'shutdown conn',HINT_DISABLED:'shutdown disabled',HINT_INVALID_STATE:'shutdown invalid state',HINT_MAINT:'shutdown maint',HINT_UNSUPPORTED:'shutdown unsupported',reason_Unknown:0,reason_AsyncError:1,reason_TooLong:2,reason_Refresh:3,reason_RefreshDelay:4,reason_UIRestart:5,reason_NeedSeq:6,reason_PrevFailed:7,reason_IFrameLoadGiveUp:8,reason_IFrameLoadRetry:9,reason_IFrameLoadRetryWorked:10,reason_PageTransitionRetry:11,reason_IFrameLoadMaxSubdomain:12,reason_NoChannelInfo:13,reason_NoChannelHost:14,CAPABILITY_VOIP_INTEROP:8,FANTAIL_SERVICE:'WebchatClient',SUBSCRIBE:'subscribe',UNSUBSCRIBE:'unsubscribe',FAKE_DFF:'fake_dff',getArbiterType:function j(k){return h+'message:'+k;},getSkywalkerArbiterType:function j(k){return h+'skywalker:'+k;}};f.exports=i;}),null); __d('JSLogger',['lowerFacebookDomain'],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h={MAX_HISTORY:500,counts:{},categories:{},seq:0,pageId:(Math.random()*2147483648|0).toString(36),forwarding:false};function i(n){if(n=='/'||n.indexOf('/',1)<0)return false;var o=/^\/(v\d+\.\d\d?|head)\//.test(n);if(o)return /^\/(dialog|plugins)\//.test(n.substring(n.indexOf('/',1)));return /^\/(dialog|plugins)\//.test(n);}function j(n){if(n instanceof Error&&b.ErrorUtils)n=b.ErrorUtils.normalizeError(n);try{return JSON.stringify(n);}catch(o){return '{}';}}function k(n,event,o){if(!h.counts[n])h.counts[n]={};if(!h.counts[n][event])h.counts[n][event]=0;o=o==null?1:Number(o);h.counts[n][event]+=isFinite(o)?o:0;}h.logAction=function(event,n,o){if(this.type=='bump'){k(this.cat,event,n);}else if(this.type=='rate'){n&&k(this.cat,event+'_n',o);k(this.cat,event+'_d',o);}else{var p={cat:this.cat,type:this.type,event:event,data:n!=null?j(n):null,date:Date.now(),seq:h.seq++};h.head=h.head?h.head.next=p:h.tail=p;while(h.head.seq-h.tail.seq>h.MAX_HISTORY)h.tail=h.tail.next;return p;}};function l(n){if(!h.categories[n]){h.categories[n]={};var o=function p(q){var r={cat:n,type:q};h.categories[n][q]=function(){h.forwarding=false;var s=null;if(c('lowerFacebookDomain').isValidDocumentDomain())return;s=h.logAction;if(i(location.pathname)){h.forwarding=false;}else try{s=b.top.require('JSLogger')._.logAction;h.forwarding=s!==h.logAction;}catch(t){}s&&s.apply(r,arguments);};};o('debug');o('log');o('warn');o('error');o('bump');o('rate');}return h.categories[n];}function m(n,o){var p=[];for(var q=o||h.tail;q;q=q.next)if(!n||n(q)){var r={type:q.type,cat:q.cat,date:q.date,event:q.event,seq:q.seq};if(q.data)r.data=JSON.parse(q.data);p.push(r);}return p;}f.exports={_:h,DUMP_EVENT:'jslogger/dump',create:l,getEntries:m};}),null); __d("XChatUserInfoAllAsyncController",["XController"],(function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/chat\/user_info_all\/",{viewer:{type:"Int",required:true}});}),null); __d('ShortProfilesBootstrapper',['Promise','AsyncRequest','BanzaiODS','CurrentUser','JSLogger','XChatUserInfoAllAsyncController'],(function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h=5,i=10000,j=c('XChatUserInfoAllAsyncController').getURIBuilder().setInt('viewer',c('CurrentUser').getID()).getURI(),k=c('JSLogger').create('short_profiles');function l(m){this.$ShortProfilesBootstrapper1=m;this.$ShortProfilesBootstrapper2=new (c('Promise'))(function(n,o){this.$ShortProfilesBootstrapper3=n;this.$ShortProfilesBootstrapper4=o;}.bind(this));this.$ShortProfilesBootstrapper5=false;this.$ShortProfilesBootstrapper6=null;this.$ShortProfilesBootstrapper7=0;this.$ShortProfilesBootstrapper8=0;this.$ShortProfilesBootstrapper9=0;this.$ShortProfilesBootstrapper10=false;this.$ShortProfilesBootstrapper11=false;}l.prototype.fetchAll=function(){this.$ShortProfilesBootstrapper12();if(this.$ShortProfilesBootstrapper5||this.$ShortProfilesBootstrapper6)return this.$ShortProfilesBootstrapper2;if(this.$ShortProfilesBootstrapper7>=h){this.$ShortProfilesBootstrapper13();return this.$ShortProfilesBootstrapper2;}this.$ShortProfilesBootstrapper7++;this.$ShortProfilesBootstrapper14();this.$ShortProfilesBootstrapper6=new (c('AsyncRequest'))(j).setHandler(function(m){this.$ShortProfilesBootstrapper6=null;this.$ShortProfilesBootstrapper5=true;this.$ShortProfilesBootstrapper15();this.$ShortProfilesBootstrapper1(m.payload);this.$ShortProfilesBootstrapper3();}.bind(this)).setErrorHandler(function(){this.$ShortProfilesBootstrapper6=null;this.$ShortProfilesBootstrapper8++;this.$ShortProfilesBootstrapper16();}.bind(this)).setTimeoutHandler(i,function(){this.$ShortProfilesBootstrapper6=null;this.$ShortProfilesBootstrapper9++;this.$ShortProfilesBootstrapper17();this.fetchAll();}.bind(this)).setAllowCrossPageTransition(true);this.$ShortProfilesBootstrapper6.send();return this.$ShortProfilesBootstrapper2;};l.prototype.isBootstrapped=function(){return this.$ShortProfilesBootstrapper5;};l.prototype.isBootstrapping=function(){return !!this.$ShortProfilesBootstrapper6;};l.prototype.getAttemptCount=function(){return this.$ShortProfilesBootstrapper7;};l.prototype.getErrorCount=function(){return this.$ShortProfilesBootstrapper8;};l.prototype.getTimeoutCount=function(){return this.$ShortProfilesBootstrapper9;};l.prototype.$ShortProfilesBootstrapper12=function(){if(!this.$ShortProfilesBootstrapper10){k.log('bootstrap_start');c('BanzaiODS').bumpEntityKey('chat.web','typeahead.bootstrap.starts');this.$ShortProfilesBootstrapper10=true;}};l.prototype.$ShortProfilesBootstrapper14=function(){k.log('bootstrap_attempt');c('BanzaiODS').bumpEntityKey('chat.web','typeahead.bootstrap.attempts');};l.prototype.$ShortProfilesBootstrapper15=function(){k.log('bootstrap_success');c('BanzaiODS').bumpEntityKey('chat.web','typeahead.bootstrap.successes');if(this.$ShortProfilesBootstrapper7>1)c('BanzaiODS').bumpEntityKey('chat.web','typeahead.bootstrap.successes_after_retries');};l.prototype.$ShortProfilesBootstrapper16=function(){k.log('bootstrap_error');c('BanzaiODS').bumpEntityKey('chat.web','typeahead.bootstrap.errors');};l.prototype.$ShortProfilesBootstrapper17=function(){k.log('bootstrap_timeout');c('BanzaiODS').bumpEntityKey('chat.web','typeahead.bootstrap.timeouts');};l.prototype.$ShortProfilesBootstrapper13=function(){if(!this.$ShortProfilesBootstrapper11){k.log('bootstrap_giveup');c('BanzaiODS').bumpEntityKey('chat.web','typeahead.bootstrap.giveups');this.$ShortProfilesBootstrapper11=true;this.$ShortProfilesBootstrapper4();}};f.exports=l;}),null); __d("XChatUserInfoAsyncController",["XController"],(function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/chat\/user_info\/",{ids:{type:"IntVector",defaultValue:[]}});}),null); __d('ShortProfiles',['AjaxLoader','Arbiter','JSLogger','ShortProfilesBootstrapper','XChatUserInfoAsyncController','emptyFunction'],(function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h=null,i=new (c('AjaxLoader'))(c('XChatUserInfoAsyncController').getURIBuilder().getURI().toString(),'profiles'),j={get:function k(l,m){this.getMulti([l],function(n){return m(n[l],l);});},getMulti:function k(l,m){i.get(l,m||c('emptyFunction'));},getNow:function k(l){return i.getNow(l)||null;},getMultiNow:function k(l){var m={};l.forEach(function(n){return m[n]=j.getNow(n);});return m;},getCachedProfileIDs:function k(){return i.getCachedKeys();},hasAll:function k(){return !!h&&h.isBootstrapped();},fetchAll:function k(){if(!h)h=new (c('ShortProfilesBootstrapper'))(function(l){i.set(l);});return h.fetchAll();},set:function k(l,m){var n={};n[l]=m;this.setMulti(n);},setMulti:function k(l){i.set(l);}};c('Arbiter').subscribe(c('JSLogger').DUMP_EVENT,function(k,l){var m=j.getCachedProfileIDs(),n=c('JSLogger').getEntries(function(o){return (o.cat=='short_profiles'||o.cat=='chat_typeahead');});l.chat_typeahead={bootstrapped:h&&h.isBootstrapped(),bootstrapping:h&&h.isBootstrapping(),bootstrap_attempts:h&&h.getAttemptCount(),bootstrap_errors:h&&h.getErrorCount(),bootstrap_timeouts:h&&h.getTimeoutCount(),entries:m,entry_count:m.length,history:n};});f.exports=j;}),null); __d('ServerTime',['InitialServerTime'],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();k(c('InitialServerTime').serverTime);var h;function i(){return Date.now()-h;}function j(){return h;}function k(l){h=Date.now()-l;}f.exports={getMillis:i,getOffsetMillis:j,update:k,get:i,getSkew:j};}),null); __d('LiveTimer',['fbt','csx','cx','CSS','DOM','ServerTime','setTimeout'],(function a(b,c,d,e,f,g,h,i,j){if(c.__markCompiled)c.__markCompiled();var k=1000,l=60,m=3600,n=43200,o=86400,p=60,q=60000,r={restart:function s(t){c('ServerTime').update(t*1000);this.updateTimeStamps();},getApproximateServerTime:function s(){return c('ServerTime').get();},getServerTimeOffset:function s(){return -1*c('ServerTime').getSkew();},updateTimeStamps:function s(){this.timestamps=c('DOM').scry(document.body,'abbr.livetimestamp');this.startLoop(q);},addTimeStamps:function s(t){if(!t)return;this.timestamps=this.timestamps||[];if(c('DOM').isNodeOfType(t,'abbr')&&c('CSS').hasClass(t,'livetimestamp')){this.timestamps.push(t);}else{var u=c('DOM').scry(t,'abbr.livetimestamp');for(var v=0;v<u.length;++v)this.timestamps.push(u[v]);}this.startLoop(0);},removeTimestamp:function s(t){if(!this.timestamps||!t)return;var u=this.timestamps.indexOf(t);if(u>-1)this.timestamps.splice(u,1);},startLoop:function s(t){this.stop();this.timeout=c('setTimeout')(function(){this.loop();}.bind(this),t);},stop:function s(){clearTimeout(this.timeout);},loop:function s(t){if(t)this.updateTimeStamps();var u=Math.floor(c('ServerTime').get()/k),v=-1;this.timestamps&&this.timestamps.forEach(function(x){var y=x.getAttribute('data-utime'),z=x.getAttribute('data-shorten'),aa=x.getAttribute('data-minimize'),ba=this.renderRelativeTime(u,y,z,aa);if(ba.text){var ca={'class':"timestampContent"},da=c('DOM').scry(x,".timestampContent")[0],ea=da&&da.getAttribute('id');if(ea)ca.id=ea;c('DOM').setContent(x,c('DOM').create('span',ca,ba.text));}if(ba.next!=-1&&(ba.next<v||v==-1))v=ba.next;}.bind(this));if(v!=-1){var w=Math.max(q,v*k);this.timeout=c('setTimeout')(function(){this.loop();}.bind(this),w);}},renderRelativeTime:function s(t,u,v,w){var x={text:"",next:-1};if(t-u>o)return x;var y=t-u,z=Math.floor(y/l),aa=Math.floor(z/p);if(z<1){if(w){x.text=h._("1m");x.next=20-y%20;}else if(v){x.text=h._("Just now");x.next=20-y%20;}else{x.text=h._("a few seconds ago");x.next=l-y%l;}return x;}if(aa<1){if(w){x.text=h._({"*":"{number}m"},[h.param('number',z,[0])]);}else if(v&&z==1){x.text=h._("1 min");}else if(v){x.text=h._({"*":"{number} mins"},[h.param('number',z,[0])]);}else x.text=z==1?h._("about a minute ago"):h._({"*":"{number} minutes ago"},[h.param('number',z,[0])]);x.next=l-y%l;return x;}if(aa<11)x.next=m-y%m;if(w){x.text=h._({"*":"{number}h"},[h.param('number',aa,[0])]);}else if(v&&aa==1){x.text=h._("1 hr");}else if(v){x.text=h._({"*":"{number} hrs"},[h.param('number',aa,[0])]);}else x.text=aa==1?h._("about an hour ago"):h._({"*":"{number} hours ago"},[h.param('number',aa,[0])]);return x;},renderRelativeTimeToServer:function s(t,u,v){return this.renderRelativeTime(Math.floor(c('ServerTime').get()/k),t,u,v);}};f.exports=r;f.exports.CONSTS={MS_IN_SEC:k,SEC_IN_MIN:l,SEC_IN_HOUR:m,SEC_IN_12_HOUR:n,SEC_IN_24_HOUR:o,MIN_IN_HOUR:p,HEARTBEAT:q};}),null); __d('UFICentralUpdates',['Arbiter','BanzaiODS','LiveTimer','ShortProfiles','UFIConstants'],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();c('BanzaiODS').setEntitySample('feedback',.0001);var h=0,i={},j={},k={},l=[];function m(){if(!h){var q=i,r=j,s=k;i={};j={};k={};if(Object.keys(q).length)o('feedback-updated',q);if(Object.keys(r).length)o('comments-updated',r);if(Object.keys(s).length)o('instance-updated',s);l.pop();}}function n(){if(l.length){return l[l.length-1];}else return c('UFIConstants').UFIPayloadSourceType.UNKNOWN;}function o(event,q){p.inform(event,{updates:q,payloadSource:n()});}var p=Object.assign(new (c('Arbiter'))(),{handleUpdate:function q(r,s){if(Object.keys(s).length)this.synchronizeInforms(function(){l.push(r);var t=babelHelpers['extends']({payloadsource:n()},s);this.inform('update-feedback',t);this.inform('update-comment-lists',t);this.inform('update-comments',t);this.inform('update-actions',t);c('ShortProfiles').setMulti(s.profiles||{});if(s.servertime)c('LiveTimer').restart(s.servertime);}.bind(this));},didUpdateFeedback:function q(r){i[r]=true;m();},didUpdateComment:function q(r){j[r]=true;m();},didUpdateInstanceState:function q(r,s){if(!k[r])k[r]={};k[r][s]=true;m();},synchronizeInforms:function q(r){h++;try{r();}catch(s){throw s;}finally{h--;m();}}});f.exports=p;}),null); __d('UFIInstanceState',['UFICentralUpdates'],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h={};function i(k){if(!h[k])h[k]={};}var j={getKeyForInstance:function k(l,m){i(l);return h[l][m];},updateState:function k(l,m,n){i(l);h[l][m]=n;c('UFICentralUpdates').didUpdateInstanceState(l,m);},updateStateField:function k(l,m,n,o){var p=this.getKeyForInstance(l,m)||{};p[n]=o;this.updateState(l,m,p);},updateStateFields:function k(l,m,n){var o=this.getKeyForInstance(l,m)||{};o=babelHelpers['extends']({},o,n);this.updateState(l,m,o);}};f.exports=j;}),null); __d('UFIUIEvents',[],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h='UFIUIEvents/ufiActionAddComment',i='UFIUIEvents/ufiActionLinkLike',j='ufi/blur',k='ufi/changed',l='ufi/comment',m='CommentUFI.Pager',n='ufi/focus',o='ufi/inputHeightChanged',p='ufi/page_cleared',q='ufi/photoPreviewHightChanged',r='ufi/translationRendered',s='ufi/reactionButtonClicked',t='ufi/autoplayLiveComments',u={ActionAddComment:h,ActionLinkLike:i,AutoplayLiveComments:t,Blur:j,Changed:k,Comment:l,CommentPager:m,Focus:n,InputHeightChanged:o,PageCleared:p,PhotoPreviewHeightChanged:q,TranslationRendered:r,ReactionButtonClicked:s};f.exports=u;}),null); __d('UFIVideoPlayerRegistry',['EventEmitter','Map','Set','VideoPlayerReason','ViewportBounds','getOrCreateDOMID','destroyOnUnload'],(function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h=new (c('EventEmitter'))(),i=new (c('Map'))(),j=new (c('Map'))(),k=new (c('Map'))(),l=new (c('Map'))(),m=new (c('Set'))();c('destroyOnUnload')(function(){h.removeAllListeners();i.clear();j.clear();k.clear();l.clear();m.clear();});function n(q){var r=q,s=[];while(r){s.unshift(r);r=r.parentElement;}return s;}function o(q,r){var s=n(q),t=null,u=null;r.forEach(function(v){var w=v[0],x=v[1],y=n(w);for(var z=0;z<s.length;++z)if(s[z]!==y[z]){if(u===null||z>u){u=z;t=x;}break;}});return t;}var p={registerVideoPlayerController:function q(r){var s=r.getVideoID(),t=l.get(s);if(t){t.push(r);}else{t=[r];l.set(s,t);k['delete'](s);}m.forEach(function(v){return v();});var u=i.get(s);if(!u)return;u.forEach(function(v){return (this._associateUFIController(v,s));}.bind(this));},addOnRegisterListener:function q(r){m.add(r);},removeOnRegisterListener:function q(r){m['delete'](r);},getAvailableVideoPlayerController:function q(r){return j.get(r);},seekAvailableVideoPlayerController:function q(r,s){var t=p.getAvailableVideoPlayerController(r);if(!t)return;if(t.isState('playing')){t.pause(c('VideoPlayerReason').SEEK);t.seek(s);t.play(c('VideoPlayerReason').SEEK);}else t.seek(s);},scrollToAvailableVideo:function q(r){var s=p.getAvailableVideoPlayerController(r);if(!s)return;var t=c('ViewportBounds').getElementPosition(s.getRootNode());window.scroll(0,t.y);},setAvailableVideoPlayerControllerSphericalViewport:function q(r,s){var t=p.getAvailableVideoPlayerController(r);if(!t)return;t.emit('SphericalVideoViewportTagComment/click',s);},getAvailableVideoPlayerControllerForElement:function q(r,s){var t=k.get(s)||new (c('Map'))(),u=c('getOrCreateDOMID')(r),v=t.get(u)||this._findVideoPlayerControllerForElement(r,s);t.set(u,v);k.set(s,t);return v;},getAvailableVideoPlayerControllerTimeForElement:function q(r,s){var t=p.getAvailableVideoPlayerControllerForElement(r,s);if(!t)return null;var u=t.getCurrentTimePosition();if(u>=0)return Math.floor(u);return null;},getAvailableVideoPlayerControllerTime:function q(r){var s=p.getAvailableVideoPlayerController(r);if(!s)return null;var t=s.getCurrentTimePosition();if(t>=0)return Math.floor(t);return null;},registerUFIController:function q(r,s,t){var u=r.getInstanceID(),v=r.getFluentContentToken();if(!v)return;var w=i.get(v);if(w){w.push(r);}else{w=[r];i.set(v,w);}h.addListener(u+'/register',s);h.addListener(u+'/unregister',t);this._associateUFIController(r,v);},_findVideoPlayerControllerForElement:function q(r,s){var t=l.get(s);if(!t)return null;if(t.length===1)return t[0];return o(r,t.map(function(u){return [u.getRootNode(),u];}));},_associateUFIController:function q(r,s){var t=r.getInstanceID(),u=this._findVideoPlayerControllerForElement(r.getRootNode(),s);if(!u)return;var v=j.get(t);if(v){if(c('getOrCreateDOMID')(v.getRootNode())===c('getOrCreateDOMID')(u.getRootNode()))return;h.emit(t+'/unregister');}h.emit(t+'/register',u);j.set(t,u);}};f.exports=p;}),null); __d('HovercardLink',['Bootloader','URI'],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h={getBaseURI:function i(){return new (c('URI'))('/ajax/hovercard/hovercard.php');},constructEndpoint:function i(j,k){return h.constructEndpointWithGroupAndLocation(j,k,null);},constructEndpointWithLocation:function i(j,k){return h.constructEndpointWithGroupAndLocation(j,null,k);},constructEndpointWithGroupAndLocation:function i(j,k,l,m){return h.constructEndpointWithGroupLocationAndExtraParams(j,k,l,m);},constructEndpointWithGroupLocationAndExtraParams:function i(j,k,l,m){var n=arguments.length<=4||arguments[4]===undefined?null:arguments[4],o=new (c('URI'))(h.getBaseURI()).setQueryData({id:j.id}),p={};if(n!==null)for(var q in n)p[q]=n[q];if((j.weakreference||m)&&k)p.group_id=k;if(l)p.hc_location=l;o.addQueryData({extragetparams:JSON.stringify(p)});return o;}};f.exports=h;}),null); __d('Newline.react',['React'],(function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('React').Component);i=h&&h.prototype;j.prototype.render=function(){'use strict';return c('React').createElement('br',this.props);};function j(){'use strict';h.apply(this,arguments);}f.exports=j;}),null); __d('ReactFragment',['invariant','ReactChildren','ReactElement','emptyFunction','warning'],(function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();var i=/^\d+$/,j=false,k={create:function l(m){if(typeof m!=='object'||!m||Array.isArray(m)){c('warning')(false,'React.addons.createFragment only accepts a single object. Got: %s',m);return m;}if(c('ReactElement').isValidElement(m)){c('warning')(false,'React.addons.createFragment does not accept a ReactElement '+'without a wrapper object.');return m;}!(m.nodeType!==1)?h(0):void 0;var n=[];for(var o in m)c('ReactChildren').mapIntoWithKeyPrefixInternal(m[o],n,o,c('emptyFunction').thatReturnsArgument);return n;}};f.exports=k;}),null); __d('Text.react',['React'],(function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('React').Component);i=h&&h.prototype;j.prototype.render=function(){'use strict';return (c('React').createElement('span',this.props,this.props.children));};function j(){'use strict';h.apply(this,arguments);}f.exports=j;}),null); __d('UnicodeUtils',['invariant'],(function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();var i=55296,j=56319,k=56320,l=57343,m=/[\uD800-\uDFFF]/;function n(w){return i<=w&&w<=l;}function o(w,x){!(0<=x&&x<w.length)?h(0):void 0;if(x+1===w.length)return false;var y=w.charCodeAt(x),z=w.charCodeAt(x+1);return (i<=y&&y<=j&&k<=z&&z<=l);}function p(w){return m.test(w);}function q(w,x){return 1+n(w.charCodeAt(x));}function r(w){if(!p(w))return w.length;var x=0;for(var y=0;y<w.length;y+=q(w,y))x++;return x;}function s(w,x,y){x=x||0;y=y===undefined?Infinity:y||0;if(!p(w))return w.substr(x,y);var z=w.length;if(z<=0||x>z||y<=0)return '';var aa=0;if(x>0){for(;x>0&&aa<z;x--)aa+=q(w,aa);if(aa>=z)return '';}else if(x<0){for(aa=z;x<0&&0<aa;x++)aa-=q(w,aa-1);if(aa<0)aa=0;}var ba=z;if(y<z)for(ba=aa;y>0&&ba<z;y--)ba+=q(w,ba);return w.substring(aa,ba);}function t(w,x,y){x=x||0;y=y===undefined?Infinity:y||0;if(x<0)x=0;if(y<0)y=0;var z=Math.abs(y-x);x=x<y?x:y;return s(w,x,z);}function u(w){var x=[];for(var y=0;y<w.length;y+=q(w,y))x.push(w.codePointAt(y));return x;}var v={getCodePoints:u,getUTF16Length:q,hasSurrogateUnit:p,isCodeUnitInSurrogateRange:n,isSurrogatePair:o,strlen:r,substring:t,substr:s};f.exports=v;}),null); __d('BaseTextWithEntities.react',['Newline.react','React','ReactFragment','Text.react','UnicodeUtils'],(function a(b,c,d,e,f,g){'use strict';var h,i;if(c.__markCompiled)c.__markCompiled();var j=c('React').PropTypes;function k(o,p){return o.offset-p.offset;}var l=/(\r\n|[\r\n])/,m=j.shape({length:j.number.isRequired,offset:j.number.isRequired});h=babelHelpers.inherits(n,c('React').Component);i=h&&h.prototype;function n(){var o,p;for(var q=arguments.length,r=Array(q),s=0;s<q;s++)r[s]=arguments[s];return p=(o=i.constructor).call.apply(o,[this].concat(r)),this.$BaseTextWithEntities1=function(){return [].concat(this.props.ranges,this.props.aggregatedRanges,this.props.imageRanges,this.props.metaRanges,this.props.inlineStyleRanges).filter(function(t){return t!=null;}).sort(k);}.bind(this),this.$BaseTextWithEntities2=function(t){var u=t.split(l),v={};for(var w=0;w<u.length;w++){var x=u[w];if(x){var y='text'+w;if(w%2===1){v[y]=c('React').createElement(c('Newline.react'),null);}else v[y]=this.props.textRenderer(u[w]);}}return c('ReactFragment').create(v);}.bind(this),p;}n.prototype.render=function(){var o=0,p=this.props.text,q=this.$BaseTextWithEntities1(),r={},s=q.length;for(var t=0,u=s;t<u;t++){var v=q[t];if(v.offset<o)continue;if(v.offset>o)r['text'+t]=this.$BaseTextWithEntities2(this.props.useJSStringUtils?p.substring(o,v.offset):c('UnicodeUtils').substring(p,o,v.offset));var w=this.props.useJSStringUtils?p.substr(v.offset,v.length):c('UnicodeUtils').substr(p,v.offset,v.length);r['range'+t]=this.props.rangeRenderer(w,v);o=v.offset+v.length;}if(p.length>o)r.end=this.$BaseTextWithEntities2(this.props.useJSStringUtils?p.substr(o):c('UnicodeUtils').substr(p,o));return (c('React').createElement(c('Text.react'),{className:this.props.className,style:this.props.style},c('ReactFragment').create(r)));};n.propTypes={aggregatedRanges:j.array,imageRanges:j.array,inlineStyleRanges:j.array,useJSStringUtils:j.bool,metaRanges:j.array,rangeRenderer:j.func.isRequired,ranges:j.arrayOf(m),text:j.string.isRequired,textRenderer:j.func.isRequired};f.exports=n;}),null); __d('AbstractLink.react',['$','emptyFunction','Bootloader','LinkshimHandlerConfig','React','URI'],(function a(b,c,d,e,f,g){'use strict';var h,i;if(c.__markCompiled)c.__markCompiled();var j=new (c('URI'))('/l.php').setDomain(c('LinkshimHandlerConfig').linkshim_host),k=new (c('URI'))('/').setDomain(c('LinkshimHandlerConfig').linkshim_host);function l(r,s){var t=new (c('URI'))(r),u=t.getProtocol()==='http'?'http':'https';return j.setQueryData({u:r,h:s}).setProtocol(u).toString();}function m(r,s){var t=new (c('URI'))(r),u=t.getProtocol()==='http'?'http':'https';return k.setQueryData({u:r,e:s}).setProtocol(u).toString();}function n(r,s){var t=c('$')('meta_referrer');t.content=c('LinkshimHandlerConfig').switched_meta_referrer_policy;setTimeout(function(){t.content=c('LinkshimHandlerConfig').default_meta_referrer_policy;p(r,s);},100);}function o(r){c('Bootloader').loadModules(["AsyncSignal","XLinkshimLogController"],r||c('emptyFunction'),'AbstractLink.react');}function p(r,s){o(function(t,u){var v=c('LinkshimHandlerConfig').render_verification_rate||0,w=Math.floor(Math.random()*v+1)===v,x=u.getURIBuilder().setString('u',r).setString('h',s).setBool('render_verification',w).getURI();new t(x).send();});}h=babelHelpers.inherits(q,c('React').Component);i=h&&h.prototype;function q(){var r,s;for(var t=arguments.length,u=Array(t),v=0;v<t;v++)u[v]=arguments[v];return s=(r=i.constructor).call.apply(r,[this].concat(u)),this.$AbstractLink1=function(w){var x=this.props,y=x.href,z=x.shimhash,aa=x.useMetaReferrer,ba=x.onClick;if(aa)n(y,z||'');ba&&ba(w);}.bind(this),s;}q.prototype.componentDidMount=function(){if(this.props.useMetaReferrer)o();};q.prototype.render=function(){var r=this.props,s=r.href,t=r.shimhash,u=r.lynxEParam,v=r.onClick,w=r.useLynx,x=r.useRedirect,y=r.useMetaReferrer,z=r.nofollow,aa=r.noopener,ba=r.rel,ca=babelHelpers.objectWithoutProperties(r,['href','shimhash','lynxEParam','onClick','useLynx','useRedirect','useMetaReferrer','nofollow','noopener','rel']),da=s,ea=ba;if(x)if(w){da=m(s,u||'');}else da=l(s,t||'');if(z)ea=ea?ea+' nofollow':'nofollow';if(aa)ea=ea?ea+' noopener':'noopener';return (c('React').createElement('a',babelHelpers['extends']({},ca,{href:da,rel:ea,onClick:this.$AbstractLink1})));};f.exports=q;}),null); __d('Link.react',['AbstractLink.react','isFacebookURI','LinkReactUnsafeHrefConfig','LinkshimHandlerConfig','React','URI'],(function a(b,c,d,e,f,g){'use strict';var h,i;if(c.__markCompiled)c.__markCompiled();var j=c('LinkReactUnsafeHrefConfig').LinkHrefChecker,k=/^(#|\/\w)/;function l(n){if(k.test(n))return false;var o=new (c('URI'))(n),p=o.getProtocol();return (p==='http'||p==='https')&&!c('isFacebookURI')(o);}h=babelHelpers.inherits(m,c('React').Component);i=h&&h.prototype;m.prototype.render=function(){var n=this.props,o=n.allowunsafehref,p=n.s,q=n.href,r=n.target,s=babelHelpers.objectWithoutProperties(n,['allowunsafehref','s','href','target']),t='#',u=null;if(q instanceof c('URI')){t=q.toString();}else if(typeof q==='string'&&q!==''&&q!=='#'){t=q;}else if(typeof q==='object'&&q!==null){t=q.url.toString();u=q.shimhash?q.shimhash.toString():u;}else{t='#';u=null;}if(j)j.logIfInvalidProtocol(t,o);var v=false,w=null;if(u==null&&l(t)){u=c('LinkshimHandlerConfig').link_react_default_hash;v=c('LinkshimHandlerConfig').use_lynx;w=c('LinkshimHandlerConfig').lynx_e_param;}var x=u!=null,y=u!=null,z=false;if(c('LinkshimHandlerConfig').supports_meta_referrer){if(p)y=false;if(u!=null)z=true;}var aa=c('LinkshimHandlerConfig').use_rel_no_opener&&u!==null&&r==='_blank';return (c('React').createElement(c('AbstractLink.react'),babelHelpers['extends']({},s,{href:t,nofollow:x,noopener:aa,shimhash:u,lynxEParam:w,target:r,useLynx:v,useRedirect:y,useMetaReferrer:z})));};function m(){h.apply(this,arguments);}f.exports=m;}),null); __d('EmojiImageURL',['invariant','EmojiStaticConfig','EmojiConfig'],(function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();function i(k,l){k=b.unescape(encodeURIComponent(k));for(var m=0;m<k.length;m++){l=(l<<5)-l+k.charCodeAt(m);l&=4294967295;}return (l&255).toString(16);}function j(k,l,m){!(l in c('EmojiStaticConfig').supportedSizes)?h(0):void 0;var n=c('EmojiConfig').pixelRatio+'/'+l+'/'+k+c('EmojiStaticConfig').fileExt,o=i(n,c('EmojiStaticConfig').checksumBase);return c('EmojiConfig').schemaAuth+'/'+m+o+'/'+n;}f.exports={getUnicodeURL:function k(l){var m=arguments.length<=1||arguments[1]===undefined?16:arguments[1];return j(l,m,c('EmojiStaticConfig').types.UNICODE);},getMessengerURL:function k(l,m){return j(l,m,c('EmojiStaticConfig').types.MESSENGER);},getFBEmojiURL:function k(l){var m=arguments.length<=1||arguments[1]===undefined?16:arguments[1];return j(l,m,c('EmojiStaticConfig').types.FBEMOJI);}};}),null); __d("EmojiRendererData",[],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();h.isEmoji=function(i){"use strict";return (i===35||i===42||i>=48&&i<=57||i===169||i===174||i===8252||i===8265||i===8482||i===8505||i>=8596&&i<=8601||i>=8617&&i<=8618||i>=8986&&i<=8987||i===9000||i===9167||i>=9193&&i<=9203||i>=9208&&i<=9210||i===9410||i>=9642&&i<=9643||i===9654||i===9664||i>=9723&&i<=9726||i>=9728&&i<=9732||i===9742||i===9745||i>=9748&&i<=9749||i===9752||i===9760||i>=9762&&i<=9763||i===9766||i===9770||i>=9774&&i<=9775||i>=9784&&i<=9786||i===9792||i===9794||i>=9800&&i<=9811||i===9824||i===9827||i>=9829&&i<=9830||i===9832||i===9851||i===9855||i>=9874&&i<=9879||i===9881||i>=9883&&i<=9884||i>=9888&&i<=9889||i>=9898&&i<=9899||i>=9904&&i<=9905||i>=9917&&i<=9918||i>=9924&&i<=9925||i===9928||i>=9934&&i<=9935||i===9937||i>=9939&&i<=9940||i>=9961&&i<=9962||i>=9968&&i<=9973||i>=9975&&i<=9976||i===9978||i===9981||i===9986||i===9989||i>=9992&&i<=9993||i===9999||i===10002||i===10004||i===10006||i===10013||i===10017||i===10024||i>=10035&&i<=10036||i===10052||i===10055||i===10060||i===10062||i>=10067&&i<=10069||i===10071||i>=10083&&i<=10084||i>=10133&&i<=10135||i===10145||i===10160||i===10175||i>=10548&&i<=10549||i>=11013&&i<=11015||i>=11035&&i<=11036||i===11088||i===11093||i===12336||i===12349||i===12951||i===12953||i===126980||i===127183||i>=127344&&i<=127345||i>=127358&&i<=127359||i===127374||i>=127377&&i<=127386||i>=127462&&i<=127487||i>=127489&&i<=127490||i===127514||i===127535||i>=127538&&i<=127546||i>=127568&&i<=127569||i>=127744&&i<=127777||i>=127780&&i<=127876||i>=127878&&i<=127891||i>=127894&&i<=127895||i>=127897&&i<=127899||i>=127902&&i<=127937||i>=127941&&i<=127942||i>=127944&&i<=127945||i>=127949&&i<=127984||i>=127987&&i<=127989||i>=127991&&i<=127994||i>=128000&&i<=128065||i>=128068&&i<=128069||i>=128081&&i<=128101||i>=128121&&i<=128123||i>=128125&&i<=128128||i===128132||i>=128136&&i<=128169||i>=128171&&i<=128253||i>=128255&&i<=128317||i>=128329&&i<=128334||i>=128336&&i<=128359||i>=128367&&i<=128368||i===128371||i>=128374&&i<=128377||i===128391||i>=128394&&i<=128397||i>=128420&&i<=128421||i===128424||i>=128433&&i<=128434||i===128444||i>=128450&&i<=128452||i>=128465&&i<=128467||i>=128476&&i<=128478||i===128481||i===128483||i===128488||i===128495||i===128499||i>=128506&&i<=128580||i>=128584&&i<=128586||i>=128640&&i<=128674||i>=128676&&i<=128691||i>=128695&&i<=128703||i>=128705&&i<=128709||i===128715||i>=128717&&i<=128722||i>=128736&&i<=128741||i===128745||i>=128747&&i<=128748||i===128752||i>=128755&&i<=128758||i>=129296&&i<=129303||i>=129312&&i<=129317||i===129319||i===129338||i>=129344&&i<=129349||i>=129351&&i<=129355||i>=129360&&i<=129374||i>=129408&&i<=129425||i===129472);};h.isEmojiModifier=function(i){"use strict";return (i>=127995&&i<=127999);};h.isEmojiModifierBase=function(i){"use strict";return (i===9757||i===9977||i>=9994&&i<=9997||i===127877||i>=127938&&i<=127940||i===127943||i>=127946&&i<=127948||i>=128066&&i<=128067||i>=128070&&i<=128080||i>=128102&&i<=128120||i===128124||i>=128129&&i<=128131||i>=128133&&i<=128135||i===128170||i>=128372&&i<=128373||i===128378||i===128400||i>=128405&&i<=128406||i>=128581&&i<=128583||i>=128587&&i<=128591||i===128675||i>=128692&&i<=128694||i===128704||i===128716||i>=129304&&i<=129310||i===129318||i===129328||i>=129331&&i<=129337||i>=129340&&i<=129342);};h.isEmojiVariationSelector=function(i){"use strict";return (i>=65038&&i<=65039);};h.isNonSpacingCombiningMark=function(i){"use strict";return (i===8419||i===8416);};h.isRegionalIndicator=function(i){"use strict";return (i>=127462&&i<=127487);};h.isText=function(i){"use strict";return (i===35||i===42||i>=48&&i<=57);};h.isDefaultTextPresentation=function(i){"use strict";return (i===35||i===42||i>=48&&i<=57||i===169||i===174||i===8252||i===8265||i===8482||i===8505||i>=8596&&i<=8597||i>=8617&&i<=8618||i===9000||i===9167||i>=9197&&i<=9199||i>=9201&&i<=9202||i>=9208&&i<=9210||i===9410||i===9654||i===9664||i>=9730&&i<=9732||i===9745||i===9752||i===9760||i>=9762&&i<=9763||i===9766||i===9770||i>=9774&&i<=9775||i>=9784&&i<=9785||i===9792||i===9794||i===9851||i===9874||i>=9876&&i<=9879||i===9881||i>=9883&&i<=9884||i>=9904&&i<=9905||i===9928||i===9935||i===9937||i===9939||i===9961||i>=9968&&i<=9969||i===9972||i>=9975&&i<=9977||i===9997||i===9999||i===10002||i===10004||i===10013||i===10017||i===10052||i===10055||i===10083||i===12336||i>=127344&&i<=127345||i>=127358&&i<=127359||i===127777||i>=127780&&i<=127788||i===127798||i===127869||i>=127894&&i<=127895||i>=127897&&i<=127899||i>=127902&&i<=127903||i>=127947&&i<=127950||i>=127956&&i<=127967||i===127987||i===127989||i===127991||i===128063||i===128065||i===128253||i>=128329&&i<=128330||i>=128367&&i<=128368||i>=128371&&i<=128377||i===128391||i>=128394&&i<=128397||i===128400||i===128421||i===128424||i>=128433&&i<=128434||i===128444||i>=128450&&i<=128452||i>=128465&&i<=128467||i>=128476&&i<=128478||i===128481||i===128483||i===128488||i===128495||i===128499||i===128506||i===128715||i>=128717&&i<=128719||i>=128736&&i<=128741||i===128745||i===128752||i===128755);};h.isZWJ=function(i){"use strict";return (i===8205);};function h(){"use strict";}f.exports=h;}),null); __d('EmojiRenderer',['EmojiRendererData','UnicodeUtils'],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=0,i=1,j=2,k=3,l=4,m=5,n=6,o=7,p=8,q=9,r=10;function s(u){var v=u[0];if(v===undefined)return false;var w=u.length;v=v.charCodeAt(0);if(c('EmojiRendererData').isDefaultTextPresentation(v)&&w<2)return false;if(c('EmojiRendererData').isText(v))if(u.length==2){return c('EmojiRendererData').isNonSpacingCombiningMark(u[1].charCodeAt(0));}else{var x=1;if(c('EmojiRendererData').isEmojiVariationSelector(u[x].charCodeAt(0)))x++;while(x<u.length){if(!c('EmojiRendererData').isNonSpacingCombiningMark(u[x].charCodeAt(0)))return false;x++;}return true;}return true;}var t={parse:function u(v,w){var x=null,y=[],z=h,aa=0,ba=v.length;while(aa<ba){var ca=v.codePointAt(aa),da=c('UnicodeUtils').getUTF16Length(v,aa),ea=v.substr(aa,da);switch(z){case p:if(c('EmojiRendererData').isRegionalIndicator(ca)){z=k;}else z=h;break;case l:if(c('EmojiRendererData').isZWJ(ca)){z=o;}else if(c('EmojiRendererData').isEmojiModifier(ca)){z=m;}else if(c('EmojiRendererData').isEmojiVariationSelector(ca)){z=i;}else z=h;break;case i:if(c('EmojiRendererData').isZWJ(ca)){z=o;}else if(c('EmojiRendererData').isEmojiModifier(ca)){z=m;}else z=h;break;case j:if(c('EmojiRendererData').isZWJ(ca)){z=o;}else if(c('EmojiRendererData').isEmojiVariationSelector(ca)){z=n;}else if(c('EmojiRendererData').isNonSpacingCombiningMark(ca)){z=q;}else z=h;break;case n:case q:if(c('EmojiRendererData').isNonSpacingCombiningMark(ca))break;case k:case m:if(c('EmojiRendererData').isZWJ(ca)){z=o;}else z=h;break;case o:if(c('EmojiRendererData').isRegionalIndicator(ca)){z=p;}else if(c('EmojiRendererData').isEmojiModifierBase(ca)){z=l;}else if(c('EmojiRendererData').isEmoji(ca)){z=j;}else z=h;break;case r:if(c('EmojiRendererData').isNonSpacingCombiningMark(ca)){z=q;}else if(!(c('EmojiRendererData').isEmojiVariationSelector(ca)))z=h;break;default:z=h;break;}if(z===h){if(c('EmojiRendererData').isRegionalIndicator(ca)){z=p;}else if(c('EmojiRendererData').isEmojiModifierBase(ca)){z=l;}else if(c('EmojiRendererData').isText(ca)){z=r;}else if(c('EmojiRendererData').isEmoji(ca))z=j;if(z!==h){if(x!==null&&s(x.emoji))y.push(x);if(w!==null&&w===y.length){x=null;break;}x={emoji:[ea],length:da,offset:aa};}}else if(x!==null){x.emoji.push(ea);x.length+=da;}aa+=da;}if(x!==null&&s(x.emoji))y.push(x);return y;},render:function u(v,w,x){var y=t.parse(v),z=[],aa=0;y.forEach(function(ba){var ca=ba.offset;if(ca>aa)z.push(v.substr(aa,ca-aa));z.push(w(ba.emoji));aa=ca+ba.length;});z.push(v.substr(aa,v.length-aa));return z;},containsEmoji:function u(v){return t.parse(v,1).length===1;},countEmoji:function u(v){return t.parse(v).length;}};f.exports=t;}),null); __d("Utf16",[],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h={decode:function i(j){switch(j.length){case 1:return j.charCodeAt(0);case 2:return 65536|(j.charCodeAt(0)-55296)*1024|j.charCodeAt(1)-56320;}},encode:function i(j){if(j<65536){return String.fromCharCode(j);}else return String.fromCharCode(55296+(j-65536>>10))+String.fromCharCode(56320+j%1024);}};f.exports=h;}),null); __d('createEmojiElement',['cx','EmojiConfig','JSXDOM'],(function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();function i(j,k){return (c('JSXDOM').span({className:(c('EmojiConfig').hasFBEmoji?"_5mfr":'')+(' '+"_47e3")},[c('JSXDOM').img({'aria-hidden':true,className:'img',height:16,src:k,width:16}),c('JSXDOM').span({className:"_7oe"},j)]));}f.exports=i;}),null); __d('DOMEmoji',['cx','EmojiConfig','EmojiImageURL','EmojiRenderer','EmojiRendererData','JSXDOM','SupportedEmoji','Utf16','createEmojiElement','flattenArray','isElementNode'],(function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();var i={MAX_ITEMS:40,transform:function j(k,l){return c('flattenArray')(k.map(function(m){if(!c('isElementNode')(m)){return c('EmojiRenderer').render(m,function(n){if(c('EmojiRendererData').isEmojiVariationSelector(c('Utf16').decode(n[n.length-1])))n=n.slice(0,-1);var o=n.map(function(p){return c('Utf16').decode(p).toString(16);}).join('_');if(l&&l.isSupportedEmoji&&l.isSupportedEmoji(o)){return c('createEmojiElement')(n.join(''),c('EmojiImageURL').getMessengerURL(o,16));}else if(c('SupportedEmoji').emoji[o])return c('createEmojiElement')(n.join(''),c('EmojiConfig').hasFBEmoji?c('EmojiImageURL').getFBEmojiURL(o):c('EmojiImageURL').getUnicodeURL(o));return c('JSXDOM').span({className:"_4ay8 _3kkw"},n.join(''));},this.MAX_ITEMS);}else return m;}.bind(this)));},params:function j(k){var l=this;return {__params:true,obj:l,params:k};}};f.exports=i;}),null); __d("EmoticonsList",[],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();f.exports={emotes:{"O:)":"angel","O:-)":"angel",":3":"colonthree","o.O":"confused","O.o":"confused_rev",":'(":"cry",":'-(":"cry","3:)":"devil","3:-)":"devil",":(":"frown",":-(":"frown",":[":"frown","=(":"frown",")=":"frown",":o":"gasp",":-O":"gasp",":O":"gasp",":-o":"gasp","8-)":"glasses","B-)":"glasses","=D":"grin",":-D":"grin",":D":"grin",">:(":"grumpy",">:-(":"grumpy","<3":"heart","&lt;3":"heart","^_^":"kiki","^~^":"kiki",":*":"kiss",":-*":"kiss","(y)":"like",":like:":"like","(Y)":"like",":v":"pacman",":V":"pacman","<(\")":"penguin",":poop:":"poop",":putnam:":"putnam",":|]":"robot","(^^^)":"shark",":)":"smile",":-)":"smile",":]":"smile","=)":"smile","(:":"smile","(=":"smile","-_-":"squint","B|":"sunglasses","8-|":"sunglasses","8|":"sunglasses","B-|":"sunglasses",":P":"tongue",":-P":"tongue",":-p":"tongue",":p":"tongue","=P":"tongue",":/":"unsure",":-/":"unsure",":\\":"unsure",":-\\":"unsure","=/":"unsure","=\\":"unsure",">:o":"upset",">:O":"upset",">:-O":"upset",">:-o":"upset",">_<":"upset",">.<":"upset",";)":"wink",";-)":"wink"},symbols:{angel:"O:)",colonthree:":3",confused:"o.O",confused_rev:"O.o",cry:":'(",devil:"3:)",frown:":(",gasp:":o",glasses:"8-)",grin:"=D",grumpy:">:(",heart:"<3",kiki:"^_^",kiss:":*",like:"(y)",pacman:":v",penguin:"<(\")",poop:":poop:",putnam:":putnam:",robot:":|]",shark:"(^^^)",smile:":)",squint:"-_-",sunglasses:"B|",tongue:":P",unsure:":/",upset:">:o",wink:";)"},emoji:{angel:"1f607",colonthree:"FACE_WITH_COLON_THREE",confused:"1f633",confused_rev:"1f633",cry:"1f622",devil:"1f608",frown:"1f641",gasp:"1f62e",glasses:"1f913",grin:"1f603",grumpy:"1f620",heart:"2764",kiki:"1f60a",kiss:"1f618",pacman:"PACMAN_2",penguin:"1f427",poop:"1f4a9",robot:"1f916",shark:"1f988",smile:"1f642",squint:"1f611",sunglasses:"1f60e",tongue:"1f61b",unsure:"1f615",upset:"1f621",wink:"1f609"},regexp:/(^|[\s\'\".\(])(O:\)(?!\))|O:\-\)(?!\))|:3|o\.O|O\.o|:\'\(|:\'\-\(|3:\)(?!\))|3:\-\)(?!\))|:\(|:\-\(|:\[|=\(|\)=|:o|:\-O|:O|:\-o|8\-\)(?!\))|B\-\)(?!\))|=D|:\-D|:D|>:\(|>:\-\(|<3|&lt;3|\^_\^|\^~\^|:\*|:\-\*|\(y\)(?!\))|:like:|\(Y\)(?!\))|:v|:V|<\(\"\)(?!\))|:poop:|:putnam:|:\|\]|\(\^\^\^\)(?!\))|:\)(?!\))|:\-\)(?!\))|:\]|=\)(?!\))|\(:|\(=|\-_\-|B\||8\-\||8\||B\-\||:P|:\-P|:\-p|:p|=P|:\/|:\-\/|:\\|:\-\\|=\/|=\\|>:o|>:O|>:\-O|>:\-o|>_<|>\.<|;\)(?!\))|;\-\)(?!\)))([\s\'\".,!?\)]|<br>|$)/,noncapturingRegexp:/(?:^|[\s\'\".\(])(O:\)(?!\))|O:\-\)(?!\))|:3|o\.O|O\.o|:\'\(|:\'\-\(|3:\)(?!\))|3:\-\)(?!\))|:\(|:\-\(|:\[|=\(|\)=|:o|:\-O|:O|:\-o|8\-\)(?!\))|B\-\)(?!\))|=D|:\-D|:D|>:\(|>:\-\(|<3|&lt;3|\^_\^|\^~\^|:\*|:\-\*|\(y\)(?!\))|:like:|\(Y\)(?!\))|:v|:V|<\(\"\)(?!\))|:poop:|:putnam:|:\|\]|\(\^\^\^\)(?!\))|:\)(?!\))|:\-\)(?!\))|:\]|=\)(?!\))|\(:|\(=|\-_\-|B\||8\-\||8\||B\-\||:P|:\-P|:\-p|:p|=P|:\/|:\-\/|:\\|:\-\\|=\/|=\\|>:o|>:O|>:\-O|>:\-o|>_<|>\.<|;\)(?!\))|;\-\)(?!\)))(?:[\s\'\".,!?\)]|<br>|$)/};}),null); __d('TransformTextToDOMMixin',['flattenArray','isElementNode'],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=3,i={transform:function j(k,l){return c('flattenArray')(k.map(function(m){if(!c('isElementNode')(m)){var n=m,o=[],p=this.MAX_ITEMS||h;while(p--){var q=l?[n].concat(l):[n],r=this.match.apply(this,q);if(!r)break;o.push(n.substring(0,r.startIndex));o.push(r.element);n=n.substring(r.endIndex);}n&&o.push(n);return o;}return m;}.bind(this)));},params:function j(){for(var k=arguments.length,l=Array(k),m=0;m<k;m++)l[m]=arguments[m];var n=this;return {__params:true,obj:n,params:l};}};f.exports=i;}),null); __d('DOMEmote',['fbt','cx','EmojiConfig','EmojiImageURL','EmoticonsList','JSXDOM','SupportedEmoji','TransformTextToDOMMixin'],(function a(b,c,d,e,f,g,h,i){if(c.__markCompiled)c.__markCompiled();var j={MAX_ITEMS:40,match:function k(l,m){var n=c('EmoticonsList').regexp.exec(l);if(!n||!n.length)return false;var k=n[2],o=n.index+n[1].length;return {startIndex:o,endIndex:o+k.length,element:this._element(k,c('EmoticonsList').emotes[k],m)};},_element:function k(l,m,n){var o=n&&n.getMessengerEmote,p=o?o(m):c('EmoticonsList').emoji[m],q=null;if(o&&p){q=c('JSXDOM').img({'aria-hidden':true,className:'img',height:16,src:c('EmojiImageURL').getMessengerURL(p,16),width:16});}else if(c('EmojiConfig').hasFBEmoji&&p&&c('SupportedEmoji').emoji[p]){q=c('JSXDOM').img({'aria-hidden':true,className:'img',height:16,src:c('EmojiImageURL').getFBEmojiURL(p),width:16});}else q=c('JSXDOM').span({'aria-hidden':true,className:'emoticon emoticon_'+m});var r=h._("{emoticonName} emoticon",[h.param('emoticonName',m)]);return (c('JSXDOM').span({className:"_47e3 _5mfr",title:r},[q,c('JSXDOM').span({'aria-hidden':true,className:"_7oe"},l)]));}};f.exports=Object.assign(j,c('TransformTextToDOMMixin'));}),null); __d('transformTextToDOM',['createArrayFromMixed'],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(i,j){var k=[i];j=c('createArrayFromMixed')(j);j.forEach(function(l){var m,n=l;if(l.__params){m=l.params;n=l.obj;}k=n.transform(k,m);});return k;}f.exports=h;}),null); __d('emojiAndEmote',['DOMEmoji','DOMEmote','transformTextToDOM'],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=function i(j){var k=[c('DOMEmoji'),c('DOMEmote')];return c('transformTextToDOM')(j,k);};f.exports=h;}),null); __d('Emoji',['DOMEmoji','JSXDOM','emojiAndEmote','transformTextToDOM'],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h={htmlEmojiAndEmote:function i(j,k){return c('JSXDOM').span(null,c('emojiAndEmote')(j)).innerHTML;},htmlEmojiAndEmoteWithoutFBID:function i(j,k){return c('JSXDOM').span(null,c('emojiAndEmote')(j,false)).innerHTML;},htmlEmoji:function i(j){return c('JSXDOM').span(null,c('transformTextToDOM')(j,c('DOMEmoji'))).innerHTML;}};f.exports=h;}),null); __d('Emote',['DOMEmote','JSXDOM','transformTextToDOM'],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h={htmlEmoteWithoutFBID:function i(j,k){return c('JSXDOM').span(null,c('transformTextToDOM')(j,c('DOMEmote'))).innerHTML;},htmlEmote:function i(j,k){return (c('JSXDOM').span(null,c('transformTextToDOM')(j,[c('DOMEmote')])).innerHTML);}};f.exports=h;}),null); __d('TextWithEmoticons.react',['Emoji','Emote','React'],(function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('React').Component);i=h&&h.prototype;j.prototype.render=function(){'use strict';if(!this.props.renderEmoticons&&!this.props.renderEmoji)return c('React').createElement('span',null,this.props.text);var k;if(this.props.renderEmoticons&&this.props.renderEmoji){k=c('Emoji').htmlEmojiAndEmoteWithoutFBID(this.props.text);}else if(this.props.renderEmoticons){k=c('Emote').htmlEmoteWithoutFBID(this.props.text);}else k=c('Emoji').htmlEmoji(this.props.text);if(k.indexOf('<')===-1)return c('React').createElement('span',null,this.props.text);return c('React').createElement('span',{dangerouslySetInnerHTML:{__html:k}});};function j(){'use strict';h.apply(this,arguments);}f.exports=j;}),null); __d('TextWithEntities.react',['BaseTextWithEntities.react','Link.react','React','TextWithEmoticons.react'],(function a(b,c,d,e,f,g){'use strict';var h,i;if(c.__markCompiled)c.__markCompiled();function j(l){return l.replace(/<3\b|&hearts;/g,'\u2665');}h=babelHelpers.inherits(k,c('React').Component);i=h&&h.prototype;function k(){var l,m;for(var n=arguments.length,o=Array(n),p=0;p<n;p++)o[p]=arguments[p];return m=(l=i.constructor).call.apply(l,[this].concat(o)),this.$TextWithEntities1=function(q){if(this.props.renderEmoticons||this.props.renderEmoji){return (c('React').createElement(c('TextWithEmoticons.react'),{text:q,renderEmoticons:this.props.renderEmoticons,renderEmoji:this.props.renderEmoji}));}else return j(q);}.bind(this),this.$TextWithEntities2=function(q,r){if(this.props.interpolator){return this.props.interpolator(q,r);}else if(r.entity){return (c('React').createElement(c('Link.react'),{href:r.entity},q));}else return q;}.bind(this),m;}k.prototype.render=function(){return (c('React').createElement(c('BaseTextWithEntities.react'),babelHelpers['extends']({},this.props,{textRenderer:this.$TextWithEntities1,rangeRenderer:this.$TextWithEntities2,ranges:this.props.ranges,imageRanges:this.props.imageRanges,aggregatedRanges:this.props.aggregatedRanges,metaRanges:this.props.metaRanges,text:this.props.text})));};f.exports=k;}),null); __d('XUISpinner.react',['cx','fbt','BrowserSupport','React','UserAgent','joinClasses'],(function a(b,c,d,e,f,g,h,i){var j,k;if(c.__markCompiled)c.__markCompiled();var l=c('React').PropTypes,m=c('BrowserSupport').hasCSSAnimations()&&!(c('UserAgent').isEngine('Trident < 6')||c('UserAgent').isEngine('Gecko < 39')||c('UserAgent').isBrowser('Safari < 6'));j=babelHelpers.inherits(n,c('React').Component);k=j&&j.prototype;n.prototype.render=function(){'use strict';var o="img"+(' '+"_55ym")+(this.props.size=='small'?' '+"_55yn":'')+(this.props.size=='large'?' '+"_55yq":'')+(this.props.background=='light'?' '+"_55yo":'')+(this.props.background=='dark'?' '+"_55yp":'')+(this.props.showOnAsync?' '+"_5tqs":'')+(!m?' '+"_5d9-":'')+(m&&this.props.paused?' '+"_2y32":'');return (c('React').createElement('span',babelHelpers['extends']({},this.props,{className:c('joinClasses')(this.props.className,o),'aria-label':i._("Loading..."),'aria-busy':true})));};function n(){'use strict';j.apply(this,arguments);}n.propTypes={paused:l.bool,showOnAsync:l.bool,size:l.oneOf(['small','large']),background:l.oneOf(['light','dark'])};n.defaultProps={showOnAsync:false,size:'small',background:'light'};f.exports=n;}),null); __d('UFIShareLink.react',['cx','fbt','CurrentUser','React','TrackingNodes','XUISpinner.react','joinClasses'],(function a(b,c,d,e,f,g,h,i){'use strict';var j,k;if(c.__markCompiled)c.__markCompiled();j=babelHelpers.inherits(l,c('React').Component);k=j&&j.prototype;function l(){var m,n;for(var o=arguments.length,p=Array(o),q=0;q<o;q++)p[q]=arguments[q];return n=(m=k.constructor).call.apply(m,[this].concat(p)),this.$UFIShareLink1=function(event){if(this.props.href&&this.props.href!=='#'&&!this.props.onClick)return;event.preventDefault();this.props.onClick&&this.props.onClick(event);}.bind(this),n;}l.prototype.render=function(){var m=i._("Send this to friends or post it on your timeline.");if(c('CurrentUser').isWorkUser())m=i._("Send this to coworkers or post it on your timeline.");var n='{ "tn": "'+c('TrackingNodes').encodeTN(c('TrackingNodes').types.SHARE_LINK)+'", "type": 25 }',o=null;if(this.props.rel!=='dialog')o=c('React').createElement(c('XUISpinner.react'),{className:"UFIShareLinkSpinner _1wfk",showOnAsync:true});return (c('React').createElement('a',babelHelpers['extends']({},this.props,{className:c('joinClasses')(this.props.className,"share_action_link _5f9b"),onClick:this.$UFIShareLink1,'data-ft':n,title:m}),i._("Share"),o));};f.exports=l;}),null); __d('Timestamp.react',['LiveTimer','React','ReactDOM','joinClasses'],(function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();var j=c('React').PropTypes;h=babelHelpers.inherits(k,c('React').Component);i=h&&h.prototype;k.prototype.componentDidMount=function(){'use strict';if(this.props.autoUpdate)c('LiveTimer').addTimeStamps(c('ReactDOM').findDOMNode(this));};k.prototype.componentDidUpdate=function(l,m){'use strict';if(this.props.autoUpdate&&this.props.time!==l.time)c('LiveTimer').loop();};k.prototype.componentWillUnmount=function(){'use strict';c('LiveTimer').removeTimestamp(c('ReactDOM').findDOMNode(this));};k.prototype.render=function(){'use strict';var l=c('LiveTimer').renderRelativeTimeToServer(this.props.time,this.props.shorten,this.props.minimize);return (c('React').createElement('abbr',babelHelpers['extends']({},this.props,{className:c('joinClasses')(this.props.className,"livetimestamp"),title:this.props.verbose,'data-utime':this.props.time,'data-minimize':this.props.minimize?true:null,'data-shorten':this.props.shorten?true:null}),l.text.toString()||this.props.text));};function k(){'use strict';h.apply(this,arguments);}k.propTypes={autoUpdate:j.bool};k.defaultProps={autoUpdate:false};f.exports=k;}),null); __d('ReactPropTransfererCore',['emptyFunction','joinClasses'],(function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();function h(m){return function(n,o,p){if(!n.hasOwnProperty(o)){n[o]=p;}else n[o]=m(n[o],p);};}var i=h(function(m,n){return Object.assign({},n,m);}),j={children:c('emptyFunction'),className:h(c('joinClasses')),style:i};function k(m,n){for(var o in n){if(!n.hasOwnProperty(o))continue;var p=j[o];if(p&&j.hasOwnProperty(o)){p(m,o,n[o]);}else if(!m.hasOwnProperty(o))m[o]=n[o];}return m;}var l={mergeProps:function m(n,o){return k(Object.assign({},n),o);}};f.exports=l;}),null); __d('ReactPropTransferer',['ReactPropTransfererCore'],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();f.exports=c('ReactPropTransfererCore');}),null); __d("keyOf",[],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=function i(j){var k;for(k in j){if(!j.hasOwnProperty(k))continue;return k;}return null;};f.exports=h;}),null); __d('cloneWithProps_DEPRECATED',['ReactElement','ReactPropTransferer','keyOf','warning'],(function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h=c('keyOf')({children:null}),i=false;function j(k,l){var m=c('ReactPropTransferer').mergeProps(l,k.props);if(!m.hasOwnProperty(h)&&k.props.hasOwnProperty(h))m.children=k.props.children;return c('ReactElement').createElement(k.type,m);}f.exports=j;}),null); __d('AbstractButton.react',['cx','Link.react','React','cloneWithProps_DEPRECATED','joinClasses'],(function a(b,c,d,e,f,g,h){var i,j;if(c.__markCompiled)c.__markCompiled();var k=c('React').Component,l=c('React').PropTypes;i=babelHelpers.inherits(m,k);j=i&&i.prototype;function m(){var n,o;'use strict';for(var p=arguments.length,q=Array(p),r=0;r<p;r++)q[r]=arguments[r];return o=(n=j.constructor).call.apply(n,[this].concat(q)),this.handleClick=function(event){if(this.props.disabled){event.preventDefault();}else if(this.props.onClick)this.props.onClick(event);}.bind(this),o;}m.prototype.render=function(){'use strict';var n=this.props,o=n.depressed,p=n.disabled,q=n.image,r=n.imageRight,s=n.label,t=n.labelIsHidden,u=babelHelpers.objectWithoutProperties(n,['depressed','disabled','image','imageRight','label','labelIsHidden']),v="_42ft"+(p?' '+"_42fr":'')+(o?' '+"_42fs":''),w=q;if(w){var x={};if(s){x.alt='';if(!t)x.className="_3-8_";}w=c('cloneWithProps_DEPRECATED')(w,x);}var y=r;if(y){var z={};if(s){z.alt='';if(!t)z.className="_3-99";}y=c('cloneWithProps_DEPRECATED')(y,z);}if(this.props.href){return (c('React').createElement(c('Link.react'),babelHelpers['extends']({},u,{className:c('joinClasses')(this.props.className,v),onClick:this.handleClick}),w,t?c('React').createElement('span',{className:"accessible_elem"},s):s,y));}else if(this.props.type&&this.props.type!=='submit'){return (c('React').createElement('button',babelHelpers['extends']({},u,{className:c('joinClasses')(this.props.className,v),disabled:p,type:this.props.type}),w,t?c('React').createElement('span',{className:"accessible_elem"},s):s,y));}else return (c('React').createElement('button',babelHelpers['extends']({},u,{className:c('joinClasses')(this.props.className,v),disabled:p,type:'submit',value:'1'}),w,t?c('React').createElement('span',{className:"accessible_elem"},s):s,y));};m.propTypes={image:l.element,imageRight:l.element,depressed:l.bool,label:l.node,onClick:l.func,labelIsHidden:l.bool};m.defaultProps={disabled:false,depressed:false,labelIsHidden:false};f.exports=m;}),null); __d('XUIAbstractGlyphButton.react',['cx','AbstractButton.react','React','joinClasses'],(function a(b,c,d,e,f,g,h){'use strict';var i,j;if(c.__markCompiled)c.__markCompiled();var k=c('React').PropTypes;i=babelHelpers.inherits(l,c('React').Component);j=i&&i.prototype;l.prototype.render=function(){return (c('React').createElement(c('AbstractButton.react'),babelHelpers['extends']({},this.props,{className:c('joinClasses')(this.props.className,"_5upp")})));};function l(){i.apply(this,arguments);}l.propTypes={label:k.node};f.exports=l;}),null); __d('XUICloseButton.react',['cx','fbt','XUIAbstractGlyphButton.react','React','joinClasses'],(function a(b,c,d,e,f,g,h,i){var j,k;if(c.__markCompiled)c.__markCompiled();var l=c('React').PropTypes;j=babelHelpers.inherits(m,c('React').Component);k=j&&j.prototype;m.prototype.render=function(){'use strict';var n=this.props.size,o=this.props.shade,p="_50zy"+(n==='small'?' '+"_50zz":'')+(n==='medium'?' '+"_50-0":'')+(o==='light'?' '+"_50z_":'')+(o==='dark'?' '+"_50z-":''),q=this.props.label,r=this.props.title;if(!this.props.title&&!this.props.tooltip){if(!q)q=i._("Remove");r=q;}return (c('React').createElement(c('XUIAbstractGlyphButton.react'),babelHelpers['extends']({},this.props,{label:q,title:r,type:this.props.href?null:this.props.type,'data-hover':this.props.tooltip&&'tooltip','data-tooltip-alignh':this.props.tooltip&&'center','data-tooltip-content':this.props.tooltip,className:c('joinClasses')(this.props.className,p)})));};function m(){'use strict';j.apply(this,arguments);}m.propTypes={shade:l.oneOf(['light','dark']),size:l.oneOf(['small','medium']),type:l.oneOf(['submit','button','reset'])};m.defaultProps={size:'medium',shade:'dark',type:'button'};f.exports=m;}),null); __d('EncryptedImgUtils',['URI'],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h='ek',i={extractKey:function j(k){var l=k.getQueryData(),m=l[h];delete l[h];k.setQueryData(l);return m;},isEncrypted:function j(k){return (!k.startsWith('data:')&&i.extractKey(new (c('URI'))(k))!=null);}};f.exports=i;}),null); __d('ImageCore.react',['Bootloader','createCancelableFunction','EncryptedImgUtils','React','joinClasses'],(function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();function j(n){return n&&typeof n==='object'&&n.sprited&&n.spriteMapCssClass&&n.spriteCssClass;}function k(n){if(typeof n==='string')return n;if(n&&typeof n==='object')if(!n.sprited&&n.uri&&typeof n.uri==='string')return n.uri;return '';}function l(n,o,p){var q=n[o];if(q==null||j(q)||k(q)!=='')return;return new Error('Provided `'+o+'` to `'+p+'`. Must be `null`, '+'`undefined`, a string or an `ix` call.');}h=babelHelpers.inherits(m,c('React').Component);i=h&&h.prototype;function m(){'use strict';i.constructor.call(this);this.state={src:null};this.encryptedImgCallback=null;}m.prototype.$ReactImage1=function(n){'use strict';if(j(n))return;var o=k(n);if(o!=null&&c('EncryptedImgUtils').isEncrypted(o)){c('Bootloader').loadModules(["EncryptedImg"],function(p){if(this.encryptedImgCallback)this.encryptedImgCallback.cancel();this.encryptedImgCallback=c('createCancelableFunction')(function(q){if(o===k(this.props.src))this.setState({src:q});}.bind(this));p.load(o,this.encryptedImgCallback);}.bind(this),'ImageCore.react');}else this.setState({src:o});};m.prototype.componentWillMount=function(){'use strict';this.$ReactImage1(this.props.src);};m.prototype.componentWillReceiveProps=function(n){'use strict';if(n.src!=this.props.src)this.$ReactImage1(n.src);};m.prototype.componentWillUnmount=function(){'use strict';if(this.encryptedImgCallback)this.encryptedImgCallback.cancel();};m.prototype.render=function(){'use strict';var n=c('joinClasses')(this.props.className,m.baseClassName),o=this.props.src;if(o==null)return c('React').createElement('img',babelHelpers['extends']({},this.props,{className:n}));var p=null;if(this.props.alt&&j(o))p=c('React').createElement('u',null,this.props.alt);if(typeof o==='string')return c('React').createElement('img',babelHelpers['extends']({},this.props,{src:this.state.src,className:n}),p);if(j(o)){n=c('joinClasses')(n,o.spriteMapCssClass,o.spriteCssClass);return c('React').createElement('i',babelHelpers['extends']({},this.props,{className:n,src:null}),p);}if(this.props.width===undefined&&this.props.height===undefined)return (c('React').createElement('img',babelHelpers['extends']({},this.props,{className:n,width:o.width,height:o.height,src:this.state.src}),p));return (c('React').createElement('img',babelHelpers['extends']({},this.props,{className:n,src:this.state.src}),p));};m.baseClassName='img';m.defaultProps={alt:''};m.propTypes={src:l};m.validateImageSrcPropType=l;f.exports=m;}),null); __d('Image.react',['ImageCore.react'],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();f.exports=c('ImageCore.react');}),null); __d('AttachmentRelatedShareConstants',[],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h={ARTICLE_CLICK:'article_click',VIDEO_CLICK:'video_click',FBVIDEO_CLICK:'fbvideo_click',FBVIDEO_VIEW:'fbvideo_view',GAME_CLICK:'game_click',EVENT_DELAY:1000,HIDE_DELAY:100,PHOTO_CLICK:'photo_click',EVENT_JOIN:'event_join',PRODUCT_CLICK:'product_click'};f.exports=h;}),null); __d('SimpleDrag',['Event','ArbiterMixin','SubscriptionsHandler','UserAgent_DEPRECATED','Vector','emptyFunction'],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(i){this.minDragDistance=0;this._subscriptions=new (c('SubscriptionsHandler'))();this._subscriptions.addSubscriptions(c('Event').listen(i,'mousedown',this._start.bind(this)));}Object.assign(h.prototype,c('ArbiterMixin'),{setMinDragDistance:function i(j){this.minDragDistance=j;},destroy:function i(){this._subscriptions.release();},_start:function i(event){var j=false,k=true,l=null;if(this.inform('mousedown',event))k=false;if(this.minDragDistance){l=c('Vector').getEventPosition(event);}else{j=true;var m=this.inform('start',event);if(m===true){k=false;}else if(m===false){j=false;return;}}var n=c('UserAgent_DEPRECATED').ie()<9?document.documentElement:window,o=c('Event').listen(n,{selectstart:k?c('Event').prevent:c('emptyFunction'),mousemove:function(event){if(!j){var p=c('Vector').getEventPosition(event);if(l.distanceTo(p)<this.minDragDistance)return;j=true;if(this.inform('start',event)===false){j=false;return;}}this.inform('update',event);}.bind(this),mouseup:function(event){for(var p in o)o[p].remove();if(j){this.inform('end',event);}else this.inform('click',event);}.bind(this)});k&&event.prevent();}});f.exports=h;}),null); __d('UnicodeBidiDirection',['invariant'],(function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();var i='NEUTRAL',j='LTR',k='RTL';function l(p){return p===j||p===k;}function m(p){!l(p)?h(0):void 0;return p===j?'ltr':'rtl';}function n(p,q){!l(p)?h(0):void 0;!l(q)?h(0):void 0;return p===q?null:m(p);}var o={NEUTRAL:i,LTR:j,RTL:k,isStrong:l,getHTMLDir:m,getHTMLDirIfDifferent:n};f.exports=o;}),null); __d('UnicodeBidiGlobalDirectionCore',['invariant','UnicodeBidiDirection'],(function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();var i=null;function j(n){i=n;}function k(){j(c('UnicodeBidiDirection').LTR);}function l(){if(!i)this.initDir();!i?h(0):void 0;return i;}var m={setDir:j,initDir:k,getDir:l};f.exports=m;}),null); __d('UnicodeBidiGlobalDirection',['Locale','UnicodeBidiDirection','UnicodeBidiGlobalDirectionCore'],(function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();c('UnicodeBidiGlobalDirectionCore').initDir=function(){c('UnicodeBidiGlobalDirectionCore').setDir(c('Locale').isRTL()?c('UnicodeBidiDirection').RTL:c('UnicodeBidiDirection').LTR);};f.exports=c('UnicodeBidiGlobalDirectionCore');}),null); __d('UnicodeBidi',['invariant','UnicodeBidiDirection','UnicodeBidiGlobalDirection'],(function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();var i={L:'A-Za-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u01BA\u01BB'+'\u01BC-\u01BF\u01C0-\u01C3\u01C4-\u0293\u0294\u0295-\u02AF\u02B0-\u02B8'+'\u02BB-\u02C1\u02D0-\u02D1\u02E0-\u02E4\u02EE\u0370-\u0373\u0376-\u0377'+'\u037A\u037B-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1'+'\u03A3-\u03F5\u03F7-\u0481\u0482\u048A-\u052F\u0531-\u0556\u0559'+'\u055A-\u055F\u0561-\u0587\u0589\u0903\u0904-\u0939\u093B\u093D'+'\u093E-\u0940\u0949-\u094C\u094E-\u094F\u0950\u0958-\u0961\u0964-\u0965'+'\u0966-\u096F\u0970\u0971\u0972-\u0980\u0982-\u0983\u0985-\u098C'+'\u098F-\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD'+'\u09BE-\u09C0\u09C7-\u09C8\u09CB-\u09CC\u09CE\u09D7\u09DC-\u09DD'+'\u09DF-\u09E1\u09E6-\u09EF\u09F0-\u09F1\u09F4-\u09F9\u09FA\u0A03'+'\u0A05-\u0A0A\u0A0F-\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32-\u0A33'+'\u0A35-\u0A36\u0A38-\u0A39\u0A3E-\u0A40\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F'+'\u0A72-\u0A74\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0'+'\u0AB2-\u0AB3\u0AB5-\u0AB9\u0ABD\u0ABE-\u0AC0\u0AC9\u0ACB-\u0ACC\u0AD0'+'\u0AE0-\u0AE1\u0AE6-\u0AEF\u0AF0\u0B02-\u0B03\u0B05-\u0B0C\u0B0F-\u0B10'+'\u0B13-\u0B28\u0B2A-\u0B30\u0B32-\u0B33\u0B35-\u0B39\u0B3D\u0B3E\u0B40'+'\u0B47-\u0B48\u0B4B-\u0B4C\u0B57\u0B5C-\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F'+'\u0B70\u0B71\u0B72-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95'+'\u0B99-\u0B9A\u0B9C\u0B9E-\u0B9F\u0BA3-\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9'+'\u0BBE-\u0BBF\u0BC1-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0BD0\u0BD7'+'\u0BE6-\u0BEF\u0BF0-\u0BF2\u0C01-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10'+'\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C41-\u0C44\u0C58-\u0C59\u0C60-\u0C61'+'\u0C66-\u0C6F\u0C7F\u0C82-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8'+'\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CBE\u0CBF\u0CC0-\u0CC4\u0CC6'+'\u0CC7-\u0CC8\u0CCA-\u0CCB\u0CD5-\u0CD6\u0CDE\u0CE0-\u0CE1\u0CE6-\u0CEF'+'\u0CF1-\u0CF2\u0D02-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D'+'\u0D3E-\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D4E\u0D57\u0D60-\u0D61'+'\u0D66-\u0D6F\u0D70-\u0D75\u0D79\u0D7A-\u0D7F\u0D82-\u0D83\u0D85-\u0D96'+'\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCF-\u0DD1\u0DD8-\u0DDF'+'\u0DE6-\u0DEF\u0DF2-\u0DF3\u0DF4\u0E01-\u0E30\u0E32-\u0E33\u0E40-\u0E45'+'\u0E46\u0E4F\u0E50-\u0E59\u0E5A-\u0E5B\u0E81-\u0E82\u0E84\u0E87-\u0E88'+'\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7'+'\u0EAA-\u0EAB\u0EAD-\u0EB0\u0EB2-\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6'+'\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F01-\u0F03\u0F04-\u0F12\u0F13\u0F14'+'\u0F15-\u0F17\u0F1A-\u0F1F\u0F20-\u0F29\u0F2A-\u0F33\u0F34\u0F36\u0F38'+'\u0F3E-\u0F3F\u0F40-\u0F47\u0F49-\u0F6C\u0F7F\u0F85\u0F88-\u0F8C'+'\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE-\u0FCF\u0FD0-\u0FD4\u0FD5-\u0FD8'+'\u0FD9-\u0FDA\u1000-\u102A\u102B-\u102C\u1031\u1038\u103B-\u103C\u103F'+'\u1040-\u1049\u104A-\u104F\u1050-\u1055\u1056-\u1057\u105A-\u105D\u1061'+'\u1062-\u1064\u1065-\u1066\u1067-\u106D\u106E-\u1070\u1075-\u1081'+'\u1083-\u1084\u1087-\u108C\u108E\u108F\u1090-\u1099\u109A-\u109C'+'\u109E-\u109F\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FB\u10FC'+'\u10FD-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288'+'\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5'+'\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1360-\u1368'+'\u1369-\u137C\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166D-\u166E'+'\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EB-\u16ED\u16EE-\u16F0'+'\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1735-\u1736'+'\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17B6\u17BE-\u17C5'+'\u17C7-\u17C8\u17D4-\u17D6\u17D7\u17D8-\u17DA\u17DC\u17E0-\u17E9'+'\u1810-\u1819\u1820-\u1842\u1843\u1844-\u1877\u1880-\u18A8\u18AA'+'\u18B0-\u18F5\u1900-\u191E\u1923-\u1926\u1929-\u192B\u1930-\u1931'+'\u1933-\u1938\u1946-\u194F\u1950-\u196D\u1970-\u1974\u1980-\u19AB'+'\u19B0-\u19C0\u19C1-\u19C7\u19C8-\u19C9\u19D0-\u19D9\u19DA\u1A00-\u1A16'+'\u1A19-\u1A1A\u1A1E-\u1A1F\u1A20-\u1A54\u1A55\u1A57\u1A61\u1A63-\u1A64'+'\u1A6D-\u1A72\u1A80-\u1A89\u1A90-\u1A99\u1AA0-\u1AA6\u1AA7\u1AA8-\u1AAD'+'\u1B04\u1B05-\u1B33\u1B35\u1B3B\u1B3D-\u1B41\u1B43-\u1B44\u1B45-\u1B4B'+'\u1B50-\u1B59\u1B5A-\u1B60\u1B61-\u1B6A\u1B74-\u1B7C\u1B82\u1B83-\u1BA0'+'\u1BA1\u1BA6-\u1BA7\u1BAA\u1BAE-\u1BAF\u1BB0-\u1BB9\u1BBA-\u1BE5\u1BE7'+'\u1BEA-\u1BEC\u1BEE\u1BF2-\u1BF3\u1BFC-\u1BFF\u1C00-\u1C23\u1C24-\u1C2B'+'\u1C34-\u1C35\u1C3B-\u1C3F\u1C40-\u1C49\u1C4D-\u1C4F\u1C50-\u1C59'+'\u1C5A-\u1C77\u1C78-\u1C7D\u1C7E-\u1C7F\u1CC0-\u1CC7\u1CD3\u1CE1'+'\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF2-\u1CF3\u1CF5-\u1CF6\u1D00-\u1D2B'+'\u1D2C-\u1D6A\u1D6B-\u1D77\u1D78\u1D79-\u1D9A\u1D9B-\u1DBF\u1E00-\u1F15'+'\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D'+'\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC'+'\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200E'+'\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D'+'\u2124\u2126\u2128\u212A-\u212D\u212F-\u2134\u2135-\u2138\u2139'+'\u213C-\u213F\u2145-\u2149\u214E\u214F\u2160-\u2182\u2183-\u2184'+'\u2185-\u2188\u2336-\u237A\u2395\u249C-\u24E9\u26AC\u2800-\u28FF'+'\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2C7B\u2C7C-\u2C7D\u2C7E-\u2CE4'+'\u2CEB-\u2CEE\u2CF2-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F'+'\u2D70\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE'+'\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005\u3006\u3007'+'\u3021-\u3029\u302E-\u302F\u3031-\u3035\u3038-\u303A\u303B\u303C'+'\u3041-\u3096\u309D-\u309E\u309F\u30A1-\u30FA\u30FC-\u30FE\u30FF'+'\u3105-\u312D\u3131-\u318E\u3190-\u3191\u3192-\u3195\u3196-\u319F'+'\u31A0-\u31BA\u31F0-\u31FF\u3200-\u321C\u3220-\u3229\u322A-\u3247'+'\u3248-\u324F\u3260-\u327B\u327F\u3280-\u3289\u328A-\u32B0\u32C0-\u32CB'+'\u32D0-\u32FE\u3300-\u3376\u337B-\u33DD\u33E0-\u33FE\u3400-\u4DB5'+'\u4E00-\u9FCC\uA000-\uA014\uA015\uA016-\uA48C\uA4D0-\uA4F7\uA4F8-\uA4FD'+'\uA4FE-\uA4FF\uA500-\uA60B\uA60C\uA610-\uA61F\uA620-\uA629\uA62A-\uA62B'+'\uA640-\uA66D\uA66E\uA680-\uA69B\uA69C-\uA69D\uA6A0-\uA6E5\uA6E6-\uA6EF'+'\uA6F2-\uA6F7\uA722-\uA76F\uA770\uA771-\uA787\uA789-\uA78A\uA78B-\uA78E'+'\uA790-\uA7AD\uA7B0-\uA7B1\uA7F7\uA7F8-\uA7F9\uA7FA\uA7FB-\uA801'+'\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA823-\uA824\uA827\uA830-\uA835'+'\uA836-\uA837\uA840-\uA873\uA880-\uA881\uA882-\uA8B3\uA8B4-\uA8C3'+'\uA8CE-\uA8CF\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8F8-\uA8FA\uA8FB\uA900-\uA909'+'\uA90A-\uA925\uA92E-\uA92F\uA930-\uA946\uA952-\uA953\uA95F\uA960-\uA97C'+'\uA983\uA984-\uA9B2\uA9B4-\uA9B5\uA9BA-\uA9BB\uA9BD-\uA9C0\uA9C1-\uA9CD'+'\uA9CF\uA9D0-\uA9D9\uA9DE-\uA9DF\uA9E0-\uA9E4\uA9E6\uA9E7-\uA9EF'+'\uA9F0-\uA9F9\uA9FA-\uA9FE\uAA00-\uAA28\uAA2F-\uAA30\uAA33-\uAA34'+'\uAA40-\uAA42\uAA44-\uAA4B\uAA4D\uAA50-\uAA59\uAA5C-\uAA5F\uAA60-\uAA6F'+'\uAA70\uAA71-\uAA76\uAA77-\uAA79\uAA7A\uAA7B\uAA7D\uAA7E-\uAAAF\uAAB1'+'\uAAB5-\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADC\uAADD\uAADE-\uAADF'+'\uAAE0-\uAAEA\uAAEB\uAAEE-\uAAEF\uAAF0-\uAAF1\uAAF2\uAAF3-\uAAF4\uAAF5'+'\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E'+'\uAB30-\uAB5A\uAB5B\uAB5C-\uAB5F\uAB64-\uAB65\uABC0-\uABE2\uABE3-\uABE4'+'\uABE6-\uABE7\uABE9-\uABEA\uABEB\uABEC\uABF0-\uABF9\uAC00-\uD7A3'+'\uD7B0-\uD7C6\uD7CB-\uD7FB\uE000-\uF8FF\uF900-\uFA6D\uFA70-\uFAD9'+'\uFB00-\uFB06\uFB13-\uFB17\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFF6F\uFF70'+'\uFF71-\uFF9D\uFF9E-\uFF9F\uFFA0-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF'+'\uFFD2-\uFFD7\uFFDA-\uFFDC',R:'\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05D0-\u05EA\u05EB-\u05EF'+'\u05F0-\u05F2\u05F3-\u05F4\u05F5-\u05FF\u07C0-\u07C9\u07CA-\u07EA'+'\u07F4-\u07F5\u07FA\u07FB-\u07FF\u0800-\u0815\u081A\u0824\u0828'+'\u082E-\u082F\u0830-\u083E\u083F\u0840-\u0858\u085C-\u085D\u085E'+'\u085F-\u089F\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB37\uFB38-\uFB3C'+'\uFB3D\uFB3E\uFB3F\uFB40-\uFB41\uFB42\uFB43-\uFB44\uFB45\uFB46-\uFB4F',AL:'\u0608\u060B\u060D\u061B\u061C\u061D\u061E-\u061F\u0620-\u063F\u0640'+'\u0641-\u064A\u066D\u066E-\u066F\u0671-\u06D3\u06D4\u06D5\u06E5-\u06E6'+'\u06EE-\u06EF\u06FA-\u06FC\u06FD-\u06FE\u06FF\u0700-\u070D\u070E\u070F'+'\u0710\u0712-\u072F\u074B-\u074C\u074D-\u07A5\u07B1\u07B2-\u07BF'+'\u08A0-\u08B2\u08B3-\u08E3\uFB50-\uFBB1\uFBB2-\uFBC1\uFBC2-\uFBD2'+'\uFBD3-\uFD3D\uFD40-\uFD4F\uFD50-\uFD8F\uFD90-\uFD91\uFD92-\uFDC7'+'\uFDC8-\uFDCF\uFDF0-\uFDFB\uFDFC\uFDFE-\uFDFF\uFE70-\uFE74\uFE75'+'\uFE76-\uFEFC\uFEFD-\uFEFE'},j=new RegExp('['+i.L+i.R+i.AL+']'),k=new RegExp('['+i.R+i.AL+']');function l(s){var t=j.exec(s);return t==null?null:t[0];}function m(s){var t=l(s);if(t==null)return c('UnicodeBidiDirection').NEUTRAL;return k.exec(t)?c('UnicodeBidiDirection').RTL:c('UnicodeBidiDirection').LTR;}function n(s,t){t=t||c('UnicodeBidiDirection').NEUTRAL;if(!s.length)return t;var u=m(s);return u===c('UnicodeBidiDirection').NEUTRAL?t:u;}function o(s,t){if(!t)t=c('UnicodeBidiGlobalDirection').getDir();!c('UnicodeBidiDirection').isStrong(t)?h(0):void 0;return n(s,t);}function p(s,t){return o(s,t)===c('UnicodeBidiDirection').LTR;}function q(s,t){return o(s,t)===c('UnicodeBidiDirection').RTL;}var r={firstStrongChar:l,firstStrongCharDir:m,resolveBlockDir:n,getDirection:o,isDirectionLTR:p,isDirectionRTL:q};f.exports=r;}),null); __d('isRTL',['UnicodeBidi','UnicodeBidiDirection'],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(i){return c('UnicodeBidi').getDirection(i)===c('UnicodeBidiDirection').RTL;}f.exports=h;}),null); __d('LitestandClassicPlaceHolders',['Arbiter'],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h={},i={register:function j(k,l){h[k]=l;},destroy:function j(k){var l=h[k];if(l){l.parentNode.removeChild(l);delete h[k];}}};f.exports=i;}),null); __d('DOMScroll',['Arbiter','Bootloader','DOM','DOMQuery','Run','Vector','ViewportBounds','ge','emptyFunction','ifRequired','isAsyncScrollQuery'],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();c('Run').onAfterLoad(function(){c('Bootloader').loadModules(["Animation"],c('emptyFunction'),'DOMScroll');});var h={SCROLL:'dom-scroll',_scrolling:false,_scrollingFinishedTimoeut:null,getScrollState:function i(){var j=c('Vector').getViewportDimensions(),k=c('Vector').getDocumentDimensions(),l=k.x>j.x,m=k.y>j.y;l+=0;m+=0;return new (c('Vector'))(l,m);},_scrollbarSize:null,_initScrollbarSize:function i(){var j=c('DOM').create('p');j.style.width='100%';j.style.height='200px';var k=c('DOM').create('div');k.style.position='absolute';k.style.top='0px';k.style.left='0px';k.style.visibility='hidden';k.style.width='200px';k.style.height='150px';k.style.overflow='hidden';k.appendChild(j);document.body.appendChild(k);var l=j.offsetWidth;k.style.overflow='scroll';var m=j.offsetWidth;if(l==m)m=k.clientWidth;document.body.removeChild(k);h._scrollbarSize=l-m;},getScrollbarSize:function i(){if(h._scrollbarSize===null)h._initScrollbarSize();return h._scrollbarSize;},scrollTo:function i(j,k,l,m,n,o){if(typeof k=='undefined'||k===true)k=750;if(c('isAsyncScrollQuery')())k=false;if(!(j instanceof c('Vector'))){var p=c('Vector').getScrollPosition().x,q=c('Vector').getElementPosition(c('ge')(j)).y;j=new (c('Vector'))(p,q,'document');if(!m)j.y-=c('ViewportBounds').getTop()/(l?2:1);}if(l){j.y-=c('Vector').getViewportDimensions().y/2;}else if(m){j.y-=c('Vector').getViewportDimensions().y;j.y+=m;}if(n)j.y-=n;j=j.convertTo('document');if(k){c('ifRequired')('Animation',function(r){h._setScrollingForDuration(k);return new r(document.body).to('scrollTop',j.y).to('scrollLeft',j.x).ease(r.ease.end).duration(k).ondone(o).go();},function(){window.scrollTo(j.x,j.y);o&&o();});}else{window.scrollTo(j.x,j.y);o&&o();}c('Arbiter').inform(h.SCROLL);},ensureVisible:function i(j,k,l,m,n){if(l===undefined)l=10;j=c('ge')(j);if(k)j=c('DOMQuery').find(j,k);var o=c('Vector').getScrollPosition().x,p=c('Vector').getScrollPosition().y,q=p+c('Vector').getViewportDimensions().y,r=c('Vector').getElementPosition(j).y,s=r+c('Vector').getElementDimensions(j).y;r-=c('ViewportBounds').getTop();r-=l;s+=l;if(r<p){h.scrollTo(new (c('Vector'))(o,r,'document'),m,false,false,0,n);}else if(s>q)if(r-(s-q)<p){h.scrollTo(new (c('Vector'))(o,r,'document'),m,false,false,0,n);}else h.scrollTo(new (c('Vector'))(o,s,'document'),m,false,true,0,n);},scrollToTop:function i(j){var k=c('Vector').getScrollPosition();h.scrollTo(new (c('Vector'))(k.x,0,'document'),j!==false);},currentlyScrolling:function i(){return h._scrolling;},_setScrollingForDuration:function i(j){h._scrolling=true;if(h._scollingFinishedTimeout)clearTimeout(h._scrollingFinishedTimeout);h._scrollingFinishedTimoeut=setTimeout(function(){h._scrolling=false;},j);}};f.exports=h;}),null); __d("coalesce",[],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(){for(var i=0;i<arguments.length;++i)if(arguments[i]!=null)return arguments[i];return null;}f.exports=h;}),null); __d('OnVisible',['Arbiter','DOM','Event','Parent','Run','Vector','ViewportBounds','coalesce','queryThenMutateDOM'],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=[],i,j=0,k=[],l,m,n,o,p;function q(){h.forEach(function(w){w.remove();});if(m){m.remove();l.remove();i.unsubscribe();m=l=i=null;}j=0;h.length=0;}function r(){if(!h.length){q();return;}k.length=0;n=c('Vector').getScrollPosition().y;o=c('Vector').getViewportDimensions().y;p=c('ViewportBounds').getTop();for(var w=0;w<h.length;++w){var x=h[w];if(isNaN(x.elementHeight))k.push(w);x.elementHeight=c('Vector').getElementDimensions(x.element).y;x.elementPos=c('Vector').getElementPosition(x.element);x.hidden=c('Parent').byClass(x.element,'hidden_elem');if(x.scrollArea){x.scrollAreaHeight=c('Vector').getElementDimensions(x.scrollArea).y;x.scrollAreaY=c('Vector').getElementPosition(x.scrollArea).y;}}j=w;}function s(){for(var w=Math.min(h.length,j)-1;w>=0;--w){var x=h[w];if(!x.elementPos||x.removed){h.splice(w,1);continue;}if(x.hidden)continue;var y=n+o+x.buffer,z=false;if(y>x.elementPos.y){var aa=n+p-x.buffer,ba=n+p+o+x.buffer,ca=x.elementPos.y+x.elementHeight,da=!x.strict||aa<x.elementPos.y&&ba>ca;z=da;if(z&&x.scrollArea){var ea=x.scrollAreaY+x.scrollAreaHeight+x.buffer;z=x.elementPos.y>=x.scrollAreaY-x.buffer&&x.elementPos.y<ea;}}if(x.inverse?!z:z){x.remove();x.handler(k.indexOf(w)!==-1);}}}function t(){u();if(h.length)return;m=c('Event').listen(window,'scroll',u);l=c('Event').listen(window,'resize',u);i=c('Arbiter').subscribe('dom-scroll',u);}function u(){c('queryThenMutateDOM')(r,s,'OnVisible/positionCheck');}function v(w,x,y,z,aa,ba){'use strict';this.element=w;this.handler=x;this.strict=y;this.buffer=c('coalesce')(z,300);this.inverse=c('coalesce')(aa,false);this.scrollArea=ba||null;if(this.scrollArea)this.scrollAreaListener=this.$OnVisible1();if(h.length===0)c('Run').onLeave(q);t();h.push(this);}v.prototype.remove=function(){'use strict';if(this.removed)return;this.removed=true;if(this.scrollAreaListener)this.scrollAreaListener.remove();};v.prototype.reset=function(){'use strict';this.elementHeight=null;this.removed=false;if(this.scrollArea)this.scrollAreaListener=this.$OnVisible1();h.indexOf(this)===-1&&h.push(this);t();};v.prototype.setBuffer=function(w){'use strict';this.buffer=w;u();};v.prototype.checkBuffer=function(){'use strict';u();};v.prototype.getElement=function(){'use strict';return this.element;};v.prototype.$OnVisible1=function(){'use strict';return c('Event').listen(c('DOM').find(this.scrollArea,'.uiScrollableAreaWrap'),'scroll',this.checkBuffer);};Object.assign(v,{checkBuffer:u});f.exports=v;}),null); __d('PopoverMenuInterface',['ArbiterMixin','emptyFunction','mixin'],(function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('mixin')(c('ArbiterMixin')));i=h&&h.prototype;function j(){'use strict';i.constructor.call(this);}j.prototype.done=function(){'use strict';this.inform('done');};Object.assign(j.prototype,{getRoot:c('emptyFunction'),onShow:c('emptyFunction'),onHide:c('emptyFunction'),focusAnItem:c('emptyFunction').thatReturnsFalse,blur:c('emptyFunction'),handleKeydown:c('emptyFunction').thatReturnsFalse,destroy:c('emptyFunction')});f.exports=j;}),null); __d('ReactRenderer',['React','ReactDOM','Run','$'],(function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();function h(m,n,o){var p=c('ReactDOM').render(m,n,o);c('Run').onLeave(function(){c('ReactDOM').unmountComponentAtNode(n);});return p;}function i(m,n,o,p){var q=c('React').createElement(m,n);return h(q,o,p);}function j(m,n,o,p){var q=c('React').createElement(m,n);return c('ReactDOM').render(q,o,p);}function k(m,n,o,p){return i(m,n,c('$')(o),p);}function l(m,n,o,p){return j(m,n,c('$')(o),p);}f.exports={renderComponent:h,constructAndRenderComponent:i,constructAndRenderComponentByID:k,constructAndRenderComponentAcrossTransitions:j,constructAndRenderComponentByIDAcrossTransitions:l,constructAndRenderComponent_DEPRECATED:j,constructAndRenderComponentByID_DEPRECATED:l};}),null); __d('tidyEvent',['Run'],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=[];function i(){while(h.length){var l=h.shift();l&&l.remove?l.remove():l.unsubscribe();}}function j(l){var m;function n(){if(!m)return;m.apply(l,arguments);m=null;l=null;}if(l.remove){m=l.remove;l.remove=n;}else{m=l.unsubscribe;l.unsubscribe=n;}return l;}function k(l){if(!h.length)c('Run').onLeave(i);if(Array.isArray(l)){for(var m=0;m<l.length;m++)h.push(j(l[m]));}else h.push(j(l));return l;}f.exports=k;}),null); __d('ViewportTrackingHelper',['DOMDimensions','Vector','getElementPosition','getViewportDimensions'],(function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h={isDescendantOf:function i(j,k){if(j===k)return true;while(j&&j.parentElement){if(j.parentElement===k)return true;j=j.parentElement;}return false;},isVisible:function i(j,k){return h.isVisibleInDimension(c('getViewportDimensions')(),j,k);},isVisibleInDimension:function i(j,k,l){var m=c('getElementPosition')(k),n=c('DOMDimensions').getElementDimensions(k);if(!m.x&&!m.y&&!n.x&&!n.y)return false;var o=Math.max(m.y,0),p=Math.min(m.y+n.height,j.height),q=Math.min(n.height,l);return p-o>=q;},getHeightIfVisible:function i(j,k){var l=this.getHeightInViewport(j),m=c('DOMDimensions').getElementDimensions(j),n=Math.min(m.height,k);return l>=n?l:0;},getHeightInViewport:function i(j){var k=c('getElementPosition')(j),l=c('DOMDimensions').getElementDimensions(j);if(!k.x&&!k.y&&!l.x&&!l.y)return 0;var m=c('getViewportDimensions')().height,n=Math.max(k.y,0),o=Math.min(k.y+l.height,m);return o-n;},getElementsInViewIgnoreHeight:function i(j){var k=false,l=[];for(var m=0;m<j.length;m++){var n=j[m];if(this.isVisible(n,0,null)){l.push(n);k=true;}else if(k)break;}return l;}};f.exports=h;}),null); __d('CommentPrelude',['BanzaiODS','CSS','ErrorUtils','Parent','clickRefAction','ex','ifRequired'],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(n,o){if(n==='ufi.react'||n==='ufi_mentions_input.react'||n==='ufi_controller'||n==='action_link_bling'||n==='action_link_timeline_bling')return;var p=new Error(c('ex')('Deprecated CommentPrelude action %s called from ref %s',o||'unknown',n||'unknown'));p.type='warn';c('ErrorUtils').reportError(p);c('BanzaiODS').bumpEntityKey('comment_prelude',n);}function i(n,o,p){h(p,'click');var q=c('Parent').byTag(n,'form');if(!q||!c('CSS').hasClass(q,'collapsible_comments'))return;c('clickRefAction')('ufi',n,null,'FORCE');return j(n,o,p);}function j(n,o,p){h(p,'expand');var q=c('Parent').byTag(n,'form');if(!q||!c('CSS').hasClass(q,'collapsible_comments'))return;k(q,p);if(o!==false){var r=q.add_comment_text_text||q.add_comment_text,s=r.length;if(s)if(!c('Parent').byClass(r[s-1],'UFIReplyList')){r=r[s-1];}else if(!c('Parent').byClass(r[0],'UFIReplyList')){r=r[0];}else r=null;if(r){r.focus();c('ifRequired')('FbFeedCommentUFIScroller',function(t){return t.reveal(r);});}}return false;}function k(n,o){h(o,'uncollapse');if(!n||!c('CSS').hasClass(n,'collapsible_comments'))return;var p=c('CSS').removeClass.bind(null,n,'collapsed_comments');c('ifRequired')('ScrollAwareDOM',function(q){return q.monitor(n,p);},function(){return p();});}function l(n){var o=n.getAttribute('data-comment-prelude-ref');h(o,'blingbox');var p=c('Parent').byTag(n,'form');if(!p||!c('CSS').hasClass(p,'collapsible_comments'))return;c('CSS').toggleClass(p,'collapsed_comments');}var m={click:i,expand:j,uncollapse:k,onBlingboxClick:l,logRef:h};f.exports=m;}),null); __d('ScrollableArea',['ArbiterMixin','Bootloader','BrowserSupport','CSS','DataStore','DOM','Event','Parent','Run','Scroll','SimpleDrag','Style','SubscriptionsHandler','UserAgent_DEPRECATED','Vector','createCancelableFunction','emptyFunction','ifRequired','mixin','queryThenMutateDOM','setTimeoutAcrossTransitions','throttle'],(function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();var j=12;h=babelHelpers.inherits(k,c('mixin')(c('ArbiterMixin')));i=h&&h.prototype;function k(l,m){'use strict';i.constructor.call(this);if(!l)return;m=m||{};c('Run').onAfterLoad(function(){c('Bootloader').loadModules(["Animation"],c('emptyFunction'),'ScrollableArea');});this._elem=l;this._wrap=c('DOM').find(l,'div.uiScrollableAreaWrap');this._body=c('DOM').find(this._wrap,'div.uiScrollableAreaBody');this._content=c('DOM').find(this._body,'div.uiScrollableAreaContent');this._track=c('DOM').find(l,'div.uiScrollableAreaTrack');this._gripper=c('DOM').find(this._track,'div.uiScrollableAreaGripper');this._options=m;this._throttledComputeHeights=c('throttle').withBlocking(this._computeHeights,250,this);this.throttledAdjustGripper=c('throttle').withBlocking(this.adjustGripper,250,this);this._throttledShowGripperAndShadows=c('throttle').withBlocking(this._showGripperAndShadows,250,this);this._throttledRespondMouseMove=c('throttle')(this._respondMouseMove,250,this);c('setTimeoutAcrossTransitions')(this.adjustGripper.bind(this),0);this._listeners=new (c('SubscriptionsHandler'))();this._listeners.addSubscriptions(c('Event').listen(this._wrap,'scroll',this._handleScroll.bind(this)),c('Event').listen(l,'mousemove',this._handleMouseMove.bind(this)),c('Event').listen(this._track,'click',this._handleClickOnTrack.bind(this)));if(c('BrowserSupport').hasPointerEvents())this._listeners.addSubscriptions(c('Event').listen(l,'mousedown',this._handleClickOnTrack.bind(this)));if(m.fade!==false){this._listeners.addSubscriptions(c('Event').listen(l,'mouseenter',this._handleMouseEnter.bind(this)),c('Event').listen(l,'mouseleave',this._handleMouseLeave.bind(this)),c('Event').listen(l,'focusin',this.showScrollbar.bind(this,false)),c('Event').listen(l,'focusout',this.hideScrollbar.bind(this)));}else if(c('BrowserSupport').hasPointerEvents())this._listeners.addSubscriptions(c('Event').listen(l,'mouseleave',c('CSS').removeClass.bind(null,l,'uiScrollableAreaTrackOver')));if(c('UserAgent_DEPRECATED').webkit()||c('UserAgent_DEPRECATED').chrome()){this._listeners.addSubscriptions(c('Event').listen(l,'mousedown',function(){var n=c('Event').listen(window,'mouseup',function(){if(c('Scroll').getLeft(l))c('Scroll').setLeft(l,0);n.remove();});}));}else if(c('UserAgent_DEPRECATED').firefox())this._wrap.addEventListener('DOMMouseScroll',function(event){event.axis===event.HORIZONTAL_AXIS&&event.preventDefault();},false);this._drag=this.initDrag();c('DataStore').set(this._elem,'ScrollableArea',this);if(!m.persistent){this._destroy=c('createCancelableFunction')(this._destroy.bind(this));c('Run').onLeave(this._destroy);}if(m.shadow!==false)c('CSS').addClass(this._elem,'uiScrollableAreaWithShadow');}k.prototype.getElement=function(){'use strict';return this._elem;};k.prototype.initDrag=function(){'use strict';var l=c('BrowserSupport').hasPointerEvents(),m=new (c('SimpleDrag'))(l?this._elem:this._gripper);m.subscribe('start',function(n,event){if(!(event.which&&event.which===1||event.button&&event.button===1))return;var o=c('Vector').getEventPosition(event,'viewport');if(l){var p=this._gripper.getBoundingClientRect();if(o.x<p.left||o.x>p.right||o.y<p.top||o.y>p.bottom)return false;}this.inform('grip_start');var q=o.y,r=this._gripper.offsetTop;c('CSS').addClass(this._elem,'uiScrollableAreaDragging');var s=m.subscribe('update',function(u,event){var v=c('Vector').getEventPosition(event,'viewport').y-q;this._throttledComputeHeights();var w=this._contentHeight-this._containerHeight,x=r+v,y=this._trackHeight-this._gripperHeight;x=Math.max(Math.min(x,y),0);var z=x/y*w;c('Scroll').setTop(this._wrap,z);}.bind(this)),t=m.subscribe('end',function(){m.unsubscribe(s);m.unsubscribe(t);c('CSS').removeClass(this._elem,'uiScrollableAreaDragging');this.inform('grip_end');}.bind(this));}.bind(this));return m;};k.prototype.adjustGripper=function(){'use strict';c('queryThenMutateDOM')(function(){return this._needsGripper();}.bind(this),function(l){if(l){c('Style').set(this._gripper,'height',this._gripperHeight+'px');this._slideGripper();}}.bind(this));this._throttledShowGripperAndShadows();return this;};k.prototype._computeHeights=function(){'use strict';this._containerHeight=this._elem.clientHeight;this._contentHeight=this._content.offsetHeight;this._trackHeight=this._track.offsetHeight;this._gripperHeight=Math.max(this._containerHeight/this._contentHeight*this._trackHeight,j);};k.prototype._needsGripper=function(){'use strict';this._throttledComputeHeights();return this._gripperHeight<this._trackHeight;};k.prototype._slideGripper=function(){'use strict';c('queryThenMutateDOM')(function(){return c('Scroll').getTop(this._wrap)/(this._contentHeight-this._containerHeight)*(this._trackHeight-this._gripperHeight);}.bind(this),function(l){c('Style').set(this._gripper,'top',l+'px');}.bind(this));};k.prototype._showGripperAndShadows=function(){'use strict';c('queryThenMutateDOM')(function(){return {needsGripper:this._needsGripper(),top:c('Scroll').getTop(this._wrap)>0,isScrolledToBottom:this.isScrolledToBottom()};}.bind(this),function(l){var m=l.needsGripper,n=l.top,o=l.isScrolledToBottom;c('CSS').conditionShow(this._gripper,m);c('CSS').conditionClass(this._elem,'contentBefore',n);c('CSS').conditionClass(this._elem,'contentAfter',!o);}.bind(this));};k.prototype.destroy=function(){'use strict';this._destroy();this._destroy.cancel&&this._destroy.cancel();};k.prototype._destroy=function(){'use strict';this._listeners&&this._listeners.release();this._elem&&c('DataStore').remove(this._elem,'ScrollableArea');this._drag&&this._drag.destroy();};k.prototype._handleClickOnTrack=function(event){'use strict';var l=c('Vector').getEventPosition(event,'viewport'),m=this._gripper.getBoundingClientRect();if(l.x<m.right&&l.x>m.left){if(l.y<m.top){this.setScrollTop(this.getScrollTop()-this._elem.clientHeight);}else if(l.y>m.bottom)this.setScrollTop(this.getScrollTop()+this._elem.clientHeight);event.prevent();}};k.prototype._handleMouseMove=function(event){'use strict';var l=this._options.fade!==false;if(c('BrowserSupport').hasPointerEvents()||l){this._mousePos=c('Vector').getEventPosition(event);this._throttledRespondMouseMove();}};k.prototype._respondMouseMove=function(){'use strict';if(!this._mouseOver)return;var l=this._options.fade!==false,m=this._mousePos,n=c('Vector').getElementPosition(this._track).x,o=c('Vector').getElementDimensions(this._track).x,p=Math.abs(n+o/2-m.x);c('CSS').conditionClass(this._elem,'uiScrollableAreaTrackOver',c('BrowserSupport').hasPointerEvents()&&p<=10);if(l)if(p<25){this.showScrollbar(false);}else if(!this._options.no_fade_on_hover)this.hideScrollbar();};k.prototype._handleScroll=function(event){'use strict';if(this._needsGripper())this._slideGripper();this.throttledAdjustGripper();if(this._options.fade!==false)this.showScrollbar();this.inform('scroll');};k.prototype._handleMouseLeave=function(){'use strict';this._mouseOver=false;this.hideScrollbar();};k.prototype._handleMouseEnter=function(){'use strict';this._mouseOver=true;this.showScrollbar();};k.prototype.hideScrollbar=function(l){'use strict';if(!this._scrollbarVisible)return this;this._scrollbarVisible=false;if(this._hideTimeout){clearTimeout(this._hideTimeout);this._hideTimeout=null;}if(l){this._simpleHide();}else this._hideTimeout=c('setTimeoutAcrossTransitions')(function(){c('ifRequired')('Animation',function(m){return this._animatedHide(m);}.bind(this),function(){return this._simpleHide();}.bind(this));}.bind(this),750);return this;};k.prototype._simpleHide=function(){'use strict';c('Style').set(this._track,'opacity',0);c('CSS').addClass.bind(null,this._track,'invisible_elem');};k.prototype._animatedHide=function(l){'use strict';if(this._hideAnimation){this._hideAnimation.stop();this._hideAnimation=null;}this._hideAnimation=new l(this._track).from('opacity',1).to('opacity',0).duration(250).ondone(c('CSS').addClass.bind(null,this._track,'invisible_elem')).go();};k.prototype.pageDown=function(l,m){'use strict';this._scrollPage(1,l,m);};k.prototype.pageUp=function(l,m){'use strict';this._scrollPage(-1,l,m);};k.prototype._scrollPage=function(l,m,n){'use strict';var o=l*this._containerHeight,p=this.getScrollHeight()-this._containerHeight,q=Math.max(0,Math.min(p,this.getScrollTop()+o));this.setScrollTop(q,m,n);};k.prototype.resize=function(){'use strict';if(this._body.style.width)this._body.style.width='';var l=this._wrap.offsetWidth-this._wrap.clientWidth;if(l>0)c('Style').set(this._body,'margin-right',-l+'px');return this;};k.prototype.showScrollbar=function(l){'use strict';this.throttledAdjustGripper();if(this._scrollbarVisible)return this;this._scrollbarVisible=true;if(this._hideTimeout){clearTimeout(this._hideTimeout);this._hideTimeout=null;}if(this._hideAnimation){this._hideAnimation.stop();this._hideAnimation=null;}c('queryThenMutateDOM')(null,function(){c('Style').set(this._track,'opacity',1);c('CSS').removeClass(this._track,'invisible_elem');if(l!==false&&!this._options.no_fade_on_hover)this.hideScrollbar();}.bind(this));return this;};k.prototype.distanceToBottom=function(){'use strict';this._computeHeights();return this._contentHeight-(c('Scroll').getTop(this._wrap)+this._containerHeight);};k.prototype.isScrolledToBottom=function(){'use strict';return this.distanceToBottom()<=0;};k.prototype.isScrolledToTop=function(){'use strict';return c('Scroll').getTop(this._wrap)===0;};k.prototype.scrollToBottom=function(l,m){'use strict';this.setScrollTop(this._wrap.scrollHeight,l,m);};k.prototype.scrollToTop=function(l,m){'use strict';this.setScrollTop(0,l,m);};k.prototype.scrollIntoView=function(l,m){'use strict';var n=this._wrap.clientHeight,o=l.offsetHeight,p=c('Scroll').getTop(this._wrap),q=p+n,r=l.offsetTop,s=r+o;if(r<p||n<o){this.setScrollTop(r,m);}else if(s>q)this.setScrollTop(p+(s-q),m);};k.prototype.scrollElemToTop=function(l,m,n){'use strict';this.setScrollTop(l.offsetTop,m,{callback:n});};k.prototype.poke=function(){'use strict';var l=c('Scroll').getTop(this._wrap);c('Scroll').setTop(this._wrap,c('Scroll').getTop(this._wrap)+1);c('Scroll').setTop(this._wrap,c('Scroll').getTop(this._wrap)-1);c('Scroll').setTop(this._wrap,l);return this.showScrollbar(false);};k.prototype.getClientHeight=function(){'use strict';return this._wrap.clientHeight;};k.prototype.getScrollTop=function(){'use strict';return c('Scroll').getTop(this._wrap);};k.prototype.getScrollHeight=function(){'use strict';return this._wrap.scrollHeight;};k.prototype.setScrollTop=function(l,m){var n=arguments.length<=2||arguments[2]===undefined?{}:arguments[2];'use strict';if(m!==false){c('ifRequired')('Animation',function(o){return (this._animatedSetScrollTop(o,l,n));}.bind(this),function(){return this._simpleSetScrollTop(l,n);}.bind(this));}else this._simpleSetScrollTop(l,n);};k.prototype._simpleSetScrollTop=function(l,m){'use strict';c('Scroll').setTop(this._wrap,l);m.callback&&m.callback();};k.prototype._animatedSetScrollTop=function(l,m,n){'use strict';if(this._scrollTopAnimation)this._scrollTopAnimation.stop();var o=n.duration||250,p=n.ease||l.ease.end;this._scrollTopAnimation=new l(this._wrap).to('scrollTop',m).ease(p).duration(o).ondone(n.callback).go();};k.renderDOM=function(){'use strict';var l=c('DOM').create('div',{className:'uiScrollableAreaContent'}),m=c('DOM').create('div',{className:'uiScrollableAreaBody'},l),n=c('DOM').create('div',{className:'uiScrollableAreaWrap scrollable'},m),o=c('DOM').create('div',{className:'uiScrollableArea native'},n);return {root:o,wrap:n,body:m,content:l};};k.fromNative=function(l,m){'use strict';if(!c('CSS').hasClass(l,'uiScrollableArea')||!c('CSS').hasClass(l,'native'))return;m=m||{};c('CSS').removeClass(l,'native');var n=c('DOM').create('div',{className:'uiScrollableAreaTrack'},c('DOM').create('div',{className:'uiScrollableAreaGripper'}));if(m.fade!==false){c('CSS').addClass(l,'fade');c('CSS').addClass(n,'invisible_elem');}else c('CSS').addClass(l,'nofade');if(m.tabIndex!==undefined&&m.tabIndex!==null){c('DOM').setAttributes(n,{tabIndex:m.tabIndex});c('DOM').prependContent(l,n);}else c('DOM').appendContent(l,n);var o=new k(l,m);o.resize();return o;};k.getInstance=function(l){'use strict';var m=c('Parent').byClass(l,'uiScrollableArea');return m?c('DataStore').get(m,'ScrollableArea'):null;};k.poke=function(l){'use strict';var m=k.getInstance(l);m&&m.poke();};f.exports=k;}),null); __d('BadgeHelper',['cx','DOM','joinClasses'],(function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();var i={xsmall:"_5dzz",small:"_5dz-",medium:"_5dz_",large:"_5d-0",xlarge:"_5d-1"},j={verified:"_56_f",trending:"_1gop",topcommenter:"_59t2",page_gray_check:"_5n3t",work:"_5d62",game_blue:"_59c6",work_non_coworker:"_2ad7",interest_community:"_3qcr"};function k(m,n){return c('joinClasses')(i[m],j[n],"_5dzy");}function l(m,n){var o=k(m,n);if(o)return c('DOM').create('span',{className:o});}f.exports={getClasses:k,renderBadge:l,sizes:Object.keys(i),types:Object.keys(j)};}),null); __d('Badge.react',['BadgeHelper','React'],(function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();var j=c('React').PropTypes;h=babelHelpers.inherits(k,c('React').Component);i=h&&h.prototype;k.prototype.render=function(){'use strict';return (c('React').createElement('span',{className:c('BadgeHelper').getClasses(this.props.size,this.props.type)}));};function k(){'use strict';h.apply(this,arguments);}k.propTypes={size:j.oneOf(c('BadgeHelper').sizes),type:j.oneOf(c('BadgeHelper').types)};k.defaultProps={size:'xsmall',type:'verified'};f.exports=k;}),null); __d('XUIMenuTheme',['cx'],(function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();f.exports={className:"_558b"};}),null); __d('XUIMenuWithSquareCorner',['cx','CSS'],(function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();function i(j){'use strict';this.$XUIMenuWithSquareCorner1=j;}i.prototype.enable=function(){'use strict';c('CSS').addClass(this.$XUIMenuWithSquareCorner1.getRoot(),"_2n_z");};i.prototype.disable=function(){'use strict';c('CSS').removeClass(this.$XUIMenuWithSquareCorner1.getRoot(),"_2n_z");};f.exports=i;}),null); __d('LayerHideOnBlur',['requestAnimationFrame'],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(i){'use strict';this._layer=i;}h.prototype.enable=function(){'use strict';this._subscriptions=[this._layer.subscribe('show',this._attach.bind(this)),this._layer.subscribe('hide',this._detach.bind(this))];if(this._layer.isShown())this._attach();};h.prototype.disable=function(){'use strict';this._detach();while(this._subscriptions.length)this._subscriptions.pop().unsubscribe();this._subscriptions=null;};h.prototype._detach=function(){'use strict';this._onBlur&&this._onBlur.unsubscribe();this._onBlur=null;};h.prototype._attach=function(){'use strict';this._onBlur=this._layer.subscribe('blur',function(){return c('requestAnimationFrame')(function(){this._layer.hide();return false;}.bind(this));}.bind(this));};Object.assign(h.prototype,{_subscriptions:null,_onBlur:null});f.exports=h;}),null); __d('URITruncator',['fbt','URI'],(function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();var i=3,j=h._("..."),k=j.length||j.toString().length;function l(m,n){if(!m||n===undefined||m.length<=n||n<=k||m.toString().length<=k)return m;if(!c('URI').isValidURI(m))return m.substring(0,n-k)+j;var o=new (c('URI'))(m),p=o.getOrigin();if(p.length>n-k)return p.substring(0,n-k)+j;var q=false;if(!!o.getFragment()){q=true;o.setFragment('');if(o.toString().length<=n-k)return o.toString()+j;}var r=o.getQueryData();if(r){var s=Object.keys(r);if(s.length>0){q=true;for(var t=s.length-1;t>=0;t--){o.removeQueryData(s[t]);if(o.toString().length<=n-k)return o.toString()+j;}}}var u=o.getPath()+(q?j:''),v=u.split('/'),w=p.length+u.length-n,x=0;while(w>0&&v.length>x+1){var y=x+1,z=v[y];if(w+k+i<=z.length){var aa=z.length-1,ba=z.length-w-k,ca=/[a-zA-Z0-9]/;w+=k;while(w>0){while(aa>0&&ca.test(z[aa])){aa--;w--;}while(aa>0&&!ca.test(z[aa])){aa--;w--;}}if(aa===0)aa=ba-1;v[y]=z.substring(0,aa+1)+j;}else{x++;w-=z.length;if(x===1){w+=k;}else w--;}}if(x>0){if(v[v.length-1].length===0&&v.length===x+2)x++;v.splice(1,x,j);}var da=p+v.join('/');if(da.length>n)da=da.substring(0,n-k)+j;return da;}f.exports=l;}),null); __d('VideoDisplayTimePlayButton',['CSS','DataStore','Event'],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h={},i='_spinner',j={getClicked:function k(l){return c('DataStore').get(l,'clicked',false);},register:function k(l,m){var n=l.id;h[n]=c('Event').listen(l,'click',function(){if(m){c('CSS').hide(l);c('CSS').show(m);}c('DataStore').set(l,'clicked',true);});if(m)h[n+i]=c('Event').listen(m,'click',function(){c('CSS').hide(m);c('CSS').show(l);c('DataStore').set(l,'clicked',false);});},unregister:function k(l){var m=l.id;if(h.hasOwnProperty(m))h[m].remove();var n=m+i;if(h.hasOwnProperty(n))h[n].remove();}};f.exports=j;}),null); __d('VideosRenderingInstrumentation',['DataStore','VideoPlayerHTML5Experiments','performanceAbsoluteNow'],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h={storeRenderTime:function i(j){var k=c('VideoPlayerHTML5Experiments').useMonotonicallyIncreasingTimers?c('performanceAbsoluteNow')():Date.now();c('DataStore').set(j,'videos_rendering_instrumentation',k);return k;},retrieveRenderTime:function i(j){var k=c('DataStore').get(j,'videos_rendering_instrumentation',NaN);if(Number.isNaN(k))k=h.storeRenderTime(j);return k;}};f.exports=h;}),null); __d('ActorURI',['ActorURIConfig','URI'],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h={create:function i(j,k){return new (c('URI'))(j).addQueryData(c('ActorURIConfig').PARAMETER_ACTOR,k);}};h.PARAMETER_ACTOR=c('ActorURIConfig').PARAMETER_ACTOR;f.exports=h;}),null); __d('DeferredComponent.react',['React','createCancelableFunction'],(function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();var j=c('React').PropTypes;h=babelHelpers.inherits(k,c('React').Component);i=h&&h.prototype;function k(l,m){'use strict';i.constructor.call(this,l,m);this.$DeferredComponent1=function(n){this.setState({ComponentClass:n},function(){this.props.onComponentLoad&&this.props.onComponentLoad(n);}.bind(this));}.bind(this);this.state={ComponentClass:null,cancelableModulesLoaded:c('createCancelableFunction')(this.$DeferredComponent1)};}k.prototype.componentWillMount=function(){'use strict';this.props.deferredComponent(this.state.cancelableModulesLoaded);};k.prototype.componentWillUnmount=function(){'use strict';this.state.cancelableModulesLoaded.cancel();};k.prototype.render=function(){'use strict';var l=this.state.ComponentClass;if(!l||this.props.deferredForcePlaceholder)return this.props.deferredPlaceholder;var m=this.props,n=m.deferredPlaceholder,o=m.deferredComponent,p=m.onComponentLoad,q=m.deferredForcePlaceholder,r=babelHelpers.objectWithoutProperties(m,['deferredPlaceholder','deferredComponent','onComponentLoad','deferredForcePlaceholder']);return c('React').createElement(l,r);};k.propTypes={deferredPlaceholder:j.element.isRequired,deferredComponent:j.func.isRequired,onComponentLoad:j.func,deferredForcePlaceholder:j.bool};f.exports=k;}),null); __d('BootloadedComponent.react',['DeferredComponent.react','JSResource','React'],(function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();var j=c('React').PropTypes;h=babelHelpers.inherits(k,c('React').Component);i=h&&h.prototype;function k(){var l,m;'use strict';for(var n=arguments.length,o=Array(n),p=0;p<n;p++)o[p]=arguments[p];return m=(l=i.constructor).call.apply(l,[this].concat(o)),this.$BootloadedComponent1=function(q){c('JSResource').loadAll([this.props.bootloadLoader],q);}.bind(this),m;}k.prototype.render=function(){'use strict';var l=this.props,m=l.bootloadLoader,n=l.bootloadPlaceholder,o=l.bootloadForcePlaceholder,p=babelHelpers.objectWithoutProperties(l,['bootloadLoader','bootloadPlaceholder','bootloadForcePlaceholder']);return c('React').createElement(c('DeferredComponent.react'),babelHelpers['extends']({deferredPlaceholder:n,deferredComponent:this.$BootloadedComponent1,deferredForcePlaceholder:o},p));};f.exports=Object.assign(k,{propTypes:{bootloadPlaceholder:j.element.isRequired,bootloadLoader:j.instanceOf(c('JSResource').Reference).isRequired,bootloadForcePlaceholder:j.bool},create:function l(m){var n,o;n=babelHelpers.inherits(p,c('React').Component);o=n&&n.prototype;p.prototype.render=function(){'use strict';var q=this.props,r=q.bootloadLoader,s=babelHelpers.objectWithoutProperties(q,['bootloadLoader']);return (c('React').createElement(k,babelHelpers['extends']({bootloadLoader:m,bootloadPlaceholder:c('React').createElement('div',null)},s)));};function p(){'use strict';n.apply(this,arguments);}p.displayName='BootloadedComponent('+m.getModuleId()+')';return p;}});}),null); __d('randomInt',['invariant'],(function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();function i(j,k){var l=arguments.length;!(l>0&&l<=2)?h(0):void 0;if(l===1){k=j;j=0;}k=k;!(k>j)?h(0):void 0;var m=this.random||Math.random;return Math.floor(j+m()*(k-j));}f.exports=i;}),null); __d('ClientIDs',['randomInt'],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h={},i={getNewClientID:function j(){var k=Date.now(),l=k+':'+(c('randomInt')(0,4294967295)+1);h[l]=true;return l;},isExistingClientID:function j(k){return !!h[k];}};f.exports=i;}),null); __d('RTLKeys',['Keys','Locale'],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=babelHelpers['extends']({},c('Keys')),i=null;function j(){if(i===null)i=c('Locale').isRTL();return i;}h.REAL_RIGHT=c('Keys').RIGHT;h.REAL_LEFT=c('Keys').LEFT;delete h.LEFT;delete h.RIGHT;h.getLeft=function(){return j()?h.REAL_RIGHT:h.REAL_LEFT;};h.getRight=function(){return j()?h.REAL_LEFT:h.REAL_RIGHT;};f.exports=h;}),null); __d('areEqual',[],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=[],i=[];function j(l,m){var n=h.length?h.pop():[],o=i.length?i.pop():[],p=k(l,m,n,o);n.length=0;o.length=0;h.push(n);i.push(o);return p;}function k(l,m,n,o){if(l===m)return l!==0||1/l==1/m;if(l==null||m==null)return false;if(typeof l!='object'||typeof m!='object')return false;var p=Object.prototype.toString,q=p.call(l);if(q!=p.call(m))return false;switch(q){case '[object String]':return l==String(m);case '[object Number]':return isNaN(l)||isNaN(m)?false:l==Number(m);case '[object Date]':case '[object Boolean]':return +l==+m;case '[object RegExp]':return l.source==m.source&&l.global==m.global&&l.multiline==m.multiline&&l.ignoreCase==m.ignoreCase;}var r=n.length;while(r--)if(n[r]==l)return o[r]==m;n.push(l);o.push(m);var s=0;if(q==='[object Array]'){s=l.length;if(s!==m.length)return false;while(s--)if(!k(l[s],m[s],n,o))return false;}else{if(l.constructor!==m.constructor)return false;if(l.hasOwnProperty('valueOf')&&m.hasOwnProperty('valueOf'))return l.valueOf()==m.valueOf();var t=Object.keys(l);if(t.length!=Object.keys(m).length)return false;for(var u=0;u<t.length;u++)if(!k(l[t[u]],m[t[u]],n,o))return false;}n.pop();o.pop();return true;}f.exports=j;}),null); __d('concatMap',[],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(i,j){var k=-1,l=j.length,m=[],n=void 0;while(++k<l){n=i(j[k],k,j);if(Array.isArray(n)){Array.prototype.push.apply(m,n);}else Array.prototype.push.call(m,n);}return m;}f.exports=h;}),null); __d('DOMContainer.react',['invariant','React','ReactDOM','isNode'],(function a(b,c,d,e,f,g,h){var i,j;if(c.__markCompiled)c.__markCompiled();var k=c('React').PropTypes;i=babelHelpers.inherits(l,c('React').Component);j=i&&i.prototype;function l(){var m,n;'use strict';for(var o=arguments.length,p=Array(o),q=0;q<o;q++)p[q]=arguments[q];return n=(m=j.constructor).call.apply(m,[this].concat(p)),this.getDOMChild=function(){var r=this.props.children;!c('isNode')(r)?h(0):void 0;return r;}.bind(this),n;}l.prototype.shouldComponentUpdate=function(m,n){'use strict';return m.children!==this.props.children;};l.prototype.componentDidMount=function(){'use strict';c('ReactDOM').findDOMNode(this).appendChild(this.getDOMChild());};l.prototype.componentDidUpdate=function(){'use strict';var m=c('ReactDOM').findDOMNode(this);while(m.lastChild)m.removeChild(m.lastChild);m.appendChild(this.getDOMChild());};l.prototype.render=function(){'use strict';if(this.props.display==='block')return c('React').createElement('div',this.props,undefined);return c('React').createElement('span',this.props,undefined);};l.propTypes={display:k.oneOf(['inline','block'])};l.defaultProps={display:'inline'};f.exports=l;}),null); __d('LeftRight.react',['cx','invariant','React','keyMirror','joinClasses'],(function a(b,c,d,e,f,g,h,i){var j,k;if(c.__markCompiled)c.__markCompiled();var l=c('keyMirror')({left:true,right:true,both:true});function m(p){!(p&&(p.length===1||p.length===2))?i(0):void 0;}function n(p){var q=[];c('React').Children.forEach(p,function(r){q.push(r);},this);return q;}j=babelHelpers.inherits(o,c('React').Component);k=j&&j.prototype;o.prototype.render=function(){'use strict';var p=n(this.props.children);m(p);var q=this.props.direction||l.both,r=q===l.both,s=r||q===l.left?"_ohe lfloat":'',t=r||q===l.right?"_ohf rfloat":'',u=c('React').createElement('div',{key:'left',className:s},p[0]),v=p.length<2?null:c('React').createElement('div',{key:'right',className:t},p[1]),w=q===l.right&&v?[v,u]:[u,v];return (c('React').createElement('div',babelHelpers['extends']({},this.props,{className:c('joinClasses')(this.props.className,"clearfix")}),w));};function o(){'use strict';j.apply(this,arguments);}o.DIRECTION=l;f.exports=o;}),null); __d('ImageBlock.react',['cx','invariant','LeftRight.react','React','joinClasses'],(function a(b,c,d,e,f,g,h,i){var j,k;if(c.__markCompiled)c.__markCompiled();function l(o){!(o.children&&(o.children.length===2||o.children.length===3))?i(0):void 0;}function m(o){return "img"+(' '+"_8o")+(o==='small'?' '+"_8r":'')+(o==='medium'?' '+"_8s":'')+(o==='large'?' '+"_8t":'');}j=babelHelpers.inherits(n,c('React').Component);k=j&&j.prototype;n.prototype.render=function(){'use strict';l(this.props);var o=this.props.children[0],p=this.props.children[1],q=this.props.children[2],r=this.props.spacing||'small',s={className:c('joinClasses')(o.props.className,m(r),this.props.imageClassName)};if(o.type==='img'){if(o.props.alt===undefined)s.alt='';}else if((o.type==='a'||o.type==='link')&&o.props.tabIndex===undefined&&o.props.title===undefined&&o.props['aria-label']===undefined){s.tabIndex='-1';s['aria-hidden']='true';}o=c('React').cloneElement(o,s);var t=c('joinClasses')(this.props.contentClassName,"_42ef"+(r==='small'?' '+"_8u":'')),u;if(!q){u=c('React').createElement('div',{className:t},p);}else u=c('React').createElement(c('LeftRight.react'),{className:t,direction:c('LeftRight.react').DIRECTION.right},p,q);return (c('React').createElement(c('LeftRight.react'),babelHelpers['extends']({},this.props,{direction:c('LeftRight.react').DIRECTION.left}),o,u));};function n(){'use strict';j.apply(this,arguments);}f.exports=n;}),null); __d('InlineBlock.react',['cx','React','joinClasses'],(function a(b,c,d,e,f,g,h){var i,j;if(c.__markCompiled)c.__markCompiled();var k=c('React').PropTypes,l={baseline:null,bottom:"_6d",middle:"_6b",top:"_6e"};i=babelHelpers.inherits(m,c('React').Component);j=i&&i.prototype;m.prototype.render=function(){'use strict';var n=this.props,o=n.alignv,p=n.height,q=n.fullWidth,r=babelHelpers.objectWithoutProperties(n,['alignv','height','fullWidth']),s=l[o],t="_6a";if(q)t=c('joinClasses')(t,"_5u5j");var u=c('joinClasses')(t,s);if(this.props.height!=null){var v=c('React').createElement('div',{className:c('joinClasses')("_6a",s),style:{height:p+'px'}});return (c('React').createElement('div',babelHelpers['extends']({},r,{className:c('joinClasses')(this.props.className,t),height:null}),v,c('React').createElement('div',{className:u},this.props.children)));}else return (c('React').createElement('div',babelHelpers['extends']({},r,{className:c('joinClasses')(this.props.className,u)}),this.props.children));};function m(){'use strict';i.apply(this,arguments);}m.propTypes={alignv:k.oneOf(['baseline','bottom','middle','top']),height:k.number,fullWidth:k.bool};m.defaultProps={alignv:'baseline',fullWidth:false};f.exports=m;}),null); __d('keyMirrorRecursive',['invariant'],(function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();function i(l,m){return j(l,m);}function j(l,m){var n={},o;!k(l)?h(0):void 0;for(o in l){if(!l.hasOwnProperty(o))continue;var p=l[o],q=m?m+'.'+o:o;if(k(p)){p=j(p,q);}else p=q;n[o]=p;}return n;}function k(l){return l instanceof Object&&!Array.isArray(l);}f.exports=i;}),null); __d('Dispatcher_DEPRECATED',['invariant','monitorCodeUse'],(function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();var i='ID_';function j(){this.$Dispatcher_DEPRECATED1={};this.$Dispatcher_DEPRECATED2=false;this.$Dispatcher_DEPRECATED3={};this.$Dispatcher_DEPRECATED4={};this.$Dispatcher_DEPRECATED5=1;}j.prototype.register=function(k,l){l=this.__genID(l);this.$Dispatcher_DEPRECATED1[l]=k;return l;};j.prototype.unregister=function(k){!this.$Dispatcher_DEPRECATED1[k]?h(0):void 0;delete this.$Dispatcher_DEPRECATED1[k];};j.prototype.waitFor=function(k){!this.$Dispatcher_DEPRECATED2?h(0):void 0;for(var l=0;l<k.length;l++){var m=k[l];if(this.$Dispatcher_DEPRECATED4[m]){!this.$Dispatcher_DEPRECATED3[m]?h(0):void 0;continue;}!this.$Dispatcher_DEPRECATED1[m]?h(0):void 0;this.$Dispatcher_DEPRECATED7(m);}};j.prototype.dispatch=function(k){!!this.$Dispatcher_DEPRECATED2?h(0):void 0;this.$Dispatcher_DEPRECATED8(k);try{for(var l in this.$Dispatcher_DEPRECATED1){if(this.$Dispatcher_DEPRECATED4[l])continue;this.$Dispatcher_DEPRECATED7(l);}}finally{this.$Dispatcher_DEPRECATED9();}};j.prototype.isDispatching=function(){return this.$Dispatcher_DEPRECATED2;};j.prototype.$Dispatcher_DEPRECATED7=function(k){this.$Dispatcher_DEPRECATED4[k]=true;this.__invokeCallback(k,this.$Dispatcher_DEPRECATED1[k],this.$Dispatcher_DEPRECATED6);this.$Dispatcher_DEPRECATED3[k]=true;};j.prototype.__invokeCallback=function(k,l,m){l(m);};j.prototype.$Dispatcher_DEPRECATED8=function(k){for(var l in this.$Dispatcher_DEPRECATED1){this.$Dispatcher_DEPRECATED4[l]=false;this.$Dispatcher_DEPRECATED3[l]=false;}this.$Dispatcher_DEPRECATED6=k;this.$Dispatcher_DEPRECATED2=true;};j.prototype.$Dispatcher_DEPRECATED9=function(){delete this.$Dispatcher_DEPRECATED6;this.$Dispatcher_DEPRECATED2=false;};j.prototype.__genID=function(k){k=k||i+this.$Dispatcher_DEPRECATED5++;while(this.$Dispatcher_DEPRECATED1[k])k=i+this.$Dispatcher_DEPRECATED5++;return k;};f.exports=j;}),null); __d('ExplicitRegistrationDispatcherUtils',['ErrorUtils','FluxInternalConfig','emptyFunction','monitorCodeUse','setImmediate'],(function a(b,c,d,e,f,g){'use strict';var h;if(c.__markCompiled)c.__markCompiled();var i=false,j=c('emptyFunction');f.exports={warn:j,inlineRequiresEnabled:i};}),null); __d('ExplicitRegistrationDispatcher',['Dispatcher_DEPRECATED','ExplicitRegistrationDispatcherUtils','setImmediate'],(function a(b,c,d,e,f,g){'use strict';var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('Dispatcher_DEPRECATED'));i=h&&h.prototype;function j(k){var l=k.strict;i.constructor.call(this);this.$ExplicitRegistrationDispatcher2=l;this.$ExplicitRegistrationDispatcher1={};}j.prototype.explicitlyRegisterStore=function(k){var l=k.getDispatchToken();this.$ExplicitRegistrationDispatcher1[l]=true;return l;};j.prototype.explicitlyRegisterStores=function(k){return k.map(function(l){return this.explicitlyRegisterStore(l);}.bind(this));};j.prototype.register=function(k,l){var m=this.__genID(l);this.$ExplicitRegistrationDispatcher1[m]=false;var n=i.register.call(this,this.$ExplicitRegistrationDispatcher4.bind(this,m,k),m);return n;};j.prototype.$ExplicitRegistrationDispatcher4=function(k,l,m){if(this.$ExplicitRegistrationDispatcher1[k]||!this.$ExplicitRegistrationDispatcher2)this.__invokeCallback(k,l,m);};j.prototype.unregister=function(k){i.unregister.call(this,k);delete this.$ExplicitRegistrationDispatcher1[k];};j.prototype.__getMaps=function(){};f.exports=j;}),null); __d('ExplicitRegistrationReactDispatcher',['ExplicitRegistrationDispatcher','ReactDOM'],(function a(b,c,d,e,f,g){'use strict';var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('ExplicitRegistrationDispatcher'));i=h&&h.prototype;j.prototype.dispatch=function(k){c('ReactDOM').unstable_batchedUpdates(function(){i.dispatch.call(this,k);}.bind(this));};function j(){h.apply(this,arguments);}f.exports=j;}),null); __d('FluxStoreGroup',['invariant'],(function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();function i(k,l){this.__dispatcher=j(k);var m=k.map(function(n){return n.getDispatchToken();});this.$FluxStoreGroup1=this.__dispatcher.register(function(n){this.__dispatcher.waitFor(m);l();}.bind(this));if(this.__dispatcher.explicitlyRegisterStore)this.__dispatcher.explicitlyRegisterStore(this);}i.prototype.release=function(){this.__dispatcher.unregister(this.$FluxStoreGroup1);};i.prototype.getDispatchToken=function(){return this.$FluxStoreGroup1;};function j(k){!(k&&k.length)?h(0):void 0;var l=k[0].getDispatcher();return l;}f.exports=i;}),null); __d('FluxContainerSubscriptions',['FluxStoreGroup'],(function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();function h(){this.$FluxContainerSubscriptions1=[];}h.prototype.setStores=function(i){var j,k=this;this.$FluxContainerSubscriptions4();this.$FluxContainerSubscriptions5();var l=false,m=[];(function(){var o=function p(){l=true;};k.$FluxContainerSubscriptions3=i.map(function(p){return p.addListener(o);});})();var n=function(){if(l){this.$FluxContainerSubscriptions1.forEach(function(o){return o();});l=false;}}.bind(this);this.$FluxContainerSubscriptions2=new (c('FluxStoreGroup'))(i,n);};h.prototype.addListener=function(i){this.$FluxContainerSubscriptions1.push(i);};h.prototype.reset=function(){this.$FluxContainerSubscriptions4();this.$FluxContainerSubscriptions5();this.$FluxContainerSubscriptions6();};h.prototype.$FluxContainerSubscriptions4=function(){if(this.$FluxContainerSubscriptions3){this.$FluxContainerSubscriptions3.forEach(function(i){return i.remove();});this.$FluxContainerSubscriptions3=null;}};h.prototype.$FluxContainerSubscriptions5=function(){if(this.$FluxContainerSubscriptions2){this.$FluxContainerSubscriptions2.release();this.$FluxContainerSubscriptions2=null;}};h.prototype.$FluxContainerSubscriptions6=function(){this.$FluxContainerSubscriptions1=[];};f.exports=h;}),null); __d('FluxContainer',['invariant','FluxContainerSubscriptions','React','shallowEqual'],(function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();var i=c('React').Component,j=c('React').PureComponent,k={pure:true,withProps:false,withContext:false};function l(p,q){var r,s;n(p);var t=babelHelpers['extends']({},k,q||{}),u=function z(aa,ba,ca){var da=t.withProps?ba:undefined,ea=t.withContext?ca:undefined;return p.calculateState(aa,da,ea);},v=function z(aa,ba){var ca=t.withProps?aa:undefined,da=t.withContext?ba:undefined;return p.getStores(ca,da);};r=babelHelpers.inherits(w,p);s=r&&r.prototype;function w(z,aa){'use strict';s.constructor.call(this,z,aa);this.$ContainerClass1=new (c('FluxContainerSubscriptions'))();this.$ContainerClass1.setStores(v(z));this.$ContainerClass1.addListener(function(){this.setState(function(ca,da){return u(ca,da,aa);});}.bind(this));var ba=u(undefined,z,aa);this.state=babelHelpers['extends']({},this.state||{},ba);}w.prototype.componentWillReceiveProps=function(z,aa){'use strict';if(s.componentWillReceiveProps)s.componentWillReceiveProps.call(this,z,aa);if(t.withProps||t.withContext){this.$ContainerClass1.setStores(v(z,aa));this.setState(function(ba){return u(ba,z,aa);});}};w.prototype.componentWillUnmount=function(){'use strict';if(s.componentWillUnmount)s.componentWillUnmount.call(this);this.$ContainerClass1.reset();};var x=t.pure&&!(p.prototype instanceof j)?m(w):w,y=p.displayName||p.name;x.displayName='FluxContainer('+y+')';return x;}function m(p){var q,r;q=babelHelpers.inherits(s,p);r=q&&q.prototype;s.prototype.shouldComponentUpdate=function(t,u){'use strict';return (!c('shallowEqual')(this.props,t)||!c('shallowEqual')(this.state,u));};function s(){'use strict';q.apply(this,arguments);}return s;}function n(p){!p.getStores?h(0):void 0;!p.calculateState?h(0):void 0;}function o(p,q,r,s){var t,u;t=babelHelpers.inherits(v,i);u=t&&t.prototype;v.getStores=function(x,y){'use strict';return q(x,y);};v.calculateState=function(x,y,z){'use strict';return r(x,y,z);};v.prototype.render=function(){'use strict';return p(this.state);};function v(){'use strict';t.apply(this,arguments);}var w=p.displayName||p.name||'FunctionalContainer';v.displayName=w;return l(v,s);}f.exports={create:l,createFunctional:o};}),null); __d('FluxStore',['invariant','EventEmitter'],(function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();function i(j){this.__className=this.constructor.name;this.__changed=false;this.__changeEvent='change';this.__dispatcher=j;this.__emitter=new (c('EventEmitter'))();this.$FluxStore1=j.register(function(k){this.__invokeOnDispatch(k);}.bind(this),this.__getIDForDispatcher());}i.prototype.addListener=function(j){return this.__emitter.addListener(this.__changeEvent,j);};i.prototype.getDispatcher=function(){return this.__dispatcher;};i.prototype.getDispatchToken=function(){return this.$FluxStore1;};i.prototype.hasChanged=function(){!this.__dispatcher.isDispatching()?h(0):void 0;return this.__changed;};i.prototype.__emitChange=function(){!this.__dispatcher.isDispatching()?h(0):void 0;this.__changed=true;};i.prototype.__invokeOnDispatch=function(j){this.__changed=false;this.__onDispatch(j);if(this.__changed)this.__emitter.emit(this.__changeEvent);};i.prototype.__onDispatch=function(j){h(0);};i.prototype.__getIDForDispatcher=function(){return this.__className;};f.exports=i;}),null); __d('abstractMethod',['invariant'],(function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();function i(j,k){h(0);}f.exports=i;}),null); __d('FluxReduceStore',['invariant','FluxStore','abstractMethod'],(function a(b,c,d,e,f,g,h){'use strict';var i,j;if(c.__markCompiled)c.__markCompiled();i=babelHelpers.inherits(k,c('FluxStore'));j=i&&i.prototype;function k(l){j.constructor.call(this,l);this.$FluxReduceStore1=this.getInitialState();}k.prototype.getState=function(){return this.$FluxReduceStore1;};k.prototype.getInitialState=function(){return c('abstractMethod')('FluxReduceStore','getInitialState');};k.prototype.reduce=function(l,m){return c('abstractMethod')('FluxReduceStore','reduce');};k.prototype.areEqual=function(l,m){return l===m;};k.prototype.__invokeOnDispatch=function(l){this.__changed=false;var m=this.$FluxReduceStore1,n=this.reduce(m,l);!(n!==undefined)?h(0):void 0;if(!this.areEqual(m,n)){this.$FluxReduceStore1=n;this.__emitChange();}if(this.__changed)this.__emitter.emit(this.__changeEvent);};f.exports=k;}),null); __d('fbglyph',[],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(i){throw new Error('fbglyph'+'('+JSON.stringify(i)+'): '+'Unexpected fbglyph reference.');}f.exports=h;}),null); __d('xuiglyph',['ix'],(function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();function i(j){if(typeof j==='string')j={name:j};var k=babelHelpers['extends']({name:undefined,shade:'dark',size:'small'},j);return h.call(null,k.name+':'+k.shade+':'+k.size);}f.exports=i;}),null); __d('LoadOnRender.react',['React','createCancelableFunction'],(function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('React').Component);i=h&&h.prototype;function j(k){'use strict';i.constructor.call(this,k);this.$LoadOnRender1=function(l){this.setState({Component:l});}.bind(this);this.state={Component:null,cancelableOnComponentLoad:c('createCancelableFunction')(this.$LoadOnRender1)};}j.prototype.componentWillMount=function(){'use strict';this.props.loader(this.state.cancelableOnComponentLoad);};j.prototype.componentWillUnmount=function(){'use strict';this.state.cancelableOnComponentLoad.cancel();};j.prototype.render=function(){'use strict';var k=this.state.Component;if(!k||this.props.forcePlaceholder)return this.props.placeholder;return c('React').cloneElement(this.props.component,{LazyLoadedComponent:k});};j.defaultProps={forcePlaceholder:false};f.exports=j;}),null); __d('BootloadOnRender.react',['JSResource','LoadOnRender.react','React'],(function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('React').Component);i=h&&h.prototype;function j(){var k,l;'use strict';for(var m=arguments.length,n=Array(m),o=0;o<m;o++)n[o]=arguments[o];return l=(k=i.constructor).call.apply(k,[this].concat(n)),this.$BootloadOnRender1=function(p){c('JSResource').loadAll([this.props.loader],p);}.bind(this),l;}j.prototype.render=function(){'use strict';return (c('React').createElement(c('LoadOnRender.react'),{placeholder:this.props.placeholder,loader:this.$BootloadOnRender1,component:this.props.component}));};f.exports=j;}),null); __d('LazyComponent.react',['React'],(function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('React').Component);i=h&&h.prototype;j.prototype.render=function(){'use strict';var k=this.props,l=k.LazyLoadedComponent,m=babelHelpers.objectWithoutProperties(k,['LazyLoadedComponent']);return c('React').createElement(l,m);};function j(){'use strict';h.apply(this,arguments);}j.defaultProps={LazyLoadedComponent:function k(){return null;}};f.exports=j;}),null); __d('shallowCompare',['shallowEqual'],(function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();function h(i,j,k){return (!c('shallowEqual')(i.props,j)||!c('shallowEqual')(i.state,k));}f.exports=h;}),null); __d('ReactLayeredComponentMixin_DEPRECATED',['ExecutionEnvironment','ReactInstanceMap','ReactCurrentOwner','React','ReactDOM','ReactFragment','renderSubtreeIntoContainer'],(function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h={componentWillMount:function i(){if(c('ExecutionEnvironment').canUseDOM)this._layersContainer=document.createElement('div');},componentDidMount:function i(){this._renderLayersIntoContainer();},componentDidUpdate:function i(){this._renderLayersIntoContainer();},componentWillUnmount:function i(){c('ReactDOM').unmountComponentAtNode(this._layersContainer);},_renderLayersIntoContainer:function i(){c('ReactCurrentOwner').current=c('ReactInstanceMap').get(this);var j;try{j=this.renderLayers();}finally{c('ReactCurrentOwner').current=null;}if(j&&!Array.isArray(j)&&!c('React').isValidElement(j))j=c('ReactFragment').create(j);c('renderSubtreeIntoContainer')(this,c('React').createElement('div',null,j),this._layersContainer);}};f.exports=h;}),null); __d('XHRHttpError',[],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h='HTTP_CLIENT_ERROR',i='HTTP_PROXY_ERROR',j='HTTP_SERVER_ERROR',k='HTTP_TRANSPORT_ERROR',l='HTTP_UNKNOWN_ERROR';function m(n,o){if(o===0){var p=n.getProtocol();if(p==='file'||p==='ftp')return null;return k;}else if(o>=100&&o<200){return i;}else if(o>=200&&o<300){return null;}else if(o>=400&&o<500){return h;}else if(o>=500&&o<600){return j;}else if(o>=12001&&o<12156){return k;}else return l;}f.exports={getErrorCode:m,HTTP_CLIENT_ERROR:h,HTTP_PROXY_ERROR:i,HTTP_SERVER_ERROR:j,HTTP_TRANSPORT_ERROR:k,HTTP_UNKNOWN_ERROR:l};}),null); __d('xhrSimpleDataSerializer',[],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(i){var j=[],k;for(k in i)j.push(encodeURIComponent(k)+'='+encodeURIComponent(i[k]));return j.join('&');}f.exports=h;}),null); __d('XHRRequest',['invariant','ErrorUtils','TimeSlice','URI','XHRHttpError','ZeroRewrites','getAsyncHeaders','xhrSimpleDataSerializer'],(function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();var i={errorCode:null,errorMsg:null,errorType:null},j={loadedBytes:null,totalBytes:null};function k(l){'use strict';this.setURI(l);this.setResponseType(null);this.setMethod('POST');this.setTransportBuilder(c('ZeroRewrites').getTransportBuilderForURI(this.getURI()));this.setDataSerializer(c('xhrSimpleDataSerializer'));}k.prototype.setURI=function(l){'use strict';this.$XHRRequest1=c('ZeroRewrites').rewriteURI(new (c('URI'))(l));return this;};k.prototype.getURI=function(){'use strict';return this.$XHRRequest1;};k.prototype.setResponseType=function(l){'use strict';this.$XHRRequest2=l;return this;};k.prototype.setMethod=function(l){'use strict';this.$XHRRequest3=l;return this;};k.prototype.getMethod=function(){'use strict';return this.$XHRRequest3;};k.prototype.setData=function(l){'use strict';this.$XHRRequest4=l;return this;};k.prototype.getData=function(){'use strict';return this.$XHRRequest4;};k.prototype.setRawData=function(l){'use strict';this.$XHRRequest5=l;return this;};k.prototype.setRequestHeader=function(l,m){'use strict';if(!this.$XHRRequest6)this.$XHRRequest6={};this.$XHRRequest6[l]=m;return this;};k.prototype.setTimeout=function(l){'use strict';this.$XHRRequest7=l;return this;};k.prototype.getTimeout=function(){'use strict';return this.$XHRRequest7;};k.prototype.setResponseHandler=function(l){'use strict';this.$XHRRequest8=l;return this;};k.prototype.setErrorHandler=function(l){'use strict';this.$XHRRequest9=l;return this;};k.prototype.getErrorHandler=function(){'use strict';return this.$XHRRequest9;};k.prototype.setAbortHandler=function(l){'use strict';this.$XHRRequest10=l;return this;};k.prototype.getAbortHandler=function(){'use strict';return this.$XHRRequest10;};k.prototype.setTimeoutHandler=function(l){'use strict';this.$XHRRequest11=l;return this;};k.prototype.setUploadProgressHandler=function(l){'use strict';this.$XHRRequest12=l;return this;};k.prototype.setDownloadProgressHandler=function(l){'use strict';this.$XHRRequest13=l;return this;};k.prototype.setTransportBuilder=function(l){'use strict';this.$XHRRequest14=l;return this;};k.prototype.setDataSerializer=function(l){'use strict';this.$XHRRequest15=l;return this;};k.prototype.send=function(){'use strict';var l=this.$XHRRequest7,m=this.$XHRRequest14(),n=this.getURI();this.$XHRRequest16=m;var o;!(this.$XHRRequest3==='POST'||!this.$XHRRequest5)?h(0):void 0;if(this.$XHRRequest3==='GET'||this.$XHRRequest5){n.addQueryData(this.$XHRRequest4);o=this.$XHRRequest5;}else o=this.$XHRRequest15(this.$XHRRequest4);m.onreadystatechange=this.$XHRRequest17();if(m.upload&&this.$XHRRequest12)m.upload.onprogress=this.$XHRRequest18.bind(this);if(this.$XHRRequest13)m.onprogress=this.$XHRRequest19.bind(this);if(l)this.$XHRRequest20=setTimeout(this.$XHRRequest21.bind(this),l);m.open(this.$XHRRequest3,n.toString(),true);if(this.$XHRRequest6)for(var p in this.$XHRRequest6)m.setRequestHeader(p,this.$XHRRequest6[p]);var q=c('getAsyncHeaders')(n);Object.keys(q).forEach(function(r){m.setRequestHeader(r,q[r]);});if(this.$XHRRequest2==='arraybuffer')if('responseType' in m){m.responseType='arraybuffer';}else if('overrideMimeType' in m){m.overrideMimeType('text/plain; charset=x-user-defined');}else if('setRequestHeader' in m)m.setRequestHeader('Accept-Charset','x-user-defined');if(this.$XHRRequest2==='blob')m.responseType=this.$XHRRequest2;m.send(o);};k.prototype.abort=function(){'use strict';this.$XHRRequest22();if(this.$XHRRequest10)c('ErrorUtils').applyWithGuard(this.$XHRRequest10,null,null,null,'XHRRequest:_abortHandler');};k.prototype.$XHRRequest22=function(){'use strict';var l=this.$XHRRequest16;if(l){l.onreadystatechange=null;l.abort();}this.$XHRRequest23();};k.prototype.$XHRRequest21=function(){'use strict';this.$XHRRequest22();if(this.$XHRRequest11)c('ErrorUtils').applyWithGuard(this.$XHRRequest11,null,null,null,'XHRRequest:_abortHandler');};k.prototype.$XHRRequest24=function(l){'use strict';if(this.$XHRRequest2)if('response' in l){return l.response;}else if(this.$XHRRequest2==='arraybuffer')if(window.VBArray)return window.VBArray(l.responseBody).toArray();return l.responseText;};k.prototype.$XHRRequest17=function(){'use strict';var l=c('TimeSlice').getGuardedContinuation('XHRRequest onreadystatechange continuation'),m=c('TimeSlice').guard(function(n){for(var o=arguments.length,p=Array(o>1?o-1:0),q=1;q<o;q++)p[q-1]=arguments[q];return n.apply(undefined,p);},'XHRRequest onreadystatechange',{isContinuation:false});return function(){var n=this.$XHRRequest16,o=n.readyState;if(o>=2){var p=o===4,q=this.getURI(),r=c('XHRHttpError').getErrorCode(q,n.status),s=this.$XHRRequest8;if(r!==null){if(p){i.errorCode=r;i.errorMsg=this.$XHRRequest24(n);i.errorType=n.status?'HTTP '+n.status:'HTTP';if(this.$XHRRequest9){c('ErrorUtils').applyWithGuard(l.bind(undefined,this.$XHRRequest9),null,[i],null,'XHRRequest:_errorHandler');}else l(function(){});}}else if(s){var t=null;if(s.includeHeaders)t=n.getAllResponseHeaders();if(p||s.parseStreaming&&o===3){var u=p?l:m;c('ErrorUtils').applyWithGuard(u.bind(undefined,s),null,[this.$XHRRequest24(n),t,p],null,'XHRRequest:handler');}}else l(function(){});if(p)this.$XHRRequest23();}}.bind(this);};k.prototype.$XHRRequest18=function(l){'use strict';j.loadedBytes=l.loaded;j.totalBytes=l.total;if(this.$XHRRequest12)c('ErrorUtils').applyWithGuard(this.$XHRRequest12,null,[j],null,'XHRRequest:_uploadProgressHandler');};k.prototype.$XHRRequest19=function(l){'use strict';var m={loadedBytes:l.loaded,totalBytes:l.total};if(this.$XHRRequest13)c('ErrorUtils').applyWithGuard(this.$XHRRequest13,null,[m],null,'XHRRequest:_downloadProgressHandler');};k.prototype.$XHRRequest23=function(){'use strict';clearTimeout(this.$XHRRequest20);delete this.$XHRRequest16;};f.exports=k;}),null); __d('TokenizeUtil',[],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=/[ ]+/g,i=/[^ ]+/g,j=new RegExp(k(),'g');function k(){return '[.,+*?$|#{}()\'\\^\\-\\[\\]\\\\\\/!@%"~=<>_:;'+'\u30fb\u3001\u3002\u3008-\u3011\u3014-\u301f\uff1a-\uff1f\uff01-\uff0f'+'\uff3b-\uff40\uff5b-\uff65\u2E2E\u061f\u066a-\u066c\u061b\u060c\u060d'+'\uFD3e\uFD3F\u1801\u0964\u104a\u104b\u2010-\u2027\u2030-\u205e'+'\u00a1-\u00b1\u00b4-\u00b8\u00ba\u00bb\u00bf]';}var l={},m={a:"\u0430 \u00e0 \u00e1 \u00e2 \u00e3 \u00e4 \u00e5 \u0101",b:"\u0431",c:"\u0446 \u00e7 \u010d",d:"\u0434 \u00f0 \u010f \u0111",e:"\u044d \u0435 \u00e8 \u00e9 \u00ea \u00eb \u011b \u0113",f:"\u0444",g:"\u0433 \u011f \u0123",h:"\u0445 \u0127",i:"\u0438 \u00ec \u00ed \u00ee \u00ef \u0131 \u012b",j:"\u0439",k:"\u043a \u0138 \u0137",l:"\u043b \u013e \u013a \u0140 \u0142 \u013c",m:"\u043c",n:"\u043d \u00f1 \u0148 \u0149 \u014b \u0146",o:"\u043e \u00f8 \u00f6 \u00f5 \u00f4 \u00f3 \u00f2",p:"\u043f",r:"\u0440 \u0159 \u0155",s:"\u0441 \u015f \u0161 \u017f",t:"\u0442 \u0165 \u0167 \u00fe",u:"\u0443 \u044e \u00fc \u00fb \u00fa \u00f9 \u016f \u016b",v:"\u0432",y:"\u044b \u00ff \u00fd",z:"\u0437 \u017e",ae:"\u00e6",oe:"\u0153",ts:"\u0446",ch:"\u0447",ij:"\u0133",sh:"\u0448",ss:"\u00df",ya:"\u044f"};for(var n in m){var o=m[n].split(' ');for(var p=0;p<o.length;p++)l[o[p]]=n;}var q={};function r(x){return x?x.replace(j,' '):'';}function s(x){x=x.toLowerCase();var y='',z='';for(var aa=x.length;aa--;){z=x.charAt(aa);y=(l[z]||z)+y;}return y.replace(h,' ');}function t(x){var y=[],z=i.exec(x);while(z){z=z[0];y.push(z);z=i.exec(x);}return y;}function u(x,y){if(!q.hasOwnProperty(x)){var z=s(x),aa=r(z);q[x]={value:x,flatValue:z,tokens:t(aa),isPrefixQuery:aa&&aa[aa.length-1]!=' '};}if(y&&typeof q[x].sortedTokens=='undefined'){q[x].sortedTokens=q[x].tokens.slice();q[x].sortedTokens.sort(function(ba,ca){return ca.length-ba.length;});}return q[x];}function v(x,y,z){var aa=u(y,x=='prefix'),ba=x=='prefix'?aa.sortedTokens:aa.tokens,ca=u(z).tokens,da={},ea=aa.isPrefixQuery&&x=='query'?ba.length-1:null,fa=function ga(ha,ia){for(var ja=0;ja<ca.length;++ja){var ka=ca[ja];if(!da[ja]&&(ka==ha||(x=='query'&&ia===ea||x=='prefix')&&ka.indexOf(ha)===0))return da[ja]=true;}return false;};return Boolean(ba.length&&ba.every(fa));}var w={flatten:s,parse:u,getPunctuation:k,isExactMatch:v.bind(null,'exact'),isQueryMatch:v.bind(null,'query'),isPrefixMatch:v.bind(null,'prefix'),tokenize:t};f.exports=w;}),null); __d('isValidUniqueID',[],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(i){return (i!==null&&i!==undefined&&i!==''&&(typeof i==='string'||typeof i==='number'));}f.exports=h;}),null); __d('SearchableEntry',['invariant','HTML','isValidUniqueID','FbtResult'],(function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();function i(k){if(!k){return '';}else if(typeof k==='string'){return k;}else if(k instanceof c('FbtResult')){return k.toString();}else if(typeof k==='object'){var l=c('HTML').replaceJSONWrapper(k);if(c('HTML').isHTML(l)){var m=l.getRootNode();return m.textContent||m.innerText||'';}else return '';}else return '';}function j(k){'use strict';!c('isValidUniqueID')(k.uniqueID)?h(0):void 0;this.$SearchableEntry8=k.uniqueID+'';if(k.title instanceof c('FbtResult'))k.title=k.title.toString();!(k.title!=null&&typeof k.title==='string')?h(0):void 0;this.$SearchableEntry6=k.title;this.$SearchableEntry3=k.order||0;this.$SearchableEntry5=i(k.subtitle);this.$SearchableEntry2=k.keywordString||'';this.$SearchableEntry4=k.photo||'';this.$SearchableEntry9=k.uri||'';this.$SearchableEntry7=k.type||'';var l=k.auxiliaryData||{};this.$SearchableEntry1=l;}j.prototype.getUniqueID=function(){'use strict';return this.$SearchableEntry8;};j.prototype.getOrder=function(){'use strict';return this.$SearchableEntry3;};j.prototype.getTitle=function(){'use strict';return this.$SearchableEntry6;};j.prototype.getSubtitle=function(){'use strict';return this.$SearchableEntry5;};j.prototype.getKeywordString=function(){'use strict';return this.$SearchableEntry2;};j.prototype.getPhoto=function(){'use strict';return this.$SearchableEntry4;};j.prototype.getURI=function(){'use strict';return this.$SearchableEntry9;};j.prototype.getType=function(){'use strict';return this.$SearchableEntry7;};j.prototype.getAuxiliaryData=function(){'use strict';return this.$SearchableEntry1;};j.prototype.toPlainObject=function(){'use strict';return {auxiliaryData:this.$SearchableEntry1,keywordString:this.$SearchableEntry2,order:this.$SearchableEntry3,photo:this.$SearchableEntry4,subtitle:this.$SearchableEntry5,title:this.$SearchableEntry6,type:this.$SearchableEntry7,uniqueID:this.$SearchableEntry8,uri:this.$SearchableEntry9};};f.exports=j;}),null);
1,215.396825
12,717
0.733819
947f2f79749ca28206a34c5c4174bdad837b4127
656
js
JavaScript
src/storage/models/NetworkModel.js
symbol/symbol-mobile-wallet
4e999dff1bd04a90912f1ec7d8c797bb4cd3e096
[ "Apache-2.0" ]
4
2021-02-27T10:41:30.000Z
2021-05-31T06:48:11.000Z
src/storage/models/NetworkModel.js
nemgrouplimited/symbol-mobile-wallet
4e999dff1bd04a90912f1ec7d8c797bb4cd3e096
[ "Apache-2.0" ]
159
2020-11-23T17:16:22.000Z
2021-07-14T06:43:05.000Z
src/storage/models/NetworkModel.js
nemgrouplimited/symbol-mobile-wallet
4e999dff1bd04a90912f1ec7d8c797bb4cd3e096
[ "Apache-2.0" ]
9
2020-11-24T12:05:51.000Z
2021-07-15T07:21:49.000Z
import { NetworkType, TransactionFees } from 'symbol-sdk'; export type AppNetworkType = 'testnet' | 'mainnet'; /** * Network model */ export interface NetworkModel { type: AppNetworkType; networkType: NetworkType; generationHash: string; node: string; currencyMosaicId: string; chainHeight: number; blockGenerationTargetTime: number; epochAdjustment: number; transactionFees: TransactionFees; defaultDynamicFeeMultiplier: number; networkCurrency: { namespaceName: string, namespaceId: string, mosaicId: string, divisibility: number, }; totalChainImportance: number; }
24.296296
58
0.693598
947f3db7cb58ede52bf01dc554cff0f8ca34793b
369
js
JavaScript
src/components/main/NewMessage.js
nnikunjt/twitter-react-js
641551a496e300e3538b01620595b912abf15652
[ "MIT" ]
null
null
null
src/components/main/NewMessage.js
nnikunjt/twitter-react-js
641551a496e300e3538b01620595b912abf15652
[ "MIT" ]
null
null
null
src/components/main/NewMessage.js
nnikunjt/twitter-react-js
641551a496e300e3538b01620595b912abf15652
[ "MIT" ]
null
null
null
import React from 'react' import TweetHeader from './TweetHeader' import TweetBody from './TweetBody.js' import TweetBottom from './TweetBottom' function NewMessage() { return ( <div className="new-message"> <TweetHeader /> <TweetBody /> <hr/> <TweetBottom /> </div> ) } export default NewMessage
20.5
39
0.593496
947f84dcf52ee588b2d0fe0dd620f71177a7dbe1
5,054
js
JavaScript
controller/user.js
oteroleonardo/api-chat
704f9f34d7d99adc3f82a025d1a7b05af72c3b65
[ "Apache-2.0" ]
1
2019-05-13T04:19:07.000Z
2019-05-13T04:19:07.000Z
controller/user.js
oteroleonardo/api-chat
704f9f34d7d99adc3f82a025d1a7b05af72c3b65
[ "Apache-2.0" ]
1
2021-05-08T18:20:33.000Z
2021-05-08T18:20:33.000Z
controller/user.js
oteroleonardo/api-chat
704f9f34d7d99adc3f82a025d1a7b05af72c3b65
[ "Apache-2.0" ]
null
null
null
const User = require('../model/user'); const jwt = require('jsonwebtoken'); const log = require('debug')('chat-api:controller:user'); const { red, green, yellow } = require('chalk'); const signUp = async (usr) => { const user = new User({ ...usr }); try { const savedUser = await user.save() if (typeof savedUser === 'undefined') { // User not saved, send back no token const message = 'Error user was not saved'; log(red(`Error in signUp: ${message}`)); return { error: { code: 401, message } }; } else { // User saved, send back token with user info const userStoredData = savedUser.attributes; delete userStoredData.password_digest; const signOptions = { algorithm: 'HS512', expiresIn: `${process.env.TOKEN_EXPIRATION}s`, //token expiration indicated in seconds } log() const token = jwt.sign({ ...userStoredData }, process.env.SECRET_OR_KEY, signOptions); return { token }; } } catch (err) { const message = (err.code === '23505') ? 'Duplicated user (23505)' : 'DB error saving user'; //log(red(`Error saving user: ${message}`)); return { error: { code: 401, message } }; }; log(red(savedUser.code, savedUser.err)); }; const update = async (usr) => { log(`usr: ${JSON.stringify(usr)}`) // const { id, username, status, password, email } = usr; const user = new User({...usr}); try { const savedUser = await User.forge({...usr}).save();//null, {method: 'update'}); if (typeof savedUser === 'undefined') { // User not saved, send back no token const message = 'Error user was not updated'; log(red(`Error in user update: ${message}`)); return { error: { code: 401, message } }; } else { // User saved, send back token with user info const userStoredData = savedUser.attributes; delete userStoredData.password_digest; const signOptions = { algorithm: 'HS512', expiresIn: `${process.env.TOKEN_EXPIRATION}s`, //token expiration indicated in seconds } log() const token = jwt.sign({ ...userStoredData }, process.env.SECRET_OR_KEY, signOptions); return { result: true}; //, token }; } } catch (err) { log(err); const message = (err.code === '23505') ? 'Duplicated user (23505)' : 'DB error saving user'; //log(red(`Error saving user: ${message}`)); return { error: { code: 401, message } }; }; }; const signIn = async (email, password) => { log(green('Calling signIn with email: ', email)); const user = await User.forge({ email }).fetch() .catch(err => { log(red('Error retrieving from DB user: ', email, ' - err:', err.message)); return {}; }); if (user) { //let isAutenticated = true; const authUser = await user.authenticate(password) .catch(err => { log(red('Authentication failed for user: ', email, ' - err:', err.message)); }); if (authUser) { log(green('User ${email} successfully signed in')); await User.forge({...user.attributes, status: 'connected'}).save(); const userStoredData = authUser.attributes; delete userStoredData.password_digest; const signOptions = { algorithm: 'HS512', expiresIn: `${process.env.TOKEN_EXPIRATION}s`, //token expiration indicated in seconds } const token = jwt.sign({ ...userStoredData }, process.env.SECRET_OR_KEY, signOptions); const {users} = await contacts() .catch(err => { log(red('Error retrieving contacts from DB', ' - err:', err.stack)); }) || []; return { users, token }; } else { log(yellow(`Wrong password for user: ${email}`)); } } return {}; }; const refresh = async (user) => { const {email} = user; log(green(`Calling refresh with email: ${email}`)); const usr = await User.forge({ email }).fetch() .catch(err => { log(red('Error retrieving from DB user: ', email, ' - err:', err)); return undefined; }); if (usr) { log(green('User found in DB')); const userStoredData = usr.attributes; delete userStoredData.password_digest; const signOptions = { algorithm: 'HS512', expiresIn: `${process.env.TOKEN_EXPIRATION}s`, //token expiration indicated in seconds } const authToken = jwt.sign({ ...userStoredData }, process.env.SECRET_OR_KEY, signOptions); return authToken; } return undefined; }; const contacts = async () => { log(green('Calling contacts')); const users = await User.forge({username: /e/ }).fetchAll() .catch(err => { log(red('Error retrieving user from DB email: ', email, ' - err:', err.stack)); return undefined; }); if (users && users.size()) { log(green(`${users.size()} contacts found in DB`)); } else { log(green('Contacts not found in DB')); } return {users: users.map(u => { delete u.password_digest; return u.attributes })}; }; module.exports = { signUp, signIn, refresh, contacts, update, }
31.391304
96
0.602691
947fb2fed16af8bf7ab0990067e0e4192cf82953
153
js
JavaScript
docs/tidrivers/doxygen/html/search/files_4.js
ArakniD/simplelink_msp432p4_sdk
002fd4866284891e0b9b1a8d917a74334d39a997
[ "BSD-3-Clause" ]
2
2022-02-28T01:38:24.000Z
2022-02-28T01:38:31.000Z
docs/tidrivers/doxygen/html/search/files_4.js
ArakniD/simplelink_msp432p4_sdk
002fd4866284891e0b9b1a8d917a74334d39a997
[ "BSD-3-Clause" ]
3
2019-05-10T04:24:45.000Z
2019-05-10T05:53:34.000Z
docs/tidrivers/doxygen/html/search/files_4.js
ArakniD/simplelink_msp432p4_sdk
002fd4866284891e0b9b1a8d917a74334d39a997
[ "BSD-3-Clause" ]
null
null
null
var searchData= [ ['gpio_2eh',['GPIO.h',['../_g_p_i_o_8h.html',1,'']]], ['gpiomsp432_2eh',['GPIOMSP432.h',['../_g_p_i_o_m_s_p432_8h.html',1,'']]] ];
25.5
75
0.601307
9480c9828efc9e95d01d2525a196d084400691d5
532
js
JavaScript
app/containers/SettingsEditActivity/selectors.js
vitaminwater/todoq-ui
9ac8130849087101df8f69498dc11245484fec16
[ "MIT" ]
null
null
null
app/containers/SettingsEditActivity/selectors.js
vitaminwater/todoq-ui
9ac8130849087101df8f69498dc11245484fec16
[ "MIT" ]
null
null
null
app/containers/SettingsEditActivity/selectors.js
vitaminwater/todoq-ui
9ac8130849087101df8f69498dc11245484fec16
[ "MIT" ]
null
null
null
import { createSelector } from 'reselect'; /** * Direct selector to the settingsEditActivity state domain */ const selectSettingsEditActivityDomain = () => (state) => state.get('settingsEditActivity'); /** * Other specific selectors */ /** * Default selector used by SettingsEditActivity */ const makeSelectSettingsEditActivity = () => createSelector( selectSettingsEditActivityDomain(), (substate) => substate.toJS() ); export default makeSelectSettingsEditActivity; export { selectSettingsEditActivityDomain, };
20.461538
92
0.746241
9480df0e8a5493b8b704c395f74cc3367096b0bc
1,501
js
JavaScript
wim/ExtentNav.js
lprivette/STNPublic
639a0cf741607aef64bb9a0deb5886646cdb04c1
[ "CC0-1.0" ]
null
null
null
wim/ExtentNav.js
lprivette/STNPublic
639a0cf741607aef64bb9a0deb5886646cdb04c1
[ "CC0-1.0" ]
1
2016-06-06T19:43:30.000Z
2016-06-06T19:43:30.000Z
wim/ExtentNav.js
lprivette/STNPublic
639a0cf741607aef64bb9a0deb5886646cdb04c1
[ "CC0-1.0" ]
5
2016-12-18T08:37:25.000Z
2020-01-31T18:24:26.000Z
define([ "dojo/_base/declare", "dijit/_WidgetBase", "dijit/_TemplatedMixin", "dijit/_OnDijitClickMixin", "dijit/_Container", "dojo/on", "dojo/dom", "dijit/registry", "dojo/dom-construct", "dojo/ready", "dojo/parser", "dojo/text!./templates/ExtentNav.html" ], function( declare, _WidgetBase, _TemplatedMixin, _OnDijitClickMixin, _Container, on, dom, registry, domConstruct, ready, parser, template ) { return declare( "wim/ExtentNav", [_WidgetBase, _TemplatedMixin, _OnDijitClickMixin], { templateString: template, //declaredClass: "wim/ExtentNav", baseClass: "extentNav", attachedMapID: null, initExtent: null, constructor: function() { console.log("extentNav wimjit created"); }, postCreate: function() { // on(navToolbar, "extent-history-change", extentHistoryChangeHandler); // function extentHistoryChangeHandler() { // registry.byId("back").disabled = navToolbar.isFirstExtent(dom.byId(map)); // registry.byId("fwd").disabled = navToolbar.isLastExtent(dom.byId(map)); // } }, _onBackClick: function() { navToolbar.zoomToPrevExtent(); }, _onFwdClick: function () { navToolbar.zoomToNextExtent(); }, _onFullClick: function () { map.setExtent(this.initExtent); } }); ready( 1000, function() { parser.parse(); }) });
20.847222
90
0.600933
9481402c4d71a129556cf842979f43e4530f2f18
195
js
JavaScript
models/collection/model.js
everbrez/Collections-A-Server
2afa465ab588f2e8ce846cf134c74108a11a5c5c
[ "MIT" ]
3
2019-04-01T10:49:19.000Z
2019-06-05T15:16:47.000Z
models/collection/model.js
everbrez/Collections-A-Server
2afa465ab588f2e8ce846cf134c74108a11a5c5c
[ "MIT" ]
null
null
null
models/collection/model.js
everbrez/Collections-A-Server
2afa465ab588f2e8ce846cf134c74108a11a5c5c
[ "MIT" ]
null
null
null
import mongoose from 'mongoose' const { Schema } = mongoose const collectionSchema = new Schema({ id: Number, type: String, }) export default collectionSchema export { collectionSchema }
15
37
0.738462
9481b11d44a3546d76ccb54b8603990a93c05e5b
939
js
JavaScript
src/aws.js
IsaiahPapa/Old-isaiahcreati.com-Frontend
0bd6b38cd9a2fe32a82dd85d96806d95685a1237
[ "MIT" ]
null
null
null
src/aws.js
IsaiahPapa/Old-isaiahcreati.com-Frontend
0bd6b38cd9a2fe32a82dd85d96806d95685a1237
[ "MIT" ]
null
null
null
src/aws.js
IsaiahPapa/Old-isaiahcreati.com-Frontend
0bd6b38cd9a2fe32a82dd85d96806d95685a1237
[ "MIT" ]
null
null
null
const AWS = require('aws-sdk') module.exports= { async getSpeechBuffer({text, voice, access_key_id, access_key_secret}){ if(access_key_id === "" || access_key_secret === ""){ throw "Access key ID or Access Key Secret empty."; } const Polly = new AWS.Polly({ accessKeyId: access_key_id, secretAccessKey: access_key_secret, signatureVersion: 'v4', region: 'us-east-1' }); let params = { 'Text': text, 'OutputFormat': 'mp3', 'VoiceId': voice } return Polly.synthesizeSpeech(params).promise().then( data => { if (data.AudioStream instanceof Buffer){ return data.AudioStream; } else { throw "AudioStream is not a Buffer."; } }).catch(e =>{ throw e; }); } }
27.617647
75
0.490948
9481efd72719c63c9b0ca676a7ced4b977f63019
2,716
js
JavaScript
lib/components/status-component/status-component.js
ciscoecosystem/UI-SDK
285232e27a104423f01b857483a7e27f201149ec
[ "Apache-2.0" ]
null
null
null
lib/components/status-component/status-component.js
ciscoecosystem/UI-SDK
285232e27a104423f01b857483a7e27f201149ec
[ "Apache-2.0" ]
null
null
null
lib/components/status-component/status-component.js
ciscoecosystem/UI-SDK
285232e27a104423f01b857483a7e27f201149ec
[ "Apache-2.0" ]
null
null
null
import React from 'react' import { Icon } from 'semantic-ui-react' import evalExp from "../../others/eval-exp"; import SDKHOC from '../../hoc/sdk' import DataLoaderHOC from "../../hoc/data-loader" import dispatchEvents from '../../others/dispatcher' import "./status-component.css"; class StatusComponent extends React.Component{ constructor(props) { super(props); this.styles = this.props.config.position; this.statusMessage = "---------"; } componentDidMount() { if(this.props.config && this.props.config.query && this.props.config.query.fetchInterval){ this.timeInterval = 1000 * this.props.config.query.fetchInterval; } this.props.sdk.dataloader.fetchData(); } componentWillUnmount() { clearTimeout( this.__timeerId ); } getStatusMessage() { var msg = this.statusMessage; let dataloader = this.props.sdk.dataloader; let config = this.props.config; let query = config.query; if(dataloader.error){ msg = "API Error"; if(query.onError && query.onError.dispatchEvent){ dispatchEvents(query.onError.dispatchEvent, dataloader.errorData, dataloader.errorData); } }else if(dataloader.success){ if(config.statusMessages){ let i, statusObj, jsExpression; for(i=0; i<config.statusMessages.length; i++){ statusObj = config.statusMessages[i]; jsExpression = statusObj.if || ""; if( jsExpression && evalExp( jsExpression, dataloader.data ) ){ msg = statusObj.message; break; } } } if(query.onSuccess && query.onSuccess.dispatchEvent){ dispatchEvents(query.onSuccess.dispatchEvent, dataloader.data, dataloader.data); } } // keep chekcing for the status at every certain interval specified if( (dataloader.error || dataloader.success) && this.timeInterval){ clearTimeout( this.__timeerId ); let self = this; this.__timeerId = setTimeout( function() { self.props.sdk.dataloader.fetchData(); }, this.timeInterval ); } return msg; } render(){ let dataloader = this.props.sdk.dataloader; this.statusMessage = this.getStatusMessage(); if(this.props.config.hide) return null; return ( <div className="status-component" style={this.styles}> <span> { this.props.config.message }</span> <span> { this.statusMessage } </span> { dataloader.loading ? <Icon loading name='spinner' className="loader-icon" /> : null } </div> ) } } export default SDKHOC( DataLoaderHOC( StatusComponent ) )
30.177778
98
0.62187
9482cb74e9d5fe3c708bcd6b00fcaedb1cd45076
614
js
JavaScript
listeners/views/sample-view.js
srajiang/bolt-js-starter-template
56049382da973f1dbb20d96f616cc6b642f0825a
[ "MIT" ]
null
null
null
listeners/views/sample-view.js
srajiang/bolt-js-starter-template
56049382da973f1dbb20d96f616cc6b642f0825a
[ "MIT" ]
1
2022-03-21T02:02:16.000Z
2022-03-21T02:02:16.000Z
listeners/views/sample-view.js
srajiang/bolt-js-starter-template
56049382da973f1dbb20d96f616cc6b642f0825a
[ "MIT" ]
1
2022-03-28T20:15:22.000Z
2022-03-28T20:15:22.000Z
const sampleViewCallback = async ({ ack, view, body, client }) => { await ack(); try { const formValues = view.state.values; const sampleInputValue = formValues.input_block_id.sample_input_id.value; const sampleConvoDropdown = formValues.select_channel_block_id.sample_dropdown_id; client.chat.postMessage({ channel: sampleConvoDropdown.selected_conversation, text: `<@${body.user.id}> submitted the following :sparkles: hopes and dreams :sparkles:: \n\n ${sampleInputValue}`, }); } catch (error) { console.error(error); } }; module.exports = { sampleViewCallback };
32.315789
122
0.708469
9483b5a6fede74d9c93ab9bd1d503e414b26d3cc
46,188
js
JavaScript
docs/cpp_sat/search/all_d.js
AlohaChina/or-tools
1ece0518104db435593a1a21882801ab6ada3e15
[ "Apache-2.0" ]
1
2021-12-17T11:18:00.000Z
2021-12-17T11:18:00.000Z
docs/cpp_sat/search/all_d.js
AlohaChina/or-tools
1ece0518104db435593a1a21882801ab6ada3e15
[ "Apache-2.0" ]
null
null
null
docs/cpp_sat/search/all_d.js
AlohaChina/or-tools
1ece0518104db435593a1a21882801ab6ada3e15
[ "Apache-2.0" ]
null
null
null
var searchData= [ ['max_0',['Max',['../classoperations__research_1_1_domain.html#aa74ea8cd1b0767659f704b482d07c103',1,'operations_research::Domain']]], ['max_5fall_5fdiff_5fcut_5fsize_1',['max_all_diff_cut_size',['../classoperations__research_1_1sat_1_1_sat_parameters.html#aa38d34e0d796e174587774d985a27a38',1,'operations_research::sat::SatParameters']]], ['max_5fclause_5factivity_5fvalue_2',['max_clause_activity_value',['../classoperations__research_1_1sat_1_1_sat_parameters.html#a0e74430da3b635fb3171c1e8c32a6b88',1,'operations_research::sat::SatParameters']]], ['max_5fconsecutive_5finactive_5fcount_3',['max_consecutive_inactive_count',['../classoperations__research_1_1sat_1_1_sat_parameters.html#a727cfc9716cc97686bac72014ca14836',1,'operations_research::sat::SatParameters']]], ['max_5fcut_5frounds_5fat_5flevel_5fzero_4',['max_cut_rounds_at_level_zero',['../classoperations__research_1_1sat_1_1_sat_parameters.html#acc8b3b2cd593c2fbc656e40b0c04ef80',1,'operations_research::sat::SatParameters']]], ['max_5fdeterministic_5ftime_5',['max_deterministic_time',['../classoperations__research_1_1sat_1_1_sat_parameters.html#a042e4456dbde45ef0da51857b8b3650a',1,'operations_research::sat::SatParameters']]], ['max_5fdomain_5fsize_5fwhen_5fencoding_5feq_5fneq_5fconstraints_6',['max_domain_size_when_encoding_eq_neq_constraints',['../classoperations__research_1_1sat_1_1_sat_parameters.html#ace8789134615e7fc516814ea2d6cb298',1,'operations_research::sat::SatParameters']]], ['max_5finteger_5frounding_5fscaling_7',['max_integer_rounding_scaling',['../classoperations__research_1_1sat_1_1_sat_parameters.html#ae352c86cc9b48791890dcb4ec8298a3f',1,'operations_research::sat::SatParameters']]], ['max_5flevel_8',['max_level',['../classoperations__research_1_1sat_1_1_reservoir_constraint_proto.html#aba8e67d3d14dc18b652336afedc8b6cb',1,'operations_research::sat::ReservoirConstraintProto']]], ['max_5fmemory_5fin_5fmb_9',['max_memory_in_mb',['../classoperations__research_1_1sat_1_1_sat_parameters.html#a08e515033ee46d88f95d904cd2d3df04',1,'operations_research::sat::SatParameters']]], ['max_5fnum_5fcuts_10',['max_num_cuts',['../classoperations__research_1_1sat_1_1_sat_parameters.html#a02cb4f1d298a0ae7da9aa224021a8d69',1,'operations_research::sat::SatParameters']]], ['max_5fnumber_5fof_5fconflicts_11',['max_number_of_conflicts',['../classoperations__research_1_1sat_1_1_sat_parameters.html#a7f4fe68894ba95a90abca4689403f403',1,'operations_research::sat::SatParameters']]], ['max_5fpresolve_5fiterations_12',['max_presolve_iterations',['../classoperations__research_1_1sat_1_1_sat_parameters.html#a71e54e4dbbbbb21ad190b77dccb7039e',1,'operations_research::sat::SatParameters']]], ['max_5fsat_5fassumption_5forder_13',['max_sat_assumption_order',['../classoperations__research_1_1sat_1_1_sat_parameters.html#a35c4fc852d59980d1a2fbe34b61b0f9d',1,'operations_research::sat::SatParameters']]], ['max_5fsat_5freverse_5fassumption_5forder_14',['max_sat_reverse_assumption_order',['../classoperations__research_1_1sat_1_1_sat_parameters.html#adf7c93a08b43e54870d77295dedd7496',1,'operations_research::sat::SatParameters']]], ['max_5fsat_5fstratification_15',['max_sat_stratification',['../classoperations__research_1_1sat_1_1_sat_parameters.html#a9479680f1c22d80a33b60eff204ae3d0',1,'operations_research::sat::SatParameters']]], ['max_5ftime_5fin_5fseconds_16',['max_time_in_seconds',['../classoperations__research_1_1sat_1_1_sat_parameters.html#ac1924f07faa4fdf4ca4e7f76813f7c2a',1,'operations_research::sat::SatParameters']]], ['max_5fvariable_5factivity_5fvalue_17',['max_variable_activity_value',['../classoperations__research_1_1sat_1_1_sat_parameters.html#a2dab8725b3fd2d30dc7ba633a2096ca0',1,'operations_research::sat::SatParameters']]], ['maximize_18',['maximize',['../classoperations__research_1_1sat_1_1_float_objective_proto.html#ad3c37b53f974ee5f215d410d93841d63',1,'operations_research::sat::FloatObjectiveProto']]], ['maximize_19',['Maximize',['../classoperations__research_1_1sat_1_1_cp_model_builder.html#a49f862c5400f04e70393acc6b78f096a',1,'operations_research::sat::CpModelBuilder::Maximize(const LinearExpr &amp;expr)'],['../classoperations__research_1_1sat_1_1_cp_model_builder.html#a5ccc3702e485c0bac752ae8cd49e5c7f',1,'operations_research::sat::CpModelBuilder::Maximize(const DoubleLinearExpr &amp;expr)']]], ['maxsatassumptionorder_20',['MaxSatAssumptionOrder',['../classoperations__research_1_1sat_1_1_sat_parameters.html#adab6e21f0c6178839a5f68049186c2d7',1,'operations_research::sat::SatParameters']]], ['maxsatassumptionorder_5farraysize_21',['MaxSatAssumptionOrder_ARRAYSIZE',['../classoperations__research_1_1sat_1_1_sat_parameters.html#a72bc2322f7efd5068f795165633bd2c4',1,'operations_research::sat::SatParameters']]], ['maxsatassumptionorder_5fdescriptor_22',['MaxSatAssumptionOrder_descriptor',['../classoperations__research_1_1sat_1_1_sat_parameters.html#aa776ae52b397c3276c3bd53d048c3151',1,'operations_research::sat::SatParameters']]], ['maxsatassumptionorder_5fisvalid_23',['MaxSatAssumptionOrder_IsValid',['../classoperations__research_1_1sat_1_1_sat_parameters.html#a3840bc82c39d8a47e8622c034dc95ba8',1,'operations_research::sat::SatParameters']]], ['maxsatassumptionorder_5fmax_24',['MaxSatAssumptionOrder_MAX',['../classoperations__research_1_1sat_1_1_sat_parameters.html#ae0d816e38294eddc77288d1eed6745ce',1,'operations_research::sat::SatParameters']]], ['maxsatassumptionorder_5fmin_25',['MaxSatAssumptionOrder_MIN',['../classoperations__research_1_1sat_1_1_sat_parameters.html#afeac6fbf7654b7953d5bfcebdbbdd71c',1,'operations_research::sat::SatParameters']]], ['maxsatassumptionorder_5fname_26',['MaxSatAssumptionOrder_Name',['../classoperations__research_1_1sat_1_1_sat_parameters.html#a6f19fc55d7bc89052a7aa9c59f431d08',1,'operations_research::sat::SatParameters']]], ['maxsatassumptionorder_5fparse_27',['MaxSatAssumptionOrder_Parse',['../classoperations__research_1_1sat_1_1_sat_parameters.html#a5d44771cdc50d007abef6776878825ae',1,'operations_research::sat::SatParameters']]], ['maxsatstratificationalgorithm_28',['MaxSatStratificationAlgorithm',['../classoperations__research_1_1sat_1_1_sat_parameters.html#a6aadcfcbd0c2faec5187a0b54877f7aa',1,'operations_research::sat::SatParameters']]], ['maxsatstratificationalgorithm_5farraysize_29',['MaxSatStratificationAlgorithm_ARRAYSIZE',['../classoperations__research_1_1sat_1_1_sat_parameters.html#ac4263528356a8d1ba896a8322c6e23b6',1,'operations_research::sat::SatParameters']]], ['maxsatstratificationalgorithm_5fdescriptor_30',['MaxSatStratificationAlgorithm_descriptor',['../classoperations__research_1_1sat_1_1_sat_parameters.html#aff18b88fde47779beba93e81a99c875f',1,'operations_research::sat::SatParameters']]], ['maxsatstratificationalgorithm_5fisvalid_31',['MaxSatStratificationAlgorithm_IsValid',['../classoperations__research_1_1sat_1_1_sat_parameters.html#a55fbc03b1dbc58c403993a33f4bfca4f',1,'operations_research::sat::SatParameters']]], ['maxsatstratificationalgorithm_5fmax_32',['MaxSatStratificationAlgorithm_MAX',['../classoperations__research_1_1sat_1_1_sat_parameters.html#aea023d6aa368c4408917c7b6d83d2df4',1,'operations_research::sat::SatParameters']]], ['maxsatstratificationalgorithm_5fmin_33',['MaxSatStratificationAlgorithm_MIN',['../classoperations__research_1_1sat_1_1_sat_parameters.html#a9f8900582a9472f4b1611177ae2c0969',1,'operations_research::sat::SatParameters']]], ['maxsatstratificationalgorithm_5fname_34',['MaxSatStratificationAlgorithm_Name',['../classoperations__research_1_1sat_1_1_sat_parameters.html#ade6c44509b3e7aefd37c89916ef96a25',1,'operations_research::sat::SatParameters']]], ['maxsatstratificationalgorithm_5fparse_35',['MaxSatStratificationAlgorithm_Parse',['../classoperations__research_1_1sat_1_1_sat_parameters.html#abcc933ed8e79c203a3fe74f40b55702d',1,'operations_research::sat::SatParameters']]], ['merge_5fat_5fmost_5fone_5fwork_5flimit_36',['merge_at_most_one_work_limit',['../classoperations__research_1_1sat_1_1_sat_parameters.html#a7c134ee6c0afa8afbeadedc61e98ac15',1,'operations_research::sat::SatParameters']]], ['merge_5fno_5foverlap_5fwork_5flimit_37',['merge_no_overlap_work_limit',['../classoperations__research_1_1sat_1_1_sat_parameters.html#a046bea353442c96ae6aecffca7920bf8',1,'operations_research::sat::SatParameters']]], ['mergefrom_38',['MergeFrom',['../classoperations__research_1_1sat_1_1_automaton_constraint_proto.html#a8f371549205219cad3f55fe215d015ba',1,'operations_research::sat::AutomatonConstraintProto::MergeFrom()'],['../classoperations__research_1_1sat_1_1_constraint_proto.html#a69824f773eebb2c77243c8ab98820e0a',1,'operations_research::sat::ConstraintProto::MergeFrom()'],['../classoperations__research_1_1sat_1_1_inverse_constraint_proto.html#a6785b6c031361b1f749028e05de7fd80',1,'operations_research::sat::InverseConstraintProto::MergeFrom()'],['../classoperations__research_1_1sat_1_1_list_of_variables_proto.html#a2e93421dc956bae7d30f9e758e0141b7',1,'operations_research::sat::ListOfVariablesProto::MergeFrom()'],['../classoperations__research_1_1sat_1_1_reservoir_constraint_proto.html#acfb191ce3f62bb9ae21a0cd457d3705c',1,'operations_research::sat::ReservoirConstraintProto::MergeFrom()'],['../classoperations__research_1_1sat_1_1_table_constraint_proto.html#ae73f3f984c041f1d66960624449aaa70',1,'operations_research::sat::TableConstraintProto::MergeFrom()'],['../classoperations__research_1_1sat_1_1_routes_constraint_proto.html#a69f4c57eae1c11adb2444d90463f0571',1,'operations_research::sat::RoutesConstraintProto::MergeFrom()'],['../classoperations__research_1_1sat_1_1_circuit_constraint_proto.html#abfeb49a1b1dac67ac45c861fbf81cdf5',1,'operations_research::sat::CircuitConstraintProto::MergeFrom()'],['../classoperations__research_1_1sat_1_1_cp_solver_solution.html#aa48119af1106ac23323b52218b9d8781',1,'operations_research::sat::CpSolverSolution::MergeFrom()'],['../classoperations__research_1_1sat_1_1_cp_objective_proto.html#a937e349ac7b09b42fc5d282d483929bb',1,'operations_research::sat::CpObjectiveProto::MergeFrom()'],['../classoperations__research_1_1sat_1_1_float_objective_proto.html#a63781cff8405dec0c427745986ee0848',1,'operations_research::sat::FloatObjectiveProto::MergeFrom()'],['../classoperations__research_1_1sat_1_1_decision_strategy_proto___affine_transformation.html#a2e3eb252ff48e6605df646f64554dfbf',1,'operations_research::sat::DecisionStrategyProto_AffineTransformation::MergeFrom()'],['../classoperations__research_1_1sat_1_1_decision_strategy_proto.html#ae25702c6b14d5a936f8bfbb97d0cc7a7',1,'operations_research::sat::DecisionStrategyProto::MergeFrom()'],['../classoperations__research_1_1sat_1_1_partial_variable_assignment.html#ab9a21db18e2dadc1d655fef4334934ed',1,'operations_research::sat::PartialVariableAssignment::MergeFrom()'],['../classoperations__research_1_1sat_1_1_sparse_permutation_proto.html#a5b93bf875ac281a1de843f9355deb1c5',1,'operations_research::sat::SparsePermutationProto::MergeFrom()'],['../classoperations__research_1_1sat_1_1_dense_matrix_proto.html#ab157ff39373ce37100e6419d09c5c75a',1,'operations_research::sat::DenseMatrixProto::MergeFrom()'],['../classoperations__research_1_1sat_1_1_symmetry_proto.html#aecf87fb1c6a6c5d08adae74c3c69b54f',1,'operations_research::sat::SymmetryProto::MergeFrom()'],['../classoperations__research_1_1sat_1_1_cp_model_proto.html#a1b32be5f13f5f5c845d1f202094d484e',1,'operations_research::sat::CpModelProto::MergeFrom()'],['../classoperations__research_1_1sat_1_1_no_overlap2_d_constraint_proto.html#af2194507b4f9ff190698c1accb6d1da5',1,'operations_research::sat::NoOverlap2DConstraintProto::MergeFrom()'],['../classoperations__research_1_1sat_1_1_sat_parameters.html#a122c6fed5cc7c29303d62f8885331c54',1,'operations_research::sat::SatParameters::MergeFrom()'],['../classoperations__research_1_1sat_1_1_cp_solver_response.html#a57587c56a7838d2087ab52ec446ed601',1,'operations_research::sat::CpSolverResponse::MergeFrom()'],['../classoperations__research_1_1sat_1_1_linear_boolean_constraint.html#ada512454ae4423756b5ce9138465f8a2',1,'operations_research::sat::LinearBooleanConstraint::MergeFrom()'],['../classoperations__research_1_1sat_1_1_linear_objective.html#aafe96bd700b42f36c213914e565a8751',1,'operations_research::sat::LinearObjective::MergeFrom()'],['../classoperations__research_1_1sat_1_1_boolean_assignment.html#a059a1e5ac01ec6434442f3f6708a1f23',1,'operations_research::sat::BooleanAssignment::MergeFrom()'],['../classoperations__research_1_1sat_1_1_linear_boolean_problem.html#a69885230b9f8de0b61117e6bcc86d9ec',1,'operations_research::sat::LinearBooleanProblem::MergeFrom()'],['../classoperations__research_1_1sat_1_1_integer_variable_proto.html#aefbe3921f029390f04331aa4a147b8ca',1,'operations_research::sat::IntegerVariableProto::MergeFrom()'],['../classoperations__research_1_1sat_1_1_bool_argument_proto.html#a2445bdbf85e975af2ffab7d9ceb9facc',1,'operations_research::sat::BoolArgumentProto::MergeFrom()'],['../classoperations__research_1_1sat_1_1_linear_expression_proto.html#a97d41a7e25e49a323be5582fdc9a64d2',1,'operations_research::sat::LinearExpressionProto::MergeFrom()'],['../classoperations__research_1_1sat_1_1_linear_argument_proto.html#a2dd405b699bee1701e1440ebd6331615',1,'operations_research::sat::LinearArgumentProto::MergeFrom()'],['../classoperations__research_1_1sat_1_1_all_different_constraint_proto.html#aefac19239a7e148079e79639ffd48864',1,'operations_research::sat::AllDifferentConstraintProto::MergeFrom()'],['../classoperations__research_1_1sat_1_1_linear_constraint_proto.html#a927d8f54e02d86b446fdaeed36915fb6',1,'operations_research::sat::LinearConstraintProto::MergeFrom()'],['../classoperations__research_1_1sat_1_1_element_constraint_proto.html#a14f4d6b07ae54c0f5c66c87a5ce9e421',1,'operations_research::sat::ElementConstraintProto::MergeFrom()'],['../classoperations__research_1_1sat_1_1_interval_constraint_proto.html#adeb761ce8b2b60b7cb566b3c412590e1',1,'operations_research::sat::IntervalConstraintProto::MergeFrom()'],['../classoperations__research_1_1sat_1_1_no_overlap_constraint_proto.html#a4803b9cfcbfec256e1e7416b599ca531',1,'operations_research::sat::NoOverlapConstraintProto::MergeFrom()'],['../classoperations__research_1_1sat_1_1_cumulative_constraint_proto.html#a54693f72c1f494b6abc5410e748afc11',1,'operations_research::sat::CumulativeConstraintProto::MergeFrom()']]], ['mergewithglobaltimelimit_39',['MergeWithGlobalTimeLimit',['../classoperations__research_1_1_time_limit.html#ad0cdf04d71ac4f14262eb4871041ddbd',1,'operations_research::TimeLimit']]], ['min_40',['Min',['../classoperations__research_1_1_domain.html#a8cf21a67f7d81a800ff912239bb2db64',1,'operations_research::Domain']]], ['min_5flevel_41',['min_level',['../classoperations__research_1_1sat_1_1_reservoir_constraint_proto.html#a5415e7d66ee0441fcce7a8447ba825ed',1,'operations_research::sat::ReservoirConstraintProto']]], ['min_5forthogonality_5ffor_5flp_5fconstraints_42',['min_orthogonality_for_lp_constraints',['../classoperations__research_1_1sat_1_1_sat_parameters.html#add63dd6e73c6013d27f122511639d9cd',1,'operations_research::sat::SatParameters']]], ['minimization_5falgorithm_43',['minimization_algorithm',['../classoperations__research_1_1sat_1_1_sat_parameters.html#ab8cb4b527de80227536d47c6a7bba8b8',1,'operations_research::sat::SatParameters']]], ['minimize_44',['Minimize',['../classoperations__research_1_1sat_1_1_cp_model_builder.html#a992e2e2fd31057ae895a5e1ee406c067',1,'operations_research::sat::CpModelBuilder::Minimize(const LinearExpr &amp;expr)'],['../classoperations__research_1_1sat_1_1_cp_model_builder.html#a31a1be3f2c7681803fa97c6b33c010db',1,'operations_research::sat::CpModelBuilder::Minimize(const DoubleLinearExpr &amp;expr)']]], ['minimize_5fcore_45',['minimize_core',['../classoperations__research_1_1sat_1_1_sat_parameters.html#a13b1e4908507488f6954c89d70522ff9',1,'operations_research::sat::SatParameters']]], ['minimize_5freduction_5fduring_5fpb_5fresolution_46',['minimize_reduction_during_pb_resolution',['../classoperations__research_1_1sat_1_1_sat_parameters.html#a5d7fc286ccee7f7aa9f1c09db943579a',1,'operations_research::sat::SatParameters']]], ['minimize_5fwith_5fpropagation_5fnum_5fdecisions_47',['minimize_with_propagation_num_decisions',['../classoperations__research_1_1sat_1_1_sat_parameters.html#aa37f37eb481a045741990ca4b5bb5e8f',1,'operations_research::sat::SatParameters']]], ['minimize_5fwith_5fpropagation_5frestart_5fperiod_48',['minimize_with_propagation_restart_period',['../classoperations__research_1_1sat_1_1_sat_parameters.html#abffa929ed6b1696a3875f3fac9f9a6be',1,'operations_research::sat::SatParameters']]], ['mip_5fautomatically_5fscale_5fvariables_49',['mip_automatically_scale_variables',['../classoperations__research_1_1sat_1_1_sat_parameters.html#a96c70bc19978156cbd18c0ffb2c4c480',1,'operations_research::sat::SatParameters']]], ['mip_5fcheck_5fprecision_50',['mip_check_precision',['../classoperations__research_1_1sat_1_1_sat_parameters.html#a189f7da98fc562957090a3c24e549909',1,'operations_research::sat::SatParameters']]], ['mip_5fcompute_5ftrue_5fobjective_5fbound_51',['mip_compute_true_objective_bound',['../classoperations__research_1_1sat_1_1_sat_parameters.html#a92b08e0ec1d70c95427921cc09289b5d',1,'operations_research::sat::SatParameters']]], ['mip_5fmax_5factivity_5fexponent_52',['mip_max_activity_exponent',['../classoperations__research_1_1sat_1_1_sat_parameters.html#a4af5af2c0c9696111ce1f08bca6240a1',1,'operations_research::sat::SatParameters']]], ['mip_5fmax_5fbound_53',['mip_max_bound',['../classoperations__research_1_1sat_1_1_sat_parameters.html#acacea4a8ea1bcb7601a0564fe006801d',1,'operations_research::sat::SatParameters']]], ['mip_5fmax_5fvalid_5fmagnitude_54',['mip_max_valid_magnitude',['../classoperations__research_1_1sat_1_1_sat_parameters.html#ae3de1052fe1e7fe72f8a05511fe2aead',1,'operations_research::sat::SatParameters']]], ['mip_5fvar_5fscaling_55',['mip_var_scaling',['../classoperations__research_1_1sat_1_1_sat_parameters.html#aac18146f4f893f9e0c61738edf3d4af2',1,'operations_research::sat::SatParameters']]], ['mip_5fwanted_5fprecision_56',['mip_wanted_precision',['../classoperations__research_1_1sat_1_1_sat_parameters.html#a3b48343e26eed9200efcffbdc71b359a',1,'operations_research::sat::SatParameters']]], ['model_57',['Model',['../classoperations__research_1_1sat_1_1_model.html#a30c57abda5ed227c85b50007cee876db',1,'operations_research::sat::Model::Model()'],['../classoperations__research_1_1sat_1_1_model.html#ad5efe7312ac548dfc3e91cff8c84b256',1,'operations_research::sat::Model::Model(std::string name)'],['../classoperations__research_1_1sat_1_1_model.html',1,'Model']]], ['model_2eh_58',['model.h',['../model_8h.html',1,'']]], ['model_5finvalid_59',['MODEL_INVALID',['../namespaceoperations__research_1_1sat.html#aedc4ddb96acc28481c09828d2e016815ae071e79c23f061c9dd00ee09519a0031',1,'operations_research::sat']]], ['multiplecircuitconstraint_60',['MultipleCircuitConstraint',['../classoperations__research_1_1sat_1_1_bool_var.html#afa8cb51258a0d98e6d5db2f60f8ceccc',1,'operations_research::sat::BoolVar::MultipleCircuitConstraint()'],['../classoperations__research_1_1sat_1_1_multiple_circuit_constraint.html',1,'MultipleCircuitConstraint']]], ['multiplicationby_61',['MultiplicationBy',['../classoperations__research_1_1_domain.html#a63a708c626b59b4504ddb879496c894e',1,'operations_research::Domain']]], ['mutable_62',['Mutable',['../classoperations__research_1_1sat_1_1_model.html#ad906471543194544f1e53c5d851887fb',1,'operations_research::sat::Model']]], ['mutable_5factive_5fliterals_63',['mutable_active_literals',['../classoperations__research_1_1sat_1_1_reservoir_constraint_proto.html#ab9196b66a004ab5c04c4a44b8a5e5980',1,'operations_research::sat::ReservoirConstraintProto']]], ['mutable_5fadditional_5fsolutions_64',['mutable_additional_solutions',['../classoperations__research_1_1sat_1_1_cp_solver_response.html#a89059530d92cef9ac13a5d758d68f775',1,'operations_research::sat::CpSolverResponse::mutable_additional_solutions()'],['../classoperations__research_1_1sat_1_1_cp_solver_response.html#aca0afef58d63e644bc8cbfd396a64f1e',1,'operations_research::sat::CpSolverResponse::mutable_additional_solutions(int index)']]], ['mutable_5fall_5fdiff_65',['mutable_all_diff',['../classoperations__research_1_1sat_1_1_constraint_proto.html#ab09d50ac461e6e8704ba908d99856594',1,'operations_research::sat::ConstraintProto']]], ['mutable_5fassignment_66',['mutable_assignment',['../classoperations__research_1_1sat_1_1_linear_boolean_problem.html#aac88a880e9f96107777560ac774b077b',1,'operations_research::sat::LinearBooleanProblem']]], ['mutable_5fassumptions_67',['mutable_assumptions',['../classoperations__research_1_1sat_1_1_cp_model_proto.html#a02f74145e2e5281f0cdd56d740be9900',1,'operations_research::sat::CpModelProto']]], ['mutable_5fat_5fmost_5fone_68',['mutable_at_most_one',['../classoperations__research_1_1sat_1_1_constraint_proto.html#a6e1fa0fa60a89c0f85f68b7921afaee5',1,'operations_research::sat::ConstraintProto']]], ['mutable_5fautomaton_69',['mutable_automaton',['../classoperations__research_1_1sat_1_1_constraint_proto.html#aaa9eaebae6a5a7411efb51e963a148a7',1,'operations_research::sat::ConstraintProto']]], ['mutable_5fbool_5fand_70',['mutable_bool_and',['../classoperations__research_1_1sat_1_1_constraint_proto.html#a962fe3316eafe5815027312585d5c4d6',1,'operations_research::sat::ConstraintProto']]], ['mutable_5fbool_5for_71',['mutable_bool_or',['../classoperations__research_1_1sat_1_1_constraint_proto.html#ae26e2a099b411b50dd1d4c6605837d0a',1,'operations_research::sat::ConstraintProto']]], ['mutable_5fbool_5fxor_72',['mutable_bool_xor',['../classoperations__research_1_1sat_1_1_constraint_proto.html#a1f26c1a4eb845384619ee06100dd7b36',1,'operations_research::sat::ConstraintProto']]], ['mutable_5fcapacity_73',['mutable_capacity',['../classoperations__research_1_1sat_1_1_cumulative_constraint_proto.html#a469012c9d6710a05af52288cdaedcd1a',1,'operations_research::sat::CumulativeConstraintProto']]], ['mutable_5fcircuit_74',['mutable_circuit',['../classoperations__research_1_1sat_1_1_constraint_proto.html#afb2a95cc82dcaea9767403477e9b3d0a',1,'operations_research::sat::ConstraintProto']]], ['mutable_5fcoefficients_75',['mutable_coefficients',['../classoperations__research_1_1sat_1_1_linear_objective.html#a5a95ed21eee34077d09c7ba95c00c885',1,'operations_research::sat::LinearObjective::mutable_coefficients()'],['../classoperations__research_1_1sat_1_1_linear_boolean_constraint.html#a5a95ed21eee34077d09c7ba95c00c885',1,'operations_research::sat::LinearBooleanConstraint::mutable_coefficients()']]], ['mutable_5fcoeffs_76',['mutable_coeffs',['../classoperations__research_1_1sat_1_1_linear_expression_proto.html#a185aece75e6d7a0a1d8e7499a7a50560',1,'operations_research::sat::LinearExpressionProto::mutable_coeffs()'],['../classoperations__research_1_1sat_1_1_float_objective_proto.html#a4f91aedd9f169bf07a92c10a3c5b3746',1,'operations_research::sat::FloatObjectiveProto::mutable_coeffs()'],['../classoperations__research_1_1sat_1_1_cp_objective_proto.html#a185aece75e6d7a0a1d8e7499a7a50560',1,'operations_research::sat::CpObjectiveProto::mutable_coeffs()'],['../classoperations__research_1_1sat_1_1_linear_constraint_proto.html#a185aece75e6d7a0a1d8e7499a7a50560',1,'operations_research::sat::LinearConstraintProto::mutable_coeffs()']]], ['mutable_5fconstraints_77',['mutable_constraints',['../classoperations__research_1_1sat_1_1_linear_boolean_problem.html#a05eb279096e545e00b296beca5c528e6',1,'operations_research::sat::LinearBooleanProblem::mutable_constraints()'],['../classoperations__research_1_1sat_1_1_cp_model_proto.html#abe92914c5557ab23f326cd8ee364fca4',1,'operations_research::sat::CpModelProto::mutable_constraints()'],['../classoperations__research_1_1sat_1_1_cp_model_proto.html#a9b3e1bc8b76ea7d2614fd7ec2b066039',1,'operations_research::sat::CpModelProto::mutable_constraints(int index)'],['../classoperations__research_1_1sat_1_1_linear_boolean_problem.html#af58d1b7cfcb457d5a4b32ff2a2128609',1,'operations_research::sat::LinearBooleanProblem::mutable_constraints()']]], ['mutable_5fcumulative_78',['mutable_cumulative',['../classoperations__research_1_1sat_1_1_constraint_proto.html#af38f28b635c417041188c1f4e309903b',1,'operations_research::sat::ConstraintProto']]], ['mutable_5fcycle_5fsizes_79',['mutable_cycle_sizes',['../classoperations__research_1_1sat_1_1_sparse_permutation_proto.html#a3b87b83a490ff0c6f878d6d575058c7e',1,'operations_research::sat::SparsePermutationProto']]], ['mutable_5fdefault_5frestart_5falgorithms_80',['mutable_default_restart_algorithms',['../classoperations__research_1_1sat_1_1_sat_parameters.html#aa6efd21115720f394e07890be47753ed',1,'operations_research::sat::SatParameters']]], ['mutable_5fdemands_81',['mutable_demands',['../classoperations__research_1_1sat_1_1_cumulative_constraint_proto.html#add43411df91db41e4c1b797ca8994a27',1,'operations_research::sat::CumulativeConstraintProto::mutable_demands()'],['../classoperations__research_1_1sat_1_1_routes_constraint_proto.html#aaf6d83f02d1d58a1de2f593e7df40652',1,'operations_research::sat::RoutesConstraintProto::mutable_demands()'],['../classoperations__research_1_1sat_1_1_cumulative_constraint_proto.html#a93dacd823f6bc2e0f274ebd2b1731f3b',1,'operations_research::sat::CumulativeConstraintProto::mutable_demands()']]], ['mutable_5fdomain_82',['mutable_domain',['../classoperations__research_1_1sat_1_1_integer_variable_proto.html#a217757362b8350b95d54050de6918624',1,'operations_research::sat::IntegerVariableProto::mutable_domain()'],['../classoperations__research_1_1sat_1_1_cp_objective_proto.html#a217757362b8350b95d54050de6918624',1,'operations_research::sat::CpObjectiveProto::mutable_domain()'],['../classoperations__research_1_1sat_1_1_linear_constraint_proto.html#a217757362b8350b95d54050de6918624',1,'operations_research::sat::LinearConstraintProto::mutable_domain()']]], ['mutable_5fdummy_5fconstraint_83',['mutable_dummy_constraint',['../classoperations__research_1_1sat_1_1_constraint_proto.html#a7bbb59c70c8551250f71d63d835f115b',1,'operations_research::sat::ConstraintProto']]], ['mutable_5felement_84',['mutable_element',['../classoperations__research_1_1sat_1_1_constraint_proto.html#a2563b062d2ed99c7b1f9bf8235b9e8fe',1,'operations_research::sat::ConstraintProto']]], ['mutable_5fend_85',['mutable_end',['../classoperations__research_1_1sat_1_1_interval_constraint_proto.html#a766f62f44f2e8b776e2b41fb3e0cce92',1,'operations_research::sat::IntervalConstraintProto']]], ['mutable_5fenforcement_5fliteral_86',['mutable_enforcement_literal',['../classoperations__research_1_1sat_1_1_constraint_proto.html#a89be1146e4b049716ff118ceff2b3634',1,'operations_research::sat::ConstraintProto']]], ['mutable_5fentries_87',['mutable_entries',['../classoperations__research_1_1sat_1_1_dense_matrix_proto.html#a34e6b11a6f197cedb487b4e82fd72eaf',1,'operations_research::sat::DenseMatrixProto']]], ['mutable_5fexactly_5fone_88',['mutable_exactly_one',['../classoperations__research_1_1sat_1_1_constraint_proto.html#ad5eff2987f39d596a4d7371961a92d42',1,'operations_research::sat::ConstraintProto']]], ['mutable_5fexprs_89',['mutable_exprs',['../classoperations__research_1_1sat_1_1_linear_argument_proto.html#ad8e7772ed539beea7744b5b5afe4eb77',1,'operations_research::sat::LinearArgumentProto::mutable_exprs()'],['../classoperations__research_1_1sat_1_1_all_different_constraint_proto.html#a1f3174b247b44f9df0a2f9c5b4f7e6b6',1,'operations_research::sat::AllDifferentConstraintProto::mutable_exprs()'],['../classoperations__research_1_1sat_1_1_all_different_constraint_proto.html#ad8e7772ed539beea7744b5b5afe4eb77',1,'operations_research::sat::AllDifferentConstraintProto::mutable_exprs(int index)'],['../classoperations__research_1_1sat_1_1_linear_argument_proto.html#a1f3174b247b44f9df0a2f9c5b4f7e6b6',1,'operations_research::sat::LinearArgumentProto::mutable_exprs()']]], ['mutable_5ff_5fdirect_90',['mutable_f_direct',['../classoperations__research_1_1sat_1_1_inverse_constraint_proto.html#a5f53147bb17bdff4024e496b30704753',1,'operations_research::sat::InverseConstraintProto']]], ['mutable_5ff_5finverse_91',['mutable_f_inverse',['../classoperations__research_1_1sat_1_1_inverse_constraint_proto.html#acd46cc94bede1058b63640b4ee057013',1,'operations_research::sat::InverseConstraintProto']]], ['mutable_5ffinal_5fstates_92',['mutable_final_states',['../classoperations__research_1_1sat_1_1_automaton_constraint_proto.html#a67c147e08f33bcc007a844f317570b85',1,'operations_research::sat::AutomatonConstraintProto']]], ['mutable_5ffloating_5fpoint_5fobjective_93',['mutable_floating_point_objective',['../classoperations__research_1_1sat_1_1_cp_model_proto.html#a0f31435a47a2e3318ff644e9798cb8f5',1,'operations_research::sat::CpModelProto']]], ['mutable_5fheads_94',['mutable_heads',['../classoperations__research_1_1sat_1_1_circuit_constraint_proto.html#a62eea3140267410e56cbd49212110779',1,'operations_research::sat::CircuitConstraintProto::mutable_heads()'],['../classoperations__research_1_1sat_1_1_routes_constraint_proto.html#a62eea3140267410e56cbd49212110779',1,'operations_research::sat::RoutesConstraintProto::mutable_heads()']]], ['mutable_5fint_5fdiv_95',['mutable_int_div',['../classoperations__research_1_1sat_1_1_constraint_proto.html#aa720ce3d68f96025f608a52a1e761737',1,'operations_research::sat::ConstraintProto']]], ['mutable_5fint_5fmod_96',['mutable_int_mod',['../classoperations__research_1_1sat_1_1_constraint_proto.html#aa91cd2a601e01dd99c73179894464bb4',1,'operations_research::sat::ConstraintProto']]], ['mutable_5fint_5fprod_97',['mutable_int_prod',['../classoperations__research_1_1sat_1_1_constraint_proto.html#a52dc598c13a3becce29a5bf1efe8d0df',1,'operations_research::sat::ConstraintProto']]], ['mutable_5finteger_5fobjective_98',['mutable_integer_objective',['../classoperations__research_1_1sat_1_1_cp_solver_response.html#a185bb87cb72271a2458d742f8fea4698',1,'operations_research::sat::CpSolverResponse']]], ['mutable_5finterval_99',['mutable_interval',['../classoperations__research_1_1sat_1_1_constraint_proto.html#a0c6e505a600b075354ca4c9f9a08c4d0',1,'operations_research::sat::ConstraintProto']]], ['mutable_5fintervals_100',['mutable_intervals',['../classoperations__research_1_1sat_1_1_no_overlap_constraint_proto.html#a83c84be6ca585b1d85b84984b5849588',1,'operations_research::sat::NoOverlapConstraintProto::mutable_intervals()'],['../classoperations__research_1_1sat_1_1_cumulative_constraint_proto.html#a83c84be6ca585b1d85b84984b5849588',1,'operations_research::sat::CumulativeConstraintProto::mutable_intervals()']]], ['mutable_5finverse_101',['mutable_inverse',['../classoperations__research_1_1sat_1_1_constraint_proto.html#ae9743a1dc1f3e9a262952ac4dc2423f0',1,'operations_research::sat::ConstraintProto']]], ['mutable_5flevel_5fchanges_102',['mutable_level_changes',['../classoperations__research_1_1sat_1_1_reservoir_constraint_proto.html#ae0752ac97a102106e554990ffa4f1029',1,'operations_research::sat::ReservoirConstraintProto']]], ['mutable_5flin_5fmax_103',['mutable_lin_max',['../classoperations__research_1_1sat_1_1_constraint_proto.html#a0f24a42c6dc89afa2bec54995ae55743',1,'operations_research::sat::ConstraintProto']]], ['mutable_5flinear_104',['mutable_linear',['../classoperations__research_1_1sat_1_1_constraint_proto.html#ad653c55b371ae98444295965c6622ddb',1,'operations_research::sat::ConstraintProto']]], ['mutable_5fliterals_105',['mutable_literals',['../classoperations__research_1_1sat_1_1_linear_boolean_constraint.html#a201011b665c31f3f6f333c5b67658460',1,'operations_research::sat::LinearBooleanConstraint::mutable_literals()'],['../classoperations__research_1_1sat_1_1_linear_objective.html#a201011b665c31f3f6f333c5b67658460',1,'operations_research::sat::LinearObjective::mutable_literals()'],['../classoperations__research_1_1sat_1_1_boolean_assignment.html#a201011b665c31f3f6f333c5b67658460',1,'operations_research::sat::BooleanAssignment::mutable_literals()'],['../classoperations__research_1_1sat_1_1_bool_argument_proto.html#a201011b665c31f3f6f333c5b67658460',1,'operations_research::sat::BoolArgumentProto::mutable_literals()'],['../classoperations__research_1_1sat_1_1_circuit_constraint_proto.html#a201011b665c31f3f6f333c5b67658460',1,'operations_research::sat::CircuitConstraintProto::mutable_literals()'],['../classoperations__research_1_1sat_1_1_routes_constraint_proto.html#a201011b665c31f3f6f333c5b67658460',1,'operations_research::sat::RoutesConstraintProto::mutable_literals()']]], ['mutable_5flog_5fprefix_106',['mutable_log_prefix',['../classoperations__research_1_1sat_1_1_sat_parameters.html#a8ca46c24f6fc960c54285dffe5c5bdd1',1,'operations_research::sat::SatParameters']]], ['mutable_5fname_107',['mutable_name',['../classoperations__research_1_1sat_1_1_linear_boolean_constraint.html#ace44da4c185dad99876bf01c7ea74c07',1,'operations_research::sat::LinearBooleanConstraint::mutable_name()'],['../classoperations__research_1_1sat_1_1_linear_boolean_problem.html#ace44da4c185dad99876bf01c7ea74c07',1,'operations_research::sat::LinearBooleanProblem::mutable_name()'],['../classoperations__research_1_1sat_1_1_integer_variable_proto.html#ace44da4c185dad99876bf01c7ea74c07',1,'operations_research::sat::IntegerVariableProto::mutable_name()'],['../classoperations__research_1_1sat_1_1_constraint_proto.html#ace44da4c185dad99876bf01c7ea74c07',1,'operations_research::sat::ConstraintProto::mutable_name()'],['../classoperations__research_1_1sat_1_1_cp_model_proto.html#ace44da4c185dad99876bf01c7ea74c07',1,'operations_research::sat::CpModelProto::mutable_name()'],['../classoperations__research_1_1sat_1_1_sat_parameters.html#ace44da4c185dad99876bf01c7ea74c07',1,'operations_research::sat::SatParameters::mutable_name()']]], ['mutable_5fno_5foverlap_108',['mutable_no_overlap',['../classoperations__research_1_1sat_1_1_constraint_proto.html#a5e1ab39de2f5594036bacb1d1e803bbc',1,'operations_research::sat::ConstraintProto']]], ['mutable_5fno_5foverlap_5f2d_109',['mutable_no_overlap_2d',['../classoperations__research_1_1sat_1_1_constraint_proto.html#a17e451dbcd12f2170f8c8e9417ea8119',1,'operations_research::sat::ConstraintProto']]], ['mutable_5fobjective_110',['mutable_objective',['../classoperations__research_1_1sat_1_1_linear_boolean_problem.html#ae9827e8df25379290d5db3127d9f94d5',1,'operations_research::sat::LinearBooleanProblem::mutable_objective()'],['../classoperations__research_1_1sat_1_1_cp_model_proto.html#ad3badc7aa3d94e81e0126edbfa452fda',1,'operations_research::sat::CpModelProto::mutable_objective()']]], ['mutable_5forbitopes_111',['mutable_orbitopes',['../classoperations__research_1_1sat_1_1_symmetry_proto.html#a520248c97c2b907a15dab028b3d24b9d',1,'operations_research::sat::SymmetryProto::mutable_orbitopes(int index)'],['../classoperations__research_1_1sat_1_1_symmetry_proto.html#aed40b8219b4bd0b1dccd453eed153fc2',1,'operations_research::sat::SymmetryProto::mutable_orbitopes()']]], ['mutable_5fpermutations_112',['mutable_permutations',['../classoperations__research_1_1sat_1_1_symmetry_proto.html#aaa5e0285019297f7356c4c6f1607fcc5',1,'operations_research::sat::SymmetryProto::mutable_permutations(int index)'],['../classoperations__research_1_1sat_1_1_symmetry_proto.html#a406fe99a9e8a5c19ef37ba2852b9f520',1,'operations_research::sat::SymmetryProto::mutable_permutations()']]], ['mutable_5freservoir_113',['mutable_reservoir',['../classoperations__research_1_1sat_1_1_constraint_proto.html#afe9d0af445012038cad6115078089949',1,'operations_research::sat::ConstraintProto']]], ['mutable_5frestart_5falgorithms_114',['mutable_restart_algorithms',['../classoperations__research_1_1sat_1_1_sat_parameters.html#ac3eb6cdd62f6b816aef422b14b9b3d32',1,'operations_research::sat::SatParameters']]], ['mutable_5froutes_115',['mutable_routes',['../classoperations__research_1_1sat_1_1_constraint_proto.html#a2fcde0ee58f56a1b603f8eb7d474b530',1,'operations_research::sat::ConstraintProto']]], ['mutable_5fsearch_5fstrategy_116',['mutable_search_strategy',['../classoperations__research_1_1sat_1_1_cp_model_proto.html#a40a4b138f2c2868e312e489fabb55ea5',1,'operations_research::sat::CpModelProto::mutable_search_strategy(int index)'],['../classoperations__research_1_1sat_1_1_cp_model_proto.html#ad47a1051e7875d10944e9d6ee432629c',1,'operations_research::sat::CpModelProto::mutable_search_strategy()']]], ['mutable_5fsize_117',['mutable_size',['../classoperations__research_1_1sat_1_1_interval_constraint_proto.html#aca165a493df35a1ccff8ced0f8889cb8',1,'operations_research::sat::IntervalConstraintProto']]], ['mutable_5fsolution_118',['mutable_solution',['../classoperations__research_1_1sat_1_1_cp_solver_response.html#ac63f11a26e1bfac3b2b82c9f8815b80e',1,'operations_research::sat::CpSolverResponse']]], ['mutable_5fsolution_5fhint_119',['mutable_solution_hint',['../classoperations__research_1_1sat_1_1_cp_model_proto.html#a85679cbc9afd0c101f59b8b8c4c7207e',1,'operations_research::sat::CpModelProto']]], ['mutable_5fsolution_5finfo_120',['mutable_solution_info',['../classoperations__research_1_1sat_1_1_cp_solver_response.html#a61a5ea2fc11ec3a5593f645546be705e',1,'operations_research::sat::CpSolverResponse']]], ['mutable_5fsolve_5flog_121',['mutable_solve_log',['../classoperations__research_1_1sat_1_1_cp_solver_response.html#ad44e38061979bc29d095f970c5c205e1',1,'operations_research::sat::CpSolverResponse']]], ['mutable_5fstart_122',['mutable_start',['../classoperations__research_1_1sat_1_1_interval_constraint_proto.html#a2f02395a4cc7af9a90249b324925d4f0',1,'operations_research::sat::IntervalConstraintProto']]], ['mutable_5fsufficient_5fassumptions_5ffor_5finfeasibility_123',['mutable_sufficient_assumptions_for_infeasibility',['../classoperations__research_1_1sat_1_1_cp_solver_response.html#a204f74eb50559108c49edfb954d9ff0f',1,'operations_research::sat::CpSolverResponse']]], ['mutable_5fsupport_124',['mutable_support',['../classoperations__research_1_1sat_1_1_sparse_permutation_proto.html#ab6b2fee9a10fabbd92999fd6f4f2854b',1,'operations_research::sat::SparsePermutationProto']]], ['mutable_5fsymmetry_125',['mutable_symmetry',['../classoperations__research_1_1sat_1_1_cp_model_proto.html#aab5bc3d15f4c841dce3d93f70ecdd07e',1,'operations_research::sat::CpModelProto']]], ['mutable_5ftable_126',['mutable_table',['../classoperations__research_1_1sat_1_1_constraint_proto.html#a199bf5f173fa27a9b4cc1b609c1150e4',1,'operations_research::sat::ConstraintProto']]], ['mutable_5ftails_127',['mutable_tails',['../classoperations__research_1_1sat_1_1_circuit_constraint_proto.html#affba254b08536b6cedf3b068adb82022',1,'operations_research::sat::CircuitConstraintProto::mutable_tails()'],['../classoperations__research_1_1sat_1_1_routes_constraint_proto.html#affba254b08536b6cedf3b068adb82022',1,'operations_research::sat::RoutesConstraintProto::mutable_tails()']]], ['mutable_5ftarget_128',['mutable_target',['../classoperations__research_1_1sat_1_1_linear_argument_proto.html#ad6d9a98867dfe16463b13b5487db9e23',1,'operations_research::sat::LinearArgumentProto']]], ['mutable_5ftightened_5fvariables_129',['mutable_tightened_variables',['../classoperations__research_1_1sat_1_1_cp_solver_response.html#a94b3d452e4ce029252e3d1711b95abb8',1,'operations_research::sat::CpSolverResponse::mutable_tightened_variables(int index)'],['../classoperations__research_1_1sat_1_1_cp_solver_response.html#a9280b60e3851c8b26bbd58f3f14f5c0f',1,'operations_research::sat::CpSolverResponse::mutable_tightened_variables()']]], ['mutable_5ftime_5fexprs_130',['mutable_time_exprs',['../classoperations__research_1_1sat_1_1_reservoir_constraint_proto.html#a83b57c327bcca42717f8352ce062cb38',1,'operations_research::sat::ReservoirConstraintProto::mutable_time_exprs(int index)'],['../classoperations__research_1_1sat_1_1_reservoir_constraint_proto.html#a32b7904e383ddadf230d2bdb20284ed2',1,'operations_research::sat::ReservoirConstraintProto::mutable_time_exprs()']]], ['mutable_5ftransformations_131',['mutable_transformations',['../classoperations__research_1_1sat_1_1_decision_strategy_proto.html#a6d96f705f1c62e7c1bbab103a7266687',1,'operations_research::sat::DecisionStrategyProto::mutable_transformations(int index)'],['../classoperations__research_1_1sat_1_1_decision_strategy_proto.html#a8207d6858afcd9a6f7d3e33c8fce0b8d',1,'operations_research::sat::DecisionStrategyProto::mutable_transformations()']]], ['mutable_5ftransition_5fhead_132',['mutable_transition_head',['../classoperations__research_1_1sat_1_1_automaton_constraint_proto.html#ad86c5a3bf90e1dd31377535bdab3e15c',1,'operations_research::sat::AutomatonConstraintProto']]], ['mutable_5ftransition_5flabel_133',['mutable_transition_label',['../classoperations__research_1_1sat_1_1_automaton_constraint_proto.html#ab001761114d67b208e22b9f80197b796',1,'operations_research::sat::AutomatonConstraintProto']]], ['mutable_5ftransition_5ftail_134',['mutable_transition_tail',['../classoperations__research_1_1sat_1_1_automaton_constraint_proto.html#a022d31abe02758022dadc5e388d72c6a',1,'operations_research::sat::AutomatonConstraintProto']]], ['mutable_5funknown_5ffields_135',['mutable_unknown_fields',['../classoperations__research_1_1sat_1_1_linear_boolean_constraint.html#adba85973c346977bba2d980338bd1ab4',1,'operations_research::sat::LinearBooleanConstraint::mutable_unknown_fields()'],['../classoperations__research_1_1sat_1_1_linear_objective.html#adba85973c346977bba2d980338bd1ab4',1,'operations_research::sat::LinearObjective::mutable_unknown_fields()'],['../classoperations__research_1_1sat_1_1_boolean_assignment.html#adba85973c346977bba2d980338bd1ab4',1,'operations_research::sat::BooleanAssignment::mutable_unknown_fields()'],['../classoperations__research_1_1sat_1_1_linear_boolean_problem.html#adba85973c346977bba2d980338bd1ab4',1,'operations_research::sat::LinearBooleanProblem::mutable_unknown_fields()'],['../classoperations__research_1_1sat_1_1_sat_parameters.html#adba85973c346977bba2d980338bd1ab4',1,'operations_research::sat::SatParameters::mutable_unknown_fields()']]], ['mutable_5fvalues_136',['mutable_values',['../classoperations__research_1_1sat_1_1_table_constraint_proto.html#a7c2c6ab41a6d834d559de03cfe6dd009',1,'operations_research::sat::TableConstraintProto::mutable_values()'],['../classoperations__research_1_1sat_1_1_partial_variable_assignment.html#a7c2c6ab41a6d834d559de03cfe6dd009',1,'operations_research::sat::PartialVariableAssignment::mutable_values()'],['../classoperations__research_1_1sat_1_1_cp_solver_solution.html#a7c2c6ab41a6d834d559de03cfe6dd009',1,'operations_research::sat::CpSolverSolution::mutable_values()']]], ['mutable_5fvar_5fnames_137',['mutable_var_names',['../classoperations__research_1_1sat_1_1_linear_boolean_problem.html#a21a5c856dce893e9e0f430aab3b09628',1,'operations_research::sat::LinearBooleanProblem::mutable_var_names(int index)'],['../classoperations__research_1_1sat_1_1_linear_boolean_problem.html#aa7c941c7cde0c1463f40f7359e662368',1,'operations_research::sat::LinearBooleanProblem::mutable_var_names()']]], ['mutable_5fvariables_138',['mutable_variables',['../classoperations__research_1_1sat_1_1_decision_strategy_proto.html#a1aca68136da116d5f84a262bb49b6390',1,'operations_research::sat::DecisionStrategyProto::mutable_variables()'],['../classoperations__research_1_1sat_1_1_cp_model_proto.html#ab9746c6070379e1990d2fd2da7586398',1,'operations_research::sat::CpModelProto::mutable_variables(int index)'],['../classoperations__research_1_1sat_1_1_cp_model_proto.html#a8fed3469d043cdff0fe8d389390185b8',1,'operations_research::sat::CpModelProto::mutable_variables()']]], ['mutable_5fvars_139',['mutable_vars',['../classoperations__research_1_1sat_1_1_linear_expression_proto.html#a903f6ead1087d8433f23518e29c4405c',1,'operations_research::sat::LinearExpressionProto::mutable_vars()'],['../classoperations__research_1_1sat_1_1_linear_constraint_proto.html#a903f6ead1087d8433f23518e29c4405c',1,'operations_research::sat::LinearConstraintProto::mutable_vars()'],['../classoperations__research_1_1sat_1_1_element_constraint_proto.html#a903f6ead1087d8433f23518e29c4405c',1,'operations_research::sat::ElementConstraintProto::mutable_vars()'],['../classoperations__research_1_1sat_1_1_table_constraint_proto.html#a903f6ead1087d8433f23518e29c4405c',1,'operations_research::sat::TableConstraintProto::mutable_vars()'],['../classoperations__research_1_1sat_1_1_automaton_constraint_proto.html#a903f6ead1087d8433f23518e29c4405c',1,'operations_research::sat::AutomatonConstraintProto::mutable_vars()'],['../classoperations__research_1_1sat_1_1_list_of_variables_proto.html#a903f6ead1087d8433f23518e29c4405c',1,'operations_research::sat::ListOfVariablesProto::mutable_vars()'],['../classoperations__research_1_1sat_1_1_cp_objective_proto.html#a903f6ead1087d8433f23518e29c4405c',1,'operations_research::sat::CpObjectiveProto::mutable_vars()'],['../classoperations__research_1_1sat_1_1_float_objective_proto.html#a903f6ead1087d8433f23518e29c4405c',1,'operations_research::sat::FloatObjectiveProto::mutable_vars()'],['../classoperations__research_1_1sat_1_1_partial_variable_assignment.html#a903f6ead1087d8433f23518e29c4405c',1,'operations_research::sat::PartialVariableAssignment::mutable_vars()']]], ['mutable_5fx_5fintervals_140',['mutable_x_intervals',['../classoperations__research_1_1sat_1_1_no_overlap2_d_constraint_proto.html#a292cb7db0eef7c0f72997a4621a3dd38',1,'operations_research::sat::NoOverlap2DConstraintProto']]], ['mutable_5fy_5fintervals_141',['mutable_y_intervals',['../classoperations__research_1_1sat_1_1_no_overlap2_d_constraint_proto.html#a2717801eed8e42c97a5694df8e72b3c1',1,'operations_research::sat::NoOverlap2DConstraintProto']]], ['mutableproto_142',['MutableProto',['../classoperations__research_1_1sat_1_1_constraint.html#a5e82f974e671d3d579d12101717b810c',1,'operations_research::sat::Constraint::MutableProto()'],['../classoperations__research_1_1sat_1_1_cp_model_builder.html#a9a064a54dbbe3289ba6919b6cddaf813',1,'operations_research::sat::CpModelBuilder::MutableProto()']]] ];
314.204082
6,024
0.857495
9484145123a0a035caeae48d8537356624061b58
166
js
JavaScript
users/node_modules/ret/lib/types.js
CeroDosUno/mongoDBMaster
d380a656d41cb475ec3a69439c3c11eb108b3015
[ "Apache-2.0" ]
8,375
2018-05-11T17:33:43.000Z
2022-03-31T07:49:48.000Z
users/node_modules/ret/lib/types.js
CeroDosUno/mongoDBMaster
d380a656d41cb475ec3a69439c3c11eb108b3015
[ "Apache-2.0" ]
4,454
2018-05-18T21:01:16.000Z
2022-03-31T23:53:17.000Z
users/node_modules/ret/lib/types.js
CeroDosUno/mongoDBMaster
d380a656d41cb475ec3a69439c3c11eb108b3015
[ "Apache-2.0" ]
1,988
2018-05-11T20:07:45.000Z
2022-03-31T22:03:36.000Z
module.exports = { ROOT : 0, GROUP : 1, POSITION : 2, SET : 3, RANGE : 4, REPETITION : 5, REFERENCE : 6, CHAR : 7, };
15.090909
18
0.415663
94842014bdca486e218b58fb37a28d09163e4017
585
js
JavaScript
models/analystMessage.js
sunNode/JGBAPP
f9e72ec5d0b30813b08c980e15441a6393e7abf7
[ "MIT" ]
10
2016-12-23T07:42:25.000Z
2017-01-07T16:15:57.000Z
models/analystMessage.js
sunNode/JGBAPP
f9e72ec5d0b30813b08c980e15441a6393e7abf7
[ "MIT" ]
2
2017-06-24T16:09:47.000Z
2017-09-06T15:34:49.000Z
models/analystMessage.js
SensitiveMix/JGBAPP
f9e72ec5d0b30813b08c980e15441a6393e7abf7
[ "MIT" ]
null
null
null
var mongoose = require('mongoose') var Schema = mongoose.Schema, ObjectId = Schema.ObjectId var AnalystMessage = new Schema({ content: String, creator: { _id: ObjectId, email: String, name: String, nick_name:String, avatarUrl: String, mobile:String, level:String, level_name:String, belong_analyst:ObjectId, belong_analyst_name:String }, room_id:String, message_id: ObjectId, createAt:{type: Date, default: Date.now} }) module.exports =AnalystMessage
23.4
45
0.603419
948606d49ff60978fd22a113f66ad596d02e2fd3
2,327
js
JavaScript
scripts/publish-extension.js
apauna/moonlet
ebc9e966d8a7420df3ed6544735fcf297ccffde5
[ "MIT" ]
20
2018-08-09T09:13:15.000Z
2020-06-04T06:06:23.000Z
scripts/publish-extension.js
apauna/moonlet
ebc9e966d8a7420df3ed6544735fcf297ccffde5
[ "MIT" ]
160
2018-08-14T08:34:14.000Z
2019-07-22T06:20:02.000Z
scripts/publish-extension.js
apauna/moonlet
ebc9e966d8a7420df3ed6544735fcf297ccffde5
[ "MIT" ]
4
2019-03-13T22:47:04.000Z
2019-11-25T17:04:04.000Z
const zipFolder = require('zip-folder'); const resolve = require('path').resolve; const fs = require('fs'); const SOURCE_FOLDER = resolve(__dirname, '../build/extension'); const ZIP_FILE_NAME = resolve(__dirname, '../build/extension.zip'); const REFRESH_TOKEN = process.env.REFRESH_TOKEN; const EXTENSION_ID = process.env.EXTENSION_ID; const CLIENT_SECRET = process.env.CLIENT_SECRET; const CLIENT_ID = process.env.CLIENT_ID; const webStore = require('chrome-webstore-upload')({ extensionId: EXTENSION_ID, clientId: CLIENT_ID, clientSecret: CLIENT_SECRET, refreshToken: REFRESH_TOKEN }); const manifest = require(resolve(__dirname, '../build/extension/manifest.json')); if (process.env.TRAVIS_BUILD_NUMBER) { const ver = manifest.version.split('.'); manifest.version = `${ver[0]}.${ver[1]}.${process.env.TRAVIS_BUILD_NUMBER}`; fs.writeFileSync( resolve(__dirname, '../build/extension/manifest.json'), JSON.stringify(manifest) ); } zipFolder(SOURCE_FOLDER, ZIP_FILE_NAME, function(err) { if (err) { console.log('oh no! ', err); } else { console.log(`Successfully zipped the ${SOURCE_FOLDER} directory as ${ZIP_FILE_NAME}`); // will be invoking upload process console.log(`Uploading the new version (${manifest.version})...`); upload(ZIP_FILE_NAME); } }); function upload(zipName) { const extensionSource = fs.createReadStream(zipName); webStore .uploadExisting(extensionSource) .then(res => { if (res.uploadState !== 'SUCCESS') { console.log(`Error while uploading ZIP:`, res.itemError); return process.exit(1); } console.log('Successfully uploaded the ZIP'); console.log('Publishing the new version'); publish(); }) .catch(error => { console.log(`Error while uploading ZIP: ${error}`); process.exit(1); }); } function publish() { // publish the uploaded zip webStore .publish('default') .then(res => { console.log('Successfully published the newer version'); }) .catch(error => { console.log(`Error while publishing uploaded extension: ${error}`); process.exit(1); }); }
31.876712
94
0.626558
94863eb63a7a69a9a0777b87d9ab73e2bc3646f8
3,938
js
JavaScript
client/components/menu.js
gkweb/traintraingo
a9835916cf6fce205d993b5346e5c0cd9cb6b37d
[ "MIT" ]
3
2019-05-13T10:45:13.000Z
2019-11-29T01:47:15.000Z
client/components/menu.js
gkweb/traintraingo
a9835916cf6fce205d993b5346e5c0cd9cb6b37d
[ "MIT" ]
7
2021-03-09T02:45:55.000Z
2022-01-22T04:32:09.000Z
client/components/menu.js
gkweb/traintraingo
a9835916cf6fce205d993b5346e5c0cd9cb6b37d
[ "MIT" ]
null
null
null
import { Component } from 'react' import styled from 'styled-components' import { MenuIcon, CloseIcon } from './icon' import { themes, ThemeManagementContext } from './../lib/theme' const MenuTitleElem = styled.h2` font-size: 1em; margin: 0 0 0.5rem; font-weight: normal; color: ${props => props.theme.primary}; ` const MenuTitleSubElem = styled.h3` font-size: 1em; margin: 0 0 0.5rem; font-weight: normal; color: ${props => props.theme.primary}; ` const MenuContainerOverlayElem = styled.div` position: fixed; top: 0; right: 15em; bottom: 0; left: 0; z-index: 299; ` const MenuContainerElem = styled.div` padding: 1em; position: fixed; top: 0; right: 0; width: 75%; max-width: 15em; height: 100%; overflow-y: auto; z-index: 300; background-color: ${props => props.theme.primaryBg}; box-shadow: -0.0625em 0.125em 0.5em -0.125em rgba(0, 0, 0, 0.125); ` const MenuNavElem = styled.nav`` const MenuToggleElem = styled.button` display: block; padding: 0.5em; width: 1.5em; background: none; padding: 0; border: 0; color: ${props => props.theme.secondary}; ${props => (props.alignRight === true ? 'margin-left: auto;' : null)} ` const MenuToggle = ({ onClick, isOpen, alignRight }) => ( <MenuToggleElem onClick={onClick} alignRight={alignRight}> {isOpen ? <CloseIcon /> : <MenuIcon />} </MenuToggleElem> ) const ThemeToggleElem = styled.button` display: inline-block; background: none; border: 0; width: 20px; /* IOS Safari only like px here :( */ height: 20px; background: linear-gradient( 45deg, ${props => props.bgColor}, ${props => props.bgColor} 60%, ${props => props.borderColor} 61%, ${props => props.borderColor} 100% ); border: 1px solid ${props => props.theme.primary}; border-radius: 50%; text-indent: -999em; margin-right: 0.5em; position: relative; &:after { content: ' '; display: block; top: -3px; left: -3px; bottom: -3px; right: -3px; position: absolute; border-radius: 50%; ${props => props.isActive === true ? `border: 1px solid ${props.theme.primary};` : null} } ` class Menu extends Component { constructor() { super() this.state = { isOpen: false, } } render() { return ( <> <MenuToggle isOpen={this.state.isOpen} onClick={() => this.setState(prevState => ({ ...prevState, isOpen: !prevState.isOpen, })) } /> {this.state.isOpen ? ( <MenuContainerElem> <MenuContainerOverlayElem onClick={() => this.setState({ isOpen: false })} /> <MenuNavElem> <MenuToggle alignRight={true} isOpen={this.state.isOpen} onClick={() => this.setState(prevState => ({ ...prevState, isOpen: !prevState.isOpen, })) } /> <MenuTitleElem>Settings</MenuTitleElem> <ThemeManagementContext.Consumer> {context => ( <> {Object.keys(themes).map((val, index) => ( <ThemeToggleElem key={index} bgColor={themes[val].values.primaryBg} borderColor={themes[val].values.primary} isActive={context.activeTheme === val} onClick={() => context.updateTheme(themes[val])} aria-label={`${val} theme`} /> ))} </> )} </ThemeManagementContext.Consumer> </MenuNavElem> </MenuContainerElem> ) : null} </> ) } } export default Menu
24.6125
72
0.528695
948759665066ecb8253a560a5e7ce61ee09986c9
981
js
JavaScript
front/src/app/routes/AuthenticationRoutes.js
saylaan/IoT-socket.io_Dashboard_2022
01dd160ffb71f548e3e701d11a26a7cc3186019b
[ "MIT" ]
null
null
null
front/src/app/routes/AuthenticationRoutes.js
saylaan/IoT-socket.io_Dashboard_2022
01dd160ffb71f548e3e701d11a26a7cc3186019b
[ "MIT" ]
null
null
null
front/src/app/routes/AuthenticationRoutes.js
saylaan/IoT-socket.io_Dashboard_2022
01dd160ffb71f548e3e701d11a26a7cc3186019b
[ "MIT" ]
null
null
null
import { Navigate, useRoutes } from 'react-router-dom'; import { lazy } from 'react'; /* ------------- || Layouts Imports || ------------- */ import LogOnLayout from '../containers/LogOnLayout'; /* ------------- || Components Imports || ------------- */ import Loadable from '../components/Loader/Loadable'; /* ------------- || Pages Imports || ------------- */ const Login = Loadable(lazy(() => import('../pages/Login'))); const NotFound = Loadable(lazy(() => import('../pages/NotFound'))); // ==============================|| AUTHENTICATION ROUTING ||============================== // const AuthenticationRoutes = { path: '/', element: <LogOnLayout />, children: [ { path: '/', element: <Login /> }, { path: '/app', element: <Navigate to="/login" /> }, { path: 'login', element: <Login /> }, { path: '404', element: <NotFound /> }, { path: '*', element: <Navigate to="/404" /> } ] }; export default AuthenticationRoutes;
39.24
94
0.49949
9487878fdc2e5ec4dfdb50fb38a67257d28cdcec
8,188
js
JavaScript
components/wab/FromContext/common/LinksProcessor.js
rsignell-usgs/geoportal-server
796598b5f52de6bf38ad28a5849a4ad36b35badb
[ "Apache-2.0" ]
176
2015-01-08T19:00:40.000Z
2022-03-23T10:17:30.000Z
components/wab/FromContext/common/LinksProcessor.js
rsignell-usgs/geoportal-server
796598b5f52de6bf38ad28a5849a4ad36b35badb
[ "Apache-2.0" ]
224
2015-01-05T16:17:21.000Z
2021-08-30T22:39:28.000Z
components/wab/FromContext/common/LinksProcessor.js
rsignell-usgs/geoportal-server
796598b5f52de6bf38ad28a5849a4ad36b35badb
[ "Apache-2.0" ]
88
2015-01-15T11:47:05.000Z
2022-03-10T02:06:46.000Z
define([ 'dojo/_base/declare', 'dojo/_base/lang', 'dojo/topic' ],function(declare,lang, topic){ return declare(null, { postCreate: function(){ this.suffixes = ["csv", "doc", "docx", "ppt", "pptx", "xls", "xlsx", "gml", "pdf", "zip", "xml", "html", "htm", "aspx", "lyr"]; this.suffixesKML = [".kml","kmz"]; }, findContentTypeUrl: function(links){ var theLinkType = this._processLink(links); var imgURL = ""; switch(theLinkType) { case "www": imgURL = "widgets/GeoportalSearch/images/ContentType_clearinghouse.png"; break; case "webmap": case "mapserver": case "featureserver": case "imageserver": case "kml": case "wcs": case "wfs": case "wms": case "wmts": imgURL = "widgets/GeoportalSearch/images/ContentType_liveData.png"; break; default: imgURL = "widgets/GeoportalSearch/images/ContentType_unknown.png"; } return imgURL; }, _processLink: function(links){ var contentTypeLinkType = ""; for (var j=0; j < links.length; j++) { var theLink = links[j]; var theLinkType = ""; theLink.mapServiceType = theLinkType; if ((theLink.type == "open")) { var href = theLink.href; theLinkType = this.getServiceType(href); theLink.mapServiceType = theLinkType; contentTypeLinkType = theLinkType; } } return contentTypeLinkType; }, getServiceType: function(href) { var theLinkType = ""; var hrefLower = href.toLowerCase(); if (hrefLower.indexOf("request=getcapabilities") !== -1) { if (hrefLower.indexOf("service=wms") !== -1) { theLinkType = "wms"; } else if (hrefLower.indexOf("service=wmts") !== -1) { theLinkType = "wmts"; } else if (hrefLower.indexOf("service=wcs") !== -1) { theLinkType = "wcs"; } else if (hrefLower.indexOf("service=wfs") !== -1) { theLinkType = "wfs"; } else { theLinkType = "unsupported"; } } else if (hrefLower.indexOf("/rest/services/") !== -1) { theLinkType = hrefLower.split("/").pop(); if (hrefLower.indexOf("?f=") > 0) { theLinkType = theLinkType.substr(0, theLinkType.indexOf("?f=")); href = href.substr(0, href.indexOf("?f=")); } else if (!isNaN(theLinkType)) { // this refers to a layer in the service. the service type is the previous part of the path. theLinkType = "featureserver"; } } else if (hrefLower.indexOf("/featureserver/") !== -1) { if (hrefLower.indexOf("koop") !== -1) { theLinkType = "featureserver"; } } else if (hrefLower.indexOf("/services/") !== -1) { if (hrefLower.indexOf("/mapserver/wmsserver") !== -1) { theLinkType = "wms"; } } else if (hrefLower.indexOf("/com.esri.wms.esrimap") !== -1) { theLinkType = "wms"; if (hrefLower.indexOf("?") > 0) { href = href.substr(0, href.indexOf("?")); } } else if ((hrefLower.indexOf("viewer.html") !== -1) && (hrefLower.indexOf("url=") !== -1)) { href = href.substr(href.indexOf("url=")+4); href = decodeURIComponent(href); theLinkType = href.split("/").pop().toLowerCase(); } else if ((hrefLower.indexOf("index.jsp") !== -1) && (hrefLower.indexOf("resource=") !== -1)) { href = href.substr(href.indexOf("url=")+4); href = decodeURIComponent(href); theLinkType = href.split("/").pop().toLowerCase(); } else if ((hrefLower.indexOf("/sharing/content/items/") !== -1) && (hrefLower.split("/").pop() == "data")) { theLinkType = "webmap"; if (hrefLower.indexOf("?") > 0) { href = href.substr(0, href.indexOf("?")); } } return theLinkType; }, _processLink2: function(link,theLinkType){ var theLink = link; if ((theLink.type == "open") || (theLink.type == "customLink") || (theLink.type == "agslyr") || (theLink.type == "addToMap")) { // if a link type has already been established other than www if (theLinkType.length > 0 && theLinkType != "www") return false; var href = theLink.href; var hrefLower = href.toLowerCase(); // if the link ends in any of the this.this.suffixes, it's not a map service, but general web link // if not assigned value yet, check for typical file types if ( (theLinkType.length == 0) || (theLinkType === "www")){ for (k=0; k<this.this.suffixes.length; k++) { var suffix = this.this.suffixes[this.index]; if (hrefLower.indexOf(suffix) + suffix.length == hrefLower.length) { theLinkType = "www"; } } } // if not assigned value yet, check for KML/KMZ if ((theLinkType.length == 0) || (theLinkType === "www")) { for (k=0; k<this.this.suffixesKML.length; k++) { var suffix = this.this.suffixesKML[k]; if (hrefLower.indexOf(suffix, hrefLower.length - suffix.length) !== -1) { theLinkType = "kml"; } } } // if not assigned value yet, check for services if ((theLinkType.length == 0) || (theLinkType === "www")) { if (hrefLower.indexOf("request=getcapabilities") !== -1) { if (hrefLower.indexOf("service=wms") !== -1) { theLinkType = "wms"; } else { theLinkType = "unsupported"; } } else if (hrefLower.indexOf("/rest/services/") !== -1) { theLinkType = hrefLower.split("/").pop(); if (hrefLower.indexOf("?f=") > 0) { theLinkType = theLinkType.substr(0, theLinkType.indexOf("?f=")); href = href.substr(0, href.indexOf("?f=")); } } else if (hrefLower.indexOf("/services/") !== -1) { if (hrefLower.indexOf("/mapserver/wmsserver") !== -1) { theLinkType = "wms"; } } else if (hrefLower.indexOf("/com.esri.wms.esrimap") !== -1) { theLinkType = "wms"; if (hrefLower.indexOf("?") > 0) { href = href.substr(0, href.indexOf("?")); } } else if ((hrefLower.indexOf("viewer.html") !== -1) && (hrefLower.indexOf("url=") !== -1)) { href = href.substr(href.indexOf("url=")+4); href = decodeURIComponent(href); theLinkType = href.split("/").pop().toLowerCase(); } else if ((hrefLower.indexOf("/sharing/content/items/") !== -1) && (hrefLower.split("/").pop() == "data")) { theLinkType = "webmap"; if (hrefLower.indexOf("?") > 0) { href = href.substr(0, href.indexOf("?")); } } } // if not assigned value yet, check if the layer ends with f=lyr cause then we can make a rest URL of it if ((theLinkType.length == 0) || (theLinkType === "www")) { suffix = "?f=lyr"; if (hrefLower.indexOf(suffix) + suffix.length == hrefLower.length) { theLinkType = hrefLower.split("/").pop(); href = href.replace(suffix, ""); } } // if all else fails, just make it a generic web link if (theLinkType.length == 0) { theLinkType = "www"; } link.mapServicetype = theLinkType; link.mapServiceUrl = href; } return theLinkType; } }); });
35.445887
134
0.493283
94885fc95738559df74befa83566a8a3a9259ce8
633
js
JavaScript
libraries/dexie/put-with-inbound-keys/index.js
vivaxy/examples
9ae9e2080a8eca92fba2a256a51a7ff3bdb4133f
[ "MIT" ]
null
null
null
libraries/dexie/put-with-inbound-keys/index.js
vivaxy/examples
9ae9e2080a8eca92fba2a256a51a7ff3bdb4133f
[ "MIT" ]
null
null
null
libraries/dexie/put-with-inbound-keys/index.js
vivaxy/examples
9ae9e2080a8eca92fba2a256a51a7ff3bdb4133f
[ "MIT" ]
null
null
null
/** * @since 2022-03-23 * @author vivaxy */ import Dexie from '//cdn.skypack.dev/dexie'; const db = new Dexie('vivaxy-examples-put-with-inbound-keys'); db.version(1).stores({ friends: '&id', }); const put = await db.friends.put({ id: 1, name: 'vivaxy' }); console.log('put', put, 'entries', await db.friends.toArray()); // all ok const updated = await db.friends.put({ id: 1, name: 'vivaxy2' }, 1); console.log('updated', updated, 'entries', await db.friends.toArray()); // all ok const updated2 = await db.friends.put({ id: 1, name: 'vivaxy3' }, [1]); console.log('updated', updated2, 'entries', await db.friends.toArray());
31.65
72
0.657188
9488bdc6c7f428833d6d8f4b99ba658ead54074d
100
js
JavaScript
keywordTool/pubfiles/src/code/truedigital/129482/domainInfo.inc.js
dsofowote/KW-Tool
d8d9a5a6f79c33732f0301b7c72ec21d1df4d750
[ "MIT" ]
null
null
null
keywordTool/pubfiles/src/code/truedigital/129482/domainInfo.inc.js
dsofowote/KW-Tool
d8d9a5a6f79c33732f0301b7c72ec21d1df4d750
[ "MIT" ]
null
null
null
keywordTool/pubfiles/src/code/truedigital/129482/domainInfo.inc.js
dsofowote/KW-Tool
d8d9a5a6f79c33732f0301b7c72ec21d1df4d750
[ "MIT" ]
null
null
null
integration.whiteRootDomains = ['trueid.net','trueid-alpha.net']; integration.blackSubDomains = [];
33.333333
65
0.76
940612f75d6047df2d4e8f7c89005ddc4eba503a
48,643
js
JavaScript
addon/popup.js
morettimarco/Chrome-Salesforce-inspector
c707763d67f2f386bcc7febf03a9e770a735a245
[ "MIT" ]
183
2015-01-06T13:56:09.000Z
2022-03-30T18:48:01.000Z
addon/popup.js
morettimarco/Chrome-Salesforce-inspector
c707763d67f2f386bcc7febf03a9e770a735a245
[ "MIT" ]
189
2015-01-12T09:46:10.000Z
2022-03-14T10:12:20.000Z
addon/popup.js
morettimarco/Chrome-Salesforce-inspector
c707763d67f2f386bcc7febf03a9e770a735a245
[ "MIT" ]
77
2015-03-17T12:36:00.000Z
2022-03-29T10:38:29.000Z
/* global React ReactDOM */ import {sfConn, apiVersion} from "./inspector.js"; import {getAllFieldSetupLinks} from "./setup-links.js"; let h = React.createElement; { parent.postMessage({insextInitRequest: true}, "*"); addEventListener("message", function initResponseHandler(e) { if (e.source == parent && e.data.insextInitResponse) { removeEventListener("message", initResponseHandler); init(e.data); } }); } function closePopup() { parent.postMessage({insextClosePopup: true}, "*"); } function init({sfHost, inDevConsole, inLightning, inInspector}) { let addonVersion = chrome.runtime.getManifest().version; sfConn.getSession(sfHost).then(() => { ReactDOM.render(h(App, { sfHost, inDevConsole, inLightning, inInspector, addonVersion, }), document.getElementById("root")); }); } class App extends React.PureComponent { constructor(props) { super(props); this.state = { isInSetup: false, contextUrl: null }; this.onContextUrlMessage = this.onContextUrlMessage.bind(this); this.onShortcutKey = this.onShortcutKey.bind(this); } onContextUrlMessage(e) { if (e.source == parent && e.data.insextUpdateRecordId) { let {locationHref} = e.data; this.setState({ isInSetup: locationHref.includes("/lightning/setup/"), contextUrl: locationHref }); } } onShortcutKey(e) { if (e.key == "m") { e.preventDefault(); this.refs.showAllDataBox.clickShowDetailsBtn(); } if (e.key == "a") { e.preventDefault(); this.refs.showAllDataBox.clickAllDataBtn(); } if (e.key == "e") { e.preventDefault(); this.refs.dataExportBtn.click(); } if (e.key == "i") { e.preventDefault(); this.refs.dataImportBtn.click(); } if (e.key == "l") { e.preventDefault(); this.refs.limitsBtn.click(); } if (e.key == "d") { e.preventDefault(); this.refs.metaRetrieveBtn.click(); } if (e.key == "x") { e.preventDefault(); this.refs.apiExploreBtn.click(); } if (e.key == "h" && this.refs.homeBtn) { this.refs.homeBtn.click(); } //TODO: Add shortcut for "u to go to user aspect" } componentDidMount() { addEventListener("message", this.onContextUrlMessage); addEventListener("keydown", this.onShortcutKey); parent.postMessage({insextLoaded: true}, "*"); } componentWillUnmount() { removeEventListener("message", this.onContextUrlMessage); removeEventListener("keydown", this.onShortcutKey); } render() { let { sfHost, inDevConsole, inLightning, inInspector, addonVersion, } = this.props; let {isInSetup, contextUrl} = this.state; let hostArg = new URLSearchParams(); hostArg.set("host", sfHost); let linkTarget = inDevConsole ? "_blank" : "_top"; return ( h("div", {}, h("div", {className: "header"}, h("div", {className: "header-icon"}, h("svg", {viewBox: "0 0 24 24"}, h("path", {d: ` M11 9c-.5 0-1-.5-1-1s.5-1 1-1 1 .5 1 1-.5 1-1 1z m1 5.8c0 .2-.1.3-.3.3h-1.4c-.2 0-.3-.1-.3-.3v-4.6c0-.2.1-.3.3-.3h1.4c.2.0.3.1.3.3z M11 3.8c-4 0-7.2 3.2-7.2 7.2s3.2 7.2 7.2 7.2s7.2-3.2 7.2-7.2s-3.2-7.2-7.2-7.2z m0 12.5c-2.9 0-5.3-2.4-5.3-5.3s2.4-5.3 5.3-5.3s5.3 2.4 5.3 5.3-2.4 5.3-5.3 5.3z M 17.6 15.9c-.2-.2-.3-.2-.5 0l-1.4 1.4c-.2.2-.2.3 0 .5l4 4c.2.2.3.2.5 0l1.4-1.4c.2-.2.2-.3 0-.5z `}) ) ), "Salesforce inspector" ), h("div", {className: "main"}, h(AllDataBox, {ref: "showAllDataBox", sfHost, showDetailsSupported: !inLightning && !inInspector, linkTarget, contextUrl}), h("div", {className: "global-box"}, h("a", {ref: "dataExportBtn", href: "data-export.html?" + hostArg, target: linkTarget, className: "button"}, "Data ", h("u", {}, "E"), "xport"), h("a", {ref: "dataImportBtn", href: "data-import.html?" + hostArg, target: linkTarget, className: "button"}, "Data ", h("u", {}, "I"), "mport"), h("a", {ref: "limitsBtn", href: "limits.html?" + hostArg, target: linkTarget, className: "button"}, "Org ", h("u", {}, "L"), "imits"), // Advanded features should be put below this line, and the layout adjusted so they are below the fold h("a", {ref: "metaRetrieveBtn", href: "metadata-retrieve.html?" + hostArg, target: linkTarget, className: "button"}, h("u", {}, "D"), "ownload Metadata"), h("a", {ref: "apiExploreBtn", href: "explore-api.html?" + hostArg, target: linkTarget, className: "button"}, "E", h("u", {}, "x"), "plore API"), // Workaround for in Lightning the link to Setup always opens a new tab, and the link back cannot open a new tab. inLightning && isInSetup && h("a", {ref: "homeBtn", href: `https://${sfHost}/lightning/page/home`, title: "You can choose if you want to open in a new tab or not", target: linkTarget, className: "button"}, "Salesforce ", h("u", {}, "H"), "ome"), inLightning && !isInSetup && h("a", {ref: "homeBtn", href: `https://${sfHost}/lightning/setup/SetupOneHome/home?setupApp=all`, title: "You can choose if you want to open in a new tab or not", target: linkTarget, className: "button"}, "Setup ", h("u", {}, "H"), "ome"), ) ), h("div", {className: "footer"}, h("div", {className: "meta"}, h("div", {className: "version"}, "(", h("a", {href: "https://github.com/sorenkrabbe/Chrome-Salesforce-inspector/blob/master/CHANGES.md"}, "v" + addonVersion), " / " + apiVersion + ")", ), h("div", {className: "tip"}, "[ctrl+alt+i] to open"), h("a", {className: "about", href: "https://github.com/sorenkrabbe/Chrome-Salesforce-inspector", target: linkTarget}, "About") ), ) ) ); } } class AllDataBox extends React.PureComponent { constructor(props) { super(props); this.SearchAspectTypes = Object.freeze({sobject: "sobject", users: "users"}); //Enum. Supported aspects this.state = { activeSearchAspect: this.SearchAspectTypes.sobject, sobjectsList: null, sobjectsLoading: true, usersBoxLoading: false, contextRecordId: null, contextUserId: null, contextOrgId: null, contextPath: null, }; this.onAspectClick = this.onAspectClick.bind(this); this.parseContextUrl = this.ensureKnownBrowserContext.bind(this); } componentDidMount() { this.ensureKnownBrowserContext(); this.loadSobjects(); } componentDidUpdate(prevProps, prevState) { let {activeSearchAspect} = this.state; if (prevProps.contextUrl !== this.props.contextUrl) { this.ensureKnownBrowserContext(); } if (prevState.activeSearchAspect !== activeSearchAspect) { switch (activeSearchAspect) { case this.SearchAspectTypes.sobject: this.ensureKnownBrowserContext(); break; case this.SearchAspectTypes.users: this.ensureKnownUserContext(); break; } } } ensureKnownBrowserContext() { let {contextUrl} = this.props; if (contextUrl) { let recordId = getRecordId(contextUrl); let path = getSfPathFromUrl(contextUrl); this.setState({ contextRecordId: recordId, contextPath: path }); } } setIsLoading(aspect, value) { switch (aspect) { case "usersBox": this.setState({usersBoxLoading: value}); break; } } isLoading() { let {usersBoxLoading, sobjectsLoading} = this.state; return sobjectsLoading || usersBoxLoading; } async ensureKnownUserContext() { let {contextUserId, contextOrgId} = this.state; if (!contextUserId || !contextOrgId) { try { const userInfo = await sfConn.rest("/services/oauth2/userinfo"); let contextUserId = userInfo.user_id; let contextOrgId = userInfo.organization_id; this.setState({contextUserId, contextOrgId}); } catch (err) { console.error("Unable to query user context", err); } } } onAspectClick(e) { this.setState({ activeSearchAspect: e.currentTarget.dataset.aspect }); } loadSobjects() { let entityMap = new Map(); function addEntity({name, label, keyPrefix}, api) { label = label || ""; // Avoid null exceptions if the object does not have a label (some don't). All objects have a name. Not needed for keyPrefix since we only do equality comparisons on those. let entity = entityMap.get(name); if (entity) { if (!entity.label) { // Doesn't seem to be needed, but if we have to do it for keyPrefix, we can just as well do it for label. entity.label = label; } if (!entity.keyPrefix) { // For some objects the keyPrefix is only available in some of the APIs. entity.keyPrefix = keyPrefix; } } else { entity = { availableApis: [], name, label, keyPrefix, availableKeyPrefix: null, }; entityMap.set(name, entity); } if (api) { entity.availableApis.push(api); if (keyPrefix) { entity.availableKeyPrefix = keyPrefix; } } } function getObjects(url, api) { return sfConn.rest(url).then(describe => { for (let sobject of describe.sobjects) { addEntity(sobject, api); } }).catch(err => { console.error("list " + api + " sobjects", err); }); } function getEntityDefinitions(bucket) { let query = "select QualifiedApiName, Label, KeyPrefix from EntityDefinition" + bucket; return sfConn.rest("/services/data/v" + apiVersion + "/tooling/query?q=" + encodeURIComponent(query)).then(res => { for (let record of res.records) { addEntity({ name: record.QualifiedApiName, label: record.Label, keyPrefix: record.KeyPrefix }, null); } }).catch(err => { console.error("list entity definitions: " + bucket, err); }); } Promise.all([ // Get objects the user can access from the regular API getObjects("/services/data/v" + apiVersion + "/sobjects/", "regularApi"), // Get objects the user can access from the tooling API getObjects("/services/data/v" + apiVersion + "/tooling/sobjects/", "toolingApi"), // Get all objects, even the ones the user cannot access from any API // These records are less interesting than the ones the user has access to, but still interesting since we can get information about them using the tooling API // If there are too many records, we get "EXCEEDED_ID_LIMIT: EntityDefinition does not support queryMore(), use LIMIT to restrict the results to a single batch" // We cannot use limit and offset to work around it, since EntityDefinition does not support those according to the documentation, and they seem to work in a querky way in practice. // Tried to use http://salesforce.stackexchange.com/a/22643, but "order by x" uses AaBbCc as sort order, while "where x > ..." uses sort order ABCabc, so it does not work on text fields, and there is no unique numerical field we can sort by. // Here we split the query into a somewhat arbitrary set of fixed buckets, and hope none of the buckets exceed 2000 records. getEntityDefinitions(" where QualifiedApiName < 'M' limit 2000"), getEntityDefinitions(" where QualifiedApiName >= 'M' limit 2000"), ]) .then(() => { // TODO progressively display data as each of the three responses becomes available this.setState({ sobjectsLoading: false, sobjectsList: Array.from(entityMap.values()) }); this.refs.showAllDataBoxSObject.refs.allDataSearch.getMatchesDelayed(""); }) .catch(e => { console.error(e); this.setState({sobjectsLoading: false}); }); } render() { let {activeSearchAspect, sobjectsLoading, contextRecordId, contextUserId, contextOrgId, contextPath, sobjectsList} = this.state; let {sfHost, showDetailsSupported, linkTarget} = this.props; return ( h("div", {className: "all-data-box " + (this.isLoading() ? "loading " : "")}, h("ul", {className: "small-tabs"}, h("li", {onClick: this.onAspectClick, "data-aspect": this.SearchAspectTypes.sobject, className: (activeSearchAspect == this.SearchAspectTypes.sobject) ? "active" : ""}, "Objects"), h("li", {onClick: this.onAspectClick, "data-aspect": this.SearchAspectTypes.users, className: (activeSearchAspect == this.SearchAspectTypes.users) ? "active" : ""}, "Users") ), (activeSearchAspect == this.SearchAspectTypes.sobject) ? h(AllDataBoxSObject, {ref: "showAllDataBoxSObject", sfHost, showDetailsSupported, sobjectsList, sobjectsLoading, contextRecordId, linkTarget}) : (activeSearchAspect == this.SearchAspectTypes.users) ? h(AllDataBoxUsers, {ref: "showAllDataBoxUsers", sfHost, linkTarget, contextUserId, contextOrgId, contextPath, setIsLoading: (value) => { this.setIsLoading("usersBox", value); }}, "Users") : "AllData aspect " + activeSearchAspect + " not implemented" ) ); } } class AllDataBoxUsers extends React.PureComponent { constructor(props) { super(props); this.state = { selectedUser: null, selectedUserId: null, }; this.getMatches = this.getMatches.bind(this); this.onDataSelect = this.onDataSelect.bind(this); } componentDidMount() { let {contextUserId} = this.props; this.onDataSelect({Id: contextUserId}); this.refs.allDataSearch.refs.showAllDataInp.focus(); } componentDidUpdate(prevProps) { if (prevProps.contextUserId !== this.props.contextUserId) { this.onDataSelect({Id: this.props.contextUserId}); } } async getMatches(userQuery) { let {setIsLoading} = this.props; if (!userQuery) { return []; } //TODO: Better search query. SOSL? const fullQuerySelect = "select Id, Name, Email, Username, UserRole.Name, Alias, LocaleSidKey, LanguageLocaleKey, IsActive, ProfileId, Profile.Name"; const minimalQuerySelect = "select Id, Name, Email, Username, UserRole.Name, Alias, LocaleSidKey, LanguageLocaleKey, IsActive"; const queryFrom = "from User where isactive=true and (username like '%" + userQuery + "%' or name like '%" + userQuery + "%') order by LastLoginDate limit 100"; const compositeQuery = { "compositeRequest": [ { "method": "GET", "url": "/services/data/v47.0/query/?q=" + encodeURIComponent(fullQuerySelect + " " + queryFrom), "referenceId": "fullData" }, { "method": "GET", "url": "/services/data/v47.0/query/?q=" + encodeURIComponent(minimalQuerySelect + " " + queryFrom), "referenceId": "minimalData" } ] }; try { setIsLoading(true); const userSearchResult = await sfConn.rest("/services/data/v" + apiVersion + "/composite", {method: "POST", body: compositeQuery}); let users = userSearchResult.compositeResponse.find((elm) => elm.httpStatusCode == 200).body.records; return users; } catch (err) { console.error("Unable to query user details with: " + JSON.stringify(compositeQuery) + ".", err); return []; } finally { setIsLoading(false); } } async onDataSelect(userRecord) { if (userRecord && userRecord.Id) { await this.setState({selectedUserId: userRecord.Id, selectedUser: null}); await this.querySelectedUserDetails(); } } async querySelectedUserDetails() { let {selectedUserId} = this.state; let {setIsLoading} = this.props; if (!selectedUserId) { return; } //Optimistically attempt broad query (fullQuery) and fall back to minimalQuery to ensure some data is returned in most cases (e.g. profile cannot be queried by community users) const fullQuerySelect = "select Id, Name, Email, Username, UserRole.Name, Alias, LocaleSidKey, LanguageLocaleKey, IsActive, FederationIdentifier, ProfileId, Profile.Name"; const minimalQuerySelect = "select Id, Name, Email, Username, UserRole.Name, Alias, LocaleSidKey, LanguageLocaleKey, IsActive, FederationIdentifier"; const queryFrom = "from User where Id='" + selectedUserId + "' limit 1"; const compositeQuery = { "compositeRequest": [ { "method": "GET", "url": "/services/data/v47.0/query/?q=" + encodeURIComponent(fullQuerySelect + " " + queryFrom), "referenceId": "fullData" }, { "method": "GET", "url": "/services/data/v47.0/query/?q=" + encodeURIComponent(minimalQuerySelect + " " + queryFrom), "referenceId": "minimalData" } ] }; try { setIsLoading(true); //const userResult = await sfConn.rest("/services/data/v" + apiVersion + "/sobjects/User/" + selectedUserId); //Does not return profile details. Query call is therefore prefered const userResult = await sfConn.rest("/services/data/v" + apiVersion + "/composite", {method: "POST", body: compositeQuery}); let userDetail = userResult.compositeResponse.find((elm) => elm.httpStatusCode == 200).body.records[0]; await this.setState({selectedUser: userDetail}); } catch (err) { console.error("Unable to query user details with: " + JSON.stringify(compositeQuery) + ".", err); } finally { setIsLoading(false); } } resultRender(matches, userQuery) { return matches.map(value => ({ key: value.Id, value, element: [ h("div", {className: "autocomplete-item-main", key: "main"}, h(MarkSubstring, { text: value.Name + " (" + value.Alias + ")", start: value.Name.toLowerCase().indexOf(userQuery.toLowerCase()), length: userQuery.length })), h("div", {className: "autocomplete-item-sub small", key: "sub"}, h("div", {}, (value.Profile) ? value.Profile.Name : ""), h(MarkSubstring, { text: (!value.IsActive) ? "⚠ " + value.Username : value.Username, start: value.Username.toLowerCase().indexOf(userQuery.toLowerCase()), length: userQuery.length })) ] })); } render() { let {selectedUser} = this.state; let {sfHost, linkTarget, contextOrgId, contextUserId, contextPath} = this.props; return ( h("div", {ref: "usersBox", className: "users-box"}, h(AllDataSearch, {ref: "allDataSearch", getMatches: this.getMatches, onDataSelect: this.onDataSelect, inputSearchDelay: 400, placeholderText: "Username, email, alias or name of user", resultRender: this.resultRender}), h("div", {className: "all-data-box-inner" + (!selectedUser ? " empty" : "")}, selectedUser ? h(UserDetails, {user: selectedUser, sfHost, contextOrgId, currentUserId: contextUserId, linkTarget, contextPath}) : h("div", {className: "center"}, "No user details available") )) ); } } class AllDataBoxSObject extends React.PureComponent { constructor(props) { super(props); this.state = { selectedValue: null, recordIdDetails: null }; this.onDataSelect = this.onDataSelect.bind(this); this.getMatches = this.getMatches.bind(this); } componentDidMount() { let {contextRecordId} = this.props; this.updateSelection(contextRecordId); } componentDidUpdate(prevProps){ let {contextRecordId, sobjectsLoading} = this.props; if (prevProps.contextRecordId !== contextRecordId) { this.updateSelection(contextRecordId); } if (prevProps.sobjectsLoading !== sobjectsLoading && !sobjectsLoading) { this.updateSelection(contextRecordId); } } async updateSelection(query) { let match = this.getBestMatch(query); await this.setState({selectedValue: match}); this.loadRecordIdDetails(); } loadRecordIdDetails() { let {selectedValue} = this.state; //If a recordId is selected and the object supports regularApi if (selectedValue && selectedValue.recordId && selectedValue.sobject && selectedValue.sobject.availableApis && selectedValue.sobject.availableApis.includes("regularApi")) { //optimistically assume the object has certain attribues. If some are not present, no recordIdDetails are displayed //TODO: Better handle objects with no recordtypes. Currently the optimistic approach results in no record details being displayed for ids for objects without record types. let query = "select Id, LastModifiedBy.Alias, CreatedBy.Alias, RecordType.DeveloperName, CreatedDate, LastModifiedDate from " + selectedValue.sobject.name + " where id='" + selectedValue.recordId + "'"; sfConn.rest("/services/data/v" + apiVersion + "/query?q=" + encodeURIComponent(query), {logErrors: false}).then(res => { for (let record of res.records) { let lastModifiedDate = new Date(record.LastModifiedDate); let createdDate = new Date(record.CreatedDate); this.setState({recordIdDetails: { "recordTypeName": (record.RecordType) ? record.RecordType.DeveloperName : "-", "createdBy": record.CreatedBy.Alias, "lastModifiedBy": record.LastModifiedBy.Alias, "created": createdDate.toLocaleDateString() + " " + createdDate.toLocaleTimeString(), "lastModified": lastModifiedDate.toLocaleDateString() + " " + lastModifiedDate.toLocaleTimeString(), }}); } }).catch(() => { //Swallow this exception since it is likely due to missing standard attributes on the record - i.e. an invalid query. this.setState({recordIdDetails: null}); }); } else { this.setState({recordIdDetails: null}); } } getBestMatch(query) { let {sobjectsList} = this.props; // Find the best match based on the record id or object name from the page URL. if (!query) { return null; } if (!sobjectsList) { return null; } let sobject = sobjectsList.find(sobject => sobject.name.toLowerCase() == query.toLowerCase()); let queryKeyPrefix = query.substring(0, 3); if (!sobject) { sobject = sobjectsList.find(sobject => sobject.availableKeyPrefix == queryKeyPrefix); } if (!sobject) { sobject = sobjectsList.find(sobject => sobject.keyPrefix == queryKeyPrefix); } if (!sobject) { return null; } let recordId = null; if (sobject.keyPrefix == queryKeyPrefix && query.match(/^([a-zA-Z0-9]{15}|[a-zA-Z0-9]{18})$/)) { recordId = query; } return {recordId, sobject}; } getMatches(query) { let {sobjectsList, contextRecordId} = this.props; if (!sobjectsList) { return []; } let queryKeyPrefix = query.substring(0, 3); let res = sobjectsList .filter(sobject => sobject.name.toLowerCase().includes(query.toLowerCase()) || sobject.label.toLowerCase().includes(query.toLowerCase()) || sobject.keyPrefix == queryKeyPrefix) .map(sobject => ({ recordId: null, sobject, // TO-DO: merge with the sortRank function in data-export relevance: (sobject.keyPrefix == queryKeyPrefix ? 2 : sobject.name.toLowerCase() == query.toLowerCase() ? 3 : sobject.label.toLowerCase() == query.toLowerCase() ? 4 : sobject.name.toLowerCase().startsWith(query.toLowerCase()) ? 5 : sobject.label.toLowerCase().startsWith(query.toLowerCase()) ? 6 : sobject.name.toLowerCase().includes("__" + query.toLowerCase()) ? 7 : sobject.name.toLowerCase().includes("_" + query.toLowerCase()) ? 8 : sobject.label.toLowerCase().includes(" " + query.toLowerCase()) ? 9 : 10) + (sobject.availableApis.length == 0 ? 20 : 0) })); query = query || contextRecordId || ""; queryKeyPrefix = query.substring(0, 3); if (query.match(/^([a-zA-Z0-9]{15}|[a-zA-Z0-9]{18})$/)) { let objectsForId = sobjectsList.filter(sobject => sobject.keyPrefix == queryKeyPrefix); for (let sobject of objectsForId) { res.unshift({recordId: query, sobject, relevance: 1}); } } res.sort((a, b) => a.relevance - b.relevance || a.sobject.name.localeCompare(b.sobject.name)); return res; } onDataSelect(value) { this.setState({selectedValue: value}, () => { this.loadRecordIdDetails(); }); } clickShowDetailsBtn() { if (this.refs.allDataSelection) { this.refs.allDataSelection.clickShowDetailsBtn(); } } clickAllDataBtn() { if (this.refs.allDataSelection) { this.refs.allDataSelection.clickAllDataBtn(); } } resultRender(matches, userQuery) { return matches.map(value => ({ key: value.recordId + "#" + value.sobject.name, value, element: [ h("div", {className: "autocomplete-item-main", key: "main"}, value.recordId || h(MarkSubstring, { text: value.sobject.name, start: value.sobject.name.toLowerCase().indexOf(userQuery.toLowerCase()), length: userQuery.length }), value.sobject.availableApis.length == 0 ? " (Not readable)" : "" ), h("div", {className: "autocomplete-item-sub", key: "sub"}, h(MarkSubstring, { text: value.sobject.keyPrefix || "---", start: value.sobject.keyPrefix == userQuery.substring(0, 3) ? 0 : -1, length: 3 }), " • ", h(MarkSubstring, { text: value.sobject.label, start: value.sobject.label.toLowerCase().indexOf(userQuery.toLowerCase()), length: userQuery.length }) ) ] })); } render() { let {sfHost, showDetailsSupported, sobjectsList, linkTarget, contextRecordId} = this.props; let {selectedValue, recordIdDetails} = this.state; return ( h("div", {}, h(AllDataSearch, {ref: "allDataSearch", onDataSelect: this.onDataSelect, sobjectsList, getMatches: this.getMatches, inputSearchDelay: 0, placeholderText: "Record id, id prefix or object name", resultRender: this.resultRender}), selectedValue ? h(AllDataSelection, {ref: "allDataSelection", sfHost, showDetailsSupported, selectedValue, linkTarget, recordIdDetails, contextRecordId}) : h("div", {className: "all-data-box-inner empty"}, "No record to display") ) ); } } class UserDetails extends React.PureComponent { doSupportLoginAs(user) { let {currentUserId} = this.props; //Optimistically show login unless it's logged in user's userid or user is inactive. //No API to determine if user is allowed to login as given user. See https://salesforce.stackexchange.com/questions/224342/query-can-i-login-as-for-users if (!user || user.Id == currentUserId || !user.IsActive) { return false; } return true; } getLoginAsLink(userId) { let {sfHost, contextOrgId, contextPath} = this.props; const retUrl = contextPath || "/"; const targetUrl = contextPath || "/"; return "https://" + sfHost + "/servlet/servlet.su" + "?oid=" + encodeURIComponent(contextOrgId) + "&suorgadminid=" + encodeURIComponent(userId) + "&retURL=" + encodeURIComponent(retUrl) + "&targetURL=" + encodeURIComponent(targetUrl); } getUserDetailLink(userId) { let {sfHost} = this.props; return "https://" + sfHost + "/lightning/setup/ManageUsers/page?address=%2F" + userId + "%3Fnoredirect%3D1"; } getProfileLink(profileId) { let {sfHost} = this.props; return "https://" + sfHost + "/lightning/setup/EnhancedProfiles/page?address=%2F" + profileId; } render() { let {user, linkTarget} = this.props; return ( h("div", {className: "all-data-box-inner"}, h("div", {className: "all-data-box-data"}, h("table", {className: (user.IsActive) ? "" : "inactive"}, h("tbody", {}, h("tr", {}, h("th", {}, "Name:"), h("td", {}, (user.IsActive) ? "" : h("span", {title: "User is inactive"}, "⚠ "), user.Name + " (" + user.Alias + ")" ) ), h("tr", {}, h("th", {}, "Username:"), h("td", {className: "oneliner"}, user.Username) ), h("tr", {}, h("th", {}, "E-mail:"), h("td", {className: "oneliner"}, user.Email) ), h("tr", {}, h("th", {}, "Profile:"), h("td", {className: "oneliner"}, (user.Profile) ? h("a", {href: this.getProfileLink(user.ProfileId), target: linkTarget}, user.Profile.Name) : h("em", {className: "inactive"}, "unknown") ) ), h("tr", {}, h("th", {}, "Role:"), h("td", {className: "oneliner"}, (user.UserRole) ? user.UserRole.Name : "") ), h("tr", {}, h("th", {}, "Language:"), h("td", {}, h("div", {className: "flag flag-" + sfLocaleKeyToCountryCode(user.LanguageLocaleKey), title: "Language: " + user.LanguageLocaleKey}), " | ", h("div", {className: "flag flag-" + sfLocaleKeyToCountryCode(user.LocaleSidKey), title: "Locale: " + user.LocaleSidKey}) ) ) ) )), h("div", {ref: "userButtons", className: "center"}, this.doSupportLoginAs(user) ? h("a", {href: this.getLoginAsLink(user.Id), target: linkTarget, className: "button button-secondary"}, "Try login as") : null, h("a", {href: this.getUserDetailLink(user.Id), target: linkTarget, className: "button button-secondary"}, "Details") )) ); } } class ShowDetailsButton extends React.PureComponent { constructor(props) { super(props); this.state = { detailsLoading: false, detailsShown: false, }; this.onDetailsClick = this.onDetailsClick.bind(this); } canShowDetails() { let {showDetailsSupported, selectedValue, contextRecordId} = this.props; return showDetailsSupported && contextRecordId && selectedValue.sobject.keyPrefix == contextRecordId.substring(0, 3) && selectedValue.sobject.availableApis.length > 0; } onDetailsClick() { let {sfHost, selectedValue} = this.props; let {detailsShown} = this.state; if (detailsShown || !this.canShowDetails()) { return; } let tooling = !selectedValue.sobject.availableApis.includes("regularApi"); let url = "/services/data/v" + apiVersion + "/" + (tooling ? "tooling/" : "") + "sobjects/" + selectedValue.sobject.name + "/describe/"; this.setState({detailsShown: true, detailsLoading: true}); Promise.all([ sfConn.rest(url), getAllFieldSetupLinks(sfHost, selectedValue.sobject.name) ]).then(([res, insextAllFieldSetupLinks]) => { this.setState({detailsShown: true, detailsLoading: false}); parent.postMessage({insextShowStdPageDetails: true, insextData: res, insextAllFieldSetupLinks}, "*"); closePopup(); }).catch(error => { this.setState({detailsShown: false, detailsLoading: false}); console.error(error); alert(error); }); } render() { let {detailsLoading, detailsShown} = this.state; return ( h("button", { id: "showStdPageDetailsBtn", className: "button" + (detailsLoading ? " loading" : ""), disabled: detailsShown, onClick: this.onDetailsClick, style: {display: !this.canShowDetails() ? "none" : ""} }, "Show field ", h("u", {}, "m"), "etadata" ) ); } } class AllDataSelection extends React.PureComponent { clickShowDetailsBtn() { this.refs.showDetailsBtn.onDetailsClick(); } clickAllDataBtn() { this.refs.showAllDataBtn.click(); } getAllDataUrl(toolingApi) { let {sfHost, selectedValue} = this.props; if (selectedValue) { let args = new URLSearchParams(); args.set("host", sfHost); args.set("objectType", selectedValue.sobject.name); if (toolingApi) { args.set("useToolingApi", "1"); } if (selectedValue.recordId) { args.set("recordId", selectedValue.recordId); } return "inspect.html?" + args; } else { return undefined; } } getDeployStatusUrl() { let {sfHost, selectedValue} = this.props; let args = new URLSearchParams(); args.set("host", sfHost); args.set("checkDeployStatus", selectedValue.recordId); return "explore-api.html?" + args; } /** * Optimistically generate lightning setup uri for the provided object api name. */ getObjectSetupLink(sobjectName) { return "https://" + this.props.sfHost + "/lightning/setup/ObjectManager/" + sobjectName + "/FieldsAndRelationships/view"; } render() { let {sfHost, showDetailsSupported, contextRecordId, selectedValue, linkTarget, recordIdDetails} = this.props; // Show buttons for the available APIs. let buttons = Array.from(selectedValue.sobject.availableApis); buttons.sort(); if (buttons.length == 0) { // If none of the APIs are available, show a button for the regular API, which will partly fail, but still show some useful metadata from the tooling API. buttons.push("noApi"); } return ( h("div", {className: "all-data-box-inner"}, h("div", {className: "all-data-box-data"}, h("table", {}, h("tbody", {}, h("tr", {}, h("th", {}, "Name:"), h("td", {}, h("a", {href: this.getObjectSetupLink(selectedValue.sobject.name), target: linkTarget}, selectedValue.sobject.name) ) ), h("tr", {}, h("th", {}, "Label:"), h("td", {}, selectedValue.sobject.label) ), h("tr", {}, h("th", {}, "Id:"), h("td", {}, h("span", {}, selectedValue.sobject.keyPrefix), h("span", {}, (selectedValue.recordId) ? " / " + selectedValue.recordId : ""), ) ))), h(AllDataRecordDetails, {recordIdDetails, className: "top-space"}), ), h(ShowDetailsButton, {ref: "showDetailsBtn", sfHost, showDetailsSupported, selectedValue, contextRecordId}), selectedValue.recordId && selectedValue.recordId.startsWith("0Af") ? h("a", {href: this.getDeployStatusUrl(), target: linkTarget, className: "button"}, "Check Deploy Status") : null, buttons.map((button, index) => h("a", { key: button, // If buttons for both APIs are shown, the keyboard shortcut should open the first button. ref: index == 0 ? "showAllDataBtn" : null, href: this.getAllDataUrl(button == "toolingApi"), target: linkTarget, className: "button" }, index == 0 ? h("span", {}, "Show ", h("u", {}, "a"), "ll data") : "Show all data", button == "regularApi" ? "" : button == "toolingApi" ? " (Tooling API)" : " (Not readable)" )) ) ); } } class AllDataRecordDetails extends React.PureComponent { render() { let {recordIdDetails, className} = this.props; if (recordIdDetails) { return ( h("table", {className}, h("tbody", {}, h("tr", {}, h("th", {}, "RecType:"), h("td", {}, recordIdDetails.recordTypeName) ), h("tr", {}, h("th", {}, "Created:"), h("td", {}, recordIdDetails.created + " (" + recordIdDetails.createdBy + ")") ), h("tr", {}, h("th", {}, "Edited:"), h("td", {}, recordIdDetails.lastModified + " (" + recordIdDetails.lastModifiedBy + ")") ) ))); } else { return null; } } } class AllDataSearch extends React.PureComponent { constructor(props) { super(props); this.state = { queryString: "", matchingResults: [], queryDelayTimer: null }; this.onAllDataInput = this.onAllDataInput.bind(this); this.onAllDataFocus = this.onAllDataFocus.bind(this); this.onAllDataBlur = this.onAllDataBlur.bind(this); this.onAllDataKeyDown = this.onAllDataKeyDown.bind(this); this.updateAllDataInput = this.updateAllDataInput.bind(this); this.onAllDataArrowClick = this.onAllDataArrowClick.bind(this); } componentDidMount() { let {queryString} = this.state; this.getMatchesDelayed(queryString); } onAllDataInput(e) { let val = e.target.value; this.refs.autoComplete.handleInput(); this.getMatchesDelayed(val); this.setState({queryString: val}); } onAllDataFocus() { this.refs.autoComplete.handleFocus(); } onAllDataBlur() { this.refs.autoComplete.handleBlur(); } onAllDataKeyDown(e) { this.refs.autoComplete.handleKeyDown(e); e.stopPropagation(); // Stop our keyboard shortcut handler } updateAllDataInput(value) { this.props.onDataSelect(value); this.setState({queryString: ""}); this.getMatchesDelayed(""); } onAllDataArrowClick() { this.refs.showAllDataInp.focus(); } getMatchesDelayed(userQuery) { let {queryDelayTimer} = this.state; let {inputSearchDelay} = this.props; if (queryDelayTimer) { clearTimeout(queryDelayTimer); } queryDelayTimer = setTimeout(async () => { let {getMatches} = this.props; const matchingResults = await getMatches(userQuery); await this.setState({matchingResults}); }, inputSearchDelay); this.setState({queryDelayTimer}); } render() { let {queryString, matchingResults} = this.state; let {placeholderText, resultRender} = this.props; return ( h("div", {className: "input-with-dropdown"}, h("input", { className: "all-data-input", ref: "showAllDataInp", placeholder: placeholderText, onInput: this.onAllDataInput, onFocus: this.onAllDataFocus, onBlur: this.onAllDataBlur, onKeyDown: this.onAllDataKeyDown, value: queryString }), h(Autocomplete, { ref: "autoComplete", updateInput: this.updateAllDataInput, matchingResults: resultRender(matchingResults, queryString) }), h("svg", {viewBox: "0 0 24 24", onClick: this.onAllDataArrowClick}, h("path", {d: "M3.8 6.5h16.4c.4 0 .8.6.4 1l-8 9.8c-.3.3-.9.3-1.2 0l-8-9.8c-.4-.4-.1-1 .4-1z"}) ) ) ); } } function MarkSubstring({text, start, length}) { if (start == -1) { return h("span", {}, text); } return h("span", {}, text.substr(0, start), h("mark", {}, text.substr(start, length)), text.substr(start + length) ); } class Autocomplete extends React.PureComponent { constructor(props) { super(props); this.state = { showResults: false, selectedIndex: 0, // Index of the selected autocomplete item. scrollToSelectedIndex: 0, // Changed whenever selectedIndex is updated (even if updated to a value it already had). Used to scroll to the selected item. scrollTopIndex: 0, // Index of the first autocomplete item that is visible according to the current scroll position. itemHeight: 1, // The height of each autocomplete item. All items should have the same height. Measured on first render. 1 means not measured. resultsMouseIsDown: false // Hide the autocomplete popup when the input field looses focus, except when clicking one of the autocomplete items. }; this.onResultsMouseDown = this.onResultsMouseDown.bind(this); this.onResultsMouseUp = this.onResultsMouseUp.bind(this); this.onResultClick = this.onResultClick.bind(this); this.onResultMouseEnter = this.onResultMouseEnter.bind(this); this.onScroll = this.onScroll.bind(this); } handleInput() { this.setState({showResults: true, selectedIndex: 0, scrollToSelectedIndex: this.state.scrollToSelectedIndex + 1}); } handleFocus() { this.setState({showResults: true, selectedIndex: 0, scrollToSelectedIndex: this.state.scrollToSelectedIndex + 1}); } handleBlur() { this.setState({showResults: false}); } handleKeyDown(e) { let {matchingResults} = this.props; let {selectedIndex, showResults, scrollToSelectedIndex} = this.state; if (e.key == "Enter") { if (!showResults) { this.setState({showResults: true, selectedIndex: 0, scrollToSelectedIndex: scrollToSelectedIndex + 1}); return; } if (selectedIndex < matchingResults.length) { e.preventDefault(); let {value} = matchingResults[selectedIndex]; this.props.updateInput(value); this.setState({showResults: false, selectedIndex: 0}); } return; } if (e.key == "Escape") { e.preventDefault(); this.setState({showResults: false, selectedIndex: 0}); return; } let selectionMove = 0; if (e.key == "ArrowDown") { selectionMove = 1; } if (e.key == "ArrowUp") { selectionMove = -1; } if (selectionMove != 0) { e.preventDefault(); if (!showResults) { this.setState({showResults: true, selectedIndex: 0, scrollToSelectedIndex: scrollToSelectedIndex + 1}); return; } let index = selectedIndex + selectionMove; let length = matchingResults.length; if (index < 0) { index = length - 1; } if (index > length - 1) { index = 0; } this.setState({selectedIndex: index, scrollToSelectedIndex: scrollToSelectedIndex + 1}); } } onResultsMouseDown() { this.setState({resultsMouseIsDown: true}); } onResultsMouseUp() { this.setState({resultsMouseIsDown: false}); } onResultClick(value) { this.props.updateInput(value); this.setState({showResults: false, selectedIndex: 0}); } onResultMouseEnter(index) { this.setState({selectedIndex: index, scrollToSelectedIndex: this.state.scrollToSelectedIndex + 1}); } onScroll() { let scrollTopIndex = Math.floor(this.refs.scrollBox.scrollTop / this.state.itemHeight); if (scrollTopIndex != this.state.scrollTopIndex) { this.setState({scrollTopIndex}); } } componentDidUpdate(prevProps, prevState) { if (this.state.itemHeight == 1) { let anItem = this.refs.scrollBox.querySelector(".autocomplete-item"); if (anItem) { let itemHeight = anItem.offsetHeight; if (itemHeight > 0) { this.setState({itemHeight}); } } return; } let sel = this.refs.selectedItem; let marginTop = 5; if (this.state.scrollToSelectedIndex != prevState.scrollToSelectedIndex && sel && sel.offsetParent) { if (sel.offsetTop + marginTop < sel.offsetParent.scrollTop) { sel.offsetParent.scrollTop = sel.offsetTop + marginTop; } else if (sel.offsetTop + marginTop + sel.offsetHeight > sel.offsetParent.scrollTop + sel.offsetParent.offsetHeight) { sel.offsetParent.scrollTop = sel.offsetTop + marginTop + sel.offsetHeight - sel.offsetParent.offsetHeight; } } } render() { let {matchingResults} = this.props; let { showResults, selectedIndex, scrollTopIndex, itemHeight, resultsMouseIsDown, } = this.state; // For better performance only render the visible autocomplete items + at least one invisible item above and below (if they exist) const RENDERED_ITEMS_COUNT = 11; let firstIndex = 0; let lastIndex = matchingResults.length - 1; let firstRenderedIndex = Math.max(0, scrollTopIndex - 2); let lastRenderedIndex = Math.min(lastIndex, firstRenderedIndex + RENDERED_ITEMS_COUNT); let topSpace = (firstRenderedIndex - firstIndex) * itemHeight; let bottomSpace = (lastIndex - lastRenderedIndex) * itemHeight; let topSelected = (selectedIndex - firstIndex) * itemHeight; return ( h("div", {className: "autocomplete-container", style: {display: (showResults && matchingResults.length > 0) || resultsMouseIsDown ? "" : "none"}, onMouseDown: this.onResultsMouseDown, onMouseUp: this.onResultsMouseUp}, h("div", {className: "autocomplete", onScroll: this.onScroll, ref: "scrollBox"}, h("div", {ref: "selectedItem", style: {position: "absolute", top: topSelected + "px", height: itemHeight + "px"}}), h("div", {style: {height: topSpace + "px"}}), matchingResults.slice(firstRenderedIndex, lastRenderedIndex + 1) .map(({key, value, element}, index) => h("a", { key, className: "autocomplete-item " + (selectedIndex == index + firstRenderedIndex ? "selected" : ""), onClick: () => this.onResultClick(value), onMouseEnter: () => this.onResultMouseEnter(index + firstRenderedIndex) }, element) ), h("div", {style: {height: bottomSpace + "px"}}) ) ) ); } } function getRecordId(href) { let url = new URL(href); // Find record ID from URL let searchParams = new URLSearchParams(url.search.substring(1)); // Salesforce Classic and Console if (url.hostname.endsWith(".salesforce.com")) { let match = url.pathname.match(/\/([a-zA-Z0-9]{3}|[a-zA-Z0-9]{15}|[a-zA-Z0-9]{18})(?:\/|$)/); if (match) { let res = match[1]; if (res.includes("0000") || res.length == 3) { return match[1]; } } } // Lightning Experience and Salesforce1 if (url.hostname.endsWith(".lightning.force.com")) { let match; if (url.pathname == "/one/one.app") { // Pre URL change: https://docs.releasenotes.salesforce.com/en-us/spring18/release-notes/rn_general_enhanced_urls_cruc.htm match = url.hash.match(/\/sObject\/([a-zA-Z0-9]+)(?:\/|$)/); } else { match = url.pathname.match(/\/lightning\/[r|o]\/[a-zA-Z0-9_]+\/([a-zA-Z0-9]+)/); } if (match) { return match[1]; } } // Visualforce { let idParam = searchParams.get("id"); if (idParam) { return idParam; } } // Visualforce page that does not follow standard Visualforce naming for (let [, p] of searchParams) { if (p.match(/^([a-zA-Z0-9]{3}|[a-zA-Z0-9]{15}|[a-zA-Z0-9]{18})$/) && p.includes("0000")) { return p; } } return null; } function getSfPathFromUrl(href) { let url = new URL(href); if (url.protocol.endsWith("-extension:")) { return "/"; } return url.pathname; } function sfLocaleKeyToCountryCode(localeKey) { //Converts a Salesforce locale key to a lower case country code (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) or "". if (!localeKey) { return ""; } return localeKey.split("_").pop().toLowerCase(); } window.getRecordId = getRecordId; // for unit tests
39.165056
281
0.595708
94074a41243d3a0534d2d4adc2335ce9681cb064
3,250
js
JavaScript
src/ThreadRow/ThreadRow.js
nodegin/lihkg-web
034f9017ec734e3ac26a812a47c318a61d1607a4
[ "MIT" ]
85
2016-11-30T12:14:41.000Z
2020-08-07T20:21:55.000Z
src/ThreadRow/ThreadRow.js
nodegin/lihkg-web
034f9017ec734e3ac26a812a47c318a61d1607a4
[ "MIT" ]
43
2016-12-02T08:02:31.000Z
2016-12-20T06:37:50.000Z
src/ThreadRow/ThreadRow.js
nodegin/lihkg-web
034f9017ec734e3ac26a812a47c318a61d1607a4
[ "MIT" ]
30
2016-11-30T14:41:37.000Z
2019-10-04T09:22:07.000Z
import React from 'react' import { Link, browserHistory } from 'react-router' import moment from 'moment' import { Dropdown } from 'semantic-ui-react' import './ThreadRow.css' class ThreadRow extends React.PureComponent { render() { const { app, data } = this.props let cateogryRowClassName = 'ThreadRow-row' const index = app.visitedThreads.findIndex(c => c.threadId.toString() === data.thread_id) const isVisited = index >= 0 const replyNumDelta = isVisited ? data.no_of_reply - 1 - app.visitedThreads[index].replyNum : null if (isVisited) { cateogryRowClassName += ' visited' } const lastReadPage = isVisited && app.visitedThreads[index].replyNum > 0 ? Math.ceil(app.visitedThreads[index].replyNum / 25) : 1 const handlePageChange = (e, item) => browserHistory.push(`/thread/${ data.thread_id }/page/${ item.value }`) const color = data.user.level === '999' ? '#FF9800' : (data.user.gender === 'M' ? '#7986CB' : '#F06292') const cf = (className, cond) => cond ? className : '' const highlightLikeDislikeDifference = 5 const highlightProportion = 2.5 const highlightThreshold = 100 const pages = Math.ceil(data.no_of_reply / 25) const pagesOptions = new Array(pages).fill().map((_, i) => { return { text: `第 ${ i + 1 } 頁`, value: i + 1 } }) return ( <div className={ cateogryRowClassName } style={{ background: this.props.highlighted ? 'rgba(128, 128, 128, .1)' : 'transparent' }}> <small> <span style={{ color }}>{ data.user.nickname }</span> &emsp; <span className={ cf('ThreadRow-row-manyLike', data.like_count - data.dislike_count > highlightLikeDislikeDifference && data.like_count / Math.max(data.dislike_count, 1) > highlightProportion) }>{ data.like_count } 正皮</span> &nbsp; <span className={ cf('ThreadRow-row-manyDislike', data.dislike_count - data.like_count > highlightLikeDislikeDifference && data.dislike_count / Math.max(data.like_count, 1) > highlightProportion) }>{ data.dislike_count } 負皮</span> { ' - ' } { moment(data.last_reply_time * 1000).fromNow() } { ' - ' } <span className={ cf('ThreadRow-row-hotThread', data.no_of_reply > highlightThreshold) }>{ data.no_of_reply - 1 } 回覆</span> { isVisited && replyNumDelta > 0 ? <span style={{ color: '#26A69A' }}> ({ replyNumDelta }個新回覆)</span> : null } </small> <div className="ThreadRow-row-titleWrapper"> <div className="ThreadRow-row-title"> <Link to={ `/thread/${ data.thread_id }/page/${ lastReadPage }`}>{ data.title }</Link> { this.props.lastRead && this.props.lastRead >= 1 ? ( <span> <br/> 上次睇到 <Link to={ `/thread/${ data.thread_id }/page/${ this.props.lastRead }`}>第 { this.props.lastRead } 頁</Link> </span> ) : null } </div> <div className="ThreadRow-row-page"> <Dropdown inline scrolling text={ `${ pages } 頁` } options={ pagesOptions } onChange={ handlePageChange } selectOnBlur={ false }/> </div> </div> </div> ) } } export default ThreadRow
49.242424
240
0.608923
94076a9514f8a918a005696a478fea0ab6bcdddd
2,342
js
JavaScript
app/modules/metadata.js
m1ck2/neon-wallet
19ad1d76e9c2e274a29fd6c0ab1ca6a88f0c4317
[ "MIT" ]
1
2018-05-18T22:52:24.000Z
2018-05-18T22:52:24.000Z
app/modules/metadata.js
m1ck2/neon-wallet
19ad1d76e9c2e274a29fd6c0ab1ca6a88f0c4317
[ "MIT" ]
1
2017-12-28T05:45:56.000Z
2017-12-28T05:45:56.000Z
app/modules/metadata.js
m1ck2/neon-wallet
19ad1d76e9c2e274a29fd6c0ab1ca6a88f0c4317
[ "MIT" ]
null
null
null
// @flow import { getWalletDBHeight, getAPIEndpoint } from 'neon-js' import axios from 'axios' import { version } from '../../package.json' import { showWarningNotification } from './notification' import { NETWORK, EXPLORER, NEON_WALLET_RELEASE_LINK } from '../core/constants' import { openExternal } from '../core/electron' import { FIVE_MINUTES_MS } from '../core/time' // Constants export const SET_HEIGHT = 'SET_HEIGHT' export const SET_NETWORK = 'SET_NETWORK' export const SET_EXPLORER = 'SET_EXPLORER' // Actions export function setNetwork (net: NetworkType) { const network = net === NETWORK.MAIN ? NETWORK.MAIN : NETWORK.TEST return { type: SET_NETWORK, net: network } } export function setBlockHeight (blockHeight: number) { return { type: SET_HEIGHT, blockHeight } } export function setBlockExplorer (blockExplorer: ExplorerType) { return { type: SET_EXPLORER, blockExplorer } } export const checkVersion = () => (dispatch: DispatchType, getState: GetStateType) => { const state = getState().metadata const { net } = state const apiEndpoint = getAPIEndpoint(net) return axios.get(`${apiEndpoint}/v2/version`).then((res) => { const shouldUpdate = res && res.data && res.data.version !== version && res.data.version !== '0.0.5' if (shouldUpdate) { dispatch(showWarningNotification({ message: `Your wallet is out of date! Please download the latest version from ${NEON_WALLET_RELEASE_LINK}`, dismissAfter: FIVE_MINUTES_MS, onClick: () => openExternal(NEON_WALLET_RELEASE_LINK) })) } }).catch((e) => {}) } export const syncBlockHeight = (net: NetworkType) => (dispatch: DispatchType) => { getWalletDBHeight(net).then((blockHeight) => { return dispatch(setBlockHeight(blockHeight)) }) } const initialState = { blockHeight: 0, network: NETWORK.MAIN, blockExplorer: EXPLORER.NEO_TRACKER } export default (state: Object = initialState, action: Object) => { switch (action.type) { case SET_HEIGHT: return { ...state, blockHeight: action.blockHeight } case SET_EXPLORER: return { ...state, blockExplorer: action.blockExplorer } case SET_NETWORK: return { ...state, network: action.net } default: return state } }
26.613636
115
0.669513
940839a84435a14d4b5b370317d5160b3f24ec7c
6,992
js
JavaScript
hp/wp-content/plugins/antivirus/js/script.js
acv-chungpt/ainohoumon
be7170f471292aa22417f2dd1379eccdadf3f7b3
[ "Apache-2.0" ]
null
null
null
hp/wp-content/plugins/antivirus/js/script.js
acv-chungpt/ainohoumon
be7170f471292aa22417f2dd1379eccdadf3f7b3
[ "Apache-2.0" ]
null
null
null
hp/wp-content/plugins/antivirus/js/script.js
acv-chungpt/ainohoumon
be7170f471292aa22417f2dd1379eccdadf3f7b3
[ "Apache-2.0" ]
null
null
null
jQuery(document).ready( function($) { /* Init */ av_nonce = av_settings.nonce; av_theme = av_settings.theme; av_msg_1 = av_settings.msg_1; av_msg_2 = av_settings.msg_2; av_msg_3 = av_settings.msg_3; /* Einzelne Datei prüfen */ function check_theme_file(current) { /* ID umwandeln */ var id = parseInt(current || 0); /* File ermitteln */ var file = av_files[id]; /* Request starten */ $.post( ajaxurl, { 'action': 'get_ajax_response', '_ajax_nonce': av_nonce, '_theme_file': file, '_action_request': 'check_theme_file' }, function(input) { /* Wert initialisieren */ var item = $('#av_template_' + id); /* Daten vorhanden? */ if ( input ) { /* Sicherheitscheck */ if ( !input.nonce || input.nonce != av_nonce ) { return; } /* Farblich anpassen */ item.addClass('danger'); /* Init */ var i, lines = input.data, len = lines.length; /* Zeilen loopen */ for (i = 0; i < len; i = i + 3) { var num = parseInt(lines[i]) + 1, md5 = lines[i + 2], line = lines[i + 1].replace(/@span@/g, '<span>').replace(/@\/span@/g, '</span>'), file = item.text(); item.append('<p><a href="#" id="' + md5 + '">' + av_msg_1 + '</a> <code>' + line + '</code></p>'); $('#' + md5).click( function() { $.post( ajaxurl, { 'action': 'get_ajax_response', '_ajax_nonce': av_nonce, '_file_md5': $(this).attr('id'), '_action_request': 'update_white_list' }, function(input) { /* Keine Daten? */ if (!input) { return; } /* Sicherheitscheck */ if (!input.nonce || input.nonce != av_nonce) { return; } var parent = $('#' + input.data[0]).parent(); if (parent.parent().children().length <= 1) { parent.parent().hide('slow').remove(); } parent.hide('slow').remove(); } ); return false; } ); } } else { item.addClass('done'); } /* Counter erhöhen */ av_files_loaded ++; /* Hinweis ausgeben */ if ( av_files_loaded >= av_files_total ) { $('#av_manual_scan .alert').text(av_msg_3).fadeIn().fadeOut().fadeIn().fadeOut().fadeIn().animate({opacity: 1.0}, 500).fadeOut( 'slow', function() { $(this).empty(); } ); } else { check_theme_file(id + 1); } } ); } /* Tempates Check */ $('#av_manual_scan a.button').click( function() { /* Request */ $.post( ajaxurl, { action: 'get_ajax_response', _ajax_nonce: av_nonce, _action_request: 'get_theme_files' }, function(input) { /* Keine Daten? */ if ( !input ) { return; } /* Sicherheitscheck */ if ( !input.nonce || input.nonce != av_nonce ) { return; } /* Wert initialisieren */ var output = ''; /* Globale Werte */ av_files = input.data; av_files_total = av_files.length; av_files_loaded = 0; /* Files visualisieren */ jQuery.each( av_files, function(i, val) { output += '<div id="av_template_' + i + '">' + val + '</div>'; } ); /* Werte zuweisen */ $('#av_manual_scan .alert').empty(); $('#av_manual_scan .output').empty().append(output); /* Files loopen */ check_theme_file(); } ); return false; } ); /* Checkboxen markieren */ function manage_options() { var $$ = $('#av_cronjob_enable'), input = $$.parents('fieldset').find(':text, :checkbox').not($$); if ( typeof $.fn.prop === 'function' ) { input.prop('disabled', !$$.prop('checked')); } else { input.attr('disabled', !$$.attr('checked')); } } /* Checkbox überwachen */ $('#av_cronjob_enable').click(manage_options); /* Fire! */ manage_options(); } );
38.844444
152
0.291762
94091e7ccbff30f254e70c9c72b684b35de31b56
6,808
js
JavaScript
src/js/helpers/ciphers.js
krutoo/ciphers-pwa-vanilla
1b3baceda43182c4cd4606e08df39f0ddba77471
[ "MIT" ]
null
null
null
src/js/helpers/ciphers.js
krutoo/ciphers-pwa-vanilla
1b3baceda43182c4cd4606e08df39f0ddba77471
[ "MIT" ]
2
2021-03-08T17:26:47.000Z
2021-05-06T21:12:56.000Z
src/js/helpers/ciphers.js
krutoo/ciphers-pwa-vanilla
1b3baceda43182c4cd4606e08df39f0ddba77471
[ "MIT" ]
null
null
null
import { classOf, math, string } from './utils.js'; /** * Encrypts/Decrypts the message with an Caesar cipher. * Characters not found in the alphabet are not encrypted. * * @param {String} message Message to encrypt/decrypt * @param {String} alphabet Alphabet * @param {Number} shift Key of cipher. Is a offset by alphabet. Default is 0 * @return {string} Result of encrypt/decrypt */ export const caesar = (message, alphabet, shift) => { message = String(message); // make a String from anything alphabet = string.removeDuplicates(alphabet); shift = isNaN(parseInt(shift, 10)) ? 0 : parseInt(shift, 10); // default shift is 0 return message // to Array of characters .split('') // replace characters to indexes in alphabet .map(char => alphabet.indexOf(char) !== -1 ? alphabet.indexOf(char) : char) // get new index of character // if is NaN then is character are is not in alphabet and we do not process it .map(item => classOf(item) === 'Number' ? item + shift : item) // processing of exceeding the limit .map(item => classOf(item) === 'Number' ? (alphabet.length + (item % alphabet.length)) % alphabet.length : item) // replace each charCode to character .map(item => classOf(item) === 'Number' ? alphabet[item] : item) // to String .join(''); }; /** * Encrypts the message with an multiplicative cipher. * Characters not found in the alphabet are not encrypted. * * @param {String} message Message to encrypt * @param {String} alphabet Alphabet with length > 0 * @param {Number} key Key of cipher * @return {string} Result of encrypt */ export const multiplicative = (message, alphabet, key) => affine(message, alphabet, key, 0); /** * Encrypts/Decrypts the message with an affine cipher. * Characters not found in the alphabet are not encrypted. * * @param {String} message Message to encrypt * @param {String} alphabet Alphabet with length > 0 * @param {Number} a First component of key * @param {Number} b Second component of key * @return {string} Result of encrypt */ export const affine = (message, alphabet, a, b) => { message = String(message); // make string from anything alphabet = string.removeDuplicates(alphabet); a = isNaN(parseInt(a, 10)) ? 0 : parseInt(a, 10); b = isNaN(parseInt(b, 10)) ? 0 : parseInt(b, 10); // if a and length of alphabet is not coprime numbers or // b more than alphabet length returns unencrypted message if (!math.isCoprime(a, alphabet.length)) { return message; } return message // to array of characters .split('') // replace characters to indexes in alphabet .map(item => alphabet.indexOf(item) !== -1 ? alphabet.indexOf(item) : item) // use encryption function // if is NaN then is character are is not in alphabet and we do not process it .map(item => classOf(item) === 'Number' ? (a * item + b) % alphabet.length : item) // processing of exceeding the limit .map(item => classOf(item) === 'Number' ? (alphabet.length + (item % alphabet.length)) % alphabet.length : item) // replace indexes in alphabet to characters .map(item => classOf(item) === 'Number' ? alphabet[item] : item) // to String .join(''); }; /** * Encrypts/Decrypts the message with an autokey cipher. * Characters not found in the alphabet are not encrypted. * * @param {string} message Message to encrypt/decrypt * @param {string} alphabet Alphabet with length > 0 * @param {Number} key Key of cipher * @param {Boolean} decrypt Determines what decryption is needed * @return {string} Result of encrypt/decrypt */ export const autokey = (message, alphabet, key, decrypt) => { message = String(message).split(''); // make String from anything and convert to Array alphabet = string.removeDuplicates(alphabet); key = isNaN(parseInt(key, 10)) ? 0 : parseInt(key, 10); let keys = [key], unexpectedSymbols = []; // save indexes of characters which are not in alphabet message.forEach((item, index) => { if (alphabet.indexOf(item) === -1) { unexpectedSymbols[index] = item; } }); message = message // remove characters which are not in alphabet .filter(item => alphabet.indexOf(item) !== -1) // replace characters to indexes in alphabet .map(item => alphabet.indexOf(item)) // use encryption/decryption function // if is NaN then is character are is not in alphabet and we do not process it .map((item, index) => { keys.push(decrypt ? item - keys[index] : item); return classOf(item) === 'Number' ? ( item + (decrypt ? -keys[index] : keys[index]) ) % alphabet.length // if decrypt - get revert index : item; }) // processing of exceeding the limit .map(item => classOf(item) === 'Number' ? (alphabet.length + (item % alphabet.length)) % alphabet.length : item) // replace indexes in alphabet to characters .map(item => classOf(item) === 'Number' ? alphabet[item] : item); // restore characters which are not in alphabet unexpectedSymbols.forEach((item, index) => message.splice(index, 0, item)); return message.join(''); // return string }; export const vigenere = (message, alphabet, key, decrypt) => { message = String(message).split(''); // make String from anything and transform to array alphabet = string.removeDuplicates(alphabet); key = String(key); // cipher key // save indexes of characters which are not in alphabet let unexpectedSymbols = []; message.forEach((item, index) => { if (alphabet.indexOf(item) === -1) { unexpectedSymbols[index] = item; } }); // make key length to greater or equal message length while (key.length < message.length) { key += key; } key = key .slice(0, message.length) // make key length to equal message length .split('') // convert to Array .map(char => alphabet.indexOf(char) !== -1 ? alphabet.indexOf(char) : char) // replace characters to indexes .filter(char => classOf(char) === 'Number'); // remove characters which are not in alphabet message = message // remove characters which are not in alphabet .filter(item => alphabet.indexOf(item) !== -1) // replace characters to indexes in alphabet .map(char => alphabet.indexOf(char) !== -1 ? alphabet.indexOf(char) : char) // use encryption/decryption function // if is NaN then is character are is not in alphabet and we do not process it .map((item, index) => classOf(item) === 'Number' ? item + (decrypt ? -key[index] : key[index]) : item) // processing of exceeding the limit .map(item => classOf(item) === 'Number' ? (alphabet.length + (item % alphabet.length)) % alphabet.length : item) // replace each charCode to character .map(item => classOf(item) === 'Number' ? alphabet[item] : item); // restore characters which are not in alphabet unexpectedSymbols.forEach((item, index) => message.splice(index, 0, item)); return message.join(''); // return string };
39.581395
114
0.682579
940a124655eae943f98e08b1605c6104e9ba0a78
4,147
js
JavaScript
PDMS/web/csjs/celltooltips.js
atealxt/work-workspaces
f3a59de7ecb3b3278473209224307d440003fc42
[ "MIT" ]
null
null
null
PDMS/web/csjs/celltooltips.js
atealxt/work-workspaces
f3a59de7ecb3b3278473209224307d440003fc42
[ "MIT" ]
2
2021-12-14T20:32:17.000Z
2021-12-18T18:17:34.000Z
PDMS/web/csjs/celltooltips.js
atealxt/work-workspaces
f3a59de7ecb3b3278473209224307d440003fc42
[ "MIT" ]
1
2015-08-31T07:57:08.000Z
2015-08-31T07:57:08.000Z
// Create the namespace Ext.namespace('Ext.ux.plugins.grid'); /** * Ext.ux.plugins.grid.CellToolTips plugin for Ext.grid.GridPanel * * A GridPanel plugin that enables the creation of record based, * per-column tooltips. * * Requires Animal's triggerElement override * (from <a href="http://extjs.com/forum/showthread.php?p=265259#post265259">http://extjs.com/forum/showthread.php?p=265259#post265259</a>) * * @author BitPoet * @date February 12, 2009 * @version 1.0 * * @class Ext.ux.plugins.grid.CellToolTips * @extends Ext.util.Observable */ /** * Constructor for the Plugin * * @param {ConfigObject} config * @constructor */ Ext.ux.plugins.grid.CellToolTips = function(config) { var cfgTips; if( Ext.isArray(config) ) { cfgTips = config; config = {}; } else { cfgTips = config.cellTips; } Ext.ux.plugins.grid.CellToolTips.superclass.constructor.call(this, config); if( config.tipConfig ) { this.tipConfig = config.tipConfig; } this.cellTips = cfgTips; } // End of constructor // plugin code Ext.extend( Ext.ux.plugins.grid.CellToolTips, Ext.util.Observable, { /** * Temp storage from the config object * * @private */ cellTips: false, /** * Tooltip Templates indexed by column id * * @private */ tipTpls: false, /** * Tooltip configuration items * * @private */ tipConfig: {}, /** * Plugin initialization routine * * @param {Ext.grid.GridPanel} grid */ init: function(grid) { if( ! this.cellTips ) { return; } this.tipTpls = {}; // Generate tooltip templates Ext.each( this.cellTips, function(tip) { this.tipTpls[tip.field] = new Ext.XTemplate( tip.tpl ); }, this); // delete now superfluous config entry for cellTips delete( this.cellTips ); grid.on( 'render', this.onGridRender.createDelegate(this) ); } // End of function init /** * Set/Add a template for a column * * @param {String} fld * @param {String | Ext.XTemplate} tpl */ ,setFieldTpl: function(fld, tpl) { this.tipTpls[fld] = Ext.isObject(tpl) ? tpl : new Ext.XTemplate(tpl); } // End of function setFieldTpl /** * Set up the tooltip when the grid is rendered * * @private * @param {Ext.grid.GridPanel} grid */ ,onGridRender: function(grid) { if( ! this.tipTpls ) { return; } // Create one new tooltip for the whole grid Ext.apply(this.tipConfig, { target: grid.getView().mainBody, delegate: '.x-grid3-cell-inner', trackMouse: true, //20090225 add start maxWidth :500, dismissDelay : 10000, //20090225 add end renderTo: document.body }); var newTip = new Ext.ToolTip( this.tipConfig ); // Hook onto the beforeshow event to update the tooltip content newTip.on('beforeshow', this.beforeTipShow.createDelegate(newTip, [this, grid], true)); } // End of function onGridRender /** * Replace the tooltip body by applying current row data to the template * * @private * @param {Ext.ToolTip} tip * @param {Ext.ux.plugins.grid.CellToolTips} ctt * @param {Ext.grid.GridPanel} grid */ ,beforeTipShow: function(tip, ctt, grid) { // Get column id and check if a tip is defined for it var colIdx = grid.getView().findCellIndex( tip.triggerElement ); var tipId = grid.getColumnModel().getDataIndex( colIdx ); //alert( 'Checking if there is a tip for column ' + tipId ); if( ! ctt.tipTpls[tipId] ) { return false; } // Fetch the row's record from the store and apply the template var cellRec = grid.getStore().getAt( grid.getView().findRowIndex( tip.triggerElement ) ); tip.body.dom.innerHTML = ctt.tipTpls[tipId].apply( cellRec.data ); } // End of function beforeTipShow }); // End of extend
29
139
0.596094
940a1726c113769ce1d795e77b50e757698e6db7
2,896
js
JavaScript
src/utils/utils.js
markerikson/react-redux-cesium-testing-demo
b7824c827a1dc451162810af0999011d919528fc
[ "0BSD" ]
55
2016-03-24T23:07:02.000Z
2021-04-29T08:22:00.000Z
src/utils/utils.js
markerikson/react-redux-cesium-testing-demo
b7824c827a1dc451162810af0999011d919528fc
[ "0BSD" ]
5
2016-09-03T20:58:55.000Z
2017-03-08T18:07:45.000Z
src/utils/utils.js
markerikson/react-redux-cesium-testing-demo
b7824c827a1dc451162810af0999011d919528fc
[ "0BSD" ]
10
2016-07-19T14:17:21.000Z
2019-06-27T15:11:57.000Z
import React from 'react'; import ReactDOM from 'react-dom'; import { Provider } from 'react-redux'; //import DevTools from 'containers/DevToolsWindow'; export function createConstants (...constants) { return constants.reduce((acc, constant) => { acc[constant] = constant; return acc; }, {}); } export function createReducer (initialState, fnMap) { return (state = initialState, { type, payload }) => { const handler = fnMap[type]; return handler ? handler(state, payload) : state; }; } export function reduceReducers(...reducers) { return (previous, current) => reducers.reduce( (p, r) => r(p, current), previous ); } /* export function createDevToolsWindow (store) { const win = window.open( null, 'redux-devtools', // give it a name so it reuses the same window `width=400,height=${window.outerHeight},menubar=no,location=no,resizable=yes,scrollbars=no,status=no` ); // reload in case it's reusing the same window with the old content win.location.reload(); // wait a little bit for it to reload, then render setTimeout(() => { // Wait for the reload to prevent: // "Uncaught Error: Invariant Violation: _registerComponent(...): Target container is not a DOM element." win.document.write('<div id="react-devtools-root"></div>'); win.document.body.style.margin = '0'; ReactDOM.render( <Provider store={store}> <DevTools /> </Provider> , win.document.getElementById('react-devtools-root') ); }, 10); } */ export function shallowEqual(objA, objB) { if (objA === objB) { return true } const keysA = Object.keys(objA) const keysB = Object.keys(objB) if (keysA.length !== keysB.length) { return false } // Test for A's keys different from B. const hasOwn = Object.prototype.hasOwnProperty for (let i = 0; i < keysA.length; i++) { if (!hasOwn.call(objB, keysA[i]) || objA[keysA[i]] !== objB[keysA[i]]) { return false } } return true } export function smarterIsEqual(oldValue, newValue) { let areSameReference = (oldValue === newValue); let areShallowEqual = false; let areLooselyEqual = false; if(!areSameReference) { areShallowEqual = shallowEqual(oldValue, newValue); } if(!areShallowEqual) { areLooselyEqual = _.isEqual(oldValue, newValue); } return areSameReference || areShallowEqual || areLooselyEqual; } export function smarterShouldComponentUpdate(nextProps, nextState) { return !smarterIsEqual(this.props, nextProps) || !smarterIsEqual(this.state, nextState); } export let smarterUpdateMixin = { shouldComponentUpdate : smarterShouldComponentUpdate }; export function mixin(Parent, ...mixins) { class Mixed extends Parent {} for (let mixin of mixins) { for (let prop in mixin) { Mixed.prototype[prop] = mixin[prop]; } } return Mixed; };
25.628319
109
0.665401
940af58eb5c9756ce80d8393f24a351775d02d40
2,947
js
JavaScript
test/test.js
Planeshifter/kernel.js
2db25124e01c0fc941c93757fdbb1fd72ed95c87
[ "MIT" ]
19
2015-02-11T23:49:23.000Z
2020-05-29T06:57:03.000Z
test/test.js
Planeshifter/kernel.js
2db25124e01c0fc941c93757fdbb1fd72ed95c87
[ "MIT" ]
4
2015-02-28T15:25:06.000Z
2017-09-03T01:19:02.000Z
test/test.js
Planeshifter/kernel.js
2db25124e01c0fc941c93757fdbb1fd72ed95c87
[ "MIT" ]
5
2016-05-26T14:57:17.000Z
2021-03-05T12:39:17.000Z
var chai = require( 'chai' ); var expect = chai.expect; var kernel = require( './../lib/' ); describe(".fun", function(){ it("is an object of kernel functions", function(){ expect(kernel.fun).to.be.an("object"); expect(kernel.fun).to.include.keys(["gaussian", "boxcar", "epanechnikov", "tricube"]); }); }); describe(".density()", function(){ it("throws when negative bandwidth is provided", function(){ expect(function(){ kernel.density([-2, 0, 1], kernel.fun.gaussian, -2); }).to.throw(Error); }); it("throws when no kernel function is provided", function(){ expect(function(){ kernel.density([-2, 0, 1], null, 0.3); }).to.throw(Error); }); it("returns a function", function(){ var f = kernel.density([-2, 0, 1], kernel.fun.gaussian, 0.3); expect(f).to.be.a("function"); }); }); describe(".regression()", function(){ it("throws when negative bandwidth is provided", function(){ expect(function(){ kernel.regression([-2, 0, 1], [2,3,5], kernel.fun.gaussian, -2); }).to.throw(Error); }); it("throws when no kernel function is provided", function(){ expect(function(){ kernel.regression([-2, 0, 1], [2,3,5], null, 0.3); }).to.throw(Error); }); it("throws when no ys are supplied", function(){ expect(function(){ kernel.regression([-2, 0, 1], null, kernel.fun.gaussian, 0.3); }).to.throw(Error); }); it("returns a function", function(){ var f = kernel.regression([-2, 0, 1], [2,3,5], kernel.fun.gaussian, 0.3); expect(f).to.be.a("function"); }); }); describe(".multipleRegression()", function(){ it("throws when negative bandwidth is provided", function(){ expect(function(){ kernel.multipleRegression([[-2, 0],[3, 5],[8, 8]], [2,3,5], kernel.fun.gaussian, -2); }).to.throw(Error); }); it("throws when no kernel function is provided", function(){ expect(function(){ kernel.multipleRegression([[-2, 0],[3, 5],[8, 8]], [2,3,5], null, 0.3); }).to.throw(Error); }); it("throws when no ys are supplied", function(){ expect(function(){ kernel.multipleRegression([[-2, 0],[3, 5],[8, 8]], null, kernel.fun.gaussian, 0.3); }).to.throw(Error); }); it("returns a function", function(){ var f = kernel.multipleRegression([[-2, 0],[3, 5],[8, 8]], [2,3,5], kernel.fun.gaussian, 0.3); expect(f).to.be.a("function"); }); it("the returned function expects array of length p as input", function(){ var f = kernel.multipleRegression([[2, 0],[3, 5],[8, 8]], [2,3,5], kernel.fun.gaussian, 0.3); var x_p = [1,3]; var res = f(x_p); expect(res).to.be.a("number"); expect(function(){ f([2,3,4]); }).to.throw(Error); }); }); describe(".silverman()", function(){ it("returns an optimal bandwith", function(){ var x = [0,0,1,1,1,2,2]; var h = kernel.silverman(x); expect(h).to.be.closeTo(0.586, 0.01); }); });
30.381443
99
0.584662
940b21ab3ca9bb03caa1239a741bedef20932161
5,333
js
JavaScript
PyDocs.js
bazitur/brackets-python-tools-migrate
1e9c54cba0cb7dc7ca5cc9fbe4102cc9f9720b56
[ "MIT" ]
25
2017-11-04T11:32:18.000Z
2020-06-12T03:12:44.000Z
PyDocs.js
bazitur/brackets-python-tools-migrate
1e9c54cba0cb7dc7ca5cc9fbe4102cc9f9720b56
[ "MIT" ]
7
2017-11-13T15:02:21.000Z
2021-06-24T10:36:19.000Z
PyDocs.js
bazitur/brackets-python-tools-migrate
1e9c54cba0cb7dc7ca5cc9fbe4102cc9f9720b56
[ "MIT" ]
8
2017-11-29T15:42:38.000Z
2020-04-07T00:07:07.000Z
define(function (require, exports, module) { "use strict"; var Dialogs = brackets.getModule("widgets/Dialogs"), DocumentManager = brackets.getModule("document/DocumentManager"), ExtensionUtils = brackets.getModule("utils/ExtensionUtils"), InlineWidget = brackets.getModule("editor/InlineWidget").InlineWidget, KeyEvent = brackets.getModule("utils/KeyEvent"), Mustache = brackets.getModule("thirdparty/mustache/mustache"); // Lines height for scrolling var SCROLL_LINE_HEIGHT = 40; var docsTemplate = require("text!templates/docs.html"); var pythonAPI = null; function PyDocs(pyAPI) { pythonAPI = pyAPI; return inlineProvider; } // Load template function inlineProvider(hostEditor, pos) { var langId = hostEditor.getLanguageForSelection().getId(); if (langId !== "python") return null; var cursor = hostEditor.getCursorPos(true), word = hostEditor._codeMirror.findWordAt(cursor), line = hostEditor.document.getRange({line: word.anchor.line, ch: 0}, word.head), result = new $.Deferred(), request = { source: DocumentManager.getCurrentDocument().getText(), // file contents line: cursor.line, // line no., starting with 0 column: cursor.ch, // column no. path: hostEditor.document.file._path, // file path type: 'docs' // type of query }; pythonAPI(request) .done(function (response) { if (response.docs === null) { result.reject(); } var inlineWidget = new InlineDocsViewer(response); inlineWidget.load(hostEditor); result.resolve(inlineWidget); }) .fail(function () { result.reject(); }); return result.promise(); } function InlineDocsViewer(docs) { InlineWidget.call(this); var html = Mustache.render(docsTemplate, docs); this.$wrapperDiv = $(html); this.$htmlContent.append(this.$wrapperDiv); Dialogs.addLinkTooltips(this.$wrapperDiv); this.$scroller = this.$wrapperDiv.find(".scroller"); this._onKeydown = this._onKeydown.bind(this); } InlineDocsViewer.prototype = Object.create(InlineWidget.prototype); InlineDocsViewer.prototype.constructor = InlineDocsViewer; InlineDocsViewer.prototype.parentClass = InlineWidget.prototype; InlineDocsViewer.prototype.$wrapperDiv = null; InlineDocsViewer.prototype.$scroller = null; /** * Convert keydown events into navigation actions. * * @param {KeyboardEvent} event * @return {boolean} indication whether key was handled */ InlineDocsViewer.prototype._onKeydown = function (event) { var keyCode = event.keyCode, scroller = this.$scroller[0], scrollPos; // Ignore key events with modifier keys if (event.altKey || event.ctrlKey || event.metaKey || event.shiftKey) { return false; } // Handle keys that we're interested in scrollPos = scroller.scrollTop; switch (keyCode) { case KeyEvent.DOM_VK_UP: scrollPos = Math.max(0, scrollPos - SCROLL_LINE_HEIGHT); break; case KeyEvent.DOM_VK_PAGE_UP: scrollPos = Math.max(0, scrollPos - scroller.clientHeight); break; case KeyEvent.DOM_VK_DOWN: scrollPos = Math.min(scroller.scrollHeight - scroller.clientHeight, scrollPos + SCROLL_LINE_HEIGHT); break; case KeyEvent.DOM_VK_PAGE_DOWN: scrollPos = Math.min(scroller.scrollHeight - scroller.clientHeight, scrollPos + scroller.clientHeight); break; default: // Ignore other keys return false; } scroller.scrollTop = scrollPos; // Disallow further processing event.stopPropagation(); event.preventDefault(); return true; }; InlineDocsViewer.prototype.onAdded = function () { InlineDocsViewer.prototype.parentClass.onAdded.apply(this, arguments); // Set height initially, and again whenever width might have changed (word wrap) this._sizeEditorToContent(); $(window).on("resize", this._sizeEditorToContent); // Set focus this.$scroller[0].focus(); this.$wrapperDiv[0].addEventListener("keydown", this._onKeydown, true); }; InlineDocsViewer.prototype.onClosed = function () { InlineDocsViewer.prototype.parentClass.onClosed.apply(this, arguments); $(window).off("resize", this._sizeEditorToContent); this.$wrapperDiv[0].removeEventListener("keydown", this._onKeydown, true); }; InlineDocsViewer.prototype._sizeEditorToContent = function () { this.hostEditor.setInlineWidgetHeight(this, this.$wrapperDiv.height() + 20, true); }; module.exports = PyDocs; });
36.527397
100
0.59235
940b5514beb71539af9a72ee54444ad0957d2b36
932
js
JavaScript
node_modules/azure-devops-ui/Components/Splitter/Splitter.Props.js
Epsilon-Not/ado-report-extension
cbf1d0de85cc323e0f1a89baa21f84249077c052
[ "MIT" ]
null
null
null
node_modules/azure-devops-ui/Components/Splitter/Splitter.Props.js
Epsilon-Not/ado-report-extension
cbf1d0de85cc323e0f1a89baa21f84249077c052
[ "MIT" ]
null
null
null
node_modules/azure-devops-ui/Components/Splitter/Splitter.Props.js
Epsilon-Not/ado-report-extension
cbf1d0de85cc323e0f1a89baa21f84249077c052
[ "MIT" ]
null
null
null
/** * Enum which describes which way the children should be laid out */ export var SplitterDirection; (function (SplitterDirection) { /** * Children will be laid out left to right and divided vertically */ SplitterDirection[SplitterDirection["Vertical"] = 0] = "Vertical"; /** * Children will be laid out top to bottom and divided horizontally */ SplitterDirection[SplitterDirection["Horizontal"] = 1] = "Horizontal"; })(SplitterDirection || (SplitterDirection = {})); /** * Enum which describes a position, near or far */ export var SplitterElementPosition; (function (SplitterElementPosition) { /** * Left/Top element */ SplitterElementPosition[SplitterElementPosition["Near"] = 0] = "Near"; /** * Right/Bottom element */ SplitterElementPosition[SplitterElementPosition["Far"] = 1] = "Far"; })(SplitterElementPosition || (SplitterElementPosition = {}));
32.137931
74
0.680258
940da0d89c145059633fdd5e004bb4e9ac151b98
605
js
JavaScript
codeWars/reimplementMult.js
tahoeRobbo/toyProblems
d5378ca90cfaf3b4011c020427f33550c77add4a
[ "MIT" ]
2
2015-12-27T01:04:42.000Z
2016-05-21T19:57:59.000Z
codeWars/reimplementMult.js
tahoeRobbo/toyProblems
d5378ca90cfaf3b4011c020427f33550c77add4a
[ "MIT" ]
null
null
null
codeWars/reimplementMult.js
tahoeRobbo/toyProblems
d5378ca90cfaf3b4011c020427f33550c77add4a
[ "MIT" ]
null
null
null
//Description: // //Define a function mul(a, b) that takes two non-negative integers a and b and returns their product. // //You should only use the + and/or - operators. Using * is cheating! // //You can do this iteratively or recursively. const mul = (a, b) => { let ans = 0; while(b > 0){ ans += a; b--; } return ans; }; function mul(a, b) { if (!a || !b) return 0; return Array.from(Array(b), n => a).reduce((a, b) => a + b, 0); } //recursive let mul = (a, b) => b ? a + mul(a, --b) : a - a; function mul(a, b) { return Array.apply(0, Array(b)).map(_=>a).reduce((a,b)=>a+b,0); }
19.516129
101
0.573554
940dc9793a3e9a7f9efa5c6cf47da99d76c463d4
598
js
JavaScript
files/qoopido.js/3.7.4/support/css/transform/2d.js
Teino1978-Corp/Teino1978-Corp-jsdelivr
95b614430da0cdac00feeac19bfaa26786ad2ecf
[ "MIT" ]
1
2015-11-13T14:34:21.000Z
2015-11-13T14:34:21.000Z
files/qoopido.js/3.7.4/support/css/transform/2d.js
Teino1978-Corp/Teino1978-Corp-jsdelivr
95b614430da0cdac00feeac19bfaa26786ad2ecf
[ "MIT" ]
null
null
null
files/qoopido.js/3.7.4/support/css/transform/2d.js
Teino1978-Corp/Teino1978-Corp-jsdelivr
95b614430da0cdac00feeac19bfaa26786ad2ecf
[ "MIT" ]
1
2019-12-26T10:52:45.000Z
2019-12-26T10:52:45.000Z
/*! Qoopido.js library 3.7.4, 2015-08-14 | https://github.com/dlueth/qoopido.js | (c) 2015 Dirk Lueth */ !function(t,r){r.qoopido.register("support/css/transform/2d",t,["../../../support","../transform"])}(function(t,r,s,o){"use strict";var e=t.support;return e.addTest("/css/transform/2d",function(r){t["support/css/transform"]().then(function(){var s=e.pool?e.pool.obtain("div"):document.createElement("div"),o=t.support.getCssProperty("transform");try{s.style[o]="rotate(30deg)"}catch(n){}/rotate/.test(s.style[o])?r.resolve():r.reject(),s.dispose&&s.dispose()},function(){r.reject()})})},this);
299
493
0.683946
940f94bf2b63eff141c45458eb30267c7fbf38ac
3,229
js
JavaScript
dist/token/token.service.js
iury-get-kill/awesome-project-api
f4811b1970006edf45e7c0ff24ec4bc97c8744f9
[ "MIT" ]
1
2021-05-16T01:43:18.000Z
2021-05-16T01:43:18.000Z
dist/token/token.service.js
iury-get-kill/awesome-project-api
f4811b1970006edf45e7c0ff24ec4bc97c8744f9
[ "MIT" ]
null
null
null
dist/token/token.service.js
iury-get-kill/awesome-project-api
f4811b1970006edf45e7c0ff24ec4bc97c8744f9
[ "MIT" ]
null
null
null
"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var __param = (this && this.__param) || function (paramIndex, decorator) { return function (target, key) { decorator(target, key, paramIndex); } }; Object.defineProperty(exports, "__esModule", { value: true }); exports.TokenService = void 0; const common_1 = require("@nestjs/common"); const resultado_dto_1 = require("../dto/resultado.dto"); const typeorm_1 = require("typeorm"); const usuario_service_1 = require("../usuario/usuario.service"); const auth_service_1 = require("../auth/auth.service"); const usuario_entity_1 = require("../usuario/usuario.entity"); let TokenService = class TokenService { constructor(tokenRepository, usuarioService, authService) { this.tokenRepository = tokenRepository; this.usuarioService = usuarioService; this.authService = authService; } async save(hash, username) { let objToken = await this.tokenRepository.findOne({ username: username }); if (objToken) { this.tokenRepository.update(objToken.id, { hash: hash }); } else { this.tokenRepository.insert({ hash: hash, username: username }); } } async refreshToken(oldToken) { let objToken = await this.tokenRepository.findOne({ hash: oldToken }); if (objToken) { let usuario = await this.usuarioService.findOne(objToken.username); return this.authService.login(usuario); } else { return new common_1.HttpException({ errorMessage: 'Token inválido' }, common_1.HttpStatus.UNAUTHORIZED); } } async getUsuarioByToken(token) { token = token.replace("Bearer ", "").trim(); let objToken = await this.tokenRepository.findOne({ hash: token }); if (objToken) { let usuario = await this.usuarioService.findOne(objToken.username); return usuario; } else { return null; } } }; TokenService = __decorate([ common_1.Injectable(), __param(0, common_1.Inject('TOKEN_REPOSITORY')), __param(2, common_1.Inject(common_1.forwardRef(() => auth_service_1.AuthService))), __metadata("design:paramtypes", [typeorm_1.Repository, usuario_service_1.UsuarioService, auth_service_1.AuthService]) ], TokenService); exports.TokenService = TokenService; //# sourceMappingURL=token.service.js.map
43.053333
150
0.628987
941196a7564db8f5d20eed813175b5b482e17100
546
js
JavaScript
packages/vip-go/config/getSentryConfig.js
alleyinteractive/irving
5bb290c9ea842fefb0852c43fc9c2d40c41fb29a
[ "MIT" ]
47
2019-07-03T14:46:27.000Z
2022-02-17T16:04:21.000Z
packages/vip-go/config/getSentryConfig.js
alleyinteractive/irving
5bb290c9ea842fefb0852c43fc9c2d40c41fb29a
[ "MIT" ]
133
2019-10-05T14:21:06.000Z
2022-03-01T21:31:14.000Z
packages/vip-go/config/getSentryConfig.js
alleyinteractive/irving
5bb290c9ea842fefb0852c43fc9c2d40c41fb29a
[ "MIT" ]
4
2019-09-16T16:52:23.000Z
2021-01-07T21:21:30.000Z
const path = require('path'); const resolveConfigFilepath = require('@irvingjs/core/config/irving/resolveConfigFilepath'); /** * Utility function to get the Sentry config from the Irving app * or fall back to a default config. * * @returns {object} A Sentry config object. */ const getSentryConfig = () => { let sentryConfig = resolveConfigFilepath('sentry.config.js'); if (!sentryConfig) { sentryConfig = path.join( __dirname, 'sentry.config.js', ); } return sentryConfig; }; module.exports = getSentryConfig;
24.818182
92
0.695971
94126e653d111dcd1ea8ed49e7a946ee6fd6e449
4,383
js
JavaScript
test/specs/outputToFiles.spec.js
chasemgray/cypress-terminal-report
92bdc14034530ef24a75bc287eeb5396d3094f87
[ "MIT" ]
313
2020-02-04T16:17:33.000Z
2022-03-24T20:58:02.000Z
test/specs/outputToFiles.spec.js
chasemgray/cypress-terminal-report
92bdc14034530ef24a75bc287eeb5396d3094f87
[ "MIT" ]
103
2020-02-11T22:02:09.000Z
2022-03-31T21:13:30.000Z
test/specs/outputToFiles.spec.js
chasemgray/cypress-terminal-report
92bdc14034530ef24a75bc287eeb5396d3094f87
[ "MIT" ]
28
2020-02-11T21:47:28.000Z
2022-03-29T19:59:47.000Z
import { runTest, commandBase, expectConsoleLogForOutput, expectOutputFilesToBeCorrect, expectOutFilesMatch, outputCleanUpAndInitialization, logLastRun, } from "../utils"; const {expect} = require('chai'); const fs = require('fs'); const fsExtra = require('fs-extra'); const path = require('path'); const glob = require('glob'); describe('Output to files.', () => { afterEach(function () { if (this.currentTest.state == 'failed') { logLastRun(); } }); // Tests in general the log formatting in files. it('Should generate proper log output files, and print only failing ones if config is on default.', async () => { const outRoot = {}; const testOutputs = {}; outputCleanUpAndInitialization(testOutputs, outRoot); if (fs.existsSync(path.join(outRoot.value, 'not'))) { fsExtra.removeSync(path.join(outRoot.value, 'not')); } const specFiles = [ 'requests.spec.js', 'happyFlow.spec.js', 'printLogsSuccess.spec.js', 'mochaContexts.spec.js', ]; await runTest(commandBase(['generateOutput=1'], specFiles), (error, stdout, stderr) => { expectOutputFilesToBeCorrect(testOutputs, outRoot, specFiles, 'onFail'); testOutputs.value.push(path.join('not', 'existing', 'path', 'out.txt')); expectConsoleLogForOutput(stdout, outRoot, testOutputs.value); }); }).timeout(90000); it('Should print all tests to output files when configured so.', async () => { const outRoot = {}; const testOutputs = {}; outputCleanUpAndInitialization(testOutputs, outRoot); const specFiles = [ 'requests.spec.js', 'happyFlow.spec.js', 'printLogsSuccess.spec.js', 'mochaContexts.spec.js', ]; await runTest(commandBase(['generateOutput=1', 'printLogsToFileAlways=1'], specFiles), (error, stdout, stderr) => { expectOutputFilesToBeCorrect(testOutputs, outRoot, specFiles, 'always'); expectConsoleLogForOutput(stdout, outRoot, testOutputs.value); }); }).timeout(90000); it('Should not generate and print to output files when configured so.', async () => { const outRoot = {}; const testOutputs = {}; outputCleanUpAndInitialization(testOutputs, outRoot); const specFiles = ['requests.spec.js', 'happyFlow.spec.js', 'printLogsSuccess.spec.js']; await runTest(commandBase(['generateOutput=1', 'printLogsToFileNever=1'], specFiles), (error, stdout, stderr) => { testOutputs.value.forEach((out) => { expect(fs.existsSync(path.join(outRoot.value, out))).false; }); expectConsoleLogForOutput(stdout, outRoot, testOutputs.value, true); }); }).timeout(90000); it('Should generate proper nested log output files.', async () => { const specFiles = ['requests.spec.js', 'happyFlow.spec.js', 'printLogsSuccess.spec.js', 'multiple.dots.in.spec.js']; await runTest(commandBase(['generateNestedOutput=1'], specFiles), (error, stdout) => { const specs = glob.sync('./output_nested_spec/**/*', {nodir: true}); specs.forEach(specFile => { const actualFile = specFile.replace('output_nested_spec', 'output_nested'); expect(fs.existsSync(actualFile), `Expected output file ${actualFile} to exist.`).to.be.true; expectOutFilesMatch(actualFile, specFile); }); }); }).timeout(90000); it('Should generate output only for failing tests if set to onFail.', async () => { const outRoot = {value: path.join(__dirname, '../output')}; const testOutputs = {value: ["out.txt"]}; const specFiles = ['printLogsOnFail.spec.js']; await runTest(commandBase(['generateSimpleOutput=1'], specFiles), (error, stdout, stderr) => { expectOutputFilesToBeCorrect(testOutputs, outRoot, specFiles, 'onFailCheck'); expectConsoleLogForOutput(stdout, outRoot, testOutputs.value); }); }).timeout(90000); it('Should still output to files when fail fast is installed and log to files on after run enabled.', async () => { const outRoot = {}; const testOutputs = {}; outputCleanUpAndInitialization(testOutputs, outRoot); const specFiles = ['requests.spec.js']; await runTest(commandBase(['failFast=1', 'generateOutput=1', 'logToFilesOnAfterRun=1'], specFiles), (error, stdout, stderr) => { expectOutputFilesToBeCorrect(testOutputs, outRoot, specFiles, 'failFast'); }); }).timeout(90000); });
38.447368
132
0.671002
9414360139fd27e9c5c6f4f5d53b84d58a2bd6f4
889
js
JavaScript
build/es6/node_modules/@lrnwebcomponents/dl-behavior/dl-behavior.js
EberlyODL/haxcms-courses
85b5d31995abaf5621a33cfe943347eec01cfa53
[ "Apache-2.0" ]
null
null
null
build/es6/node_modules/@lrnwebcomponents/dl-behavior/dl-behavior.js
EberlyODL/haxcms-courses
85b5d31995abaf5621a33cfe943347eec01cfa53
[ "Apache-2.0" ]
null
null
null
build/es6/node_modules/@lrnwebcomponents/dl-behavior/dl-behavior.js
EberlyODL/haxcms-courses
85b5d31995abaf5621a33cfe943347eec01cfa53
[ "Apache-2.0" ]
null
null
null
import{dom}from"../../@polymer/polymer/lib/legacy/polymer.dom.js";window.mtz=window.mtz||{};mtz.FileDownloadBehaviors={properties:{fileTypes:{type:Object,value(){return{CSV:"text/csv",JSON:"text/json",PDF:"application/pdf",TXT:"text/plain"}}}},downloadFromData(data,type,name="download",newTab=!0){const mimeType=this.fileTypes[type.toUpperCase()],blob=new Blob([decodeURIComponent(encodeURI(data))],{type:mimeType}),filename=name+"."+type.toLowerCase();if(window.navigator&&window.navigator.msSaveOrOpenBlob){window.navigator.msSaveOrOpenBlob(blob,filename)}else{const link=document.createElement("a");link.href=(window.URL||window.webkitURL).createObjectURL(blob);link.download=filename;link.target=newTab?"_blank":"_self";dom(this.root).appendChild(link);link.click();dom(this.root).removeChild(link)}},downloadFromURI(uri,newTab=!0){window.open(uri,newTab?"_blank":"_self");return!0}};
889
889
0.779528
9414d50ef8eca9ce99bdb00f5a17bd89139110c1
255
js
JavaScript
functions/first.js
Mic-U/step-function-test
1abf29b7fa751202b448373af998ea41ba382385
[ "MIT" ]
null
null
null
functions/first.js
Mic-U/step-function-test
1abf29b7fa751202b448373af998ea41ba382385
[ "MIT" ]
null
null
null
functions/first.js
Mic-U/step-function-test
1abf29b7fa751202b448373af998ea41ba382385
[ "MIT" ]
null
null
null
/** * Created by yuhomiki on 2017/08/11. */ "use strict"; const firstFunction = (event, context, callback) => { console.log("Call First Function"); callback(null, { ids: ["a", "b", "c", "d", "e", "f"] }); }; module.exports = firstFunction;
17
53
0.580392
94160c1e365427e5fafee51a35489c2ab52ec7fc
4,509
js
JavaScript
resource_script/node_modules/gulp-each/test.js
aomkuma/e-register
bbf5730b5af24c1a5f5ce31a8f07893606b7a134
[ "MIT" ]
null
null
null
resource_script/node_modules/gulp-each/test.js
aomkuma/e-register
bbf5730b5af24c1a5f5ce31a8f07893606b7a134
[ "MIT" ]
null
null
null
resource_script/node_modules/gulp-each/test.js
aomkuma/e-register
bbf5730b5af24c1a5f5ce31a8f07893606b7a134
[ "MIT" ]
null
null
null
/* jshint node: true, expr: true */ /* global describe, it, beforeEach */ var mocha = require('mocha'); var chai = require('chai'); var expect = chai.expect; var File = require('vinyl'); var es = require('event-stream'); var through = require('through2'); var each = require('./'); var fakeData = 'llama'; function fileBuffer(opts) { opts = opts || {}; return new File({ contents: new Buffer(opts.content || 'fake file'), path: opts.path || Math.random().toString(36).slice(2) + '.txt', base: __dirname }); } function inputStream(dataArr) { var input = through.obj(); setImmediate(function () { dataArr.forEach(function (file) { input.push(file); }); input.end(); }); return input; } describe('Buffers', function() { var input; beforeEach(function() { input = function() { return new fileBuffer({ content: fakeData, path: 'file.ext' }); }; }); it('gets called once per file', function(done) { var count = 0; var source = through.obj(); source.pipe(each(function(content, file, cb) { count++; cb(null, content); })) .on('end', done) .on('error', done) .on('data', function () {}); source.write(input()); expect(count).to.equal(1); source.write(input()); expect(count).to.equal(2); source.end(); }); it('takes a buffer as a source', function(done) { var source = each(function(content, file, cb) { expect(content).to.equal(fakeData); cb(null, content); done(); }); source.write(input()); source.end(); }); it('can output a buffer in the iterator function', function(done) { var source = each(function(content, file, cb) { expect(content).to.be.instanceOf(Buffer); expect(content.toString()).to.equal(fakeData); cb(null, content); done(); }, 'buffer'); source.write(input()); source.end(); }); }); describe('Streams', function() { var input; beforeEach(function() { input = function() { return new File({ contents: es.readArray([fakeData]), path: 'file.ext', base: __dirname }); }; }); it('takes a stream as a source', function(done) { var source = each(function(content, file, cb) { expect(content).to.equal(fakeData); cb(null, content); done(); }); source.write(input()); source.end(); }); it('can output a buffer in the iterator function', function(done) { var source = each(function(content, file, cb) { expect(content).to.be.instanceOf(Buffer); expect(content.toString()).to.equal(fakeData); cb(null, content); done(); }, 'buffer'); source.write(input()); source.end(); }); }); describe('general', function() { var input, obj = {}; beforeEach(function() { input = function() { return new fileBuffer({ content: fakeData, path: 'file.ext' }); }; }); it('can be called with a `this` arguments', function(done) { var source = each(function(content, file, cb) { expect(this).to.not.be.undefined; expect(this).to.equal(obj); cb(null, content); done(); }, obj); source.write(input()); source.end(); }); // this test simulates a gulp task, to make sure this // module is compatible in a pipeline it('writes vinyl files as the output', function (done) { var files = [fileBuffer(), fileBuffer(), fileBuffer()]; var count = 0; inputStream(files) .pipe(each(function(content, file, cb) { cb(null, content); })) .on('data', function onFile(file) { expect(file).to.be.instanceOf(File); expect(file).to.have.property('contents'); count += 1; }) .on('error', done) .on('end', function () { expect(count).to.equal(files.length); done(); }); }); });
23.731579
72
0.497006
941881a86e7480138a3bd63359bd76e3c49f200c
3,629
js
JavaScript
index.js
Suji-GitH/MBC-ReadMe-Generator
cb44ea3098bbabe103985d04111cd7681c2ee2bf
[ "RSA-MD" ]
null
null
null
index.js
Suji-GitH/MBC-ReadMe-Generator
cb44ea3098bbabe103985d04111cd7681c2ee2bf
[ "RSA-MD" ]
null
null
null
index.js
Suji-GitH/MBC-ReadMe-Generator
cb44ea3098bbabe103985d04111cd7681c2ee2bf
[ "RSA-MD" ]
null
null
null
const fs = require("fs"); const inquirer = require("inquirer"); const promptUser = async () => { const userResponse = await inquirer .prompt([ { type: "input", message: "What is your GitHub Username?", name: "githubUsername" }, { type: "input", message: "What is your email?", name: "userEmail" }, { type: "input", message: "What is your Project Title?", name: "projectTitle" }, { type: "input", message: "What is your Project Description?", name: "projectDescription" }, { type: "input", message: "What are the installation steps for your project?", name: "installation" }, { type: "input", message: "Provide Project usage?", name: "usage" }, { type: "list", message: "Choose an license", choices: ["GPL", "EPL", "MIT", "MPL"], name: "license" }, { type: "input", message: "Who are the contributors?", name: "contributing" }, { type: "input", message: "List the test cases for the Project", name: "tests" }, { type: "input", message: "How can they contact you for any inquiries?", name: "questions" } ]); const githubUsername = userResponse.githubUsername; const userEmail = userResponse.userEmail; const projectTitle = userResponse.projectTitle; const projectDescription = userResponse.projectDescription; const installation = userResponse.installation; const usage = userResponse.usage; const license = userResponse.license; const contributors = userResponse.contributing; const tests = userResponse.tests; const questions = userResponse.questions; let userLicense = ""; let githubLink = `https://github.com/${githubUsername}`; function licenseBadge(licenseType) { switch (licenseType) { case "GPL": return userLicense = `[<img src = "https://img.shields.io/badge/license-GPL-red">](https://opensource.org/licenses/gpl-license)`; case "EPL": return userLicense = `[<img src = "https://img.shields.io/badge/license-EPL-blue">](https://opensource.org/licenses/entessa.php)`; case "MIT": return userLicense = `[<img src = "https://img.shields.io/badge/license-MIT-yellow">](https://opensource.org/licenses/MIT)`; case "MPL": return userLicense = `[<img src = "https://img.shields.io/badge/license-MPL-green">](https://opensource.org/licenses/MPL-2.0)`; } }; licenseBadge(license); const result = (`${userLicense} # ${projectTitle} ## Content - [Project Description](#Project-Description) - [Installation](#Installation) - [Usage](#Usage) - [Contributing](#Contributing) - [Tests](#Tests) - [Questions](#Questions) ## Project Description ${projectDescription} ## Installation ${installation} ## Usage ${usage} ## Contributing ${contributors} ## Tests ${tests} ## Questions ${questions} GitHub - [${githubUsername}](${githubLink}) Email - ${userEmail} `); const printResult = fs.writeFile("./assets/SampleReadMe/README.md", result, function() { console.log("Success!"); } ); }; promptUser();
25.737589
146
0.548085
9419f47a62412a1a79d41685908cb441aa182a03
4,764
js
JavaScript
client/dist/site/widgets/app-list/dist/runtime/translations/lv.js
Fizioh/ArcGIS
fa08fa86a27e85f8fa7f3a1765d400b3c567a590
[ "Apache-2.0", "MIT" ]
null
null
null
client/dist/site/widgets/app-list/dist/runtime/translations/lv.js
Fizioh/ArcGIS
fa08fa86a27e85f8fa7f3a1765d400b3c567a590
[ "Apache-2.0", "MIT" ]
null
null
null
client/dist/site/widgets/app-list/dist/runtime/translations/lv.js
Fizioh/ArcGIS
fa08fa86a27e85f8fa7f3a1765d400b3c567a590
[ "Apache-2.0", "MIT" ]
null
null
null
define({homePageSearch:"Meklēt",newApp:"Izveidot jaunu",labelByModified:"Jaunākās Experience lietotnes",labelByTitle:"Experience lietotnes kārtotas pēc virsraksta",labelByView:"Experience lietotnes, kas kārtotas pēc skatījumu skaita",labelByCreateTime:"Lietotnes kārtotas pēc izveides laika",labelByLastCreated:"Lietošanas iespējas kārtotas pēc izveidošanas laika, sākot no pēdējās",templateLabelByModified:"Jaunākās veidnes",templateLabelByTitle:"Veidnes, kas kārtotas pēc virsraksta",templateLabelByView:"Veidnes, kas kārtotas pēc skatījumu skaita",templateLabelByCreateTime:"Veidnes kārtotas pēc izveides laika",templateLabelByLastCreated:"Veidnes kārtotas pēc izveidošanas laika, sākot no pēdējās",ownByMe:"Pieder man",ownByAnyone:"Pieder ikvienam",sharedWithMe:"Koplietots ar mani",orderByModified:"Pēdējoreiz mainīts",orderByTitle:"Virsraksts",orderByView:"Visvairāk skatījumu",applistViews:"Skatījumu skaits",applistItemViews:"Skatījumi",applistView:"skatījums",editInfo:"Rediģēt informāciju",viewDetail:"Skatīt datus",appListDelete:"Dzēst",appListName:"Nosaukums",appListDescription:"Apraksts",download:"Lejupielādēt",launchApp:"Palaist",appListMore:"Vairāk",popUpOk:"Labi",popUpCancel:"Atcelt",popUpTitle:"Brīdinājums",popUpDiscription1:"Jums nav atļaujas rediģēt šo Experience lietotni. Pašreiz jūs varat rediģēt tikai savas vienības.",popUpDiscription2:"Jūs varat skatīt vai dublēto tos.",descriptionRemind:"Šeit ir vienības apraksts.",itemDeleteRemind:"Vai tiešām vēlaties dzēst šo vienību?",untitledExperience:"Nenosaukta Experience lietotne",webExperience:"Tīmekļa Experience lietotne",webExperienceTemplate:"Tīmekļa Experience lietotnes veidne",createExperience:"Izveidot savu pirmo Experience veidni",toCreate:"Noklikšķiniet uz {createNewElement}, lai sāktu jaunu Experience lietotni",click:"Noklikšķināt",appListEdit:"Rediģēt",everyone:"Koplietots: ar ikvienu",noOne:"Koplietots: ne ar vienu",organization:"Koplietots: organizācijā",group:"Koplietots: grupā",appListPublished:"Publicēts",appListDraft:"Melnraksts",unpublishedChanges:"Nepublicētas izmaiņas",appTypeTemplate:"Pieredzes veidne",appTypeExperience:"Pieredze",publishedTitle:"Šo vienību var skatīt lietotāji, ar kuriem koplietojat informāciju.",publishedUnsaveTitle:"Kopš pēdējās publicēšanas pastāv nepublicētas izmaiņas.",itemStatusDraft:"Melnraksts",draftStatusTitle:"Šī vienība nav publicēta. Tikai jūs to varat skatīt.",cardView:"Kartītes skats",listView:"Saraksta skats",createNewTitle:"Izveidot jaunu Experience lietotni no šīs veidnes",itemDescribtion:"Šeit ir vienības apraksts.",favorites:"Izlase",myFavorites:"Mana izlase",itemInFavorites:"Vienība izlasē",addFavorites:"Pievienot izlasei",removeFromFavorites:"Noņemt no izlases",noItemsYet:"Vēl nav nevienas vienības.",templateEmptyText:"Jūs varat ģenerēt veidni no esošas lietotnes veidotājā.",sharedEmptyText:"Ar jums nav koplietota neviena vienība. ",favoritesEmptyText:"Atrodot nepieciešamo vienību, noklikšķiniet uz iespējas Pievienot izlasei, lai redzētu to šeit.",noPublicItems:"Publisku vienību nav.",publicTemplate:"Publisks",allApp:"Viss",myOrg:"Organizācija",defaultTemplate:"Noklusējums",unableDelete:"Vienību nevarēja izdzēst, jo tā ir aizsargāta pret dzēšanu.",deleteError:"Dzēšot šo lietotni, radās kļūme.",createError:"Izveidojot jaunu lietotni, radās kļūme.",duplicateError:"Dublējot lietotni, radās kļūme.",noResource:"Resurss nepastāv vai nav pieejams",noSearchResult:"Netika atrasa Experience lietotne. Lūdzu, izmēģiniet citus meklēšanas kritērijus.",noTemplates:"Nav atrasta neviena veidne. Lūdzu, izmēģiniet citus meklēšanas kritērijus.",actionsLabel:"Importēt",importAction:"Importēt no mana konta",uploadAction:"Importēt no mana datora",importTips:"Importēt lietotni no ArcGIS portāla",importApp:"Importēt lietotni",upgradeApp:"Jaunināt lietotni",upgradeBtn:"Jaunināt",fileTypeError:"Šis faila veids netiek atbalstīts.",checkVersionError:"Neizdevās importēt lietotni ${APP_NAME} !",importing:"Importēšana",upgrading:"Jaunināšana",uploading:"Augšupielādēšana",upgradeContent:"Izvēlētajās lietotnēs ir ietvertas viebnības, kas veidotas ar jaunākas versijas ArcGIS Experience Builder.",upgradeContentFooter:"Noklikšķiniet uz Jaunināt, lai to jauninātu un importētu. Noklikšķiniet uz Atcelt, lai izietu.",importUpperVersion:"Neizdevās importēt lietotni ${APP_NAME} ! Šī lietotne ir izveidota ar jaunākas versijas ${VERSION_NUMBER} ArcGIS Experience Builder.",importSuccess:"Veiksmīgi jauniniet un importējiet lietotni ${APP_NAME}!",upgradeFailure:"Neizdevās jaunināt lietotni ${APP_NAME}!",importFailure:"Neizdevās importēt lietotni ${APP_NAME} !",exportFailure:"Neizdevās eksportēt lietotni ${APP_NAME}!",appExport:"Eksportēt",exportAppSuccess:"Eksportēšana izdevās!",moreDetails:"Vairāk informācijas"});
4,764
4,764
0.835223
941ad6221c4a307dd38b0279a0d3406249966e55
3,028
js
JavaScript
src/components/intro.js
jeffstolz/gatsbyportfolio
c6c12d964fa65925c9f1d368da7c905a01888c3a
[ "MIT" ]
null
null
null
src/components/intro.js
jeffstolz/gatsbyportfolio
c6c12d964fa65925c9f1d368da7c905a01888c3a
[ "MIT" ]
5
2020-09-18T18:24:18.000Z
2022-02-27T10:08:01.000Z
src/components/intro.js
jeffstolz/gatsby-portfolio
c6c12d964fa65925c9f1d368da7c905a01888c3a
[ "MIT" ]
null
null
null
import React from "react" import styled, { css } from "styled-components" import Fade from "react-reveal/Fade" import { Link as ScrollLink } from "react-scroll" import Button from "./button" import { secondaryLight } from "./themes" import { FaArrowDown } from "react-icons/fa" import { Images } from "../images" import { Colors, Spacing, Typography } from "../styles/variables" const Intro = () => ( <Container id="top"> <HeadingContainer> <Fade delay={500}> <Heading>Hi, I'm Jeff</Heading> </Fade> <Fade delay={750}> <WaveAnimation> <WaveIcon src={Images.Wave} alt="" /> </WaveAnimation> </Fade> </HeadingContainer> <Fade delay={1500}> <Subheading> I'm a <RedText>product designer{" "}</RedText>who creates simple & powerful experiences. </Subheading> </Fade> <Fade delay={2500}> <ButtonContainer> <ScrollLink activeClass="active" to={"skills"} spy={true} smooth={true} duration={1000} > <Button theme={secondaryLight} label={"Wecome!"} icon={<FaArrowDown />} /> </ScrollLink> </ButtonContainer> </Fade> </Container> ) const Container = styled.section` display: flex; flex-direction: column; justify-content: center; min-height: 100vh; padding: 0 ${Spacing.sectionPadding}; @media (max-width: ${Spacing.breakPoint}) { padding: 0 ${Spacing.sectionPaddingMobile}; } ` const HeadingContainer = styled.div` display: flex; ` const Heading = styled.h1` font-size: ${Typography.largeHeadingFontSize}; margin-bottom: 0.35em; @media (max-width: ${Spacing.breakPoint}) { font-size: ${Typography.smallHeadingFontSize}; } ` const wavekeyframes = css` @keyframes wave-animation { 0% { transform: rotate(0deg); } 10% { transform: rotate(12deg); } 20% { transform: rotate(-6deg); } 30% { transform: rotate(12deg); } 40% { transform: rotate(-2deg); } 50% { transform: rotate(8deg); } 60% { transform: rotate(0deg); } 100% { transform: rotate(0deg); } } ` const WaveAnimation = styled.span` animation-name: wave-animation; animation-duration: 2.5s; animation-iteration-count: infinite; transform-origin: 50px 100px; display: inline-block; ${wavekeyframes}; ` const WaveIcon = styled.img` width: 3.5em; margin-bottom: -2.4em; margin-left: ${Spacing.xBase}; @media (max-width: ${Spacing.smallBreakPoint}) { width: 2.5em; margin-bottom: -1.2em; margin-left: ${Spacing.small}; } ` const Subheading = styled.h2` ${Typography.subheading}; color: ${Colors.gray4}; margin-bottom: ${Spacing.base}; @media (max-width: ${Spacing.breakPoint}) { max-width: 14em; } ` const RedText = styled.span` color: ${Colors.red}; ` const ButtonContainer = styled.div` display: flex; ` export default Intro
21.475177
96
0.60502
941b4802bc67ef5faf6736b56ebc49c7987312af
310
js
JavaScript
jsonp/211221.js
c-tsy/data_location
f7db57bf8cfec889b7d90f5d30b3a062490b2125
[ "MIT" ]
null
null
null
jsonp/211221.js
c-tsy/data_location
f7db57bf8cfec889b7d90f5d30b3a062490b2125
[ "MIT" ]
null
null
null
jsonp/211221.js
c-tsy/data_location
f7db57bf8cfec889b7d90f5d30b3a062490b2125
[ "MIT" ]
null
null
null
if(_area_jsonp_211221){_area_jsonp_211221({"211221101":"新台子镇","211221102":"阿吉镇","211221103":"平顶堡镇","211221104":"大甸子镇","211221105":"凡河镇","211221106":"腰堡镇","211221107":"镇西堡镇","211221108":"蔡牛镇","211221109":"李千户镇","211221110":"熊官屯镇","211221111":"横道河子镇","211221112":"双井子镇","211221208":"鸡冠山乡","211221209":"白旗寨满族乡"})}
310
310
0.706452
941c70e6e0b627a35a1dc7bb72f3b43904e96397
9,693
js
JavaScript
resources/assets/backend/js/admin.js
SubinRabin/schoolapp
d315befcc3f5fef2169cdfe96c20f3eb08853a4c
[ "MIT" ]
null
null
null
resources/assets/backend/js/admin.js
SubinRabin/schoolapp
d315befcc3f5fef2169cdfe96c20f3eb08853a4c
[ "MIT" ]
null
null
null
resources/assets/backend/js/admin.js
SubinRabin/schoolapp
d315befcc3f5fef2169cdfe96c20f3eb08853a4c
[ "MIT" ]
null
null
null
$(document).ready(function() { $("#adminSubmitBtn").click(function() { var Name = $("#Name").val(); var Username = $("#Username").val(); var Email = $("#Email").val(); var number = $("#number").val(); var Role = $("#Role").val(); var changeapass = $("#changeapass").val(); var Password = $("#Password").val(); var CPassword = $("#CPassword").val(); var checkstatus = $("#checkstatus").val(); var mailFormat = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/; if(changeapass==undefined || $("#changeapass").is(':checked')) { if(Username=="") { addToast("Username field is required!","orange"); $("#Username").focus(); } else if (Name=="") { addToast("Name field is required!","orange"); $("#Name").focus(); } else if(Email=="") { addToast("Email field is required!","orange"); $("#Email").focus(); } else if (mailFormat.test(Email) == false) { addToast("Invalid mail format!","orange"); $("#Email").focus(); } else if(number=="") { addToast("Mobile number field is required!","orange"); $("#number").focus(); } else if(Role=="") { addToast("Role field is required!","orange"); $("#Role").focus(); } else if(Password=="") { addToast("Password field is required!","orange"); $("#Password").focus(); } else if(CPassword=="") { addToast("Confirm password field is required!","orange"); $("#CPassword").focus(); } else if(Password!=CPassword) { addToast("Must be same password and Confirm Password","orange"); $("#CPassword").focus(); } else { if (checkstatus==0) { $("#adminSubmitBtn").attr('disabled',true); adminSubmitBtnFun(); } else { addToast("Username already exist","red"); $("#Username").focus(); } } } else { if(Username=="") { addToast("Username field is required!","orange"); $("#Username").focus(); } else if (Name=="") { addToast("Name field is required!","orange"); $("#Name").focus(); } else if(Email=="") { addToast("Email field is required!","orange"); $("#Email").focus(); } else if (mailFormat.test(Email) == false) { addToast("Invalid mail format!","orange"); $("#Email").focus(); } else if(number=="") { addToast("Mobile number field is required!","orange"); $("#number").focus(); } else if(Role=="") { addToast("Role field is required!","orange"); $("#Role").focus(); } else { if (checkstatus==0) { $("#adminSubmitBtn").attr('disabled',true); adminSubmitBtnFun(); } else { addToast("Username already exist","red"); $("#Username").focus(); } } } }); $("#Username").on('input' ,function() { $.ajax({ dataType: "json", // type: 'POST', url: 'adminExistingUserNameCheck', data: $('#adminSubmitForm').serialize(), success: function (response) { $("#checkstatus").val(response); if (response!=0) { $("#Username").css('border','1px solid red'); } else { $("#Username").css('border','1px solid #eee'); } } }); }); $("#changeapass").change(function() { if ($("#changeapass").is(':checked')==true) { $("#Password").removeAttr('disabled'); $("#CPassword").removeAttr('disabled'); } else { $("#Password").attr('disabled','disabled'); $("#CPassword").attr('disabled','disabled'); } }); $("#AdminProfileSubmitBtn").click(function() { var Name = $("#Name").val(); var Email = $("#Email").val(); var number = $("#number").val(); var changeapass = $("#changeapass").val(); var Password = $("#Password").val(); var CPassword = $("#CPassword").val(); var mailFormat = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/; if(changeapass==undefined || $("#changeapass").is(':checked')) { if (Name=="") { addToast("Name field is required!","orange"); $("#Name").focus(); } else if(Email=="") { addToast("Email field is required!","orange"); $("#Email").focus(); } else if (mailFormat.test(Email) == false) { addToast("Invalid mail format!","orange"); $("#Email").focus(); } else if(number=="") { addToast("Mobile number field is required!","orange"); $("#number").focus(); } else if(Password=="") { addToast("Password field is required!","orange"); $("#Password").focus(); } else if(CPassword=="") { addToast("Confirm password field is required!","orange"); $("#CPassword").focus(); } else if(Password!=CPassword) { addToast("Must be same password and Confirm Password","orange"); $("#CPassword").focus(); } else { $("#AdminProfileSubmitForm").submit(); } } else { if (Name=="") { addToast("Name field is required!","orange"); $("#Name").focus(); } else if(Email=="") { addToast("Email field is required!","orange"); $("#Email").focus(); } else if (mailFormat.test(Email) == false) { addToast("Invalid mail format!","orange"); $("#Email").focus(); } else if(number=="") { addToast("Mobile number field is required!","orange"); $("#number").focus(); } else { $("#AdminProfileSubmitForm").submit(); } } }); }); function adminSubmitModalfun(id) { $("#myModal").load('../backend/adminSubmitModal?id='+id); $("#myModal").modal({ backdrop: 'static', keyboard: false }); } function adminSubmitBtnFun() { var id= $("#id").val(); if (id=="") { addToast("Inserted succefully","green"); } else { addToast("Updated succefully","green"); } $('#adminSubmitForm').attr('action','adminSubmitBtnFun'); $('#adminSubmitForm').submit(); // console.log($('#adminSubmitForm').serialize()); // $.ajax({ // dataType: "json", // // type: 'POST', // url: 'adminSubmitBtnFun', // data: $('#adminSubmitForm').serialize(), // success: function (response) { // if (response.status=="true") { // $(".close").trigger('click'); // addToast(response.msg,"green"); // window.location.reload(); // } // }, // error: function (xhr,status,error) { // alert("Error: " + error); // } // }); } function adminDeleteModalfun(id,flag) { if (flag==1) { var msg = 'Do you want active this admin?' } else { var msg = 'Do you want Inactive this admin?' } if(confirm(msg)) { $.ajax({ dataType: "json", // type: 'POST', url: 'adminDeleteBtnFun?id='+id+'&flag='+flag, success: function (response) { if (response.status=="true") { addToast(response.msg,"green"); window.location.reload(); } }, error: function (xhr,status,error) { alert("Error: " + error); } }); } } function GalleryTable() { $('#GalleryTable').DataTable({ processing: true, serverSide: true, responsive: true, ajax: 'gallerylist', columns: [ {data: 'rownum', name: 'rownum', "searchable": false}, {data: 'title', name: 'title'}, {data: 'students', name: 'students'}, {data: 'createdDate', name: 'createdDate'}, {data: 'view', name: 'view'}, {data: 'action', name: 'action'} ] }); } function galleryDeleteModalfun(id) { if(confirm('Do you want delete this!')) { $.ajax({ dataType: "json", // type: 'POST', url: 'galleryDelete?id='+id, success: function (response) { if (response.status=="true") { addToast(response.msg,"green"); window.location.reload(); } }, error: function (xhr,status,error) { alert("Error: " + error); } }); } } function FileManagerTable() { $('#FileManagerTable').DataTable({ processing: true, serverSide: true, responsive: true, ajax: 'fileManagerlist', columns: [ {data: 'rownum', name: 'rownum'}, {data: 'title', name: 'title'}, {data: 'students', name: 'students'}, {data: 'createdDate', name: 'createdDate'}, {data: 'view', name: 'view'}, {data: 'action', name: 'action'} ] }); } function fileManagerDeleteModalfun(id) { if(confirm('Do you want delete this!')) { $.ajax({ dataType: "json", // type: 'POST', url: 'fileManagerDelete?id='+id, success: function (response) { if (response.status=="true") { addToast(response.msg,"green"); window.location.reload(); } }, error: function (xhr,status,error) { alert("Error: " + error); } }); } }
33.65625
88
0.479521
941d1e3c506c9e30c3edb1d260feb95db900f00d
1,322
js
JavaScript
src/pages/podcasts.js
ldcjrStudio/taking-blaction
9e857c9ccbae638d10fe240474678ecdd6db5992
[ "MIT" ]
1
2020-06-03T21:11:13.000Z
2020-06-03T21:11:13.000Z
src/pages/podcasts.js
ldcjrStudio/takeblaction
9e857c9ccbae638d10fe240474678ecdd6db5992
[ "MIT" ]
null
null
null
src/pages/podcasts.js
ldcjrStudio/takeblaction
9e857c9ccbae638d10fe240474678ecdd6db5992
[ "MIT" ]
null
null
null
import React from "react" import { graphql } from "gatsby" import Layout from "../components/layout" import DataList from "../components/datalist" export const query = graphql` query PodcastsQuery { allPodcastsCsv { edges { node { long_description short_description Thumbnail Name External_Link } } } } ` const Podcasts = ({ data }) => { function getPodcastsData(data) { const podcastsArray = [] data.allPodcastsCsv.edges.forEach(item => podcastsArray.push( <DataList title={item.node.Name} shortDesc={item.node.short_description} imgSrc={item.node.Thumbnail} longDesc={item.node.long_description} extLink={item.node.External_Link} key={item.node.Name} /> ) ) return podcastsArray } return ( <Layout> <div className="category-header"> <h2>Listen</h2> <h4> If you enjoy the long-form structure of podcasts for self-educating and learning more about the issues surrounding discrimination throughout the world, we recommend these: </h4> </div> <div id="data-container">{getPodcastsData(data)}</div> </Layout> ) } export default Podcasts
22.793103
77
0.596823
941d47245683d9b1efbabe89cfcc5c1dd93e6305
999
js
JavaScript
client/test/AmenitiesList.test.js
matt-winzer/Jared-About-Service
0fc85487ce01788490f117b3ff2fdb1f5f0ae610
[ "MIT" ]
null
null
null
client/test/AmenitiesList.test.js
matt-winzer/Jared-About-Service
0fc85487ce01788490f117b3ff2fdb1f5f0ae610
[ "MIT" ]
null
null
null
client/test/AmenitiesList.test.js
matt-winzer/Jared-About-Service
0fc85487ce01788490f117b3ff2fdb1f5f0ae610
[ "MIT" ]
null
null
null
import React from 'react'; import { shallow, mount } from 'enzyme'; import { findByTestAttr } from './utils.js'; import AmenitiesList from '../components/Amenitieslist/AmenitiesList'; import AmenitiesListItem from '../components/AmenitiesListItem/AmenitiesListItem'; describe('Amenities test suite', () => { let component; beforeEach(() => { const props = { amenities: ['Non-smoking', 'Swimming pool', 'Hot tub'] }; component = shallow(<AmenitiesList {...props}/>); }); it('should render an amenity list item for each amenity in props.amenities', () =>{ const wrapper = component.find('AmenitiesListItem'); expect(wrapper.length).toBe(3); }); it('should render a heading without error', ( )=> { const wrapper = component.find('.heading'); expect(wrapper.length).toBe(1); }); it('should should render a clickable div to show more amenities', () => { const wrapper = component.find('.show'); expect(wrapper.length).toBe(1); }); });
30.272727
85
0.660661
941e446f4c394149415664bd6a2a8e3543c1b58d
593
js
JavaScript
nodejs/publish-to-sns/app.js
lkurzyniec/lambdas
52deab3c954c427a73412f60dba4046e81a1e368
[ "MIT" ]
null
null
null
nodejs/publish-to-sns/app.js
lkurzyniec/lambdas
52deab3c954c427a73412f60dba4046e81a1e368
[ "MIT" ]
1
2021-11-17T08:36:36.000Z
2021-11-17T08:36:36.000Z
nodejs/publish-to-sns/app.js
lkurzyniec/lambdas
52deab3c954c427a73412f60dba4046e81a1e368
[ "MIT" ]
null
null
null
/** The following JSON template shows what is sent as the payload: { "serialNumber": "GXXXXXXXXXXXXXXXXX", "batteryVoltage": "xxmV", "clickType": "SINGLE" | "DOUBLE" | "LONG" } */ 'use strict'; const AWS = require('aws-sdk'); const SNS = new AWS.SNS(); const TOPIC_ARN = process.env.TopicArn; exports.handler = (event, context, callback) => { console.log('Received event:', event); const params = { Message: `Pressed: ${event.clickType}`, Subject: `Greetings from IoT Button`, TopicArn: TOPIC_ARN, }; SNS.publish(params, callback); };
21.962963
62
0.630691
941eb7ee24bb3c139e5dce526ea2aefabd41021f
610
js
JavaScript
MultiSpaDemo/MultiSpaDemo/ClientApps/Admin/boot.js
slask/MultiSpaDemo
7023d2cf867a9df50db6c5ef426a23e7238bf68c
[ "MIT" ]
2
2018-09-12T10:48:11.000Z
2019-11-04T07:32:31.000Z
MultiSpaDemo/MultiSpaDemo/ClientApps/Admin/boot.js
slask/MultiSpaDemo
7023d2cf867a9df50db6c5ef426a23e7238bf68c
[ "MIT" ]
null
null
null
MultiSpaDemo/MultiSpaDemo/ClientApps/Admin/boot.js
slask/MultiSpaDemo
7023d2cf867a9df50db6c5ef426a23e7238bf68c
[ "MIT" ]
null
null
null
import Vue from 'vue' import App from './App.vue' import VueRouter from 'vue-router' import Orders from './Orders' import Users from './Users' import NotFound from '../common/NotFound' Vue.use(VueRouter) const routes = [ { path: '/admin', redirect: '/admin/orders' }, { path: '/admin/orders', component: Orders }, { path: '/admin/users', component: Users }, { path: '*', component: NotFound } ] const router = new VueRouter({ routes, mode: 'history' }) new Vue({ el: '#app-root', render: h => h(App), router //<---same as ES5: router: router })
17.941176
49
0.595082
941ecc51b85bd3ba3a7eb705ed392c7748a9507a
379
js
JavaScript
server/register.js
xinitx/VoiceRecognition
6816d85b1e355d5f2b7eba33edcb1ba4d39ca0d2
[ "MIT" ]
null
null
null
server/register.js
xinitx/VoiceRecognition
6816d85b1e355d5f2b7eba33edcb1ba4d39ca0d2
[ "MIT" ]
null
null
null
server/register.js
xinitx/VoiceRecognition
6816d85b1e355d5f2b7eba33edcb1ba4d39ca0d2
[ "MIT" ]
null
null
null
const dbserver = require('../dao/dbserver'); //用户注册 exports.register = function (req, res) { let { name, email, pwd } = req.body; res.send({ name, email, pwd }) dbserver.buildUser(name, email, pwd, res); } //判断用户/邮箱是否占用 exports.judgeValue = function (req, res) { let { data, type } = req.body; res.send({ data, type }) dbserver.countUserValue(data, type, res); }
22.294118
44
0.643799
942006d03b3a08c64a76c0c810fe018691eaa110
370
js
JavaScript
database/Movie.js
hrr40-fec2/navigation_bar_service
92e6939800cec94d2c3119ecea1005628589f1e7
[ "MIT" ]
null
null
null
database/Movie.js
hrr40-fec2/navigation_bar_service
92e6939800cec94d2c3119ecea1005628589f1e7
[ "MIT" ]
3
2019-08-22T21:45:11.000Z
2021-05-10T09:01:52.000Z
database/Movie.js
hrr40-fec2/navigation_bar_service
92e6939800cec94d2c3119ecea1005628589f1e7
[ "MIT" ]
null
null
null
const mongoose = require('mongoose'); const db = require('./index.js'); const movieSchema = mongoose.Schema({ title: String, year: Number, mpaaRating: String, genre: [String], coverImage: String, reviewRating: [Number], summary: String, director: String, stars: [String] }); const Movie = mongoose.model('Movie', movieSchema); module.exports = Movie;
21.764706
51
0.691892
9421da27d207693966f3ddd8b5a8d3c2baeb96ea
2,944
js
JavaScript
packages/jaeger-ui/src/components/QualityMetrics/Header.test.js
alanisaac/jaeger-ui
9fa9d7405473077d7f1de9c8a7b7e7fb170d754b
[ "Apache-2.0" ]
761
2017-10-23T20:32:32.000Z
2022-03-30T14:47:49.000Z
packages/jaeger-ui/src/components/QualityMetrics/Header.test.js
alanisaac/jaeger-ui
9fa9d7405473077d7f1de9c8a7b7e7fb170d754b
[ "Apache-2.0" ]
797
2017-10-23T00:12:07.000Z
2022-03-31T11:35:16.000Z
packages/jaeger-ui/src/components/QualityMetrics/Header.test.js
alanisaac/jaeger-ui
9fa9d7405473077d7f1de9c8a7b7e7fb170d754b
[ "Apache-2.0" ]
343
2017-11-01T20:18:50.000Z
2022-03-25T10:51:58.000Z
// Copyright (c) 2020 Uber Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. import React from 'react'; import { shallow } from 'enzyme'; import { InputNumber } from 'antd'; import debounceMock from 'lodash/debounce'; import Header from './Header'; jest.mock('lodash/debounce'); describe('Header', () => { const lookback = 4; const minProps = { lookback, setLookback: jest.fn(), setService: jest.fn(), }; const service = 'test service'; const props = { ...minProps, service, services: ['foo', 'bar', 'baz'], }; let wrapper; let callDebouncedFn; let setLookbackSpy; beforeAll(() => { debounceMock.mockImplementation(fn => { setLookbackSpy = jest.fn((...args) => { callDebouncedFn = () => fn(...args); }); return setLookbackSpy; }); }); beforeEach(() => { props.setLookback.mockReset(); setLookbackSpy = undefined; wrapper = shallow(<Header {...props} />); }); describe('rendering', () => { it('renders as expected with minimum props', () => { wrapper = shallow(<Header {...minProps} />); expect(wrapper).toMatchSnapshot(); }); it('renders as expected with full props', () => { expect(wrapper).toMatchSnapshot(); }); it('renders props.lookback when state.ownInputValue is `undefined`', () => { expect(wrapper.find(InputNumber).prop('value')).toBe(lookback); }); it('renders state.ownInputValue when it is not `undefined` regardless of props.lookback', () => { const ownInputValue = 27; wrapper.setState({ ownInputValue }); expect(wrapper.find(InputNumber).prop('value')).toBe(ownInputValue); }); }); describe('setting lookback', () => { it('no-ops for string values', () => { wrapper.find(InputNumber).prop('onChange')('foo'); expect(wrapper.state('ownInputValue')).toBe(undefined); }); it('updates state with numeric value, then clears state and calls props.setLookback after debounce', () => { const value = 42; wrapper.find(InputNumber).prop('onChange')(value); expect(wrapper.state('ownInputValue')).toBe(value); expect(setLookbackSpy).toHaveBeenCalledWith(42); expect(props.setLookback).not.toHaveBeenCalled(); callDebouncedFn(); expect(wrapper.state('ownInputValue')).toBe(undefined); expect(props.setLookback).toHaveBeenCalledWith(42); }); }); });
30.350515
112
0.648438
9421fc1b277fb084d7ea127b039e66241b331a4b
4,953
js
JavaScript
index.js
owjs3901/Web_Mission
4740648771669c2b90a299c52dce2b7df169cafa
[ "MIT" ]
1
2020-10-26T21:19:43.000Z
2020-10-26T21:19:43.000Z
index.js
owjs3901/Web_Mission
4740648771669c2b90a299c52dce2b7df169cafa
[ "MIT" ]
2
2020-10-12T15:59:48.000Z
2020-10-27T08:07:49.000Z
index.js
owjs3901/Web_Mission
4740648771669c2b90a299c52dce2b7df169cafa
[ "MIT" ]
3
2020-10-07T08:47:17.000Z
2020-10-12T16:00:03.000Z
const express = require('express') const session = require('express-session'); const FileStore = require('session-file-store')(session); // 1 const cors = require('cors'); const multer = require('multer'); const fs = require('fs'); const upload = multer({ dest: 'public/profile', limits: { fileSize: 5 * 1024 * 1024 } }); const app = express(); /** * 유저 데이터 */ /* "test@test.com":{ "id":"test@test.com", "name":"testName", "birth":"2020-11-25", "pw":"test", "message":"testMSG", "today":0, "total":0, "comments":[] } */ let db = JSON.parse(fs.readFileSync('db.json', 'utf-8')) function saveDB() { fs.writeFileSync('db.json', JSON.stringify(db), 'utf-8') } function useNotLogin(req, res, next) { if (!req.session.user) next() } app.use(express.urlencoded({ extended: false })) app.use(express.json()) app.use(cors()) app.use(session({ secret: 'mbs', resave: true, saveUninitialized: true, store: new FileStore() })); app.use(express.static('public')) app.get('/', (req, res) => { res.redirect('/profilebox.html') }) /** * 접속된 유저 정보 확인 */ app.get('/api/user', (req, res) => { if (req.session.user) res.status(200).json(db[req.session.user.id]) else res.status(400).end() }) /** * 중복된 아이디인가? */ app.post('/api/overlap', (req, res) => { console.log(req.body) res.status(200).json({ res: Boolean(db[req.body.id]) }) }) /** * comment list */ app.get('/api/comments/:id', (req, res) => { if (db[req.params.id]) res.status(200).json({ res: db[req.params.id].comments }) else res.status(400).end() }) /** * 남의 데이터 확인 * ex) /api/user/test@test.com */ app.get('/api/user/:id', (req, res) => { if (db[req.params.id]) res.status(200).json(db[req.params.id]) else res.status(400).end() }) /** * 프로필 박스 리스트(랭킹) */ app.get('/api/profile_box', (req, res) => { const list = [] for (const data in db) list.push({ id: db[data].id, name: db[data].name, message: db[data].message, total: db[data].total, today: db[data].today, }) res.status(200).json(list) }) app.get('/api/userList', (req, res) => { const list = [] for (const data in db) list.push({ id: db[data].id, name: db[data].name, message: db[data].message, total: db[data].total, today: db[data].today, img: db[data].img, }) res.status(200).json({ res: list }) }) app.get('/api/isLogin', (req, res) => { res.json({ res: Boolean(req.session.user) }) }) /** * 댓글 삭제 * /api/comment/유저아이디/코멘트 아이디 */ app.delete('/api/comment/:id/:cid', (req, res) => { try { if (db[req.params.id].comments[req.params.cid].pw == req.body.pw) db[req.params.id].comments.splice(req.params.cid, 1) res.status(200).json({ res: true }) } catch (e) { res.status(200).json({ res: false }) } }) /** * 댓글 생성 */ app.post('/api/comment/:id', (req, res) => { try { db[req.params.id].comments.push({ con: req.body.con, pw: req.body.pw }) } catch (e) { } res.redirect('/youpage.html?id=' + req.params.id) }) /** * 투데이 랭킹 */ app.get('/api/today-rank', (req, res) => { const list = [] for (const data in db) list.push(db[data]) list.sort(function (a, b) { return b.today - a.today; }); res.json({ res: list.slice(0, 3) }) }) /** * 유저 삭제 */ app.delete('/api/user/:id', (req, res) => { if(db[req.params.id]) { delete db[req.params.id] res.status(200).json({ res: true }) } else res.status(400).json({ res: false }) }) /** * 투데이 상승 */ app.get('/api/today/:id', (req, res) => { if(db[req.params.id]) { db[req.params.id].today++; db[req.params.id].total++; saveDB(); res.status(200).json({ res: true }) } else res.status(400).json({ res: false }) }) app.post('/register', useNotLogin, (req, res) => { const { id, pw, name, birth } = req.body; if (db[id]) { res.redirect('/login.html') } else { db[id] = { id, name, birth, pw, message: '', today: 0, total: 0, img: 'img/profile.jpg', comments: [] }; saveDB() res.redirect('/login.html') } }) app.get('/logout', (req, res) => { req.session.user = undefined req.session.save() saveDB() res.redirect('/profilebox.html') }) app.post('/profile', upload.single('img'), (req, res) => { const { name, msg } = req.body; const id = req.session.user.id; db[id].name = name; db[id].message = msg; if (req.file) db[id].img = 'profile/' + req.file.filename; req.session.user = db[id] req.session.save() saveDB() res.redirect('/') }) app.post('/login', useNotLogin, (req, res) => { const id = req.body.id const pw = req.body.pw if (db[id] && db[id].pw === pw) { req.session.user = db[id]; req.session.save() res.redirect('/profilebox.html') } else res.redirect('/login.html') }) app.get('*', (req, res) => { res.redirect('/profilebox.html') // res.send("{get} user - 유저 정보 조회<br>{get} isLogin - 로그인 했는가<br>{post} register - 회원가입") }) app.listen(80, () => { console.log('server start!') })
16.400662
90
0.580658
9425af97d7e96cc311a59538f5115f3418daa23a
128
js
JavaScript
app/src/shared/vue/modules/filters/mixins/mixin-components.js
CrisFeit/Vtex-Vue
e6401ea6c4002c8908a9350bbee0efac81c3f4dc
[ "MIT" ]
4
2020-05-31T22:42:38.000Z
2022-03-11T17:42:50.000Z
app/src/shared/vue/modules/filters/mixins/mixin-components.js
CrisFeit/Vtex-Vue
e6401ea6c4002c8908a9350bbee0efac81c3f4dc
[ "MIT" ]
null
null
null
app/src/shared/vue/modules/filters/mixins/mixin-components.js
CrisFeit/Vtex-Vue
e6401ea6c4002c8908a9350bbee0efac81c3f4dc
[ "MIT" ]
1
2022-03-11T17:42:55.000Z
2022-03-11T17:42:55.000Z
export const mixinComponents = { methods: { isMobile(){ return window.innerWidth < 768 } } }
18.285714
42
0.515625
94260db28e3425a57735bc723ca4bcc82499107a
2,932
js
JavaScript
projects/banger-site/public/js/index.js
codemonkey800/useless-projects
c22f05a86f0dc6b5d1aea9a49ccd2040df03ec17
[ "MIT" ]
null
null
null
projects/banger-site/public/js/index.js
codemonkey800/useless-projects
c22f05a86f0dc6b5d1aea9a49ccd2040df03ec17
[ "MIT" ]
null
null
null
projects/banger-site/public/js/index.js
codemonkey800/useless-projects
c22f05a86f0dc6b5d1aea9a49ccd2040df03ec17
[ "MIT" ]
null
null
null
$( window ).on( 'load', function() { if( location.pathname !== '/' && location.pathname !== '/index' ) { return; } $( '.navbar-default' ).css( 'opacity', 0 ); $( '.navbar-default' ).css( 'transform', 'translateY(-100%)' ); $( '.home-link' ).click( function( e ) { e.preventDefault(); $.fn.fullpage.moveSectionUp(); } ); $( '.sign-up-link' ).click( function( e ) { e.preventDefault(); $.fn.fullpage.moveSectionDown(); } ); // Give the nav bar time to hide setTimeout( function() { $( '.navbar-default' ).css( 'opacity', 1 ); }, 400 ); $( document ).on( 'submit', '.form-inline', function( e ) { e.preventDefault(); var fullName = $( '#input-full-name' ).val(); var email = $( '#input-email' ).val(); if( !fullName.length || !email ) return; $.ajax( '/beta-sign-up', { contentType: 'application/json', data: JSON.stringify( { fullName: fullName, email: email } ), method: 'POST', beforeSend: function() { // Change success alert to loading alert $successAlert = $( '#fullpage .section .two .alert' ); $successAlert.html( '<strong>Sending</strong> Please wait, some intelligent hamsters are doing work.' ); $successAlert.removeClass( 'alert-success' ); $successAlert.removeClass( 'alert-hidden' ); $successAlert.addClass( 'alert-info' ); setTimeout( function() { $successAlert.addClass( 'alert-success' ); $successAlert.addClass( 'alert-hidden' ); $successAlert.removeClass( 'alert-info' ); }, 1500 ); }, complete: function() { $successAlert = $( '#fullpage .section .two .alert' ); $successAlert.html( '<strong>Success</strong> Welcome to Banger!' ); $successAlert.removeClass( 'alert-hidden' ); setTimeout( function() { $successAlert.addClass( 'alert-hidden' ); }, 2500 ); } } ); } ); } ); Banger.navbar = { show: function() { $( '.navbar-default' ).css( 'transform', 'translateY(0)' ); }, hide: function() { $( '.navbar-default' ).css( 'transform', 'translateY(-100%)' ); } }; $( document ).ready( function() { $( '#fullpage' ).fullpage( { // Enable when site has content // // afterLoad: function( anchorLink, index ) { // if( index == 2 ) { // Banger.navbar.show(); // } // }, // onLeave: function( index ) { // if( index == 2 ) { // Banger.navbar.hide(); // } // } } ); } );
30.863158
120
0.469304
94263814f69b37d609176ef623cec63899041567
34,078
js
JavaScript
js/app.1c6e5aeb.js
alexleess/alexleess.github.io
e41a4a30ddd5a0b7cc6d7de10b5ec8e1ecea4fe8
[ "MIT" ]
2
2018-10-28T13:04:52.000Z
2018-10-28T13:04:53.000Z
js/app.1c6e5aeb.js
alexleess/alexleess.github.io
e41a4a30ddd5a0b7cc6d7de10b5ec8e1ecea4fe8
[ "MIT" ]
1
2018-09-18T09:59:45.000Z
2018-09-18T09:59:45.000Z
js/app.1c6e5aeb.js
alexleess/alexleess.github.io
e41a4a30ddd5a0b7cc6d7de10b5ec8e1ecea4fe8
[ "MIT" ]
null
null
null
(function(e){function t(t){for(var r,a,o=t[0],i=t[1],s=t[2],l=0,d=[];l<o.length;l++)a=o[l],c[a]&&d.push(c[a][0]),c[a]=0;for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r]);f&&f(t);while(d.length)d.shift()();return u.push.apply(u,s||[]),n()}function n(){for(var e,t=0;t<u.length;t++){for(var n=u[t],r=!0,a=1;a<n.length;a++){var o=n[a];0!==c[o]&&(r=!1)}r&&(u.splice(t--,1),e=i(i.s=n[0]))}return e}var r={},a={app:0},c={app:0},u=[];function o(e){return i.p+"js/"+({}[e]||e)+"."+{"chunk-00255e4c":"481ea416","chunk-2d0ac3cf":"e5d6deae","chunk-2d0d2f73":"8842fccc","chunk-2d0d5c90":"ad58facb","chunk-2d0d6794":"d9881033","chunk-2d0d6fa0":"b4d317d2","chunk-2d0ea0d5":"4b8062d0","chunk-2d2105c2":"8f215511","chunk-2d2107db":"c703ef7c","chunk-2d21f841":"3952b67a","chunk-3ad86d7a":"0819f96b","chunk-6f506719":"b58b85d8","chunk-76027fbc":"ea22836a","chunk-76e7abcc":"2b2485e8","chunk-78f89eec":"3956a578","chunk-78f8afb2":"ffd91f0b","chunk-7a8a58f0":"6a729061","chunk-c5d213a8":"711eabba","chunk-2d221b5a":"05b093d2","chunk-790a972a":"70e8b318","chunk-790c6a49":"5122c36c","chunk-8d90378c":"c1ae0324","chunk-13103988":"8f9fe837","chunk-13252dcf":"1d91116d","chunk-386de121":"88bfa33d","chunk-47879b26":"54e34ceb","chunk-52b7ab63":"99b867f1","chunk-c9fdb53e":"941752a5","chunk-cc934a94":"a3f237c4","chunk-f984709c":"6ea4d68c"}[e]+".js"}function i(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.e=function(e){var t=[],n={"chunk-00255e4c":1,"chunk-3ad86d7a":1,"chunk-76027fbc":1,"chunk-76e7abcc":1,"chunk-78f89eec":1,"chunk-78f8afb2":1,"chunk-7a8a58f0":1,"chunk-c5d213a8":1,"chunk-790a972a":1,"chunk-790c6a49":1,"chunk-8d90378c":1,"chunk-13103988":1,"chunk-13252dcf":1,"chunk-386de121":1,"chunk-47879b26":1,"chunk-52b7ab63":1,"chunk-c9fdb53e":1,"chunk-cc934a94":1,"chunk-f984709c":1};a[e]?t.push(a[e]):0!==a[e]&&n[e]&&t.push(a[e]=new Promise(function(t,n){for(var r="css/"+({}[e]||e)+"."+{"chunk-00255e4c":"fd9629d8","chunk-2d0ac3cf":"31d6cfe0","chunk-2d0d2f73":"31d6cfe0","chunk-2d0d5c90":"31d6cfe0","chunk-2d0d6794":"31d6cfe0","chunk-2d0d6fa0":"31d6cfe0","chunk-2d0ea0d5":"31d6cfe0","chunk-2d2105c2":"31d6cfe0","chunk-2d2107db":"31d6cfe0","chunk-2d21f841":"31d6cfe0","chunk-3ad86d7a":"7eac9078","chunk-6f506719":"31d6cfe0","chunk-76027fbc":"3845ef43","chunk-76e7abcc":"327d48f9","chunk-78f89eec":"7eac9078","chunk-78f8afb2":"7eac9078","chunk-7a8a58f0":"a9eddabb","chunk-c5d213a8":"8e247190","chunk-2d221b5a":"31d6cfe0","chunk-790a972a":"7eac9078","chunk-790c6a49":"7eac9078","chunk-8d90378c":"7eac9078","chunk-13103988":"e5d033c3","chunk-13252dcf":"e5d033c3","chunk-386de121":"6b4d3ee6","chunk-47879b26":"6b4d3ee6","chunk-52b7ab63":"6b4d3ee6","chunk-c9fdb53e":"6b4d3ee6","chunk-cc934a94":"6b4d3ee6","chunk-f984709c":"6b4d3ee6"}[e]+".css",a=i.p+r,c=document.getElementsByTagName("link"),u=0;u<c.length;u++){var o=c[u],s=o.getAttribute("data-href")||o.getAttribute("href");if("stylesheet"===o.rel&&(s===r||s===a))return t()}var l=document.getElementsByTagName("style");for(u=0;u<l.length;u++){o=l[u],s=o.getAttribute("data-href");if(s===r||s===a)return t()}var d=document.createElement("link");d.rel="stylesheet",d.type="text/css",d.onload=t,d.onerror=function(t){var r=t&&t.target&&t.target.src||a,c=new Error("Loading CSS chunk "+e+" failed.\n("+r+")");c.request=r,n(c)},d.href=a;var f=document.getElementsByTagName("head")[0];f.appendChild(d)}).then(function(){a[e]=0}));var r=c[e];if(0!==r)if(r)t.push(r[2]);else{var u=new Promise(function(t,n){r=c[e]=[t,n]});t.push(r[2]=u);var s,l=document.getElementsByTagName("head")[0],d=document.createElement("script");d.charset="utf-8",d.timeout=120,i.nc&&d.setAttribute("nonce",i.nc),d.src=o(e),s=function(t){d.onerror=d.onload=null,clearTimeout(f);var n=c[e];if(0!==n){if(n){var r=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.src,u=new Error("Loading chunk "+e+" failed.\n("+r+": "+a+")");u.type=r,u.request=a,n[1](u)}c[e]=void 0}};var f=setTimeout(function(){s({type:"timeout",target:d})},12e4);d.onerror=d.onload=s,l.appendChild(d)}return Promise.all(t)},i.m=e,i.c=r,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/",i.oe=function(e){throw console.error(e),e};var s=window["webpackJsonp"]=window["webpackJsonp"]||[],l=s.push.bind(s);s.push=t,s=s.slice();for(var d=0;d<s.length;d++)t(s[d]);var f=l;u.push([0,"chunk-vendors"]),n()})({0:function(e,t,n){e.exports=n("cd49")},"0285":function(e,t,n){"use strict";n.d(t,"d",function(){return r}),n.d(t,"a",function(){return a}),n.d(t,"b",function(){return c}),n.d(t,"c",function(){return u});var r={SET_TAB:"SET_SELECT_TAB",NEXT_TAB:"NEXT_TAB",PREV_TAB:"PREV_TAB"},a={PREV_PAGE:"PREV_PAGE",NEXT_PAGE:"NEXT_PAGE"},c={CURRENTPAGE:"currentPage"},u="home"},"0613":function(e,t,n){"use strict";var r,a,c,u=n("2b0e"),o=n("2f62"),i=n("6011"),s=n("a34a"),l=n.n(s),d=n("3040"),f=n("a322"),p=n("3747"),h=n("0285"),b={namespaced:!0,state:{selectTab:p["b"].all,pages:{ask:1,share:1,all:1,good:1,job:1,dev:1}},mutations:Object(f["a"])({},h["d"].SET_TAB,function(e,t){e.selectTab=t}),actions:(r={},Object(f["a"])(r,h["a"].PREV_PAGE,function(){var e=Object(d["a"])(l.a.mark(function e(t,n){var r,a;return l.a.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(r=t.state,a=p["b"][n],!(r.pages[a]>1)){e.next=7;break}return r.pages[a]-=1,e.abrupt("return",!0);case 7:return e.abrupt("return",!1);case 8:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}()),Object(f["a"])(r,h["a"].NEXT_PAGE,function(){var e=Object(d["a"])(l.a.mark(function e(t,n){var r,a;return l.a.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return r=t.state,a=p["b"][n],r.pages[a]+=1,e.abrupt("return",!0);case 4:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}()),r),getters:Object(f["a"])({},h["b"].CURRENTPAGE,function(e){return function(t){var n=p["b"][t];return e.pages[n]}})},_=b,k=n("8afe"),m=n("d257"),O=(a={},Object(f["a"])(a,i["n"].ADD_TOPIC_DETAIL,function(e,t){e.topicDetails=Object(k["a"])(new Set(Object(k["a"])(e.topicDetails).concat([t.topicDetail])))}),Object(f["a"])(a,i["n"].REMOVE_TOPIC_DETAIL,function(e){e.topicDetails.splice(0,5)}),Object(f["a"])(a,i["n"].SET_TOPIC_DETAIL,function(e,t){m["a"].log("SET_TOPIC_DETAIL"),e.topicDetail=t,m["a"].log(e.topicDetail)}),a),v=O,E=n("79f6");function T(e,t){return e.find(function(e){return e.id===t})||null}var S,A,g,j=(c={},Object(f["a"])(c,i["m"].COLLECT_OR_DE_COLLECT,function(){var e=Object(d["a"])(l.a.mark(function e(t){var n,r,a,c,u;return l.a.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(n=t.commit,r=t.state,a=t.rootState,c=t.dispatch,null!==r.topicDetail){e.next=4;break}return n(i["l"].SHOW_SNACK_BAR,"主题为空",{root:!0}),e.abrupt("return");case 4:if(e.prev=4,!r.topicDetail.is_collect){e.next=13;break}return e.next=8,Object(E["h"])({accesstoken:a.accesstoken,topic_id:r.topicDetail.id});case 8:return e.next=10,c(i["m"].INIT_TOPIC_DETAIL,{id:r.topicDetail.id});case 10:n(i["l"].SHOW_SNACK_BAR,{message:"取消收藏成功",color:"success"},{root:!0}),e.next=18;break;case 13:return e.next=15,Object(E["g"])({accesstoken:a.accesstoken,topic_id:r.topicDetail.id});case 15:return e.next=17,c(i["m"].INIT_TOPIC_DETAIL,{id:r.topicDetail.id});case 17:n(i["l"].SHOW_SNACK_BAR,{message:"收藏成功",color:"success"},{root:!0});case 18:e.next=24;break;case 20:e.prev=20,e.t0=e["catch"](4),u=r.topicDetail.is_collect?"取消收藏失败!":"收藏失败!",n(i["l"].SHOW_SNACK_BAR,{message:u},{root:!0});case 24:case"end":return e.stop()}},e,this,[[4,20]])}));return function(t){return e.apply(this,arguments)}}()),Object(f["a"])(c,i["m"].POST_REPLY_UPS,function(){var e=Object(d["a"])(l.a.mark(function e(t,n){var r,a,c,u,o;return l.a.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(r=t.commit,a=t.state,c=t.rootState,u=t.dispatch,null!==c.accesstoken){e.next=4;break}return r(i["l"].SHOW_SNACK_BAR,{message:"未登录!"},{root:!0}),e.abrupt("return");case 4:return e.prev=4,e.next=7,Object(E["k"])(n,{accesstoken:c.accesstoken});case 7:return e.next=9,u(i["m"].INIT_TOPIC_DETAIL,{id:a.topicDetail.id});case 9:e.next=15;break;case 11:e.prev=11,e.t0=e["catch"](4),o=e.t0.message||"网络错误",r(i["l"].SHOW_SNACK_BAR,{message:o},{root:!0});case 15:case"end":return e.stop()}},e,this,[[4,11]])}));return function(t,n){return e.apply(this,arguments)}}()),Object(f["a"])(c,i["m"].POST_NEW_REPLY,function(){var e=Object(d["a"])(l.a.mark(function e(t,n){var r,a,c,u,o,s;return l.a.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(r=t.commit,a=t.state,c=t.rootState,u=t.dispatch,null!==c.accesstoken){e.next=4;break}return r(i["l"].SHOW_SNACK_BAR,{message:"未登录!"},{root:!0}),e.abrupt("return",!1);case 4:if(!a.topicDetail){e.next=22;break}return e.prev=5,c.addPrefix&&(n+=c.prefix),e.next=9,Object(E["i"])(a.topicDetail.id,{content:n,accesstoken:c.accesstoken});case 9:return o=e.sent,m["a"].log(o),e.next=13,u(i["m"].INIT_TOPIC_DETAIL,{id:a.topicDetail.id});case 13:r(i["l"].SHOW_SNACK_BAR,{message:"评论成功!",color:"success"},{root:!0}),e.next=20;break;case 16:e.prev=16,e.t0=e["catch"](5),s=e.t0.message||"评论失败!",r(i["l"].SHOW_SNACK_BAR,{message:s},{root:!0});case 20:e.next=23;break;case 22:r(i["l"].SHOW_SNACK_BAR,{message:"主题不存在!"},{root:!0});case 23:case"end":return e.stop()}},e,this,[[5,16]])}));return function(t,n){return e.apply(this,arguments)}}()),Object(f["a"])(c,i["m"].INIT_TOPIC_DETAIL,function(){var e=Object(d["a"])(l.a.mark(function e(t,n){var r,a,c,u,o,s,d;return l.a.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(r=t.commit,a=t.state,c=n.id,u=n.init,o=void 0!==u&&u,s=T(a.topicDetails,c),!s||!o){e.next=10;break}return m["a"].log("findTopicDetail"),e.next=7,r(i["n"].SET_TOPIC_DETAIL,s);case 7:return e.abrupt("return",!0);case 10:return e.prev=10,e.next=13,Object(E["a"])(c);case 13:return d=e.sent,r(i["n"].ADD_TOPIC_DETAIL,{id:c,topicDetail:d}),m["a"].log("data"),e.next=18,r(i["n"].SET_TOPIC_DETAIL,d);case 18:return a.topicDetails.length>=10&&(m["a"].log("REMOVE_TOPIC_DETAIL"),r(i["n"].REMOVE_TOPIC_DETAIL)),e.abrupt("return",!0);case 22:return e.prev=22,e.t0=e["catch"](10),m["a"].err(e.t0),e.abrupt("return",!1);case 26:case"end":return e.stop()}},e,this,[[10,22]])}));return function(t,n){return e.apply(this,arguments)}}()),c),w=j,I={topicDetails:[],topicDetail:null,replyId:null},C=I,y={},x=y,R={namespaced:!0,state:C,mutations:v,actions:w,getters:x},D=R,N=n("326d"),P={namespaced:!0,state:{author:null},mutations:(S={},Object(f["a"])(S,N["c"].SET_AUTHOR,function(e,t){e.author=t}),Object(f["a"])(S,N["c"].CLEAR_AUTHOR,function(e){e.author=null}),S),actions:Object(f["a"])({},N["b"].GET_AUTHOR,function(){var e=Object(d["a"])(l.a.mark(function e(t,n){var r,a,c;return l.a.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return r=t.commit,e.prev=1,e.next=4,Object(E["d"])(n);case 4:a=e.sent,r(N["c"].SET_AUTHOR,a),e.next=12;break;case 8:e.prev=8,e.t0=e["catch"](1),c=e.t0.message||"用户详情获取失败!",r(i["l"].SHOW_SNACK_BAR,{message:c},{root:!0});case 12:case"end":return e.stop()}},e,this,[[1,8]])}));return function(t,n){return e.apply(this,arguments)}}())},L=P,B=n("e57f"),H={namespaced:!0,state:{message:{has_read_messages:[],hasnot_read_messages:[]}},mutations:Object(f["a"])({},B["c"].SET_MESSAGES,function(e,t){e.message=t}),actions:Object(f["a"])({},B["b"].GET_USER_MESSAGES,function(){var e=Object(d["a"])(l.a.mark(function e(t){var n,r,a;return l.a.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(n=t.commit,r=t.rootState,!r.accesstoken){e.next=8;break}return e.next=4,Object(E["e"])({accesstoken:r.accesstoken});case 4:a=e.sent,n(B["c"].SET_MESSAGES,a),e.next=10;break;case 8:m["a"].err("未登录"),n(i["l"].SHOW_SNACK_BAR,{message:"未登录!"},{root:!0});case 10:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}())},G=H,V={showTabbar:!0,user:null,accesstoken:Object(m["b"])(),snackBar:{value:!1,timeout:6e3,color:"error",message:""},prefix:"\n\n------\n来自[MaterialCNode](https://alexlees.top)\n",addPrefix:!0,myFavorites:[],dialog:{value:!1}},K=V,W=(A={},Object(f["a"])(A,i["l"].SHOW_TABBAR,function(e){e.showTabbar=!0}),Object(f["a"])(A,i["l"].HIDE_TABBAR,function(e){e.showTabbar=!1}),Object(f["a"])(A,i["l"].SET_ACCESS_TOKEN,function(e,t){e.accesstoken=t,Object(m["e"])(t)}),Object(f["a"])(A,i["l"].SET_USER_INFO,function(e,t){e.user=t}),Object(f["a"])(A,i["l"].SHOW_SNACK_BAR,function(e,t){var n=t.message,r=t.timeout,a=void 0===r?6e3:r,c=t.color,u=void 0===c?"error":c;e.snackBar.color=u,e.snackBar.timeout=a,e.snackBar.message=n,e.snackBar.value=!0}),Object(f["a"])(A,i["l"].HIDE_SNACK_BAR,function(e){e.snackBar={value:!1,timeout:6e3,color:"error",message:""}}),Object(f["a"])(A,i["l"].DELETE_ACCESS_TOKEN,function(e){e.accesstoken=null,Object(m["c"])()}),Object(f["a"])(A,i["l"].TOGGLE_ADD_PREFIX,function(e){e.addPrefix=!e.addPrefix}),Object(f["a"])(A,i["l"].SET_MYFAVORITES,function(e,t){e.myFavorites=Object(k["a"])(t)}),Object(f["a"])(A,i["l"].SHOW_DIALOG,function(e,t){t.value=!0,e.dialog=t}),Object(f["a"])(A,i["l"].HIDE_DIALOG,function(e){e.dialog={value:!1}}),A),U=W,F=(g={},Object(f["a"])(g,i["k"].LOGIN,function(){var e=Object(d["a"])(l.a.mark(function e(t,n){var r,a,c,u;return l.a.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(r=t.commit,a=t.dispatch,c=t.state,n||!c.accesstoken){e.next=5;break}n=c.accesstoken,e.next=8;break;case 5:if(n||c.accesstoken){e.next=8;break}return r(i["l"].SHOW_SNACK_BAR,{message:"accesstoken错误"}),e.abrupt("return",!1);case 8:return e.prev=8,e.next=11,Object(E["f"])(n);case 11:return u=e.sent,r(i["l"].SET_ACCESS_TOKEN,n),e.next=15,a(i["k"].GET_USER_INFO,u.loginname);case 15:if(!e.sent){e.next=17;break}return e.abrupt("return",!0);case 17:return e.abrupt("return",!1);case 20:return e.prev=20,e.t0=e["catch"](8),m["a"].err(e.t0),e.abrupt("return",!1);case 24:case"end":return e.stop()}},e,this,[[8,20]])}));return function(t,n){return e.apply(this,arguments)}}()),Object(f["a"])(g,i["k"].GET_USER_INFO,function(){var e=Object(d["a"])(l.a.mark(function e(t,n){var r,a;return l.a.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return r=t.commit,e.prev=1,e.next=4,Object(E["d"])(n);case 4:return a=e.sent,r(i["l"].SET_USER_INFO,a),e.abrupt("return",!0);case 9:return e.prev=9,e.t0=e["catch"](1),m["a"].err(e.t0),e.abrupt("return",!1);case 13:case"end":return e.stop()}},e,this,[[1,9]])}));return function(t,n){return e.apply(this,arguments)}}()),Object(f["a"])(g,i["k"].LOGOUT,function(){var e=Object(d["a"])(l.a.mark(function e(t){var n;return l.a.wrap(function(e){while(1)switch(e.prev=e.next){case 0:n=t.commit,n(i["l"].SET_USER_INFO,null),n(i["l"].DELETE_ACCESS_TOKEN);case 3:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()),Object(f["a"])(g,i["k"].GET_MYFAVORITES,function(){var e=Object(d["a"])(l.a.mark(function e(t){var n,r,a,c,u;return l.a.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(n=t.commit,r=t.state,a=t.dispatch,!r.user){e.next=16;break}return e.prev=2,e.next=5,Object(E["c"])(r.user.loginname);case 5:c=e.sent,n(i["l"].SET_MYFAVORITES,c),e.next=14;break;case 9:e.prev=9,e.t0=e["catch"](2),u=e.t0.message||"请求收藏失败",n(i["l"].SHOW_SNACK_BAR,{message:u}),m["a"].log(e.t0);case 14:e.next=17;break;case 16:null===r.user&&r.accesstoken?(n(i["l"].SHOW_SNACK_BAR,{message:"正在获取用户信息...请等待.",color:"info",timeout:1e3}),setTimeout(function(){a(i["k"].GET_MYFAVORITES)},500)):(n(i["l"].SHOW_SNACK_BAR,{message:"未登录不能获取收藏"}),m["a"].log("未登录"));case 17:case"end":return e.stop()}},e,this,[[2,9]])}));return function(t){return e.apply(this,arguments)}}()),Object(f["a"])(g,i["k"].CREATE_TOPIC,function(){var e=Object(d["a"])(l.a.mark(function e(t,n){var r,a,c,u,o;return l.a.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(r=t.commit,a=t.state,!a.accesstoken){e.next=20;break}return e.prev=2,c=Object.create(null),Object.assign(c,n),c.accesstoken=a.accesstoken,e.next=8,Object(E["j"])(c);case 8:return u=e.sent,m["a"].log(u),e.abrupt("return",u);case 13:return e.prev=13,e.t0=e["catch"](2),o=e.t0.message||"网络错误",r(i["l"].SHOW_SNACK_BAR,{message:o}),e.abrupt("return",null);case 18:e.next=22;break;case 20:return r(i["l"].SHOW_SNACK_BAR,{message:"未登录不能发布主题"}),e.abrupt("return",null);case 22:case"end":return e.stop()}},e,this,[[2,13]])}));return function(t,n){return e.apply(this,arguments)}}()),g),M=F;u["default"].use(o["a"]);var Y=new o["a"].Store({state:K,mutations:U,actions:M,modules:{home:_,topic:D,author:L,messages:G}});Y.dispatch(i["k"].LOGIN);t["a"]=Y},"326d":function(e,t,n){"use strict";n.d(t,"b",function(){return r}),n.d(t,"c",function(){return a}),n.d(t,"a",function(){return c});var r={GET_AUTHOR:"GET_AUTHOR"},a={SET_AUTHOR:"SET_AUTHOR",CLEAR_AUTHOR:"CLEAR_AUTHOR"},c="author"},3747:function(e,t,n){"use strict";var r;(function(e){e[e["ask"]=0]="ask",e[e["share"]=1]="share",e[e["all"]=2]="all",e[e["good"]=3]="good",e[e["job"]=4]="job",e[e["dev"]=5]="dev"})(r||(r={}));var a={ask:{code:r.ask,name:"问答"},share:{code:r.share,name:"分享"},all:{code:r.all,name:"推荐"},good:{code:r.good,name:"精华"},job:{code:r.job,name:"招聘"},dev:{code:r.dev,name:"测试"}};n.d(t,"b",function(){return r}),n.d(t,"a",function(){return a})},6011:function(e,t,n){"use strict";var r=n("0285"),a={INIT_TOPIC_DETAIL:"INIT_TOPIC_DETAIL",COLLECT_OR_DE_COLLECT:"COLLECT_OR_DE_COLLECT",POST_REPLY_UPS:"POST_REPLY_UPS",POST_NEW_REPLY:"POST_NEW_REPLY"},c={ADD_TOPIC_DETAIL:"ADD_TOPIC_DETAIL",REMOVE_TOPIC_DETAIL:"REMOVE_TOPIC_DETAIL",SET_TOPIC_DETAIL:"SET_TOPIC_DETAIL"},u="topic",o=n("326d"),i=n("e57f");n.d(t,"l",function(){return s}),n.d(t,"k",function(){return l}),n.d(t,"e",function(){return r["d"]}),n.d(t,"b",function(){return r["a"]}),n.d(t,"c",function(){return r["b"]}),n.d(t,"d",function(){return r["c"]}),n.d(t,"m",function(){return a}),n.d(t,"n",function(){return c}),n.d(t,"g",function(){return u}),n.d(t,"h",function(){return o["b"]}),n.d(t,"i",function(){return o["c"]}),n.d(t,"a",function(){return o["a"]}),n.d(t,"f",function(){return i["a"]}),n.d(t,"j",function(){return i["b"]});var s={SHOW_TABBAR:"SHOW_TABBAR",HIDE_TABBAR:"HIDE_TABBAR",SET_USER_INFO:"SET_USER_INFO",SET_ACCESS_TOKEN:"SET_ACCESS_TOKEN",DELETE_ACCESS_TOKEN:"DELETE_ACCESS_TOKEN",SHOW_SNACK_BAR:"SHOW_SNACK_BAR",HIDE_SNACK_BAR:"HIDE_SNACK_BAR",SHOW_DIALOG:"SHOW_DIALOG",HIDE_DIALOG:"HIDE_DIALOG",TOGGLE_ADD_PREFIX:"TOGGLE_ADD_PREFIX",SET_MYFAVORITES:"SET_MYFAVORITES"},l={LOGIN:"LOGIN",GET_USER_INFO:"GET_USER_INFO",LOGOUT:"LOGOUT",GET_MYFAVORITES:"GET_MYFAVORITES",CREATE_TOPIC:"CREATE_TOPIC"}},"79f6":function(e,t,n){"use strict";var r=n("a34a"),a=n.n(r),c=n("3040"),u=n("3747"),o=n("d257"),i={limit:20};function s(){return l.apply(this,arguments)}function l(){return l=Object(c["a"])(a.a.mark(function e(){var t,n,r,c,s=arguments;return a.a.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return t=s.length>0&&void 0!==s[0]?s[0]:{},n={},Object.assign(n,i,t),"number"===typeof n.tab&&(n.tab=u["b"][n.tab]),e.next=6,o["d"].get("/topics",{params:n});case 6:if(r=e.sent,c=r.data,!c.data){e.next=12;break}return e.abrupt("return",c.data);case 12:return e.abrupt("return",Promise.reject("数据错误"));case 13:case"end":return e.stop()}},e,this)})),l.apply(this,arguments)}function d(e){return f.apply(this,arguments)}function f(){return f=Object(c["a"])(a.a.mark(function e(t){var n,r,c,u,i,s,l,d,f=arguments;return a.a.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=f.length>1&&void 0!==f[1]?f[1]:{},r=n.accesstoken,c=void 0===r?Object(o["b"])():r,u=n.mdrender,i=void 0===u||u,s="/topic/".concat(t),e.next=4,o["d"].get(s,{params:{accesstoken:c,mdrender:i}});case 4:if(l=e.sent,d=l.data,!d.data){e.next=10;break}return e.abrupt("return",d.data);case 10:return e.abrupt("return",Promise.reject("数据错误"));case 11:case"end":return e.stop()}},e,this)})),f.apply(this,arguments)}function p(e){return h.apply(this,arguments)}function h(){return h=Object(c["a"])(a.a.mark(function e(t){var n,r;return a.a.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,o["d"].post("/topic_collect/collect",t);case 2:return n=e.sent,r=n.data,o["a"].log(r),e.abrupt("return",r);case 6:case"end":return e.stop()}},e,this)})),h.apply(this,arguments)}function b(e){return _.apply(this,arguments)}function _(){return _=Object(c["a"])(a.a.mark(function e(t){var n,r;return a.a.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,o["d"].post("/topic_collect/de_collect",t);case 2:return n=e.sent,r=n.data,o["a"].log(r),e.abrupt("return",r);case 6:case"end":return e.stop()}},e,this)})),_.apply(this,arguments)}function k(e,t){return m.apply(this,arguments)}function m(){return m=Object(c["a"])(a.a.mark(function e(t,n){var r,c;return a.a.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,o["d"].post("/reply/".concat(t,"/ups"),n);case 2:return r=e.sent,c=r.data,o["a"].log(c),e.abrupt("return",c);case 6:case"end":return e.stop()}},e,this)})),m.apply(this,arguments)}function O(e,t){return v.apply(this,arguments)}function v(){return v=Object(c["a"])(a.a.mark(function e(t,n){var r,c;return a.a.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,o["d"].post("/topic/".concat(t,"/replies"),n);case 2:return r=e.sent,c=r.data,e.abrupt("return",c);case 5:case"end":return e.stop()}},e,this)})),v.apply(this,arguments)}function E(e){return T.apply(this,arguments)}function T(){return T=Object(c["a"])(a.a.mark(function e(t){var n,r;return a.a.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,o["d"].post("/topics",t);case 2:return n=e.sent,r=n.data,e.abrupt("return",r);case 5:case"end":return e.stop()}},e,this)})),T.apply(this,arguments)}function S(e){return A.apply(this,arguments)}function A(){return A=Object(c["a"])(a.a.mark(function e(t){var n,r;return a.a.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,o["d"].post("/accesstoken",{accesstoken:t});case 2:return n=e.sent,r=n.data,e.abrupt("return",r);case 5:case"end":return e.stop()}},e,this)})),A.apply(this,arguments)}function g(e){return j.apply(this,arguments)}function j(){return j=Object(c["a"])(a.a.mark(function e(t){var n,r;return a.a.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,o["d"].get("/user/".concat(t));case 2:if(n=e.sent,r=n.data,!r.data){e.next=6;break}return e.abrupt("return",r.data);case 6:return e.abrupt("return",Promise.reject("网络未知错误,请重试"));case 7:case"end":return e.stop()}},e,this)})),j.apply(this,arguments)}function w(e){return I.apply(this,arguments)}function I(){return I=Object(c["a"])(a.a.mark(function e(t){var n,r,c;return a.a.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,o["d"].get("/topic_collect/".concat(t));case 2:return n=e.sent,r=n.data,c=r.data,e.abrupt("return",c);case 6:case"end":return e.stop()}},e,this)})),I.apply(this,arguments)}function C(e){return y.apply(this,arguments)}function y(){return y=Object(c["a"])(a.a.mark(function e(t){var n,r;return a.a.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,o["d"].get("/messages",{params:t});case 2:return n=e.sent,r=n.data,e.abrupt("return",r.data);case 5:case"end":return e.stop()}},e,this)})),y.apply(this,arguments)}n.d(t,"b",function(){return s}),n.d(t,"a",function(){return d}),n.d(t,"g",function(){return p}),n.d(t,"h",function(){return b}),n.d(t,"k",function(){return k}),n.d(t,"i",function(){return O}),n.d(t,"j",function(){return E}),n.d(t,"f",function(){return S}),n.d(t,"d",function(){return g}),n.d(t,"c",function(){return w}),n.d(t,"e",function(){return C})},cd49:function(e,t,n){"use strict";n.r(t);var r=n("2b0e"),a=n("5a0c"),c=n.n(a),u=(n("a471"),n("4208")),o=n.n(u);c.a.locale("zh-cn"),c.a.extend(o.a),r["default"].filter("fromNow",function(e){return c()(e).fromNow()});var i=n("d437"),s=n.n(i),l=n("d421"),d=n.n(l),f=n("12d0"),p=n.n(f),h=n("d553"),b=n.n(h),_=n("5d92"),k=n.n(_),m=n("6a6f"),O=n.n(m),v=n("e62c"),E=n.n(v),T=n("9b13"),S=n.n(T),A=n("c713"),g=n.n(A),j=n("68d6"),w=n.n(j),I=n("db3b"),C=n.n(I),y=n("25b1"),x=n.n(y),R=n("3e8b"),D=n.n(R),N=n("b3ee"),P=n.n(N),L=n("0fad"),B=n.n(L),H=n("9f3b"),G=n.n(H),V=n("3ace"),K=n.n(V),W=n("a582"),U=n.n(W),F=n("cf3f"),M=n.n(F),Y=n("8f6b"),X=n.n(Y),q=n("2330"),$=n.n(q),z=(n("da64"),n("d7a2")),J=n("25a2");r["default"].use(s.a,{components:{VApp:d.a,VToolbar:p.a,VGrid:b.a,VBtn:k.a,VIcon:O.a,VBottomNav:E.a,VTabs:S.a,VCard:g.a,VDivider:w.a,VTextField:C.a,VSnackbar:x.a,VAvatar:D.a,VChip:P.a,VAutocomplete:B.a,VSwitch:G.a,VSelect:K.a,VTextarea:U.a,VDialog:M.a,VForm:X.a,transitions:$.a},theme:{},directives:{Ripple:z["Ripple"]},customProperties:!0,iconfont:"md",lang:{locales:{zhHans:J["a"]},current:"zh-Hans"}});var Q=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{id:"app"}},[n("keep-alive",[n("router-view")],1),n("CommSnakBar"),n("CommDialog")],1)},Z=[],ee=n("c665"),te=n("dc0a"),ne=n("aa9a"),re=n("d328"),ae=n("11d9"),ce=n("9ab4"),ue=n("60a3"),oe=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-snackbar",{attrs:{value:e.snackBar.value,color:e.snackBar.color,timeout:e.snackBar.timeout},on:{input:e.input}},[e._v("\n "+e._s(e.snackBar.message)+"\n "),n("v-btn",{attrs:{dark:"",flat:""},on:{click:e.hide}},[e._v("知道了")])],1)},ie=[],se=n("4bb5"),le=n("6011"),de=function(e){function t(){return Object(ee["a"])(this,t),Object(re["a"])(this,Object(ae["a"])(t).apply(this,arguments))}return Object(ne["a"])(t,[{key:"input",value:function(e){!1===e&&this.hide()}}]),Object(te["a"])(t,e),t}(ue["c"]);ce["a"]([Object(se["c"])(function(e){return e.snackBar})],de.prototype,"snackBar",void 0),ce["a"]([Object(se["b"])(le["l"].HIDE_SNACK_BAR)],de.prototype,"hide",void 0),de=ce["a"]([ue["a"]],de);var fe=de,pe=fe,he=n("2877"),be=Object(he["a"])(pe,oe,ie,!1,null,null,null);be.options.__file="CommSnakBar.vue";var _e=be.exports,ke=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-dialog",{attrs:{value:e.dialog.value,"max-width":"290",persistent:""}},[n("v-card",[n("v-card-title",{staticClass:"headline"},[e._v(e._s(e.dialog.title))]),n("v-card-text",[e._v(e._s(e.dialog.content))]),n("v-card-actions",[n("v-spacer"),n("v-btn",{attrs:{color:"green darken-1",flat:""},nativeOn:{click:function(t){return e.fail(t)}}},[e._v("取消")]),n("v-btn",{attrs:{color:"green darken-1",flat:""},nativeOn:{click:function(t){return e.success(t)}}},[e._v("确定")])],1)],1)],1)},me=[],Oe=function(e){function t(){return Object(ee["a"])(this,t),Object(re["a"])(this,Object(ae["a"])(t).apply(this,arguments))}return Object(ne["a"])(t,[{key:"fail",value:function(){this.dialog.failCb&&this.dialog.failCb(),this.hide()}},{key:"success",value:function(){this.dialog.successCb&&this.dialog.successCb(),this.hide()}}]),Object(te["a"])(t,e),t}(ue["c"]);ce["a"]([Object(se["c"])(function(e){return e.dialog})],Oe.prototype,"dialog",void 0),ce["a"]([Object(se["b"])(le["l"].HIDE_DIALOG)],Oe.prototype,"hide",void 0),Oe=ce["a"]([ue["a"]],Oe);var ve=Oe,Ee=ve,Te=Object(he["a"])(Ee,ke,me,!1,null,null,null);Te.options.__file="CommDialog.vue";var Se=Te.exports,Ae=n("feed"),ge=function(e){function t(){return Object(ee["a"])(this,t),Object(re["a"])(this,Object(ae["a"])(t).apply(this,arguments))}return Object(ne["a"])(t,[{key:"created",value:function(){var e=this;window.addEventListener("offline",function(){return e.netWork("offline")}),window.addEventListener("online",function(){return e.netWork("online")})}},{key:"netWork",value:function(e){Ae["a"].log(e),"offline"===e&&this.$router.push("/network")}}]),Object(te["a"])(t,e),t}(ue["c"]);ge=ce["a"]([Object(ue["a"])({components:{CommSnakBar:_e,CommDialog:Se}})],ge);var je=ge,we=je,Ie=Object(he["a"])(we,Q,Z,!1,null,null,null);Ie.options.__file="App.vue";var Ce=Ie.exports,ye=n("a34a"),xe=n.n(ye),Re=n("3040"),De=n("8c4f"),Ne=n("0613"),Pe=function(){return n.e("chunk-2d2105c2").then(n.bind(null,"b80f"))},Le=function(){return n.e("chunk-76027fbc").then(n.bind(null,"16c0"))},Be=function(){return n.e("chunk-76e7abcc").then(n.bind(null,"389c"))},He=function(){return n.e("chunk-2d2107db").then(n.bind(null,"b7b2"))},Ge=function(){return n.e("chunk-2d0d5c90").then(n.bind(null,"7089"))},Ve=function(){return n.e("chunk-3ad86d7a").then(n.bind(null,"098a"))},Ke=function(){return n.e("chunk-78f89eec").then(n.bind(null,"8c7b"))},We=function(){return n.e("chunk-78f8afb2").then(n.bind(null,"8ff4"))},Ue=function(){return n.e("chunk-2d0ea0d5").then(n.bind(null,"8fc4"))},Fe=function(){return n.e("chunk-6f506719").then(n.bind(null,"7da0"))},Me=function(){return n.e("chunk-2d0ac3cf").then(n.bind(null,"194e"))},Ye=function(){return n.e("chunk-2d21f841").then(n.bind(null,"d9c9"))},Xe=function(){return n.e("chunk-2d0d6794").then(n.bind(null,"7368"))},qe=function(){return n.e("chunk-2d0d6fa0").then(n.bind(null,"759e"))},$e=function(){return n.e("chunk-c5d213a8").then(n.bind(null,"afb3"))},ze=function(){return n.e("chunk-2d0d2f73").then(n.bind(null,"5b6f"))},Je=function(){return n.e("chunk-7a8a58f0").then(n.bind(null,"fc8b"))},Qe=function(){return n.e("chunk-00255e4c").then(n.bind(null,"39aa"))};r["default"].use(De["a"]);var Ze=new De["a"]({mode:"history",base:"/",routes:[{path:"",component:Pe,redirect:"/home",children:[{path:"home/",component:Le},{path:"create/",component:Be},{path:"message",component:Ue},{path:"/me",component:He,redirect:"/me/detail",children:[{path:"detail/",component:Ge},{path:"favorite/",component:Ve},{path:"reply/",component:Ke},{path:"topic/",component:We}]}]},{path:"/topic/:id",component:Fe,redirect:"/topic/:id/topic",beforeEnter:function(){var e=Object(Re["a"])(xe.a.mark(function e(t,n,r){var a;return xe.a.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Ne["a"].dispatch("topic/".concat(le["m"].INIT_TOPIC_DETAIL),{id:t.params.id,init:!0});case 2:a=e.sent,a?r():r("/network");case 4:case"end":return e.stop()}},e,this)}));return function(t,n,r){return e.apply(this,arguments)}}(),children:[{path:"/topic/:id/topic",component:$e},{path:"/topic/:id/reply",component:Je},{path:"/topic/:id/info",component:ze},{path:"/topic/:id/newreply",component:Qe}]},{path:"/login",component:Ye},{path:"/user/:name",component:Xe},{path:"/network",component:Me},{path:"*",component:qe}],scrollBehavior:function(e,t,n){if(n)return n;if(e.hash){var r=document.getElementById(e.hash.slice(1));return r.style.borderWidth="1px",r.style.borderStyle="solid",r.style.borderColor="red",void r.scrollIntoView({behavior:"smooth",block:"center"})}return e.path.includes("topic")?{x:0,y:0}:void 0}}),et=n("9483");Object(et["a"])("".concat("/","service-worker.js"),{ready:function(){console.log("App is being served from cache by a service worker.\nFor more details, visit https://goo.gl/AFskqB")},cached:function(){console.log("Content has been cached for offline use.")},updated:function(){console.log("New content is available; please refresh.")},offline:function(){console.log("No internet connection found. App is running in offline mode.")},error:function(e){console.error("Error during service worker registration:",e)}}),r["default"].config.productionTip=!1,new r["default"]({router:Ze,store:Ne["a"],render:function(e){return e(Ce)}}).$mount("#app")},d257:function(e,t,n){"use strict";var r=n("feed"),a=n("bc3a"),c=n.n(a),u=n("4328"),o=n.n(u),i={baseURL:"https://cnodejs.org/api/v1/",paramsSerializer:function(e){return o.a.stringify(e)},timeout:3e3,responseType:"json",validateStatus:function(e){return e>=200&&e<500}},s=n("0613"),l=n("6011"),d=c.a.create(i),f=[],p=c.a.CancelToken;d.interceptors.request.use(function(e){return e.cancelToken=new p(function(t){f.push({url:"".concat(e.url,"&request_type=").concat(e.method),cancel:t})}),e}),d.interceptors.response.use(function(e){return e.data.success?e:(s["a"].commit(l["l"].SHOW_SNACK_BAR,{message:e.data.error_msg}),r["a"].log(e.data.error_msg),Promise.reject(new Error(e.data.error_msg)))},function(e){return e.message?(s["a"].commit(l["l"].SHOW_SNACK_BAR,{message:e.message}),r["a"].err(e.message)):r["a"].err(e),Promise.reject(e)});var h=d,b=n("c665"),_=n("aa9a"),k=function(){function e(){Object(b["a"])(this,e),this.store=window.localStorage}return Object(_["a"])(e,[{key:"setItem",value:function(e,t){this.store.setItem(e,JSON.stringify(t))}},{key:"getItem",value:function(e){var t=this.store.getItem(e);return t?JSON.parse(t):null}},{key:"clear",value:function(){this.store.clear()}},{key:"remove",value:function(e){this.store.removeItem(e)}}],[{key:"getInstace",value:function(){return new e}}]),e}(),m=k.getInstace(),O="ACCESSTOKEN_KEY";function v(e){m.setItem(O,e)}function E(){return m.getItem(O)}function T(){m.remove(O)}n.d(t,"a",function(){return r["a"]}),n.d(t,"d",function(){return h}),n.d(t,"e",function(){return v}),n.d(t,"b",function(){return E}),n.d(t,"c",function(){return T})},e57f:function(e,t,n){"use strict";n.d(t,"a",function(){return r}),n.d(t,"c",function(){return a}),n.d(t,"b",function(){return c});var r="messages",a={SET_MESSAGES:"SET_MESSAGES"},c={GET_USER_MESSAGES:"GET_USER_MESSAGES"}},feed:function(e,t,n){"use strict";n.d(t,"a",function(){return u});var r=n("c665"),a=n("aa9a"),c=function(){function e(){Object(r["a"])(this,e),this.development=!1}return Object(a["a"])(e,[{key:"log",value:function(){var e;this.development&&(e=console).log.apply(e,arguments)}},{key:"err",value:function(){var e;this.development&&(e=console).error.apply(e,arguments)}},{key:"dev",get:function(){return this.development}}],[{key:"getLog",value:function(){return new e}}]),e}(),u=c.getLog()}}); //# sourceMappingURL=app.1c6e5aeb.js.map
17,039
34,037
0.673807
94274f398a57af9e3630d9cd924ccf146da796ae
342
js
JavaScript
dapp/src/pages/MovimentacoesFinanceiras.js
fanaia/dao7
01450415036fa95201ad3434e8adf2498b39ece9
[ "MIT" ]
null
null
null
dapp/src/pages/MovimentacoesFinanceiras.js
fanaia/dao7
01450415036fa95201ad3434e8adf2498b39ece9
[ "MIT" ]
null
null
null
dapp/src/pages/MovimentacoesFinanceiras.js
fanaia/dao7
01450415036fa95201ad3434e8adf2498b39ece9
[ "MIT" ]
null
null
null
import { Link } from "react-router-dom"; import BankingList from "../components/BankingList"; function MovimentacoesFinanceiras() { return ( <div> <h1>Movimentação financeira</h1> <Link to="/adicionarMovimentacaoFinanceira">Adicionar</Link> <BankingList /> </div> ); } export default MovimentacoesFinanceiras;
22.8
66
0.695906
9428eff46501a19c0a80005abce506bb88315daa
698
js
JavaScript
Stephen Grider/Modern React with Redux/5_simpleNavigation/src/components/Link.js
nou-ros/courseDepo
705de2a6a0f2f786b10158f336ac8bdd2075343f
[ "MIT" ]
null
null
null
Stephen Grider/Modern React with Redux/5_simpleNavigation/src/components/Link.js
nou-ros/courseDepo
705de2a6a0f2f786b10158f336ac8bdd2075343f
[ "MIT" ]
null
null
null
Stephen Grider/Modern React with Redux/5_simpleNavigation/src/components/Link.js
nou-ros/courseDepo
705de2a6a0f2f786b10158f336ac8bdd2075343f
[ "MIT" ]
null
null
null
import React from "react"; const Link = ({ className, href, children }) => { const onClick = (event) => { //ctrl+link to open the page in new tab - normal behavior if(event.metaKey || event.ctrlKey) { return; } // restric the default render event.preventDefault(); // restrict refresh of a page while switching to a diffrent link window.history.pushState({},'',href); const navEvent = new PopStateEvent('popstate'); window.dispatchEvent(navEvent); } return( <a onClick={onClick} className={className} href={href}> {children} </a> ) }; export default Link;
25.851852
72
0.570201
942d97ee3a0843bddada2ef9dcc31b0e68c1f384
2,348
js
JavaScript
src/utils/extractUrls.js
anatolykopyl/vue-highlights
54854d711e6685485abca0c3356d7664fe51a641
[ "MIT" ]
17
2020-01-29T03:18:32.000Z
2022-03-28T10:43:11.000Z
src/utils/extractUrls.js
anatolykopyl/vue-highlights
54854d711e6685485abca0c3356d7664fe51a641
[ "MIT" ]
5
2020-08-26T14:16:59.000Z
2022-02-19T06:44:22.000Z
src/utils/extractUrls.js
anatolykopyl/vue-highlights
54854d711e6685485abca0c3356d7664fe51a641
[ "MIT" ]
4
2020-02-25T15:17:17.000Z
2021-08-25T11:58:51.000Z
// Extracts URLs from text import { extractUrl, validAsciiDomain } from './regex' import idna from './idna' const DEFAULT_PROTOCOL = 'https://' const DEFAULT_PROTOCOL_OPTIONS = { extractUrlsWithoutProtocol: true } const MAX_URL_LENGTH = 4096 const invalidUrlWithoutProtocolPrecedingChars = /[-_./]$/ function isValidUrl (url, protocol, domain) { let urlLength = url.length const punycodeEncodedDomain = idna.toAscii(domain) if (!punycodeEncodedDomain || !punycodeEncodedDomain.length) { return false } urlLength = urlLength + punycodeEncodedDomain.length - domain.length return protocol.length + urlLength <= MAX_URL_LENGTH } const extractUrlsWithIndices = function (text, options = DEFAULT_PROTOCOL_OPTIONS) { if (!text || (options.extractUrlsWithoutProtocol ? !text.match(/\./) : !text.match(/:/))) { return [] } const urls = [] while (extractUrl.exec(text)) { const before = RegExp.$2 let url = RegExp.$3 const protocol = RegExp.$4 const domain = RegExp.$5 const path = RegExp.$7 let endPosition = extractUrl.lastIndex const startPosition = endPosition - url.length if (!isValidUrl(url, protocol || DEFAULT_PROTOCOL, domain)) { continue } // extract ASCII-only domains. if (!protocol) { if (!options.extractUrlsWithoutProtocol || before.match(invalidUrlWithoutProtocolPrecedingChars)) { continue } let lastUrl = null let asciiEndPosition = 0 domain.replace(validAsciiDomain, function (asciiDomain) { const asciiStartPosition = domain.indexOf(asciiDomain, asciiEndPosition) asciiEndPosition = asciiStartPosition + asciiDomain.length lastUrl = { url: asciiDomain, indices: [startPosition + asciiStartPosition, startPosition + asciiEndPosition] } urls.push(lastUrl) }) // no ASCII-only domain found. Skip the entire URL. if (lastUrl == null) { continue } // lastUrl only contains domain. Need to add path and query if they exist. if (path) { lastUrl.url = url.replace(domain, lastUrl.url) lastUrl.indices[1] = endPosition } } else { urls.push({ url: url, indices: [startPosition, endPosition] }) } } return urls } export default extractUrlsWithIndices
28.634146
105
0.668228
942ebe5c1ae239baae17f8c452b046a709c4be36
1,194
js
JavaScript
src/components/WeatherCard.js
BriceFotzo/beelinked-eu
93eb7a1971cefaae7dcb65ef4349c7bd44dc5876
[ "MIT" ]
null
null
null
src/components/WeatherCard.js
BriceFotzo/beelinked-eu
93eb7a1971cefaae7dcb65ef4349c7bd44dc5876
[ "MIT" ]
null
null
null
src/components/WeatherCard.js
BriceFotzo/beelinked-eu
93eb7a1971cefaae7dcb65ef4349c7bd44dc5876
[ "MIT" ]
null
null
null
import React from 'react'; import CurrentWeather from './CurrentWeather' import WeatherDetails from './WeatherDetails' import WeeklyWeather from './WeeklyWeather' import { MDBTypography } from 'mdbreact' function SimpleCard(props) { const result = props.data const cityName = props.location const country = result.timezone const today = new Date(result.current.dt * 1000) const weatherDescription = result.current.weather.description const now = new Date() const prec=props.prec return ( <div > <MDBTypography type="display3" > {`${cityName}, ${country}`} </MDBTypography> <MDBTypography type="display1" > {`${today.toDateString()}, ${now.toLocaleTimeString()}`} </MDBTypography> <MDBTypography type="display1" > {weatherDescription} </MDBTypography> <div className="CurrentWeatherBox" > <CurrentWeather data= {result.current}/> <WeatherDetails data= {result.current} prec={prec}/> </div> <div > <WeeklyWeather data={result.daily}/> </div> </div> ); } export default SimpleCard;
27.767442
68
0.617253
94305b266e166a5d2cda2fcc87bfcba88e21e3f3
609
js
JavaScript
01-JS Essentials/01-Syntax, Functions and Statements/Lab/08-Functional Calculator.js
KostadinovK/JS-Core
f3868399d83fd42a99562270826b6180e32e60fe
[ "Apache-2.0" ]
null
null
null
01-JS Essentials/01-Syntax, Functions and Statements/Lab/08-Functional Calculator.js
KostadinovK/JS-Core
f3868399d83fd42a99562270826b6180e32e60fe
[ "Apache-2.0" ]
9
2020-04-30T10:21:58.000Z
2021-05-08T02:20:49.000Z
01-JS Essentials/01-Syntax, Functions and Statements/Lab/08-Functional Calculator.js
KostadinovK/JS-Core
f3868399d83fd42a99562270826b6180e32e60fe
[ "Apache-2.0" ]
null
null
null
/** * * @param {Number} num1 * @param {Number} num2 * @param {String} operator */ function calc(num1, num2, operator){ let add = (num1, num2) => num1 + num2; let substract = (num1, num2) => num1 - num2; let multiply = (num1, num2) => num1 * num2; let divide = (num1, num2) => num1 / num2; switch(operator){ case '+': return add(num1, num2); case '-': return substract(num1, num2); case '*': return multiply(num1, num2); case '/': return divide(num1, num2); } } console.log(calc(2, 4, '+'));
24.36
48
0.504105
94314651133d51c4ec9419013441a7a8284714a3
1,693
js
JavaScript
src/context/history/index.js
arthas168/Jelly-Statistics
dd2b41ab6093bf34756fd769e3a4abb8447417e8
[ "MIT" ]
1
2020-03-20T14:54:09.000Z
2020-03-20T14:54:09.000Z
src/context/history/index.js
arthas168/Jelly-Statistics
dd2b41ab6093bf34756fd769e3a4abb8447417e8
[ "MIT" ]
3
2020-08-16T18:27:00.000Z
2020-08-20T06:56:06.000Z
src/context/history/index.js
arthas168/Jelly-Statistics
dd2b41ab6093bf34756fd769e3a4abb8447417e8
[ "MIT" ]
1
2020-08-16T00:03:10.000Z
2020-08-16T00:03:10.000Z
import React, { createContext, useContext, useReducer, useMemo, useCallback, useEffect } from 'react'; import { safeAccess } from '../../utils'; import { getHistory } from './actions'; import { TIMESTAMP_FORMAT } from '../../config'; const UPDATE = 'UPDATE'; const HistoryContext = createContext(); function useHistoryContext() { return useContext(HistoryContext); } function reducer(state, { type, payload }) { switch (type) { case UPDATE: { let swaps = payload; if (!swaps) return; swaps = swaps.map((s) => { if (TIMESTAMP_FORMAT[s.network]) { s.expiration = s.expiration / 1000; } return s; }); swaps = swaps.sort((a, b) => { return b.expiration - a.expiration; }); return { ...state, swaps, }; } default: { throw Error(`Unexpected action type in HistoryContext reducer: '${type}'.`); } } } export default function Provider({ children }) { const [state, dispatch] = useReducer(reducer, { swaps: [], }); const update = useCallback((swaps) => { dispatch({ type: UPDATE, payload: swaps }); }, []); useEffect(() => { function get() { getHistory().then((swaps) => { update(swaps); }); } get(); // eslint-disable-next-line react-hooks/exhaustive-deps }, []); return ( <HistoryContext.Provider value={useMemo(() => { return { state, update, }; }, [state, update])} > {children} </HistoryContext.Provider> ); } export function useSwaps() { const { state } = useHistoryContext(); return safeAccess(state, ['swaps']); }
20.39759
102
0.560543
9431c4618b90541b45594a74cf9cf8ddf3606fb3
253
js
JavaScript
api/mocks-auth.js
otissv/squadron-authentication
3931cd61ea6d635aff789b5b1fa2187a2fd31279
[ "MIT" ]
1
2016-10-06T11:53:40.000Z
2016-10-06T11:53:40.000Z
api/mocks-auth.js
otissv/authentication-service
3931cd61ea6d635aff789b5b1fa2187a2fd31279
[ "MIT" ]
null
null
null
api/mocks-auth.js
otissv/authentication-service
3931cd61ea6d635aff789b5b1fa2187a2fd31279
[ "MIT" ]
null
null
null
import AuthentiactionMock from './authentiaction/mock-authentiaction'; import AuthorisedMock from './authorised/mock-authorised'; const mocks = { authentiactionMock: AuthentiactionMock, authorisedMock : AuthorisedMock }; export default mocks;
23
70
0.790514
94335516bd0df2a0859c00faf6210a4e3f9c3098
3,089
js
JavaScript
client/src/Pages/Home/Reviews/Reviews.js
Aaron-Lin-74/learn-animal-mern-project
c5f55ed9c607ccf8e4b378f9e2d9ae933a66d147
[ "MIT" ]
null
null
null
client/src/Pages/Home/Reviews/Reviews.js
Aaron-Lin-74/learn-animal-mern-project
c5f55ed9c607ccf8e4b378f9e2d9ae933a66d147
[ "MIT" ]
null
null
null
client/src/Pages/Home/Reviews/Reviews.js
Aaron-Lin-74/learn-animal-mern-project
c5f55ed9c607ccf8e4b378f9e2d9ae933a66d147
[ "MIT" ]
null
null
null
import React, { useState, useEffect, useCallback } from 'react' import { FiChevronRight, FiChevronLeft } from 'react-icons/fi' import { FaQuoteRight } from 'react-icons/fa' import useFetch from '../../../hooks/useFetch' import Button from '../../../components/Button/Button' import './Reviews.css' function Reviews() { // Use custom hook to replace the fetch reviews, to reuse the functionality const { fetchedData: { reviews }, isLoaded, } = useFetch('/api/reviews') // Use index local state to store the index of the current review const [index, setIndex] = useState(0) // Handle the boundary condition for reviews index, set to loop const checkNumber = useCallback( (num) => { if (!reviews) return -1 const lastIndex = reviews.length - 1 if (num < 0) { return lastIndex } if (num > lastIndex) { return 0 } return num }, [reviews] ) const prevReivew = () => { setIndex((preIndex) => checkNumber(preIndex - 1)) } const nextReview = () => { setIndex((preIndex) => checkNumber(preIndex + 1)) } // Let the reivews keep rolling every 4 seconds useEffect(() => { const slider = setInterval(() => { setIndex((preIndex) => checkNumber(preIndex + 1)) }, 4000) return () => clearInterval(slider) }, [index, checkNumber]) // Set slide class based on the relation to index const setSlideClass = (ind) => { // Set the default slide class to nextSlide let slideClass = 'nextSlide' if (ind === index) { slideClass = 'activeSlide' } if (ind === index - 1 || (index === 0 && ind === reviews.length - 1)) { slideClass = 'lastSlide' } return slideClass } return ( <section className='reviews'> <h2 className='rev-title'>/ Reviews</h2> <div className='reviews-center'> {isLoaded && reviews.map((review, ind) => { const { id, image, name, title, quote } = review const slideClass = setSlideClass(ind) return ( <article key={id} className={slideClass}> <figure> <img src={image} alt={`profile of ${name}`} className='person-img' /> </figure> <h3>{name}</h3> <p className='title'>{title}</p> <p className='text'>{quote}</p> <FaQuoteRight className='icon' /> </article> ) })} <Button className='prev' onClick={prevReivew} aria-label='previous review' title='previous review' buttonstyle='btn--unStyled' > <FiChevronLeft /> </Button> <Button className='next' onClick={nextReview} aria-label='next review' title='next review' buttonstyle='btn--unStyled' > <FiChevronRight /> </Button> </div> </section> ) } export default Reviews
27.828829
77
0.541923
94337b721d752a5d6fc8fa33e2bc0b85675bbe1d
686
js
JavaScript
src/timer.js
HadySalhab/JS-Quizzy
32e11c081b53c742bdc61b1749b459a9fb8249cf
[ "MIT" ]
null
null
null
src/timer.js
HadySalhab/JS-Quizzy
32e11c081b53c742bdc61b1749b459a9fb8249cf
[ "MIT" ]
1
2021-05-11T15:23:54.000Z
2021-05-11T15:23:54.000Z
src/timer.js
HadySalhab/JS-Quizzy
32e11c081b53c742bdc61b1749b459a9fb8249cf
[ "MIT" ]
null
null
null
class Timer { constructor(totalDuration, callbacks) { this.totalDuration = totalDuration; this.callbacks = callbacks; this.timeRemaining = totalDuration; this.intervalId = null; } startTimer() { this.callbacks.onStart(this.totalDuration); this.intervalId = setInterval(() => { this.timeRemaining = this.timeRemaining - 0.02; if (this.timeRemaining <= 0) { this.timeRemaining = 0; this.callbacks.onTick(this.timeRemaining.toFixed(0)); this.callbacks.onComplete(); this.clearTimer(); } else { this.callbacks.onTick(this.timeRemaining.toFixed(0)); } }, 20); } clearTimer() { clearInterval(this.intervalId); } } export default Timer;
23.655172
57
0.693878
94351438a910790a6a3ea1bdb16d8ddd84d6ea3f
81
js
JavaScript
packages/rule-css-demo/src/index.js
mopedjs/moped
bbebae45ee2db17500d6c0c9f5fe252294e6a47a
[ "MIT" ]
17
2015-01-22T01:52:47.000Z
2019-03-11T00:54:05.000Z
packages/rule-css-demo/src/index.js
mopedjs/moped
bbebae45ee2db17500d6c0c9f5fe252294e6a47a
[ "MIT" ]
18
2015-09-30T20:01:49.000Z
2022-03-08T22:49:50.000Z
packages/rule-css-demo/src/index.js
mopedjs/moped
bbebae45ee2db17500d6c0c9f5fe252294e6a47a
[ "MIT" ]
null
null
null
import './style.css'; document.body.appendChild(document.createElement('div'));
20.25
57
0.753086
94360b72dc986cbf70bd7b06b1986e28babca9b8
292
js
JavaScript
04_MySQL/mysql-rest/src/server.js
CrispenGari/-node-backend
70c1432949412860332c5cc9e987fe5afb3e971a
[ "MIT" ]
5
2021-05-31T11:45:49.000Z
2021-11-26T07:44:37.000Z
04_MySQL/mysql-rest/src/server.js
CrispenGari/node-backend
a9206a33a824bcc2bd627666a7b46e86db9122a5
[ "MIT" ]
null
null
null
04_MySQL/mysql-rest/src/server.js
CrispenGari/node-backend
a9206a33a824bcc2bd627666a7b46e86db9122a5
[ "MIT" ]
null
null
null
import express from "express"; import cors from "cors"; import router from "./routes.js"; const PORT = 3001 || process.env.PORT; const app = express(); // Midlewares app.use(cors()); app.use(express.json()); app.use(router); app.listen(PORT, () => console.log(`THE SERVER IS RUNNING...`));
22.461538
64
0.678082
9436797f9fcc6521785ad0ffe82e09753cf192d0
8,125
js
JavaScript
docs/assets/js/57.d670da3f.js
3D-for-Fun/3d-for-fun.github.io
8f29f59ad96a43774e1f46806dc2bdf460f3ccc7
[ "MIT" ]
null
null
null
docs/assets/js/57.d670da3f.js
3D-for-Fun/3d-for-fun.github.io
8f29f59ad96a43774e1f46806dc2bdf460f3ccc7
[ "MIT" ]
null
null
null
docs/assets/js/57.d670da3f.js
3D-for-Fun/3d-for-fun.github.io
8f29f59ad96a43774e1f46806dc2bdf460f3ccc7
[ "MIT" ]
null
null
null
(window.webpackJsonp=window.webpackJsonp||[]).push([[57],{645:function(t,e,s){"use strict";s.r(e);var a=s(4),n=Object(a.a)({},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h2",{attrs:{id:"project-encryption"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#project-encryption"}},[t._v("#")]),t._v(" Project Encryption")]),t._v(" "),s("h3",{attrs:{id:"introduction"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#introduction"}},[t._v("#")]),t._v(" Introduction")]),t._v(" "),s("p",[t._v("If the project is private and does not want to be made public, the content page can only be accessed after the key is logged in (the login will no longer be effective after closing the browser tab). You can set multiple passwords by setting "),s("code",[t._v("keys")]),t._v(" in the format of the array. The value of the array must be a string.")]),t._v(" "),s("div",{staticClass:"language-javascript line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-javascript"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// .vuepress/config.js")]),t._v("\n\nmodule"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("exports "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n theme"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'reco'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n themeConfig"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// secret key")]),t._v("\n keyPage"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n keys"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'32-bit md5 secret key'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// should set to md5 secret key after version 1.3.0")]),t._v("\n color"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'#42b983'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The color of the login page animation ball")]),t._v("\n lineColor"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'#42b983'")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The color of the login page animation line")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br")])]),s("h3",{attrs:{id:"set-secret-key"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#set-secret-key"}},[t._v("#")]),t._v(" Set Secret Key "),s("Badge",{attrs:{text:"1.3.0+"}})],1),t._v(" "),s("p",[t._v("If you password is "),s("code",[t._v("123456")]),t._v(", then set the "),s("code",[t._v("keys")]),t._v(" field to its 32-bit md5 secret key: "),s("code",[t._v("e10adc3949ba59abbe56e057f20f883e")]),t._v(". After the blog is published, input the password "),s("code",[t._v("123456")]),t._v(" to enter. Others will not know your password through your secret key, but you have to remember it.")]),t._v(" "),s("p",[t._v("Please input password in the following textbox to obtain the corresponding 32-bit md5 secret key:\n"),s("md5")],1),t._v(" "),s("h3",{attrs:{id:"absolute-encryption"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#absolute-encryption"}},[t._v("#")]),t._v(" Absolute encryption "),s("Badge",{attrs:{text:"1.1.2+"}})],1),t._v(" "),s("p",[t._v("The default encryption method for the project is to locate the encrypted page above the actual content, so this encryption function itself has no real effect.")]),t._v(" "),s("p",[t._v("If you need absolute encryption, you need to set "),s("code",[t._v("absoluteEncryption: true")]),t._v(", but this will affect two things:")]),t._v(" "),s("ol",[s("li",[t._v("SSR rendering of the page;")]),t._v(" "),s("li",[t._v("The jump of the anchor point.")])]),t._v(" "),s("h2",{attrs:{id:"article-encryption"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#article-encryption"}},[t._v("#")]),t._v(" Article Encryption")]),t._v(" "),s("p",[t._v("If the project is public and some articles may need to be encrypted, you need to set "),s("code",[t._v("keys")]),t._v(" in "),s("code",[t._v("frontmatter")]),t._v(" in an array format. You can set multiple passwords. The value of the array must be a string.")]),t._v(" "),s("div",{staticClass:"language-yaml line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-yaml"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("---")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("title")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" vuepress"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v("theme"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v("reco\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("date")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token datetime number"}},[t._v("2019-04-09")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("author")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" reco_luan\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("keys")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'32-bit md5 secret key'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("---")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br")])]),s("div",{staticClass:"custom-block warning"},[s("p",[s("strong",[t._v("Legacy issues with encrypted pages:")]),t._v("\nEncryption cannot be hidden when entering a separate article from a single encrypted article (such as the navigation bar)")])])])}),[],!1,null,null,null);e.default=n.exports}}]);
8,125
8,125
0.606031
943692f52973b74ec759a6727a98268a5854d489
462
js
JavaScript
src/components/banner-left.js
harshal6/mercury-towers
40769c52820b0295c42c1e1e1a5fe98b05dab3f0
[ "RSA-MD" ]
null
null
null
src/components/banner-left.js
harshal6/mercury-towers
40769c52820b0295c42c1e1e1a5fe98b05dab3f0
[ "RSA-MD" ]
null
null
null
src/components/banner-left.js
harshal6/mercury-towers
40769c52820b0295c42c1e1e1a5fe98b05dab3f0
[ "RSA-MD" ]
null
null
null
/** * Bio component that queries for data * with Gatsby's useStaticQuery component * * See: https://www.gatsbyjs.com/docs/use-static-query/ */ import React from "react" import { useStaticQuery, graphql } from "gatsby" const Bannerleft = (props) => { return ( <div className="banner"> <p>{props.eyebrow}</p> <h1>{props.heading}</h1> <button>{props.btnText}</button> </div> ) } export default Bannerleft
20.086957
55
0.616883
94376f0014bbe64f2cb98ce08c7ffad06b34a2c4
214
js
JavaScript
packages/kadira-flow-router/test/client/_helpers.js
moqmar/wekan
769bb7a55dcf59417781b16ea70e04773950ab9d
[ "MIT" ]
15,705
2015-08-28T11:36:19.000Z
2022-03-31T16:48:17.000Z
packages/kadira-flow-router/test/client/_helpers.js
moqmar/wekan
769bb7a55dcf59417781b16ea70e04773950ab9d
[ "MIT" ]
3,439
2015-08-28T08:41:06.000Z
2022-03-31T12:12:21.000Z
packages/kadira-flow-router/test/client/_helpers.js
moqmar/wekan
769bb7a55dcf59417781b16ea70e04773950ab9d
[ "MIT" ]
3,281
2015-08-28T10:04:40.000Z
2022-03-30T06:21:46.000Z
GetSub = function (name) { for(var id in Meteor.connection._subscriptions) { var sub = Meteor.connection._subscriptions[id]; if(name === sub.name) { return sub; } } }; FlowRouter.route('/');
19.454545
51
0.621495
9437b87db0b98219dd0d870c3ff3c84f779bc2ea
253
js
JavaScript
src/components/Modules/Footer/Footer.js
skream0319/d.a.p_ink
9de6ec5b1f59300b70231f1f9aa11ffba1d838f3
[ "RSA-MD" ]
null
null
null
src/components/Modules/Footer/Footer.js
skream0319/d.a.p_ink
9de6ec5b1f59300b70231f1f9aa11ffba1d838f3
[ "RSA-MD" ]
null
null
null
src/components/Modules/Footer/Footer.js
skream0319/d.a.p_ink
9de6ec5b1f59300b70231f1f9aa11ffba1d838f3
[ "RSA-MD" ]
null
null
null
import React from "react" import "./Footer.scss" const Footer = () => { return ( <footer> <div className="inner">&copy; D.A.P_Ink design works { (new Date()).getFullYear() }</div> </footer> ) } export default Footer
21.083333
101
0.56917
9438012a9fbae0b400ca8ef02ebfe24238b6e0a7
1,384
js
JavaScript
src/app/index.js
loginov-rocks/Igla
643ef49684791e4a462a127ec0f407296feb649c
[ "MIT" ]
null
null
null
src/app/index.js
loginov-rocks/Igla
643ef49684791e4a462a127ec0f407296feb649c
[ "MIT" ]
null
null
null
src/app/index.js
loginov-rocks/Igla
643ef49684791e4a462a127ec0f407296feb649c
[ "MIT" ]
null
null
null
import Stats from 'stats.js'; import {BoxBufferGeometry, Mesh, MeshLambertMaterial} from 'three'; import OrbitControls from 'three-orbitcontrols'; import {createCamera} from './camera'; import {createRenderer} from './renderer'; import {createScene} from './scene'; import {createSky} from './sky'; import {createTerrain} from './terrain'; const init = (container) => { const renderer = createRenderer(); renderer.shadowMap.enabled = true; container.appendChild(renderer.domElement); const scene = createScene(); const sky = createSky(); const terrain = createTerrain(100, 100); scene.add(sky); scene.add(terrain); // Temporary box. const geometry = new BoxBufferGeometry(1, 1, 1); const material = new MeshLambertMaterial({color: 'red'}); const box = new Mesh(geometry, material); box.castShadow = true; box.receiveShadow = true; scene.add(box); const camera = createCamera(); const controls = new OrbitControls(camera, renderer.domElement); const stats = new Stats(); container.appendChild(stats.dom); update(renderer, scene, camera, controls, stats); }; const update = (renderer, scene, camera, controls, stats) => { controls.update(); stats.update(); renderer.render(scene, camera); requestAnimationFrame(() => { update(renderer, scene, camera, controls, stats); }); }; init(document.getElementById('container'));
26.615385
67
0.70737
94383e0e2d9ba4b5230fc9619d4b29556cbe9ec4
894
js
JavaScript
src/assets/styles/colors.js
leopoldo8/gitsearch
f1bed1babec9f2195acaa9aef00c0fac48dd8ff9
[ "MIT" ]
1
2021-05-26T01:11:53.000Z
2021-05-26T01:11:53.000Z
src/assets/styles/colors.js
leopoldo8/gitsearch
f1bed1babec9f2195acaa9aef00c0fac48dd8ff9
[ "MIT" ]
null
null
null
src/assets/styles/colors.js
leopoldo8/gitsearch
f1bed1babec9f2195acaa9aef00c0fac48dd8ff9
[ "MIT" ]
null
null
null
export const White = '#FFFFFF'; export const Black = '#000000'; export const PrimaryColor = '#344FA5'; export const SecondaryColor = '#162668'; export const PrimaryGreen = '#6FCF97'; export const PrimaryGray = '#90A4AE'; export const SecondaryGray = '#F2F2F2'; export const TertiaryGray = '#ECEFF1'; export const QuaternaryGray = '#586069'; export const QuinaryGray = '#F8FAFB'; export const SenaryGray = '#E0E0E0'; export const SeptenaryGray = '#DEDEDE'; export const OctonaryGray = '#EDEDED'; export const NonaryGray = '#747474'; export const TernaryGray = '#CECECE'; export const PrimaryHazeBlue = '#F7F9FA'; export const SecondaryHazeBlue = '#DAE5F0'; export const PrimaryBlue = '#5C97D2'; export const SecondaryBlue = '#0366D6'; export const SecondaryBlack = '#263238'; export const LanguageColor = '#B9BD00'; export const Placeholder = '#7A7A7A'; export const Error = '#D32F2F';
27.090909
43
0.732662
9439334fa06da18a14f10093f23dff593c6b0600
3,169
js
JavaScript
node_modules/@wordpress/compose/build/higher-order/with-state/index.js
ajchdev/outside-event
edaa958d74d5a1431f617bcbcef0d2e838103bd2
[ "MIT" ]
null
null
null
node_modules/@wordpress/compose/build/higher-order/with-state/index.js
ajchdev/outside-event
edaa958d74d5a1431f617bcbcef0d2e838103bd2
[ "MIT" ]
null
null
null
node_modules/@wordpress/compose/build/higher-order/with-state/index.js
ajchdev/outside-event
edaa958d74d5a1431f617bcbcef0d2e838103bd2
[ "MIT" ]
null
null
null
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = withState; var _element = require("@wordpress/element"); var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized")); var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); var _createHigherOrderComponent = _interopRequireDefault(require("../../utils/create-higher-order-component")); function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /** * A Higher Order Component used to provide and manage internal component state * via props. * * @param {?Object} initialState Optional initial state of the component. * * @return {WPComponent} Wrapped component. */ function withState() { var initialState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; return (0, _createHigherOrderComponent.default)(function (OriginalComponent) { return /*#__PURE__*/function (_Component) { (0, _inherits2.default)(WrappedComponent, _Component); var _super = _createSuper(WrappedComponent); function WrappedComponent() { var _this; (0, _classCallCheck2.default)(this, WrappedComponent); _this = _super.apply(this, arguments); _this.setState = _this.setState.bind((0, _assertThisInitialized2.default)(_this)); _this.state = initialState; return _this; } (0, _createClass2.default)(WrappedComponent, [{ key: "render", value: function render() { return (0, _element.createElement)(OriginalComponent, (0, _extends2.default)({}, this.props, this.state, { setState: this.setState })); } }]); return WrappedComponent; }(_element.Component); }, 'withState'); } //# sourceMappingURL=index.js.map
45.271429
467
0.728621
943ca48b6d70c3f2ceeeb1cc59291b36af2fb933
4,607
js
JavaScript
test/tests/razor.js
davidmurdoch/RazorJs
b98e1aca9a4674999ffc1a36bac14ee4b0fe99bf
[ "MIT" ]
2
2021-10-30T02:54:42.000Z
2021-11-07T20:19:01.000Z
test/tests/razor.js
davidmurdoch/RazorJs
b98e1aca9a4674999ffc1a36bac14ee4b0fe99bf
[ "MIT" ]
null
null
null
test/tests/razor.js
davidmurdoch/RazorJs
b98e1aca9a4674999ffc1a36bac14ee4b0fe99bf
[ "MIT" ]
null
null
null
module = QUnit.module; var Razor = testObject; module("Razor"); test("test razor.js compile", function() { var object, compile; expect(25); compile = Razor.compile("<div>@message</div>"); object = {"message":"hello world"}; equal(compile(object), "<div>hello world</div>", "Test simple compilation"); compile = Razor.compile("@if(true){\n if(true){\n <span>true</span>\n }\n}"); equal(compile({}), " <span>true</span>", "Nested blocks"); compile = Razor.compile("@{\n if(true){\n <span>true</span>\n }\n}"); equal(compile({}), " <span>true</span>", "Nested blocks 2"); compile = Razor.compile("<ul>@for(var name in obj){<li>@obj[name]</li>}</ul>"); object = {"obj":{"foo":"foo", "bar":"bar"}}; equal(compile(object), "<ul><li>foo</li><li>bar</li></ul>", "Test for name in obj"); compile = Razor.compile( '<div>\n' + ' @if(true){\n' + ' <div>\n' + ' @if(true){\n' + ' <div>@value</div>\n' + ' }' + ' </div>\n' + ' }\n' + '</div>'); object = {"value":"true"}; equal(compile(object), '<div>\n' + ' <div>\n' + ' <div>true</div>' + ' </div>\n' + '</div>' , "Test nested templates w/ HTML"); compile = Razor.compile("<div>@if(bool){<span>true</span>}</div>"); object = {"bool":true}; equal(compile(object), "<div><span>true</span></div>", "Test if(true)"); object.bool = false; equal(compile(object), "<div></div>", "Test if(false)"); compile = Razor.compile("<div>@Html.Raw(message)</div>"); object = {"message": "<goodbye cruel='world!'>\"Hi\""}; equal(compile(object), "<div><goodbye cruel='world!'>\"Hi\"</div>", "Test Html.Raw"); compile = Razor.compile("<ul>@while(--i){<li>@i}</ul>"); object = {"i": 6}; equal(compile(object), "<ul><li>5<li>4<li>3<li>2<li>1</ul>", "Test while()"); compile = Razor.compile("<div>\n" + "@{\n" + "<div>@message</div>\n" + "}\n" + "</div>"); object = {"message": "test"}; equal(compile(object), "<div>\n<div>test</div>\n</div>", "Test code block"); compile = Razor.compile("<div>\n" + "@{\n" + "<img src='@Html.Raw(src)' />\n" + "}\n" + "</div>"); object = {"src": "//localhost/img.png"}; equal(compile(object), "<div>\n<img src='//localhost/img.png' />\n</div>", "Test template with self-closing tag"); compile = Razor.compile("@@escaped"); object = {}; equal(compile(object), "@escaped", "Simple @ escape"); compile = Razor.compile("@@@escaped"); object = {"escaped":"works"}; equal(compile(object), "@works", "Complex @ escape"); compile = Razor.compile("@@@@@@@@escaped"); object = {}; equal(compile(object), "@@@@escaped", "Multiple @ escapes"); compile = Razor.compile("@if(true){<span>@@@@escaped</span>}"); object = {}; equal(compile(object), "<span>@@escaped</span>", "Nested @ escapes in blocks"); compile = Razor.compile("email@@escaped.com value='@foo'"); object = {"foo":"b@r"}; equal(compile(object), "email@escaped.com value='b@r'", "Simple @ escape with additional vars"); compile = Razor.compile("@Html.Raw( JSON.stringify(obj) )"); object = {"obj": {"foo":"bar"}}; equal(compile(object), "{\"foo\":\"bar\"}", "Can we use the JSON global?"); compile = Razor.compile(); object = {"obj": {"foo":"bar"}}; equal(compile(object), "", "Handle undefined template"); compile = Razor.compile(""); object = {"obj": {"foo":"bar"}}; equal(compile(object), "", "Handle empty template"); compile = Razor.compile(" "); object = {"obj": {"foo":"bar"}}; equal(compile(object), " ", "Handle empty template 2"); compile = Razor.compile("@nothing"); object = {"obj": {"foo":"bar"}}; equal(compile(object), "", "Proxy and undefined"); compile = Razor.compile("<span>@Html.Raw(num/2)</span>"); equal(compile({"num":8}), "<span>4</span>", "Division Sign"); compile = Razor.compile("<span>@Html.Raw(/test/.test('test'))</span>"); equal(compile(), "<span>true</span>", "Regex works"); compile = Razor.compile("<span>@replace.replace('replace','bueno')</span>"); equal(compile({"replace":"replace"}), "<span>bueno</span>", "Regex works"); compile = Razor.compile("<span>@arr[0].prop.nope</span>"); var Obj = function(name){ this.prop = null; }; equal(compile({"arr":[new Obj]}), "<span></span>", "array lookup to undefined/null returns empty string"); }); asyncTest("test razor.js file functions", function() { expect(2); Razor.renderFile("test/templates/renderFile.razor", function( _, html){ equal(html, "html", "renderFile works"); start(); }); Razor.renderFile("test/templates/partial.razor", function( _, html ){ equal(html, "<span>\n\thtml\n</span>", "partials work"); start(); }); });
29.158228
115
0.591274
943da7d185fafd9ecdb3285dc2ce5431eb664c68
1,714
js
JavaScript
app/pages/questions.js
scarletstudio/transithealth
408e6c1a063e46edb95040c26db93c2ff93c6d33
[ "MIT" ]
2
2021-05-18T15:34:19.000Z
2021-10-07T01:29:31.000Z
app/pages/questions.js
scarletstudio/transithealth
408e6c1a063e46edb95040c26db93c2ff93c6d33
[ "MIT" ]
89
2021-05-21T18:31:04.000Z
2021-08-16T01:13:02.000Z
app/pages/questions.js
scarletstudio/transithealth
408e6c1a063e46edb95040c26db93c2ff93c6d33
[ "MIT" ]
1
2021-06-15T10:28:26.000Z
2021-06-15T10:28:26.000Z
import Head from 'next/head' import Link from 'next/link' import Nav from '../components/Nav' import { getAllQuestions } from '../site/questions' import { ServerLoadingNotification } from '../components/Notification' export async function getStaticProps() { return { props: { questions: getAllQuestions(), }, }; } export default function Questions({ questions }) { return ( <div> <Head> <title>TransitHealth</title> <meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="description" content="Explore transit and public health data across Chicago." /> <link rel="icon" href="favicon.ico" /> </Head> <Nav /> <main className="Questions"> <div className="page"> <div className="center"> <h1>Questions</h1> <p>Learn more about transit and public health in Chicago with these featured data vignettes.</p> </div> <div className="QuestionsSection"> {questions.map(({ params }) => { return ( <div className="QuestionPreview" key={params.id}> <h2>{params.title}</h2> <p>By {params.author}</p> <p>{params.description}</p> <br /> <Link href={`/questions/${params.id}`}> <a className="btn secondary">View Question</a> </Link> </div> ); })} </div> <br /> <p className="center">That's all for now! More questions coming soon...</p> </div> </main> <ServerLoadingNotification /> </div> ) }
31.740741
108
0.534422
943ef014af09043d4cb6e2ba73a9213a87b664b9
988
js
JavaScript
js/audio.js
joshcai/lecturesync
10ff8d57be587fa7e6ceb46d753aef6e783cbc84
[ "MIT" ]
null
null
null
js/audio.js
joshcai/lecturesync
10ff8d57be587fa7e6ceb46d753aef6e783cbc84
[ "MIT" ]
null
null
null
js/audio.js
joshcai/lecturesync
10ff8d57be587fa7e6ceb46d753aef6e783cbc84
[ "MIT" ]
null
null
null
var onFail = function(e) { console.log('Rejected!', e); }; var onSuccess = function(s) { var context = new webkitAudioContext(); var mediaStreamSource = context.createMediaStreamSource(s); recorder = new Recorder(mediaStreamSource); recorder.record(); console.log("Recording..."); // audio loopback // mediaStreamSource.connect(context.destination); }; window.URL = window.URL || window.webkitURL; navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia; var recorder; var audio = document.querySelector('audio'); function startRecording() { if (navigator.getUserMedia) { navigator.getUserMedia({audio: true}, onSuccess, onFail); } else { console.log('navigator.getUserMedia not present'); } } function stopRecording() { recorder.stop(); recorder.exportWAV(function(s) { audio.src = window.URL.createObjectURL(s); }); }
27.444444
138
0.69332
943f20206ef036d5177c0dea8a7238c8ea4b7d0c
445
js
JavaScript
src/components/DailyKeg/DailyKegControl.js
JackStunning/tap-room
094b89e121732f78927d6762d7f6323a2c190168
[ "Unlicense" ]
null
null
null
src/components/DailyKeg/DailyKegControl.js
JackStunning/tap-room
094b89e121732f78927d6762d7f6323a2c190168
[ "Unlicense" ]
null
null
null
src/components/DailyKeg/DailyKegControl.js
JackStunning/tap-room
094b89e121732f78927d6762d7f6323a2c190168
[ "Unlicense" ]
null
null
null
import React from 'react'; import DailyKeg from './DailyKeg'; import DailyKegDetails from './DailyKegDetails'; class DailyKegControl extends React.Component { constructor(props) { super(props); } render() { return ( <React.Fragment> <DailyKeg masterKegList={this.props.masterKegList} /><br /> <button type="button"> Details </button> </React.Fragment> ); } } export default DailyKegControl;
19.347826
67
0.658427
943f511e25007791963fde3ba442c3ab0213be96
145
js
JavaScript
web/src/store/users/types.js
rfizzle/chef-center
bdb1aa609e52e875ad3f813881532bfd10df161a
[ "MIT" ]
null
null
null
web/src/store/users/types.js
rfizzle/chef-center
bdb1aa609e52e875ad3f813881532bfd10df161a
[ "MIT" ]
8
2020-02-20T03:33:29.000Z
2020-02-20T03:33:50.000Z
web/src/store/users/types.js
rfizzle/chef-center
bdb1aa609e52e875ad3f813881532bfd10df161a
[ "MIT" ]
null
null
null
export const USERS_LOADED = 'USERS_LOADED'; export const USERS_REFRESHING = 'USERS_REFRESHING'; export const USERS_REFRESHED = 'USERS_REFRESHED';
48.333333
51
0.82069
943fc106a9f451ee700be2975a070e440b664a5f
110
js
JavaScript
demo.js
AaronGod/HelloApp
008f981bf85dc0fe476acd9c8ef59d7cee04950c
[ "MIT" ]
null
null
null
demo.js
AaronGod/HelloApp
008f981bf85dc0fe476acd9c8ef59d7cee04950c
[ "MIT" ]
null
null
null
demo.js
AaronGod/HelloApp
008f981bf85dc0fe476acd9c8ef59d7cee04950c
[ "MIT" ]
null
null
null
console.log("test") let a = 123; console.log(a); const ss = 'You are smart.' // 再加一行请求合并 alert("请合并后再push")
12.222222
27
0.654545
9440f3ba2f64c54e471aa27ce8b3af314b77de99
215
js
JavaScript
lib/rules/modifiers/default.js
eNdiD/js-validator-livr
d4b8e6bb4707d0351c55c661b4ecb2372e9776f0
[ "MIT" ]
147
2015-04-27T13:46:28.000Z
2022-01-10T15:05:47.000Z
lib/rules/modifiers/default.js
eNdiD/js-validator-livr
d4b8e6bb4707d0351c55c661b4ecb2372e9776f0
[ "MIT" ]
33
2015-06-25T14:18:04.000Z
2022-02-01T10:34:08.000Z
lib/rules/modifiers/default.js
eNdiD/js-validator-livr
d4b8e6bb4707d0351c55c661b4ecb2372e9776f0
[ "MIT" ]
27
2015-01-12T13:49:10.000Z
2021-08-23T01:20:58.000Z
const util = require('../../util'); module.exports = defaultValue => { return (value, params, outputArr) => { if (util.isNoValue(value)) { outputArr.push(defaultValue); } }; }
17.916667
42
0.539535
944170b5f5d7b6378be2b3f1863d55b95882be94
972
js
JavaScript
src/components/index.js
Wutongjiaojiajia/wood-judge
ccadf956280a40c022e0a60b4c5e30c240b79f00
[ "Apache-2.0" ]
null
null
null
src/components/index.js
Wutongjiaojiajia/wood-judge
ccadf956280a40c022e0a60b4c5e30c240b79f00
[ "Apache-2.0" ]
4
2020-06-08T15:39:31.000Z
2022-02-27T04:38:11.000Z
src/components/index.js
Wutongjiaojiajia/wood-judge
ccadf956280a40c022e0a60b4c5e30c240b79f00
[ "Apache-2.0" ]
null
null
null
import Vue from 'vue'; import upperFirst from 'lodash/upperFirst'; import camelCase from 'lodash/camelCase'; //自动加载 global 目录下的 .vue/.js 结尾文件 const componentsContext = require.context( // 组件目录相对路径 './global', // 是否查询其子目录 false, // 匹配基础组件文件名的正则表达式 /\.(vue|js)$/ ); componentsContext.keys().forEach(fileName => { console.log("fileName",fileName); // 获取组件配置 const componentConfig = componentsContext(fileName); console.log("componentConfig",componentConfig); // 获取组件的 PascalCase 命名 const componentName = upperFirst( camelCase( // 剥去文件名开头的 `./` 和结尾的扩展名 fileName.replace(/^\.\/(.*)\.\w+$/, '$1') ) ) console.log("componentName",componentName); // 全局注册组件 Vue.component( // 首字母大写 componentName, // 如果这个组件选项是通过 `export default` 导出的, // 那么就会优先使用 `.default`, // 否则回退到使用模块的根。 componentConfig.default || componentConfig ) });
25.578947
56
0.610082
944256bf1fb2fb027677b2f9a48b2d4e44479a89
616
js
JavaScript
packages/playground/stories/HeartBtn.story.js
uxpin-merge/bloom
9e634c60bc30ed2e83ea78958fa169482c166e20
[ "MIT" ]
54
2017-09-18T17:12:52.000Z
2021-12-19T12:10:47.000Z
packages/playground/stories/HeartBtn.story.js
uxpin-merge/bloom
9e634c60bc30ed2e83ea78958fa169482c166e20
[ "MIT" ]
134
2017-09-18T17:13:38.000Z
2022-02-26T10:12:36.000Z
packages/playground/stories/HeartBtn.story.js
uxpin-merge/bloom
9e634c60bc30ed2e83ea78958fa169482c166e20
[ "MIT" ]
10
2017-09-18T17:20:21.000Z
2021-01-02T00:58:22.000Z
import React, { Component } from 'react'; import { storiesOf } from '@storybook/react'; import { HeartBtn } from '@appearhere/bloom'; class TestHeartContainer extends Component { state = { active: false }; toggleActive = () => { this.setState(({ active }) => ({ active: !active, })); }; render() { const { active } = this.state; return <HeartBtn {...this.props} onClick={this.toggleActive} active={active} />; } } storiesOf('HeartBtn', module) .add('Default (dark) variant', () => <TestHeartContainer />) .add('Light variant', () => <TestHeartContainer variant="light" />);
24.64
84
0.621753
9442a8704ae561955de08acc847665c1b9b33846
26,830
js
JavaScript
ur_packages/ursys/src/class-netpacket.js
daveseah/ursanode
f8b90b56bf654db395a2a44651613585590d5b19
[ "MIT" ]
null
null
null
ur_packages/ursys/src/class-netpacket.js
daveseah/ursanode
f8b90b56bf654db395a2a44651613585590d5b19
[ "MIT" ]
1
2021-09-02T12:59:06.000Z
2021-09-02T12:59:06.000Z
ur_packages/ursys/src/class-netpacket.js
daveseah/ursanode
f8b90b56bf654db395a2a44651613585590d5b19
[ "MIT" ]
null
null
null
/* eslint-disable @typescript-eslint/no-use-before-define */ /* eslint-disable @typescript-eslint/no-unused-vars */ /* eslint-disable lines-between-class-members */ /*//////////////////////////////// ABOUT \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*\ NetPacket objects are sent between the browser and server as part of the URSYS messaging system. NetMessages do not need addresses. This NetPacket declaration is SHARED in both node and browser javascript codebases. FEATURES * handles asynchronous transactions * works in both node and browser contexts * has an "offline mode" to suppress network messages without erroring \*\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ * //////////////////////////////////////*/ /// DEPENDENCIES ////////////////////////////////////////////////////////////// /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - const PROMPTS = require('./util/prompts'); /// DEBUG MESSAGES //////////////////////////////////////////////////////////// /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - const DBG = { send: false, transact: false, setup: false }; const PR = PROMPTS.makeLogHelper('PKT'); const ERR = ':ERR:'; const PERR = ERR + PR; const ERR_NOT_NETMESG = `${PERR}obj does not seem to be a NetPacket`; const ERR_BAD_PROP = `${PERR}property argument must be a string`; const ERR_ERR_BAD_CSTR = `${PERR}constructor args are string, object`; const ERR_BAD_SOCKET = `${PERR}sender object must implement send()`; const ERR_DUPE_TRANS = `${PERR}this packet transaction is already registered!`; const ERR_NO_GLOB_UADDR = `${PERR}packet sending attempted before UADDR is set!`; const ERR_UNKNOWN_TYPE = `${PERR}packet type is unknown:`; const ERR_NOT_PACKET = `${PERR}passed object is not a NetPacket`; const ERR_UNKNOWN_RMODE = `${PERR}packet routine mode is unknown:`; /// CONSTANTS ///////////////////////////////////////////////////////////////// /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - const M_INIT = 'init'; const M_ONLINE = 'online'; const M_STANDALONE = 'offline'; const M_CLOSED = 'closed'; const M_ERROR = 'error'; const VALID_CHANNELS = ['LOCAL', 'NET', 'STATE']; // * is all channels in list /// DECLARATIONS ////////////////////////////////////////////////////////////// /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - let m_id_counter = 0; let m_id_prefix = 'PKT'; let m_transactions = {}; let m_netsocket = null; let m_group_id = null; let m_mode = M_INIT; /// ENUMS ///////////////////////////////////////////////////////////////////// /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - const PACKET_TYPES = [ 'msend', // a 'send' message returns no data 'msig', // a 'signal' message is a send that calls all handlers everywhere 'mcall', // a 'call' message returns data 'state' // (unimplemented) a 'state' message is used by a state manager ]; const TRANSACTION_MODE = [ 'req', // packet in initial 'request' mode 'res' // packet in returned 'response' mode ]; /// URSYS NETMESSAGE CLASS //////////////////////////////////////////////////// /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** Class NetPacket * Container for messages that can be sent across the network to the URSYS * server. * @typedef {Object} NetPacket * @property {string} msg - message * @property {Object} data - message data * @property {string} id - internal id * @property {string} type - packet operation type (1way,2way,sync) * @property {string} rmode - transaction direction * @property {string} memo - human-readable debug note space * @property {string} seqnum - sequence number for transaction * @property {Array} seqlog - array of seqnums, starting with originating address * @property {string} s_uid - originating browser internal endpoint * @property {string} s_uaddr - originating browser address * @property {string} s_group - group session key */ class NetPacket { /** constructor * @param {string|object} msg message name, or an existing plain object to coerce into a NetPacket * @param {Object} data data packet to send * @param {string} type the message (defined in PACKET_TYPES) */ constructor(msg, data, type) { // OPTION 1 // create NetPacket from (generic object) if (typeof msg === 'object' && data === undefined) { // make sure it has a msg and data obj if (typeof msg.msg !== 'string' || typeof msg.data !== 'object') { throw Error(ERR_NOT_NETMESG); } // merge properties into this new class instance and return it Object.assign(this, msg); this.seqlog = this.seqlog.slice(); // copy array m_SeqIncrement(this); return this; } // OPTION 2 // create NetPacket from JSON-encoded string if (typeof msg === 'string' && data === undefined) { let obj = JSON.parse(msg); Object.assign(this, obj); m_SeqIncrement(this); return this; } // OPTION 3 // create new NetPacket from scratch (mesg,data) // unique id for every NetPacket if (typeof type === 'string') m_CheckType(type); if (typeof msg !== 'string' || typeof data !== 'object') { throw Error(ERR_ERR_BAD_CSTR); } // allow calls with null data by setting to empty object this.data = data || {}; this.msg = msg; // id and debugging memo support this.id = this.MakeNewID(); this.rmode = TRANSACTION_MODE[0]; // is default 'request' (trans request) this.type = type || PACKET_TYPES[0]; // is default 'msend' (no return) this.memo = ''; // transaction support this.seqnum = 0; // positive when part of transaction this.seqlog = []; // transaction log // addressing support this.s_uaddr = NetPacket.SocketUADDR() || null; // first originating uaddr set by SocketSend() this.s_group = null; // session groupid is set by external module once validated this.s_uid = null; // first originating URCHAN srcUID // filtering support } // constructor /// ACCESSSOR METHODS /////////////////////////////////////////////////////// /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** NetPacket.Type() returns the TRANSACTION_TYPE of this packet */ Type() { return this.type; } /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** NetPacket.Type() returns true if type matches * @param {string} type the type to compare with the packet's type * @returns {boolean} */ IsType(type) { return this.type === type; } /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** NetPacket.SetType() sets the type of the packet. Must be a known type * in PACKET_TYPES */ SetType(type) { this.type = m_CheckType(type); } /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** returns the message string of form CHANNEL:MESSAGE, where CHANNEL: * is optional */ Message() { return this.msg; } /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** returns MESSAGE without the CHANNEL: prefix. The channel (e.g. * NET, LOCAL, STATE) is also set true */ DecodedMessage() { return NetPacket.ExtractChannel(this.msg); } /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** NetPacket.Is() returns truthy value (this.data) if the passed msgstr * matches the message associated with this NetPacket */ Is(msgstr) { return msgstr === this.msg ? this.data : undefined; } /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** NetPacket.IsServerMessage() is a convenience function return true if * server message */ IsServerMessage() { return this.msg.startsWith('NET:SRV_'); } /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** NetPacket.SetMessage() sets the message field */ SetMessage(msgstr) { this.msg = msgstr; } /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** NetPacket.Data() returns the entire data payload or the property within * the data payload (can return undefined if property doesn't exist) */ Data(prop) { if (!prop) return this.data; if (typeof prop === 'string') return this.data[prop]; throw Error(ERR_BAD_PROP); } /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** * Convenience method to set data object entirely */ SetData(propOrVal, val) { if (typeof propOrVal === 'object') { this.data = propOrVal; return; } if (typeof propOrVal === 'string') { this.data[propOrVal] = val; return; } throw Error(ERR_BAD_PROP); } /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** NetPacket.Memo() returns the 'memo' field of the packet */ Memo() { return this.memo; } SetMemo(memo) { this.memo = memo; } /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** NetPacket.JSON() returns a stringified JSON version of the packet. */ JSON() { return JSON.stringify(this); } /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** NetPacket.SourceGroupId() return the session group id associated with * this packet. */ SourceGroupID() { return this.s_group; } /// TRANSACTION SUPPORT ///////////////////////////////////////////////////// /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** NetPacket.SeqNum() returns a non-positive integer that is the number of * times this packet was reused during a transaction (e.g. 'mcall' types). */ SeqNum() { return this.seqnum; } /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** NetPacket.SourceAddress() returns the originating browser of the packet, * which is the socketname maintained by the URSYS server. It is valid only * after the URSYS server has received it, so it is invalid when a NetPacket * packet is first created. */ SourceAddress() { /*/ NOTE s_uaddr is the most recent sending browser. If a NetPacket packet is reused in a transaction (e.g. a call that returns data) then the originating browser is the first element in the transaction log .seqlog /*/ // is this packet originating from server to a remote? if ( this.s_uaddr === NetPacket.DefaultServerUADDR() && !this.msg.startsWith('NET:SVR_') ) { return this.s_uaddr; } // this is a regular message forward to remote handlers return this.IsTransaction() ? this.seqlog[0] : this.s_uaddr; } /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** Return true if this pkt is from the server targeting remote handlers */ IsServerOrigin() { return this.SourceAddress() === NetPacket.DefaultServerUADDR(); } /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** NetPacket.CopySourceAddress() copies the source address of sets the * current address to the originating URSYS browser address. Used by server * forwarding and returning packets between remotes. * @param {NetPacket} pkt - the packet to copy source from */ CopySourceAddress(pkt) { if (pkt.constructor.name !== 'NetPacket') throw Error(ERR_NOT_PACKET); this.s_uaddr = pkt.SourceAddress(); } /// - - - - - - - - server- - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** NetPacket.Info() returns debug information about the packet * @param {string} key - type of debug info (always 'src' currently) * @returns {string} source browser + group (if set) */ Info(key) { switch (key) { case 'src': /* falls-through */ default: return this.SourceGroupID() ? `${this.SourceAddress()} [${this.SourceGroupID()}]` : `${this.SourceAddress()}`; } } /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** NetPacket.MakeNewID() is a utility method that generates a unique id for * each NetPacket packet. When combined with s_uaddr and s_srcuid, this gives * a packet a unique ID across the entire URSYS network. * @returns {string} unique id */ MakeNewID() { let idStr = (++m_id_counter).toString(); this.id = m_id_prefix + idStr.padStart(5, '0'); return this.id; } /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** NetPacket.SocketSend() is a convenience method to let packets 'send * themselves' to the network via the URSYS server. * @param {Object=m_socket} socket - web socket object. m_socket * is defined only on browsers; see NetPacket.GlobalSetup() */ SocketSend(socket = m_netsocket) { if (m_mode === M_ONLINE || m_mode === M_INIT) { this.s_group = NetPacket.GlobalGroupID(); let dst = socket.UADDR || 'unregistered socket'; if (!socket) throw Error('SocketSend(sock) requires a valid socket'); if (DBG.send) { let status = `sending '${this.Message()}' to ${dst}`; console.log(PR, status); } // for server-side ws library, send supports a function callback // for WebSocket, this is ignored socket.send(this.JSON(), err => { if (err) console.error(`\nsocket ${socket.UADDR} reports error ${err}\n`); }); } else if (m_mode !== M_STANDALONE) { console.log(PR, "SocketSend: Can't send because NetPacket mode is", m_mode); } else { console.warn(PR, 'STANDALONE MODE: SocketSend() suppressed!'); } // FYI: global m_netsocket is not defined on server, since packets arrive on multiple sockets } /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** NetPacket.PromiseTransaction() maps a packet to a return handler using a * unique key. This key allows an incoming packet to be mapped back to the * caller even if it is technically a different object received over the * network. * @param {Object=m_socket} socket - web socket object. m_socket is defined * only on browsers; see NetPacket.GlobalSetup() */ PromiseTransaction(socket = m_netsocket) { if (m_mode === M_STANDALONE) { console.warn(PR, 'STANDALONE MODE: PromiseTransaction() suppressed!'); return Promise.resolve(); } // global m_netsocket is not defined on server, since packets arrive on multiple sockets if (!socket) throw Error('PromiseTransaction(sock) requires a valid socket'); // save our current UADDR this.seqlog.push(NetPacket.UADDR); let dbg = DBG.transact && !this.IsServerMessage(); let p = new Promise((resolve, reject) => { let hash = m_GetHashKey(this); if (m_transactions[hash]) { reject(Error(`${ERR_DUPE_TRANS}:${hash}`)); } else { // save the resolve function in transactions table; // promise will resolve on remote invocation with data m_transactions[hash] = data => { if (dbg) { console.log(PR, 'resolving promise with', JSON.stringify(data)); } resolve(data); }; this.SocketSend(socket); } }); return p; } /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** NetPacket.RoutingMode() returns the direction of the packet to a * destination handler (req) or back to the origin (res). */ RoutingMode() { return this.rmode; } /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** NetPacket.IsRequest() returns true if this packet is one being sent * to a remote handler */ IsRequest() { return this.rmode === 'req'; } /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** NetPacket.IsResponse() returns true if this is a packet * being returned from a remote handler * @returns {boolean} true if this is a transaction response */ IsResponse() { return this.rmode === 'res'; // more bulletproof check, but unnecessary // return this.rmove ==='res' && this.SourceAddress() === NetPacket.UADDR; } /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** NetPacket.IsTransaction() tests whether the packet is a response to a * call that was sent out previously. */ IsTransaction() { return ( this.rmode !== 'req' && this.seqnum > 0 && this.seqlog[0] === NetPacket.UADDR ); } /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** NetPacket.ReturnTransaction() is used to send a packet back to its * origin. It saves the current browser address (stored in NetPacket.UADDR), * sets the direction of the packet, and puts it on the socket. * @param {Object=m_socket} socket - web socket object. m_socket is defined * only on browsers; see NetPacket.GlobalSetup() */ ReturnTransaction(socket = m_netsocket) { // global m_netsocket is not defined on server, since packets arrive on multiple sockets if (!socket) throw Error('ReturnTransaction(sock) requires a valid socket'); // note: seqnum is already incremented by the constructor if this was // a received packet // add this to the sequence log this.seqlog.push(NetPacket.UADDR); this.rmode = m_CheckRMode('res'); this.SocketSend(socket); } /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** NetPacket.CompleteTransaction() is called when a packet is received back * from the remote handler. At this point, the original caller needs to be * informed via the saved function handler created in * NetPacket.PromiseTransaction(). */ CompleteTransaction() { let dbg = DBG.transact && !this.IsServerMessage(); let hash = m_GetHashKey(this); let resolverFunc = m_transactions[hash]; if (dbg) console.log(PR, 'CompleteTransaction', hash); if (typeof resolverFunc !== 'function') { throw Error( `transaction [${hash}] resolverFunction is type ${typeof resolverFunc}` ); } else { resolverFunc(this.data); Reflect.deleteProperty(m_transactions[hash]); } } } // class NetPacket /// STATIC CLASS METHODS ////////////////////////////////////////////////////// /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** NetPacket.GlobalSetup() is a static method that initializes shared * parameters for use by all instances of the NetPacket class. It is used only * on browsers, which have a single socket connection. * * If no netsocket property is defined, then NetPacket instances will surpress * sending of network messages while allowing local messages to work normally. * See NetPacket.GlobalOfflineMode() for more information. * @function * @param {Object} [config] - configuration object * @param {Object} [config.netsocket] - valid websocket to URSYS server * @param {Object} [config.uaddr] - URSYS browser address */ NetPacket.GlobalSetup = (config = {}) => { let { uaddr, netsocket, peers, is_local } = config; if (uaddr) NetPacket.UADDR = uaddr; if (peers) NetPacket.PEERS = peers; if (netsocket) { // NOTE: m_netsocket is set only on clients since on server, there are // multiple sockets if (typeof netsocket.send !== 'function') throw Error(ERR_BAD_SOCKET); if (DBG.setup) console.log(PR, 'GlobalSetup: netsocket set, mode online'); m_netsocket = netsocket; m_mode = M_ONLINE; } if (is_local) NetPacket.ULOCAL = is_local; }; NetPacket.UADDR = 'UNASSIGNED'; NetPacket.ULOCAL = false; // set if connection is a local connection NetPacket.PEERS = undefined; /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** NetPacket.GlobalCleanup() is a static method called only by the client, * which drops the current socket and puts the app in 'closed' state. In * practice this call doesn't accomplish much, but is here for symmetry to * GlobalSetup(). * @function */ NetPacket.GlobalCleanup = () => { if (m_netsocket) { if (DBG.setup) console.log(PR, 'GlobalCleanup: deallocating netsocket, mode closed'); m_netsocket = null; m_mode = M_CLOSED; NetPacket.ULOCAL = false; } }; /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** Static method NetPacket.GlobalOfflineMode() explicitly sets the mode to STANDALONE, which * actively suppresses remote network communication without throwing errors. * It's used for static code snapshots of the webapp that don't need the * network. * @function */ NetPacket.GlobalOfflineMode = () => { m_mode = M_STANDALONE; if (m_netsocket) { console.log(...PR('STANDALONE MODE: NetPacket disabling network')); m_netsocket = null; let event = new CustomEvent('URSYSDisconnect', {}); console.log(...PR('STANDALONE MODE: sending URSYSDisconnect')); document.dispatchEvent(event); } }; /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** * Converts 'CHANNEL:MESSAGE' string to an object with channel, message * properties. If there is more than one : in the message string, it's left * as part of the message. All properties returned in are UPPERCASE. * @param {string} message - message with optional channel prefix * @returns {Object} - contains channel (UC) that are set * @example * const parsed = NetPacket.DecodeChannel('NET:MY_MESSAGE'); * if (parsed.NET) console.log('this is true'); * if (parsed.LOCAL) console.log('this is false'); * console.log('message is',parsed.MESSAGE); */ NetPacket.ExtractChannel = function ExtractChannel(msg) { let [channel, MESSAGE] = msg.split(':', 2); // no : found, must be local if (!MESSAGE) { MESSAGE = channel; channel = ''; } const parsed = { MESSAGE }; if (!channel) { parsed.LOCAL = true; return parsed; } if (channel === '*') { VALID_CHANNELS.forEach(chan => { parsed[chan] = true; }); return parsed; } if (VALID_CHANNELS.includes(channel)) { parsed[channel] = true; return parsed; } // legacy messages use invalid channel names // for now forward them as-is console.warn(`'${msg}' replace : with _`); parsed.LOCAL = true; return parsed; // this is what should actually happen // throw Error(`invalid channel '${channel}'`); }; /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** NetPacket.SocketUADDR() is a static method returning the class-wide setting * of the browser UADDR. This is only used on browser code. * @function * @returns {string} URSYS address of the current browser, a URSYS address */ NetPacket.SocketUADDR = () => { return NetPacket.UADDR; }; NetPacket.Peers = () => { return NetPacket.PEERS; }; NetPacket.IsLocalhost = () => { return NetPacket.ULOCAL; }; /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** NetPacket.DefaultServerUADDR() is a static method returning a hardcoded * URSYS address referring to the URSYS server. It is used by the server-side * code to set the server address, and the browser can rely on it as well. * @function * @returns {string} URSYS address of the server */ NetPacket.DefaultServerUADDR = () => { return 'SVR_01'; }; /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** NetPacket.GlobalGroupID() is a static method returning the session key * (aka group-id) set for this browser instance * @function * @returns {string} session key */ NetPacket.GlobalGroupID = () => { return m_group_id; }; /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** NetPacket.GlobalSetGroupID() is a static method that stores the passed * token as the GroupID * @function * @param {string} token - special session key data */ NetPacket.GlobalSetGroupID = token => { m_group_id = token; }; /// PRIVATE CLASS HELPERS ///////////////////////////////////////////////////// /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /*/ DEPRECATE? Utility function to increment the packet's sequence number * @param {NetPacket} pkt - packet to modify /*/ function m_SeqIncrement(pkt) { pkt.seqnum++; return pkt; } /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /*/ Utility to create a unique hash key from packet information. Used by * PromiseTransaction(). * @param {NetPacket} pkt - packet to use * @return {string} hash key string /*/ function m_GetHashKey(pkt) { let hash = `${pkt.SourceAddress()}:${pkt.id}`; return hash; } /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /*/ Utility to ensure that the passed type is one of the allowed packet types. * Throws an error if it is not. * @param {string} type - a string to be matched against PACKET_TYPES * @returns {string} the string that passed the type check /*/ function m_CheckType(type) { if (type === undefined) { throw new Error(`must pass a type string, not ${type}`); } if (!PACKET_TYPES.includes(type)) throw Error(`${ERR_UNKNOWN_TYPE} '${type}'`); return type; } /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /*/ Utility to ensure the passed transaction mode is one of the allowed * types. Throws an error if it is not. * @param {string} mode - a string to be matched against TRANSACTION_MODE * @returns {string} the string the passed the mode check /*/ function m_CheckRMode(mode) { if (mode === undefined) { throw new Error(`must pass a mode string, not ${mode}`); } if (!TRANSACTION_MODE.includes(mode)) throw Error(`${ERR_UNKNOWN_RMODE} '${mode}'`); return mode; } /// EXPORT CLASS DEFINITION /////////////////////////////////////////////////// /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - NetPacket.CODE_OK = 0; NetPacket.CODE_NO_MESSAGE = 1; // requested message doesn't exist NetPacket.CODE_SOC_NOSOCK = -100; NetPacket.CODE_SES_REQUIRE_KEY = -200; // access key not set NetPacket.CODE_SES_REQUIRE_LOGIN = -201; // socket was not logged-in NetPacket.CODE_SES_INVALID_KEY = -202; // provided key didn't match socket key NetPacket.CODE_SES_RE_REGISTER = -203; // session attempted to login again NetPacket.CODE_SES_INVALID_TOKEN = -204; // session attempted to login again NetPacket.CODE_REG_DENIED = -300; // registration of handler denied /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /// using CommonJS format on purpose for node compatibility module.exports = NetPacket;
38.715729
100
0.561834
9443fc53e236982958d750102e118292adb68bba
1,240
js
JavaScript
application/components/profile/ProfileView.js
Strings-Test-Team/assemblies
65aa0da7fe446d902641925b69cd83527c2ab967
[ "MIT" ]
395
2016-03-29T17:07:42.000Z
2022-03-16T19:08:54.000Z
application/components/profile/ProfileView.js
Strings-Test-Team/assemblies
65aa0da7fe446d902641925b69cd83527c2ab967
[ "MIT" ]
5
2016-03-29T19:08:06.000Z
2016-09-27T18:15:29.000Z
application/components/profile/ProfileView.js
Strings-Test-Team/assemblies
65aa0da7fe446d902641925b69cd83527c2ab967
[ "MIT" ]
107
2016-03-29T16:23:39.000Z
2022-02-13T18:04:05.000Z
import React, { Component } from 'react'; import { Navigator } from 'react-native'; import UserProfile from './UserProfile'; import UserSettings from './UserSettings'; import UserTechnologies from './UserTechnologies'; import { globals } from '../../styles'; class ProfileView extends Component{ render(){ return ( <Navigator initialRoute={{ name: 'UserProfile' }} style={globals.flex} renderScene={(route, navigator) => { switch(route.name){ case 'UserProfile': return ( <UserProfile {...this.props} {...route} navigator={navigator} /> ); case 'UserSettings': return ( <UserSettings {...this.props} {...route} navigator={navigator} /> ); case 'UserTechnologies': return ( <UserTechnologies {...this.props} {...route} navigator={navigator} /> ); } }} /> ) } }; export default ProfileView;
25.306122
50
0.446774
94454aa7d2141668a5a7e6c4e6d13b8eb867f220
3,755
js
JavaScript
test/modules/cacheHits.test.js
kevinkammleiter/phantomas
00fc9124a3a17532b356d940c4c0c666ccd05ee8
[ "BSD-2-Clause" ]
1,326
2015-01-01T21:51:17.000Z
2022-03-29T09:09:53.000Z
test/modules/cacheHits.test.js
kevinkammleiter/phantomas
00fc9124a3a17532b356d940c4c0c666ccd05ee8
[ "BSD-2-Clause" ]
342
2015-01-04T21:31:40.000Z
2022-03-26T21:15:54.000Z
test/modules/cacheHits.test.js
kevinkammleiter/phantomas
00fc9124a3a17532b356d940c4c0c666ccd05ee8
[ "BSD-2-Clause" ]
130
2015-01-08T13:52:21.000Z
2022-01-03T10:23:47.000Z
/** * Test cacheHits module */ const mock = require("./mock"), { describe } = require("@jest/globals"); describe("cacheHits", () => { describe("no caching headers", () => { mock.getContext( "cacheHits", function (phantomas) { return phantomas .recv({ headers: {}, }) .report(); }, { cacheHits: 0, cacheMisses: 0, cachePasses: 0, } ); }); describe("Age header (hit)", () => { mock.getContext( "cacheHits", function (phantomas) { return phantomas .recv({ headers: { Age: "14365", }, }) .report(); }, { cacheHits: 1, cacheMisses: 0, cachePasses: 0, } ); }); describe("Age + X-Cache header (hit)", () => { mock.getContext( "cacheHits", function (phantomas) { return phantomas .recv({ headers: { Age: "14365", "X-Cache": "HIT", }, }) .report(); }, { cacheHits: 1, cacheMisses: 0, cachePasses: 0, } ); }); describe("Age header (0 seconds)", () => { mock.getContext( "cacheHits", function (phantomas) { return phantomas .recv({ headers: { Age: "0", }, }) .report(); }, { cacheHits: 0, cacheMisses: 1, cachePasses: 0, } ); }); describe("Age header (N seconds)", () => { mock.getContext( "cacheHits", function (phantomas) { return phantomas .recv({ headers: { Age: "24115", }, }) .report(); }, { cacheHits: 1, cacheMisses: 0, cachePasses: 0, } ); }); describe("Age header (string)", () => { mock.getContext( "cacheHits", function (phantomas) { return phantomas .recv({ headers: { Age: "foo", }, }) .report(); }, { cacheHits: 0, cacheMisses: 0, cachePasses: 0, } ); }); describe("hits", () => { mock.getContext( "cacheHits", function (phantomas) { return phantomas .recv({ headers: { "X-Cache": "HIT", }, }) .report(); }, { cacheHits: 1, cacheMisses: 0, cachePasses: 0, } ); }); describe("hits (following the miss)", () => { mock.getContext( "cacheHits", function (phantomas) { return phantomas .recv({ headers: { "X-Cache": "HIT, MISS", }, }) .report(); }, { cacheHits: 1, cacheMisses: 0, cachePasses: 0, } ); }); describe("misses", () => { mock.getContext( "cacheHits", function (phantomas) { return phantomas .recv({ headers: { "X-Cache": "MISS", }, }) .report(); }, { cacheHits: 0, cacheMisses: 1, cachePasses: 0, } ); }); describe("passes", () => { mock.getContext( "cacheHits", function (phantomas) { return phantomas .recv({ headers: { "X-Cache": "PASS", }, }) .report(); }, { cacheHits: 0, cacheMisses: 0, cachePasses: 1, } ); }); });
18.140097
48
0.382956
94463a8b2802b95554b9e9cf300c8872dd93eab8
259
js
JavaScript
test/utils.js
bowheart/react-zedux
631fe5f918ad9fefc73f9ea689a1ac5faeba9324
[ "MIT" ]
9
2018-02-15T01:53:10.000Z
2019-01-22T16:36:28.000Z
test/utils.js
bowheart/react-zedux
631fe5f918ad9fefc73f9ea689a1ac5faeba9324
[ "MIT" ]
null
null
null
test/utils.js
bowheart/react-zedux
631fe5f918ad9fefc73f9ea689a1ac5faeba9324
[ "MIT" ]
null
null
null
import vm from 'vm' export const nonPlainObjects = [ undefined, null, 'a', 1, [], () => {}, new Map(), Object.create(null) ] export const plainObjects = [ {}, Object.create(Object.prototype), vm.runInNewContext('placeholder = {}') ]
12.333333
40
0.598456
9446467d98efa6ade7f846b3347005a4e4032299
5,559
js
JavaScript
src/views/Images/UploadImage.js
lee-mfv/pte-mockup
a0590a80b07ea9a89939b15c1f2efd38953189ac
[ "Apache-2.0" ]
null
null
null
src/views/Images/UploadImage.js
lee-mfv/pte-mockup
a0590a80b07ea9a89939b15c1f2efd38953189ac
[ "Apache-2.0" ]
1
2021-09-02T18:54:00.000Z
2021-09-02T18:54:00.000Z
src/views/Images/UploadImage.js
lee-mfv/pte-mockup
a0590a80b07ea9a89939b15c1f2efd38953189ac
[ "Apache-2.0" ]
null
null
null
import React, {Component} from 'react' import {connect} from 'react-redux' import PropTypes from "prop-types"; import withStyles from "@material-ui/core/styles/withStyles"; import { compose } from "redux"; import {getFirebase} from "react-redux-firebase"; import InfoIcon from '@material-ui/icons/Info'; import ArrowBackIcon from '@material-ui/icons/ArrowBack'; import {cloneDeep, unset} from "lodash"; import {createImage} from 'store/actions/imageActions' import BasicUploader from 'components/Common/BasicUploader' import Constant from 'config/constants' import Loading from 'components/Common/Loading' import GridContainer from "components/Grid/GridContainer.jsx"; import GridItem from "components/Grid/GridItem.jsx"; import Card from "components/Card/Card.jsx"; import CardHeader from "components/Card/CardHeader.jsx"; import CardBody from "components/Card/CardBody.jsx"; import CardFooter from "components/Card/CardFooter.jsx"; import Button from "components/CustomButtons/Button.jsx"; import Snackbar from "components/Snackbar/Snackbar"; const styles = { cardCategoryWhite: { color: "rgba(255,255,255,.62)", margin: "0", fontSize: "14px", marginTop: "0", marginBottom: "0" }, cardTitleWhite: { color: "#FFFFFF", marginTop: "0px", minHeight: "auto", fontWeight: "300", fontFamily: "'Roboto', 'Helvetica', 'Arial', sans-serif", marginBottom: "3px", textDecoration: "none" } }; class UploadImage extends Component { constructor(props) { super(props); this.state = { form: { image_metadata: {}, }, file: null, isProcessing: false, open: false, }; this.handleClose = this.handleClose.bind(this); } onFilesDrop = (files) => { if(files.length) { this.setState({ file: files[0] }); } } handleSubmit = (e) => { e.preventDefault(); // validate if(!this.state.file) { alert('You have to select image'); return false; } this.setState((prevState, props) => ({ isProcessing: true }), ()=>{ // upload first const firebase = getFirebase(); firebase.uploadFile(Constant.UPLOAD_PATH.IMAGES, this.state.file).then(res => { const metadata = res.uploadTaskSnapshot.metadata; this.setState((prevState, props) => ({ form: { ...prevState.form, image_metadata: metadata } }), () => { let form = cloneDeep(this.state.form); unset(form, 'image_metadata.cacheControl') unset(form, 'image_metadata.contentLanguage') unset(form, 'image_metadata.customMetadata') this.props.createImage(form) .then(() => { this.setState({ open: true }, () => { setTimeout(function() { this.setState({ file: null, open: false, isProcessing: false }) }.bind(this), 1000); }) // this.props.history.push('/admin/images/list'); }) .catch(() => { // this.props.history.push('/admin/images/list'); }); }); return res; }).catch(err => { alert('Something went wrong. Please try again.') window.location = window.location.href; return false; }); }); } handleClose(open) { this.setState({open: open}) } render() { const { classes } = this.props; const { isProcessing, open, file } = this.state; return ( <div> <GridContainer> <GridItem xs={12} sm={12} md={12} container justify="flex-start"> <Button onClick={() => this.props.history.goBack()} type="button" color="info" size="sm" round justIcon> <ArrowBackIcon /></Button> </GridItem> </GridContainer> <form onSubmit={this.handleSubmit}> <GridContainer> <GridItem xs={12} sm={12} md={12}> <Card> <CardHeader color="primary"> <h4 className={classes.cardTitleWhite}>Upload Image</h4> </CardHeader> <CardBody> <GridContainer> <GridItem xs={12} sm={12} md={12}> <BasicUploader onFilesDrop={this.onFilesDrop} selectedFiles={file} /> </GridItem> {isProcessing && <GridItem xs={12} sm={12} md={12}> <Loading /> </GridItem>} </GridContainer> </CardBody> <CardFooter> <Button type="submit" color="primary" disabled={isProcessing ? true : false}>Upload</Button> </CardFooter> </Card> </GridItem> </GridContainer> </form> <Snackbar place={'br'} color={'success'} icon={InfoIcon} message="Uploaded successfully!" open={open} closeNotification={() => this.handleClose(false)} close /> </div> ) } } const mapDispatchToProps = (dispatch) => { return { createImage: (image) => dispatch(createImage(image)), } }; const mapStateToProps = state => { return { }; }; UploadImage.propTypes = { classes: PropTypes.object }; export default compose( connect( mapStateToProps, mapDispatchToProps ), withStyles(styles) )(UploadImage);
27.25
143
0.558734
75bfbb466fc287a12182b632b2982fb18a31c212
296
js
JavaScript
react-scv/jest.js
gesposito/react-ufo
0c2613dcd643041eea9e53453f5659450b2b5a8a
[ "MIT" ]
90
2019-11-25T09:17:29.000Z
2021-02-06T19:27:10.000Z
react-scv/jest.js
gesposito/react-ufo
0c2613dcd643041eea9e53453f5659450b2b5a8a
[ "MIT" ]
3
2020-02-11T00:32:46.000Z
2022-02-27T23:07:35.000Z
react-scv/jest.js
gesposito/react-ufo
0c2613dcd643041eea9e53453f5659450b2b5a8a
[ "MIT" ]
4
2020-02-10T09:53:28.000Z
2020-05-12T16:31:33.000Z
const path = require('path') const config = require('react-scv/config/jest') const rootPath = path.resolve(__dirname, '..') config.roots = [rootPath] config.rootDir = rootPath config.collectCoverageFrom = ["src/module/**/*.js", "!**/node_modules/**", "!**/vendor/**"] module.exports = config
24.666667
91
0.682432
75c0024048c5967f1e76582f5aaaad9dad2614ce
2,466
js
JavaScript
my-favorite-folders-share/src/main/amp/config/alfresco/web-extension/site-webscripts/org/alfresco/components/dashlets/my-folders.get.js
jpotts/alfresco-favorite-folders-dashlet
380184d69e39ef209665bf504545ddca809c6b41
[ "MIT" ]
3
2018-11-02T17:36:55.000Z
2020-08-07T00:21:45.000Z
my-favorite-folders-share/src/main/amp/config/alfresco/web-extension/site-webscripts/org/alfresco/components/dashlets/my-folders.get.js
jpotts/alfresco-favorite-folders-dashlet
380184d69e39ef209665bf504545ddca809c6b41
[ "MIT" ]
null
null
null
my-favorite-folders-share/src/main/amp/config/alfresco/web-extension/site-webscripts/org/alfresco/components/dashlets/my-folders.get.js
jpotts/alfresco-favorite-folders-dashlet
380184d69e39ef209665bf504545ddca809c6b41
[ "MIT" ]
null
null
null
<import resource="classpath:/alfresco/templates/org/alfresco/import/alfresco-util.js"> function runEvaluator(evaluator) { return eval(evaluator); } /* Get filters */ function getFilters() { var myConfig = new XML(config.script), filters = []; for each (var xmlFilter in myConfig..filter) { // add support for evaluators on the filter. They should either be missing or eval to true if (xmlFilter.@evaluator.toString() === "" || runEvaluator(xmlFilter.@evaluator.toString())) { filters.push(xmlFilter.@type.toString()); } } return filters } /* Max Items */ function getMaxItems() { var myConfig = new XML(config.script), maxItems = myConfig["max-items"]; if (maxItems) { maxItems = myConfig["max-items"].toString(); } return parseInt(maxItems && maxItems.length > 0 ? maxItems : 50, 10); } var regionId = args['region-id']; model.preferences = AlfrescoUtil.getPreferences("org.alfresco.share.myFolders.dashlet." + regionId); model.filters = getFilters(); model.maxItems = getMaxItems(); function main() { // Widget instantiation metadata... model.prefFilter = model.preferences.filter; if (model.prefFilter == null) { model.prefFilter = "favourites"; } model.prefSimpleView = model.preferences.simpleView; if (model.prefSimpleView == null) { model.prefSimpleView = true; } var myDocs = { id : "MyFolders", name : "Alfresco.dashlet.MyFolders", options : { filter : model.prefFilter, maxItems : parseInt(model.maxItems), simpleView : model.prefSimpleView, validFilters : model.filters, regionId : regionId } }; var dashletResizer = { id : "DashletResizer", name : "Alfresco.widget.DashletResizer", initArgs : ["\"" + args.htmlid + "\"", "\"" + instance.object.id + "\""], useMessages: false }; var dashletTitleBarActions = { id : "DashletTitleBarActions", name : "Alfresco.widget.DashletTitleBarActions", useMessages : false, options : { actions: [ { cssClass: "help", bubbleOnClick: { message: msg.get("dashlet.help") }, tooltip: msg.get("dashlet.help.tooltip") } ] } }; model.widgets = [myDocs, dashletResizer, dashletTitleBarActions]; } main();
25.42268
100
0.601379
75c0ca345d37543d8c6978e77f11ff927afe981e
435
js
JavaScript
test/integration/test/integration-mocha-setup.js
mwolson/jazzdom
977ca3e4a26b6945ab0153d80d7f6b6fe9126d47
[ "MIT" ]
1
2018-01-07T21:03:51.000Z
2018-01-07T21:03:51.000Z
test/integration/test/integration-mocha-setup.js
mwolson/jazzdom
977ca3e4a26b6945ab0153d80d7f6b6fe9126d47
[ "MIT" ]
null
null
null
test/integration/test/integration-mocha-setup.js
mwolson/jazzdom
977ca3e4a26b6945ab0153d80d7f6b6fe9126d47
[ "MIT" ]
null
null
null
const chai = require('chai') const chaiAsPromised = require('chai-as-promised') const td = require('testdouble') const tdChai = require('testdouble-chai') chai.use(chaiAsPromised) chai.use(tdChai(td)) chai.config.includeStack = true chai.config.showDiff = false global.expect = chai.expect // if any unhandled rejections happen in promises, treat them as fatal errors process.on('unhandledRejection', function(err) { throw err })
25.588235
77
0.76092
75c102bfe57e023ccb1a2af44225ccc88522ceac
448
js
JavaScript
test/unit/reducers/notification.js
carlosascari/website
584d2639169c0e55834cd5dd799dc1336cab163c
[ "MIT" ]
36
2017-05-13T21:23:49.000Z
2019-06-12T17:12:14.000Z
test/unit/reducers/notification.js
carlosascari/website
584d2639169c0e55834cd5dd799dc1336cab163c
[ "MIT" ]
175
2016-05-13T20:25:28.000Z
2017-04-27T23:16:58.000Z
test/unit/reducers/notification.js
carlosascari/website
584d2639169c0e55834cd5dd799dc1336cab163c
[ "MIT" ]
28
2017-05-18T13:12:09.000Z
2021-02-14T07:26:29.000Z
import expect from 'expect'; import reducer from '../../../frontend/src/reducers/notification'; import { NOTIFY } from '../../../frontend/src/constants/notification'; describe('notification reducer', () => { it('should save the notification', () => { const notification = { message: 'Yo', status: 'error' }; expect(reducer({}, { ...notification, type: NOTIFY })) .toEqual(notification); }); });
20.363636
70
0.587054
75c1f664a2566c1667708fe517b15e42a502e816
1,743
js
JavaScript
public/scripts/dist/myscripts.dev.js
nacsasoft/ci-TodoApp
3ac12e8ab39cccda25eac0ff1e51205e91be3283
[ "MIT" ]
null
null
null
public/scripts/dist/myscripts.dev.js
nacsasoft/ci-TodoApp
3ac12e8ab39cccda25eac0ff1e51205e91be3283
[ "MIT" ]
null
null
null
public/scripts/dist/myscripts.dev.js
nacsasoft/ci-TodoApp
3ac12e8ab39cccda25eac0ff1e51205e91be3283
[ "MIT" ]
null
null
null
"use strict"; //aktív link (menüelem) beállítása: $(function () { $('.navbar-nav .nav-link').click(function () { $('.navbar-nav .nav-link').removeClass('active'); //active class törlése minden menüelemből $(this).addClass('active'); //és hozzáadása az éppen kiválasztotthoz }); }); $(function () { $('.feladatlista').click(function () { alert($(this).attr('id')); }); }); //---------------------------------------------------------------------------------------------------- /* Új adatok vagy a módosított adatok mentése AJAX-al */ var uj_szerkeszt; //értéke lehet : "ujfelvitel" vagy "frissites" function ujFelvitelJS() { uj_szerkeszt = 'ujfelvitel'; adatokMentese(); //$('#form')[0].reset(); //form adatok törlése -ezt majd a sikeres művelet végén!! } function adatokMentese() { var url; if (uj_szerkeszt == 'ujfelvitel') { //új feladatot kell felvenni: url = 'TodoAppController/ujFelvitel'; } // feladat hozzáadása AJAX-al: $('#btnUjFelvitel').html('Küldés...'); $.ajax({ url: url, type: "post", data: $('#myform').serialize(), dataType: "json", success: function success(response) { $('#btnUjFelvitel').html('Új feladat rögzítése'); $('#res_message').html(response.msg); $('#res_message').show(); $('#res_message').removeClass('d-none'); $("#myform").trigger("reset"); setTimeout(function () { $('#res_message').hide(); $('#res_message').html(''); location.replace("index.php"); }, 5000); }, error: function error(jqXHR, textStatus, errorThrown) { alert('AJAX hiba!!'); } }); } //----------------------------------------------------------------------------------------------------
30.578947
106
0.529547
75c2af8d4ca736aa25390b0cac3cc34738ad8bca
2,731
js
JavaScript
node_modules/@redwoodjs/web/dist/flash/FlashReducer.js
Ry-Hebert/RedwoodBlogSite
e8a9818bfba54766cbbaed69f20039a20b9dd7e9
[ "MIT" ]
null
null
null
node_modules/@redwoodjs/web/dist/flash/FlashReducer.js
Ry-Hebert/RedwoodBlogSite
e8a9818bfba54766cbbaed69f20039a20b9dd7e9
[ "MIT" ]
7
2021-03-10T23:56:31.000Z
2022-02-27T07:25:13.000Z
node_modules/@redwoodjs/web/dist/flash/FlashReducer.js
Ry-Hebert/RedwoodBlogSite
e8a9818bfba54766cbbaed69f20039a20b9dd7e9
[ "MIT" ]
null
null
null
"use strict"; var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault"); var _Object$defineProperty = require("@babel/runtime-corejs3/core-js/object/define-property"); _Object$defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _find = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/instance/find")); var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/instance/concat")); var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/toConsumableArray")); var _objectSpread2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/objectSpread2")); var _filter = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/instance/filter")); // helpers var removeMessage = function removeMessage(messages, id) { return (0, _filter.default)(messages).call(messages, function (msg) { return msg.id !== id; }); }; // the reducer var _default = function _default(state, action) { var _context; switch (action.type) { case 'ADD_MESSAGE': // add a message return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, state), {}, { messages: (0, _concat.default)(_context = []).call(_context, (0, _toConsumableArray2.default)(state.messages), [{ id: state.messages.length, text: action.payload.text, classes: action.payload.classes || '', persist: action.payload.persist || false, viewed: action.payload.viewed || false }]) }); case 'DISMISS_MESSAGE': { // return messages that do not match id (via payload) var newMessages = removeMessage(state.messages, action.payload); return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, state), {}, { messages: newMessages }); } case 'CYCLE_MESSAGE': { var _context2; // find the message // if viewed and not persist, remove it // else mark as viewed var _newMessages = []; var message = (0, _find.default)(_context2 = state.messages).call(_context2, function (msg) { return msg.id === action.payload; }); if (message.viewed && !message.persist) { _newMessages = removeMessage(state.messages, action.payload); } else { message.viewed = true; _newMessages = (0, _toConsumableArray2.default)(state.messages); } return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, state), {}, { messages: _newMessages }); } default: return state; } }; exports.default = _default;
32.129412
121
0.651044
75c312afc609b07b5045b557530f243ef36c7c83
150
js
JavaScript
public/modules/admission-eligibility-rules/admission-eligibility-rules.client.module.js
rajasekaran247/school-administrative-services
d1f08cfaa90f2e504824ee8356659d4e5a34d110
[ "MIT" ]
null
null
null
public/modules/admission-eligibility-rules/admission-eligibility-rules.client.module.js
rajasekaran247/school-administrative-services
d1f08cfaa90f2e504824ee8356659d4e5a34d110
[ "MIT" ]
null
null
null
public/modules/admission-eligibility-rules/admission-eligibility-rules.client.module.js
rajasekaran247/school-administrative-services
d1f08cfaa90f2e504824ee8356659d4e5a34d110
[ "MIT" ]
null
null
null
'use strict'; // Use applicaion configuration module to register a new module ApplicationConfiguration.registerModule('admission-eligibility-rules');
37.5
71
0.826667